Browse Source

Another reorganization

master
SolitudeSF 5 months ago
parent
commit
ef440b22f0
Signed by: SolitudeSF <solitudesf@protonmail.com> GPG Key ID: 789B06817C385387
7 changed files with 58 additions and 66 deletions
  1. 33
    43
      kak/kakrc
  2. 6
    6
      mpd
  3. 2
    2
      ncmpcpp
  4. 4
    4
      profile
  5. 1
    1
      ranger/rc.conf
  6. 1
    1
      setup
  7. 11
    9
      sxhkd

+ 33
- 43
kak/kakrc View File

@@ -1,7 +1,5 @@
1 1
 # Merge and manually source plugins
2
-eval %sh{
3
-    cat $(find "$kak_config/autosource" -name '*\.kak')
4
-}
2
+eval %sh{ cat $(find "$kak_config/autosource" -name '*\.kak') }
5 3
 
6 4
 # Initialization
7 5
 decl -hidden regex curword
@@ -35,42 +33,44 @@ addhl global/ dynregex '%opt{curword}' 0:+b
35 33
 map global normal <space> ,
36 34
 map global normal -docstring 'remove all sels except main' <backspace> <space>
37 35
 map global normal -docstring 'remove main sel' <a-backspace> <a-space>
38
-map global normal -docstring 'comment line' '#' :comment-line<ret>
39
-map global normal -docstring 'comment block' '<a-#>' :comment-block<ret>
36
+map global normal -docstring 'comment line' '#' ': comment-line<ret>'
37
+map global normal -docstring 'comment block' '<a-#>' ': comment-block<ret>'
40 38
 map global normal -docstring 'delete to end of line' D <a-l>d
41 39
 map global normal -docstring 'yank to end of line' Y <a-l>y
42 40
 
43
-map global user -docstring "add phantom selection" f :phantom-sel-add-selection<ret>
44
-map global user -docstring "clear all phantom selections" <a-f> :phantom-sel-select-all<ret>:phantom-sel-clear<ret>
45
-map global user -docstring "next phantom selection" F :phantom-sel-iterate-next<ret>
46
-map global user -docstring "previous phantom selection" <a-F> :phantom-sel-iterate-prev<ret>
41
+map global user -docstring "add phantom selection" f ': phantom-sel-add-selection<ret>'
42
+map global user -docstring "clear all phantom selections" <a-f> ': phantom-sel-select-all<ret>: phantom-sel-clear<ret>'
43
+map global user -docstring "next phantom selection" F ': phantom-sel-iterate-next<ret>'
44
+map global user -docstring "previous phantom selection" <a-F> ': phantom-sel-iterate-prev<ret>'
45
+
46
+map global user -docstring 'filetree' t ': filetree<ret>'
47 47
 
48
-map global user -docstring "filetree" t :filetree<ret>
49
-map global user -docstring 'buffers' <ret> :rofi-buffers<ret>
48
+map global normal -docstring 'select view' <a-%> ': select-view<ret>'
49
+map global view   -docstring 'select view' s '<esc>: select-view<ret>'
50 50
 
51
-map global normal -docstring 'select view' <a-%> ':select-view<ret>'
52
-map global view   -docstring 'select view' s '<esc>:select-view<ret>'
51
+map global user -docstring "add mark" m ': mark-word<ret>'
52
+map global user -docstring "clear marks" M ': mark-clear<ret>'
53 53
 
54
-map global user -docstring "add mark" m :mark-word<ret>
55
-map global user -docstring "clear marks" M :mark-clear<ret>
54
+map global user -docstring "expand selection" e ': expand<ret>'
55
+map global user -docstring "expand repeat" E ': expand-repeat<ret>'
56 56
 
57
-map global user -docstring "expand selection" e :expand<ret>
58
-map global user -docstring "expand repeat" E :expand-repeat<ret>
57
+map global normal Y ': yank-ring<ret>'
58
+map global normal <c-p> ': yank-ring<ret><c-p>'
59
+map global normal <c-n> ': yank-ring<ret><c-n>'
59 60
 
60
-map global normal <c-p> ':yank-ring-previous<ret>'
61
-map global normal <c-n> ':yank-ring-next<ret>'
62
-map global normal Y ':yank-ring-open<ret>'
61
+map global user -docstring 'buffers…' b ': enter-buffers-mode<ret>'
62
+map global user -docstring 'buffers (lock)…' B ': enter-user-mode -lock buffers<ret>'
63 63
 
64 64
 declare-user-mode surround
