Browse Source

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

master
SolitudeSF 8 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 @@
gtk-theme-name="vimix-dark-ruby"
gtk-icon-theme-name="Paper"
gtk-font-name="Inter 10"
gtk-font-name="Sarasa UI J 10"
gtk-cursor-theme-name="Paper"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_ICONS

+ 1
- 1
gtk/settings.ini View File

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

+ 67
- 33
kak/kakrc View File

@@ -1,24 +1,39 @@
# Merge and manually source plugins
# Manually merge and source plugins
eval %sh{
cat $(find "$kak_config/autosource" -name '*\.kak')
kak-lsp --kakoune -s $kak_session
}

# Initialization

decl -hidden regex curword
decl str termcmd 'kitty -1 sh -c'

set global ui_options ncurses_assistant=none
set global scrolloff 7,7
set global autoreload yes
set global kitty_window_type os
set global termcmd 'kitty -1 sh -c'
set global grepcmd 'rg -iHL --column'
set global modelinefmt '%opt{modeline_git_branch} %val{bufname}
%val{cursor_line}:%val{cursor_char_column} {{mode_info}} {{context_info}}
◂%val{client}⊙%val{session}▸'
# set global modelinefmt '%opt{modeline_git_branch} %val{bufname}
# %val{cursor_line}:%val{cursor_char_column} {{mode_info}} {{context_info}}
# ◂%val{client}⊙%val{session}▸'

set global connect_source "%val{config}/autosource/splug"
set global connect_shell elvish
set global fzf_implementation sk
set global fzf_file_command fd
set global fzf_highlighter bat

unalias global e edit
alias global e edit-or-dir
alias global bd delete-buffer
alias global bf buffer-first
alias global bl buffer-last
alias global bo buffer-only
alias global bo! buffer-only-force
alias global sw sudo-write
alias global f find
alias global c connect-terminal

face global LineNumbersWrapped black

@@ -28,31 +43,38 @@ addhl global/ regex '\h+$' 0:default,red
addhl global/ regex \b(TODO|FIXME|XXX|NOTE)\b 0:default+rb
addhl global/ show-matching
addhl global/ wrap -word -indent -marker ''
addhl global/ dynregex '%reg{/}' 0:+u
addhl global/ dynregex '%opt{curword}' 0:+b

# Keybinds

map global normal <space> ,
map global normal -docstring 'remove all sels except main' <backspace> <space>
map global normal -docstring 'remove main sel' <a-backspace> <a-space>
map global normal -docstring 'comment line' '#' ': comment-line<ret>'
map global normal -docstring 'comment block' '<a-#>' ': comment-block<ret>'
map global normal -docstring 'delete to end of line' D <a-l>d
map global normal -docstring 'yank to end of line' Y <a-l>y
map global normal -docstring 'yank to end of line' Y <a-l>

map global user -docstring "add phantom selection" f ': phantom-sel-add-selection<ret>'
map global user -docstring "clear all phantom selections" <a-f> ': phantom-sel-select-all<ret>: phantom-sel-clear<ret>'
map global user -docstring "next phantom selection" F ': phantom-sel-iterate-next<ret>'
map global user -docstring "previous phantom selection" <a-F> ': phantom-sel-iterate-prev<ret>'
map global user -docstring 'add phantom selection' f ': phantom-sel-add-selection<ret>'
map global user -docstring 'clear all phantom selections' <a-f> ': phantom-sel-select-all<ret>: phantom-sel-clear<ret>'
map global user -docstring 'next phantom selection' F ': phantom-sel-iterate-next<ret>'
map global user -docstring 'previous phantom selection' <a-F> ': phantom-sel-iterate-prev<ret>'

map global normal -docstring 'select view' <a-%> ': select-view<ret>'
map global view -docstring 'select view' s '<esc>: select-view<ret>'

map global user -docstring "add mark" m ': mark-word<ret>'
map global user -docstring "clear marks" M ': mark-clear<ret>'
map global user -docstring 'select selection on each line' s ': keep-selection-each-line<ret>'
map global user -docstring 'drop selection on each line' S ': drop-selection-each-line<ret>'

