diff --git a/kak/kakrc b/kak/kakrc index af0c756..8aa84b7 100644 --- a/kak/kakrc +++ b/kak/kakrc @@ -1,7 +1,5 @@ # Merge and manually source plugins -eval %sh{ - cat $(find "$kak_config/autosource" -name '*\.kak') -} +eval %sh{ cat $(find "$kak_config/autosource" -name '*\.kak') } # Initialization decl -hidden regex curword @@ -35,42 +33,44 @@ addhl global/ dynregex '%opt{curword}' 0:+b map global normal , map global normal -docstring 'remove all sels except main' map global normal -docstring 'remove main sel' -map global normal -docstring 'comment line' '#' :comment-line -map global normal -docstring 'comment block' '' :comment-block +map global normal -docstring 'comment line' '#' ': comment-line' +map global normal -docstring 'comment block' '' ': comment-block' map global normal -docstring 'delete to end of line' D d map global normal -docstring 'yank to end of line' Y y -map global user -docstring "add phantom selection" f :phantom-sel-add-selection -map global user -docstring "clear all phantom selections" :phantom-sel-select-all:phantom-sel-clear -map global user -docstring "next phantom selection" F :phantom-sel-iterate-next -map global user -docstring "previous phantom selection" :phantom-sel-iterate-prev +map global user -docstring "add phantom selection" f ': phantom-sel-add-selection' +map global user -docstring "clear all phantom selections" ': phantom-sel-select-all: phantom-sel-clear' +map global user -docstring "next phantom selection" F ': phantom-sel-iterate-next' +map global user -docstring "previous phantom selection" ': phantom-sel-iterate-prev' + +map global user -docstring 'filetree' t ': filetree' -map global user -docstring "filetree" t :filetree -map global user -docstring 'buffers' :rofi-buffers +map global normal -docstring 'select view' ': select-view' +map global view -docstring 'select view' s ': select-view' -map global normal -docstring 'select view' ':select-view' -map global view -docstring 'select view' s ':select-view' +map global user -docstring "add mark" m ': mark-word' +map global user -docstring "clear marks" M ': mark-clear' -map global user -docstring "add mark" m :mark-word -map global user -docstring "clear marks" M :mark-clear +map global user -docstring "expand selection" e ': expand' +map global user -docstring "expand repeat" E ': expand-repeat' -map global user -docstring "expand selection" e :expand -map global user -docstring "expand repeat" E :expand-repeat +map global normal Y ': yank-ring' +map global normal ': yank-ring' +map global normal ': yank-ring' -map global normal ':yank-ring-previous' -map global normal ':yank-ring-next' -map global normal Y ':yank-ring-open' +map global user -docstring 'buffers…' b ': enter-buffers-mode' +map global user -docstring 'buffers (lock)…' B ': enter-user-mode -lock buffers' declare-user-mode surround -map global user -docstring "surround mode" s ':enter-user-mode surround' -map global surround -docstring 'surround' s ':surround' -map global surround -docstring 'change' c ':change-surround' -map global surround -docstring 'delete' d ':delete-surround' -map global surround -docstring 'select tag' t ':select-surrounding-tag' -map global surround -docstring 'auto-pairs surround' a ':auto-pairs-surround' +map global user -docstring "surround mode" s ': enter-user-mode surround' +map global surround -docstring 'surround' s ': surround' +map global surround -docstring 'change' c ': change-surround' +map global surround -docstring 'delete' d ': delete-surround' +map global surround -docstring 'select tag' t ': select-surrounding-tag' +map global surround -docstring 'auto-pairs surround' a ': auto-pairs-surround' declare-user-mode anchor -map global normal ';' ':enter-user-mode anchor' +map global normal ';' ': enter-user-mode anchor' map global anchor -docstring 'reduce to anchor' a ';' map global anchor -docstring 'reduce to cursor' c ';' map global anchor -docstring 'flip cursor and anchor' f '' @@ -83,8 +83,8 @@ map global user -docstring "clip-paste before" P '!xsel -b -o' map global user -docstring "clip-paste replace" R '|xsel -b -o' map global user -docstring "clip-yank" y 'xclip -i -f -sel c' -map global user -docstring "next error" l :lint-next-error -map global user -docstring "previous error" L :lint-previous-error +map global user -docstring "next error" l ': lint-next-error' +map global user -docstring "previous error" L ': lint-previous-error' # Functions def toggle-highlighter -params .. -docstring 'Toggle highlighter' %{ @@ -102,12 +102,6 @@ def lint-on-write -docstring 'Activate linting on buffer write' %{ hook buffer BufWritePost .* %{ lint } } -def rofi-buffers -docstring 'Select an open buffer using Rofi' %{ eval %sh{ - BUF=$(eval set -- "$kak_buflist"; for i; do echo "$i"; done\ - | rofi -dmenu -no-custom -p 'Select buffer: ') - [ -n "$BUF" ] && echo buffer "$BUF" -} } - def no-tabs -params 0..1 -docstring 'Indent with spaces' %{ eval %sh{ [ -n "$1" ] && printf %s " set buffer indentwidth $1 @@ -126,16 +120,12 @@ def clean-trailing-whitespace -docstring 'Remove trailing whitespace' %{ } # Hooks -hook global WinCreate ^[^*]+$ %{ - auto-pairs-enable -} - -hook global BufOpenFile .* %{ - change-directory-current-buffer -} +hook global WinDisplay .* info-buffers +hook global WinCreate .* auto-pairs-enable +hook global BufOpenFile .* change-directory-current-buffer hook global NormalIdle .* %{ - try %{ exec -draft 'w:palette-status' } + try %{ exec -draft 'w: palette-status' } } hook global BufWritePre .* %{ nop %sh{ diff --git a/mpd b/mpd index 903ed25..0e503b5 100644 --- a/mpd +++ b/mpd @@ -1,15 +1,15 @@ music_directory "~/mus/" -db_file "~/.data/mpd/database" -log_file "~/.data/mpd/log" -pid_file "~/.data/mpd/pid" -state_file "~/.data/mpd/state" -playlist_directory "~/.data/mpd/playlists" +db_file "~/.local/share/mpd/database" +log_file "~/.local/share/mpd/log" +pid_file "~/.local/share/mpd/pid" +state_file "~/.local/share/mpd/state" +playlist_directory "~/.local/share/mpd/playlists" log_level "default" password "password@read,add,control,admin" default_permissions "read,add,control,admin" user "solitude" bind_to_address "127.0.0.1" -bind_to_address "~/.data/mpd/socket" +bind_to_address "~/.local/share/mpd/socket" port "6600" auto_update "yes" #auto_update_depth "3" diff --git a/ncmpcpp b/ncmpcpp index 460a94e..6b02de1 100644 --- a/ncmpcpp +++ b/ncmpcpp @@ -6,8 +6,8 @@ mpd_connection_timeout = "5" # Directories mpd_music_dir = "/mnt/media/Music" -ncmpcpp_directory = "~/.config/ncmpcpp" -lyrics_directory = "~/.cache/lyrics" +ncmpcpp_directory = "~/.local/etc/ncmpcpp" +lyrics_directory = "~/.local/cache/lyrics" # General mouse_list_scroll_whole_page = "no" diff --git a/profile b/profile index 629a2a5..b730f64 100644 --- a/profile +++ b/profile @@ -1,7 +1,7 @@ # Set common directories -XDG_DATA_HOME=$HOME/.data -XDG_CACHE_HOME=$HOME/.cache -XDG_CONFIG_HOME=$HOME/.etc +XDG_DATA_HOME=$HOME/.local/share +XDG_CACHE_HOME=$HOME/.local/cache +XDG_CONFIG_HOME=$HOME/.local/etc XDG_RUNTIME_DIR=/tmp/runtime-$USER XBPS_DISTDIR=$HOME/git/void-packages DOTS_DIR=$HOME/dot @@ -9,7 +9,7 @@ DOTS_DIR=$HOME/dot mkdir -p $XDG_RUNTIME_DIR # Override system variables -PATH=$HOME/bin:$HOME/.nimble/bin:$DOTS_DIR/bin:$PATH +PATH=$HOME/.local/bin:$HOME/.nimble/bin:$PATH GPG_TTY=$(tty) TERMINAL='kitty -1' diff --git a/ranger/rc.conf b/ranger/rc.conf index d47083b..a25c731 100644 --- a/ranger/rc.conf +++ b/ranger/rc.conf @@ -8,7 +8,7 @@ set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$|^nim set show_hidden false set confirm_on_delete multiple -set preview_script ~/.etc/ranger/scope.sh +set preview_script ~/.local/etc/ranger/scope.sh set use_preview_script true set automatically_count_files true diff --git a/setup b/setup index 295dcbd..4770586 100755 --- a/setup +++ b/setup @@ -65,7 +65,7 @@ for arg; do polybar) _render $arg "$CONF/polybar/config";; rofi) - _install $arg "$CONF/rofi/config.rasi";; + _install $arg.rasi "$CONF/rofi/config.rasi";; pqiv) _install $arg "$CONF/pqivrc";; mpv) diff --git a/sxhkd b/sxhkd index 9826584..11dee53 100644 --- a/sxhkd +++ b/sxhkd @@ -74,7 +74,7 @@ super + y # swap the current node and the biggest node super + g - bspc node -s biggest + bspc node -s biggest.local # toggle pointer focus super + alt + p @@ -99,10 +99,12 @@ super + ctrl + shift + w # focus/swap # -super + r - bspc node @/ -R 90 -super + shift + r - bspc node @/ -R 270 +super {_,+ shift} + r + bspc node @/ -R {90,270} + +# Rotate leaves of tree +super + shift + {comma,period} + bspc desktop -R {90,270} # focus/swap the node in the given direction super + {_,shift + }{h,j,k,l} @@ -158,13 +160,13 @@ super + ctrl + shift + space # move/resize # -# expand a window by moving one of its side outward +# expand the tiled space in the given direction super + alt + {h,j,k,l} - bspc node -z {left -20 0,bottom 0 20, top 0 -20,right 20 0} + bspc node {@west -r -,@south -r +,@north -r -,@east -r +}10 -# contract a window by moving one of its side inward +# contract the tiled space in the given direction super + alt + shift + {h,j,k,l} - bspc node -z {right -20 0,top 0 20, bottom 0 -20,left 20 0} + bspc node {@east -r -,@north -r +,@south -r -,@west -r +}10 # move a floating window super + {Left,Down,Up,Right}