Skip to content

Instantly share code, notes, and snippets.

View ckafi's full-sized avatar

Tobias Frilling ckafi

View GitHub Profile
@ckafi
ckafi / PKGBUILD
Last active March 9, 2025 16:17
PKGBUILD for zig-nightly-bin
# Maintainer: James David Clarke <james@jamesdavidclarke.com>
pkgname=zig-nightly-bin
pkgver=0.15.0_dev.14.g21620f3c6
pkgrel=1
pkgdesc="A general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software (nightly build)"
arch=('x86_64' 'aarch64')
url="https://ziglang.org/"
license=('MIT')
provides=('zig')

Keybase proof

I hereby claim:

  • I am ckafi on github.
  • I am ckafi (https://keybase.io/ckafi) on keybase.
  • I have a public key whose fingerprint is 4DB7 C38E 68F1 59B7 5848 9DD9 D560 DD1A 42ED 90BC

To claim this, I am signing this object:

@ckafi
ckafi / track_prev_focus
Last active June 17, 2025 20:22
Tracks the previosly focused window in sway and marks it with '_prev'
#!/bin/sh
prev_focus=$(swaymsg -r -t get_seats | jq '.[0].focus')
swaymsg -m -t subscribe '["window"]' | \
jq --unbuffered 'select(.change == "focus").container.id' | \
while read new_focus; do
swaymsg "[con_id=${prev_focus}] mark --add _prev" &>/dev/null
prev_focus=$new_focus
done