65
-map global user -docstring "surround mode" s ':enter-user-mode surround<ret>'
66
-map global surround -docstring 'surround' s ':surround<ret>'
67
-map global surround -docstring 'change' c ':change-surround<ret>'
68
-map global surround -docstring 'delete' d ':delete-surround<ret>'
69
-map global surround -docstring 'select tag' t ':select-surrounding-tag<ret>'
70
-map global surround -docstring 'auto-pairs surround' a ':auto-pairs-surround<ret>'
65
+map global user -docstring "surround mode" s ': enter-user-mode surround<ret>'
66
+map global surround -docstring 'surround' s ': surround<ret>'
67
+map global surround -docstring 'change' c ': change-surround<ret>'
68
+map global surround -docstring 'delete' d ': delete-surround<ret>'
69
+map global surround -docstring 'select tag' t ': select-surrounding-tag<ret>'
70
+map global surround -docstring 'auto-pairs surround' a ': auto-pairs-surround<ret>'
71 71
 
72 72
 declare-user-mode anchor
73
-map global normal ';' ':enter-user-mode anchor<ret>'
73
+map global normal ';' ': enter-user-mode anchor<ret>'
74 74
 map global anchor -docstring 'reduce to anchor' a '<a-;>;'
75 75
 map global anchor -docstring 'reduce to cursor' c ';'
76 76
 map global anchor -docstring 'flip cursor and anchor' f '<a-;>'
@@ -83,8 +83,8 @@ map global user -docstring "clip-paste before" P '!xsel -b -o<ret>'
83 83
 map global user -docstring "clip-paste replace" R '|xsel -b -o<ret>'
84 84
 map global user -docstring "clip-yank" y '<a-|>xclip -i -f -sel c<ret>'
85 85
 
86
-map global user -docstring "next error" l :lint-next-error<ret>
87
-map global user -docstring "previous error" L :lint-previous-error<ret>
86
+map global user -docstring "next error" l ': lint-next-error<ret>'
87
+map global user -docstring "previous error" L ': lint-previous-error<ret>'
88 88
 
89 89
 # Functions
