bm-dirs update
This commit is contained in:
parent
ae2f08ec69
commit
7f7d4fcd02
1 changed files with 2 additions and 4 deletions
|
@ -4,14 +4,12 @@ do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"w") setbg "$file" & ;;
|
"w") setbg "$file" & ;;
|
||||||
"c")
|
"c")
|
||||||
[ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/directories | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")"
|
[ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")"
|
||||||
[ -z "$destdir" ] && exit
|
|
||||||
[ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit
|
[ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit
|
||||||
cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." &
|
cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." &
|
||||||
;;
|
;;
|
||||||
"m")
|
"m")
|
||||||
[ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/directories | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")"
|
[ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")"
|
||||||
[ -z "$destdir" ] && exit
|
|
||||||
[ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit
|
[ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit
|
||||||
mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." &
|
mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." &
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue