move pywal to shell binary

This commit is contained in:
Benjamin Palko 2024-07-24 23:52:58 -04:00
parent 880e2120df
commit 7078a1a96a
3 changed files with 13 additions and 12 deletions

View file

@ -30,7 +30,6 @@
clean = "nix-store --gc";
dotfiles = "cd ~/dotfiles/";
nv = "nvim";
pywal = "bash ~/dotfiles/.scripts/switch-wallpaper.sh";
};
oh-my-zsh = {
@ -65,5 +64,17 @@
home.packages = with pkgs; [
neofetch
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
(pkgs.writeShellScriptBin "pywal" ''
# -n tells `wal` to skip setting the wallpaper.
wal -i ~/Wallpapers/ -n
# Using feh to tile the wallpaper now.
# We grab the wallpaper location from wal's cache so
# that this works even when a directory is passed.
swww img "$(<"${config.home.homeDirectory}/.cache/wal/wal")" --transition-type wipe --transition-angle 45 --transition-fps 90
# Copy cava and update config
cp ~/.cache/wal/cava-config ~/.config/cava/config && pkill -USR2 cava
'')
];
}