Skip to content

Instantly share code, notes, and snippets.

View junkblocker's full-sized avatar

Manpreet Singh junkblocker

View GitHub Profile
diff --git c/.talon/user/mine/firefox_wayland.talon i/.talon/user/mine/firefox_wayland.talon
new file mode 100644
index 000000000..dbf281dbe
--- /dev/null
+++ i/.talon/user/mine/firefox_wayland.talon
@@ -0,0 +1,4 @@
+user.wayland_window_class: org.mozilla.firefox
+-
+# This activates the tag 'user.tabs'.
+tag(): user.tabs
@junkblocker
junkblocker / c89cc.sh
Created April 3, 2026 17:01 — forked from alganet/c89cc.sh
c89cc.sh - standalone C89/ELF64 compiler in pure portable shell
#!/bin/sh
# ISC License
# Copyright (c) 2026 Alexandre Gomes Gaigalas <alganet@gmail.com>
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
@junkblocker
junkblocker / parser.sh
Created April 3, 2026 17:13 — forked from alganet/parser.sh
Prototype sh parser written in sh
# Copyright (c) Alexandre Gomes Gaigalas <alganet@gmail.com>
# SPDX-License-Identifier: ISC
_repeat () {
case "${2:-}" in
0|"") return;;
1) REPLY="$1"; return;;
2) REPLY="$1$1"; return;;
3) REPLY="$1$1$1"; return;;
4) REPLY="$1$1$1$1"; return;;
@junkblocker
junkblocker / vimtab.kak
Created June 2, 2026 15:05 — forked from dojoteef/vimtab.kak
Replicate Vim's expandtab and softtabstop behavior in kakoune
# Replicate expandtab from vim.
declare-option -docstring "Expand <tab> to spaces based on tabstop." bool expandtab yes
# Replicate softtabstop from vim.
declare-option -docstring "Make tabstop number of spaces feel like a <tab> when pressing <tab> or <backspace> in insert mode." int softtabstop 4
# Helper function for inserting a <tab>
def softtabstop-insert-tab -hidden %{
evaluate-commands -no-hooks -draft -itersel %{
try %sh{
@junkblocker
junkblocker / README.md
Created June 3, 2026 01:34 — forked from lobre/README.md
Understanding Kakoune’s Command Language: Parsing, Evaluations, and Beyond

Understanding Kakoune’s Command Language: Parsing, Evaluations, and Beyond

Kakoune is a modal editor. That means when you’re editing text, you’re constantly interacting with the editor using a powerful language of keystrokes — moving around, selecting text, transforming content, all through short, expressive commands typed directly in the editing interface. This is the core editing experience, and it’s what gives Kakoune its speed and fluidity.

But this isn’t the only way to interact with Kakoune.

There’s another side to Kakoune — a more structural, programmable one — which lets you interact with the editor through commands. These commands can be used to configure Kakoune, automate behavior, and define complex workflows. Commands can be written in configuration files, invoked via custom keybindings, or typed directly into the command prompt.

This document focuses on that second side: the command interface. We will explore how commands work, how they are built, and how Kakoune interprets them