map global user -docstring 'add mark' m ': mark-word<ret>'
map global user -docstring 'clear marks' M ': mark-clear<ret>'

map global user -docstring 'replace mode' r ': replace<ret>'

map global normal <a-space> ': fzf-mode<ret>'

map global user -docstring "expand selection" e ': expand<ret>'
map global user -docstring "expand repeat" E ': expand-repeat<ret>'
map global user -docstring 'expand selection' e ': expand<ret>'
map global user -docstring 'expand repeat' E ': expand-repeat<ret>'

map global normal Y ': yank-ring<ret>'
map global normal <c-p> ': yank-ring<ret><c-p>'
@@ -62,7 +84,7 @@ map global user -docstring 'buffers…' b ': enter-buffers-mode<ret>'
map global user -docstring 'buffers (lock)…' B ': enter-user-mode -lock buffers<ret>'

declare-user-mode surround
map global user -docstring "surround mode" s ': enter-user-mode surround<ret>'
map global user -docstring 'surround mode' <a-s> ': enter-user-mode surround<ret>'
map global surround -docstring 'surround' s ': surround<ret>'
map global surround -docstring 'change' c ': change-surround<ret>'
map global surround -docstring 'delete' d ': delete-surround<ret>'
@@ -78,10 +100,13 @@ map global anchor -docstring 'ensure anchor after cursor' h '<a-:><a-;>'
map global anchor -docstring 'ensure cursor after anchor' l '<a-:>'
map global anchor -docstring 'select cursor and anchor' s '<a-S>'

map global user -docstring "clip-paste after" p '<a-!>xsel -b -o<ret>'
map global user -docstring "clip-paste before" P '!xsel -b -o<ret>'
map global user -docstring "clip-paste replace" R '|xsel -b -o<ret>'
map global user -docstring "clip-yank" y '<a-|>xclip -i -f -sel c<ret>'
declare-user-mode clipboard
map global normal ',' ': enter-user-mode clipboard<ret>'
map global clipboard -docstring 'clip-paste after' p '<a-!>xsel -b -o<ret>'
map global clipboard -docstring 'clip-paste before' P '!xsel -b -o<ret>'
map global clipboard -docstring 'clip-paste replace' R '|xsel -b -o<ret>'
map global clipboard -docstring 'clip-yank' y '<a-|>xclip -i -f -sel c<ret>'
map global clipboard -docstring 'clip-cut -> insert mode' c '<a-|>xclip -i -f -sel c<ret><a-c>'

