From 4df295e20d8e0f90e55f3373d40de2c8e621f77d Mon Sep 17 00:00:00 2001 From: Chris Toph Date: Sat, 5 Apr 2025 14:41:38 -0400 Subject: [PATCH] Add workspace keybindings in Hyprland --- home/toph/common/optional/hyprland/binds.nix | 4 ++++ home/toph/common/optional/hyprland/default.nix | 10 +++++----- home/toph/common/optional/hyprland/rules.nix | 13 +++++++------ 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/home/toph/common/optional/hyprland/binds.nix b/home/toph/common/optional/hyprland/binds.nix index 4bc7d11..b94cf3e 100644 --- a/home/toph/common/optional/hyprland/binds.nix +++ b/home/toph/common/optional/hyprland/binds.nix @@ -98,6 +98,10 @@ let "ALT, Tab, cyclenext," "ALT, Tab, bringactivetotop," "SUPER_ALT, G, submap, steam" + "SUPER, 1, workspace, 1" + "SUPER, 2, workspace, 2" + "SUPER, 3, workspace, 3" + "SUPER, 4, workspace, 4" ## Scroller ## "SUPER, P, scroller:pin" diff --git a/home/toph/common/optional/hyprland/default.nix b/home/toph/common/optional/hyprland/default.nix index c95875f..9f7504d 100644 --- a/home/toph/common/optional/hyprland/default.nix +++ b/home/toph/common/optional/hyprland/default.nix @@ -62,7 +62,7 @@ mkdir "$out"; ${pkgs.jq}/bin/jq -r ' [ to_entries[] | (.key as $i | .value.name as $name | - [ range(0;1) | ($i * 1 + .) as $wsnum | + [ range(1;2) | ($i * 1 + .) as $wsnum | if . == 0 then "\($wsnum), monitor:\($name), default:true, persistent:true" else "\($wsnum), monitor:\($name)" end ] @@ -126,8 +126,8 @@ border_size = 2; gaps_in = 6; gaps_out = 6; - "col.inactive_border" = "rgb(191b1c)"; - "col.active_border" = "rgb(1cbdd9) rgb(f6ef9d) 30deg"; + # "col.inactive_border" = "rgb(191b1c)"; + # "col.active_border" = "rgb(1cbdd9) rgb(f6ef9d) 30deg"; allow_tearing = true; # used to reduce latency and/or jitter in games snap = { enabled = true; @@ -158,8 +158,8 @@ range = 30; render_power = 2; scale = 1.5; - color = "rgb(191b1c)"; - color_inactive = "rgb(191b1c)"; + # color = "rgb(191b1c)"; + # color_inactive = "rgb(191b1c)"; }; }; diff --git a/home/toph/common/optional/hyprland/rules.nix b/home/toph/common/optional/hyprland/rules.nix index 7425169..522eef2 100644 --- a/home/toph/common/optional/hyprland/rules.nix +++ b/home/toph/common/optional/hyprland/rules.nix @@ -47,8 +47,9 @@ in # Zen "suppressevent maximize, class:^(zen)$" - "float, title:^(Picture-in-Picture)$" - "pin, title:^(Picture-in-Picture)$" + "float, initialTitle:^(Picture-in-Picture)$" + "nodim, initialTitle:^(Picture-in-Picture)$" + "keepaspectratio, initialTitle:^(Picture-in-Picture)$" "float, class:^(zen)$, title:^(File Upload)$" "workspace special silent, title:^(Zen — Sharing Indicator)$" "workspace special silent, title:^(.*is sharing (your screen|a window)\.)$" @@ -58,7 +59,7 @@ in "plugin:scroller:windowheight onethird, class:^(foot)$" # Vesktop - "workspace 1, class:^(vesktop)$" + "workspace 2, class:^(vesktop)$" "plugin:scroller:group vesktop, class:^(vesktop)$" "opaque, initialTitle:^(Discord Popout)$" "plugin:scroller:modemodifier row before focus, initialTitle:^(Discord Popout)$" @@ -96,7 +97,7 @@ in #"center, workspace:^(special:special)$" ## Steam rules ## - "stayfocused, initialClass:^([Gg]amescope)$" + "opaque, initialClass:^([Gg]amescope)$" "fullscreen, initialClass:^([Gg]amescope)$" "minsize 1 1, initialClass:^([Gg]amescope)$" "immediate, initialClass:^([Gg]amescope)$" @@ -115,8 +116,8 @@ in # "monitor:DP-1, ${flameshot}" ## Workspace Assignments ## - "workspace 1, initialClass:^(spotify)$" - "workspace 1, initialClass:^(org.telegram.desktop)$" + "workspace 2, initialClass:^(spotify)$" + "workspace 2, initialClass:^(org.telegram.desktop)$" # "workspace name:4, initialClass:^(virt-manager)$" # "workspace 8, class:^(obsidian)$"