diff --git a/hosts/desktop.nix b/hosts/desktop.nix index 4a6926d..581bedc 100644 --- a/hosts/desktop.nix +++ b/hosts/desktop.nix @@ -15,7 +15,7 @@ in enable = true; theme = theme.gtkTheme pkgs; }; - background = theme.wallpaper; + background = ../modules/wallpapers/${theme.wallpaper}; }; defaultSession = "none+i3"; }; diff --git a/hosts/home.nix b/hosts/home.nix index a01ac8d..02eb28f 100644 --- a/hosts/home.nix +++ b/hosts/home.nix @@ -19,7 +19,7 @@ in ../modules/terminal ]; - home.file."./.background-image".source = theme.wallpaper; + home.file."./.background-image".source = ../modules/wallpapers/${theme.wallpaper}; programs.home-manager.enable = true; diff --git a/modules/i3/default.nix b/modules/i3/default.nix index 868f6d0..f1ca4b7 100644 --- a/modules/i3/default.nix +++ b/modules/i3/default.nix @@ -7,7 +7,7 @@ in with theme.colors; { # Dependencies home.packages = with pkgs; [ playerctl # pactl comes with PulseAudio - wmctrl # For rofi power menu + xclip # Copying screenshots to clipboard ]; # Screenshots @@ -69,10 +69,7 @@ in with theme.colors; { "${mod}+Return" = "exec kitty"; "${mod}+Shift+e" = "exec i3-msg exit"; # bypass default session exit confirmation menu "${mod}+space" = "exec i3-msg open"; # Open blank space - "Mod1+Q" = let rofi-power = pkgs.substituteAll { - src = ./power.sh; - isExecutable = true; - }; in "exec ${rofi-power}"; + "Mod1+Q" = "exec /etc/profiles/per-user/elnu/bin/rofi-power"; # Audio controls "XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10%"; diff --git a/modules/rofi/default.nix b/modules/rofi/default.nix index 7a52c43..527740e 100644 --- a/modules/rofi/default.nix +++ b/modules/rofi/default.nix @@ -4,6 +4,10 @@ let _theme = import ../theme; theme = _theme.theme; # Theme name in { + home.packages = with pkgs; [ + (pkgs.callPackage ./power.nix { }) + wmctrl # TODO: add as dependency of rofi-power + ]; programs.rofi = { enable = true; inherit theme; diff --git a/modules/rofi/power.nix b/modules/rofi/power.nix new file mode 100644 index 0000000..2f4ff50 --- /dev/null +++ b/modules/rofi/power.nix @@ -0,0 +1,9 @@ +{ pkgs, substituteAll }: + +substituteAll { + name = "rofi-power"; + src = ./power.sh; + + dir = "bin"; + isExecutable = true; +} diff --git a/modules/i3/power.sh b/modules/rofi/power.sh similarity index 100% rename from modules/i3/power.sh rename to modules/rofi/power.sh diff --git a/modules/theme/default.nix b/modules/theme/default.nix index dbb821f..c79489e 100644 --- a/modules/theme/default.nix +++ b/modules/theme/default.nix @@ -9,4 +9,3 @@ in css = lib: lib.strings.concatStringsSep "\n" (lib.attrValues (lib.mapAttrs (k: v: " --${k}: ${v};") theme.colors)); } // theme // { colors = theme.colors // colors; } -// { wallpaper = ../wallpapers/${theme.wallpaper}; }