feat!: deprecate 'dwindle', 'scroller' always, use hyprnome workspace

This commit is contained in:
Youwen Wu 2025-02-17 18:22:15 -08:00
parent 45aa973107
commit 03f20b1049
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
5 changed files with 33 additions and 182 deletions

View file

@ -6,42 +6,22 @@
}:
let
cfg = config.liminalOS.desktop.hyprland;
hyprnome = "${pkgs.hyprnome}/bin/hyprnome --no-empty-before";
in
{
wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable {
bind =
(
if cfg.hyprscroller.enable then
[
"$mod+Shift, $Left, scroller:movewindow, l"
"$mod+Shift, $Right, scroller:movewindow, r"
"$mod+Shift, $Up, scroller:movewindow, u"
"$mod+Shift, $Down, scroller:movewindow, d"
[
"$mod+Shift, $Left, scroller:movewindow, l"
"$mod+Shift, $Right, scroller:movewindow, r"
"$mod+Shift, $Up, scroller:movewindow, u"
"$mod+Shift, $Down, scroller:movewindow, d"
# Move around
"$mod, $Left, scroller:movefocus, l"
"$mod, $Right, scroller:movefocus, r"
"$mod, $Up, scroller:movefocus, u"
"$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 [
# Move around
"$mod, $Left, scroller:movefocus, l"
"$mod, $Right, scroller:movefocus, r"
"$mod, $Up, scroller:movefocus, u"
"$mod, $Down, scroller:movefocus, d"
"$mod, comma, scroller:admitwindow"
"$mod, period, scroller:expelwindow"
"$mod, F, scroller:fitsize, active"
@ -49,51 +29,26 @@ in
"$mod, semicolon, scroller:cyclesize, next"
"$mod, apostrophe, scroller:cyclesize, previous"
"$mod+Shift, U, movetoworkspace, r+1"
"$mod+Shift, I, movetoworkspace, r-1"
"$mod+Shift, U, exec, ${hyprnome} --move"
"$mod+Shift, I, exec, ${hyprnome} --previous --move"
"$mod, U, workspace, r+1"
"$mod, I, workspace, r-1"
# harder to reach number keys
"$mod, A, workspace, 1"
"$mod, D, workspace, 2"
"$mod, U, exec, ${hyprnome}"
"$mod, I, exec, ${hyprnome} --previous"
"$mod, C, scroller:setmode, c"
"$mod, V, scroller:setmode, r"
"$mod, G, scroller:jump"
"$mod+Ctrl, G, scroller:toggleoverview"
])
++ [
# Window actions
"$mod, Q, killactive"
"$mod, W, togglefloating"
"$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
"$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+Shift, P, exec, ${pkgs.grim}/bin/grim - | ${pkgs.swappy}/bin/swappy -f -'' # Screenshot
"$mod, Backspace, exec, pkill -x wlogout || wlogout" # show logout menu
"$mod, Z, exec, loginctl lock-session"
@ -104,53 +59,12 @@ in
",XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl --player=%any,firefox next"
",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+Alt, S, movetoworkspacesilent, special"
"$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
])
++ (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 [
"$mod, B, exec, zen"
])

View file

@ -23,14 +23,6 @@ in
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 {
type = lib.types.bool;
default = false;
@ -85,17 +77,7 @@ in
wayland.windowManager.hyprland = {
enable = true;
plugins = lib.mkIf cfg.hyprscroller.enable [
(pkgs.hyprlandPlugins.hyprscroller.overrideAttrs {
version = "0.47.2";
src = pkgs.fetchFromGitHub {
owner = "dawsers";
repo = "hyprscroller";
rev = "ce7503685297d88e0bb0961343ed3fbed21c559c";
hash = "sha256-3pGIe4H1LUOJw0ULfVwZ7Ph7r/AyEipx7jbWP7zz3MU=";
};
})
];
plugins = [ pkgs.hyprlandPlugins.hyprscroller ];
settings = {
"$mod" = "SUPER";
"$Left" = "H";
@ -154,17 +136,8 @@ in
"windowsMove, 1, 5, wind, slide"
"fade, 1, 10, default"
# "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) [
"border, 1, 1, liner"
"borderangle, 1, 30, liner, loop"
@ -183,7 +156,7 @@ in
# "col.inactive_border" = pkgs.lib.mkForce "rgba(b4befecc) rgba(6c7086cc) 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";
layout = if cfg.hyprscroller.enable then "scroller" else "dwindle";
layout = "scroller";
resize_on_border = "true";
};
@ -215,7 +188,7 @@ in
input = {
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_heights = "onethird onehalf twothirds one";
};

View file

@ -253,52 +253,13 @@ in
show-special = true;
format = "{icon}";
on-click = "activate";
format-icons =
{
"1" = "";
"2" = "";
"3" = "󰯵";
"4" = "󰯻";
"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" = "";
}
);
format-icons = {
active = "";
empty = "";
default = "";
urgent = "";
special = "󰠱";
};
sort-by-number = true;
};

View file

@ -610,5 +610,9 @@
"settingsSyncVersion": 1731210778467
},
"splashColor": "rgb(242, 244, 248)",
"splashBackground": "rgb(22, 22, 22)"
"splashBackground": "rgb(22, 22, 22)",
"spellCheckLanguages": [
"en-US",
"en"
]
}

View file

@ -22,7 +22,6 @@
liminalOS = {
utils.easyeffects.enable = true;
desktop.hyprland.screenlocker.useNvidiaCrashFix = true;
desktop.hyprland.useAdvancedBindings = false;
};
programs.git = {