Skip to content

Instantly share code, notes, and snippets.

@iguanajuice
iguanajuice / README.md
Last active April 27, 2026 18:53 — forked from oskar456/README.md
CLAT for Linux using Jool and ipvlan PoC

CLAT for Linux using ipvlan

This proof of concept uses ipvlan feature of Linux to split up main network interface into two in order to use one in a separate namespace with jool-siit performing CLAT translation.

This way, enabling CLAT is least intrusive to the default network namespace - no need to enable forwarding or touch firewall rules.

#!/bin/sh -e
APPNAME=$(basename $0)
CON_NAME=$1
DATA_DIR="$HOME/.local/share/distrobox/$CON_NAME"
if ! [ $CON_NAME ]
then
echo "Usage:\n\t$APPNAME <container_name>"
exit 1
@iguanajuice
iguanajuice / scratchpad.sh
Last active February 10, 2026 02:47
Use fuzzel to focus windows in Sway's scratchpad
#!/bin/sh
pkill fuzzel && exit
LIST=`swaymsg -t get_tree | jq -r '
.nodes[].nodes[].floating_nodes[] |
select(.marks==[] and .scratchpad_state!="none") |
"[\(.id)] \(.name)"
'`
@iguanajuice
iguanajuice / swaywait.sh
Last active January 26, 2025 07:11
Run a sway command when a window appears. Like `for_window` but temporary.
#!/bin/sh
if [ $# -ne 2 ]
then
echo "Usage: swaywait [app_id/class] [sway_command]"
exit 1
fi
TARGET=$1
COMMAND=$2