A collection of libraries for Sawfish.
This module exports two procedures:
- activate-xmobar, which takes the name of an Xmobar
configuration file and starts an xmobar instance, piping to its
standard input a list of currently active namespaces and the
title of the currently focused window. If an xmobar is already
activate-xmobar will kill it before starting the new
activate-xmobar-prop, which takes a symbol representing an X atom name, and sets the corresponding X property to the value described above. This one is useful is you use
StdinReader) in your xmobar configuration (in which case you will pass ‘_XMONAD_LOG as the property to be set.
Both procedures accept the following keyword arguments:
widthMaximum width of the displayed window title
foregroundForeground color for workspace names
highlightHighlight color for current workspace name
Utility functions for rep programming.
- take N LST
- group-by LST N
NOTE: A version this module is available in sawfish since version 1.9.91, see docs there.
Tilings for your workspaces. These are the exported interactive commands:
tile-workspaceTiles the current workspace with the active, registered tiling, if any.
next-tilingCycles through available tilings for this workspace.
decrease-max-windowsFor tall tiling, increases/decreases the number of visible windows.
tall-rotate-leftFor tall tiling, rotate the tile left or right.
Currently there are 2 tilings available:
- tall tile Use
tall-tilingto add to a given workspace. It works as xmonad’s tall layout: one master window on the left, and the rest stacked on its right. The function takes a workspace number as its first argument plus the following keyword arguments:
widthThe master window will take (screen-width)/width pixels (default: 2).
bottomTop and bottom margins, in pixels (default: 0).
gapSpacing between adjacent windows, in pixels (default: 0).
maxMaximum number of visible windows (default: 3).
autoA boolean or predicate indicating whether tiling should happen automatically whenever a new window is created (default:
- column tile Divide the screen in the given number of columns and
distributed windows among them. All columns have the same width
and the window width is resized to fit in (its height is left
untouched). The function to register a column tiling is
col-tiling, which again takes the workspace number as its first argument and the following keyword args:
colsnumber of columns (default: 3)
autoas above, but defaults to false.
(require 'sawflibs.tile.tile) (tall-tiling 3 #:width 2 #:top 0 #:bottom 1 #:gap 1 #:max 3) (tall-tiling 1 #:width 3 #:top 20 #:bottom 3 #:gap 1 #:max 2 #:auto #f) ;; we can have more than one tiling per workspace, and ;; switch among them with 'next-tiling': (tall-tiling 0 #:width 3 #:top 20 #:bottom 20 #:gap 1 #:max 2 #:auto #f) (col-tiling 0 #:cols 3 #:gap 2 #:top 40 #:bottom 20) ;; here's a tiling that will only act on urxvt windows: (tall-tiling 2 #:auto (lambda (w) (equal "URxvt" (window-class w)))) (bind-keys global-keymap "F12" 'tile-workspace "Super-=" 'increase-max-windows "Super--" 'decrease-max-windows "Super-Space" 'next-tiling)