From 2151d19829135740e88fc8700c9eaab827a96bf1 Mon Sep 17 00:00:00 2001 From: zachir Date: Wed, 3 Jan 2024 11:38:24 -0600 Subject: 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. --- nsxiv/exec/key-handler | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3