Compare commits

..

29 Commits

Author SHA1 Message Date
dbdfac823c argen: add keys to switch layout, change float and fullscreen keys 2026-06-13 18:42:43 +02:00
8849674617 argen: use top than left most output, name dotfiles kak session 2026-06-02 21:26:06 +02:00
85f7da444e argen: add switch to session 2026-06-01 23:50:20 +02:00
90786cef74 argen: use foot in server mode 2026-06-01 22:09:55 +02:00
bc85f3cb09 kakoune: change git open and fd open keys 2026-05-31 23:07:48 +02:00
6e5dc5decd foot: update font and add dark and light colors 2026-05-31 23:07:48 +02:00
203913aa58 lazygit: use kak as editor 2026-05-30 15:53:11 +02:00
1b2b72e813 argen: add key for fuzzel and select/swap window by index 2026-05-30 15:47:57 +02:00
f78d1ec922 kwm: add key for lock 2026-05-29 00:18:06 +02:00
9ddaf09c5c add config for argen, river-based window manager 2026-05-29 00:14:19 +02:00
32036e2f76 shell: add kakoune aliases, fix ls color (use auto) 2026-05-27 23:46:46 +02:00
c626f849cf lupan-set-theme: trigger kakoune set dark/light colorscheme 2026-05-27 23:20:21 +02:00
de7dbf7f67 kakoune: file and project symbols: support spaces in first token (example css)
uses non-breaking space as a separator and assumes that first numeric
token (starting from second one) is the line number (i.e., assumes that
the searched token does not contain space delimited number)
2026-05-27 09:58:13 +02:00
8715860090 kakoune: format go before save, add key for git show 2026-05-26 23:52:52 +02:00
e64ba55973 kakoune: add and modify search keys 2026-05-25 23:45:50 +02:00
1070fd29b9 kakoune: project symbols: exclude files with very long average line length
for example single or two lines bundled js files
2026-05-25 22:00:44 +02:00
6b4927cb51 kakoune: file/project symbols: use spaces as delimiters 2026-05-25 21:44:15 +02:00
8f5b3443db kakoune: add ctags file and project symbols 2026-05-25 00:48:10 +02:00
8ee04ac139 kakoune: add key for open file with hidden 2026-05-25 00:29:59 +02:00
210fd7052f kakoune: add idle_timeout and more git keys and git-update on idle 2026-05-24 22:01:06 +02:00
d815cadb7b kakoune: add/modify keys (add git, make) 2026-05-22 10:06:38 +02:00
f4dadb53a9 niri: set background and toggle (dark/light) 2026-05-20 23:15:33 +02:00
65e82799d6 niri: add waybar 2026-05-20 21:07:07 +02:00
9582b16219 niri: use wmenu 2026-05-20 21:03:46 +02:00
6622539538 kakoune: highlight cursor line (turn on, and support in themes) 2026-05-20 20:40:59 +02:00
caeb94082d kitty: five-colors dark and light themes 2026-05-20 20:40:59 +02:00
e08bf98d80 kakoune: five-colors dark and light theme, use it 2026-05-20 20:40:59 +02:00
fc7b72fe6b kakoune: set colorscheme after all plugins, four-colors: change prompt, add diagnostic info and hint 2026-05-20 20:40:59 +02:00
a29b006b00 profile: add niri, kakoune: add key for peneira symbols 2026-05-20 20:40:59 +02:00
29 changed files with 876 additions and 49 deletions

158
argen/.config/argen/init Executable file
View File

