-
Notifications
You must be signed in to change notification settings - Fork 186
External Commands
VuiMuich edited this page Jun 17, 2023
·
21 revisions
This is a brief overview of the available external commands and their possible arguments.
You can pass the string of the external command directly to the pipe file. The file will be named "command-{display number}.pipe", where the display number can be found using echo $DISPLAY
.
For example from a shell you could use:
echo "SetLayout CenterMain" > $XDG_RUNTIME_DIR/leftwm/command-0.pipe
when on display 0. If you are on the leftwm 0.2.8 or above, external commands can be passed in using leftwm-command. Commands that contain arguments require quotes. For example:
leftwm-command "SetLayout CenterMain"
Commands can also be chained together, for example:
leftwm-command "SendWindowToTag 2" "SendWorkspaceToTag 0 2"
Command | Arguments (if needed) | Notes |
---|---|---|
Reload | Reloads leftwm | |
LoadTheme | Path-to/theme.ron |
usually used in themes up script to load a theme, for legacy themes use theme.toml and make sure you run a leftwm version that supports toml config format |
UnloadTheme | usually used in themes down script to unload the theme |
|
SetLayout | LayoutName |
|
NextLayout | ||
PreviousLayout | ||
RotateTag | ||
SetMarginMultiplier | multiplier as float |
set a factor by which the margin gets multiplied, use "1.0" to reset, negative values will be abs-converted |
SwapScreen | swaps two screens/workspaces | |
SendWorkspaceToTag |
workspace index tag_index
|
both indices as integer, focuses Tag on Workspace
|
SendWindowToTag | tag_index |
index as integer, sends currently focused window to Tag
|
MoveWindowToNextTag | follow |
bool (default true), sends currently focused window to next tag, if follow then focus follows moved window |
MoveWindowToPreviousTag | follow |
bool (default true), sends currently focused window to previous tag, if follow then focus follows moved window |
MoveWindowToLastWorkspace | moves currently focused window to last used workspace | |
MoveWindowToNextWorkspace | moves currently focused window to next workspace | |
MoveWindowToPreviousWorkspace | moves currently focused window to previous workspace | |
MoveWindowDown | moves currently focused window down once | |
MoveWindowUp | moves currently focused window up once | |
MoveWindowTop | swap |
bool (default true), moves currently focused window to the top, if swap and focused window is already on top move it one position down. If not swap and focused window is already on top, nothing happens |
SwapWindowTop | swap |
bool (default true), swaps currently focused window with the top one , if swap and focused window is already on top swap it with the one below it. If not swap and focused window is already on top, nothing happens |
FloatingToTile | pushes currently focused floating window back to tiling mode | |
TileToFloating | Switch currently focused tiled window to floating mode | |
ToggleFloating | Switch currently focused window between tiled and floating mode | |
CloseWindow | closes currently focused window | |
FocusWindowDown | ||
FocusWindowUp | ||
FocusWindowTop | toggle |
Focus to top (main) window. If toggle is true, select the previous window if already on the top window. Only available in LeftWM >=0.2.11. |
FocusNextTag | behavior |
string (defaults empty), determines command behavior. No value or default will simply move focus to the next tag, goto_used and ignore_empty will go to the next used tag, and goto_empty and ignore_used will go to the next empty tag. |
FocusPreviousTag | behavior |
string (defaults empty), determines command behavior. No value or default will simply move focus to the previous tag, goto_used and ignore_empty will go to the previous used tag, and goto_empty and ignore_used will go to the previous empty tag. |
FocusWorkspaceNext | ||
FocusWorkspacePrevious | ||
ToggleFullScreen | Makes currently focused window fullscreen/non-fullscreen | |
ToggleSticky | Makes currently focused window sticky/non-sticky | |
ReturnToLastTag | Switch back to the last visited tag. Only available in LeftWM >=0.3.0 | |
ReleaseScratchPad |
scratchpad name , tag id or no argument |
Move the currently focused scratchpad or the scratchpad with scratchpad name to tag id or the current tag if nothing provided as argument. Only available in LeftWM > 0.2.11 |
AttachScratchPad | scratchpad name |
Attach the currently selected window to the given scratchpad. Only available in LeftWM > 0.2.11 |
NextScratchPadWindow | scratchpad name |
Cycle to the next scratchpad window only if the given scratchpad is visible. Only available in LeftWM > 0.2.11 |
PrevScratchPadWindow | scratchpad name |
Cycle to the previous scratchpad window only if the given scratchpad is visible. Only available in LeftWM > 0.2.11 |