- commit
- b840dbc
- parent
- 59cfb47
- author
- Eric Bower
- date
- 2026-01-16 23:39:53 -0500 EST
chore(kak): copy to osc52 separate command
1 files changed,
+6,
-3
+6,
-3
1@@ -16,13 +16,16 @@ define-command dowrap %{ # soft-wrap command
2 map buffer normal k gu
3 }
4
5-hook global NormalKey y|d|c %{ # use osc 52 for yank
6+define-command copy-to-osc %{
7 nop %sh{
8- encoded=$(printf %s "$kak_main_reg_dquote" | base64 | tr -d '\n')
9+ encoded=$(printf %s "$kak_selections" | base64 | tr -d '\n')
10 printf "\e]52;;%s\e\\" "$encoded" >/dev/tty
11 }
12+ echo "Copied selections to OSC52 clipboard"
13 }
14
15+map global user y ':copy-to-osc<ret>' -docstring 'Copy to OSC52 clipboard'
16+
17 define-command copy-github-permalink %{
18 evaluate-commands %sh{
19 file=$(printf "%s" "$kak_buffile" | sed "s|^$(pwd)/||")
20@@ -42,7 +45,7 @@ define-command copy-github-permalink %{
21 }
22 }
23
24-map global user y ':copy-github-permalink<ret>' -docstring 'Copy github permalink'
25+map global user u ':copy-github-permalink<ret>' -docstring 'Copy github permalink'
26
27 hook global WinCreate .* %{
28 addhl window/ column 100 default,rgb:404040