diff --git a/vifm/.config/vifm/vifmrc b/vifm/.config/vifm/vifmrc index aa50342..c842cc8 100644 --- a/vifm/.config/vifm/vifmrc +++ b/vifm/.config/vifm/vifmrc @@ -144,6 +144,7 @@ command! mkcd :mkdir %a | cd %a command! vgrep nvim "+grep %a" command! reload :write | restart command! ncdu ncdu %d 2> /dev/null +command! wallpaper generate-lock-image.sh %f 2> /dev/null " Fuzzy file search command! FZFfind :set noquickview | :execute 'goto "'.system('find | fzf --height 10 2>/dev/tty ').'"%IU' | redraw @@ -472,7 +473,7 @@ nnoremap ,t :!st & " Open editor to edit vifmrc and apply settings after returning to vifm nnoremap ,c :write | edit $MYVIFMRC | restart " Open gvim to edit vifmrc -nnoremap ,C :!st -e nvim $MYVIFMRC & +nnoremap ,C :!st -e nvim %i $MYVIFMRC & " Toggle wrap setting on ,w key nnoremap ,w :set wrap! @@ -485,6 +486,9 @@ nnoremap :move nnoremap :mkdir nnoremap :delete +" Generate wallapaper +nnoremap ,w :wallpaper + " quit nnoremap q :q! diff --git a/vifm/.scripts/generate-lock-image.sh b/vifm/.scripts/generate-lock-image.sh new file mode 100755 index 0000000..09efcd4 --- /dev/null +++ b/vifm/.scripts/generate-lock-image.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +clear + +WIDTH=$(xrandr | grep '\*' | awk -F 'x' '{print $1}' | sed 's/ //g') +OUTPUT_IMAGE="$HOME/.config/lock.png" + +echo "Converting ${1} to ${OUTPUT_IMAGE}...." +convert "${1}" "${OUTPUT_IMAGE}" +echo "done!" +echo "Reszing ${OUTPUT_IMAGE} to width ${WIDTH}...." +convert "${OUTPUT_IMAGE}" -resize "${WIDTH}"x "${OUTPUT_IMAGE}" +echo "done!" diff --git a/xorg/.scripts/generateLockImage.sh b/xorg/.scripts/generateLockImage.sh deleted file mode 100755 index bf1708d..0000000 --- a/xorg/.scripts/generateLockImage.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -WIDTH=$(xrandr | grep '\*' | awk -F 'x' '{print $1}' | sed 's/ //g') -convert "$1" ~/.config/lock.png -convert ~/.config/lock.png -resize "${WIDTH}"x ~/.config/lock.png