diff options
| author | awy <awy@awy.one> | 2025-11-29 20:27:56 +0300 |
|---|---|---|
| committer | awy <awy@awy.one> | 2025-11-29 20:27:56 +0300 |
| commit | d3cc84aa4cc398c49af101fee2434e286de0f502 (patch) | |
| tree | ab35f5ac2d56c5304ebdf3b63dce9052047f1487 /.config | |
| parent | da59c9ca2c742e56c02a2638076076b7fc1336f1 (diff) | |
| download | hyprdots-d3cc84aa4cc398c49af101fee2434e286de0f502.tar.gz | |
yes
Diffstat (limited to '.config')
| -rwxr-xr-x | .config/swayimg/key-handler | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/.config/swayimg/key-handler b/.config/swayimg/key-handler index 67943a9..1d289d6 100755 --- a/.config/swayimg/key-handler +++ b/.config/swayimg/key-handler @@ -1,17 +1,17 @@ #!/bin/sh file=$1 [ -z "$selection" ] && selection=$(printf "w - Set as wallpaper\nc - Copy to dir\nm - Move to dir\nr - Rotate 90°\nR - Rotate -90°\nf - Flip horizontal\ny - Copy filename to clipboard\nY - Copy full path to clipboard\nd - Delete\ng - Open in GIMP\ni - Show media info" | - mew -i -l 12 -p "Choose action for selected files:") + rofi -theme-str 'listview {scrollbar: false;}' -theme-str 'window {width: 20%;}' -dmenu -no-custom -i -l 11 -p "Choose action for selected files") action=$(printf "%s" "$selection" | cut -d'-' -f1 | tr -d ' ') case "$action" in "w") setbg "$file" & ;; "c") - [ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | mew -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")" + [ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | rofi -dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")" [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." & ;; "m") - [ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | mew -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")" + [ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | rofi -dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")" [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." & ;; @@ -28,7 +28,7 @@ file=$1 readlink -f "$file" | tr -d '\n' | wl-copy && notify-send "$(readlink -f "$file") copied to clipboard" & ;; "d") - [ "$(printf "No\\nYes" | mew -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;; + [ "$(printf "No\\nYes" | rofi -dmenu -no-custom -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;; "g") ifinstalled gimp && setsid -f gimp "$file" ;; "i") notify-send "File information" "$(mediainfo "$file" | sed "s/[ ]\+:/:/g;s/: /: <b>/;s/$/<\/b>/" | rg "<b>")" ;; *) notify-send "No keybind for that key" ;; |