From ba489b173c0a1cfb2b5099aad4c3ec55fab82db2 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Tue, 4 Jul 2023 09:32:16 -0400 Subject: [PATCH] meta: Replace absolute workspaces with relative workspaces Instead of remembering which workspace an application is in, it's easier to simply go to the previous or next workspace until reaching the desired application. This has the advantage of less keybinds used and no longer having to reach across the keyboard when dealing with 6 or more workspaces. Workspace state can be handled by ironbar's launcher instead, which has the additional benefit of guaranteeing that you see all open applications. hyprland-relative-workspace is used here for a GNOME-like workspace experience. Hyprland's built-in m+1/m-1 would cycle the workspaces instead of opening an empty one, and the recently merged r+1/r-1 does not skip empty workspaces in-between other workspaces. --- home/hyprland.nix | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/home/hyprland.nix b/home/hyprland.nix index 908c493f..be89f578 100644 --- a/home/hyprland.nix +++ b/home/hyprland.nix @@ -150,26 +150,10 @@ in bind = $SUPER_SHIFT, L, splitratio, +0.05 bind = $SUPER, grave, workspace, previous - bind = $SUPER, 1, workspace, 1 - bind = $SUPER, 2, workspace, 2 - bind = $SUPER, 3, workspace, 3 - bind = $SUPER, 4, workspace, 4 - bind = $SUPER, 5, workspace, 5 - bind = $SUPER, 6, workspace, 6 - bind = $SUPER, 7, workspace, 7 - bind = $SUPER, 8, workspace, 8 - bind = $SUPER, 9, workspace, 9 - bind = $SUPER, 0, workspace, 10 - bind = $SUPER_SHIFT, 1, movetoworkspace, 1 - bind = $SUPER_SHIFT, 2, movetoworkspace, 2 - bind = $SUPER_SHIFT, 3, movetoworkspace, 3 - bind = $SUPER_SHIFT, 4, movetoworkspace, 4 - bind = $SUPER_SHIFT, 5, movetoworkspace, 5 - bind = $SUPER_SHIFT, 6, movetoworkspace, 6 - bind = $SUPER_SHIFT, 7, movetoworkspace, 7 - bind = $SUPER_SHIFT, 8, movetoworkspace, 8 - bind = $SUPER_SHIFT, 9, movetoworkspace, 9 - bind = $SUPER_SHIFT, 0, movetoworkspace, 10 + bind = $SUPER, 1, exec, hyprland-relative-workspace b + bind = $SUPER, 2, exec, hyprland-relative-workspace f + bind = $SUPER_SHIFT, 1, exec, hyprland-relative-workspace b --with-window + bind = $SUPER_SHIFT, 2, exec, hyprland-relative-workspace f --with-window layerrule = blur,ironbar layerrule = blur,rofi