extensive update: some cleanup, todo/agenda changes, publishing system, swayfx, WIPs, etc.
This commit is contained in:
@ -1,33 +1,12 @@
|
||||
#!/bin/sh
|
||||
# todo: import to wayland
|
||||
while read -r file
|
||||
do
|
||||
case "$1" in
|
||||
"w") change-background "$file" & ;;
|
||||
"c")
|
||||
[ -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}' | 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." &
|
||||
;;
|
||||
"r")
|
||||
convert -rotate 90 "$file" "$file" ;;
|
||||
"R")
|
||||
convert -rotate -90 "$file" "$file" ;;
|
||||
"f")
|
||||
convert -flop "$file" "$file" ;;
|
||||
"b") change-background "$file" & ;;
|
||||
"y") wl-copy < $file ;;
|
||||
#printf "%s" "$file" | tr -d '\n' | xclip -selection clipboard &&
|
||||
#notify-send "$file copied to clipboard" & ;;
|
||||
"Y")
|
||||
readlink -f "$file" | tr -d '\n' | xclip -selection clipboard &&
|
||||
notify-send "$(readlink -f "$file") copied to clipboard" & ;;
|
||||
"d")
|
||||
[ "$(printf "No\\nYes" | rofi -dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
|
||||
#[ "$(printf "No\\nYes" | rofi -dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
|
||||
[ "$(printf "No\\nYes" | wofi --insensitive --show dmenu --prompt="Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
|
||||
"g") setsid -f gimp "$file" ;;
|
||||
"i") notify-send "File information" "$(mediainfo "$file" | sed "s/[ ]\+:/:/g;s/: /: <b>/;s/$/<\/b>/" | grep "<b>")" ;;
|
||||
esac
|
||||
|
Reference in New Issue
Block a user