From f155f0458981a8761f32279d3a8799933ff4f68b Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sun, 11 Aug 2024 14:50:10 -0400 Subject: [PATCH] aly/sway: bring to parity with hyprland workspaces --- homes/aly/windowManagers/default.nix | 35 +++++++++++++++++++--------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/homes/aly/windowManagers/default.nix b/homes/aly/windowManagers/default.nix index e4f4b5d6..9f8533bf 100644 --- a/homes/aly/windowManagers/default.nix +++ b/homes/aly/windowManagers/default.nix @@ -11,22 +11,36 @@ wayland.windowManager = { sway.config = { assigns = { - "workspace 1: web" = [{app_id = "firefox";} {app_id = "brave-browser";}]; - "workspace 2: code" = [{app_id = "codium-url-handler";} {app_id = "dev.zed.Zed";}]; - "workspace 3: note" = [{app_id = "obsidian";}]; - "workspace 4: chat" = [{app_id = "org.gnome.Fractal";} {app_id = "WebCord";}]; - "workspace 5: work" = [{app_id = "google-chrome";} {app_id = "chromium-browser";} {app_id = "firework";}]; + "workspace 1:web" = [{app_id = "firefox";} {app_id = "brave-browser";}]; + "workspace 2:note" = [{app_id = "obsidian";}]; + "workspace 3:code" = [{app_id = "codium-url-handler";} {app_id = "dev.zed.Zed";}]; + "workspace 4:mail" = [{app_id = "thunderbird";}]; + "workspace 5:work" = [{app_id = "firework";}]; }; floating.criteria = [{app_id = "Bitwarden";} {app_id = "org.keepassxc.KeePassXC";}]; + gaps = { + smartBorders = "on"; + smartGaps = true; + }; + input."type:keyboard".xkb_options = "caps:ctrl_modifier"; keybindings = { - "${config.wayland.windowManager.sway.config.modifier}+P" = "exec ${lib.getExe pkgs.rofi-rbw-wayland}"; "${config.wayland.windowManager.sway.config.modifier}+N" = "exec ${lib.getExe' pkgs.obsidian "obsidian"}"; + "${config.wayland.windowManager.sway.config.modifier}+P" = "exec ${lib.getExe pkgs.rofi-rbw-wayland}"; }; + startup = [ + {command = "sleep 2 && ${lib.getExe' config.wayland.windowManager.sway.package "swaymsg"} workspace 1:web";} + {command = lib.getExe config.ar.home.defaultApps.editor;} + {command = lib.getExe config.ar.home.defaultApps.webBrowser;} + {command = lib.getExe pkgs.fractal;} + {command = lib.getExe pkgs.thunderbird;} + {command = lib.getExe' pkgs.obsidian "obsidian";} + ]; + output = { "Guangxi Century Innovation Display Electronics Co., Ltd 27C1U-D 0000000000001" = { scale = "1.5"; @@ -48,6 +62,10 @@ command = "resize set 80ppt 80ppt; move position center; sticky toggle;"; criteria = {app_id = "org.keepassxc.KeePassXC";}; } + { + command = "move to scratchpad"; + criteria = {app_id = "org.gnome.Fractal";}; + } ]; }; @@ -76,11 +94,6 @@ "workspace 5,class:(firework)" "workspace special:magic,class:(WebCord)" "workspace special:magic,class:(org.gnome.Fractal)" - # "workspace 1,class:(firefox)" - # "workspace 2,class:(obsidian)" - # "workspace 3,class:(codium-url-handler)" - # "workspace 3,class:(dev.zed.Zed)" - # "workspace 4,class:(thunderbird)" ]; workspace = [