diff options
| author | Miran Bastaja <mbastaja@sorre.xyz> | 2025-10-12 13:04:34 +0200 |
|---|---|---|
| committer | Miran Bastaja <mbastaja@sorre.xyz> | 2025-10-12 13:04:51 +0200 |
| commit | be7181943c75ccdf7c90171cf5b3777123058a07 (patch) | |
| tree | f1003ba7079258d47585b36a2b55b6259e548797 /share/home | |
| parent | 5f242147c65bdb6ab650cadce1ca938d68d32e03 (diff) | |
niri: set up named workspaces
Diffstat (limited to 'share/home')
| -rw-r--r-- | share/home/niri.nix | 101 |
1 files changed, 81 insertions, 20 deletions
diff --git a/share/home/niri.nix b/share/home/niri.nix index e63d1d4..583c928 100644 --- a/share/home/niri.nix +++ b/share/home/niri.nix @@ -91,28 +91,89 @@ in screenshot-path = null; # clipboard only - window-rules = [ - # Open the Firefox picture-in-picture player as floating by default. - { - matches = [ { title = "^Picture-in-Picture$"; } ]; - open-floating = true; - } + workspaces = { + "01-dev-1" = { + name = "dev-1"; + open-on-output = "eDP-1"; + }; + "02-dev-2" = { + name = "dev-2"; + open-on-output = "eDP-1"; + }; + "03-web" = { + name = "web"; + open-on-output = "eDP-1"; + }; + "04-chat" = { + name = "chat"; + open-on-output = "eDP-1"; + }; + "05-email" = { + name = "email"; + open-on-output = "eDP-1"; + }; + "06-misc-1" = { + name = "misc-1"; + open-on-output = "eDP-1"; + }; + "07-misc-2" = { + name = "misc-2"; + open-on-output = "eDP-1"; + }; + "08-misc-3" = { + name = "misc-3"; + open-on-output = "eDP-1"; + }; + "09-misc-4" = { + name = "misc-4"; + open-on-output = "eDP-1"; + }; + "10-misc-5" = { + name = "misc-5"; + open-on-output = "eDP-1"; + }; + }; - # Work around WezTerm's initial configure bug by setting an empty default-column-width. - { - matches = [ { app-id = ''^org\.wezfurlong\.wezterm$''; } ]; - default-column-width = null; - } + window-rules = + let + default-workspace = app-id: workspace: { + matches = [ + { + at-startup = true; + inherit app-id; + } + ]; + open-on-workspace = workspace; + }; + in + [ + # Open the Firefox picture-in-picture player as floating by default. + { + matches = [ { title = "^Picture-in-Picture$"; } ]; + open-floating = true; + } - { - matches = [ - { app-id = ''^org\.keepassxc\.KeePassXC$''; } - { app-id = ''^org\.gnome\.World\.Secrets$''; } - { app-id = ''^Bitwarden$''; } - ]; - block-out-from = "screen-capture"; - } - ]; + # Work around WezTerm's initial configure bug by setting an empty default-column-width. + { + matches = [ { app-id = ''^org\.wezfurlong\.wezterm$''; } ]; + default-column-width = null; + } + + { + matches = [ + { app-id = ''^org\.keepassxc\.KeePassXC$''; } + { app-id = ''^org\.gnome\.World\.Secrets$''; } + { app-id = ''^Bitwarden$''; } + ]; + block-out-from = "screen-capture"; + } + + # Default app positions + (default-workspace "^librewolf$" "web") + (default-workspace "^discord$" "chat") + (default-workspace "^thunderbird$" "email") + (default-workspace "^Bitwarden$" "misc-1") + ]; binds = with config.lib.niri.actions; { # Shows a list of important hotkeys |
