- commit
- 59cfb47
- parent
- 5f6fca1
- author
- Eric Bower
- date
- 2026-01-14 09:43:25 -0500 EST
chore: kak github copy permalink
2 files changed,
+23,
-0
+2,
-0
1@@ -46,6 +46,7 @@ abbr -a ash "autossh -M 0 -q"
2 abbr -a picodb "ssh -L 5432:localhost:5432 pico.ash.0"
3 abbr -a gpt "llama-server -hf unsloth/gpt-oss-120b-GGUF:Q4_K_S -ngl 99 -c 4096 -t 16 --host 0.0.0.0 --port 8080"
4 abbr -a code "llama-server -hf unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF:Q4_K_XL -ngl 15 --host 0.0.0.0 --jinja --threads -1 --ctx-size 32000 --temp 0.7 --min-p 0.0 --top-p 0.80 --top-k 20 --repeat-penalty 1.05 --context-shift"
5+abbr -a ds "llama-server -hf unsloth/Qwen3-4B-Instruct-2507-GGUF:Q4_0 --jinja -ngl 99 -sm row --temp 0.6 --top-k 20 --top-p 0.95 --min-p 0 -c 40960 -n 32768 --no-context-shift --host 0.0.0.0 --port 8080"
6 abbr -a zmount zfs mount -a
7 abbr -a keys "keychain --eval --quiet --agents ssh,gpg ~/.ssh/id_ed25519 76D3FD02 | source"
8 abbr -a mdfmt uvx --with=mdformat-gfm --with=mdformat-frontmatter --with=mdformat-gfm-alerts mdformat --wrap no
9@@ -55,6 +56,7 @@ abbr -a jm sudo journalctl
10 abbr -a jmu journalctl --user
11 abbr -a gemini npx @google/gemini-cli
12 abbr -a amp npx @sourcegraph/amp
13+abbr -a k kak
14
15 function pw
16 tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' </dev/urandom | head -c 16; echo
+21,
-0
1@@ -23,6 +23,27 @@ hook global NormalKey y|d|c %{ # use osc 52 for yank
2 }
3 }
4
5+define-command copy-github-permalink %{
6+ evaluate-commands %sh{
7+ file=$(printf "%s" "$kak_buffile" | sed "s|^$(pwd)/||")
8+ line="$kak_cursor_line"
9+ github_remote=$(git config --get-regexp '^remote\..*\.url' | grep github.com | head -1 | awk '{print $2}')
10+ if [[ -z "$github_remote" ]]; then
11+ printf "echo 'error: No github remote found'"
12+ else
13+ remote=$(echo "$github_remote" | sed 's|^.*://||;s|^git@||;s|:|/|;s|\.git$||')
14+ commit=$(git rev-parse HEAD)
15+ url="https://$remote/blob/$commit/$file#L$line"
16+ encoded=$(printf %s "$url" | base64 | tr -d '\n')
17+ printf "set-register '\"' '%s'\n" "$url"
18+ printf "nop %%sh{ printf '\\e]52;;%s\\e\\\\' '%s' >/dev/tty }\n" "$encoded"
19+ printf "echo 'Copied github permalink to clipboard'"
20+ fi
21+ }
22+}
23+
24+map global user y ':copy-github-permalink<ret>' -docstring 'Copy github permalink'
25+
26 hook global WinCreate .* %{
27 addhl window/ column 100 default,rgb:404040
28 }