cagebreak-config(5)

πŸ“¦
version 3.2.0 Β· 4 versions
, in alpine 3.24

cagebreak-config(5) β€” Cagebreak Manual, but make it group chat πŸŽ€πŸ’…

🌸 NAME 🌸

cagebreak-config β€” Cagebreak configuration file. This is literally the file where you tell Cagebreak what to do, bestie. πŸ‘‘

✨ SYNOPSIS ✨

$XDG_CONFIG_PATH/cagebreak/config

πŸ¦‹ DESCRIPTION πŸ¦‹

The cagebreak configuration is a plain text file. No secret binary nonsense, no weird encoding arc, just text. πŸŽ€

Each line consists of a comment or a command and its arguments which are parsed sequentially but independently from the rest of the file. The way that works is very β€œone line at a time, main character energy” β€” a line does not need its neighbor to make sense. ✨

Each line starting with a # is a comment.

Lowkey important: nesting of commands is limited to 50 times. Lines are arbitrarily long in practice, though a reasonable limit of 4Mb has been set. πŸ’€

See KEY DEFINITIONS for details on modifier keys and MODES for details on modes.

πŸ’… COMMANDS πŸ’…

Here's the whole command menu, bestie. Every single one. No skips, no β€œlol you'll figure it out”. 🫢

  • abort β€” Return to default mode. It's the β€œtake me back” button, no cap. 🫢
  • background <r> <g> <b> β€” Set RGB of background. <[r|g|b]> are floating point numbers between 0 and 1. There is no support for background images. So yes, solid colors only, bestie. 🌈
# Set background to red
background 1.0 0.0 0.0
  • bind <key> <command> β€” Bind <key> to execute <command> if pressed in root mode. πŸŽ€
bind <key> <command>
# is equivalent to
definekey root <key> <command>
  • close β€” Close current window β€” This may be useful for windows of applications which do not offer any method of closing them. It's giving β€œescape hatch for feral app windows”. πŸ’€
  • configure_message β€” Configure message characteristics. The full syntax is:
configure_message [font <font description>|[f|b]g_color <r> <g> <b> <a>|display_time <n>|anchor <position>|[enable|disable]]
  • font <font description> sets the font of the message. Here, <font description> is either
    • an X core font description or
    • a FreeType font description via pango
  • fg_color <r> <g> <b> <a> sets the RGBA of the foreground
  • bg_color <r> <g> <b> <a> sets the RGBA of the background
  • display_time <n> sets the display time in seconds
  • anchor <position> sets the position of the message. <position> may be one of {top,bottom}_{left,center,right} or center.
  • [enable|disable] Enable or disable messages
# Set font
## Set example X code font
configure_message font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
## Set example FreeType font description
configure_message font pango:monospace 10

# Set foreground RGBA to red
configure_message fg_color 1.0 0.0 0.0 1.0

# Set background RGBA to red
configure_message bg_color 1.0 0.0 0.0 1.0

# Set duration for message display to four seconds
configure_message display_time 4
  • cursor [enable|disable] β€” Enable or disable cursor. This simply hides the cursor. Pointing and clicking is still possible. So the cursor can ghost, but the clicks still ate. πŸ–±οΈβœ¨
  • custom_event <message> β€” Send a custom event to the IPC socket. This sends an event of type "custom_event" to all programs listening to the IPC socket along with the string <message>. See cagebreak-socket(7) for more details. πŸ›°οΈ
  • definekey <mode> <key> <command> β€” Bind <key> to execute <command> if pressed in <mode> β€” definekey is a more general version of bind. It's the deluxe edition, fr fr. πŸ‘‘
  • definemode <mode> β€” Define new mode <mode> β€” After a call to definemode, <mode> can be used with definekey to create a custom key mapping. Custom mode era. πŸ’…
# define new mode and create a mapping for it
definemode foo
definekey foo C-t abort
  • dump β€” Triggers the dump event, see cagebreak-socket(7) for details. It's giving β€œsend the state to the socket besties”. πŸ“€
  • escape <key> β€” Set <key> to switch to root mode to execute one command. 🫢
