Skip to content

instantwmctl

instantwmctl is the command-line control tool for instantWM. It allows you to manage windows, tags, layouts, and other settings at runtime.

Usage

bash
instantwmctl [command]

General Commands

CommandDescription
instantwmctl statusShow status information about the running instantWM instance
instantwmctl reloadReload configuration from disk
instantwmctl spawn "command"Spawn a command
instantwmctl warp-focusWarp cursor to the focused window
instantwmctl update-status "text"Update status bar text
instantwmctl wallpaper /path/to/imageSet wallpaper

Window Management

CommandDescription
instantwmctl window listList all managed windows
instantwmctl window geomGet geometry of focused window
instantwmctl window closeClose focused window
instantwmctl window close <window-id>Close specific window

Tag/Workspace Management

CommandDescription
instantwmctl tagSwitch to tag 2 (default)
instantwmctl tag <number>Switch to tag number (1-8)
instantwmctl tag name <name>Rename current tag
instantwmctl tag resetReset all tag names to defaults

Layout Management

CommandDescription
instantwmctl layoutSwitch to tile layout
instantwmctl layout <number>Switch to layout by index

Layout indices:

  • 0 = Tile
  • 1 = Grid
  • 2 = Floating
  • 3 = Monocle
  • 4 = Vert
  • 5 = Deck
  • 6 = Overview
  • 7 = Bstack
  • 8 = Horiz

Monitor Management

CommandDescription
instantwmctl monitor listList all monitors
instantwmctl monitor switch <index>Switch to monitor by index
instantwmctl monitor nextSwitch to next monitor
instantwmctl monitor prevSwitch to previous monitor
instantwmctl monitor set -r 1920x1080 -f 144Configure monitor
instantwmctl monitor set --enableEnable monitor
instantwmctl monitor set --disableDisable monitor

Monitor set options:

  • -r, --res - Resolution (e.g., "1920x1080")
  • -f, --rate - Refresh rate in Hz
  • -p, --pos - Position (e.g., "1920,0")
  • -s, --scale - Scale factor

Window Movement

CommandDescription
instantwmctl tagmonMove window to next monitor
instantwmctl tagmon -1Move window to previous monitor
instantwmctl followmonMove window to next monitor and follow
instantwmctl followmon -1Move window to previous monitor and follow

Toggle Features

CommandDescription
instantwmctl toggle animatedToggle window animations
instantwmctl toggle focus-follows-mouseToggle focus follows mouse
instantwmctl toggle focus-follows-float-mouseToggle focus follows mouse for floating windows
instantwmctl toggle alt-tabToggle alt-tab mode
instantwmctl toggle alt-tagToggle alt-tag mode
instantwmctl toggle hide-tagsToggle hide tags

Toggle actions can take additional arguments:

  • instantwmctl toggle animated enable - Enable
  • instantwmctl toggle animated disable - Disable
  • instantwmctl toggle animated - Toggle

Border and Prefix

CommandDescription
instantwmctl border <width>Set border width in pixels
instantwmctl prefixEnable prefix mode
instantwmctl prefix 0Disable prefix mode
instantwmctl special-nextEnable special next mode for cycling
instantwmctl special-next 0Disable special next mode

Keyboard Layout

CommandDescription
instantwmctl keyboard listList configured layouts
instantwmctl keyboard list --allList all available XKB layouts
instantwmctl keyboard statusShow current keyboard layout
instantwmctl keyboard nextSwitch to next keyboard layout
instantwmctl keyboard prevSwitch to previous keyboard layout
instantwmctl keyboard set us de frSet keyboard layouts
instantwmctl keyboard add <layout>Add keyboard layout
instantwmctl keyboard remove <layout>Remove keyboard layout

Layouts can include variants: de(nodeadkeys), us(intl), etc.

Scratchpad

CommandDescription
instantwmctl scratchpad listList all scratchpads
instantwmctl scratchpad statusShow scratchpad visibility
instantwmctl scratchpad show <name>Show scratchpad
instantwmctl scratchpad hide <name>Hide scratchpad
instantwmctl scratchpad toggleToggle default scratchpad
instantwmctl scratchpad toggle <name>Toggle named scratchpad
instantwmctl scratchpad createCreate scratchpad from focused window
instantwmctl scratchpad create <name>Create named scratchpad
instantwmctl scratchpad deleteDelete scratchpad from focused window

Input Devices (Mouse/Touchpad)

CommandDescription
instantwmctl mouse listList input device configuration
instantwmctl mouse list "type:touchpad"List touchpad configuration
instantwmctl mouse pointer-accel "type:touchpad" 0.5Set pointer acceleration
instantwmctl mouse accel-profile "type:touchpad" flatSet acceleration profile
instantwmctl mouse tap "type:touchpad" enabledEnable tap-to-click
instantwmctl mouse natural-scroll "type:touchpad" enabledEnable natural scrolling
instantwmctl mouse scroll-factor "type:touchpad" 2.0Set scroll factor

Valid identifiers: type:touchpad, type:pointer, type:keyboard, or * for all devices.

Modes

CommandDescription
instantwmctl mode listList all configured modes
instantwmctl mode set <name>Enter a mode
instantwmctl mode set defaultExit current mode

See Configuration for creating custom modes.

Actions

You can run any keybinding action directly:

bash
# List all available actions
instantwmctl action --list

# Run a named action
instantwmctl action zoom
instantwmctl action kill
instantwmctl action toggle_bar

# Run action with arguments
instantwmctl action set_layout tile
instantwmctl action inc_nmaster 2
instantwmctl action set_mfact 0.1

Examples

bash
# Open a program
instantwmctl spawn "firefox"

# Switch to workspace 3
instantwmctl tag 3

# Toggle animations
instantwmctl toggle animated

# Change layout to grid
instantwmctl layout 1

# Enable tap-to-click on touchpad
instantwmctl mouse tap "type:touchpad" enabled

# Add a keyboard layout
instantwmctl keyboard add "fr"

# Make current window a scratchpad
instantwmctl scratchpad create "myterm"

# Set wallpaper
instantwmctl wallpaper ~/Pictures/wallpaper.png