mirror of
https://github.com/alrayyes/dotfiles/
synced 2023-11-14 15:56:30 +00:00
added generate lock image to vifm
This commit is contained in:
parent
ca8d11b1bf
commit
ed746fd947
@ -144,6 +144,7 @@ command! mkcd :mkdir %a | cd %a
|
|||||||
command! vgrep nvim "+grep %a"
|
command! vgrep nvim "+grep %a"
|
||||||
command! reload :write | restart
|
command! reload :write | restart
|
||||||
command! ncdu ncdu %d 2> /dev/null
|
command! ncdu ncdu %d 2> /dev/null
|
||||||
|
command! wallpaper generate-lock-image.sh %f 2> /dev/null
|
||||||
|
|
||||||
" Fuzzy file search
|
" Fuzzy file search
|
||||||
command! FZFfind :set noquickview | :execute 'goto "'.system('find | fzf --height 10 2>/dev/tty ').'"%IU' | redraw
|
command! FZFfind :set noquickview | :execute 'goto "'.system('find | fzf --height 10 2>/dev/tty ').'"%IU' | redraw
|
||||||
@ -472,7 +473,7 @@ nnoremap ,t :!st &<cr>
|
|||||||
" Open editor to edit vifmrc and apply settings after returning to vifm
|
" Open editor to edit vifmrc and apply settings after returning to vifm
|
||||||
nnoremap ,c :write | edit $MYVIFMRC | restart<cr>
|
nnoremap ,c :write | edit $MYVIFMRC | restart<cr>
|
||||||
" Open gvim to edit vifmrc
|
" Open gvim to edit vifmrc
|
||||||
nnoremap ,C :!st -e nvim $MYVIFMRC &<cr>
|
nnoremap ,C :!st -e nvim %i $MYVIFMRC &<cr>
|
||||||
|
|
||||||
" Toggle wrap setting on ,w key
|
" Toggle wrap setting on ,w key
|
||||||
nnoremap ,w :set wrap!<cr>
|
nnoremap ,w :set wrap!<cr>
|
||||||
@ -485,6 +486,9 @@ nnoremap <f6> :move<cr>
|
|||||||
nnoremap <f7> :mkdir<space>
|
nnoremap <f7> :mkdir<space>
|
||||||
nnoremap <f8> :delete<cr>
|
nnoremap <f8> :delete<cr>
|
||||||
|
|
||||||
|
" Generate wallapaper
|
||||||
|
nnoremap ,w :wallpaper<cr>
|
||||||
|
|
||||||
" quit
|
" quit
|
||||||
nnoremap q :q!<cr>
|
nnoremap q :q!<cr>
|
||||||
|
|
||||||
|
13
vifm/.scripts/generate-lock-image.sh
Executable file
13
vifm/.scripts/generate-lock-image.sh
Executable file
@ -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!"
|
@ -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
|
|
Loading…
Reference in New Issue
Block a user