Browse Source

More plugins. go. cargo. Change font. Normalize colors. Devmon notify.

master
SolitudeSF 4 months ago
parent
commit
8582421491
Signed by: SolitudeSF <solitudesf@protonmail.com> GPG Key ID: 789B06817C385387
9 changed files with 114 additions and 67 deletions
  1. 1
    1
      gtk/gtkrc
  2. 1
    1
      gtk/settings.ini
  3. 67
    33
      kak/kakrc
  4. 16
    5
      mpv/mpv.conf
  5. 2
    2
      ntr/templates/dunst
  6. 3
    4
      ntr/templates/polybar
  7. 4
    3
      profile
  8. 16
    17
      splug.toml
  9. 4
    1
      sx.sh

+ 1
- 1
gtk/gtkrc View File

@@ -1,6 +1,6 @@
1 1
 gtk-theme-name="vimix-dark-ruby"
2 2
 gtk-icon-theme-name="Paper"
3
-gtk-font-name="Inter 10"
3
+gtk-font-name="Sarasa UI J 10"
4 4
 gtk-cursor-theme-name="Paper"
5 5
 gtk-cursor-theme-size=0
6 6
 gtk-toolbar-style=GTK_TOOLBAR_ICONS

+ 1
- 1
gtk/settings.ini View File

@@ -1,7 +1,7 @@
1 1
 [Settings]
2 2
 gtk-theme-name=vimix-dark-ruby
3 3
 gtk-icon-theme-name=Paper
4
-gtk-font-name=Inter 10
4
+gtk-font-name=Sarasa UI J 10
5 5
 gtk-cursor-theme-size=0
6 6
 gtk-toolbar-style=GTK_TOOLBAR_ICONS
7 7
 gtk-toolbar-icon-size=GTK_ICON_SIZE_SMALL_TOOLBAR

+ 67
- 33
kak/kakrc View File

@@ -1,24 +1,39 @@
1
-# Merge and manually source plugins
1
+# Manually merge and source plugins
2 2
 eval %sh{
3 3
     cat $(find "$kak_config/autosource" -name '*\.kak')
4 4
     kak-lsp --kakoune -s $kak_session
5 5
 }
6 6
 
7 7
 # Initialization
8
+
8 9
 decl -hidden regex curword
10
+decl str termcmd 'kitty -1 sh -c'
9 11
 
10 12
 set global ui_options ncurses_assistant=none
11 13
 set global scrolloff 7,7
12 14
 set global autoreload yes
13 15
 set global kitty_window_type os
14
-set global termcmd 'kitty -1 sh -c'
15 16
 set global grepcmd 'rg -iHL --column'
16
-set global modelinefmt '%opt{modeline_git_branch} %val{bufname}
17
-%val{cursor_line}:%val{cursor_char_column} {{mode_info}} {{context_info}}
18
-◂%val{client}⊙%val{session}▸'
17
+# set global modelinefmt '%opt{modeline_git_branch} %val{bufname}
18
+# %val{cursor_line}:%val{cursor_char_column} {{mode_info}} {{context_info}}
19
+# ◂%val{client}⊙%val{session}▸'
20
+
21
+set global connect_source "%val{config}/autosource/splug"
22
+set global connect_shell elvish
23
+set global fzf_implementation sk
24
+set global fzf_file_command fd
25
+set global fzf_highlighter bat
19 26
 
20 27
 unalias global e edit
21 28
 alias global e edit-or-dir
29
+alias global bd delete-buffer
30
+alias global bf buffer-first
31
+alias global bl buffer-last
32
+alias global bo buffer-only
33
+alias global bo! buffer-only-force
34
+alias global sw sudo-write
35
+alias global f find
36
+alias global c connect-terminal
22 37
 
23 38
 face global LineNumbersWrapped black
24 39
 
