mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 06:50:14 +01:00
23 lines
605 B
Nix
23 lines
605 B
Nix
{ username, ... }:
|
|
|
|
{
|
|
home.file = {
|
|
"/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/";;
|
|
"s") mkdir -p "$HOME/temp" && cp "$file" "$HOME/temp" ;;
|
|
"r") mkdir -p "$HOME/temp" && cp "$(basename "$file" ".JPG").RAF" "$HOME/temp" ;;
|
|
"e") echo -e "'$(pwd)"/"$(basename "$file" ".JPG").RAF'\n'$(pwd)/""$file""'" ;;
|
|
esac
|
|
done
|
|
'';
|
|
};
|
|
};
|
|
}
|