These were developed mainly for use in fluxbox but would probably be usable in any non-tiling EWMH/NetWM compatible X Window Manager.
xwin-utils generic functions for the X11 scripts
Generally, these require wmctrl(1)
binpack - a python script that optimally packs windows onto the screen - used by the tile script; useful in most non-tiling WMs eg Fluxbox
Usage: binpack width height Reads lines with "id w h" from stdin. Prints packing on stdout. eg 127 13:11 achar:~/ $ echo -e '0x01 500 300\n0x02 300 300\n0x03 300 400' | binpack 960 516 binpack.py: 960 516 binpack.py: 0x01 500 300 binpack.py: 0x02 300 300 binpack.py: 0x03 300 400 Layer 0: 0x01 0 0 binpack.py: Layer 0: 0x01 0 0 500 300 Layer 0: 0x02 500 0 binpack.py: Layer 0: 0x02 500 0 300 300 Layer 1: 0x03 0 0 binpack.py: Layer 1: 0x03 0 0 300 400
fetch-app - bring an application to the front of current monitor no matter which workspace it is on; or starts it up, if necessary
Usage: fetch-app [OPTION...] [--] [ win-filter ] Bring an application to the current monitor Acts on the focus window unless 'win-filter' (eg 0x042000a3) is given: <window id>|:SELECT:|:ACTIVE: (default)|window title regex|CLASS=<regex>|all (this desktop)|ALL (global) Options: -v, --verbose be verbose -h, --help print this help message -V, --version print version and exit
half-screen - changes the window size to a proportion of the monitor size eg a half, a third, a quarter, a sixth, a ninth of the screen; useful in most non-tiling WMs eg Fluxbox
Usage: half-screen [OPTION...] [--] [ win-filter ] Resize to a fraction of the available screen. Acts on the focus window unless 'win-filter' (eg 0x042000a3 wmctrl) is given: <window id>|:SELECT:|:ACTIVE: (default)|window title regex|CLASS=<regex>|all (this desktop)|ALL (global) Options: -1, --one set to full screen (1x1) -2, --half set to 1/2 screen (1x2) -3, --third set to 1/3 screen (3x1) -4, --quarter set to 1/4 screen (2x2) -6, --sixth set to 1/6 screen (3x2) -8, --eighth set to 1/8 screen (4x2) -9, --ninth set to 1/9 screen (3x3) -a, --any=NxM set to any fraction of the screen -d, --stretch-d stretch down --debug debug -f, --no-fluxbox don't use fluxbox commands -i, --ignore-stuts Don't take struts (toolbar/slit) into account. Use the console physical size. -l, --stretch-l stretch left --max-horiz maximise horizontally --max-vert maximise vertically -n, --dry-run dry run --no-backup don't throw the backup file -p, --print just print WIDTH & HEIGHT for the requested window size -r, --stretch-r stretch right -u, --stretch-u stretch up -v, --verbose be verbose -h, --help print this help message -V, --version print version and exit Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options.
move-window - move windows. (requires wmctrl(1)); useful in most non-tiling WMs eg Fluxbox
Usage: move-window [OPTION...] [--] <command> [ window-id ] Move the window to <command> which can be: left, right, top, bottom, topleft, topright, bottomleft, bottomright, centre, origin, right-width, left-width, up-height, down-height. window-id: <window id>|:SELECT:|:ACTIVE: (default)|window title regex|CLASS=<regex>|all (this desktop)|ALL (global) Options: --debug debug -f, --no-fluxbox don't use fluxbox commands -p, --partial use other window's boundaries (slow) -v, --verbose be verbose -h, --help print this help message -V, --version print version and exit
next-desktop.pl - jump to the next desktop
next-desktop.pl takes up to 5 arguments: direction - up, down, left right number - default 1 desktop wrap - whether to wrap around desktops take - 1 = take the focus window with you, default 0 debug - 1 or 0
tile - tile all the windows on the desktop (requires wmctrl(1)); useful in most non-tiling WMs eg Fluxbox
Usage: tile [OPTION...] [--] [ window-id ] Uses wmctrl(1) to (very simplistically) rearrange windows on the current desktop so that they are tiled as far as possible. No window will be moved off the desktop. window-id: <window id>|:SELECT:|:ACTIVE: (default)|window title regex|CLASS=<regex>|all (this desktop)|ALL (global). There are options to re-size all the windows to a common size - in that case, once the screen is tiled, there is not much point in having the window decorations and they are removed (fluxbox only). Options: -2, --half set all windows to 1/2 screen (1x2). -3, --third set all windows to 1/3 screen (3x1). -4, --quarter set all windows to 1/4 screen (2x2). -6, --sixth set all windows to 1/6 screen (3x2). -8, --eighth set all windows to 1/8 screen (4x2). -9, --ninth set all windows to 1/9 screen (3x3). -a, --avoid avoid placing windows astride the centre - mainly for dual display. -b, --border reduce window decor to BORDER (fluxbox only) even if we're not changing the size -d, --debug debug. -f, --no-fluxbox don't use fluxbox commands. -g, --graphic draw graphic -H, --horizontal place horizontally (default is vertical placement). -l, --limit-to-cons limit to windows on the current console -n, --dry-run dry run. -p, --pad Extra padding - up to 4 numbers left,right,top,bottom. --ratio=NxM set all windows to any fraction of the screen (N horizontally and M vertically). -s, --no-strict don't place strictly - not all parts of every window need be onscreen. -S, --small-first place smallest windows first (default is largest first). -v, --verbose be verbose -h, --help print this help message -V, --version print version and exit