diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 6dd76ce..569ee8d 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -1,5 +1,20 @@ -{ ... }: { +{ lib, ... }: { - imports = [ ./xorg.nix ./fonts.nix ./i3.nix ./polybar.nix ./picom.nix ]; + imports = [ + ./xorg.nix + ./fonts.nix + ./i3.nix + ./polybar.nix + ./picom.nix + # ./dmenu.nix + ./rofi.nix + ]; + + options = { + launcherCommand = lib.mkOption { + type = lib.types.str; + description = "Command to use for launching"; + }; + }; } diff --git a/modules/desktop/dmenu.nix b/modules/desktop/dmenu.nix new file mode 100644 index 0000000..1731923 --- /dev/null +++ b/modules/desktop/dmenu.nix @@ -0,0 +1,12 @@ +{ config, pkgs, lib, identity, ... }: + +{ + + config = lib.mkIf config.services.xserver.enable { + + home-manager.users.${identity.user}.home.packages = [ pkgs.dmenu ]; + launcherCommand = "${pkgs.dmenu}/bin/dmenu_run"; + + }; + +} diff --git a/modules/desktop/i3.nix b/modules/desktop/i3.nix index 26559f0..5e504c9 100644 --- a/modules/desktop/i3.nix +++ b/modules/desktop/i3.nix @@ -116,7 +116,8 @@ # Launchers "${modifier}+Return" = "exec alacritty"; - "${modifier}+space" = "exec --no-startup-id dmenu_run"; + "${modifier}+space" = + "exec --no-startup-id ${config.launcherCommand}"; "${modifier}+Shift+c" = "reload"; "${modifier}+Shift+r" = "restart"; "${modifier}+Shift+q" = '' diff --git a/modules/desktop/polybar.nix b/modules/desktop/polybar.nix index 7606454..1affba6 100644 --- a/modules/desktop/polybar.nix +++ b/modules/desktop/polybar.nix @@ -102,7 +102,7 @@ format-volume-foreground = config.theme.colors.primary.foreground; label-volume = "%percentage%%"; label-muted = "ﱝ ---"; - label-muted-foreground = config.theme.colors.normal.white; + label-muted-foreground = config.theme.colors.bright.black; ramp-volume-0 = ""; ramp-volume-1 = "墳"; ramp-volume-2 = ""; @@ -151,7 +151,7 @@ "module/date" = { type = "internal/date"; interval = 1; - date = "%H:%M %p"; + date = "%l:%M %p"; date-alt = "%Y-%m-%d %H:%M:%S"; label = "%date%"; # label-foreground = config.theme.colors.normal.yellow; diff --git a/modules/desktop/rofi.nix b/modules/desktop/rofi.nix new file mode 100644 index 0000000..e49cb60 --- /dev/null +++ b/modules/desktop/rofi.nix @@ -0,0 +1,18 @@ +{ config, pkgs, lib, identity, ... }: + +{ + + config = lib.mkIf config.services.xserver.enable { + + home-manager.users.${identity.user}.programs.rofi = { + enable = true; + cycle = true; + location = "center"; + plugins = [ pkgs.rofi-calc pkgs.rofi-emoji ]; + }; + launcherCommand = "${pkgs.rofi}/bin/rofi -show run"; + + }; + +} +