@@ -28,31 +43,38 @@ addhl global/ regex '\h+$' 0:default,red
28 43
 addhl global/ regex \b(TODO|FIXME|XXX|NOTE)\b 0:default+rb
29 44
 addhl global/ show-matching
30 45
 addhl global/ wrap -word -indent -marker ''
31
-addhl global/ dynregex '%reg{/}' 0:+u
32 46
 addhl global/ dynregex '%opt{curword}' 0:+b
33 47
 
34 48
 # Keybinds
49
+
35 50
 map global normal <space> ,
36 51
 map global normal -docstring 'remove all sels except main' <backspace> <space>
37 52
 map global normal -docstring 'remove main sel' <a-backspace> <a-space>
38 53
 map global normal -docstring 'comment line' '#' ': comment-line<ret>'
39 54
 map global normal -docstring 'comment block' '<a-#>' ': comment-block<ret>'
40 55
 map global normal -docstring 'delete to end of line' D <a-l>d
41
-map global normal -docstring 'yank to end of line' Y <a-l>y
56
+map global normal -docstring 'yank to end of line' Y <a-l>
42 57
 
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>'
58
+map global user -docstring 'add phantom selection' f ': phantom-sel-add-selection<ret>'
59
+map global user -docstring 'clear all phantom selections' <a-f> ': phantom-sel-select-all<ret>: phantom-sel-clear<ret>'
60
+map global user -docstring 'next phantom selection' F ': phantom-sel-iterate-next<ret>'
61
+map global user -docstring 'previous phantom selection' <a-F> ': phantom-sel-iterate-prev<ret>'
47 62
 
48 63
 map global normal -docstring 'select view' <a-%> ': select-view<ret>'
49 64
 map global view   -docstring 'select view' s '<esc>: select-view<ret>'
50 65
 
51
-map global user -docstring "add mark" m ': mark-word<ret>'
52
-map global user -docstring "clear marks" M ': mark-clear<ret>'
66
+map global user -docstring 'select selection on each line' s ': keep-selection-each-line<ret>'
67
+map global user -docstring 'drop selection on each line' S ': drop-selection-each-line<ret>'
68
+
69
+map global user -docstring 'add mark' m ': mark-word<ret>'
70
+map global user -docstring 'clear marks' M ': mark-clear<ret>'
71
+
72
+map global user -docstring 'replace mode' r ': replace<ret>'
73
+
74
+map global normal <a-space> ': fzf-mode<ret>'
53 75
 
54
-map global user -docstring "expand selection" e ': expand<ret>'
55
-map global user -docstring "expand repeat" E ': expand-repeat<ret>'
76
+map global user -docstring 'expand selection' e ': expand<ret>'
77
+map global user -docstring 'expand repeat' E ': expand-repeat<ret>'
56 78
 
57 79
 map global normal Y ': yank-ring<ret>'
58 80
 map global normal <c-p> ': yank-ring<ret><c-p>'
@@ -62,7 +84,7 @@ map global user -docstring 'buffers…' b ': enter-buffers-mode<ret>'
62 84
 map global user -docstring 'buffers (lock)…' B ': enter-user-mode -lock buffers<ret>'
63 85
 
64 86
 declare-user-mode surround
65
-map global user -docstring "surround mode" s ': enter-user-mode surround<ret>'
87
+map global user -docstring 'surround mode' <a-s> ': enter-user-mode surround<ret>'
66 88
 map global surround -docstring 'surround' s ': surround<ret>'
67 89
 map global surround -docstring 'change' c ': change-surround<ret>'
68 90
 map global surround -docstring 'delete' d ': delete-surround<ret>'
@@ -78,10 +100,13 @@ map global anchor -docstring 'ensure anchor after cursor' h '<a-:><a-;>'
78 100
 map global anchor -docstring 'ensure cursor after anchor' l '<a-:>'
79 101
 map global anchor -docstring 'select cursor and anchor' s '<a-S>'
80 102
 
