Merge branch 'master' of git+ssh://github/tiynger/.dotfiles

master
TiynGER 1 year ago
commit 98610eed52

@ -444,57 +444,16 @@ nnoremap S :sort<cr>
nnoremap w :view<cr> nnoremap w :view<cr>
vnoremap w :view<cr>gv vnoremap w :view<cr>gv
" Open file in existing instance of gvim " Open file in existing instance of vim
nnoremap o :!gvim --remote-tab-silent %f<cr> nnoremap o :!$EDITOR %f<cr>
" Open file in new instance of gvim
nnoremap O :!gvim %f<cr>
" Open file in the background using its default program
nnoremap gb :file &<cr>l
" Interaction with system clipboard
if has('win')
" Yank current directory path to Windows clipboard with forward slashes
nnoremap yp :!echo %"d:gs!\!/! %i | clip<cr>
" Yank path to current file to Windows clipboard with forward slashes
nnoremap yf :!echo %"c:gs!\!/! %i | clip<cr>
elseif executable('xclip')
" Yank current directory path into the clipboard
nnoremap yd :!echo %d | xclip %i<cr>
" Yank current file path into the clipboard
nnoremap yf :!echo %c:p | xclip %i<cr>
elseif executable('xsel')
" Yank current directory path into primary and selection clipboards
nnoremap yd :!echo -n %d | xsel --input --primary %i &&
\ echo -n %d | xsel --clipboard --input %i<cr>
" Yank current file path into into primary and selection clipboards
nnoremap yf :!echo -n %c:p | xsel --input --primary %i &&
\ echo -n %c:p | xsel --clipboard --input %i<cr>
endif
" Mappings for faster renaming " Mappings for faster renaming
nnoremap I cw<c-a> nnoremap I cw<c-a>
nnoremap cc cw<c-u> nnoremap cc cw<c-u>
nnoremap A cw
" Mapping for extraction and compression
" Open console in current directory nnoremap xx :!vifm_extract %f<cr>
nnoremap ,t :!xterm &<cr> nnoremap aa :!vifm_compress %f 7z
" Open editor to edit vifmrc and apply settings after returning to vifm
nnoremap ,c :write | edit $MYVIFMRC | restart<cr>
" Open gvim to edit vifmrc
nnoremap ,C :!gvim --remote-tab-silent $MYVIFMRC &<cr>
" Toggle wrap setting on ,w key
nnoremap ,w :set wrap!<cr>
" Example of standard two-panel file managers mappings
nnoremap <f3> :!less %f<cr>
nnoremap <f4> :edit<cr>
nnoremap <f5> :copy<cr>
nnoremap <f6> :move<cr>
nnoremap <f7> :mkdir<space>
nnoremap <f8> :delete<cr>
" ------------------------------------------------------------------------------ " ------------------------------------------------------------------------------

@ -1,7 +1,7 @@
# Disable ctrl-s and ctrl-q. # Disable ctrl-s and ctrl-q.
stty -ixon stty -ixon
setopt autocd autopushd \ setopt autocd autopushd
# Enable autosuggestions # Enable autosuggestions
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh

@ -1,10 +1,10 @@
#!/bin/sh #!/bin/sh
if amixer get Capture | tail -2 | grep -q '\[on\]'; then if amixer get Capture | tail -2 | grep -q '\[on\]'; then
paplay ~/.local/bin/tools/audio/mic_muted.wav paplay ~/.local/bin/etc/sxhkd/audio/mic_muted.wav
lmc mute lmc mute
lmc undeaf lmc undeaf
else else
lmc unmute lmc unmute
lmc undeaf lmc undeaf
paplay ~/.local/bin/tools/audio/mic_activated.wav paplay ~/.local/bin/etc/sxhkd/audio/mic_activated.wav
fi fi

@ -6,5 +6,5 @@ if amixer get Master | tail -2 | grep -q '\[on\]'; then
else else
lmc mute lmc mute
lmc undeaf lmc undeaf
paplay ~/.local/bin/tools/audio/sound_resumed.wav paplay ~/.local/bin/etc/sxhkd/audio/sound_resumed.wav
fi fi

@ -0,0 +1 @@
../../tools/compress

@ -0,0 +1 @@
../../tools/extract

@ -0,0 +1,10 @@
#!/bin/sh
if [ -e $1 ] ; then
case $2 in
7z) 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on $1.7z $1 ;;
*) echo "don't know how to compress '$1' in '$2'..." ;;
esac
else
echo "'$1' is not a valid file or directory!"
fi

@ -0,0 +1,21 @@
#!/bin/sh
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.tar.xz) tar xf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xvf $1 ;;
*.tbz2) tar xvjf $1 ;;
*.tgz) tar xvzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "don't know how to extract '$1'..." ;;
esac
else
echo "'$1' is not a valid file!"
fi
Loading…
Cancel
Save