summaryrefslogtreecommitdiff
path: root/nsxiv/exec
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2024-01-03 11:38:24 -0600
committerzachir <zachir@librem.one>2024-01-03 11:38:24 -0600
commit2151d19829135740e88fc8700c9eaab827a96bf1 (patch)
treec86253705acc2c6e5f082867e93baa9fb5248fb6 /nsxiv/exec
parent11784107d647ac7bb50c1e67ce75ecdf8ff9c8ec (diff)
nsxiv: change handler for wallpaper
nsxiv will now either copy the image to ~/Pictures/background.png or, if it is not .png, it will convert it using imagemagick.
Diffstat (limited to 'nsxiv/exec')
-rwxr-xr-xnsxiv/exec/key-handler9
1 files changed, 8 insertions, 1 deletions
diff --git a/nsxiv/exec/key-handler b/nsxiv/exec/key-handler
index 3db850a..9e78004 100755
--- a/nsxiv/exec/key-handler
+++ b/nsxiv/exec/key-handler
@@ -2,7 +2,14 @@
while read file; do
case "$1" in
"w")
- cp "$file" ~/background.jpg
+ case "$file" in
+ *.png)
+ cp "$file" ~/Pictures/background.png
+ ;;
+ *)
+ convert "$file" ~/Pictures/background.png
+ ;;
+ esac
t -r hyprpaper
;;
esac