Skip to content

Instantly share code, notes, and snippets.

View DmitrySkibitsky's full-sized avatar
🏠
Working from home

Dmitry Skibitsky DmitrySkibitsky

🏠
Working from home
View GitHub Profile
@DmitrySkibitsky
DmitrySkibitsky / Smart_Keyboard_Layout_Switcher_for_Niri.md
Created May 18, 2026 21:49
Smart Keyboard Layout Switcher for Niri (NixOS)

Smart Keyboard Layout Switcher for Niri (NixOS)

A Mod+Space layout switcher daemon for the Niri Wayland compositor with two behaviours in one binding:

Gesture Result
Quick tap Mod↓ Space↓ Mod↑ (< 350 ms) Toggle between the last two committed layouts
Hold + tap Mod↓ Space↓ Space↓ … Cycle through all layouts one by one

The toggle memory survives reboots β€” the daemon writes the "previous layout" to /tmp/niri-layout-daemon so after a fresh login a single tap jumps straight back to your last language.

@DmitrySkibitsky
DmitrySkibitsky / Makefile
Last active March 9, 2026 11:04
mago (Symfony)
# ─────────────────────────────────────────────────────────────────────────────
MAGO_IMAGE := mago:latest
MAGO_DOCKERFILE := docker/mago/Dockerfile
_SERVICE_ABS := $(abspath $(_SERVICE_DIR))
_FILE_ARG := $(if $(FILE),$(patsubst $(_SERVICE_ABS)/%,%,$(FILE)),)
_MAGO_ARGS := $(if $(_FILE_ARG),$(CMD) $(_FILE_ARG),$(CMD))
# Mago targets
# ─────────────────────────────────────────────────────────────────────────────
mago-build: ## Build the mago Docker image (run once, or after version bump)