nixos-config/modules/home/hyprland/scripts.nix

40 lines
891 B
Nix
Raw Normal View History

{ username, ... }:
{
home.file = {
2025-05-05 22:12:22 +02:00
"/home/${username}/.config/nsxiv/exec/key-handler" = {
executable = true;
text = ''
#!/bin/sh
while read file
do
case "$1" in
"w") setbg "$file" ;;
"d") mv "$file" "$HOME/.trash/";;
esac
done
'';
};
"/home/${username}/.local/bin/setbg" = {
executable = true;
text = ''
2025-05-05 22:12:22 +02:00
#!/usr/bin/env bash
2025-05-05 22:12:22 +02:00
magick convert "$1" ~/.local/share/bg.png
swww img ~/.local/share/bg.png --transition-type fade
'';
};
"/home/${username}/.local/bin/walp" = {
executable = true;
text = ''
2025-05-05 22:12:22 +02:00
#!/usr/bin/env bash
which swiv &>/dev/null && SIV=swiv || SIV=nsxiv # todo: switch to swiv, but that is not packaged for Nix yet.
2025-05-05 22:12:22 +02:00
$SIV -t ~/Pictures/wallpapers/others/*
'';
};
};
}