mirror of
https://github.com/youwen5/nixos.git
synced 2025-02-22 03:31:11 -08:00
feat!: deprecate 'dwindle', 'scroller' always, use hyprnome workspace
This commit is contained in:
parent
45aa973107
commit
03f20b1049
5 changed files with 33 additions and 182 deletions
|
@ -6,42 +6,22 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.liminalOS.desktop.hyprland;
|
cfg = config.liminalOS.desktop.hyprland;
|
||||||
|
hyprnome = "${pkgs.hyprnome}/bin/hyprnome --no-empty-before";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable {
|
wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable {
|
||||||
bind =
|
bind =
|
||||||
(
|
[
|
||||||
if cfg.hyprscroller.enable then
|
"$mod+Shift, $Left, scroller:movewindow, l"
|
||||||
[
|
"$mod+Shift, $Right, scroller:movewindow, r"
|
||||||
"$mod+Shift, $Left, scroller:movewindow, l"
|
"$mod+Shift, $Up, scroller:movewindow, u"
|
||||||
"$mod+Shift, $Right, scroller:movewindow, r"
|
"$mod+Shift, $Down, scroller:movewindow, d"
|
||||||
"$mod+Shift, $Up, scroller:movewindow, u"
|
|
||||||
"$mod+Shift, $Down, scroller:movewindow, d"
|
|
||||||
|
|
||||||
# Move around
|
# Move around
|
||||||
"$mod, $Left, scroller:movefocus, l"
|
"$mod, $Left, scroller:movefocus, l"
|
||||||
"$mod, $Right, scroller:movefocus, r"
|
"$mod, $Right, scroller:movefocus, r"
|
||||||
"$mod, $Up, scroller:movefocus, u"
|
"$mod, $Up, scroller:movefocus, u"
|
||||||
"$mod, $Down, scroller:movefocus, d"
|
"$mod, $Down, scroller:movefocus, d"
|
||||||
]
|
|
||||||
else
|
|
||||||
# Move windows around
|
|
||||||
[
|
|
||||||
"$mod+Shift, $Left, movewindow, l"
|
|
||||||
"$mod+Shift, $Right, movewindow, r"
|
|
||||||
"$mod+Shift, $Up, movewindow, u"
|
|
||||||
"$mod+Shift, $Down, movewindow, d"
|
|
||||||
|
|
||||||
# Move around
|
|
||||||
"$mod, $Left, movefocus, l"
|
|
||||||
"$mod, $Right, movefocus, r"
|
|
||||||
"$mod, $Up, movefocus, u"
|
|
||||||
"$mod, $Down, movefocus, d"
|
|
||||||
|
|
||||||
"$mod, V, togglesplit"
|
|
||||||
]
|
|
||||||
)
|
|
||||||
++ (lib.optionals cfg.hyprscroller.enable [
|
|
||||||
"$mod, comma, scroller:admitwindow"
|
"$mod, comma, scroller:admitwindow"
|
||||||
"$mod, period, scroller:expelwindow"
|
"$mod, period, scroller:expelwindow"
|
||||||
"$mod, F, scroller:fitsize, active"
|
"$mod, F, scroller:fitsize, active"
|
||||||
|
@ -49,51 +29,26 @@ in
|
||||||
"$mod, semicolon, scroller:cyclesize, next"
|
"$mod, semicolon, scroller:cyclesize, next"
|
||||||
"$mod, apostrophe, scroller:cyclesize, previous"
|
"$mod, apostrophe, scroller:cyclesize, previous"
|
||||||
|
|
||||||
"$mod+Shift, U, movetoworkspace, r+1"
|
"$mod+Shift, U, exec, ${hyprnome} --move"
|
||||||
"$mod+Shift, I, movetoworkspace, r-1"
|
"$mod+Shift, I, exec, ${hyprnome} --previous --move"
|
||||||
|
|
||||||
"$mod, U, workspace, r+1"
|
"$mod, U, exec, ${hyprnome}"
|
||||||
"$mod, I, workspace, r-1"
|
"$mod, I, exec, ${hyprnome} --previous"
|
||||||
|
|
||||||
# harder to reach number keys
|
|
||||||
"$mod, A, workspace, 1"
|
|
||||||
"$mod, D, workspace, 2"
|
|
||||||
|
|
||||||
"$mod, C, scroller:setmode, c"
|
"$mod, C, scroller:setmode, c"
|
||||||
"$mod, V, scroller:setmode, r"
|
"$mod, V, scroller:setmode, r"
|
||||||
|
|
||||||
"$mod, G, scroller:jump"
|
"$mod, G, scroller:jump"
|
||||||
"$mod+Ctrl, G, scroller:toggleoverview"
|
"$mod+Ctrl, G, scroller:toggleoverview"
|
||||||
])
|
|
||||||
++ [
|
|
||||||
# Window actions
|
# Window actions
|
||||||
"$mod, Q, killactive"
|
"$mod, Q, killactive"
|
||||||
"$mod, W, togglefloating"
|
"$mod, W, togglefloating"
|
||||||
"$mod, Return, fullscreen"
|
"$mod, Return, fullscreen"
|
||||||
|
|
||||||
"$mod, 1, workspace, 1"
|
|
||||||
"$mod, 2, workspace, 2"
|
|
||||||
"$mod, 3, workspace, 3"
|
|
||||||
"$mod, 4, workspace, 4"
|
|
||||||
"$mod, 5, workspace, 5"
|
|
||||||
"$mod, 6, workspace, 6"
|
|
||||||
"$mod, 7, workspace, 7"
|
|
||||||
"$mod, 8, workspace, 8"
|
|
||||||
"$mod, 9, workspace, 9"
|
|
||||||
"$mod, 0, workspace, 10"
|
|
||||||
|
|
||||||
"$mod+Ctrl, bracketright, movetoworkspace, r+1"
|
|
||||||
"$mod+Ctrl, bracketleft, movetoworkspace, r-1"
|
|
||||||
|
|
||||||
"$mod, bracketright, workspace, r+1"
|
|
||||||
"$mod, bracketleft, workspace, r-1"
|
|
||||||
|
|
||||||
# Utilities
|
# Utilities
|
||||||
"$mod, Space, exec, pkill -x rofi || rofi -show drun" # Run rofi application launcher
|
"$mod, Space, exec, pkill -x rofi || rofi -show drun" # Run rofi application launcher
|
||||||
"$mod, X, exec, pkill -x rofi || rofi -show window" # Run rofi window switcher
|
"$mod, X, exec, pkill -x rofi || rofi -show window" # Run rofi window switcher
|
||||||
|
|
||||||
''$mod+Shift, P, exec, ${pkgs.grim}/bin/grim - | ${pkgs.swappy}/bin/swappy -f -'' # Screenshot
|
|
||||||
|
|
||||||
"$mod, Backspace, exec, pkill -x wlogout || wlogout" # show logout menu
|
"$mod, Backspace, exec, pkill -x wlogout || wlogout" # show logout menu
|
||||||
|
|
||||||
"$mod, Z, exec, loginctl lock-session"
|
"$mod, Z, exec, loginctl lock-session"
|
||||||
|
@ -104,53 +59,12 @@ in
|
||||||
",XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl --player=%any,firefox next"
|
",XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl --player=%any,firefox next"
|
||||||
",XF86AudioRewind, exec, ${pkgs.playerctl}/bin/playerctl --player=%any,firefox previous"
|
",XF86AudioRewind, exec, ${pkgs.playerctl}/bin/playerctl --player=%any,firefox previous"
|
||||||
|
|
||||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
|
||||||
"$mod+Shift, 1, movetoworkspace, 1"
|
|
||||||
"$mod+Shift, 2, movetoworkspace, 2"
|
|
||||||
"$mod+Shift, 3, movetoworkspace, 3"
|
|
||||||
"$mod+Shift, 4, movetoworkspace, 4"
|
|
||||||
"$mod+Shift, 5, movetoworkspace, 5"
|
|
||||||
"$mod+Shift, 6, movetoworkspace, 6"
|
|
||||||
"$mod+Shift, 7, movetoworkspace, 7"
|
|
||||||
"$mod+Shift, 8, movetoworkspace, 8"
|
|
||||||
"$mod+Shift, 9, movetoworkspace, 9"
|
|
||||||
"$mod+Shift, 0, movetoworkspace, 10"
|
|
||||||
]
|
|
||||||
++ (lib.optionals (!cfg.useAdvancedBindings) [
|
|
||||||
"$mod, S, togglespecialworkspace"
|
"$mod, S, togglespecialworkspace"
|
||||||
"$mod+Alt, S, movetoworkspacesilent, special"
|
"$mod+Alt, S, movetoworkspacesilent, special"
|
||||||
"$mod, Tab, workspace, previous"
|
"$mod, Tab, workspace, previous"
|
||||||
|
''$mod+Shift, P, exec, ${pkgs.grim}/bin/grim - | ${pkgs.swappy}/bin/swappy -f -'' # Screenshot full screen
|
||||||
''$mod, P, exec, ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.swappy}/bin/swappy -f -'' # Screenshot
|
''$mod, P, exec, ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.swappy}/bin/swappy -f -'' # Screenshot
|
||||||
])
|
]
|
||||||
++ (lib.optionals cfg.useAdvancedBindings [
|
|
||||||
# Special workspace
|
|
||||||
"$mod, C, togglespecialworkspace"
|
|
||||||
"$mod+Alt, C, movetoworkspacesilent, special"
|
|
||||||
|
|
||||||
''$mod, semicolon, exec, ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.swappy}/bin/swappy -f -'' # Screenshot
|
|
||||||
|
|
||||||
"$mod, a, workspace, 1"
|
|
||||||
"$mod, s, workspace, 2"
|
|
||||||
"$mod, d, workspace, 3"
|
|
||||||
"$mod, f, workspace, 4"
|
|
||||||
"$mod, g, workspace, 5"
|
|
||||||
"$mod, y, workspace, 6"
|
|
||||||
"$mod, u, workspace, 7"
|
|
||||||
"$mod, i, workspace, 8"
|
|
||||||
"$mod, o, workspace, 9"
|
|
||||||
"$mod, p, workspace, 10"
|
|
||||||
|
|
||||||
"$mod+Shift, a, movetoworkspace, 1"
|
|
||||||
"$mod+Shift, s, movetoworkspace, 2"
|
|
||||||
"$mod+Shift, d, movetoworkspace, 3"
|
|
||||||
"$mod+Shift, f, movetoworkspace, 4"
|
|
||||||
"$mod+Shift, g, movetoworkspace, 5"
|
|
||||||
"$mod+Shift, y, movetoworkspace, 6"
|
|
||||||
"$mod+Shift, u, movetoworkspace, 7"
|
|
||||||
"$mod+Shift, i, movetoworkspace, 8"
|
|
||||||
"$mod+Shift, o, movetoworkspace, 9"
|
|
||||||
"$mod+Shift, p, movetoworkspace, 10"
|
|
||||||
])
|
|
||||||
++ (lib.optionals config.liminalOS.programs.zen.enable [
|
++ (lib.optionals config.liminalOS.programs.zen.enable [
|
||||||
"$mod, B, exec, zen"
|
"$mod, B, exec, zen"
|
||||||
])
|
])
|
||||||
|
|
|
@ -23,14 +23,6 @@ in
|
||||||
Whether to enable and rice Hyprland as well as some basic desktop utilities.
|
Whether to enable and rice Hyprland as well as some basic desktop utilities.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
hyprscroller.enable = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = cfg.enable;
|
|
||||||
description = ''
|
|
||||||
Whether to enable the hyprscroller scrolling layout.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
useAdvancedBindings = lib.mkEnableOption "advanced keybinds";
|
|
||||||
gtkUseOpenGL = lib.mkOption {
|
gtkUseOpenGL = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
|
@ -85,17 +77,7 @@ in
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = lib.mkIf cfg.hyprscroller.enable [
|
plugins = [ pkgs.hyprlandPlugins.hyprscroller ];
|
||||||
(pkgs.hyprlandPlugins.hyprscroller.overrideAttrs {
|
|
||||||
version = "0.47.2";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "dawsers";
|
|
||||||
repo = "hyprscroller";
|
|
||||||
rev = "ce7503685297d88e0bb0961343ed3fbed21c559c";
|
|
||||||
hash = "sha256-3pGIe4H1LUOJw0ULfVwZ7Ph7r/AyEipx7jbWP7zz3MU=";
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
settings = {
|
settings = {
|
||||||
"$mod" = "SUPER";
|
"$mod" = "SUPER";
|
||||||
"$Left" = "H";
|
"$Left" = "H";
|
||||||
|
@ -154,17 +136,8 @@ in
|
||||||
"windowsMove, 1, 5, wind, slide"
|
"windowsMove, 1, 5, wind, slide"
|
||||||
"fade, 1, 10, default"
|
"fade, 1, 10, default"
|
||||||
# "layers, 1, 8, default, slide"
|
# "layers, 1, 8, default, slide"
|
||||||
|
"workspaces, 1, 5, wind, slidevert"
|
||||||
]
|
]
|
||||||
++ (
|
|
||||||
if cfg.hyprscroller.enable then
|
|
||||||
[
|
|
||||||
"workspaces, 1, 5, wind, slidevert"
|
|
||||||
]
|
|
||||||
else
|
|
||||||
[
|
|
||||||
"workspaces, 1, 5, wind"
|
|
||||||
]
|
|
||||||
)
|
|
||||||
++ (lib.optionals (!osConfig.liminalOS.powersave) [
|
++ (lib.optionals (!osConfig.liminalOS.powersave) [
|
||||||
"border, 1, 1, liner"
|
"border, 1, 1, liner"
|
||||||
"borderangle, 1, 30, liner, loop"
|
"borderangle, 1, 30, liner, loop"
|
||||||
|
@ -183,7 +156,7 @@ in
|
||||||
# "col.inactive_border" = pkgs.lib.mkForce "rgba(b4befecc) rgba(6c7086cc) 45deg";
|
# "col.inactive_border" = pkgs.lib.mkForce "rgba(b4befecc) rgba(6c7086cc) 45deg";
|
||||||
"col.active_border" = "rgba(${colors.base0A}ff) rgba(${colors.base09}ff) 45deg";
|
"col.active_border" = "rgba(${colors.base0A}ff) rgba(${colors.base09}ff) 45deg";
|
||||||
"col.inactive_border" = "rgba(${colors.base01}cc) rgba(${colors.base02}cc) 45deg";
|
"col.inactive_border" = "rgba(${colors.base01}cc) rgba(${colors.base02}cc) 45deg";
|
||||||
layout = if cfg.hyprscroller.enable then "scroller" else "dwindle";
|
layout = "scroller";
|
||||||
resize_on_border = "true";
|
resize_on_border = "true";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -215,7 +188,7 @@ in
|
||||||
input = {
|
input = {
|
||||||
sensitivity = if config.liminalOS.formFactor == "laptop" then "0.0" else "-0.65";
|
sensitivity = if config.liminalOS.formFactor == "laptop" then "0.0" else "-0.65";
|
||||||
};
|
};
|
||||||
plugin.scroller = lib.mkIf cfg.hyprscroller.enable {
|
plugin.scroller = {
|
||||||
column_widths = "onethird onehalf twothirds one";
|
column_widths = "onethird onehalf twothirds one";
|
||||||
column_heights = "onethird onehalf twothirds one";
|
column_heights = "onethird onehalf twothirds one";
|
||||||
};
|
};
|
||||||
|
|
|
@ -253,52 +253,13 @@ in
|
||||||
show-special = true;
|
show-special = true;
|
||||||
format = "{icon}";
|
format = "{icon}";
|
||||||
on-click = "activate";
|
on-click = "activate";
|
||||||
format-icons =
|
format-icons = {
|
||||||
{
|
active = "";
|
||||||
"1" = "";
|
empty = "";
|
||||||
"2" = "";
|
default = "";
|
||||||
"3" = "";
|
urgent = "";
|
||||||
"4" = "";
|
special = "";
|
||||||
"5" = "";
|
};
|
||||||
"6" = "";
|
|
||||||
"7" = "";
|
|
||||||
"8" = "";
|
|
||||||
"9" = "";
|
|
||||||
"10" = "";
|
|
||||||
active = "";
|
|
||||||
empty = "";
|
|
||||||
default = "";
|
|
||||||
urgent = "";
|
|
||||||
special = "";
|
|
||||||
}
|
|
||||||
// (
|
|
||||||
if (config.liminalOS.desktop.hyprland.useAdvancedBindings) then
|
|
||||||
{
|
|
||||||
"1" = "";
|
|
||||||
"2" = "";
|
|
||||||
"3" = "";
|
|
||||||
"4" = "";
|
|
||||||
"5" = "";
|
|
||||||
"6" = "";
|
|
||||||
"7" = "";
|
|
||||||
"8" = "";
|
|
||||||
"9" = "";
|
|
||||||
"10" = "";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
"1" = "";
|
|
||||||
"2" = "";
|
|
||||||
"3" = "";
|
|
||||||
"4" = "";
|
|
||||||
"5" = "";
|
|
||||||
"6" = "";
|
|
||||||
"7" = "";
|
|
||||||
"8" = "";
|
|
||||||
"9" = "";
|
|
||||||
"10" = "";
|
|
||||||
}
|
|
||||||
);
|
|
||||||
sort-by-number = true;
|
sort-by-number = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -610,5 +610,9 @@
|
||||||
"settingsSyncVersion": 1731210778467
|
"settingsSyncVersion": 1731210778467
|
||||||
},
|
},
|
||||||
"splashColor": "rgb(242, 244, 248)",
|
"splashColor": "rgb(242, 244, 248)",
|
||||||
"splashBackground": "rgb(22, 22, 22)"
|
"splashBackground": "rgb(22, 22, 22)",
|
||||||
|
"spellCheckLanguages": [
|
||||||
|
"en-US",
|
||||||
|
"en"
|
||||||
|
]
|
||||||
}
|
}
|
|
@ -22,7 +22,6 @@
|
||||||
liminalOS = {
|
liminalOS = {
|
||||||
utils.easyeffects.enable = true;
|
utils.easyeffects.enable = true;
|
||||||
desktop.hyprland.screenlocker.useNvidiaCrashFix = true;
|
desktop.hyprland.screenlocker.useNvidiaCrashFix = true;
|
||||||
desktop.hyprland.useAdvancedBindings = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
|
|
Loading…
Reference in a new issue