@@ -0,0 +1,158 @@
#!/bin/sh
wlr-randr --output DP-1 --mode 3840x2160 --scale 2
wlr-randr --output HDMI-A-1 --mode 3840x2160 --scale 2 --left-of DP-1
foot --server &
argenctl config set label-mode modifier
# Terminal
#argenctl binding set normal Super Return sh "kitty --single-instance --instance-group default"
argenctl binding set normal Super Return sh "
if [ -e ~/.lightmode ]; then
exec footclient -o initial-color-theme=light
else
exec footclient -o initial-color-theme=dark
fi
"
# Reload config
argenctl binding set normal Super+Shift R exec "$0"
argenctl binding set normal Super P exec fuzzel
argenctl binding set normal Super+Shift L exec waylock
argenctl binding set normal Super+Shift T sh "lupan-set-theme toggle"
# Window focus and swap
argenctl binding set normal Super J window focus next
argenctl binding set normal Super K window focus prev
argenctl binding set normal Super+Shift J window swap next
argenctl binding set normal Super+Shift K window swap prev
argenctl binding set normal Super F window fullscreen
argenctl binding set normal Super W window float
argenctl binding set normal Super+Shift C window close
argenctl binding set normal Super+Shift X window detach
# Output focus and send
argenctl binding set normal Super Period output focus next
argenctl binding set normal Super Comma output focus prev
argenctl binding set normal Super+Shift Period window send next
argenctl binding set normal Super+Shift Comma window send prev
# Layout
argenctl binding set normal Super M layout switch monocle
argenctl binding set normal Super S layout switch stacktile
argenctl binding set normal Super H layout set primary-ratio -0.05
argenctl binding set normal Super L layout set primary-ratio +0.05
argenctl binding set normal Super+Control K layout set secondary-ratio -0.05
argenctl binding set normal Super+Control J layout set secondary-ratio +0.05
# Pointer
argenctl pointer-binding set normal Super BTN_LEFT move-window
argenctl pointer-binding set normal Super BTN_RIGHT resize-window
# Context
argenctl binding set normal Super+Shift+Control X context close
argenctl binding set normal Super Tab context switch --last
# Switch contexts interactively
argenctl binding set normal Super Space sh 'argenctl context switch "$(argenctl context list | fuzzel -d)"'
# Create new context interactively
argenctl binding set normal Super+Shift Space sh '
set -eu
prompt="$(fuzzel -dl0 -p"new > ")"
argenctl context new "$prompt"
'
# Rename current context interactively
argenctl binding set normal Super+Control Space sh '
set -eu
prompt="$(fuzzel -dl0 -p"rename > ")"
argenctl context rename "$prompt"
'
# Assign currently focused window to be toggled with Super U
argenctl binding set normal Super+Shift U sh '
set -eu
window_id=$(argenctl window list --json | jq -r ".[] | select(.focused) | .id")
argenctl binding set normal Super U window toggle $window_id
'
# Attach window interactively
argenctl binding set normal Super+Shift D sh '
set -eu
id=$(argenctl window list | fuzzel -d --with-nth 2 --accept-nth 1)
argenctl window attach "$id"
'
# Adopt all orphans
argenctl binding set normal Super+Control D sh '
argenctl window list --json | jq -r ".[] | select(.contexts | length == 0) | .id" | while read -r id; do
argenctl window attach "$id"
done
'
# Quit after confirmed with 'yes'
argenctl binding set normal Super+Shift Q sh '
set -eu
confirm="$(fuzzel -dl0 -p"quit? > ")"
if [ "$confirm" = yes ]; then
argenctl exit
fi
'
# Audio and brightness controls
VOL_DEC='wpctl set-volume @DEFAULT_SINK@ --limit 1.5 5%-'
VOL_INC='wpctl set-mute @DEFAULT_SINK@ 0 && wpctl set-volume @DEFAULT_SINK@ --limit 1.5 5%+'
VOL_TOGGLE='wpctl set-mute @DEFAULT_SINK@ toggle'
for mode in normal locked; do
argenctl binding set $mode Super Bracketleft sh "$VOL_DEC"
argenctl binding set $mode Super Bracketright sh "$VOL_INC"
argenctl binding set $mode Super+Shift M sh "$VOL_TOGGLE"
argenctl binding set $mode None XF86AudioLowerVolume sh "$VOL_DEC"
argenctl binding set $mode None XF86AudioRaiseVolume sh "$VOL_INC"
argenctl binding set $mode None XF86AudioMute sh "$VOL_TOGGLE"
argenctl binding set $mode None XF86MonBrightnessDown sh "brightnessctl s 5%-"
argenctl binding set $mode None XF86MonBrightnessUp sh "brightnessctl s +5%"
argenctl binding set $mode Super+Shift Bracketleft sh "brightnessctl s 5%-"
argenctl binding set $mode Super+Shift Bracketright sh "brightnessctl s +5%"
done
# Passthrough mode
argenctl mode declare passthrough
argenctl binding set normal Super Grave mode enter passthrough
argenctl binding set passthrough Super Grave mode enter normal
# Select/swap window by index
for num in 1 2 3 4 5 6 7 8 9; do
idx=$((num - 1))
argenctl binding set normal Super $num sh "
argenctl window focus \$(argenctl context list --json | jq -r '.[] | select(.current) | .windows | .[$idx]')
"
argenctl binding set normal Super+Shift $num sh "
context_id=\$(argenctl context list --json | jq -r '.[] | select(.current) | .id')
length=\$(argenctl context list --json | jq -r '.[] | select(.current) | .windows | length')
focused_window=\$(argenctl context list --json | jq -r '.[] | select(.current) | .focused_window')
dest_window=\$(argenctl context list --json | jq -r '.[] | select(.current) | .windows | .[$idx]')
focused_output_id=\$(argenctl window list --json | jq -r \".[] | select(.id == \\\"\$focused_window\\\") | .contexts[] | select(.id = \$context_id) | .output_id\")
dest_output_id=\$(argenctl window list --json | jq -r \".[] | select(.id == \\\"\$dest_window\\\") | .contexts[] | select(.id = \$context_id) | .output_id\")
if [ -n \"\$focused_output_id\" -a \"\$focused_output_id\" = \"\$dest_output_id\" ]; then
for i in \$(seq \$length); do
if [ \"\$focused_window\" = \"\$dest_window\" ]; then
break
fi
argenctl window swap next
dest_window=\$(argenctl context list --json | jq -r '.[] | select(.current) | .windows | .[$idx]')
done
fi
"
done
argenctl binding set normal Super+Shift S exec ~/.config/argen/session.sh
# Rules
argenctl rule add float --app-id "my-app"

29
argen/.config/argen/session.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/sh
set -eu
id=$(for name in $(ls ~/.config/argen/sessions/*.sh); do echo $(basename "${name%.sh}"); done | fuzzel -d -p'session> ')
if argenctl context list | grep "^${id}\$"; then
argenctl context switch "${id}"
exit
fi
argenctl context new "$id"
first=$(argenctl output list --json | jq -r 'min_by(80000 * .y + .x).id')
length=$(argenctl output list --json | jq -r 'length')
for n in $(seq $length); do
current=$(argenctl output list --json | jq -r '.[] | select(.focused).id')
if [ "$current" = "$first" ]; then
break
fi
argenctl output focus next
done
if [ -e ~/.lightmode ]; then
THEME=light
else
THEME=dark
fi
export TERMINAL="footclient -o initial-color-theme=$THEME"
exec sh ~/.config/argen/sessions/"${id}.sh"

View File

@@ -0,0 +1,3 @@
argenctl output focus next
argenctl sh "$TERMINAL -D ~/dotfiles kak -s dotfiles"

View File

@@ -0,0 +1,6 @@
argenctl exec librewolf
sleep 1
argenctl output focus next
argenctl exec qutebrowser

View File

@@ -1,4 +1,60 @@
[main]
font = Fira Code Nerd Font:size=11
font = HurmitNerdFont:size=10
initial-color-theme = dark
include = /usr/share/foot/themes/nord
[colors-dark]
foreground = a29e98
background = 272117
cursor = 272117 73d0b1
selection-foreground = 272117
selection-background = 276c9a
regular0 = 85919b
regular1 = c37583
regular2 = 44a386
regular3 = af8842
regular4 = 5396c7
regular5 = a57cba
regular6 = 2da0ad
regular7 = b0bcc7
bright0 = 85919b
bright1 = f2a0ae
bright2 = 73d0b1
bright3 = dcb46e
bright4 = 7fc3f5
bright5 = d2a8e8
bright6 = 62cdda
bright7 = a29e98
[colors-light]
foreground = 696257
background = faf8f5
cursor = faf8f5 7ad6b7
selection-foreground = faf8f5
selection-background = 3a7ead
regular0 = 272117
regular1 = d0818f
regular2 = 52af92
regular3 = bc944f
regular4 = 60a3d4
regular5 = b289c7
regular6 = 3dadba
regular7 = b6c3cd
bright0 = 919da7
bright1 = 85c9fc
bright2 = 7ad6b7
bright3 = e3ba74
bright4 = 60a3d4
bright5 = d9aeee
bright6 = 85c9fc
bright7 = faf8f5
[key-bindings]
color-theme-toggle = Control+Shift+t
primary-paste = Shift+Insert Control+Shift+i
[search-bindings]
primary-paste = Shift+Insert Control+Shift+i

View File

@@ -0,0 +1,125 @@
# Five colors dark theme
evaluate-commands %sh{
bg="rgb:272117"
bgmenu="rgb:282e38"
fg="rgb:a29e98"
gray="rgb:767778"
red1="rgb:f2a0ae"
red2="rgb:c37583"
red3="rgb:954c5b"
yellow1="rgb:dcb46e"
yellow2="rgb:af8842"
yellow3="rgb:845f10"
green1="rgb:73d0b1"
green2="rgb:44a386"
green3="rgb:04785d"
blue1="rgb:7fc3f5"
blue2="rgb:5396c7"
blue3="rgb:276c9a"
violet1="rgb:d2a8e8"
violet2="rgb:a57cba"
violet3="rgb:7b548e"
echo "
## CODE
set-face global value $violet2
set-face global type $green2
set-face global variable $yellow3
set-face global module $red3
set-face global function $blue2
set-face global string $yellow2
set-face global keyword $violet3
set-face global operator $red2
set-face global attribute $green3
set-face global comment $gray
set-face global documentation $gray
set-face global meta $blue3
set-face global builtin $violet1
## MARKUP
set-face global title $red3
set-face global header $violet3
set-face global mono $yellow2
set-face global block $blue3
set-face global link $blue2
set-face global bullet $red2
set-face global list $red2
## BUILTIN
set-face global Default $fg,$bg
set-face global PrimarySelection $bg,$green3
set-face global SecondarySelection $bg,$blue3
set-face global PrimaryCursor $bg,$green1
set-face global SecondaryCursor $bg,$blue1
set-face global PrimaryCursorEol $bg,$red1
set-face global SecondaryCursorEol $bg,$yellow1
set-face global MenuForeground $green1,$green3
set-face global MenuBackground $fg,$bgmenu
set-face global MenuInfo $green2
set-face global Information $fg,$bgmenu
set-face global InlineInformation $blue2,$bgmenu
set-face global Error $red2
set-face global DiagnosticError default,default,$red2+c
set-face global DiagnosticWarning default,default,$yellow2+c
set-face global DiagnosticInfo default,default,$green2+c
set-face global DiagnosticHint default,default,$blue2+c
set-face global StatusLine $fg,$bgmenu
set-face global StatusLineMode $green2
set-face global StatusLineInfo $yellow2
set-face global StatusLineValue $blue2
set-face global StatusCursor $bg,$green1
set-face global Prompt $green2
set-face global BufferPadding $bg,$bg
# Built-in highlighter faces
set-face global LineNumbers $gray
set-face global LineNumberCursor $green3
set-face global LineNumbersWrapped $bg,$bg
set-face global MatchingChar $red1
set-face global Whitespace $gray
set-face global WhitespaceIndent $gray
set-face global WrapMarker $yellow1
# PLUGINS
# kak-lsp
set-face global InfoDefault default
set-face global InfoBlock $green2
set-face global InfoBlockQuote $yellow2
set-face global InfoBullet $red2
set-face global InfoHeader $red3
set-face global InfoLink $blue2
set-face global InfoLinkMono $blue3
set-face global InfoMono $blue2
set-face global InfoRule $yellow2
set-face global InfoDiagnosticError $red2
set-face global InfoDiagnosticHint $blue2
set-face global InfoDiagnosticInformation $green2
set-face global InfoDiagnosticWarning $yellow2
set-face global LineFlagError $red2
set-face global LineFlagHint $blue2
set-face global LineFlagInfo $green2
set-face global LineFlagWarning $yellow2
set-face global InlayDiagnosticError $red2
set-face global InlayDiagnosticHint $blue2
set-face global InlayDiagnosticInfo $green2
set-face global InlayDiagnosticWarning $yellow2
set-face global SnippetsNextPlaceholders $bg,$green2
set-face global SnippetsOtherPlaceholders $bg,$yellow2
"
}

View File

@@ -0,0 +1,125 @@
# Five colors dark theme
evaluate-commands %sh{
bg="rgb:faf8f5"
bgmenu="rgb:f6ede0"
fg="rgb:696257"
gray="rgb:c0c1c2"
red1="rgb:f9a6b5"
red2="rgb:d0818f"
red3="rgb:a95d6c"
yellow1="rgb:e3ba74"
yellow2="rgb:bc944f"
yellow3="rgb:967028"
green1="rgb:7ad6b7"
green2="rgb:52af92"
green3="rgb:278a6e"
blue1="rgb:85c9fc"
blue2="rgb:60a3d4"
blue3="rgb:3a7ead"
violet1="rgb:d9aeee"
violet2="rgb:b289c7"
violet3="rgb:8d65a1"
echo "
## CODE
set-face global value $violet2
set-face global type $green2
set-face global variable $yellow3
set-face global module $red3
set-face global function $blue2
set-face global string $yellow2
set-face global keyword $violet3
set-face global operator $red2
set-face global attribute $green3
set-face global comment $gray
set-face global documentation $gray
set-face global meta $blue3
set-face global builtin $violet1
## MARKUP
set-face global title $red3
set-face global header $violet3
set-face global mono $yellow2
set-face global block $blue3
set-face global link $blue2
set-face global bullet $red2
set-face global list $red2
## BUILTIN
set-face global Default $fg,$bg
set-face global PrimarySelection $bg,$green3
set-face global SecondarySelection $bg,$blue3
set-face global PrimaryCursor $bg,$green1
set-face global SecondaryCursor $bg,$blue1
set-face global PrimaryCursorEol $bg,$red1
set-face global SecondaryCursorEol $bg,$yellow1
set-face global MenuForeground $green1,$green3
set-face global MenuBackground $fg,$bgmenu
set-face global MenuInfo $green2
set-face global Information $fg,$bgmenu
set-face global InlineInformation $blue2,$bgmenu
set-face global Error $red2
set-face global DiagnosticError default,default,$red2+c
set-face global DiagnosticWarning default,default,$yellow2+c
set-face global DiagnosticInfo default,default,$green2+c
set-face global DiagnosticHint default,default,$blue2+c
set-face global StatusLine $fg,$bgmenu
set-face global StatusLineMode $green2
set-face global StatusLineInfo $yellow2
set-face global StatusLineValue $blue2
set-face global StatusCursor $bg,$green1
set-face global Prompt $green2
set-face global BufferPadding $bg,$bg
# Built-in highlighter faces
set-face global LineNumbers $gray
set-face global LineNumberCursor $green3
set-face global LineNumbersWrapped $bg,$bg
set-face global MatchingChar $red1
set-face global Whitespace $gray
set-face global WhitespaceIndent $gray
set-face global WrapMarker $yellow1
# PLUGINS
# kak-lsp
set-face global InfoDefault default
set-face global InfoBlock $green2
set-face global InfoBlockQuote $yellow2
set-face global InfoBullet $red2
set-face global InfoHeader $red3
set-face global InfoLink $blue2
set-face global InfoLinkMono $blue3
set-face global InfoMono $blue2
set-face global InfoRule $yellow2
set-face global InfoDiagnosticError $red2
set-face global InfoDiagnosticHint $blue2
set-face global InfoDiagnosticInformation $green2
set-face global InfoDiagnosticWarning $yellow2
set-face global LineFlagError $red2
set-face global LineFlagHint $blue2
set-face global LineFlagInfo $green2
set-face global LineFlagWarning $yellow2
set-face global InlayDiagnosticError $red2
set-face global InlayDiagnosticHint $blue2
set-face global InlayDiagnosticInfo $green2
set-face global InlayDiagnosticWarning $yellow2
set-face global SnippetsNextPlaceholders $bg,$green2
set-face global SnippetsOtherPlaceholders $bg,$yellow2
"
}

View File

@@ -66,18 +66,20 @@ evaluate-commands %sh{
set-face global Error $pink2
set-face global DiagnosticError default,default,$pink2+c
set-face global DiagnosticWarning default,default,$yellow2+c
set-face global DiagnosticInfo default,default,$green2+c
set-face global DiagnosticHint default,default,$blue2+c
set-face global StatusLine $fg,$bgmenu
set-face global StatusLineMode $green2
set-face global StatusLineInfo $yellow2
set-face global StatusLineValue $blue2
set-face global StatusCursor $bg,$green1
set-face global Prompt $blue3
set-face global Prompt $green2
set-face global BufferPadding $bg,$bg
# Built-in highlighter faces
set-face global LineNumbers $blue3
set-face global LineNumberCursor $blue3
set-face global LineNumberCursor $green3
set-face global LineNumbersWrapped $bg,$bg
set-face global MatchingChar $yellow1
set-face global Whitespace $gray

View File

@@ -66,18 +66,20 @@ evaluate-commands %sh{
set-face global Error $pink2
set-face global DiagnosticError default,default,$pink2+c
set-face global DiagnosticWarning default,default,$yellow2+c
set-face global DiagnosticInfo default,default,$green2+c
set-face global DiagnosticHint default,default,$blue2+c
set-face global StatusLine $fg,$bgmenu
set-face global StatusLineMode $green2
set-face global StatusLineInfo $yellow2
set-face global StatusLineValue $blue2
set-face global StatusCursor $bg,$green1
set-face global Prompt $blue3
set-face global Prompt $green2
set-face global BufferPadding $bg,$bg
# Built-in highlighter faces
set-face global LineNumbers $blue3
set-face global LineNumberCursor $blue3
set-face global LineNumberCursor $green2
set-face global LineNumbersWrapped $bg,$bg
set-face global MatchingChar $yellow1
set-face global Whitespace $gray

View File

@@ -4,7 +4,7 @@ set-option global startup_info_version 20260412
set-option global ui_options terminal_assistant=none
hook global WinCreate .* %{
add-highlighter window/number-lines number-lines -relative
add-highlighter window/number-lines number-lines -relative -hlcursor
}
add-highlighter global/ show-matching
@@ -15,36 +15,62 @@ nop %sh{
[ -e "$kak_config/autoload/stdlib" ] || ln -s "$kak_runtime/autoload" "$kak_config/autoload/stdlib"
}
colorscheme %sh{
if [ -e ~/.lightmode ]; then
echo four-colors-light
else
echo four-colors-dark
fi
}
map global -docstring 'Buffer' user ' ' ': buffer '
declare-user-mode file-mode
declare-user-mode options-mode
map global -docstring 'Search/open' user 's' ': enter-user-mode file-mode<ret>'
map global -docstring 'File' user 'f' ': enter-user-mode file-mode<ret>'
map global -docstring 'Buffer' user ' ' ': b '
map global -docstring 'Open (git)' file-mode 'a' ': file-open-git<ret>'
map global -docstring 'Git diff file' file-mode 'd' ': git diff %val{buffile}<ret>'
map global -docstring 'Open (fd)' file-mode 'f' ': file-open<ret>'
map global -docstring 'Open (fd)' file-mode 'a' ': file-open<ret>'
map global -docstring 'Open (fd -H)' file-mode 'h' ': file-open-with-hidden<ret>'
map global -docstring 'Open (recent)' file-mode 'r' ': file-open-recent<ret>'
map global -docstring 'Git grep' file-mode 'g' ': git grep '
map global -docstring 'Open (nnn)' file-mode 'n' ': nnn-open %val{buffile}<ret>'
map global -docstring 'Open (nnn)' file-mode 'N' ': nnn-open .<ret>'
map global -docstring 'Open (nnn)' file-mode 'd' ': nnn-open %val{buffile}<ret>'
map global -docstring 'Open (nnn)' file-mode 'D' ': nnn-open .<ret>'
map global -docstring 'Open/create in dir' file-mode 'c' ': open-create-in-dir<ret>'
map global -docstring 'ctags file symbols' file-mode 's' ': ctags-file-symbols<ret>'
map global -docstring 'ctags project symbols' file-mode 'w' ': ctags-project-symbols<ret>'
map global -docstring 'Grep' file-mode 'g' ':grep '
map global -docstring 'Grep next match' file-mode 'n' ': grep-next-match<ret>'
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 %val{selection}<ret>'
map global -docstring 'Delete buffer' file-mode 'x' ': delete-buffer '
declare-user-mode git-mode
map global -docstring 'Git' user 'g' ': enter-user-mode git-mode<ret>'
map global -docstring 'Open file' git-mode 'a' ': file-open-git<ret>'
map global -docstring 'Blame' git-mode 'b' ': git blame<ret>'
map global -docstring 'Blame' git-mode 'B' ': git blame-jump<ret>'
map global -docstring 'Diff file' git-mode 'd' ': git diff %val{buffile}<ret>'
map global -docstring 'Diff' git-mode 'D' ': git diff<ret>'
map global -docstring 'Grep' git-mode 'g' ':git grep '
map global -docstring 'Grep' git-mode 'G' ': git grep %val{selection}<ret>'
map global -docstring 'Log' git-mode 'l' ': git log -- %val{buffile}<ret>'
map global -docstring 'Log' git-mode 'L' ': git log<ret>'
map global -docstring 'Show branch' git-mode 'c' ': git show-branch<ret>'
map global -docstring 'Status' git-mode 't' ': git status<ret>'
map global -docstring 'Show diff' git-mode 's' ': git-show-diff<ret>'
map global -docstring 'Show' git-mode 'S' ': git show<ret>'
map global -docstring 'Hide diff' git-mode 'h' ': git-hide-diff<ret>'
map global -docstring 'Next hunk' git-mode 'n' ': git next-hunk<ret>'
map global -docstring 'Prev hunk' git-mode 'p' ': git prev-hunk<ret>'
declare-user-mode options-mode
map global -docstring 'Options' user 'o' ': enter-user-mode options-mode<ret>'
map global -docstring 'LP Dark mode' options-mode 'd' ': colorscheme four-colors-dark<ret>'
map global -docstring 'LP Light mode' options-mode 'l' ': colorscheme four-colors-light<ret>'
map global -docstring 'Five Dark mode' options-mode 'd' ': colorscheme five-colors-dark<ret>'
map global -docstring 'Five Light mode' options-mode 'l' ': colorscheme five-colors-light<ret>'
map global -docstring 'Light mode' options-mode 'L' ': colorscheme one-light<ret>'
map global -docstring 'Dark mode' options-mode 'D' ': colorscheme one-darker<ret>'
declare-user-mode make-mode
map global -docstring 'Make' user 'k' ': enter-user-mode make-mode<ret>'
map global -docstring 'Make' make-mode 'a' ':make '
map global -docstring 'Next' make-mode 'n' ': make-next-error<ret>'
map global -docstring 'Previous' make-mode 'p' ': make-previous-error<ret>'
map global -docstring 'General messages' make-mode 'g' ': set window make_error_pattern "^([^:\n]+):(\d+):(?:(\d+):)? ([^\n]+)?"<ret>'
evaluate-commands %sh{
if [ -n "$WAYLAND_DISPLAY" ]; then
echo "
@@ -69,6 +95,10 @@ define-command -override file-open %{
prompt -menu -shell-script-candidates %{ fd -t f } 'File: ' %{ edit -- %val{text} }
}
define-command -override file-open-with-hidden %{
prompt -menu -shell-script-candidates %{ fd -t f -H } 'File: ' %{ edit -- %val{text} }
}
define-command -override file-open-git %{
prompt -menu -shell-script-candidates %{ git ls-files } 'File (git): ' %{ edit -- %val{text} }
}
@@ -77,6 +107,10 @@ define-command -override file-open-recent %{
prompt -menu -shell-script-candidates %{ cat ~/.cache/kak-mru } 'File (recent): ' %{ edit -- %val{text} }
}
define-command -override grep-file -params 1- %{
grep %arg{@} -- %val{buffile}
}
define-command -override -params 1 nnn-open %{
terminal nnn-kak-edit %arg{1} %val{session} %val{client}
}
@@ -85,16 +119,49 @@ define-command -override open-create-in-dir %{
execute-keys ': edit ' %sh{dirname "$kak_buffile"}/
}
define-command git-log-show-current-commit %{
execute-keys ';<a-/>^commit\s[0-9a-f]+<ret>b'
git show %val{selection}
}
define-command -override git-show-diff %{
hook buffer -group git-show-diff NormalIdle .* %{ git update-diff }
git show-diff
}
define-command -override git-hide-diff %{
remove-hooks buffer git-show-diff
git hide-diff
}
define-command -override ctags-file-symbols %{
prompt -menu -shell-script-candidates %{
ctags -uo - -x "$kak_buffile" | awk -f "$kak_config/scripts/filesymbols.awk"
} 'File symbols: ' %{
evaluate-commands %sh{ awk -f "$kak_config/scripts/filesymbolscmd.awk" # "$kak_text" }
}
}
define-command -override ctags-project-symbols %{
prompt -menu -shell-script-candidates %{
git ls-files | 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'
# CHANGE STATUS BAR COLOR IN INSERT MODE
hook global ModeChange push:.*:insert %{
set-face window StatusLine 'default,rgb:1c4a21'
set-face window StatusLine 'default,rgb:04785d'
set-option window idle_timeout 500
}
hook global ModeChange pop:insert:.* %{
unset-face window StatusLine
unset-option window idle_timeout
}
# ODIN
@@ -103,6 +170,12 @@ hook global BufSetOption filetype=odin %{
set-option buffer formatcmd 'odinfmt -stdin'
}
hook global BufSetOption filetype=go %{
hook -group buf-write-pre-fmt buffer BufWritePre .* %{
lsp-formatting-sync
}
}
# LSP
eval %sh{kak-lsp}
@@ -141,7 +214,7 @@ bundle-theme kakoune-themes 'https://codeberg.org/anhsirk0/kakoune-themes'
# FZF
bundle fzf.kak 'https://github.com/andreyorst/fzf.kak' %{
map global -docstring 'FZF menu' user s ': fzf-mode<ret>'
map global -docstring 'FZF menu' user 'f' ': fzf-mode<ret>'
require-module fzf
set-option global fzf_highlight_command "bat"
}
@@ -190,20 +263,37 @@ bundle 'peneira' 'https://github.com/gustavo-hms/peneira' %{
}
}
define-command peneira-git-files %{
peneira 'git files: ' %{ git ls-files } %{ e %arg{1} }
peneira 'git files: ' %{ git ls-files } %{ edit -- %arg{1} }
}
define-command peneira-files-with-hidden %{
peneira 'git files: ' %{ fd -t f -H } %{ edit -- %arg{1} }
}
define-command peneira-recent-files %{
peneira 'mru files: ' %{ cat ~/.cache/kak-mru } %{ e %arg{1} }
peneira 'mru files: ' %{ cat ~/.cache/kak-mru } %{ edit -- %arg{1} }
}
map global -docstring 'Buffer' user ' ' ': buffers<ret>'
declare-user-mode peneira-mode
map global -docstring 'Peneira' user 'd' ': enter-user-mode peneira-mode<ret>'
map global -docstring 'Git files' peneira-mode 'a' ': peneira-git-files<ret>'
map global -docstring 'Buffers' peneira-mode 'b' ': buffers<ret>'
map global -docstring 'Files' peneira-mode 'f' ': peneira-files<ret>'
map global -docstring 'Files' peneira-mode 'F' ': peneira-local-files<ret>'
map global -docstring 'Lines' peneira-mode 'l' ': peneira-lines<ret>'
map global -docstring 'Recent files' peneira-mode 'r' ': peneira-recent-files<ret>'
map global -docstring 'Git files' file-mode 'a' ': peneira-git-files<ret>'
map global -docstring 'Buffers' file-mode 'b' ': buffers<ret>'
map global -docstring 'Files' file-mode 'f' ': peneira-files<ret>'
map global -docstring 'Files' file-mode 'F' ': peneira-local-files<ret>'
map global -docstring 'Files (with hidden)' file-mode 'h' ': peneira-files-with-hidden<ret>'
map global -docstring 'Lines' file-mode 'l' ': peneira-lines<ret>'
map global -docstring 'Symbols' file-mode 's' ': peneira-symbols<ret>'
map global -docstring 'Recent files' file-mode 'r' ': peneira-recent-files<ret>'
}
# LOCAL
define-command set-dark-or-light-colorscheme %{
colorscheme %sh{
if [ -e ~/.lightmode ]; then
echo five-colors-light
else
echo five-colors-dark
fi
}
}
set-dark-or-light-colorscheme

View File

@@ -0,0 +1,9 @@
{
for (i = 3; i < NF; ++i) {
if ($i ~ /^[0-9]+$/) {
j = match($0, "[ ]+" $(i-1) "[ ]+" $i " ")
print substr($0, 0, j - 1) "\u00a0" $(i-1) "\u00a0" $i
break
}
}
}

View File

@@ -0,0 +1,10 @@
BEGIN {
n = split(ENVIRON["kak_text"], a, "\u00a0")
line = a[3]
if (n == 3 && line ~ /^[0-9]+/) {
pat = a[1]
gsub(/'/, "''", pat)
gsub(/\\/, "\\\\", pat)
print "execute-keys " line " g vv x s '/\\b\\Q" pat "\\E\\b|\\Q" pat "<ret>' <a-)>,"
}
}

View File

@@ -0,0 +1,9 @@
{
for (i = 3; i < NF; ++i) {
if ($i ~ /^[0-9]+$/) {
j = match($0, "[ ]+" $(i-1) "[ ]+" $i " ")
print substr($0, 0, j - 1) "\u00a0" $(i-1) "\u00a0" $i "\u00a0" $(i+1)
break
}
}
}

View File

@@ -0,0 +1,11 @@
BEGIN {
n = split(ENVIRON["kak_text"], a, "\u00a0")
line = a[3]
if (n == 4 && line ~ /^[0-9]+/) {
pat = a[1]
gsub(/'/, "''", pat)
gsub(/\\/, "\\\\", pat)
print "edit --", a[4], line
print "execute-keys vv x s %{/\\b\\Q" pat "\\E\\b|\\Q" pat "<ret>} <a-)>,"
}
}

View File

@@ -68,6 +68,6 @@ map ctrl+alt+shift+w detach_window
map ctrl+alt+shift+x close_session .
# BEGIN_KITTY_THEME
# Lupanbones-Dark
# Five-Colors-Dark
include current-theme.conf
# END_KITTY_THEME

View File

@@ -0,0 +1,35 @@
# vim:ft=kitty
foreground #a29e98
background #272117
selection_foreground #272117
selection_background #276c9a
cursor #73d0b1
cursor_text_color #272117
active_border_color #276c9a
inactive_border_color #b0bcc7
active_tab_foreground #9da0af
active_tab_background #4d5580
inactive_tab_foreground #1f212e
inactive_tab_background #808080
color0 #85919b
color1 #c37583
color2 #44a386
color3 #af8842
color4 #5396c7
color5 #a57cba
color6 #2da0ad
color7 #b0bcc7
color8 #85919b
color9 #f2a0ae
color10 #73d0b1
color11 #dcb46e
color12 #7fc3f5
color13 #d2a8e8
color14 #62cdda
color15 #a29e98

View File

@@ -0,0 +1,35 @@
# vim:ft=kitty
foreground #696257
background #faf8f5
selection_foreground #faf8f5
selection_background #3a7ead
cursor #7ad6b7
cursor_text_color #faf8f5
active_border_color #85c9fc
inactive_border_color #919da7
active_tab_foreground #1f212e
active_tab_background #a6c7f2
inactive_tab_foreground #faf8f5
inactive_tab_background #808080
color0 #272117
color1 #d0818f
color2 #52af92
color3 #bc944f
color4 #60a3d4
color5 #b289c7
color6 #3dadba
color7 #b6c3cd
color8 #919da7
color9 #85c9fc
color10 #7ad6b7
color11 #e3ba74
color12 #60a3d4
color13 #d9aeee
color14 #85c9fc
color15 #faf8f5

View File

@@ -1024,6 +1024,17 @@
},
},
},
.{
.keysym = "l",
.modifiers = .{ .mod4 = true, .shift = true },
.event = .{
.click = .{
.pressed = .{
.spawn = .{ .argv = .{ "waylock" } },
},
},
},
},
},
// list of pointer bindings

View File

@@ -1,9 +1,9 @@
os:
edit: 'nvim {{filename}}'
editAtLine: 'nvim +{{line}} {{filename}}'
editAtLineAndWait: 'nvim +{{line}} {{filename}}'
edit: 'kak {{filename}}'
editAtLine: 'kak +{{line}} {{filename}}'
editAtLineAndWait: 'kak +{{line}} {{filename}}'
editInTerminal: true
openDirInEditor: 'nvim {{dir}}'
openDirInEditor: 'kak -e "nnn-open {{dir}}"'
gui:
nerdFontsVersion: "3"

View File

@@ -1,6 +1,8 @@
// This config is in the KDL format: https://kdl.dev
// https://niri-wm.github.io/niri/Configuration:-Introduction
spawn-at-startup "waybar"
input {
keyboard {
xkb {
@@ -120,7 +122,8 @@ binds {
// Suggested binds for running programs: terminal, app launcher, screen locker.
Mod+T hotkey-overlay-title="Open a Terminal: alacritty" { spawn "kitty" "--single-instance" "--instance-group" "default"; }
Mod+D hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; }
Mod+D hotkey-overlay-title="Run an Application: wmenu" { spawn "wmenu-run" "-f" "HurmitNerdFont 10"; }
Mod+B hotkey-overlay-title="Toggle waybar" { spawn "killall" "-SIGUSR1" "waybar"; }
Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
Mod+Shift+T hotkey-overlay-title="Toggle theme" { spawn "lupan-set-theme" "toggle"; }
@@ -318,3 +321,5 @@ binds {
Mod+Shift+P { power-off-monitors; }
}
include "dark.kdl"

View File

@@ -0,0 +1,9 @@
layout {
background-color "#414853"
focus-ring {
width 4
active-color "#5396c7"
inactive-color "#505050"
}
}

View File

@@ -0,0 +1,9 @@
layout {
background-color "#c0c1c2"
focus-ring {
width 4
active-color "#85c9fc"
inactive-color "#505050"
}
}

View File

@@ -0,0 +1,13 @@
{
"layer": "top",
"position": "top",
"modules-left": [
"niri/workspaces",
"niri/window"
],
"modules-right": [
"tray",
"clock"
],
"reload_style_on_change": true,
}

View File

@@ -0,0 +1,12 @@
* {
background-color: #282e38;
color: #a29e98;
}
#workspaces button.active {
border-bottom: 3px solid #04785d;
}
#workspaces button.urgent {
border-bottom: 3px solid #c37583;
}

View File

@@ -0,0 +1,12 @@
* {
background-color: #f6ede0;
color: #696257;
}
#workspaces button.active {
border-bottom: 3px solid #278a6e;
}
#workspaces button.urgent {
border-bottom: 3px solid #d0818f;
}

View File

@@ -0,0 +1,25 @@
@import url("file:///home/lupan/.config/waybar/dark.css");
* {
font-family: HurmitNerdFont;
font-size: 12px;
}
#workspaces {
padding: 0 0.5rem;
}
#workspaces button {
padding: 0 3px;
border-radius: 0;
border-bottom: 3px solid transparent;
}
#window {
border-bottom: 3px solid transparent;
}
#clock {
padding: 0 0.5rem;
border-bottom: 3px solid transparent;
}

View File

@@ -1,5 +1,6 @@
alias v=nvim
alias k=kak
alias kd='kak -s "$(basename $PWD)"'
alias ll='ls -l'
alias tl='tmux list-sessions'
alias rgh='rg -.'
@@ -22,7 +23,7 @@ elif which exa > /dev/null; then
alias tree='exa --tree --icons'
else
eval $(dircolors)
alias ls='ls --color'
alias ls='ls --color=auto'
fi
alias nocaps='setxkbmap pl -option ctrl:nocaps'
@@ -37,6 +38,12 @@ a4i() {
fi
}
kc() {
local Q="${@:-}"
local NAME=$(kak -l | fzy -q "$Q")
[ -n "$NAME" ] && kak -c "$NAME"
}
tn() {
if [ $# -eq 0 ]; then
tmux new

View File

@@ -40,7 +40,9 @@ export GOBIN=~/.local/bin
# start X or Hyprland at login
if [ -z "$DISPLAY" -a -z "$WAYLAND_DISPLAY" -a "$(tty)" = /dev/tty1 ]; then
if which river kwm stdout-clock > /dev/null; then
if which niri > /dev/null; then
exec niri
elif which river kwm stdout-clock > /dev/null; then
export XKB_DEFAULT_LAYOUT=pl
exec river -c 'stdout-clock | kwm'
elif which /usr/bin/sx > /dev/null; then

View File

@@ -44,22 +44,39 @@ if [ -f "$ATOML" ]; then
sed -i "s#^import =.*#import = [\"~/.config/alacritty/$THEME.toml\"]#" "$ATOML"
fi
XSET=$(readlink -e ~/.config/xsettingsd/xsettingsd.conf)
# Kitty
if [ "$THEME" = dark ]; then
kitten themes --reload-in=all 'lupanbones-dark'
kitten themes --reload-in=all 'five-colors-dark'
elif [ "$THEME" = light ]; then
kitten themes --reload-in=all 'lupanbones-light'
kitten themes --reload-in=all 'five-colors-light'
fi
# Foot
FOOT=$(readlink -e ~/.config/foot/foot.ini)
if [ -n "$FOOT" ]; then
sed -i "s/^initial-color-theme .*/initial-color-theme = $THEME/" "$FOOT"
fi
# GTK
XSET=$(readlink -e ~/.config/xsettingsd/xsettingsd.conf)
if [ -n "$XSET" ]; then
sed -i -E "s#(Net/ThemeName) .*#\\1 \"${GTK_THEME}\"#" "$XSET"
pkill -HUP -x xsettingsd
gsettings set org.gnome.desktop.interface gtk-theme "${GTK_THEME}"
fi
# niri
NIRI=$(readlink -e ~/.config/niri/config.kdl)
if [ -n "$NIRI" ]; then
sed -i -E "s%^(include) \"(dark|light).kdl\".*%\\1 \"${THEME}.kdl\"%" "$NIRI"
fi
# waybar
WCSS=$(readlink -e ~/.config/waybar/style.css)
if [ -f "$WCSS" ]; then
sed -i -E "s#file:///.*/(light|dark)[.]css#file://$HOME/.config/waybar/$THEME.css#" "$WCSS"
fi
for session in $(kak -l); do
echo set-dark-or-light-colorscheme | kak -p $session
done