Skip to content

Instantly share code, notes, and snippets.

@un-def
un-def / i3pws.py
Last active July 15, 2024 21:02
i3 persistent workspaces
from __future__ import annotations
import argparse
import json
import subprocess
from typing import Callable, Iterable, Iterator, TypedDict
class Workspace(TypedDict):
name: str
@un-def
un-def / kbdl.sh
Last active July 18, 2024 12:33
Multi–layout Switcher based on kbdd
#!/bin/sh
### Constants
# the index of the first layout in the primary layer
PRIMARY_LAYER=0
# the index of the first and only layout in the secondary layer
SECONDARY_LAYER=2
### Functions