escape <key>
# is equivalent to
definekey top <key> mode root
  • exchange <tile_id 1> <tile_id 2> [<follow_focus>] β€” Exchange tile ids <tile_id 1> and <tile_id 2>, optionally set follow_focus to 0 to disable to focus following. Tile swap behavior, but make it intentional. πŸ”
  • exchangedown β€” Exchange current window with window in the tile to the bottom. Down bad, but spatially. ⬇️
  • exchangeleft β€” Exchange current window with window in the tile to the left. ⬅️
  • exchangeright β€” Exchange current window with window in the tile to the right. ➑️
  • exchangeup β€” Exchange current window with window in the tile to the top. ⬆️
  • exec <command> β€” Execute <command> using sh -c. Yes, shell time. 🐚
  • focus [<tile_id>] β€” If <tile_id> is provided, focus it, else focus next tile. Focus is the main character, obviously. πŸ‘€
  • focusdown β€” Focus tile to the bottom. β¬‡οΈβœ¨
  • focusleft β€” Focus tile to the left. β¬…οΈβœ¨
  • focusprev β€” Focus previous tile. βͺ
  • focusright β€” Focus tile to the right. ➑️✨
  • focusup β€” Focus tile to the top. β¬†οΈβœ¨
  • hsplit [<percentage>] β€” Split current tile horizontally, optionally give a float between 0.0 and 1.0 as a percentage of the screen size to split. Horizontal split, horizontal slay. πŸŽ€
  • input <identifier> <setting> <value> β€” Set <setting> to <value> for device <identifier> β€” <identifier> can be "*" (wildcard), of the form "type:<device_type>" or the identifier of the device as printed for example by cagebreak -s. The supported input types are:
    • touchpad
    • pointer
    • keyboard
    • touch
    • tablet_tool
    • tablet_pad
    • switch

