diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 483393f..9070190 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -25,6 +25,10 @@ type = types.str; description = "Command to use for launching"; }; + toggleBarCommand = lib.mkOption { + type = lib.types.str; + description = "Command to hide and show the status bar."; + }; gtk.theme = { name = mkOption { type = types.str; diff --git a/modules/desktop/i3.nix b/modules/desktop/i3.nix index 6780041..fab3356 100644 --- a/modules/desktop/i3.nix +++ b/modules/desktop/i3.nix @@ -6,13 +6,6 @@ let in { - options = { - toggleBarCmd = lib.mkOption { - type = lib.types.str; - description = "Command to hide and show the status bar."; - }; - }; - config = lib.mkIf config.services.xserver.enable { services.xserver.windowManager = { @@ -121,7 +114,8 @@ in { "XF86AudioPrev" = "exec playerctl previous"; # Launchers - "${modifier}+Return" = "exec alacritty; layout tabbed"; + "${modifier}+Return" = + "exec alacritty; workspace ${ws2}; layout tabbed"; "${modifier}+space" = "exec --no-startup-id ${config.gui.launcherCommand}"; "${modifier}+Shift+c" = "reload"; @@ -132,7 +126,7 @@ in { # Window options "${modifier}+q" = "kill"; - "${modifier}+b" = "exec ${config.toggleBarCmd}"; + "${modifier}+b" = "exec ${config.gui.toggleBarCommand}"; "${modifier}+f" = "fullscreen toggle"; "${modifier}+h" = "focus left"; "${modifier}+j" = "focus down"; @@ -208,11 +202,17 @@ in { "${modifier}+Control+Shift+l" = "resize grow width 10 px or 10 ppt"; }; modes = { }; - startup = [{ - command = "feh --bg-fill ${config.gui.wallpaper}"; - always = true; - notification = false; - }]; + startup = [ + { + command = "feh --bg-fill ${config.gui.wallpaper}"; + always = true; + notification = false; + } + { + command = "i3-msg workspace ${ws1}"; + notification = false; + } + ]; window = { border = 0; hideEdgeBorders = "smart"; diff --git a/modules/desktop/polybar.nix b/modules/desktop/polybar.nix index 87d5c8b..324bef8 100644 --- a/modules/desktop/polybar.nix +++ b/modules/desktop/polybar.nix @@ -2,7 +2,7 @@ config = lib.mkIf config.services.xserver.enable { - toggleBarCmd = "polybar-msg cmd toggle"; + gui.toggleBarCommand = "polybar-msg cmd toggle"; home-manager.users.${config.user} = { diff --git a/modules/desktop/rofi.nix b/modules/desktop/rofi.nix index 3180e71..3df8143 100644 --- a/modules/desktop/rofi.nix +++ b/modules/desktop/rofi.nix @@ -131,11 +131,11 @@ extraConfig = { show-icons = true; kb-cancel = "Escape,Super+space"; + modi = "window,run,ssh,emoji,calc"; }; }; - gui.launcherCommand = "${pkgs.rofi}/bin/rofi -show run"; + gui.launcherCommand = "${pkgs.rofi}/bin/rofi -show run -modi run"; }; } -