81
-map global user -docstring "clip-paste after" p '<a-!>xsel -b -o<ret>'
82
-map global user -docstring "clip-paste before" P '!xsel -b -o<ret>'
83
-map global user -docstring "clip-paste replace" R '|xsel -b -o<ret>'
84
-map global user -docstring "clip-yank" y '<a-|>xclip -i -f -sel c<ret>'
103
+declare-user-mode clipboard
104
+map global normal ',' ': enter-user-mode clipboard<ret>'
105
+map global clipboard -docstring 'clip-paste after' p '<a-!>xsel -b -o<ret>'
106
+map global clipboard -docstring 'clip-paste before' P '!xsel -b -o<ret>'
107
+map global clipboard -docstring 'clip-paste replace' R '|xsel -b -o<ret>'
108
+map global clipboard -docstring 'clip-yank' y '<a-|>xclip -i -f -sel c<ret>'
109
+map global clipboard -docstring 'clip-cut -> insert mode' c '<a-|>xclip -i -f -sel c<ret><a-c>'
85 110
 
86 111
 map global user -docstring "next error" l ': lint-next-error<ret>'
87 112
 map global user -docstring "previous error" L ': lint-previous-error<ret>'
@@ -99,14 +124,18 @@ def toggle-highlighter -params .. -docstring 'Toggle highlighter' %{
99 124
 
100 125
 def lint-on-write -docstring 'Activate linting on buffer write' %{
101 126
     lint-enable
102
-    hook buffer BufWritePost .* %{ lint }
127
+    hook buffer BufWritePost .* lint
128
+}
129
+
130
+def format-on-write -docstring 'Format buffer on write' %{
131
+    hook buffer BufWritePost .* format
103 132
 }
104 133
 
105 134
 def lsp-engage -docstring 'Enable language server' %{
106 135
     lsp-enable
107 136
     lsp-auto-hover-enable
108
-    map global user -docstring "Enter lsp user mode" l ': enter-user-mode lsp<ret>'
109
-    map global user -docstring "Lock lsp user mode" L ': enter-user-mode -lock lsp<ret>'
137
+    map global user -docstring 'Enter lsp user mode' l ': enter-user-mode lsp<ret>'
138
+    map global user -docstring 'Lock lsp user mode' L ': enter-user-mode -lock lsp<ret>'
110 139
 }
111 140
 
112 141
 def no-tabs -params 0..1 -docstring 'Indent with spaces' %{
@@ -115,7 +144,7 @@ def no-tabs -params 0..1 -docstring 'Indent with spaces' %{
115 144
         set buffer tabstop $1
116 145
         set buffer softtabstop $1
117 146
     " }
118
-    exec :expandtab<ret>
147
+    expandtab
119 148
     hook buffer InsertKey <space> %{ try %{
120 149
         exec -draft h<a-i><space><a-k>^\h+<ret>
121 150
         exec -with-hooks <tab>
@@ -127,21 +156,22 @@ def clean-trailing-whitespace -docstring 'Remove trailing whitespace' %{
127 156
 }
128 157
 
129 158
 # Hooks
130
-hook global WinDisplay .* info-buffers
131
-hook global WinCreate .* auto-pairs-enable
159
+
132 160
 hook global BufOpenFile .* change-directory-current-buffer
161
+hook global WinDisplay .* info-buffers
162
+hook global NormalIdle .* %{ try %{ exec -draft '<a-i>w: palette-status<ret>' } }
163
+hook global BufWritePost .* %{ git show-diff }
164
+hook global BufReload    .* %{ git show-diff }
133 165
 
134
-hook global NormalIdle .* %{
135
-    try %{ exec -draft '<a-i>w: palette-status<ret>' }
166
+hook global WinCreate .* %{
167
+    auto-pairs-enable
168
+    search-highlighter-enable
136 169
 }
137 170
 
138 171
 hook global BufWritePre .* %{ nop %sh{
139 172
     mkdir -p "$(dirname "$kak_buffile")"
140 173
 }}
141 174
 
142
-hook global BufWritePost .* %{ git show-diff }
143
-hook global BufReload    .* %{ git show-diff }
144
-
145 175
 hook global NormalIdle .* %{
146 176
     eval -draft %{ try %{
147 177
         exec <space><a-i>w <a-k>\A\w+\z<ret>
@@ -152,6 +182,7 @@ hook global NormalIdle .* %{
152 182
 }
153 183
 
154 184
 # Filetype detection
185
+
155 186
 hook global BufCreate .*srcpkgs/.+/template$ %{
156 187
     set buffer filetype sh
157 188
     def xgensum %{ %sh{ xgensum -i "$kak_buffile" } }
@@ -163,6 +194,7 @@ hook global BufCreate .*\.cs %{ addhl window/java }
163 194
 hook global BufCreate .*\.rasi %{ set buffer filetype css }
164 195
 
165 196
 # Filetype settings
197
+
166 198
 hook global WinSetOption filetype=sh %{
167 199
     set buffer lintcmd 'shellcheck -x -fgcc'
168 200
     lint-on-write
@@ -172,15 +204,17 @@ hook global WinSetOption filetype=elvish %{
172 204
     no-tabs 2
173 205
 }
174 206
 
175
-hook global WinSetOption filetype=python %{
207
+hook global WinSetOption filetype=(go|rust|python) %{
176 208
     lsp-engage
177 209
     hook window BufWritePre .* lsp-formatting-sync
178 210
 }
179 211
 
180 212
 hook global WinSetOption filetype=nim %{
181 213
     set buffer gdb_program 'nim-gdb'
182
-    no-tabs 2
214
+    set buffer formatcmd "nimpretty ${kak_buffile}"
183 215
     # set buffer lintcmd "sh -c 'cp -f $0 $0.nim;nim --stdout --colors:off --hints:off --path:$(dirname ${kak_buffile}) check $0 | sed \"s/(/:/;s/, /:/;s/)/:/\" | sed \":a;N;/\n[buf.nim]/!s/\n//;ta;P;D\"'"
184 216
     # set buffer lintcmd "sh -c 'nim --stdout --hints:off check $0 | sed \'s/(/:/;s/, /:/;s/)/:/\''"
185 217
     # lint-on-write
218
+    # format-on-write
219
+    no-tabs 2
186 220
 }

+ 16
- 5
mpv/mpv.conf View File

@@ -1,11 +1,22 @@
1
+term-osd-bar
1 2
 msg-module
2 3
 msg-color
3 4
 
4 5
 # Video
5 6
 profile=gpu-hq
6
-
7
-# Track Selection
8
-# audio settings
7
+scale=ewa_lanczossharp
8
+cscale=ewa_lanczossharp
9
+glsl-shaders="~~/shaders/KrigBilateral.glsl"
10
+glsl-shaders="~~/shaders/FSRCNNX_x2_8-0-4-1.glsl"
11
+
12
+# video-sync=display-resample
13
+# interpolation=yes
14
+# tscale=box
15
+# tscale-window=sphinx
16
+# tscale-radius=1.0
17
+# tscale-clamp=0.0
18
+
19
+# Audio
9 20
 alang=en,eng,English
10 21
 
11 22
 # Subtitles
@@ -32,7 +43,7 @@ loop-file=inf
32 43
 loop-file=inf
33 44
 
34 45
 [extension.jpg]
35
-loop-file=inf
46
+pause
36 47
 
37 48
 [extension.png]
38
-loop-file=inf
49
+pause

+ 2
- 2
ntr/templates/dunst View File

@@ -19,7 +19,7 @@ idle_threshold = 120
19 19
 
20 20
 ### Text ###
21 21
 
22
-font = Inter 9
22
+font = Sarasa UI J 9
23 23
 line_height = 0
24 24
 markup = full
25 25
 
@@ -45,7 +45,7 @@ show_indicators = yes
45 45
 
46 46
 icon_position = left
47 47
 max_icon_size = 32
48
-icon_path = /usr/share/icons/Papirus/32x32/status/:/usr/share/icons/Papirus/32x32/devices/:/usr/share/icons/Papirus/32x32/apps/:/usr/share/icons/Papirus/32x32/actions
48
+icon_path = /usr/share/icons/Paper/32x32/status/:/usr/share/icons/Paper/32x32/devices/:/usr/share/icons/Paper/32x32/apps/:/usr/share/icons/Paper/32x32/actions
49 49
 
50 50
 ### History ###
51 51
 

+ 3
- 4
ntr/templates/polybar View File

@@ -22,10 +22,9 @@ module-margin = 1
22 22
 modules-left = bspwm xwindow
23 23
 modules-center = mpd
24 24
 modules-right = github wlan memory cpu temperature date
25
-font-0 = Inter:pixelsize=9;3
26
-font-1 = Sarasa UI J:size=10;2
27
-font-2 = Siji;3
28
-font-3 = forkawesome:pixelsize=10;4
25
+font-0 = Sarasa UI J:size=10;2
26
+font-1 = Siji;3
27
+font-2 = forkawesome:pixelsize=10;4
29 28
 background = ${color.background}
30 29
 foreground = ${color.foreground}
31 30
 border-size = 1

+ 4
- 3
profile View File

@@ -5,12 +5,13 @@ 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
8
-GOPATH=$HOME/.go
8
+GOPATH=$XDG_DATA_HOME/go
9
+CARGO_HOME=$XDG_DATA_HOME/cargo
9 10
 
10 11
 mkdir -p $XDG_RUNTIME_DIR
11 12
 
12 13
 # Override system variables
13
-PATH=$HOME/.local/bin:$DOTS_DIR/bin:$HOME/.nimble/bin:$HOME/.cargo/bin:$GOPATH/bin:$PATH
14
+PATH=$HOME/.local/bin:$DOTS_DIR/bin:$HOME/.nimble/bin:$CARGO_HOME/bin:$GOPATH/bin:$PATH
14 15
 
15 16
 GPG_TTY=$(tty)
16 17
 TERMINAL='kitty -1'
@@ -35,7 +36,7 @@ export \
35 36
  XDG_DATA_HOME XDG_RUNTIME_DIR XDG_CACHE_HOME XDG_CONFIG_HOME XDG_RUNTIME_DIR \
36 37
  XBPS_DISTDIR DOTS_DIR GTK2_RC_FILES LESSHISTFILE TERMINAL EDITOR VISUAL \
37 38
  PAGER MANPAGER GPG_TTY GPG_AGENT_INFO GNUPGHOME QT_QPA_PLATFORMTHEME \
38
- _JAVA_AWT_WM_NONREPARENTING _JAVA_OPTIONS
39
+ _JAVA_AWT_WM_NONREPARENTING _JAVA_OPTIONS GOPATH CARGO_HOME
39 40
 
40 41
 # Init sharable {ssh,gpg}-agent
41 42
 if [ -z "$SSH_AUTH_SOCK" ]; then

+ 16
- 17
splug.toml View File

@@ -3,8 +3,10 @@
3 3
 ["https://github.com/alexherbo2/auto-pairs.kak"]
4 4
 files = ["rc/auto-pairs.kak"]
5 5
 
6
-["https://github.com/alexherbo2/select.kak"]
7
-files = ["rc/select.kak"]
6
+["https://github.com/alexherbo2/connect.kak"]
7
+
8
+["https://github.com/alexherbo2/search-highlighter.kak"]
9
+files = ["rc/search-highlighter.kak"]
8 10
 
9 11
 ["https://github.com/alexherbo2/yank-ring.kak"]
10 12
 files = ["rc/yank-ring.kak"]
@@ -13,7 +15,7 @@ files = ["rc/yank-ring.kak"]
13 15
 files = ["mark.kak"]
14 16
 
15 17
 ["https://github.com/lenormf/kakoune-extra"]
16
-files = ["widgets/git-branch.kak", "alignr.kak", "readline.kak", "vcs.kak"]
18
+files = ["widgets/git-branch.kak", "readline.kak", "vcs.kak"]
17 19
 
18 20
 ["https://github.com/Delapouite/kakoune-auto-percent"]
19 21
 files = ["auto-percent.kak"]
@@ -39,10 +41,6 @@ files = ["each-line-selection.kak"]
39 41
 ["https://github.com/h-youhei/kakoune-surround"]
40 42
 files = ["surround.kak"]
41 43
 
42
-["https://github.com/eraserhd/kak-ansi"]
43
-branch = "develop"
44
-files = ["rc/ansi.kak"]
45
-
46 44
 ["https://github.com/occivink/kakoune-expand"]
47 45
 files = ["expand.kak"]
48 46
 
@@ -55,9 +53,6 @@ files = ["find.kak"]
55 53
 ["https://github.com/occivink/kakoune-gdb"]
56 54
 files = ["gdb.kak"]
57 55
 
58
-["https://github.com/occivink/kakoune-snippets"]
59
-files = ["snippets.kak"]
60
-
61 56
 ["https://github.com/occivink/kakoune-vertical-selection"]
62 57
 files = ["vertical-selection.kak"]
63 58
 
@@ -73,17 +68,16 @@ files = ["rc/edit-or-dir.kak"]
73 68
 ["https://github.com/andreyorst/smarttab.kak"]
74 69
 files = ["rc/smarttab.kak"]
75 70
 
71
+["https://github.com/andreyorst/tagbar.kak"]
72
+files = ["rc/tagbar.kak"]
73
+
74
+["https://github.com/andreyorst/fzf.kak"]
75
+
76 76
 # mpv plugins
77 77
 
78 78
 ["https://github.com/ElegantMonkey/mpv-webm"]
79 79
 files = ["build/webm.lua"]
80 80
 
81
-["https://github.com/jgreco/mpv-scripts"]
82
-files = ["fastforward.lua"]
83
-
84
-["https://github.com/jonniek/mpv-filenavigator"]
85
-files = ["navigator.lua"]
86
-
87 81
 ["https://github.com/kevinlekiller/mpv_scripts"]
88 82
 files = ["perfstats/perfstats.lua"]
89 83
 
@@ -93,5 +87,10 @@ files = ["TOOLS/lua/autoload.lua"]
93 87
 ["https://github.com/nimatrueway/mpv-locatefile-lua-script"]
94 88
 files = ["locatefile.lua"]
95 89
 
90
+["https://github.com/rossy/mpv-repl"]
91
+files = ["repl.lua"]
92
+
93
+["https://github.com/mfcc64/mpv-scripts"]
94
+files = ["visualizer.lua"]
95
+
96 96
 ["https://github.com/occivink/mpv-scripts"]
97
-#files = [""]

+ 4
- 1
sx.sh View File

@@ -7,7 +7,10 @@ mpd &
7 7
 dunst &
8 8
 perWindowLayoutD &
9 9
 disown sxhkd &
10
-disown devmon &
10
+disown devmon -s \
11
+	--exec-on-drive 'notify-send -a udevil -i media-removable "$l" "$f mounted at $d"' \
12
+	--exec-on-unmount 'notify-send -a udevil -i media-removable "$l" "$f unmounted from $d"' \
13
+	--exec-on-removed 'notify-send -a udevil -i media-removable "$l" "$f removed from $d"' &
11 14
 disown syncthing -no-browser &
12 15
 disown polybar -q main &
13 16
 exec bspwm

Loading…
Cancel
Save