Configurations are applied sequentially. Currently, only libinput devices may be configured. The available settings and their corresponding values are as follows:

  • accel_profile adaptive|flat β€” Set pointer acceleration profile for specified input device
  • calibration_matrix <6 space-separated floating point values> β€” Set calibration matrix
  • click_method none|button_areas|clickfinger β€” Change click method for the specified device
  • drag enabled|disabled β€” Enable or disable tap-and-drag for specified input device
  • drag_lock enabled|disabled β€” Enable or disable drag lock for specified input device
  • dwt enabled|disabled β€” Enable or disable disable-while-typing for specified input device
  • events enabled|disabled|disabled_on_external_mouse β€” Enable or disable send_events for specified input device β€” Disabling send_events disables the input device.
  • keybindings [enabled|disabled] β€” Enable or disable keybinding interpretation for a specific keyboard.
  • left_handed enabled|disabled β€” Enable or disable left handed mode for specified input device
  • middle_emulation enabled|disabled β€” Enable or disable middle click emulation
  • natural_scroll enabled|disabled β€” Enable or disable natural (inverted) scrolling for specified input device
  • pointer_accel [<-1|1>] β€” Change the pointer acceleration for specified input device
  • scroll_button disable|<event-code-or-name> β€” Set button used for scroll_method on_button_down β€” The button can be given as an event name or code, which can be obtained from libinput debug-events. If set to disable, it disables the scroll_method on_button_down.
  • scroll_factor <floating point value> β€” Change the scroll factor for the specified input device β€” Scroll speed will be scaled by the given value, which must be non-negative.
  • scroll_method none|two_finger|edge|on_button_down β€” Change scroll method for specified input device
  • repeat_delay <n> β€” Repeat delay in ms for keyboards only
  • repeat_rate <n> β€” Repeat rate in 1/s for keyboards only
  • tap enabled|disabled β€” Enable or disable tap for specified input device
  • tap_button_map lrm|lmr β€” Specify which button mapping to use for tapping β€” lrm treats 1 finger as left click, 2 fingers as right click, and 3 fingers as middle click. lmr treats 1 finger as left click, 2 fingers as middle click, and 3 fingers as right click.
  • message <text> β€” Display a line of arbitrary text. Say something iconic. πŸ’¬
  • mode <mode> β€” Enter mode "<mode>" β€” Returns to default mode, after a command is executed. Temporary mode behavior, very cinderella. 🧚
  • movetonextscreen β€” Move currently focused window to next screen. See output for differences between screen and output. πŸ–₯️➑️
  • movetoprevscreen β€” Move currently focused window to previous screen. See output for differences between screen and output. ⬅️πŸ–₯️
  • movetoscreen <n> β€” Move currently focused window to <n>-th screen. See output for differences between screen and output. πŸ–₯️
  • movetoworkspace <n> β€” Move currently focused window to <n>-th workspace. See output for differences between screen and output. πŸ—‚οΈ
  • moveviewtotile <view_id> <tile_id> [<follow_focus>] β€” Move view with <view_id> to tile with <tile_id>, optionally set <follow_focus> to 0 to disable following the view with the focus. 🧳
  • moveviewtoworkspace <view_id> <workspace> [<follow_focus>] β€” Move view with <view_id> to workspace number <workspace>, optionally set <follow_focus> to 0 to disable following the view with the focus. πŸ—‚οΈβœ¨
  • moveviewtoscreen <view_id> <screen> [<follow_focus>] β€” Move view with <view_id> to screen number <screen>, optionally set <follow_focus> to 0 to disable following the view with the focus. πŸ–₯️✨
  • mergeleft [<tile_id>] β€” Merge tile to the left, relative to the focussed tile by default, the specified <tile_id> otherwise. Merge behavior, left edition. β¬…οΈπŸ«Ά
  • mergeright [<tile_id>] β€” Merge tile to the right, relative to the focussed tile by default, the specified <tile_id> otherwise. ➑️🫢
  • mergeup [<tile_id> β€” Merge tile to the top, relative to the focussed tile by default, the specified <tile_id> otherwise. β¬†οΈπŸ«Ά
  • mergedown [<tile_id> β€” Merge tile to the bottom, relative to the focussed tile by default, the specified <tile_id> otherwise. β¬‡οΈπŸ«Ά
  • next [<view_id>] β€” If given a <view_id>, focus it else focus next. Next bestie, please stand up. πŸ™‹
  • nextscreen β€” Focus next screen. See output for differences between screen and output. πŸ–₯️➑️✨
  • only [<screen> <workspace>] β€” Remove all splits and make current view fill the entire screen on current screen and workspace by default or <screen> and <workspace> if given. One window to rule them all, no cap. πŸ‘‘πŸ–₯️
  • output <name> [[pos <xpos> <ypos> res <width>x<height> rate <rate> [scale <scale>]] | enable | disable | [permanent|peripheral] | prio <n> | rotate <n>] β€” configure output "<name>" ✨

Okay so this one's a whole little menu of things you can do to a monitor, lowkey the most extra command in the whole file. Here's the rundown bestie:

  • <xpos> and <ypos> are the position of the monitor in pixels. The top-left monitor should have the coordinates 0 0. (top-left is the main character, everyone else is relative to her πŸ’…)
  • <width> and <height> specify the resolution in pixels.
  • <rate> sets the refresh rate of the monitor (often this is 50 or 60).
  • <scale> sets the output scale (default is 1.0, minimum is 0.01, maximum is 10.0) so yes there ARE bounds, don't get weird with it
  • enable and disable enable or disable <name>. Note that if <output> is the only enabled output, output <output> disable has no effect. (the last one standing can't leave the party, sorry 🫢)
  • permanent sets <name> to persist even on disconnect. When the physical monitor is disconnected, the output is maintained and operates identically to the attached monitor. On reconnect, the monitor operates as though it was never disconnected. Setting the output role to peripheral when the monitor is disconnected, destroys the output, as if the monitor were disconnected.
  • peripheral sets the role of <name> to peripheral, meaning that on disconnecting the respective monitor, all views will be moved to another available output. The default role is peripheral.
  • prio <n> is used to set the priority of an output. If nothing else is set, outputs are added as they request to be added and have a numerical priority of -1. Using prio <n> it is possible to set priorities for outputs, where <n> >= 1. The larger <n> is, the higher the priority is, that is to say, the earlier the output will appear in the list of outputs. (bigger number = earlier in the lineup = more important vibes)
  • rotate <n> is used to rotate the output by <n> mod 4 x 90 degrees counter-clockwise.

And here's the rotation cheat sheet, straight from the source, no cap:

# Don't rotate
output DP-1 rotate 0

# rotate 90 degrees counter-clockwise
output DP-1 rotate 1

# rotate 180 degrees counter-clockwise
output DP-1 rotate 2

# rotate 270 degrees counter-clockwise
output DP-1 rotate 3

Also important lore: output and the screen family of commands are similar in that they both deal with monitors on some level. The difference, iykyk:

  • output addresses outputs by their name and is vaguely symmetric to input.
  • Any screen command deals with the number identifying a monitor within a Cagebreak session either explicitly or implicitly (i.e. the commands containing next and prev).
  • prev β€” Focus previous window in current tile <butterfly>back one, bestie</butterfly>
  • prevscreen β€” Focus previous screen
  • quit β€” Exit cagebreak (she's leaving, say bye πŸ’€)
  • resizedown [<pixels> [<tile_id>]] β€” Resize towards the bottom, by 10 pixels by default and <pixels> if given, on the focussed tile by default and <tile_id> if given.
  • resizeleft [<pixels> [<tile_id>]] β€” Resize towards the left, by 10 pixels by default and <pixels> if given, on the focussed tile by default and <tile_id> if given.
  • resizeright [<pixels> [<tile_id>]] β€” Resize towards the right, by 10 pixels by default and <pixels> if given, on the focussed tile by default and <tile_id> if given.
  • resizeup [<pixels> [<tile_id>]] β€” Resize towards the top, by 10 pixels by default and <pixels> if given, on the focussed tile by default and <tile_id> if given.
  • screen <n> β€” Change to <n>-th screen. See output for differences between screen and output. (scroll up, it's all there πŸ’–)
  • show_info β€” Display information about the current setup β€” In particular, print the identifiers of the available inputs and outputs. basically the receipts for everything currently plugged in
  • setmode <mode> β€” Set default mode to <mode>
  • setmodecursor <mode> <cursor> β€” Set cursor to be <cursor> when in mode <mode>
  • switchvt <n> β€” Switch to tty <n>
  • time β€” Display time (clock check ⭐)
  • vsplit [<percentage>] β€” Split current tile vertically, optionally give a float between 0.0 and 1.0 as a percentage of the screen size to split
  • workspace <n> β€” Change to <n>-th workspace
  • workspaces <n> β€” Set number of workspaces to <n> β€” <n> is a single integer larger than 1 and less than 30. fr fr, keep it in that range, there's a limit okay

πŸŽ€ MODES πŸŽ€

By default, three modes are defined. Three! Default! Modes! the range, the drama

top

Default mode β€” Keybindings defined in this mode can be accessed directly.

  • definekey can be used to set keybindings for top mode.
  • setmode can be used to set a different default mode.

root

Command mode β€” Keybindings defined in this mode can be accessed after pressing the key defined by escape.

  • bind can be used to set keybindings for root mode.

resize

Resize mode β€” Used to resize tiles.

definemode can be used to create additional modes. build your own, be the architect of your own destiny bestie


✨ KEY DEFINITIONS ✨

Keys are specified by their names as displayed for example by xev.

Modifiers can be specified using the following syntax:

<mod>-<key>

The supported modifiers are:

  • A β€” Alt
  • C β€” Control
  • L β€” Logo
  • S β€” Shift
  • 2 β€” Mod 2
  • 3 β€” Mod 3
  • 5 β€” Mod 5

For example to specify the keybinding Control+t, the expression

C-t

is used. see? not scary at all 🫢


🌸 SEE ALSO 🌸

cagebreak(1) cagebreak-socket(7)


πŸ’€ BUGS πŸ’€

See GitHub Issues: <https://github.com/project-repo/cagebreak/issues>

Mail contact: cagebreak @ project-repo . co

GPG Fingerprints:

  • 0A268C188D7949FEB39FD1462F2AD980247E4918
  • 283D10F54201B0C6CCEE2C561DE04E4B056C749D

πŸ‘‘ LICENSE πŸ‘‘

Copyright (c) 2020-2024 The Cagebreak authors

Copyright (c) 2018-2020 Jente Hidskes

Copyright (c) 2019 The Sway authors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


and that's the whole page bestie!! πŸŽ€βœ¨ this little beauty is Version 3.2.0, dated 2026-04-15, and it's the cagebreak-config(5) page β€” go forth and configure, you absolute icon πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from