AutoYADM commit: 2025-07-16 17:22:15
This commit is contained in:
parent
cd1aca4f2d
commit
0827fa198e
1 changed files with 25 additions and 0 deletions
25
.config/kak/autoload/minimap.kak
Normal file
25
.config/kak/autoload/minimap.kak
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
provide-module minimap %~
|
||||||
|
declare-option str minimap_text
|
||||||
|
declare-option str minimap_bg '#121212'
|
||||||
|
declare-option str minimap_fg '#d5d5d5'
|
||||||
|
|
||||||
|
define-command generate_minimap %{
|
||||||
|
set-option window minimap_text %sh{
|
||||||
|
magick -font Iosevka \
|
||||||
|
-background "$kak_opt_minimap_bg" -fill "$kak_opt_minimap_fg" \
|
||||||
|
"text:$kak_buffile" -scale 100x400 "sixel:-"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
define-command enable-minimap %{
|
||||||
|
hook window NormalIdle .* %{
|
||||||
|
nop %sh{
|
||||||
|
exec > /dev/tty
|
||||||
|
printf "\033[s\033[0;$(( $(tput cols < /dev/tty) - 10 ))H"
|
||||||
|
echo "$kak_opt_minimap_text"
|
||||||
|
printf "\033[u"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
generate_minimap
|
||||||
|
}
|
||||||
|
~
|
Loading…
Add table
Add a link
Reference in a new issue