2025-05-05 16:44:49 +02:00
|
|
|
{ username, ... }:
|
2024-10-13 20:40:41 +02:00
|
|
|
|
|
|
|
|
{
|
|
|
|
|
home.file = {
|
2025-05-05 16:44:49 +02:00
|
|
|
"/home/${username}/.config/sxiv/exec/key-handler" = {
|
2024-10-13 20:40:41 +02:00
|
|
|
executable = true;
|
|
|
|
|
text = ''
|
2025-05-05 16:44:49 +02:00
|
|
|
#!/bin/sh
|
2024-10-13 20:40:41 +02:00
|
|
|
|
2025-05-05 16:44:49 +02:00
|
|
|
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 = ''
|
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
|
convert "$1" ~/.local/share/bg.png
|
|
|
|
|
swww img ~/.local/share/bg.png --transition-type fade
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
"/home/${username}/.local/bin/walp" = {
|
|
|
|
|
executable = true;
|
|
|
|
|
text = ''
|
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
|
which swiv &>/dev/null && SIV=swiv || SIV=nsxiv # todo: switch to swiv, but that is not packaged for Nix yet.
|
|
|
|
|
$SIV -t ~/Pictures/wallpapers/other/*
|
2024-10-13 20:40:41 +02:00
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|