diff options
-rw-r--r-- | git/.gitconfig | 2 | ||||
-rwxr-xr-x | i3/.config/i3blocks/bin/updates | 4 | ||||
-rw-r--r-- | vim/.vim/after/plugin/generalized_motion.vim | 26 | ||||
-rwxr-xr-x | xinit/.xinitrc | 2 |
4 files changed, 30 insertions, 4 deletions
diff --git a/git/.gitconfig b/git/.gitconfig index 2f0bbb3..f44fe0e 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -8,7 +8,7 @@ templatedir = ~/.git_template [alias] ctags = !.git/hooks/ctags - saveandsync = !git add . && git commit -m "Update" && git push origin master + saveandsync = !git add . && git diff --cached --exit-code || git commit -m "Update" && git push origin master [http] sslverify = false [commit] diff --git a/i3/.config/i3blocks/bin/updates b/i3/.config/i3blocks/bin/updates index 4385305..41c34dc 100755 --- a/i3/.config/i3blocks/bin/updates +++ b/i3/.config/i3blocks/bin/updates @@ -1,7 +1,7 @@ #!/usr/bin/env bash -if command -v pacman -Qu > /dev/null; then - n_updates=$(pacman -Qu | wc -l) +if command -v checkupdates > /dev/null; then + n_updates=$(checkupdates | wc -l) if [[ n_updates -gt 150 ]]; then color='red' elif [[ n_updates -gt 50 ]]; then diff --git a/vim/.vim/after/plugin/generalized_motion.vim b/vim/.vim/after/plugin/generalized_motion.vim new file mode 100644 index 0000000..87ea9ed --- /dev/null +++ b/vim/.vim/after/plugin/generalized_motion.vim @@ -0,0 +1,26 @@ +"" More general ; {{{1 +let g:generalized_motion = "f" +function! Generalized_motion(...) + if a:0 > 0 + let g:generalized_motion=a:1 + echom "Generalized motion:" g:generalized_motion + if (g:generalized_motion == "f") | call feedkeys('f', 'n') | return | endif + if (g:generalized_motion == "t") | call feedkeys('t', 'n') | return | endif + endif + if (g:generalized_motion == "f") | call feedkeys(';', 'n') | endif + if (g:generalized_motion == "t") | call feedkeys(';', 'n') | endif + try + if (g:generalized_motion == "]q") | cnext | endif + if (g:generalized_motion == "[q") | cprevious | endif + if (g:generalized_motion == "]a") | next | endif + if (g:generalized_motion == "[a") | previous | endif + if (g:generalized_motion == "]b") | bnext | endif + if (g:generalized_motion == "[b") | bprevious | endif + catch + call feedkeys(';', 'n') + endtry +endfunction +for mapping in ['f', 't', ']q', '[q', ']a', '[a', ']f', '[f', ']b', '[b'] + exe "nmap <silent>" mapping ":<c-u>call Generalized_motion('".mapping."')<cr>" +endfor +nnoremap <silent> ; :<c-u>call Generalized_motion()<cr> diff --git a/xinit/.xinitrc b/xinit/.xinitrc index 74cccb4..20b5aee 100755 --- a/xinit/.xinitrc +++ b/xinit/.xinitrc @@ -11,7 +11,7 @@ source $HOME/.local/colors.zsh xrdb $HOME/.Xresources/$COLORSCHEME # Background -feh --bg-fill /home/urbain/documents/wallpapers/pagoda.jpg +feh --bg-fill /home/urbain/Documents/wallpapers/pagoda.jpg # Disable screen going to sleep xset -dpms |