diff --git a/modules/home-manager/sway.nix b/modules/home-manager/sway.nix index efcbdbd..31ef4b9 100644 --- a/modules/home-manager/sway.nix +++ b/modules/home-manager/sway.nix @@ -41,6 +41,16 @@ modifier = config.wayland.windowManager.sway.config.modifier; in lib.mkOptionDefault { + # special workspaces + "${modifier}+1" = "workspace main"; + "${modifier}+2" = "workspace term"; + "${modifier}+3" = "workspace msg"; + "${modifier}+4" = "workspace music"; + "${modifier}+Shift+1" = "move container to workspace main"; + "${modifier}+Shift+2" = "move container to workspace term"; + "${modifier}+Shift+3" = "move container to workspace msg"; + "${modifier}+Shift+4" = "move container to workspace music"; + # brightness "XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 5"; "XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 5"; @@ -55,8 +65,8 @@ # use foot as default terminal terminal = "foot"; assigns = { - "1" = [{app_id = "firefox";}]; - "2" = [{app_id = "foot";}]; + "main" = [{app_id = "firefox";}]; + "term" = [{app_id = "foot-startup";}]; }; bars = []; menu = "${pkgs.tofi}/bin/tofi-drun | ${pkgs.findutils}/bin/xargs swaymsg exec --"; @@ -79,7 +89,31 @@ {command = "configure-gtk";} {command = "${pkgs.keepassxc}/bin/keepassxc";} {command = "${pkgs.waybar}/bin/waybar";} - {command = "${pkgs.foot}/bin/foot";} + {command = "${pkgs.foot}/bin/foot -a foot-startup";} + ]; + defaultWorkspace = "main"; + workspaceAutoBackAndForth = true; + workspaceOutputAssign = [ + { + workspace = "main"; + output = ["DP-4" "HDMI-A-1" "eDP-1"]; + } + { + workspace = "term"; + output = ["DP-5" "eDP-1"]; + } + { + workspace = "msg"; + output = ["eDP-1"]; + } + { + workspace = "music"; + output = ["eDP-1"]; + } + { + workspace = "number 5"; + output = ["DP-4" "HDMI-A-1" "eDP-1"]; + } ]; }; };