map global user -docstring "next error" l ': lint-next-error<ret>'
map global user -docstring "previous error" L ': lint-previous-error<ret>'
@@ -99,14 +124,18 @@ def toggle-highlighter -params .. -docstring 'Toggle highlighter' %{

def lint-on-write -docstring 'Activate linting on buffer write' %{
lint-enable
hook buffer BufWritePost .* %{ lint }
hook buffer BufWritePost .* lint
}

def format-on-write -docstring 'Format buffer on write' %{
hook buffer BufWritePost .* format
}

def lsp-engage -docstring 'Enable language server' %{
lsp-enable
lsp-auto-hover-enable
map global user -docstring "Enter lsp user mode" l ': enter-user-mode lsp<ret>'
map global user -docstring "Lock lsp user mode" L ': enter-user-mode -lock lsp<ret>'
map global user -docstring 'Enter lsp user mode' l ': enter-user-mode lsp<ret>'
map global user -docstring 'Lock lsp user mode' L ': enter-user-mode -lock lsp<ret>'
}

def no-tabs -params 0..1 -docstring 'Indent with spaces' %{
@@ -115,7 +144,7 @@ def no-tabs -params 0..1 -docstring 'Indent with spaces' %{
set buffer tabstop $1
set buffer softtabstop $1
" }
exec :expandtab<ret>
expandtab
hook buffer InsertKey <space> %{ try %{
exec -draft h<a-i><space><a-k>^\h+<ret>
exec -with-hooks <tab>
@@ -127,21 +156,22 @@ def clean-trailing-whitespace -docstring 'Remove trailing whitespace' %{
}

# Hooks
hook global WinDisplay .* info-buffers
hook global WinCreate .* auto-pairs-enable

hook global BufOpenFile .* change-directory-current-buffer
hook global WinDisplay .* info-buffers
hook global NormalIdle .* %{ try %{ exec -draft '<a-i>w: palette-status<ret>' } }
hook global BufWritePost .* %{ git show-diff }
hook global BufReload .* %{ git show-diff }

hook global NormalIdle .* %{
try %{ exec -draft '<a-i>w: palette-status<ret>' }
hook global WinCreate .* %{
auto-pairs-enable
search-highlighter-enable
}

hook global BufWritePre .* %{ nop %sh{
mkdir -p "$(dirname "$kak_buffile")"
}}

hook global BufWritePost .* %{ git show-diff }
hook global BufReload .* %{ git show-diff }

hook global NormalIdle .* %{
eval -draft %{ try %{
exec <space><a-i>w <a-k>\A\w+\z<ret>
@@ -152,6 +182,7 @@ hook global NormalIdle .* %{
}

# Filetype detection

hook global BufCreate .*srcpkgs/.+/template$ %{
set buffer filetype sh
def xgensum %{ %sh{ xgensum -i "$kak_buffile" } }
@@ -163,6 +194,7 @@ hook global BufCreate .*\.cs %{ addhl window/java }
hook global BufCreate .*\.rasi %{ set buffer filetype css }

# Filetype settings

hook global WinSetOption filetype=sh %{
set buffer lintcmd 'shellcheck -x -fgcc'
lint-on-write
@@ -172,15 +204,17 @@ hook global WinSetOption filetype=elvish %{
no-tabs 2
}

hook global WinSetOption filetype=python %{
hook global WinSetOption filetype=(go|rust|python) %{
lsp-engage
hook window BufWritePre .* lsp-formatting-sync
}

hook global WinSetOption filetype=nim %{
set buffer gdb_program 'nim-gdb'
no-tabs 2
set buffer formatcmd "nimpretty ${kak_buffile}"
# 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\"'"
# set buffer lintcmd "sh -c 'nim --stdout --hints:off check $0 | sed \'s/(/:/;s/, /:/;s/)/:/\''"
# lint-on-write
# format-on-write
no-tabs 2
}

+ 16
- 5
mpv/mpv.conf View File

@@ -1,11 +1,22 @@
term-osd-bar
msg-module
msg-color

# Video
profile=gpu-hq

# Track Selection
# audio settings
scale=ewa_lanczossharp
cscale=ewa_lanczossharp
glsl-shaders="~~/shaders/KrigBilateral.glsl"
glsl-shaders="~~/shaders/FSRCNNX_x2_8-0-4-1.glsl"

# video-sync=display-resample
# interpolation=yes
# tscale=box
# tscale-window=sphinx
# tscale-radius=1.0
# tscale-clamp=0.0

# Audio
alang=en,eng,English

# Subtitles
@@ -32,7 +43,7 @@ loop-file=inf
loop-file=inf

[extension.jpg]
loop-file=inf
pause

[extension.png]
loop-file=inf
pause

+ 2
- 2
ntr/templates/dunst View File

@@ -19,7 +19,7 @@ idle_threshold = 120

### Text ###

font = Inter 9
font = Sarasa UI J 9
line_height = 0
markup = full

@@ -45,7 +45,7 @@ show_indicators = yes

icon_position = left
max_icon_size = 32
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
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

### History ###


+ 3
- 4
ntr/templates/polybar View File

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

+ 4
- 3
profile View File

@@ -5,12 +5,13 @@ XDG_CONFIG_HOME=$HOME/.local/etc
XDG_RUNTIME_DIR=/tmp/runtime-$USER
XBPS_DISTDIR=$HOME/git/void-packages
DOTS_DIR=$HOME/dot
GOPATH=$HOME/.go
GOPATH=$XDG_DATA_HOME/go
CARGO_HOME=$XDG_DATA_HOME/cargo

mkdir -p $XDG_RUNTIME_DIR

# Override system variables
PATH=$HOME/.local/bin:$DOTS_DIR/bin:$HOME/.nimble/bin:$HOME/.cargo/bin:$GOPATH/bin:$PATH
PATH=$HOME/.local/bin:$DOTS_DIR/bin:$HOME/.nimble/bin:$CARGO_HOME/bin:$GOPATH/bin:$PATH

GPG_TTY=$(tty)
TERMINAL='kitty -1'
@@ -35,7 +36,7 @@ export \
XDG_DATA_HOME XDG_RUNTIME_DIR XDG_CACHE_HOME XDG_CONFIG_HOME XDG_RUNTIME_DIR \
XBPS_DISTDIR DOTS_DIR GTK2_RC_FILES LESSHISTFILE TERMINAL EDITOR VISUAL \
PAGER MANPAGER GPG_TTY GPG_AGENT_INFO GNUPGHOME QT_QPA_PLATFORMTHEME \
_JAVA_AWT_WM_NONREPARENTING _JAVA_OPTIONS
_JAVA_AWT_WM_NONREPARENTING _JAVA_OPTIONS GOPATH CARGO_HOME

# Init sharable {ssh,gpg}-agent
if [ -z "$SSH_AUTH_SOCK" ]; then

+ 16
- 17
splug.toml View File

@@ -3,8 +3,10 @@
["https://github.com/alexherbo2/auto-pairs.kak"]
files = ["rc/auto-pairs.kak"]

["https://github.com/alexherbo2/select.kak"]
files = ["rc/select.kak"]
["https://github.com/alexherbo2/connect.kak"]

["https://github.com/alexherbo2/search-highlighter.kak"]
files = ["rc/search-highlighter.kak"]

["https://github.com/alexherbo2/yank-ring.kak"]
files = ["rc/yank-ring.kak"]
@@ -13,7 +15,7 @@ files = ["rc/yank-ring.kak"]
files = ["mark.kak"]

["https://github.com/lenormf/kakoune-extra"]
files = ["widgets/git-branch.kak", "alignr.kak", "readline.kak", "vcs.kak"]
files = ["widgets/git-branch.kak", "readline.kak", "vcs.kak"]

["https://github.com/Delapouite/kakoune-auto-percent"]
files = ["auto-percent.kak"]
@@ -39,10 +41,6 @@ files = ["each-line-selection.kak"]
["https://github.com/h-youhei/kakoune-surround"]
files = ["surround.kak"]

["https://github.com/eraserhd/kak-ansi"]
branch = "develop"
files = ["rc/ansi.kak"]

["https://github.com/occivink/kakoune-expand"]
files = ["expand.kak"]

@@ -55,9 +53,6 @@ files = ["find.kak"]
["https://github.com/occivink/kakoune-gdb"]
files = ["gdb.kak"]

["https://github.com/occivink/kakoune-snippets"]
files = ["snippets.kak"]

["https://github.com/occivink/kakoune-vertical-selection"]
files = ["vertical-selection.kak"]

@@ -73,17 +68,16 @@ files = ["rc/edit-or-dir.kak"]
["https://github.com/andreyorst/smarttab.kak"]
files = ["rc/smarttab.kak"]

["https://github.com/andreyorst/tagbar.kak"]
files = ["rc/tagbar.kak"]

["https://github.com/andreyorst/fzf.kak"]

# mpv plugins

["https://github.com/ElegantMonkey/mpv-webm"]
files = ["build/webm.lua"]

["https://github.com/jgreco/mpv-scripts"]
files = ["fastforward.lua"]

["https://github.com/jonniek/mpv-filenavigator"]
files = ["navigator.lua"]

["https://github.com/kevinlekiller/mpv_scripts"]
files = ["perfstats/perfstats.lua"]

@@ -93,5 +87,10 @@ files = ["TOOLS/lua/autoload.lua"]
["https://github.com/nimatrueway/mpv-locatefile-lua-script"]
files = ["locatefile.lua"]

["https://github.com/rossy/mpv-repl"]
files = ["repl.lua"]

["https://github.com/mfcc64/mpv-scripts"]
files = ["visualizer.lua"]

["https://github.com/occivink/mpv-scripts"]
#files = [""]

+ 4
- 1
sx.sh View File

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

Loading…
Cancel
Save