Implemented custom system for creating and distributing color schemes based on wallpapers, and also cycling through wallpapers.
nixfmt'd the codebase
This commit is contained in:
@@ -1,34 +1,46 @@
|
||||
{ inputs, pkgs, lib, config, self, host, ... }:
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
self,
|
||||
host,
|
||||
...
|
||||
}:
|
||||
let
|
||||
desktop = host == "oganesson" || host == "phosphorous";
|
||||
screenshot_bind = if desktop then
|
||||
[
|
||||
"super, print, exec, grimblast copy area"
|
||||
"super shift, print, exec, grimblast --freeze copy area"
|
||||
]
|
||||
else
|
||||
[
|
||||
# My laptop does not have a printscreen button
|
||||
"super, insert, exec, grimblast copy area"
|
||||
];
|
||||
screenshot_bind =
|
||||
if desktop then
|
||||
[
|
||||
"super, print, exec, grimblast copy area"
|
||||
"super shift, print, exec, grimblast --freeze copy area"
|
||||
]
|
||||
else
|
||||
[
|
||||
# My laptop does not have a printscreen button
|
||||
"super, insert, exec, grimblast copy area"
|
||||
];
|
||||
scheme = config.lib.stylix.colors;
|
||||
mons = config.movOpts.envConfig.hyprlandConfig.monitorNames;
|
||||
smartGapsWorkspaces = [
|
||||
"w[tv1], gapsout:0, gapsin:0"
|
||||
"f[1], gapsout:0, gapsin:0"
|
||||
];
|
||||
smartGapsWindowrules = [
|
||||
"border_size 0, match:float 0, match:workspace w[tv1]"
|
||||
"rounding 0, match:float 0, match:workspace w[tv1]"
|
||||
"border_size 0, match:float 0, match:workspace f[1]"
|
||||
"rounding 0, match:float 0, match:workspace f[1]"
|
||||
];
|
||||
hostWorkspaces = if (host == "phosphorous") then
|
||||
[
|
||||
"m[DP-3], layoutopt:orientation:top"
|
||||
]
|
||||
else [];
|
||||
in {
|
||||
#smartGapsWorkspaces = [
|
||||
#"w[tv1], gapsout:0, gapsin:0"
|
||||
#"f[1], gapsout:0, gapsin:0"
|
||||
#];
|
||||
#smartGapsWindowrules = [
|
||||
#"border_size 0, match:float 0, match:workspace w[tv1]"
|
||||
#"rounding 0, match:float 0, match:workspace w[tv1]"
|
||||
#"border_size 0, match:float 0, match:workspace f[1]"
|
||||
#"rounding 0, match:float 0, match:workspace f[1]"
|
||||
#];
|
||||
hostWorkspaces =
|
||||
if (host == "phosphorous") then
|
||||
[
|
||||
"m[DP-3], layoutopt:orientation:top"
|
||||
]
|
||||
else
|
||||
[ ];
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
movOpts.envConfig.hyprlandConfig = {
|
||||
@@ -41,7 +53,10 @@ in {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
# The order of the monitor names matters for the purpose of workspace assignment
|
||||
# For instance, in a dual monitor setup, index 0 gets 4,5 and 6, while index 1 gets 1,2 and 3
|
||||
default = [ "DP-1" "HDMI-A-1" ];
|
||||
default = [
|
||||
"DP-1"
|
||||
"HDMI-A-1"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -58,23 +73,32 @@ in {
|
||||
wayland
|
||||
direnv
|
||||
];
|
||||
systemd.user.targets.hyprland-session.Unit.Wants =
|
||||
[ "xdg-desktop-autostart.target" ];
|
||||
systemd.user.targets.hyprland-session.Unit.Wants = [ "xdg-desktop-autostart.target" ];
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland = { enable = true; };
|
||||
xwayland = {
|
||||
enable = true;
|
||||
};
|
||||
systemd.enable = true;
|
||||
extraConfig = ''
|
||||
source = ~/.local/state/sysflake/hyprland-colors.conf
|
||||
'';
|
||||
};
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
monitor = if (host == "oganesson") then [
|
||||
"DP-1, 1920x1080@144, 1920x0, 1"
|
||||
"HDMI-A-1, 1920x1080, 0x0, 1"
|
||||
] else if (host == "phosphorous") then [
|
||||
"DP-1, highrr, 0x0, 1"
|
||||
"DP-3, highrr, -1080x-420, 1, transform, 3"
|
||||
] else
|
||||
[ "eDP-1, 1600x900, 0x0, 1" ];
|
||||
monitor =
|
||||
if (host == "oganesson") then
|
||||
[
|
||||
"DP-1, 1920x1080@144, 1920x0, 1"
|
||||
"HDMI-A-1, 1920x1080, 0x0, 1"
|
||||
]
|
||||
else if (host == "phosphorous") then
|
||||
[
|
||||
"DP-1, highrr, 0x0, 1"
|
||||
"DP-3, highrr, -1080x-420, 1, transform, 3"
|
||||
]
|
||||
else
|
||||
[ "eDP-1, 1600x900, 0x0, 1" ];
|
||||
|
||||
exec-once = [
|
||||
"waybar &"
|
||||
@@ -87,26 +111,37 @@ in {
|
||||
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &"
|
||||
];
|
||||
|
||||
workspace = hostWorkspaces ++ (if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "dualmonitor") then [
|
||||
"1,persistent=true,monitor:${builtins.elemAt mons 0}"
|
||||
"2,persistent=true,monitor:${builtins.elemAt mons 0}"
|
||||
"3,persistent=true,monitor:${builtins.elemAt mons 0}"
|
||||
"4,persistent=true,monitor:${builtins.elemAt mons 1}"
|
||||
"5,persistent=true,monitor:${builtins.elemAt mons 1}"
|
||||
"6,persistent=true,monitor:${builtins.elemAt mons 1}"
|
||||
] else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "singlemonitor") then [
|
||||
"1,persistent=true,monitor:${builtins.elemAt mons 0} "
|
||||
"2,persistent=true,monitor:${builtins.elemAt mons 0}"
|
||||
"3,persistent=true,monitor:${builtins.elemAt mons 0}"
|
||||
"4,persistent=true,monitor:${builtins.elemAt mons 0}"
|
||||
] else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "trimonitor") then [
|
||||
workspace =
|
||||
hostWorkspaces
|
||||
++ (
|
||||
if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "dualmonitor") then
|
||||
[
|
||||
"1,persistent=true,monitor:${builtins.elemAt mons 0}"
|
||||
"2,persistent=true,monitor:${builtins.elemAt mons 0}"
|
||||
"3,persistent=true,monitor:${builtins.elemAt mons 0}"
|
||||
"4,persistent=true,monitor:${builtins.elemAt mons 1}"
|
||||
"5,persistent=true,monitor:${builtins.elemAt mons 1}"
|
||||
"6,persistent=true,monitor:${builtins.elemAt mons 1}"
|
||||
]
|
||||
else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "singlemonitor") then
|
||||
[
|
||||
"1,persistent=true,monitor:${builtins.elemAt mons 0} "
|
||||
"2,persistent=true,monitor:${builtins.elemAt mons 0}"
|
||||
"3,persistent=true,monitor:${builtins.elemAt mons 0}"
|
||||
"4,persistent=true,monitor:${builtins.elemAt mons 0}"
|
||||
]
|
||||
else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "trimonitor") then
|
||||
[
|
||||
"1,persistent=true,monitor:${builtins.elemAt mons 2}"
|
||||
"2,persistent=true,monitor:${builtins.elemAt mons 2}"
|
||||
"3,persistent=true,monitor:${builtins.elemAt mons 1}"
|
||||
"4,persistent=true,monitor:${builtins.elemAt mons 1}"
|
||||
"5,persistent=true,monitor:${builtins.elemAt mons 0}"
|
||||
"6,persistent=true,monitor:${builtins.elemAt mons 0}"
|
||||
] else [ ]) ++ smartGapsWorkspaces;
|
||||
]
|
||||
else
|
||||
[ ]
|
||||
);
|
||||
|
||||
env = [
|
||||
"XDG_CONFIG_HOME,$HOME/.config"
|
||||
@@ -114,38 +149,38 @@ in {
|
||||
"XDG_CACHE_HOME,$HOME/.cache"
|
||||
];
|
||||
layerrule = [
|
||||
"match:namespace = waybar, blur 1"
|
||||
"match:namespace = waybar, ignore_alpha 0"
|
||||
"blur on, ignore_alpha 0, match:namespace waybar"
|
||||
"match:namespace = launcher, blur 1"
|
||||
];
|
||||
windowrule = [
|
||||
# From old windowrulev2
|
||||
"float true, match:class ^(thunar)$, match:title ^(.*File Operation Progress.*)$"
|
||||
"float true, match:class ^(firefox)$, match:title ^(Library)$"
|
||||
"float true, match:class ^(thunar)$, match:title ^(File Operation Progress)$"
|
||||
"float true, match:class ^(thunar)$, match:title ^(Confirm to replace files)$"
|
||||
"float true, match:title ^(bwarn)$"
|
||||
"no_initial_focus on, match:class ^(steam)$"
|
||||
"float true, match:class ^(firefox)$, match:title ^(ログイン - Google アカウント — Mozilla Firefox)$"
|
||||
"float true, match:class ^(firefox)$, match:title ^(Firefox — Sharing Indicator)$"
|
||||
"float true, match:class ^(firefox)$, match:title ^(Firefox — 共有インジケーター)$"
|
||||
"float true, match:class ^(firefox)$, match:title ^(.*Sign in.*)$"
|
||||
# From old windowrule
|
||||
"float true, match:class ^(qt5ct)$"
|
||||
"float true, match:class ^(zoom)$"
|
||||
"float true, match:class ^(Steam)$"
|
||||
"idle_inhibit focus, match:class ^(mpv)$"
|
||||
"float true, match:title ^(Picture-in-Picture)$"
|
||||
"float true, match:class ^(nm-connection-editor)$"
|
||||
"float true, match:class ^(waypaper)$"
|
||||
"float true, match:title ^(Sign In)(.*)$"
|
||||
"float true, match:title ^(Firefox — 共有インジケーター)$"
|
||||
"no_focus on, match:title ^(Firefox — 共有インジケーター)$"
|
||||
"float true, match:class ^(firefox)$, match:title ^(Sign in - Google Accounts — Mozilla Firefox)$"
|
||||
"size 0 0, match:title ^(Firefox — 共有インジケーター)$"
|
||||
"move 100%-470 15, match:title ^(Firefox — Sharing Indicator)$"
|
||||
"move 100%-470 15, match:title ^(Firefox — 共有インジケーター)$"
|
||||
] ++ smartGapsWindowrules;
|
||||
windowrule = [
|
||||
# From old windowrulev2
|
||||
"float true, match:class ^(thunar)$, match:title ^(.*File Operation Progress.*)$"
|
||||
"float true, match:class ^(firefox)$, match:title ^(Library)$"
|
||||
"float true, match:class ^(thunar)$, match:title ^(File Operation Progress)$"
|
||||
"float true, match:class ^(thunar)$, match:title ^(Confirm to replace files)$"
|
||||
"float true, match:title ^(bwarn)$"
|
||||
"no_initial_focus on, match:class ^(steam)$"
|
||||
"float true, match:class ^(firefox)$, match:title ^(ログイン - Google アカウント — Mozilla Firefox)$"
|
||||
"float true, match:class ^(firefox)$, match:title ^(Firefox — Sharing Indicator)$"
|
||||
"float true, match:class ^(firefox)$, match:title ^(Firefox — 共有インジケーター)$"
|
||||
"float true, match:class ^(firefox)$, match:title ^(.*Sign in.*)$"
|
||||
# From old windowrule
|
||||
"float true, match:class ^(qt5ct)$"
|
||||
"float true, match:class ^(zoom)$"
|
||||
"float true, match:class ^(Steam)$"
|
||||
"idle_inhibit focus, match:class ^(mpv)$"
|
||||
"float true, match:title ^(Picture-in-Picture)$"
|
||||
"float true, match:class ^(nm-connection-editor)$"
|
||||
"float true, match:class ^(waypaper)$"
|
||||
"float true, match:title ^(Sign In)(.*)$"
|
||||
"float true, match:title ^(Firefox — 共有インジケーター)$"
|
||||
"no_focus on, match:title ^(Firefox — 共有インジケーター)$"
|
||||
"float true, match:class ^(firefox)$, match:title ^(Sign in - Google Accounts — Mozilla Firefox)$"
|
||||
"size 0 0, match:title ^(Firefox — 共有インジケーター)$"
|
||||
"opacity 0.8, match:title ^(Neovide)$"
|
||||
"move 100%-470 15, match:title ^(Firefox — Sharing Indicator)$"
|
||||
"move 100%-470 15, match:title ^(Firefox — 共有インジケーター)$"
|
||||
];
|
||||
|
||||
cursor = {
|
||||
no_hardware_cursors = true;
|
||||
@@ -154,24 +189,24 @@ in {
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
follow_mouse = 1;
|
||||
accel_profile = "flat";
|
||||
follow_mouse_threshold = 5;
|
||||
force_no_accel = 1;
|
||||
sensitivity = 0;
|
||||
};
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = "0, 9, 9, 9"; # top, right, bottom, left
|
||||
border_size = 3;
|
||||
"col.active_border" = lib.mkForce "rgba(404042ff)";
|
||||
"col.inactive_border" = lib.mkForce "rgba(83858a00)";
|
||||
layout = "master";
|
||||
resize_on_border = true;
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = "0, 9, 9, 9"; # top, right, bottom, left
|
||||
border_size = 3;
|
||||
"col.active_border" = lib.mkForce "rgba(404042ff)";
|
||||
"col.inactive_border" = lib.mkForce "rgba(83858a00)";
|
||||
layout = "master";
|
||||
resize_on_border = true;
|
||||
|
||||
snap = {
|
||||
enabled = true;
|
||||
window_gap = 5;
|
||||
};
|
||||
};
|
||||
snap = {
|
||||
enabled = true;
|
||||
window_gap = 5;
|
||||
};
|
||||
};
|
||||
misc = {
|
||||
font_family = "EnvyCodeR Nerd Font Mono";
|
||||
disable_autoreload = true;
|
||||
@@ -188,7 +223,6 @@ in {
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
force_split = 2;
|
||||
pseudotile = "yes";
|
||||
preserve_split = "yes";
|
||||
};
|
||||
@@ -203,83 +237,92 @@ in {
|
||||
decoration = {
|
||||
rounding = 4;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 8;
|
||||
passes = 2;
|
||||
};
|
||||
|
||||
shadow = {
|
||||
enabled = true;
|
||||
ignore_window = true;
|
||||
range = 80;
|
||||
render_power = 50;
|
||||
};
|
||||
enabled = true;
|
||||
ignore_window = true;
|
||||
range = 20;
|
||||
render_power = 50;
|
||||
};
|
||||
};
|
||||
|
||||
cursor = {
|
||||
hide_on_key_press = true;
|
||||
};
|
||||
cursor = {
|
||||
hide_on_key_press = true;
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
bezier = [
|
||||
"myBezier, 0.16, 1, 0.3, 1"
|
||||
"myBezier, 0.16, 1, 0.3, 1"
|
||||
];
|
||||
|
||||
animation = [
|
||||
"windows, 1, 7, myBezier, popin 80%"
|
||||
"fade, 1, 7, myBezier"
|
||||
"workspaces, 1, 6, myBezier, slidefade 80%"
|
||||
"fade, 1, 7, myBezier"
|
||||
"workspaces, 1, 6, myBezier, slidefade 80%"
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
bind = [
|
||||
"super, up, exec, pactl set-sink-volume @default_sink@ +10%"
|
||||
"super, down, exec, pactl set-sink-volume @default_sink@ -10%"
|
||||
"super, t, exec, swaync-client -t -sw"
|
||||
"super, a, exec, firefox"
|
||||
"super, q, exec, kitty"
|
||||
"super shift, q, exec, [float;size 40% 30%;move onscreen cursor -50% -50%] kitty"
|
||||
"super, c, killactive,"
|
||||
"super shift, c,exec, hyprctl kill"
|
||||
"super, e, exec, [float;size 40% 50%;move onscreen cursor -50% -50%] nemo"
|
||||
"super, p, exec, [float;size 40% 25%;move onscreen cursor] [ ! -f /tmp/keyringfile ] && kitty toolbelt"
|
||||
"super shift, m, exit,"
|
||||
"super, m, exec, fuzzel"
|
||||
"super, r, exec, neovide"
|
||||
"super, b, layoutmsg, togglesplit, # dwindle"
|
||||
"super, comma, layoutmsg, rollnext" # comma
|
||||
"super, period, layoutmsg, rollprev"
|
||||
bind = [
|
||||
"super, up, exec, pactl set-sink-volume @default_sink@ +10%"
|
||||
"super, down, exec, pactl set-sink-volume @default_sink@ -10%"
|
||||
"super, t, exec, swaync-client -t -sw"
|
||||
"super, a, exec, firefox"
|
||||
"super, q, exec, kitty"
|
||||
"super shift, q, exec, [float;size 40% 30%;move onscreen cursor -50% -50%] kitty"
|
||||
"super, c, killactive,"
|
||||
"super shift, c,exec, hyprctl kill"
|
||||
"super, e, exec, [float;size 40% 50%;move onscreen cursor -50% -50%] nemo"
|
||||
"super, p, exec, [float;size 40% 25%;move onscreen cursor] [ ! -f /tmp/keyringfile ] && kitty toolbelt"
|
||||
"super shift, m, exit,"
|
||||
"super, m, exec, fuzzel"
|
||||
"super, r, exec, neovide"
|
||||
"super, b, layoutmsg, togglesplit, # dwindle"
|
||||
"super, comma, exec, hyprctl dispatch layoutmsg rollnext; hyprctl dispatch layoutmsg focusmaster"
|
||||
"super, period, exec, hyprctl dispatch layoutmsg rollprev; hyprctl dispatch layoutmsg focusmaster"
|
||||
"super, n, layoutmsg, swapwithmaster"
|
||||
"super, f, togglefloating"
|
||||
"super, g, fullscreen"
|
||||
"super, h, movefocus, l"
|
||||
"super, l, movefocus, r"
|
||||
"super, k, movefocus, u"
|
||||
"super, j, movefocus, d"
|
||||
"super, f, togglefloating"
|
||||
"super, g, fullscreen"
|
||||
"super, h, movefocus, l"
|
||||
"super, l, movefocus, r"
|
||||
"super, k, movefocus, u"
|
||||
"super, j, movefocus, d"
|
||||
"super, y, exec, /home/pagedmov/splitman-ipc.sh start"
|
||||
"super, u, exec, /home/pagedmov/splitman-ipc.sh split"
|
||||
"super, i, exec, /home/pagedmov/splitman-ipc.sh stop"
|
||||
"super, o, exec, /home/pagedmov/splitman-ipc.sh pause"
|
||||
"super shift, h, movewindow, l"
|
||||
"super shift, l, movewindow, r"
|
||||
"super shift, k, movewindow, u"
|
||||
"super shift, j, movewindow, d"
|
||||
"super, d, exec, switchmon"
|
||||
"super, 1, exec, hyprctl 'dispatch workspace 1'"
|
||||
"super, 2, exec, hyprctl 'dispatch workspace 2'"
|
||||
"super, 3, exec, hyprctl 'dispatch workspace 3'"
|
||||
"super, 4, exec, hyprctl 'dispatch workspace 4'"
|
||||
"super, 5, exec, hyprctl 'dispatch workspace 5'"
|
||||
"super, 6, exec, hyprctl 'dispatch workspace 6'"
|
||||
"super shift, 1, movetoworkspace, 1"
|
||||
"super shift, 2, movetoworkspace, 2"
|
||||
"super shift, 3, movetoworkspace, 3"
|
||||
"super shift, 4, movetoworkspace, 4"
|
||||
"super shift, 5, movetoworkspace, 5"
|
||||
"super shift, 6, movetoworkspace, 6"
|
||||
"super, s, togglespecialworkspace, magic"
|
||||
"super shift, s, movetoworkspace, special:magic"
|
||||
] ++ screenshot_bind;
|
||||
bindm =
|
||||
[ "super, mouse:272, movewindow" "super, mouse:273, resizewindow" ];
|
||||
"super shift, h, movewindow, l"
|
||||
"super shift, l, movewindow, r"
|
||||
"super shift, k, movewindow, u"
|
||||
"super shift, j, movewindow, d"
|
||||
"super, d, exec, switchmon"
|
||||
"super, 1, exec, hyprctl 'dispatch workspace 1'"
|
||||
"super, 2, exec, hyprctl 'dispatch workspace 2'"
|
||||
"super, 3, exec, hyprctl 'dispatch workspace 3'"
|
||||
"super, 4, exec, hyprctl 'dispatch workspace 4'"
|
||||
"super, 5, exec, hyprctl 'dispatch workspace 5'"
|
||||
"super, 6, exec, hyprctl 'dispatch workspace 6'"
|
||||
"super shift, 1, movetoworkspace, 1"
|
||||
"super shift, 2, movetoworkspace, 2"
|
||||
"super shift, 3, movetoworkspace, 3"
|
||||
"super shift, 4, movetoworkspace, 4"
|
||||
"super shift, 5, movetoworkspace, 5"
|
||||
"super shift, 6, movetoworkspace, 6"
|
||||
"super, s, togglespecialworkspace, magic"
|
||||
"super shift, s, movetoworkspace, special:magic"
|
||||
]
|
||||
++ screenshot_bind;
|
||||
bindm = [
|
||||
"super, mouse:272, movewindow"
|
||||
"super, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user