90 90
 def toggle-highlighter -params .. -docstring 'Toggle highlighter' %{
@@ -102,12 +102,6 @@ def lint-on-write -docstring 'Activate linting on buffer write' %{
102 102
     hook buffer BufWritePost .* %{ lint }
103 103
 }
104 104
 
105
-def rofi-buffers -docstring 'Select an open buffer using Rofi' %{ eval %sh{
106
-    BUF=$(eval set -- "$kak_buflist"; for i; do echo "$i"; done\
107
-          | rofi -dmenu -no-custom -p 'Select buffer: ')
108
-    [ -n "$BUF" ] && echo buffer "$BUF"
109
-} }
110
-
111 105
 def no-tabs -params 0..1 -docstring 'Indent with spaces' %{
112 106
     eval %sh{ [ -n "$1" ] && printf %s "
113 107
         set buffer indentwidth $1
@@ -126,16 +120,12 @@ def clean-trailing-whitespace -docstring 'Remove trailing whitespace' %{
126 120
 }
127 121
 
128 122
 # Hooks
129
-hook global WinCreate ^[^*]+$ %{
130
-    auto-pairs-enable
131
-}
132
-
133
-hook global BufOpenFile .* %{
134
-    change-directory-current-buffer
135
-}
123
+hook global WinDisplay .* info-buffers
124
+hook global WinCreate .* auto-pairs-enable
125
+hook global BufOpenFile .* change-directory-current-buffer
136 126
 
137 127
 hook global NormalIdle .* %{
138
-    try %{ exec -draft '<a-i>w:palette-status<ret>' }
128
+    try %{ exec -draft '<a-i>w: palette-status<ret>' }
139 129
 }
140 130
 
141 131
 hook global BufWritePre .* %{ nop %sh{

+ 6
- 6
mpd View File

@@ -1,15 +1,15 @@
1 1
 music_directory         "~/mus/"
2
-db_file                 "~/.data/mpd/database"
3
-log_file                "~/.data/mpd/log"
4
-pid_file                "~/.data/mpd/pid"
5
-state_file              "~/.data/mpd/state"
6
-playlist_directory      "~/.data/mpd/playlists"
2
+db_file                 "~/.local/share/mpd/database"
3
+log_file                "~/.local/share/mpd/log"
4
+pid_file                "~/.local/share/mpd/pid"
5
+state_file              "~/.local/share/mpd/state"
6
+playlist_directory      "~/.local/share/mpd/playlists"
7 7
 log_level               "default"
8 8
 password                "password@read,add,control,admin"
9 9
 default_permissions     "read,add,control,admin"
10 10
 user                    "solitude"
11 11
 bind_to_address         "127.0.0.1"
12
-bind_to_address         "~/.data/mpd/socket"
12
+bind_to_address         "~/.local/share/mpd/socket"
13 13
 port                    "6600"
14 14
 auto_update             "yes"
15 15
 #auto_update_depth      "3"

+ 2
- 2
ncmpcpp View File

@@ -6,8 +6,8 @@ mpd_connection_timeout = "5"
6 6
 
7 7
 # Directories
8 8
 mpd_music_dir = "/mnt/media/Music"
9
-ncmpcpp_directory = "~/.config/ncmpcpp"
10
-lyrics_directory = "~/.cache/lyrics"
9
+ncmpcpp_directory = "~/.local/etc/ncmpcpp"
10
+lyrics_directory = "~/.local/cache/lyrics"
11 11
 
12 12
 # General
13 13
 mouse_list_scroll_whole_page = "no"

+ 4
- 4
profile View File

@@ -1,7 +1,7 @@
1 1
 # Set common directories
2
-XDG_DATA_HOME=$HOME/.data
3
-XDG_CACHE_HOME=$HOME/.cache
4
-XDG_CONFIG_HOME=$HOME/.etc
2
+XDG_DATA_HOME=$HOME/.local/share
3
+XDG_CACHE_HOME=$HOME/.local/cache
4
+XDG_CONFIG_HOME=$HOME/.local/etc
5 5
 XDG_RUNTIME_DIR=/tmp/runtime-$USER
6 6
 XBPS_DISTDIR=$HOME/git/void-packages
7 7
 DOTS_DIR=$HOME/dot
@@ -9,7 +9,7 @@ DOTS_DIR=$HOME/dot
9 9
 mkdir -p $XDG_RUNTIME_DIR
10 10
 
11 11
 # Override system variables
12
-PATH=$HOME/bin:$HOME/.nimble/bin:$DOTS_DIR/bin:$PATH
12
+PATH=$HOME/.local/bin:$HOME/.nimble/bin:$PATH
13 13
 
14 14
 GPG_TTY=$(tty)
15 15
 TERMINAL='kitty -1'

+ 1
- 1
ranger/rc.conf View File

@@ -8,7 +8,7 @@ set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$|^nim
8 8
 
9 9
 set show_hidden false
10 10
 set confirm_on_delete multiple
11
-set preview_script ~/.etc/ranger/scope.sh
11
+set preview_script ~/.local/etc/ranger/scope.sh
12 12
 
13 13
 set use_preview_script true
14 14
 set automatically_count_files true

+ 1
- 1
setup View File

@@ -65,7 +65,7 @@ for arg; do
65 65
 		polybar)
66 66
 			_render $arg "$CONF/polybar/config";;
67 67
 		rofi)
68
-			_install $arg "$CONF/rofi/config.rasi";;
68
+			_install $arg.rasi "$CONF/rofi/config.rasi";;
69 69
 		pqiv)
70 70
 			_install $arg "$CONF/pqivrc";;
71 71
 		mpv)

+ 11
- 9
sxhkd View File

@@ -74,7 +74,7 @@ super + y
74 74
 
75 75
 # swap the current node and the biggest node
76 76
 super + g
77
-	bspc node -s biggest
77
+	bspc node -s biggest.local
78 78
 
79 79
 # toggle pointer focus
80 80
 super + alt + p
@@ -99,10 +99,12 @@ super + ctrl + shift + w
99 99
 # focus/swap
100 100
 #
101 101
 
102
-super + r
103
-	bspc node @/ -R 90
104
-super + shift + r
105
-	bspc node @/ -R 270
102
+super {_,+ shift} + r
103
+	bspc node @/ -R {90,270}
104
+
105
+# Rotate leaves of tree
106
+super + shift + {comma,period}
107
+	bspc desktop -R {90,270}
106 108
 
107 109
 # focus/swap the node in the given direction
108 110
 super + {_,shift + }{h,j,k,l}
@@ -158,13 +160,13 @@ super + ctrl + shift + space
158 160
 # move/resize
159 161
 #
160 162
 
161
-# expand a window by moving one of its side outward
163
+# expand the tiled space in the given direction
162 164
 super + alt + {h,j,k,l}
163
-	bspc node -z {left -20 0,bottom 0 20, top 0 -20,right 20 0}
165
+	bspc node {@west -r -,@south -r +,@north -r -,@east -r +}10
164 166
 
165
-# contract a window by moving one of its side inward
167
+# contract the tiled space in the given direction
166 168
 super + alt + shift + {h,j,k,l}
167
-	bspc node -z {right -20 0,top 0 20, bottom 0 -20,left 20 0}
169
+	bspc node {@east -r -,@north -r +,@south -r -,@west -r +}10
168 170
 
169 171
 # move a floating window
170 172
 super + {Left,Down,Up,Right}

Loading…
Cancel
Save