mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-03-26 04:57:45 +01:00
Merge branch 'master' of git+ssh://github/tiynger/.dotfiles
This commit is contained in:
commit
98610eed52
@ -444,57 +444,16 @@ nnoremap S :sort<cr>
|
||||
nnoremap w :view<cr>
|
||||
vnoremap w :view<cr>gv
|
||||
|
||||
" Open file in existing instance of gvim
|
||||
nnoremap o :!gvim --remote-tab-silent %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
|
||||
" Open file in existing instance of vim
|
||||
nnoremap o :!$EDITOR %f<cr>
|
||||
|
||||
" Mappings for faster renaming
|
||||
nnoremap I cw<c-a>
|
||||
nnoremap cc cw<c-u>
|
||||
nnoremap A cw
|
||||
|
||||
" Open console in current directory
|
||||
nnoremap ,t :!xterm &<cr>
|
||||
|
||||
" 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>
|
||||
" Mapping for extraction and compression
|
||||
nnoremap xx :!vifm_extract %f<cr>
|
||||
nnoremap aa :!vifm_compress %f 7z
|
||||
|
||||
" ------------------------------------------------------------------------------
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Disable ctrl-s and ctrl-q.
|
||||
stty -ixon
|
||||
|
||||
setopt autocd autopushd \
|
||||
setopt autocd autopushd
|
||||
|
||||
# Enable autosuggestions
|
||||
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
|
@ -1,10 +1,10 @@
|
||||
#!/bin/sh
|
||||
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 undeaf
|
||||
else
|
||||
lmc unmute
|
||||
lmc undeaf
|
||||
paplay ~/.local/bin/tools/audio/mic_activated.wav
|
||||
paplay ~/.local/bin/etc/sxhkd/audio/mic_activated.wav
|
||||
fi
|
||||
|
@ -6,5 +6,5 @@ if amixer get Master | tail -2 | grep -q '\[on\]'; then
|
||||
else
|
||||
lmc mute
|
||||
lmc undeaf
|
||||
paplay ~/.local/bin/tools/audio/sound_resumed.wav
|
||||
paplay ~/.local/bin/etc/sxhkd/audio/sound_resumed.wav
|
||||
fi
|
||||
|
1
.local/bin/etc/vifm/vifm_compress
Symbolic link
1
.local/bin/etc/vifm/vifm_compress
Symbolic link
@ -0,0 +1 @@
|
||||
../../tools/compress
|
1
.local/bin/etc/vifm/vifm_extract
Symbolic link
1
.local/bin/etc/vifm/vifm_extract
Symbolic link
@ -0,0 +1 @@
|
||||
../../tools/extract
|
10
.local/bin/tools/compress
Executable file
10
.local/bin/tools/compress
Executable file
@ -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
|
21
.local/bin/tools/extract
Executable file
21
.local/bin/tools/extract
Executable file
@ -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…
x
Reference in New Issue
Block a user