diff --git a/modules/home/hyprland/scripts.nix b/modules/home/hyprland/scripts.nix index 6aca500..4ebbc4a 100644 --- a/modules/home/hyprland/scripts.nix +++ b/modules/home/hyprland/scripts.nix @@ -19,24 +19,5 @@ done ''; }; - "/home/${username}/.local/bin/setbg" = { - executable = true; - text = '' - #!/usr/bin/env bash - - magick convert "$1" ~/.local/share/bg.png - swww img ~/.local/share/bg.png --transition-type fade - ''; - }; - "/home/${username}/.local/bin/walp" = { - executable = true; - text = '' - #!/usr/bin/env bash - - which swiv &>/dev/null && SIV=swiv || SIV=nsxiv # todo: switch to swiv, but that is not packaged for Nix yet. - $SIV -t ~/Pictures/wallpapers/others/* - ''; - }; }; - } diff --git a/modules/home/scripts/scripts.nix b/modules/home/scripts/scripts.nix index a999f8f..417d193 100644 --- a/modules/home/scripts/scripts.nix +++ b/modules/home/scripts/scripts.nix @@ -1,5 +1,7 @@ { pkgs, ... }: let + setbg = pkgs.writeScriptBin "setbg" (builtins.readFile ./scripts/setbg); + walp = pkgs.writeScriptBin "walp" (builtins.readFile ./scripts/walp); runbg = pkgs.writeShellScriptBin "runbg" (builtins.readFile ./scripts/runbg.sh); notes = pkgs.writeShellScriptBin "notes" (builtins.readFile ./scripts/notes.sh); grabtext = pkgs.writeShellScriptBin "grabtext" (builtins.readFile ./scripts/grabtext.sh); @@ -12,6 +14,8 @@ let in { home.packages = with pkgs; [ + setbg + walp runbg notes grabtext diff --git a/modules/home/scripts/scripts/setbg b/modules/home/scripts/scripts/setbg new file mode 100644 index 0000000..c0e7277 --- /dev/null +++ b/modules/home/scripts/scripts/setbg @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +magick convert "$1" ~/.local/share/bg.png +swww img ~/.local/share/bg.png --transition-type fade diff --git a/modules/home/scripts/scripts/walp b/modules/home/scripts/scripts/walp new file mode 100644 index 0000000..17a1153 --- /dev/null +++ b/modules/home/scripts/scripts/walp @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +which swiv &>/dev/null && SIV=swiv || SIV=nsxiv # todo: switch to swiv, but that is not packaged for Nix yet. +$SIV -t ~/Pictures/wallpapers/others/*