Compare commits

..
3 Commits
Author SHA1 Message Date
Lukasz Pankowski a6e37c95d7 kakoune: keys to comment block and line 2026-07-11 15:09:29 +02:00
Lukasz Pankowski b9ed91ed57 waybar: restart on theme change 2026-07-11 12:19:42 +02:00
Lukasz Pankowski bc41c5ff77 mango config with waybar 2026-07-11 12:19:42 +02:00
16 changed files with 31 additions and 264 deletions
@@ -1,34 +0,0 @@
# gotmpl
[grammar.gotmpl.source.git]
url = "https://github.com/ngalaiko/tree-sitter-go-template"
pin = "aa71f63de226c5592dfbfc1f29949522d7c95fac"
[language.gotmpl.queries.source.git]
url = "https://github.com/helix-editor/helix"
pin = "7275b7f85014aad7e15d4987ec4f2249572eecfb"
# odin
[grammar.odin.source.git]
url = "https://github.com/tree-sitter-grammars/tree-sitter-odin"
pin = "d2ca8efb4487e156a60d5bd6db2598b872629403"
[grammar.odin]
compile_args = ["-c", "-fpic", "../scanner.c", "../parser.c", "-I", ".."]
link_args = ["-shared", "-fpic", "scanner.o", "parser.o", "-o", "odin.so"]
[language.odin.queries.source.git]
url = "https://github.com/helix-editor/helix"
pin = "7275b7f85014aad7e15d4987ec4f2249572eecfb"
# templ
[grammar.templ.source.git]
url = "https://github.com/vrischmann/tree-sitter-templ"
pin = "04bae7c82de2fcfec94254fef50f5f1c5924f5f5"
[grammar.templ]
compile_args = ["-c", "-fpic", "../scanner.c", "../parser.c", "-I", ".."]
link_args = ["-shared", "-fpic", "scanner.o", "parser.o", "-o", "templ.so"]
[language.templ.queries.source.git]
url = "https://github.com/helix-editor/helix"
pin = "7275b7f85014aad7e15d4987ec4f2249572eecfb"
@@ -121,55 +121,5 @@ evaluate-commands %sh{
set-face global SnippetsNextPlaceholders $bg,$green2 set-face global SnippetsNextPlaceholders $bg,$green2
set-face global SnippetsOtherPlaceholders $bg,$yellow2 set-face global SnippetsOtherPlaceholders $bg,$yellow2
# kak-tree-sitter
set-face global ts_attribute $green3
set-face global ts_comment $gray
set-face global ts_constant $violet2
set-face global ts_conceal $red1
set-face global ts_constructor $red1
set-face global ts_diff_plus $green2
set-face global ts_diff_minus $red2
set-face global ts_diff_delta $blue2
set-face global ts_error $red2
set-face global ts_function $blue2
set-face global ts_hint $green2
set-face global ts_info $blue2
set-face global ts_keyword $violet3
set-face global ts_label $red1
set-face global ts_bold $green2+b
set-face global ts_markup_heading $red3
set-face global ts_markup_italic $green2+i
set-face global ts_markup_list_checked $red2
set-face global ts_markup_list_numbered $red2
set-face global ts_markup_list_unchecked $red2
set-face global ts_markup_list_unnumbered $red2
set-face global ts_markup_link_label $green2
set-face global ts_markup_link_url $blue2
set-face global ts_markup_link_uri $blue2
set-face global ts_markup_link_text $red1
set-face global ts_markup_quote $blue3
set-face global ts_markup_raw $yellow2
set-face global ts_markup_strikethrough $red2+s
set-face global ts_namespace $green3
set-face global ts_operator $red2
set-face global ts_property $green3
set-face global ts_punctuation $red3
set-face global ts_special $red3
set-face global ts_spell $red1+c
set-face global ts_string $yellow2
set-face global ts_string_regex $yellow1+b
set-face global ts_string_regexp $yellow1+b
set-face global ts_string_escape $yellow1+b
set-face global ts_string_special $yellow1+b
set-face global ts_string_symbol $yellow1+b
set-face global ts_tag $green2
set-face global ts_tag_error $red2+c
set-face global ts_text $red1
set-face global ts_text_title $red3
set-face global ts_type $green2
set-face global ts_variable $blue3
set-face global ts_warning $yellow2+c
" "
} }
@@ -121,55 +121,5 @@ evaluate-commands %sh{
set-face global SnippetsNextPlaceholders $bg,$green2 set-face global SnippetsNextPlaceholders $bg,$green2
set-face global SnippetsOtherPlaceholders $bg,$yellow2 set-face global SnippetsOtherPlaceholders $bg,$yellow2
# kak-tree-sitter
set-face global ts_attribute $green3
set-face global ts_comment $gray
set-face global ts_constant $violet2
set-face global ts_conceal $red1
set-face global ts_constructor $red1
set-face global ts_diff_plus $green2
set-face global ts_diff_minus $red2
set-face global ts_diff_delta $blue2
set-face global ts_error $red2
set-face global ts_function $blue2
set-face global ts_hint $green2
set-face global ts_info $blue2
set-face global ts_keyword $violet3
set-face global ts_label $red1
set-face global ts_bold $green2+b
set-face global ts_markup_heading $red3
set-face global ts_markup_italic $green2+i
set-face global ts_markup_list_checked $red2
set-face global ts_markup_list_numbered $red2
set-face global ts_markup_list_unchecked $red2
set-face global ts_markup_list_unnumbered $red2
set-face global ts_markup_link_label $green2
set-face global ts_markup_link_url $blue2
set-face global ts_markup_link_uri $blue2
set-face global ts_markup_link_text $red1
set-face global ts_markup_quote $blue3
set-face global ts_markup_raw $yellow2
set-face global ts_markup_strikethrough $red2+s
set-face global ts_namespace $green3
set-face global ts_operator $red2
set-face global ts_property $green3
set-face global ts_punctuation $red3
set-face global ts_special $red3
set-face global ts_spell $red1+c
set-face global ts_string $yellow2
set-face global ts_string_regex $yellow1+b
set-face global ts_string_regexp $yellow1+b
set-face global ts_string_escape $yellow1+b
set-face global ts_string_special $yellow1+b
set-face global ts_string_symbol $yellow1+b
set-face global ts_tag $green2
set-face global ts_tag_error $red2+c
set-face global ts_text $red1
set-face global ts_text_title $red3
set-face global ts_type $green2
set-face global ts_variable $blue3
set-face global ts_warning $yellow2+c
" "
} }
+8 -93
View File
@@ -6,11 +6,7 @@ set-option global ui_options terminal_assistant=none
hook global WinCreate .* %{ hook global WinCreate .* %{
add-highlighter window/number-lines number-lines -relative -hlcursor add-highlighter window/number-lines number-lines -relative -hlcursor
} }
add-highlighter global/ show-matching
hook global BufCreate .*\.templ %{ set buffer filetype templ }
hook global BufCreate .*\.html.tmpl %{ set buffer filetype gotmpl }
hook global WinCreate ^[^*]+$ %{editorconfig-load}
# LOCAL # LOCAL
@@ -38,15 +34,6 @@ map global -docstring 'Grep previous match' file-mode 'p' ': grep-prev-match<ret
map global -docstring 'Grep current file' file-mode 'l' ':grep-file ' map global -docstring 'Grep current file' file-mode 'l' ':grep-file '
map global -docstring 'Grep current file' file-mode 'L' ': grep-file %val{selection}<ret>' map global -docstring 'Grep current file' file-mode 'L' ': grep-file %val{selection}<ret>'
map global -docstring 'Delete buffer' file-mode 'x' ': delete-buffer ' map global -docstring 'Delete buffer' file-mode 'x' ': delete-buffer '
map global -docstring 'REPL send selection' file-mode 'u' ': repl-send-text<ret>'
map global -docstring 'REPL send paragraph' file-mode 'U' ': repl-send-paragraph<ret>'
declare-user-mode fossil-mode
map global -docstring 'Fossil' user 'f' ': enter-user-mode fossil-mode<ret>'
map global -docstring 'Open file' fossil-mode 'a' ': file-open-fossil<ret>'
map global -docstring 'Grep' fossil-mode 'g' ':fossil-grep '
map global -docstring 'ctags project symbols' fossil-mode 'w' ': ctags-project-fossil-symbols<ret>'
declare-user-mode git-mode declare-user-mode git-mode
map global -docstring 'Git' user 'g' ': enter-user-mode git-mode<ret>' map global -docstring 'Git' user 'g' ': enter-user-mode git-mode<ret>'
@@ -87,7 +74,6 @@ map global -docstring 'Code' user 'c' ': enter-user-mode code-mode<ret>'
map global -docstring 'Comment block' code-mode 'b' ': comment-block<ret>' map global -docstring 'Comment block' code-mode 'b' ': comment-block<ret>'
map global -docstring 'Comment line' code-mode 'l' ': comment-line<ret>' map global -docstring 'Comment line' code-mode 'l' ': comment-line<ret>'
map global -docstring 'Format buffer' code-mode 'f' ': format-buffer<ret>'
evaluate-commands %sh{ evaluate-commands %sh{
if [ -n "$WAYLAND_DISPLAY" ]; then if [ -n "$WAYLAND_DISPLAY" ]; then
@@ -121,16 +107,6 @@ define-command -override file-open-git %{
prompt -menu -shell-script-candidates %{ git ls-files } 'File (git): ' %{ edit -- %val{text} } prompt -menu -shell-script-candidates %{ git ls-files } 'File (git): ' %{ edit -- %val{text} }
} }
define-command -override file-open-fossil %{
prompt -menu -shell-script-candidates %{ fossil ls } 'File (fossil): ' %{ edit -- %val{text} }
}
define-command -override fossil-grep -params 1- %{
evaluate-commands %sh{
printf '%s ' grep "$@" -- $(fossil ls)
}
}
define-command -override file-open-recent %{ define-command -override file-open-recent %{
prompt -menu -shell-script-candidates %{ cat ~/.cache/kak-mru } 'File (recent): ' %{ edit -- %val{text} } prompt -menu -shell-script-candidates %{ cat ~/.cache/kak-mru } 'File (recent): ' %{ edit -- %val{text} }
} }
@@ -147,10 +123,6 @@ define-command -override open-create-in-dir %{
execute-keys ': edit ' %sh{dirname "$kak_buffile"}/ execute-keys ': edit ' %sh{dirname "$kak_buffile"}/
} }
define-command -override repl-send-paragraph %{
execute-keys -draft '<a-i>p: repl-send-text<ret>'
}
define-command git-log-show-current-commit %{ define-command git-log-show-current-commit %{
execute-keys ';<a-/>^commit\s[0-9a-f]+<ret>b' execute-keys ';<a-/>^commit\s[0-9a-f]+<ret>b'
git show %val{selection} git show %val{selection}
@@ -182,35 +154,18 @@ define-command -override ctags-project-symbols %{
} }
} }
define-command -override ctags-project-fossil-symbols %{
prompt -menu -shell-script-candidates %{
fossil ls | xargs wc | awk '$1 > 0 && $3/$1 < 1024 { print $4 }' | xargs ctags -uo - -x | awk -f "$kak_config/scripts/projectsymbols.awk"
} 'Project symbols: ' %{
evaluate-commands %sh{ awk -f "$kak_config/scripts/projectsymbolscmd.awk" # "$kak_text" }
}
}
set-face global JumpLabel 'rgb:faf8f5,rgb:af8842+F' set-face global JumpLabel 'rgb:faf8f5,rgb:af8842+F'
# CHANGE CURSOR IN INSERT MODE # CHANGE STATUS BAR COLOR IN INSERT MODE
hook global ModeChange (push|pop):.*:insert %{ hook global ModeChange push:.*:insert %{
set-face window PrimarySelection rgb:000000,green+F set-face window StatusLine 'default,rgb:04785d'
set-face window SecondarySelection rgb:000000,blue+F set-option window idle_timeout 500
set-face window PrimaryCursor rgb:000000,bright-green+bF
set-face window SecondaryCursor rgb:000000,bright-blue+bF
set-face window PrimaryCursorEol rgb:000000,bright-red+bF
set-face window SecondaryCursorEol rgb:000000,bright-yellow+bF
} }
# Undo colour changes when we leave insert mode. hook global ModeChange pop:insert:.* %{
hook global ModeChange (push|pop):insert:.* %{ unset-face window StatusLine
unset-face window PrimarySelection unset-option window idle_timeout
unset-face window SecondarySelection
unset-face window PrimaryCursor
unset-face window SecondaryCursor
unset-face window PrimaryCursorEol
unset-face window SecondaryCursorEol
} }
# ODIN # ODIN
@@ -279,52 +234,12 @@ bundle match 'https://github.com/kmafeni04/match.kak' %{
map global match U ': match-surround-redo<ret>' -docstring "Redo" map global match U ': match-surround-redo<ret>' -docstring "Redo"
} }
# PICKERS
bundle pickers https://codeberg.org/kmafeni04/pickers.kak %{
declare-user-mode pickers
map global user u ':enter-user-mode pickers<ret>' -docstring 'pickers mode'
map global pickers b ':pickers-buffer<ret>' -docstring 'Open fuzzy buffer picker'
map global pickers i ':pickers-buffer-info<ret>' -docstring 'Show currently open buffers'
map global pickers a ':pickers-buffer-alternate<ret>' -docstring 'Switch to previously opened buffer'
map global pickers f ':pickers-file<ret>' -docstring 'Open fuzzy file picker in git root or current working directory'
map global pickers n ':pickers-file /home/lupan/notes/<ret>' -docstring 'Open fuzzy file picker in notes directory'
map global pickers o ':pickers-file-cbd<ret>' -docstring "Open fuzzy file picker in current buffer's directory"
map global pickers g ':pickers-grep<ret>' -docstring "Open grep picker in git root"
map global pickers G "<dquote>/y:pickers-grep<ret>" -docstring "Open grep picker in git root with selection as init"
map global pickers <a-g> ':pickers-grep-cbd<ret>' -docstring "Open grep picker in buffer's directory"
map global pickers <a-G> "<dquote>/y:pickers-grep-cbd<ret>" -docstring "Open grep picker in buffer's directory with selection as init"
hook global WinCreate \*pickers-grep\* %{
map window normal <ret> ':pickers-grep-open<ret>'
map window normal <a-ret> "%%s<ret>)" -docstring "Select all matched grep text"
alias window write pickers-grep-write
alias window w pickers-grep-write
}
hook global WinCreate \*pickers-file\* %{
map window normal <ret> ':pickers-file-open<ret>'
}
hook global WinCreate \*pickers-buffer\* %{
map window normal <ret> ':pickers-buffer-open<ret>'
}
}
# HARPOON # HARPOON
bundle kak-harpoon 'https://codeberg.org/raiguard/kak-harpoon' %{ bundle kak-harpoon 'https://codeberg.org/raiguard/kak-harpoon' %{
harpoon-add-bindings harpoon-add-bindings
} }
# TREE SITTER
eval %sh{ kak-tree-sitter -dks --init $kak_session }
map global -docstring 'Tree-sitter' user 't' ': enter-user-mode tree-sitter<ret>'
define-command -override tree-sitter-user-after-highlighter %{
add-highlighter -override buffer/show-matching show-matching
}
# LOCAL # LOCAL
define-command set-dark-or-light-colorscheme %{ define-command set-dark-or-light-colorscheme %{
+1 -1
View File
@@ -2,7 +2,7 @@
for (i = 3; i < NF; ++i) { for (i = 3; i < NF; ++i) {
if ($i ~ /^[0-9]+$/) { if ($i ~ /^[0-9]+$/) {
j = match($0, "[ ]+" $(i-1) "[ ]+" $i " ") j = match($0, "[ ]+" $(i-1) "[ ]+" $i " ")
print substr($0, 0, j - 1) "·" $(i-1) "·" $i print substr($0, 0, j - 1) "\u00a0" $(i-1) "\u00a0" $i
break break
} }
} }
@@ -1,5 +1,5 @@
BEGIN { BEGIN {
n = split(ENVIRON["kak_text"], a, "·") n = split(ENVIRON["kak_text"], a, "\u00a0")
line = a[3] line = a[3]
if (n == 3 && line ~ /^[0-9]+/) { if (n == 3 && line ~ /^[0-9]+/) {
pat = a[1] pat = a[1]
@@ -2,7 +2,7 @@
for (i = 3; i < NF; ++i) { for (i = 3; i < NF; ++i) {
if ($i ~ /^[0-9]+$/) { if ($i ~ /^[0-9]+$/) {
j = match($0, "[ ]+" $(i-1) "[ ]+" $i " ") j = match($0, "[ ]+" $(i-1) "[ ]+" $i " ")
print substr($0, 0, j - 1) "·" $(i-1) "·" $i "·" $(i+1) print substr($0, 0, j - 1) "\u00a0" $(i-1) "\u00a0" $i "\u00a0" $(i+1)
break break
} }
} }
@@ -1,5 +1,5 @@
BEGIN { BEGIN {
n = split(ENVIRON["kak_text"], a, "·") n = split(ENVIRON["kak_text"], a, "\u00a0")
line = a[3] line = a[3]
if (n == 4 && line ~ /^[0-9]+/) { if (n == 4 && line ~ /^[0-9]+/) {
pat = a[1] pat = a[1]
-1
View File
@@ -1 +0,0 @@
/bin/zsh
-2
View File
@@ -1,2 +0,0 @@
#!/bin/sh
PATH="$PATH:$HOME/.config/lazygit/bin" exec /usr/bin/lazygit "$@"
-3
View File
@@ -11,6 +11,3 @@ gui:
theme: theme:
selectedLineBgColor: selectedLineBgColor:
- reverse - reverse
git:
autoFetch: false
+5 -6
View File
@@ -30,7 +30,7 @@ unfocused_opacity=1.0
# Animation Configuration(support type:zoom,slide) # Animation Configuration(support type:zoom,slide)
# tag_animation_direction: 1-horizontal,0-vertical # tag_animation_direction: 1-horizontal,0-vertical
animations=0 animations=1
layer_animations=1 layer_animations=1
animation_type_open=slide animation_type_open=slide
animation_type_close=slide animation_type_close=slide
@@ -98,7 +98,6 @@ focus_cross_tag=0
enable_floating_snap=0 enable_floating_snap=0
snap_distance=30 snap_distance=30
cursor_size=24 cursor_size=24
cursor_theme=breeze_cursors
drag_tile_to_tile=1 drag_tile_to_tile=1
drag_tile_small=1 drag_tile_small=1
@@ -125,10 +124,10 @@ swipe_min_threshold=1
mouse_natural_scrolling=0 mouse_natural_scrolling=0
# Appearance # Appearance
gappih=2 gappih=5
gappiv=2 gappiv=5
gappoh=0 gappoh=10
gappov=0 gappov=10
scratchpad_width_ratio=0.8 scratchpad_width_ratio=0.8
scratchpad_height_ratio=0.9 scratchpad_height_ratio=0.9
borderpx=4 borderpx=4
-5
View File
@@ -1,5 +0,0 @@
alias k=kak
alias kc='kak -c "$(kak -l | fzf)"'
alias kd='kak -s "$(printf %s $PWD | xargs basename)"'
alias lg=lazygit
alias z='cd $(fzf --walker dir --walker-root ~)'
+2 -4
View File
@@ -38,14 +38,12 @@ fi
export GOPATH=~/.cache/go export GOPATH=~/.cache/go
export GOBIN=~/.local/bin export GOBIN=~/.local/bin
export ENV=~/.ashrc
# start X or Hyprland at login # start X or Hyprland at login
if [ -z "$DISPLAY" -a -z "$WAYLAND_DISPLAY" -a "$(tty)" = /dev/tty1 ]; then if [ -z "$DISPLAY" -a -z "$WAYLAND_DISPLAY" -a "$(tty)" = /dev/tty1 ]; then
if which /usr/bin/sx > /dev/null; then if which /usr/bin/sx > /dev/null; then
exec /usr/bin/sx ~/.xinitrc exec /usr/bin/sx ~/.xsession
elif which /usr/bin/startx > /dev/null; then elif which /usr/bin/startx > /dev/null; then
exec /usr/bin/startx exec /usr/bin/startx ~/.xsession
elif which niri > /dev/null; then elif which niri > /dev/null; then
exec niri exec niri
elif which river argen > /dev/null; then elif which river argen > /dev/null; then
+12 -12
View File
@@ -23,8 +23,8 @@ fi
pkill -USR1 '^dwm$' pkill -USR1 '^dwm$'
XRES=$(readlink -f ~/.Xresources) XRES=$(readlink -e ~/.Xresources)
if [ -f "$XRES" ]; then if [ -n "$XRES" ]; then
if [ "$THEME" = dark ]; then if [ "$THEME" = dark ]; then
sed -i 's/^#undef THEME_DARK/#define THEME_DARK/' "$XRES" sed -i 's/^#undef THEME_DARK/#define THEME_DARK/' "$XRES"
elif [ "$THEME" = light ]; then elif [ "$THEME" = light ]; then
@@ -35,11 +35,11 @@ if [ -f "$XRES" ]; then
fi fi
# Alacritty # Alacritty
AYML=$(readlink -f ~/.config/alacritty/alacritty.yml) AYML=$(readlink -e ~/.config/alacritty/alacritty.yml)
if [ -f "$AYML" ]; then if [ -n "$AYML" ]; then
sed -i "s/^colors: [*].*/colors: *$THEME/" "$AYML" sed -i "s/^colors: [*].*/colors: *$THEME/" "$AYML"
fi fi
ATOML=$(readlink -f ~/.config/alacritty/alacritty.toml) ATOML=$(readlink -e ~/.config/alacritty/alacritty.toml)
if [ -f "$ATOML" ]; then if [ -f "$ATOML" ]; then
sed -i "s#^import =.*#import = [\"~/.config/alacritty/$THEME.toml\"]#" "$ATOML" sed -i "s#^import =.*#import = [\"~/.config/alacritty/$THEME.toml\"]#" "$ATOML"
fi fi
@@ -52,27 +52,27 @@ elif [ "$THEME" = light ]; then
fi fi
# Foot # Foot
FOOT=$(readlink -f ~/.config/foot/foot.ini) FOOT=$(readlink -e ~/.config/foot/foot.ini)
if [ -f "$FOOT" ]; then if [ -n "$FOOT" ]; then
sed -i "s/^initial-color-theme .*/initial-color-theme = $THEME/" "$FOOT" sed -i "s/^initial-color-theme .*/initial-color-theme = $THEME/" "$FOOT"
fi fi
# GTK # GTK
XSET=$(readlink -f ~/.config/xsettingsd/xsettingsd.conf) XSET=$(readlink -e ~/.config/xsettingsd/xsettingsd.conf)
if [ -f "$XSET" ]; then if [ -n "$XSET" ]; then
sed -i -E "s#(Net/ThemeName) .*#\\1 \"${GTK_THEME}\"#" "$XSET" sed -i -E "s#(Net/ThemeName) .*#\\1 \"${GTK_THEME}\"#" "$XSET"
pkill -HUP -x xsettingsd pkill -HUP -x xsettingsd
gsettings set org.gnome.desktop.interface gtk-theme "${GTK_THEME}" gsettings set org.gnome.desktop.interface gtk-theme "${GTK_THEME}"
fi fi
# niri # niri
NIRI=$(readlink -f ~/.config/niri/config.kdl) NIRI=$(readlink -e ~/.config/niri/config.kdl)
if [ -f "$NIRI" ]; then if [ -n "$NIRI" ]; then
sed -i -E "s%^(include) \"(dark|light).kdl\".*%\\1 \"${THEME}.kdl\"%" "$NIRI" sed -i -E "s%^(include) \"(dark|light).kdl\".*%\\1 \"${THEME}.kdl\"%" "$NIRI"
fi fi
# waybar # waybar
WCSS=$(readlink -f ~/.config/waybar/style.css) WCSS=$(readlink -e ~/.config/waybar/style.css)
if [ -f "$WCSS" ]; then if [ -f "$WCSS" ]; then
sed -i -E "s#file:///.*/(light|dark)[.]css#file://$HOME/.config/waybar/$THEME.css#" "$WCSS" sed -i -E "s#file:///.*/(light|dark)[.]css#file://$HOME/.config/waybar/$THEME.css#" "$WCSS"
killall -SIGUSR2 waybar killall -SIGUSR2 waybar