From bba73daf6c717a3459b68907808084dbd589ba5d Mon Sep 17 00:00:00 2001 From: Madeline Hashcube Date: Wed, 24 Jun 2026 21:28:02 -0500 Subject: [PATCH] i can now rename workspaces + keybind title change --- users/hashcube/programs/display/niri.nix | 33 +++++++++++++++++++++- users/hashcube/programs/wayland/waybar.nix | 2 +- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/users/hashcube/programs/display/niri.nix b/users/hashcube/programs/display/niri.nix index 8b9c6cf..df9e16a 100644 --- a/users/hashcube/programs/display/niri.nix +++ b/users/hashcube/programs/display/niri.nix @@ -19,6 +19,7 @@ keyboard.numlock = true; warp-mouse-to-focus.enable = true; }; + outputs = { "eDP-1" = { position = { @@ -42,6 +43,7 @@ }; }; }; + overview.backdrop-color = "#11111b"; layout = { focus-ring = { @@ -54,6 +56,7 @@ always-center-single-column = true; background-color = "#11111b"; }; + prefer-no-csd = true; binds = with config.lib.niri.actions; @@ -123,7 +126,7 @@ "Mod+slash".action = show-hotkey-overlay; "Mod+Shift+Z" = { - hotkey-overlay.title = "Activate Zoomer (woomer)"; + hotkey-overlay.title = "Activate Woomer (Magnifying Glass)"; action = spawn "woomer"; }; @@ -151,6 +154,34 @@ "Super+P".action = toggle-overview; # For Laptop (I have no clue either) "Mod+W".action = toggle-overview; + "Mod+Shift+W" = let + # Preset Names + names = [ + "Main" + "Comms" + "Steam" + "Game" + "Eye Candy" + ]; + # If the passed in name is equal to one of these, the + # workspace name will be unset, essentially deleting it + reset = [ + "/delete" + " " + ]; + in { + action = nu ''let title = | + echo "${lib.concatStringsSep "\n" names}" | + walker -dNH --height 5; + + $title in ["${lib.concatStringsSep "\", \"" reset}"] | + if $in { + niri msg action unset-workspace-name + } else { + niri msg action set-workspace-name $title + }''; + hotkey-overlay.title = "Set Workspace Name"; + }; "Mod+Tab".action = focus-monitor-next; "Mod+Shift+Tab".action = move-column-to-monitor-next; diff --git a/users/hashcube/programs/wayland/waybar.nix b/users/hashcube/programs/wayland/waybar.nix index 9fdc315..678c2ad 100644 --- a/users/hashcube/programs/wayland/waybar.nix +++ b/users/hashcube/programs/wayland/waybar.nix @@ -58,7 +58,7 @@ notify-send "Your Battery is critically low! Please charge your device" -u criti scroll-step = 1; }; "niri/workspaces" = { - format = "{index}"; + format = "{name}"; }; /** "hyprland/workspaces" = { -- 2.51.2