diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc index de4c067..80e40f3 100644 --- a/.config/zathura/zathurarc +++ b/.config/zathura/zathurarc @@ -14,4 +14,5 @@ map i recolor map p print map g goto top map exec zathura_backward_search.sh -map exec openfilebrowser $FILE +map exec "openfilebrowser $FILE" +map exec "movepdf $FILE" diff --git a/.local/bin/tools/movepdf b/.local/bin/tools/movepdf new file mode 100755 index 0000000..94bcc02 --- /dev/null +++ b/.local/bin/tools/movepdf @@ -0,0 +1,9 @@ +#!/bin/sh +file="$1" +dest="$(find "$HOME" -maxdepth 5 -type d -not -path "$HOME/.*" | dmenu -i -p 'move to folder:')" +if ! [ -d "$dest" ]; then + mkdir -p "$dest" +fi +echo $dest +echo $file +mv "$file" "$dest"