setwall: use nsxiv for menu

This commit is contained in:
krolxon 2025-08-17 18:29:43 +05:30
parent 9226cefdd3
commit 4df279d8cc
5 changed files with 7 additions and 15 deletions

View File

@ -11,7 +11,8 @@ $browser = zen-browser
################# #################
### AUTOSTART ### ### AUTOSTART ###
################# #################
exec-once = (hyprpm reload -n & kanshi & waybar & swaync & gammastep & hypridle & foot --server) exec-once = foot --server
exec-once = (hyprpm reload -n & kanshi & waybar & swaync & gammastep & hypridle)
exec-once = ~/.local/bin/setwall exec-once = ~/.local/bin/setwall
exec-once = systemctl --user start hyprpolkitagent exec-once = systemctl --user start hyprpolkitagent

View File

@ -1,2 +0,0 @@
preload = /home/krolyxon/pix/wallpapers/onedarkwallpapers/19.png
wallpaper = ,/home/krolyxon/pix/wallpapers/onedarkwallpapers/19.png

View File

@ -5,7 +5,7 @@ do
case "$1" in case "$1" in
"d") "d")
[ "$(printf "No\\nYes" | dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;; [ "$(printf "No\\nYes" | dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
"w") setwall -p $file;; "w") setwall -p $(realpath $file);;
"c") cat "$file" | xclip -sel c -t image/png && notify-send "$file Copied ";; "c") cat "$file" | xclip -sel c -t image/png && notify-send "$file Copied ";;
esac esac
done done

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
WALL_DIR="$HOME/pix/wallpapers/onedarkwallpapers/" WALL_DIR="$HOME/pix/wallpapers/catppuccin/"
MODE="random" MODE="random"
CUSTOM_PATH="" CUSTOM_PATH=""
@ -27,13 +27,7 @@ case $MODE in
fi fi
;; ;;
menu) menu)
WALLPAPER_LIST=$(find "$WALL_DIR" -type f | sort | sed "s|$WALL_DIR||") NEW_WALL=$(nsxiv -tfpo $WALL_DIR)
CHOSEN=$(echo "$WALLPAPER_LIST" | rofi -dmenu -i -p "Choose wallpaper:")
if [[ -z "$CHOSEN" ]]; then
NEW_WALL=$(find "$WALL_DIR" -type f | shuf -n 1)
else
NEW_WALL="$WALL_DIR$CHOSEN"
fi
;; ;;
esac esac

View File

@ -8,6 +8,5 @@ fi
[ -z "$file" ] && exit [ -z "$file" ] && exit
# curl -F"file=@$file" 0x0.st | xclip -sel c curl -F"file=@$file" 0x0.st | wl-copy
curl -F"file=@$file" 0.vern.cc | xclip -sel c notify-send "The url has been copied to your clipboard. $(wl-paste)"
notify-send "The url has been copied to your clipboard. $(xclip -sel c -o)"