From 4df279d8cc55103b46df9531616e41d08b7288b2 Mon Sep 17 00:00:00 2001 From: krolxon Date: Sun, 17 Aug 2025 18:29:43 +0530 Subject: [PATCH] setwall: use nsxiv for menu --- .config/hypr/hyprland.conf | 3 ++- .config/hypr/hyprpaper.conf | 2 -- .config/nsxiv/exec/key-handler | 2 +- .local/bin/setwall | 10 ++-------- .local/bin/upfile | 5 ++--- 5 files changed, 7 insertions(+), 15 deletions(-) delete mode 100644 .config/hypr/hyprpaper.conf diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index ec76c76..20c3510 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -11,7 +11,8 @@ $browser = zen-browser ################# ### 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 = systemctl --user start hyprpolkitagent diff --git a/.config/hypr/hyprpaper.conf b/.config/hypr/hyprpaper.conf deleted file mode 100644 index a9c8b8b..0000000 --- a/.config/hypr/hyprpaper.conf +++ /dev/null @@ -1,2 +0,0 @@ -preload = /home/krolyxon/pix/wallpapers/onedarkwallpapers/19.png -wallpaper = ,/home/krolyxon/pix/wallpapers/onedarkwallpapers/19.png diff --git a/.config/nsxiv/exec/key-handler b/.config/nsxiv/exec/key-handler index 491b894..592cec4 100755 --- a/.config/nsxiv/exec/key-handler +++ b/.config/nsxiv/exec/key-handler @@ -5,7 +5,7 @@ do case "$1" in "d") [ "$(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 ";; esac done diff --git a/.local/bin/setwall b/.local/bin/setwall index 36c46db..a18a971 100755 --- a/.local/bin/setwall +++ b/.local/bin/setwall @@ -1,5 +1,5 @@ #!/bin/bash -WALL_DIR="$HOME/pix/wallpapers/onedarkwallpapers/" +WALL_DIR="$HOME/pix/wallpapers/catppuccin/" MODE="random" CUSTOM_PATH="" @@ -27,13 +27,7 @@ case $MODE in fi ;; menu) - WALLPAPER_LIST=$(find "$WALL_DIR" -type f | sort | sed "s|$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 + NEW_WALL=$(nsxiv -tfpo $WALL_DIR) ;; esac diff --git a/.local/bin/upfile b/.local/bin/upfile index 78c0321..fd6cd33 100755 --- a/.local/bin/upfile +++ b/.local/bin/upfile @@ -8,6 +8,5 @@ fi [ -z "$file" ] && exit -# curl -F"file=@$file" 0x0.st | xclip -sel c -curl -F"file=@$file" 0.vern.cc | xclip -sel c -notify-send "The url has been copied to your clipboard. $(xclip -sel c -o)" +curl -F"file=@$file" 0x0.st | wl-copy +notify-send "The url has been copied to your clipboard. $(wl-paste)"