Configure
BoxedIn reads a Tcl config file. Settings changes the common options without it.
Configuration
The config file is ~/.config/boxedin/boxedin.tcl. Menu bar → Create Config writes the default config there. The file reloads when you save it, and Settings → Config lists problems with file and line.
The file is a Tcl script, run by ztcl. Variables, loops, and procs work. The interpreter has no file, network, or process access of its own. Commands such as exec are BoxedIn's. Each script has a limit of 5 million steps, so a loop in a bind stops after about half a second.
Check a file from a shell:
BoxedIn.app/Contents/MacOS/BoxedIn check ~/.config/boxedin/boxedin.tcl
Config commands
bind
bind ?-repeat? ?-release? ?-mouse? ?-desc text? mods key script
Runs script when the key is pressed. mods is a list of modifiers, such as cmd, "opt shift", or opt+shift. Use "" for no modifier.
| Flag | Effect |
|---|---|
-repeat | The bind fires again while the key is held. |
-release | The bind fires when the key is released. |
-mouse | A drag bind on a mouse button. The script is movewindow or resizewindow. |
-desc text | The text in the key binding sheet and in Settings. |
unbind
unbind mods key
option, and section commands
option general:gaps_in 8
general gaps_in 8 gaps_out 12
general { gaps_in 8 gaps_out 12 }
option key ?value? sets or reads one option. The section commands general, dwindle, input, decoration, group, animations, misc, and boxedin set several keys of one section.
windowrule
windowrule effect ?-class regex? ?-title regex?
The class is the app's bundle ID or its name. Effects: float, tile, fullscreen, pin, pseudo, and workspace N or workspace N silent.
on
on event command-prefix
Runs the command prefix with the event's arguments added. See Hooks.
exec-once
exec-once open -a Raycast
Runs a shell command once, when BoxedIn starts.
hyprland
hyprland ~/.config/hypr/hyprland.conf
Reads a hyprland.conf file. See Hyprland configs.
dispatch, log, and queries
| Command | Result |
|---|---|
dispatch name ?arg ...? | Runs a dispatcher. Each dispatcher is also a command of its own. |
log text | Writes to the log in Settings → Console. puts writes there too. |
windows | A list of dicts with id app bundle title workspace floating focused. |
activewindow | The dict of the focused window, or an empty string. |
activeworkspace | The number of the active workspace. |
workspaces | A list of dicts with id windows. |
binds | A list of dicts with mods key action source. |
Hooks
| Event | Arguments |
|---|---|
workspace | The new workspace number. |
special | The scratchpad name, then 1 when shown or 0 when hidden. |
window-created | Window ID, app name, and title. |
window-closed, window-focused | Window ID. |
window-moved | Window ID and workspace. |
on window-created {apply {{id app title} {
if {$app eq "Music"} { focuswindow id:$id; movetoworkspacesilent 9 }
}}}
Scripting from a shell
BoxedIn msg sends Tcl to the running app over a Unix socket at /tmp/boxedin-UID.sock, with mode 0600. It prints the result, and the exit status is 0 on success.
BoxedIn.app/Contents/MacOS/BoxedIn msg workspace 3
BoxedIn.app/Contents/MacOS/BoxedIn msg 'foreach w [windows] { puts [dict get $w title] }'
Settings → Console runs the same commands.
Hyprland configs
The hyprland command reads hyprland.conf syntax: variables, sections, section:key options, bind with the flags e r l m d, unbind, windowrule and windowrulev2, exec, exec-once, and source. It skips monitor, env, animation, and bezier lines. Omarchy's Lua config is not read.
SUPER is ⌘ unless boxedin super_key says otherwise. With alt, Hyprland binds go to the same physical keys as on a PC keyboard.