This document describes the Lisp programming interface to
sawfish, an extensible X11 window manager.
For edit history, see ChangeLog file.
Sawfish is copyright (C) 1999 John Harper and is released under the terms of the GNU General Public License. See the included file COPYING for the full text of the license (or see Copying).
This is free software – you are welcome to redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.Sawfish is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Sawfish is a lisp-extensible window manager for X11. Its aim is to allow all areas of window management (decoration, manipulation) to be customized as far as is possible, yet still remain as fast or faster than existing window managers.
Despite this extensibility its policy is very minimal compared to most window managers. It does not implement desktop backgrounds, applications docks, or other things that may be achieved through separate applications.
All high-level window management functions are implemented in Lisp for future extensibility or redefinition. Also, most received events are exported to the Lisp environment through key-bindings and hooks, similar to in Emacs. These events include pointer behavior and many internal X11 events.
Sawfish uses the librep Lisp environment (see Overview), this is a run-time library implementing a language similar to Emacs Lisp (see Overview), but with many extensions, and using lexical instead of dynamic scope. This manual assumes at least a basic knowledge of the language.
Homepage and mailing list are listed in See FAQ.
This lists user-visible changes, and which releases they occurred between. For more detailed information see the ChangeLog file in the Sawfish source tree, or git log. (See the Wiki on how to access git repository.)
Each release lists incompatible changes at its top.
Open the configurator -> “Edge Actions”. Changes will be easy. (Set 4 pull-downs, and you're done mostly. “Infinite-desktop” is renamed to “viewport-drag”.) For more options, see “Edge Actions” below.
If your ~/.sawfish/rc opens related modules, delete those references. These modules are renamed, and you don't have to manually load them any more.
popup-window-menu to popup-window-ops-menu (both the function and command). Old names are still available.
rename-window-func to rename-window. (Old name is still avialable.) The function rename-window-interactive is deleted. Use (call-command 'rename-window) instead.
Even if the old names still remain, it is highly recommended to update.
jump-or-exec [Christopher Bratusek]
The previous class and onfocused parameters are now
keys, and pass them as “#:match-class t/nil” or “#:onfocused
value”. Note that match-class is boolean; To pass a
class, set #:match-class t and pass the class name to the
argument regex. (see Application Invocation)
apps-menu-show-all is deleted. See below for more.
focus-ignore-pointer-events is deleted. [Teika kazura]All are collected under sawfish/wm/animation. window-anim.jl -> setup.jl, outline.jl -> main.jl, util/window-outline.jl -> modes.jl.
Previously when installing to a private directory as an ordinary user, the installation failed, because some files were forced to be installed in /usr. This is fixed now.
Now you can choose which session files (default: all) to install with these configure-options:
--with/out-kde4session: enable or disable the installation of session files for KDE4.
--with/out-gnome2session: enable or disable the installation of session files for GNOME2.
--with/out-xdmsession: enable or disable the installation of session files for XDM (or other display-managers).
In Sawfish-1.7.0, poweroff related items in the popup menu couldn't be invoked, if run without any desktop environment. Fixed it.
It is ensured that SawfishPager builds correctly, by improving sawfish.pc file.
When focus-in-hook / focus-out-hook are called,
Sawfish wrongly reported a focus change during a grab as
“ungrabbed”. Now it's reported as while-grabbed.
Some windows were skipped in window cycles among groups. This is fixed.
From Sawfish-1.7.0, Sawfish used to crash when a theme with wrong code is loaded, but it's fixed. It's not complete, and for example some mxflat options make Sawfish crash.
call-command [Teika kazura]
It used to print an error message when you cancel an interactive call of
call-command with the escape key, but it doesn't any more.
Previously, user's change of the variable kde-desktop-directories was ignored, but this is fixed.
“Edge Actions” is a centralized way to invoke an action when the mouse pointer hits a screen-edge. It includes former “edge-flip” and “infinite-desktop” (now renamed to “viewport-drag”), and a new feature “hot-spot”.
Edge-flip and viewport-drag can be configured from the configurator “Edge Actions” group. Options are easy to understand.
“Hot-spot” lets you assign an action to each screen-edge and -corner. An action has to be a lisp function, and can be set in ~/.sawfish/rc, like this:
(defvar-setq top-left-corner-function
(lambda () (display-message "hello world")))
Hot-spot variable names consist of position (e.g. top-left or bottom) + “edge”/”corner” + “function”.
Other related changes are:
Internal changes:
sawfish.wm.edge.*. You don't have to import them for ordinary use.
sawfish.wm.edge.util written in Lisp.
--replace is added. With it, Sawfish
will replace the currently running window manager. It's
done by “manager selection” defined in ICCCM secs 2.8 and 4.3.
toggle-or-exec is similar to jump-or-exec, but turns windows
into quake-like drop-down/pop-up-windows. That means, when you have
the toggle-window focused and press its keybinding again, it will be
hidden.
See the file jump-or-exec.jl for more detailed examples.
iconify-on-leave window-matcher [Christopher Bratusek]
This new window-matcher is a companion to toggle-or-exec. When
a window matched loses the focus, it gets hidden. Use this together
with toggle-or-exec for greater toggle-window experience.
When an error occurs during initialization, and if you don't customize
the option error-handler, then the error is reported to both
the screen and standard-error. After Sawfish starts, it's printed to
the standard-error only.
report-commands [Teika kazura]A new, tab-capable, highly configurable theme “StyleTab” is added. It
allows the tab-bar to appear in top, left, right, and bottom. Use a
new window rule title-position for it. “StyleTab” is now the
default theme.
Many improvements in tab system are done. For example, stickiness change on a window applies to all other windows in the same tab group, though maybe not yet complete. (Please tell us things you noticed.)
When you used a tab capable theme (Elberg-Tabbed or Get-S-Tabbed), you had to manually adjust positions by pixel, but it's not necessary any more.
When a lot of windows are open, they should now be more responsive.
With the new option apps-menu-filter, you can fully customize
the application menu. For the full description, see See Applications Menu.
It replaces former options like apps-menu-show-all or
apps-menu-ignore-no-display.
From the configurator “Window Rules” you can set the animation mode when iconified. (see Animating Windows)
In order to support “gnome2-globalmenu”, the reaction policy to
XFocusInEvent is slightly modified. Sawfish doesn't emit
_NET_ACTIVE_WINDOW if it's done by (un)grabbing the pointer.
get-window-by-* functions [Christopher Bratusek]
For the details, see See Window Attributes, and See Getting Windows.
window-role and get-window-by-role (return NET_WM_ROLE)
get-window-by-name-re and get-window-by-class-re. Use instead get-window-by-name or get-window-by-class with the new boolean option #:regex. (The old name is still supported.)
#:icon switch to get-window-by-name to get a window via NET_WM_ICON_NAME (can be used with #:regex switch, too)
Four new commands to resize a window where you can specify the size by pixels are there. You're either prompted to type in the new size, or you can preset it in the configurator.
For the new command resize-window-to-preset-size, first you
specify a size in the configurator. The focused window will be resized
to that preset size on invocation. There're also commands to change
only one of the height and width.
resize-window-prompt prompts you to enter the new size.
fixed-size flag, the
window-operations menu-entry Resize becomes unclickable.
Workspace sub-menu.
make all at the top directory. Previously it was
possible to produce wrong sawfish.pot.
let-fluids and let-loop correctly, provided by sawfish.el [Teika Kazura]
commandp can only take symbols as its argument. (see Operations on Commands)
Category Placement is renamed to Geometry. The item
shade-hover is moved to appearance category, and
fixed-size to geometry.
Function define-command-args is deleted. In define-command
function, the keyword argument doc-key is dropped.
Read the file CONTRIBUTING for more infos.
If you have code which utilizes prompt, it is affected. When you
call the function prompt, directly pass helper functions
as function arguments. They used to be set as global variables.
This change is straightforward, so it's not difficult to update your
code. See sawfish.wm.util.prompt for details.
Sawfish claimed to support mouse-buttons 1 - 9, but it is known that drag of buttons 6 - 8 may not work. The button 9 doesn't work at all, so we withdraw it.
maybe-raise-window and maybe-lower-window are
now obsolete. [Teika Kazura]
Replace them with raise-window* and lower-window* defined
in sawfish.wm.util.stacking. Only difference is that the obsolete
version supports a feature of Nautilus (GNOME file manager) which was
dropped long ago.
--with-nine-mousebuttons is dropped.Sometimes maximized windows would overlap “avoided” windows (e.g., the gnome-panel, or a trayer) on startup. Sawfish now defers maximization until the initialization is complete, preventing this problem.
Under certain circumstances viewport slots were wrongly shifted when Sawfish was restarted, ending up with some windows outside of the virtual desktop. This has been fixed.
Previously, when you switched the keyboard-layout, or more correctly the keyboard-“group” (which is mainly for multilinguals) keyboard- and mouse-bindings got messed-up.
Now, this can be prevented by invoking Sawfish with the new
commandline-option --5-buttons. It is assumed that modifiers
are common among keyboard groups.
More precisely, what's supported is switching by ISO_Next_Group
or similar, bound to a key (for example ctrl + alt). It appears as
“option” in X keyboard configuration, like “grp:ctrl_alt_toggle”.
If you use some utility to switch the layout and it confuses Sawfish
keybindings, please restart Sawfish.
With that commandline-option, you won't be able to bind Sawfish commands to mouse buttons 6 - 8. This may be fixed in future.
Function x-atom-name now accepts all 32 bits. Previously only
30 bits were treated if the architecture was 32-bit. 64-bit systems
hadn't had this bug.
It used to cause “Bad argument” error, most notably on Java applications. (In theory, an atom is set by X server, not a client. But Java applications seem to be affected often by this bug.)
Correct alphabetic ordering of menu-entries is done. Previously they were sorted [A-Z][a-z] (first all upper- then all loser-case entries).
Also the function for detecting the language has been improved. It now better follows the freedesktop.org specification.
The “draft” animator had two issues: on one hand the drawn numbers
were always black (therefore possibly invisible), on the other hand
those numbers weren't erased from the screen. Both have been
fixed. Internally, it's done by the new x-draw-text function
described below.
User options workspace-boundary-mode and
workspace-send-boundary-mode couldn't be set from the
configurator, but this is fixed.
xterm fix [Teika kazura]Support for XFCE integration was added. It's just like GNOME/KDE4 integration:
it sets xterm-program and browser-program (unless already
set by user), and adds XFCE logout/help/customization menu-entries to
the Sawfish root-menu.
Improvements: All menu-entries for GNOME/KDE4 do now have
accelerators. Entries for invoking gnome-control-center or KDE
systemsettings have been added. The KDE4 detection has been
improved. See also the item “Applications menu improvements” below.
A new variable desktop-environment tells which desktop
environment is running (see External Applications).
Applications menu now looks more like that of GNOME / KDE / XFCE if one is running. (further improvements are planned)
The user option apps-menu-ignore-no-display is now gone
and replaced by apps-menu-show-all. [Note: After Sawfish-1.8.0,
this option is superseded by apps-menu-filter.]
If apps-menu-show-all is nil (default), the menu
looks much like that of GNOME / KDE / Xfce, by hiding some
applications. If it's t, then all installed applications are
shown. An intermediate option, the symbol maybe is possible, as
described below.
Technically, fields NotShowIn and OnlyShowIn in files
/usr/share/applications/*.desktop tell under which
desktop environment that application wants to be shown. If
apps-menu-show-all is nil or maybe, they are
respected.
Items with field Hidden or NoDisplay are usually not to
be shown. They are respected if apps-menu-show-all is nil.
The KDE specific directory is now searched, too while menu generation.
fixed-size: this disables resizing, or more precisely,
functions resize-window-interactively, halve-window-size
and double-window-size. (Maximization is still possible. Use
never-maximize to prevent maximization.)
never-delete: this disables closing. Only interactive
closing is prevented, and you can delete windows with
never-delete property from a lisp program.
It is now distributed with Sawfish window manager. Improvements are:
#f or #t. This is fixed.
define works again.
describe-function have been broken, but it works again.
describe-variable, the value of the variable is pretty-printed.
sawfish-load-symbols can be called interactively to update the cached symbols.
border-width and border-color
[Alexey I. Froloff]
A “border” of a window surrounds the window and all other frame parts. (see Frame Part Definition)
--5-buttonsx-draw-text function [Christopher Bratusek]
It is similar to x-draw-string. Generally, if you use a
display-message like message, call x-draw-string.
If you want to draw on the screen directly use x-draw-text
(see X Drawing.)
Updated translations since 1.6.0 are Danish (da), British English (en_GB), German (de), Spanish (es), Slovenian (sl), and Swedish (sv).
All translation files are now in UTF-8. Changed languages are Galician (gl), Italian (it), Romanian (ro), and Turkish (tr). The rest were already UTF-8. [Teika Kazura]
Due to librep >= 0.91.0, the backtrace is printed by default when an error was signaled. It is printed for sawfish-client, too, but it's sent to Sawfish's standard error, not to sawfish-client's, sorry.
Phrase “Sawfish error:” is prepended to error messages which are printed to standard error.
Sawfish-pager's errors are printed to Sawfish's output. More precisely, when you connected to Sawfish as a server asynchronously, then the error was not printed. But now it is printed, to Sawfish's output. (In contrast, a client which connects synchronously receives the error message itself.)
In window cycling, some unnecessary pointer warping is avoided. Previously, the necessity of a warp was judged by the geometry before the raise was done. Now the updated one is used.
Icon is now provided. (If it doesn't show up, first run gtk-update-icon-cache.)
If you run the configurator but the Sawfish window manager is not running, then an alert window is displayed before abortion. [Teika Kazura, Christopher Bratusek]
Two obsolete features are deleted. One is the command line option
--socket-id, which was for “capplets”, part of very early
GNOME 2.x. The other is the command line option --single-level
which has been broken.
FAQ items, on how to hide the mouse-pointer, and on application execution.
Manuals (1) describe all options. KEYBINDINGS file was revised
Newly described functions are: grab-keymap and ungrab-keymap
(see Keymaps), x-raise-window and x-lower-window
(see Raising and Lowering Windows), frame-state-mutex
(see Frame Functions).
All menu-entries do now have accelerators. Labels for help entries have been improved.
The module widget-test is deleted. It provided testing function
of widgets in modules sawfish.gtk.*. But allegedly it is broken
and crashed Sawfish.
widget-dialog.jl was merged into simple-dialog.jl
Previously the functions remove-newlines and
beautify-symbol-name were defined in several modules, with the
same contents. Now they are defined (only once) in a new module
sawfish.cfg.utils.
The stock-button function was defined in Sawfish, but now it's
replaced by directly using gtk-button-new-from-stock. Same for the
about-dialog function, replaced (in version 1.6.0) by gtk-about-dialog.
/usr/bin/sawfish-config is now minimal, moving most of it's
content to sawfish.cfg.shell [Teika Kazura]
3d-hack is deleted. [Christopher Bratusek]
The 3d-hack module was an animation demo, not a feature. It
provided two functions similar to glxgears, rendered in 2d.
If you want it, it can be downloaded from the Sawfish Wiki, from the
page “3d-hack”.
ignore-window-input-hint is deleted which has been invalid for long. [Teika kazura]
maximize-raises in maximize-window-fullscreen and
maximize-window-fullxinerama, too, not just in maximize-window
[Nolan Leake]
Before it broke for 'R' (statistics software), and whitespace handling didn't follow the specification.
Some *.desktop files are not ignored any more either, i.e., leading empty lines and comments are allowed.
randr-changed-notify-hook [Daniel M. German] type, set-frame-style, fixed-position,
iconify. In addition, new tabs gain those properties from their
parent window.
display-window-position [Teika kazura]
User chooses a window by cursor and click, and it prints its position
and size in a popup. Also available as a function, defined in
sawfish.wm.util.display-wininfo.
window-pid [Teika kazura]
It returns the process ID of a window. (see Window Attributes
Technically, the window class consists of “instance” and “class”,
but only the latter was returned previously by the function
window-class. Now with the new optional argument, the instance
is returned too. (see Window Attributes)
User can add lisp directories to be read with the environmental
variable SAWFISH_USER_LISP_DIR. Its value is directories
separated by colon, like PATH, and prepended to
load-path. If not set, ~/.sawfish/lisp is assumed.
For example, if you define a module sawfish.wm.super-hack, then
it can be read from ~/.sawfish/lisp/sawfish/wm/super-hack.jl.
User can override system lisp files, too. For example, if there is
~/.sawfish/lisp/sawfish/wm/windows.jl, then it defines
sawfish.wm.windows, instead of the installed one. (But this can
easily break your Sawfish startup.) In fact, it was possible for some
lisp files, but now it's guaranteed for all files.
display-window
is documented. Difference between window-wants-input-p and
window-really-wants-input-p is described. Short description on
the root window.
Application menu, introduced in 1.6.0, made Sawfish crash if *.desktop file had a malformed key value (say ; as first character or # somewhere inside), or it was unreadable. It is fixed.
When the window placement mode is for example east and the window
is wider than the screen, then the window was put wrongly. It is fixed.
maximize-discard [Teika kazura]
The command maximize-discard stops a maximized window to be
treated as maximized any more, so that you can move and resize the
window.
The functinon maximize-discard has existed, and now it's
exported.
jump-or-exec [Christopher Bratusek]
The user uploaded module “jump-or-exec” has been merged. It
provides jump-or-exec, a command which may be used to focus a
window, or if it does not exist, start the application.
Unlike the original version this one also supports matching a window
by its class (returned by window-class function), which makes
it more flexible for applications like music player or browsers, which
tend to change their WM_NAME relatively often.
For usage, see lisp/sawfish/wm/commands/jump-or-exec.jl file.
frame-style-editable-p and all other remaining
sawfish-themer fragments, as it's dead. [Christopher Bratusek]
--without-nine-mouse-buttons is not allowed
to have 4 hyphens, therefore it's renamed to --without-nine-mousebuttons.
[Christopher Bratusek]
kde4-config --install data rather than
kde4-config --path data, so no sed-kludge is needed anymore.
Make $datadir/kde4/apps/ the fallback path, if KDE4 is not installed. [Kim B. Heino]
make distclean.
[Christopher Bratusek]
(This item is no longer valid from 1.7.0.) Support for 6 - 9 mouse buttons is now optional. X.Org/XFree86 headers only define up to 5 buttons, and we use a working but somewhat hackish workaround for getting buttons 6 - 9 which is suspected to cause some problems with modifiers. Support for them is enabled by default. If you want to disable it, add the following flag to configure:
--without-nine-mousebuttons
If you drop it, then you can't use mouse button 8 to, for example, drag windows.
Directory libexec is not used anymore for library files installation. Instead, they go into lib by default.
sawfish-ui, is renamed to sawfish-config [Christopher Bratusek]
Its window class is changed to sawfish-configurator /
Sawfish-Configurator, too. The lisp module is renamed from
sawfish.ui to sawfish.cfg.
In infinite-desktop, the option to specify the boundary
behavior has changed. If viewport-boundary-mode is
dynamic, then you can go as far as you like. Otherwise, it
stops at the workspace boundary of which size is specified by
viewport-dimensions. Now the latter is the default. See also
“dynamic viewport” described below.
The previous variable, infinite-desktop.stop-at-workspace-borders,
which is used for this purpose, no longer exists.
In Sawfish < 1.6, sawfish.wm.defaults is loaded by default,
only if the ~/.sawfishrc lacks. Now, it is always read, so you
don't have to require it. It sets up GNOME or KDE support if
found running, and does load the error-handling module.
Since Sawfish 1.5 ~/.sawmillrc is no longer a valid configuration-
file. From this version on, Sawfish will rename ~/.sawmillrc to
~/.sawfishrc, if the former does exist on your system, but the
latter doesn't.
Sawfish used to rely on ESounD and LibAudioFile to play sound, but we
dropped that. If you want sound, set the variable play-sample-program
to the path of the program capable of playing *.wav file. You can set the
variable from the Configurator, too. By default `paplay' is beeing used.
You can't set any arguments to pass from this variable. If you want to give arguments or redirect output, write a wrapper program. (see FAQ, “Sound support” section.)
GNOME support is trimmed down. All we offer now is as follows:
If GNOME runs, in session submenu under Sawfish root menu,
logout and shutdown from GNOME are added. Don't remove quit and
restart from menu now. GNOME help is available in menu.
Unless set by user, gnome-terminal.wrapper and gnome-www-browser are used for
user options xterm-program and browser-program.
Most of dropped GNOME integrationcode is ancient, mainly for 1.x and early 2.x. Files lisp/sawfish/wm/commands/gnome.jl and lisp/sawfish/wm/state/gnome.jl are deleted.
GNOME-Detection has been updated for recent versions. [Alexey I. Froloff]
Module sawfish.wm.commands.xterm is renamed to
sawfish.wm.commands.launcher. Option xterm-args is
dropped. If you use it, simply append its value to xterm-program.
Customization-group is changed from misc to External
Applications.
The functinon display-url is renamed to browser, now
defined in the module cited above. Variable display-url-command is
renamed to browser-program.
If you've been using Sawfish-pager, then you have to recompile it, due to library files location change.
user-level property
(This affects almost none.) There has been a defcustom property
user-level. It has been deprecated for years, and it's
now deleted.
There have been crashes if a window is destroyed soon after its creation.
It happens in add_window function, and the cause is guessed to be
garbage collection following window destruction before the object access.
Now most parts of add_window are protected from garbage
collection with rep_PUSHGC / rep_POPGC. It also prevents
add_window_hook from being called with uninitialised argument.
[Timo Korvola, Janek Kozicki]
There're reports of sudden, random window disapperance, under Xinerama and some other drivers. It is partly prevented, but not completely, as this may also be caused by other libraries or buggy video drivers.
Now in error_handler() in src/display.c, when a window sends request_code 12 (X_ConfigureWindow), don't auto-assume it to be unmapped. [Janek Kozicki]
SMlib and libICE check on x11r7 [Christopher Bratusek]
--tag=CC to libtool where necessary. It unbrakes compilation on some arches [Gentoo Linux]
Strings are now fully translatable [Alexey I. Froloff]
SpinButton listens to manual value change. (It's now connected to the correct signal.) [Christoper Bratusek]
Position parameters can be negative [Christopher Bratusek, Teika Kazura]
select-workspace-from-first [Michal Maruška]
Simple theme, windows are now resizable from the right border [Christopher Bratusek]
send-to-workspace. [Christopher Bratusek]
maximize-window-fullscreen and maximize-window-fullxinerame work. [Teika kazura]
this-command is nil outside of command call.
uniconify-to-current-viewport has been undeprecated. [Teika kazura]
Sawfish now generates application menu automatically, by reading
/usr/share/applications/*.desktop files. If you manually set
apps-menu, then it won't be. If you like to have both your
own applications menu and auto the generated one, then refer back to
user-apps-menu rather than apps-menu. In addition you can
use the variable desktop-directory to specify a different directory
to look for *.desktop files, or a set of directories, if desired.
Root, and Window-Operations menus are revamped, too. [Christopher Bratusek]
Internally, a new function remove-frame-part-value which allows to change/remove values from frame-parts is used. [Timo Korvola]
Make grow/pack Xinerama aware. The support still remains basic, as shrink/yank still lacks it.
Window rules (former “matched windows”) can easily be set from
configurator, but it can now be set by lisp, too, with
add-window-matcher function. For the details, See Window Rules by Matching. An example usage is like this:
(add-window-matcher '((WM_NAME . "^root$")
(WM_CLASS . "^XTerm/xterm$"))
'((ignore-program-position . t)
(maximize . vertical)))
In fact, this function has already existed, but now it can now specify both windowname and -class, also the grammar has changed. The old syntax is still allowed, but deprecated.
Sawfish can “translate” keymaps for each window. Suppose you have the following lines in your ~/.sawfish/rc:
(add-window-matcher
'((WM_NAME . "^Terminal$"))
'(keymap-trans . (("C-n" "C-S-t")
("C-w" "C-S-w"))))
Then, when you press C-n, any windows with name “Terminal” receive C-S-t, and so on.
This is part of window rules, but it cannot be exposed in the configurator yet.
fullscreen and full-xinerama are available now (see Maximizing Without Borders) [Jeremy Hankins]
new-workspace and new-viewport, which place a window on the first empty Workspace or Viewport (if there's none, one will be generated), have been introduced [Jeremy Hankins]
If new-workspace is chosen, then the window is put in an empty
workspace, or a new workspace is created if none. A workspace with
sticky windows only are considered empty. new-viewport is
the same but an empty viewport is chosen. If none is, the workspace is
enlarged, and the window is put in a new viewport.
window-name can change the window's name. [Christopher Bratusek]
5 new move-cursor commands, 4 diagonals and 1 to center. (see Pointer Functions
Three window manipulation commands, double-window-size, halve-window-size, and move-window-center.
The former two are based on the resize-by-factor metafunction.
browser invokes a browser instance.
rename-window changes the window name. [from “mmc” fork, Christopher Bratusek]
In practice, it works, but technically speaking, the window name is not supposed to be changed in ICCCM, by the Window-Manager.
viewport-windows returns windows in a viewport. [Jeremy Hankins]
get-window-by-class and get-window-by-class-re [Christopher Bratusek]
When you set viewport-boundary-mode to dynamic,
then the workspace grows and shrinks dynamically so that it contains
all windows and the current viewport. For the details, See Dynamic Viewport.
KDE4 is automatically detected. KDE help, and KDE logout, shutdown, and reboot are provided in the menu. In KDE4 WM Selector, Sawfish is added.
Unless set by user, konsole and konqueror are used for user options
xterm-program and browser-program.
Added poweroff commands in menu for non KDE/GNOME users. There are
reboot, halt, suspend and hibernate. The used shell commands can be
set from configurator, under “Misc” -> “External Applications”. If
you don't want it, set want-poweroff-menu to nil.
User needs the appropriate privilege. For a way to do so, see See FAQ, “Shutdown privilege” section.
Reboot and halt call before-exit-hook and do
delete-window to each window before actually rebooting or
halting, to ensure everything is fine on the next startup.
sticky-button, a button to toggle window sticky or viewport-sticky
lock-button, a button to toggle window position fixed
rename-button, a button to rename the window-title and window-icon properties (not ICCCM compliant)
move-resize-button, a button to perform various move and resize actions on a window
raise-lower-button, a button to perform various raising and lowering actions on a window
(Later this item was found wrong. The true fix was done in 1.7.0.) At Sawfish startup including restart, maximized windows and position specified windows used to mess up viewport, appearing in wrong viewports. It's fixed now.
after-add-window to maxmize-after-add-window cycle-class and cycle-class-backwards ignore window-order [Daniel M. German]
dock by default [Timo Korvola]
,quit (also C-d), unlike C-c it won't kill the WM [Teika Kazura, Timo Korvola]
raise-tabs-on-hover takes effect immediately now [Christopher Bratusek]
customize-redirect, configurator's output can be redirected. [Teika Kazura]
These commands are now available from window operation menu, too.
hand2, when resizing crosshair [Christopher Bratusek]
sawfish has been added [Luis Rodrigo Gallardo Cruz]
sawfish, sawfish-client and sawfish-config [Debian]
THANKS section of CONTRIBUTING [Christopher Bratusek]
The new release is Sawfish-1.5.0. We don't release 1.4 series for historical reason. The next will be 1.6, and 1.5.x are for bugfix branches.
If your .sawfishrc has a line (require 'sawmill-defaults),
then change it to (require 'sawfish-defaults).
If your configuration file is named ~/.sawmillrc, then rename it
to ~/.sawfish/rc or ~/.sawfishrc.
Configurator GUI (sawfish-ui) used to display categories in flat row, but now arranges them in tree diagram.
To use the old style, put (define-special-variable customize-program "sawfish-ui --flatten") in your configuration file.
Windows can be “tabbed”, or multiple windows bound to one, sharing size and frames. It's still under development (sorry). For instructions, see our wiki site http://sawfish.wikia.com/Tabs.
Improvements in focus are done from which KDE users will benefit. Some new windows can receive focus. Some undesired focus transitions to desktop windows are suppressed.
In enter-exit and enter-only focus modes, enter-notify events caused by grab/ungrab are ignored. This has a bad side effect, too.
In lisp, replaced hardcoded focus logic by focus-revert
function. Previously, action when the focused transient window is
unmapped was not handled by focus modes, but coded elsewhere. Now
focus-revert event is invoked, and passed to focus modes. (For
detail, see Input Focus.) This makes the modes' policy clear, and
programmable.
During window cycling, cursor is warped to the current top window if
warp-to-window-enabled and cycle-raise-windows are
non-nil.
When the window gets unmaximized, the cursor is retained in that
window when warp-to-window-enabled is non-nil.
Shrink and yank are commands to reduce overlap with other windows “by one”, with a motion in direction left/right/up/down. “Shrink” commands move one edge of the window to shrink, and “yank” commands move the window.
To use them, put (require 'sawfish.wm.commands.shrink-yank) in
your configuration file, and use the configurator GUI to bind commands
to keys.
It makes the virtual desktop bigger than the screen, actually so big that there's no limit. You can scroll it with mouse continuously in natural manner.
This is in contrast to the coventional viewport; it scrolls by a step of one screen size. Thus it may not work so well with viewports.
To use it, put (require 'sawfish.wm.ext.infinite-desktop) in
your configuration file, and use configurator GUI.
StaticGravity while
reparenting windows (Michal Maruška)
SKIP_TASKBAR state (Chris Boyle, me)
window-history-key
variable)
_NET_WM_NAME as UTF8_STRING type (Christian
Krause)
adjust-position-for-gravity/y
_NET_WORKAREA)
accept ()
grow-pack bug fixes (Daniel Pfeiffer)
grow-pack module (Kai Großjohann, Daniel
Pfeiffer)
bindtextdomaincodeset function if rep implements it
(Christophe Fergeau)
apply-command-keys function (David Bustos)
wm-spec module causing nautilus desktop
window to cover panel
display-window function that can prevent the
window getting focused
librep 0.14 or newer
menu-program-stays-running variable now defaults to true
by popular demand
focus-desktop
_WIN_WORKSPACE property of each window
decorate-transients option works again with shaded windows
window-history
module
Extract some more translatable strings (Vlad Harchev)
Crux theme now has an extra button mode: Default,
like Mac OS Platinum but also has an iconify button. Used by default
grow-pack module now works with windows which specify
increments (Kai Großjohann)
kill-client
nil instead
_WIN_WORKSPACE property
changing and will move the window in response
configure-ignore-stacking-requests and a
similarly-named window property. When set stacking requests from
windows are ignored (Matt Tucker)
exit-type – returns the type of exit in
progress
XParseColor unless we actually have a
display connection (merlin)
setlocale to avoid trashing the locale
preferences
shade-button button class (many themes created it
anyway)
sawfish.wm.util.recolor-image module, currently
contains a single function for recolouring parts of images based on a
given colour gradient
delete-group. Deletes a whole group of
windows. With default bindings, shift-click on the close button to
invoke this command
window-icon-image will return the mini-icon
XUrgencyHint not being defined before X11R6
bind-keys is called with zero
arguments
crop-image function when checking validity
of height parameter (martin@whoever.com)
choice widgets may now contain descriptive names,
syntax is (symbol "description")
focus-windows-when-mapped option to only apply to
non-transient windows (this option is now enabled by default)
top-left and off-center.
top-left is now the default mode for non-transients
_SAWFISH_WM_RAISE_WINDOW and
_SAWFISH_WM_LOWER_WINDOW. Used by maybe-raise-window and
maybe-lower-window functions.
These are similar to WM_TAKE_FOCUS, in that if the window
supports the protocol, it's up to it whether or not it raises (or
lowers) the window in question. These functions should only be used
where the user hasn't explicitly requested the restacking
An example usage is an application that doesn't want its window to be raised due to a button-press event that initiates a drag operation
menus-include-shortcuts, disabled by default
(Unai Uribarri)
WM_TRANSIENT_FOR set to the
root window as children of all windows in the group (it causes too many
annoying effects), instead just decorate these windows as transients
group and transient iconification modes
better, don't use a recursive method, instead use one pass to identify
the windows to change, then another to make the changes. In
transients mode, only change the state of shared transients if
they will have no visible parents afterwards
_WIN_HINTS client
message (with a similar format to the _WIN_STATE message)
sawfish.wm.commands.viewport-extras, some
commands for viewport for viewport navigation (Dams Nadé)
never-iconify and never-maximize
window properties when appropriate
focus-windows-when-mapped set would cause any shaded windows to
be deleted
font-ascent and font-descent functions to the
gaol
"" to denote a null doc string (which has bad
side effects when internationalized)
composite-images function
gtk-style program
(michaelj@maine.rr.com)
() as a valid image modifier color component
defgroup forms
correctly
sawfish.wm.ext.error-handler). When
loaded it records the most recent errors, and the time at which they
occurred. Use the display-errors command to display all recorded
errors.
window-history-clear command to forget
history for all windows.
defcustom forms may now a :widget-flags keyword, a
constant list of symbols passed to the configuration tool. Current
flags include: expand-vertically and expand-horizontally
sawfish.wm.util.ping module, it implements the
_NET_WM_PING protocol of the new window manager spec.
destroy-notify-hook is no longer called asynchronously
sawfish.wm.state.wm-spec module to match the
current (almost final) draft of the new GNOME/KDE window manager spec
avoid property
raise-window,
lower-window, raise-lower-window. The set of windows
affected by these commands is determined by the user-raise-type
(either the individual window, the window and any transients, or the
entire group). The old commands of these names are now called
foo-single-window.
Most modules now use these commands when raising or lowering windows, allowing the stacking model to be configured globally.
Also, try to avoid displaying maximize buttons in windows whose hints prevent them from being maximized
wm-spec module
edge-flip-delay option now applies when dragging
windows
sawfish-themer
persisitent-group-ids option
enter-exit focus mode, focus isn't removed due to
enter/leave events due to pointer grabs (fixes the bug with Mozilla URL
completion)
focus-click-through behaviour with
respect to frame decorations
window-wants-input-p to check if the
InputHint is set before reading the value
-backwards, e.g.
cycle-windows-backwards (Merlin, me)
window-urgent-p and
window-state-change-hook is called with urgency state
when it changes
shade-hover mode (adapted from Eli
Barzilay)
window-list-skip. Unified with GNOME
skip-winlist hint
:tooltip tag
dimensions property in window matching was called
size by mistake
sp-cost: functions from
the sawfish.wm.placement.smart module
disable-auto-raise correctly
move-window-foo commands
(Yoshiki Hayashi)
WM_TAKE_FOCUS message, only focus the window
if its `Input' hint is set
sawfish.wm.gnome.integration and
sawfish-themer (Christian Marillat)
0.13
sawfish.wm for window manager code, sawfish.ui for
configurator and sawfish.gtk for GTK+ utilities
Compatibility should have been preserved as far as possible, through
the use of module aliases. The user module that unmodularized
user code is loaded in should look very similar to the old environment.
However, code using private functions, probably will not work
New features written as modules can either import modules individually,
or just open sawfish.wm to get the core functionality
define-command and autoload-command add entries to this
mapping. define-command takes a name and a function (and some
other optional arguments). The old style of defining commands still
works, but only in the user module
sawfish-client now provides the same repl as the normal
rep program. E.g. this allows the module system to be easily
inspected
Also, the module of each loaded theme is available for inspection under
themes.theme-name. (With themes using top-level defines
instead of a single let* block, this is useful for debugging)
sawfish.client module provides lisp functions for
communicating with a running window manager. Also, the protocol has
been modified to support proper communication of errors, which are then
re-raised on the client-side. This should make debugging client-server
code more obvious
add-window-menu-toggle to add items to the
‘Toggle’ sub-menu of each window
ConfigureRequest events in a way that is compliant
with the ICCCM—honour the window's win_gravity setting
(defaulting to NorthWest gravity), instead of assuming
Static gravity
sawfish.wm.util.x plugin
(Ryan Pavlik)
To support this, new window property desktop denoting a
“desktop” window; new function desktop-window-p recognizing
one of these things (or the symbol root)
pointer-motion-threshold option. Pointer motion
events are only generated when the pointer moves at this many pixes
away from the position it had when the button was pressed
scale-image, composite-images, and
crop-image.
maximize-avoid-avoided (Jonas Linde)
sawfish.wm.ext.tooltips module:
display-tooltip, remove-tooltip
sawfish.wm.viewports module:
select-workspace-and-viewport. Renamed some workspace functions:
ws-move-window ⇒ move-window-to-workspace,
ws-copy-window ⇒ copy-window-to-workspace,
ws-insert-workspace ⇒ insert-workspace,
ws-move-workspace ⇒ move-workspace,
ws-remove-window ⇒ remove-workspace.
get-visible-window-edges function to
use proper keyword parameters, and added some new keywords
help:about and gnome-about. Added a
sawfish-about script to implement the first of these. Added
associate menu items to the `Help' menu
cycle-skip, defines whether the window
is included when cycling the focused window. (Dave Dribin, me)
throw out the top of the program by
mistake
find-head function, to allow Xinerama support to
work
synthesize-event to scan the window tree for a child
window accepting button events (E. Jay Berkenbilt)
image-set and related functions will add an alpha channel
to the image when necessary (when using gdk-pixbuf)
sawfish.wm.ext.match-window
quote-menu-item function to help with this)
set method of the icon widget
hidden attribute, ignore it
FIXED_POSITION GNOME hint (renamed old
fixed-position property as client-set-position;
fixed-position now means don't allow the window to be moved by
the user)
transients-above option can now be set per-window
:require keyword in defcustom always causing
the module to be loaded, not just when the option is non-nil
quote-event command now works with applications that
ignore synthetic events (adapted from code by Timo Korvola)
define-frame-type-mapper allows modules to affect the mapping
from window type to frame type. E.g. the shading module uses this.
(fixes the bug that changing the frame type of a shaded window didn't
work)
variable-customized-p; use this to avoid
redefining user-modified options
:type (optional color) weren't being converted when passed
between the wm and the configurator, leading to reader errors
A side-effect of this is that updated custom files will not be compatible with previous versions of the wm (though old custom files will work with new versions)
map-windows and filter-windows
default-bevel-percent was being ignored)
move-window-to-viewport command to correct for
1... indexing
activate-viewport-column,
activate-viewport-row
raise-window-and-transients,
lower-window-and-transients and
raise-lower-window-and-transients,
raise-transients-and-pass-through-click.
As the normal window stacking commands, but restacks the “transient-group” of the window. This includes the window itself and any transients it has, and any windows that it itself is a transient of.
These commands are used in the default keymaps
WM_TRANSIENT_FOR property to the
root window denotes that the window is a transient for the whole group
image-ref,
image-set, image-fill, image-map. New color
accessor function color-rgb-8. New function
root-window-id
sawfish-ui: optionally use some GNOME
widgets, more lisp widget types, some bug fixes
command-sequence. Allows individual bindings
to invoke a sequence of commands
iconify-group-mode and uniconify-group-mode
replace iconify-whole-group and uniconify-whole-group.
New commands iconify-transient-group, and
uniconify-transient-group
:type* key to defcustom, like :type,
but value is left unquoted
WM_NORMAL_HINTS (was using base-size
instead of min-size in places)
window-history module won't resize a window to a size that
violates its size constraints
run-shell-command command)
match-window options). Also, extra widget types and containers
may be added as extra Lisp modules
nil
scale-foreground. The
cursor attribute may now be a function
centered, centered-on-parent and
under-pointer placement modes clamp the window into the current
work area (i.e. without overlapping windows that shouldn't be covered).
Added a stagger placement mode
window-history options to placement group.
Fixed some more bugs and sub-optimal default option values
SKIP_FOCUS window hint sets never-focus
property on window, as well as the ignored property
window-history module behave more sanely (don't
save iconified or shaded state; include window name when generating
keys for transient windows)
beos-window-module the standard window menu (require
old-window-menu to get the original version). Also made this
display the windows' class names
window-history—automatically saves window
attributes when they are explicitly set by the user, then copies these
attributes to windows with the same WM_CLASS as they are
created. This is loaded automatically if you have no .sawfishrc
frame-type-fallback-alist maps each frame type to the type to
try if the original type isn't available in the chosen frame style.
Note that for this to work, themes must return nil when they
don't support the requested frame type, until now, the convention had
been to return the default frame definition, so most if not all themes
will need changing. (This doesn't include themes created using the
make-theme module.)
best-fit placement mode
user-controllable. Set the sp-cost-components variable to a list
of cost functions and the weight to apply to that metric. E.g. by
default it gives 50% importance to the distance from the placement to
the focused window, and 25% each to the distance to the pointer and to
the “future-unusefulness” of the area being covered
beos-window-menu to redefine the window menu to
group items by the window group that they are a member of (in the
absence of actual group information, it will heuristically build groups
by matching window titles)
edge-flip-warp-pointer, whether or not to warp
the pointer after edge-flipping (Paul Warren)
display-window:uniconify-to-current-workspace,
controls whether windows uniconified by display-window should be
moved to the current workspace (John N S Gill)
x library now supports creating and then drawing to
pixmaps. The pixmaps can then be grabbed to images using the
make-image-from-x-drawable function
cycle-windows sequence is terminated by an
unknown event, re-handle that event after exiting (so that e.g.
M-TAB can be followed by another M- qualified event without
releasing Meta)
enter-root and leave-root
raise-groups-on-focus option, it caused unstable
window flickering in certain cases
current-head,
current-head-dimensions, current-head-offset. Some
placement modes should handle multiple heads sensibly, as should window
maximization and edge snapping.
map-window-properties (me),
window-icon-image (Bruce Miller)
raise-group and lower-group to
preserve the stacking of the group, then change the selected window.
Added new command raise-lower-group
raise-groups-on-focus
below-client frame-part attribute
workspace-menu to add the focus-marking asterisk
(John N S Gill)
WM_STATE property is set each time a window is
mapped, not just the first time
selection, adds functions
x-selection-active-p and x-get-selection for retrieving X
selections (Mark Probst)
prompt-for-window,
prompt-for-workspace and select-workspace-interactively
(Dave Pearson)
window-anim module enabling asynchronous animations after
window events. Currently only two animation styles wireframe and
solid, and they only animate window iconification
audio-events module; maps window manager events to audio
samples (played using esd by default, but can be configured to use any
program)
xterm-program to decide which terminal program to
use (James Antill)
toggle-window-iconified (Jens-Ulrik Petersen)
raise-windows-when-unshaded
random
mode; also increased sp-avoided-windows-weight by an order of
magnitude (Dan Winship)
get-cursor to use the correct background color when
creating cursors from vectors (Alexander Barinov)
get-font to set `descent' property correctly
x plugin, also only
support this if configure finds the correct header files
synthesize-event to generate correct relative
pointer positions
input-focus to theme-callable functions
display-window when it's applied to iconified
windows
fonts-are-fontsets and
fontset-languages-re to work around broken X servers
ws-move-window to not remove the window if source
and dest are the same (Rob Hodges)
sp-prune-points function (Dan Winship)
move-viewport-to-window to only flip viewports if
window isn't already on the current viewport (Merlin)
x-raise-window; added symmetrical
function x-lower-window
x module
/ in themes to be the quotient function
(integer division), which is what they expect. The divide
function can be used for real division
x, a basic Xlib binding for creating and
drawing in windows (Merlin, me)
call-command-with-output-to-screen, prompts
for and invokes a command, then displays any output it emitted (bound
to A-x in default keymaps)
multi-click-delay, maximum time in
milliseconds between button presses to count as click2 or
click3 events (Martin Blais)
edge-flip-only-when-moving (Yaron M. Minsky)
cycle-prefix,
cycle-class (Kai Großjohann); can now be bound to events with
more than one modifier (Timo Korvola)
uniquify-window-name; new property
unique-name. Forces the window to have a unique name
size-window-add-column,
size-window-subtract-column, size-window-add-row,
size-window-subtract-row
magnetism
(the old method), attraction and resistance. (Merlin, me)
grow-window-{left,right,up,down} and
pack-window-{left,right,up,down} (Kai Großjohann)
WM_COLORMAP_WINDOWS protocol
synthesize-event, font-ascent,
font-descent, call-with-keyboard-grabbed
define-placement-mode and
define-focus-mode—make defining these things easier. Focus
modes are now settable for each window individually
current-event-string function
x-cycle command
configure-request-hook. The new configure handler respects
window gravity when resizing
configure-auto-gravity. When enabled the window
gravity is implied by the position of the center of the window. (e.g.
try placing the GNOME control center in the bottom right corner of the
screen, then click on an item that causes it to resize)
XCreateFontSet causes—fall back to
XLoadQueryFont if possible
Also, remove the need to call custom-add-required in
.sawmillrc, it's always done now
focus-when-mapped, and
gravity (overrides the hinted gravity value)
under-pointer and
centered-on-parent
resize-edge-mode, replaces
resize-by-frame-class and resize-add-edges>. Also allows
twm-style resizing (Mark Probst, me)
default-cursor,
synthetic-configure-mutex, frame-draw-mutex,
frame-state-mutex are now functions
x-keysym-name, x-lookup-keysym,
decode-event, encode-event.
move-resize-inhibit-configure
fp->win == 0 assertion, it should be harmless and
was triggering for some people
ws-insert-workspace (Kirk
Saranathan)
custom-add-required. If
you have a .sawmillrc you'll need to do this manually
move-resize-window-to doing a combined
move/resize. New variable synthetic-configure-mutex, when set
holds off sending synthetic ConfigureNotify events to windows
until it's unset (this is held while interactively moving or resizing
windows)
after-add-window-hook. Called with a single
parameter, the window that's has just been adopted
x-kill-client, delete-window-safely.
send-client-message now groks long integers (i.e. cons cells) in
32-bit data (Timo Korvola)
window-put, window-get, image-put,
image-get, font-put, font-get: use equal to
compare keys, not eq
error-handler, implements a simple alternative
error handler (and allows the much-maligned beep to be turned off),
requires rep 0.11+
shade-hover, unshades windows while the pointer
is over them
window-menu,
shorten sticky entries as usual (James Antill)
raise-or-pass-through-click,
raise-and-pass-through-click-if-focused
move-cursor, various commands for moving the
mouse pointer; these commands are bound to the cursor keys when moving
or resizing windows
WM_NAME is a
null text property
skip-winlist and
skip-tasklist properties I'd stupidly broken
move-workspace-forwards and
move-workspace-backwards commands
uniconify-to-current-viewport option
delete-empty-workspaces command
New or updated functions to access frame parts directly:
frame-part-get, frame-part-put,
frame-part-window, frame-part-x-window,
frame-part-position, frame-part-dimensions,
frame-part-state, map-frame-parts,
refresh-frame-part, rebuild-frame-part
Other new functions: refresh-window
sawmill-themer to emit code to tell the window
manager that the theme is editable. The wm adds an ‘Edit Theme...’
option to the Customize menu when appropriate
call-after-property-changed function can now be given
a list of properties to monitor (James Antill)
call-after-state-changed, monitors a list of
window states (i.e. things like iconified, shaded, ...) and calls a
function when any of them change. The window-state-change-hook
now has a second argument (apart from the window), the list of symbolic
states that changed (James Antill)
skip-winlist and skip-tasklist to
the window matcher when GNOME support is enabled (Ben Liblit)
mono theme
display-message function update background color,
and gracefully handle invalid color specifiers (Matt Krai)
window-keymap. (Matt Krai)
inactive, focused,
highlighted, clicked, inactive-highlighted,
inactive-clicked. (Last two are new)
sawmill-themer. A GUI for creating simple
themes (those without any parts defined by functions)
gnome-int, loaded by sawmill-defaults if
GNOME is around, sets up some GNOME'ish things
toggle-single-window-mode
make-image now
always returns a new image
call-command accept closures
(cursor . nil) work correctly in frame definitions
Create new window instances by using the copy-to-next-workspace,
copy-to-previous-workspace, and copy-to-workspace:n
commands. Merge instances by moving them to the same workspace, or
using the delete-window-instance command
ungrouped. Means to put
the window in a group on its own
commandp function when applied to autoload stubs
gnome-logout command (Jens Finke)
raise-window-and-pass-through-click command to pass
<click2>, etc, events through to frame parts
frame-part-get, server-grabbed-p,
forget-button-press, resize-window-with-hints,
window-in-workspace-p, windows-share-workspace-p
never-focus, raise-on-focus
size, in terms
of the window's size hints
popup-apps-menu command (Gérard Milmeister)
define-frame-class when creating keymaps
(set ...) custom types
raise-window-and-pass-through-click command to
pass-through subsequent clicks
move-resize-raise-window is set
auto-foo-alist and
bar-windows-re variables, they're obsoleted by the general
match-windows mechanism
mono
show-message function, replaced by
display-message with a better calling interface; also displays
multi-line strings
Hyper modifier, prefix is H-
resize-add-edges)
fixed-position property as sticky-viewport,
and focus-proxy-click as focus-click-through
New option ‘--disable-nls’ to disable i18n
call-after-property-changed and
gtkrc-call-after-changed to allow themes to receive these events
(hooks are now off-limits to themes)
raise-window-and-pass-through-click; bind it
to a mouse button in the window-keymap to get the “raise window
on click” behaviour that seems popular
slide-window-x and slide-group-x for x
one of: left, right, up, down
ignored property of windows
(Julian Missig)
stacking-order function
bevel-image function (Scott Sams)
gnome-menu code when GNOME binaries aren't in
the first $PATH item; also accept non-alphanumeric language codes
AnyModifier and a
specific button
auto-group-alist and persistent-group-ids
variables).
For most commands working on single windows, there's also one operating on the group that the current window is a member of. (With the notable exception currently of moving windows.) There's also options controlling whether (de)iconification operates on windows or groups
gnome-share-directory, also look in
/etc/X11/applnk for menu entries
edge-flip-type)
after-framing-hook: called whenever a window's
frame is changed or recalibrated
first-fit-or-interactive
move-cursor-shape, resize-cursor-shape,
select-window-cursor-shape)
cycle-windows only
finds a single window; also, abort immediately if there's no windows to
cycle through at all
WM_NORMAL_HINTS property is read after it's
been updated
maximize-fill functions to respect the
maximize-ignore-when-filling option
avoid property instead of the
maximize-avoid property; new functions window-avoided-p
and avoided-windows; new regexp avoided-windows-re
delete-empty-workspaces
microGUI
window-id and
window-frame-dimensions functions. Replaced
query-last-pointer function by query-button-press-pointer
while-moving-hook, while-resizing-hook
WM_TRANSIENT_FOR property changes
window-outside-viewport-p (Andreas Degert)
SM_CLIENT_ID or WM_COMMAND has to match
resize-by-frame-class, when enabled (the
default), the resized window edges are chosen to match the class of the
clicked frame part (i.e. matching the cursor shape)
window-moved-hook, window-resized-hook,
after-initialization-hook, shape-notify-hook.
centered placement style
highlight-when-unfocused)
sm-after-restore-hook
set-frame-part-value—makes customizing the
frame-part-classes variables easier
_WIN_CLIENT_LIST property not being set properly (both
missing windows immediately after they're adopted, and of intentionally
skipping ignored windows)
cycle-disable-auto-raise); option to restrict cycling to the
current viewport (cycle-all-viewports)
lock-first-workspace is now enabled by default, and
prevents both the first and last interesting workspaces being moved
inwards
below-client
root-window-keymap is
searched for key-press events
shaped-transient
window types (make the window completely unframed)
decorate-transients enabled
cycle-windows could leave a window
originally under the pointer that's unfocused, drawn as though it is
focused
lock-first-workspace, prevent the first
workspace from being deleted when it's empty
ignore-window-input-hint, to always give
windows the focus, whether they say they will accept it or not
cycle-warp-pointer and
cycle-focus-windows
move-viewport-x and move-window-x commands
(for x being left, right, up, or
down)
microGUI by Ryan Lovett
ryan@ocf.berkeley.edu, based on the QNX Photon screenshots
(require 'gnome-menu) to your
~/.sawmillrc file to load it
transients-above-parents)
workspace-send-boundary-mode)
send-to-workspace:x for x from 1
to 9
foreground property of each frame part may now be an
image instead of a piece of text
smaker, uses the foreground images capability to
do a somewhat WindowMaker-like theme (with the absolute-e images). This
theme is extensively customizable—all images, colors, dimensions,
etc...
PseudoColor visuals
xterm command to launch an xterm
next-workspace-row and previous-workspace-row
commands. Together with the workspace-columns variable these
mimic a 2d desktop
cycle-through-workspaces option, there's now
workspace-boundary-mode—one of stop, wrap-around
or keep-going
move-snap-ignored-windows)
override_redirect
attribute while unmapped
focus-windows-on-uniconify)
preallocated-workspaces option
override-frame-part-classes variable—allows all
frame properties to be overridden on a per-class basis
auto-window-type-alist variable mapping window
names to border types
eval-modifier-events and
eval-key-release-events to allow catching these types of
keyboard events, disabled by default
alt-keysyms and meta-keysyms describe the virtual
modifier assignments
frame-part-classes variable). This should ensure that different
themes have the same feel (but a feel that may be customized by the
user)
removable property). Nothing makes use of this yet
gtk theme, draw bevels on window decorations
focus-proxy-click controlling whether to pass
the focus-inducing button-press event to the underlying window (in
click-to-focus mode)
sm-window-save-functions and
sm-restore-window-hook hooks). See lisp/workspace.jl for
an example
move-show-position,
resize-show-dimensions)
auto-frame-style-alist
variable associates window name regular expressions with frame styles.
Also, the window-ops-menu has a new submenu with all possible
styles
preallocated-workspaces, the number of
workspaces to create at startup
gradient theme to create full-sized gradient
images, trading memory for quality
menus and custom customize
options into normal variables (they're not particularly intuitive)
renderer property in frame definitions. This property is a
function called with args (image state); it should
draw a background into image for the specified state (nil,
focused, highlighted or clicked)
gtk. This reads the default GTK style and uses
the associated colors and pixmaps to decorate windows. It doesn't try
to handle engine-based themes. It should automatically detect when the
default style changes (if changed by the GNOME control center). Do
‘sawmill-client -c gtk-reload-style’ in the shell to reload the
style manually
gradient theme uses these and on-the-fly rendering to do
afterstep-like window titles
customize:group for each
group.
Also created the variable theme-load-path containing the list of
directories searched when trying to load a theme. By default it
contains two directories: ~/.sawmill/themes/ and
prefix/share/sawmill/version/themes.
select-workspace:X for X between
1 and 9
sawmill-client; invokes
the named interactive function
unframed window type
place-transient-mode)
window-ops-menu could be displayed from
one window but then affect a different window
move-snap-edges and move-snap-epsilon)
sloppy-focus variable, it's replaced by
focus-mode. This can currently be one of enter-exit
(normal focus follows pointer), enter-only (“sloppy” focus) or
click (click to focus)
keymap property of
the window under the pointer, not the focused window (as with keypress
events)
before-exit-hook, called immediately before
shutting down
raise-selected-windows)
warp-to-selected-windows)
brushed-metal and simple themes now define all
four standard frame types
simple frame style can now be
customized (simple-normal-color and simple-active-color)
decorate-transients)
transients-get-focus)
focus-windows-when-mapped)
foreground, background and font
attributes of each frame part may now refer to a function
First proper release
Sawfish provides a primitive type allowing colors to be represented. Each color object allows a single color value to be named and passed between Lisp functions.
Returns the color object representing the color specified by the string name. This is according to the standard X11 color specifiers, either a named color from the rgb.txt database, or a string defining the red, green and blue components of the color, either eight or sixteen bits in hexadecimal, i.e. ‘#RRGGBB’ or ‘#RRRRGGGGBBBB’.
Optional argument alpha becomes the alpha value of the returned color. It is passed through to
get-color-rgb.Signals an error if no known color has the name name.
Return the color object representing the color with RGB components as specified (each component ranging from 0 to 65535).
Optional argument alpha becomes the alpha value of the returned color. Use an integer value in the range from 0 to 65535. Integers outside that range are not supported, while non-integers such as
nilare silently converted to 65535 (fully opaque).
Given a color object, it's possible to find both the actual rgb values defining the color and one of the names that X11 uses to refer to the color.
Return a list of integers
(red green blue alpha), the actual color values of the color represented by object COLOR. The individual values range from 0 to 65535.
Return a list of integers
(red green blue alpha), just likecolor-rgb. However, the color values are scaled to fit a range from from 0 to 255.
Return the name of the color represented by the color object color. Note that this picks one name from the set of valid names for this color; it may well be different to the name used when the color was originally allocated.
The X11 name does not include alpha information.
Where a color object is used to define the foreground color of a piece
of text, the default-foreground color provides the default value
used if no actual color is specified.
Lisp font object allows manipulation of correspondig X11 fonts.
Sawfish supports three “types” of fonts: X11 old core fonts (fontsets
and fontstructs), Xft fonts, and if supported, Pango fonts. In lisp,
type is represented by a string, "xlfd", "Xft", or
"Pango".
Returns a font object which represents an X11 font. It's specified by the string name, and string type. Signals an error if the specified font is not available.
“Safe” examples are:
(get-font-typed "xlfd" "fixed") (get-font-typed "Xft" "Sans") (get-font-typed "Pango" "Sans")
Return a font object representing the X11 core font (fontset or fontstruct) specified by the string name.
Signals an error if no font named name is available among the X11 core fonts.
Several functions allow the attributes associated with a font object to be found.
Returns the bounding height of glyphs in the font represented by object font.
Returns the ascent of glyphs rendered using the font represented by font. If no font argument is given, use the default font.
Returns the descent of glyphs rendered using the font represented by font. If no font argument is given, use the default font.
Returns the number of horizontal pixels that would be required to display the text string using font object font (or the value of the
default-fontvariable if font is undefined).
As with colors, a default font may be specified, to be used where no other font is specified.
Fonts can have Lisp properties associated with them (similar to the property lists associated with symbols). Currently these aren't actually used by the window manager.
Associate the lisp object value with the property named by the symbol property of the font object font.
Return the value of the property named by the symbol property of the font font, or
nilif no such property exists.
True if the X fonts in use are fontsets. This will be false if
setlocalefails, or returns an ASCII locale, or if X doesn't support the locale.
The image type allows arbitrary 24-bit images to be manipulated by the window manager. Images may be both loaded from files, and rendered dynamically.
Creates and returns an image object containing the image defined by the contents of the file named file-name (a string). The
image-load-pathdirectory provides the search path used while trying to find a directory containing the file named file-name.All common image formats will likely be able to be loaded. But PNG, JPEG and XPM should always be supported.
Argument plist becomes the property list of the returned image.
Signals an error if file called file-name may be found, or if an image may not be constructed from the file.
Directory containing built-in Sawfish images. By default, this is sawfish-directory
/images.
A list of directory names. This defines the search path used when loading images. By default, this is
("."image-directory). Modifying image-directory does not modify image-load-path.
Create and return a new image, of size width, height. If color is defined it specifies the color of all pixels in the image. If undefined, all pixels will be black.
Create and return an new image. The image is constructed by copying an X Drawable (identified by id) into a Sawfish image object. The function automatically handles depth conversion.
If mask-id is given, it identifies another X Drawable. Black pixels in this drawable indicate transparent pixels in the image object (non-black pixels have no effect on the image object).
Returns a newly allocated image object, an exact copy of the image object image.
Returns a cons-cell
(width.height)defining the dimensions of the image represented by image.
Flip the contents of image about the vertical axis. This is a mutating operation that returns the modified argument.
Flip the contents of image about the horizontal axis. This is a mutating operation that returns the modified argument.
Flip the contents of image about an axis running from the top-left corner to the bottom-right corner of the image. This is a mutating operation that returns the modified argument.
As with many of the other types, arbitrary state may be associated with image objects.
Set the property named property (a symbol) of image to value.
Return the property named property of image, or
nilif no such property exists.
The only predefined property is the symbol tiled, used when an
image is displayed in a window decoration. When set to a non-nil value
the image is not scaled to the size of the decoration (the default),
but is tiled across the decoration.
When images are scaled across border decorations the pixels that are actually scaled are defined by the border of the image. The border defines the outer rectangle of pixels that are left as-is, and the inner rectangle which is scaled.
Returns a list of integers
(left right top bottom), the border of the image object image.The number associated with each edge of the image defines the number of pixels adjacent to that edge that will not be scaled.
Sets the border of image.
The number associated with each edge of the image defines the number of pixels adjacent to that edge that will not be scaled.
The shape of the image may also be specified, this defines which pixels are treated as being transparent. Each image may define a single color as marking transparent pixels.
Image shapes are not supported under GDK Pixbuf. Sawfish will
print a diagnostic message to STDERR if the function is called
without being supported.
Return the color marking transparent pixels in image, or
nilif no such color has been specified.
It's also possible to define color modifiers for each image. These define the transformation applied to the value of each pixel when it is displayed. Four different modifiers exist for each image, one for each color component, and one for the image as a whole.
Return the modifier defined by the symbol type of image, a list of integers
(gamma brightness contrast). Each integer has a value between zero and 255 representing the weight applied to the associated attribute when rendering the image.The four types are
red,green,blueandnil(all colors). The argument must beeqto one of those symbols.
Set the image modifier of image defined by type. Type may be one of the values of (not the symbols)
red,greenorblue.
There are also several other functions manipulating images:
Transform the edgemost pixels of image to give it a “bevelled” effect. BORDER is an integer defining the width of the bevel. If upwards is non-nil the bevel is raised, otherwise it is lowered.
If bevel-percent is defined it specifies the height or depth of the drawn bevel. When undefined, the value of the parameter is taken from the
default-bevel-percentvariable.
Set all pixels in image to color (or black if color is undefined).
Tiles source-image into dest-image, starting from the upper-left corner, working outwards.
Return a copy of image, scaled to width by height pixels.
Copy the contents of image2 into image1. Image2 is cropped to fit. Arguments x and y indicate the position in image1 of the top-left corner of image2. If not supplied, they default to 0.
Return a new image that is a rectangular section of image. The result image starts at pixel (x, y) in image, and extends over width and height pixels in image.
When the cropped image extends beyond the boundary of image, the behavior is undefined.
The following functions allow users to manipulate images on a pixel-by-pixel level. They all use a list representation for pixels: (r, g, b, a) indicating the red, green, blue and alpha components
Return a list (r, g, b, a) of the red, green, blue and alpha components of the pixel (x, y) in image.
When the pixel position extends outside the bounds of the image, the behavior is undefined.
Set the pixel at (x, y) in image to pixel. Pixel is a list of four numbers (r, g, b, a), the red, green, blue and alpha components.
When the pixel position extends outside the bounds of the image, the behavior is undefined.
Transform each pixel in image in place by calling xform on each pixel in the image.
Xform takes a single argument, a four element list (r, g, b, a) indicating the red, green, blue and alpha components of a pixel. Xform should return the new value for the pixel it was given. The return format is the same four-element list.
Xform is allowed to return
nil. In this case,image-mapimmediately returns an invalid object.
Set each pixel in image based on the results of calling generator.
Generator takes two arguments: the X and Y coordinates of a pixel. It returns a four element list (r, g, b, a) indicating the red, green, blue and alpha components of a pixel. This new pixel replaces the current pixel contents at (X, Y).
Generator is allowed to return
nil. In this case,image-mapimmediately returns an invalid object.
Tell Sawfish to cache no more than max pixels. Returns a four-element list indicating the current cache status:
(max-cached-pixels,cached-pixels,hits,misses).
Cursors define the shape and hot-spot of the mouse pointer's image. A lisp type is provided for manipulating these objects. For pointer related functions, See Pointer Functions.
Returns the cursor object representing the cursor defined by data. If data is a symbol, it's replaced by its
cursor-shapeproperty.Possible data values are an integer representing a glyph in the standard X11 cursor font, or a four-element vector.
The format for a vector is
[image mask fg bg]where image and mask are the filenames of standard X11 bitmaps, and fg and bg are colors (or names of colors). All bitmap files are searched for using theimage-load-pathvariable.
Change the colors of the cursor object cursor to fg and bg (either color objects or the names of colors).
Set the cursor object displayed in the root window, and in parts of window frames that have no other cursor specified, to cursor.
If called with no argument, simply return the current such cursor object.
So that the integer indices of glyphs in the X11 cursor font do not
have to be remembered, the cursor-shape properties of the
following symbols are automatically set:
X_cursor, arrow, based_arrow_down,
based_arrow_up, boat, bogosity,
bottom_left_corner, bottom_right_corner,
bottom_side, bottom_tee, box_spiral,
center_ptr, circle, clock, coffee_mug,
cross, cross_reverse, crosshair,
diamond_cross, dot, dotbox, double_arrow,
draft_large, draft_small, draped_box,
exchange, fleur, gobbler, gumby,
hand1, hand2, heart, icon,
iron_cross, left_ptr, left_side, left_tee,
leftbutton, ll_angle, lr_angle, man,
middlebutton, mouse, pencil, pirate,
plus, question_arrow, right_ptr,
right_side, right_tee, rightbutton,
rtl_logo, sailboat, sb_down_arrow,
sb_h_double_arrow, sb_left_arrow, sb_right_arrow,
sb_up_arrow, sb_v_double_arrow, shuttle,
sizing, spider, spraycan, star,
target, tcross, top_left_arrow,
top_left_corner, top_right_corner, top_side,
top_tee, trek, ul_angle, umbrella,
ur_angle, watch, xterm.
The glyphs associated with these names are shown in Appendix I, of Volume Two, Xlib Reference Manual.
One of the most important data types in sawfish is the window type. All managed client windows have a single window object associated with them.
Returns
tif arg is a member of the window type, and has a client window associated with it.
Since the root window is not a managed client window, it is not
represented by a window object. Sometimes functions' arguments and
return value treat the symbol root as the root window. Window
hooks are so. But sometimes not.
Basics:
Many attributes are described in the related sections.
First, basic attributes, like name, class, ID, etc.
Return the full-name associated with window. This may or may not be the same as the normal name.
Sawfish provides functions to ensure that window names are unique.
Uniquify the string proposal against the list of strings existing. Uses the format string
uniquify-name-formatto generate unique names.
Force window to have a unique title.
Change the window's name to name. This works in practice, but technically ICCCM doesn't suppose window name changes.
If the optional argument spec is
nil, returns the class that window belongs to as a string, or nil if window has no associated class.ICCCM class consists of “Instance” and “Class”. If spec is the symbol
cons, then the cons of the form(instance.class)is returned. If spec is the symbolconfigurator, then the string of the form “instance/class” is returned.
If window object window has a client window associated with, return an integer defining its xid, otherwise return
nil.
Returns the size of the window window in a cons cell
(width.height). This does not include the frame. The size including the frame is returned bywindow-frame-dimensions. (see Frame Functions)
Returns the position of the window decorated with the frame in a cons-cell
(x.y).
Display window's position and size in a popup. If the argument is
nilor called as a command, user chooses the window by cursor and click.This function is defined in
sawfish.wm.util.display-wininfo.
Return a list of symbols defining the X11 window manager protocols supported by client window.
Return true if window includes atom in its
WM_PROTOCOLSproperty.
Listed here are window visibility predicates:
stacking-visibility, window-obscured (see Stacking Visibility), window-visible-p (see Showing and Hiding Windows), window-shaped-p (see Shading Windows),
window-iconified-p (see Iconifying Windows),
window-in-workspace-p (see Workspaces and Windows),
window-outside-viewport-p (see Windows and Viewports).
Various predicates:
Return
tif the client window associated with object window is mapped. (Note that this doesn't necessarily mean that it is visible.)
Return
tif the “Urgency” hint of the window associated with window is set.
See See Input Focus.
First, functions which treat all windows.
Returns a list containing all managed window objects, in the order that they were adopted by the window manager (first to last).
Call
(function window)on all existing windows. Returns the value of the last function invocation. If any function returnsnil,map-windowsreturnsnilimmediately.
Functions to get specific windows.
Return a window object with name name, or
nil. Even if multiple windows are matched, one of them is returned.If
regexis non-nil, name is treated as a regex, and matched against window names.If
iconis non-nil, window's icon name (set byNEW_WM_ICON_NAME, not EWMH_NET_WM_ICON_NAME) is searched, instead of the window's name.
Same as the above, but the match is done against the window class. Here, the class does not include the “instance”. (See
window-classin See Window Attributes.)The option
regexis boolean, not a regex, likeget-window-by-name.
Same as the above, but the match is done against the window role.
The option
regexis boolean, not a regex, likeget-window-by-name.
Return the list of windows (mapped or unmapped) that match the predicate function pred.
Many window manager extensions need to be able to associate Lisp data with individual windows. For example, the module handling iconification needs to associate a boolean value with each window—whether that window is iconified or not.
To solve this problem, Sawfish gives each window a property list. These are exactly analogous to the property lists stored with each symbol (see Property Lists); they allow values to be associated with Lisp symbols, for a particular window.
Note that these properties are different to the properties that X stores with each window, since these properties are internal to the window manager (see X Properties).
For a list of the standard window properties, see Standard Properties.
Set the lisp property named property (a symbol) associated with window object window to value. Note that these are Lisp properties not X properties.
Return the window property named property (a symbol) associated with the window object window, or
nilif no such property exists. Note that these are Lisp properties not X properties.If the optional third argument checker is non-nil, then checker is returned if the requested property does not exist. This is used to distinguish the assigned value of
nilfrom property's absence. A symbol is usually a good choice for checker.
Call
(function property value)on each of the Lisp properties bound to window. Returns the value of the last function invocation. If any function returnsnil,map-window-propertiesreturnsnilimmediately.
Returns the property list of the window window which is of the form
(prop value prop value ...).Do not attempt to change properties by modifying the property list in place. Use window-put instead.
Remove property of window. Returns
tfor success,nilif the property did not exist.
Some window “types” are defined. They represent the window's special nature based on the role. Defined types are “transient”, “desktop”, and “dock”.
A type is usually set by applications through hints when the window appears. Many windows do not have any types.
“Transient” windows are pop-up or dialog windows associated with a main application. They tend to have less window decorations, and are intended to last a short time only.
Returns
nilif window isn't marked as a transient window. Otherwise returns an integer, the xid of the parent window.
Mark that the window associated with object w is a transient window.
Return true if window child is directly a transient for window parent, false otherwise.
Return true if window descendant is (directly or indirectly) a transient for window ancestor, false otherwise.
Return the list of windows that window child is a transient for. If indirectly is true, then return the list of all ancestors rather than parents.
Return the list of windows that are transients for window parent. If indirectly is true, then return the list of all descendants rather than children.
Return the list of windows which is either a transient window for window window, or a window which window is a transient for. This always includes W. The `transient window for' relation holds for windows which are direct or indirect transients of the parent window in question.
If the by-depth argument is true, then the retrurned list is in stacking order.
Map the single argument function fun over all windows in the same transient group as window window.
Raise window window to its highest allowed position in the stacking order. Also raise any transient windows that it has.
Lower window window to its lowest allowed position in the stacking order. Also lower any transient windows that it has.
If window window is at its highest possible position, then lower it to its lowest possible position. Otherwise raise it as far as allowed. Also changes the level of any transient windows it has.
Focus on application windows when they first appear. Defaults to true, must be true or false.
Decorate dialog windows similarly to application windows. Defaults to false.
“Desktop” windows are root windows or viewport windows. They
accept keys as if it is a root window. (I.e.,
root-window-keymap is used.) They don't have a frame.
Mark that the window associated with object w is a desktop window.
List of properties set (to true) on windows when they are marked as desktops. Defaults to
'(fixed-position sticky sticky-viewport)
“Dock” windows are docks or panels. They don't have frame by default.
List of properties set (to true) on windows when they are marked as docks. Defaults to
'(window-list-skip cycle-skip fixed-position focus-click-through avoid no-history never-iconify never-maximize sticky sticky-viewport placed)
The input focus defines exactly which client window will receive events generated by the keyboard.
Returns the window object of the currently focused window, or
nilif no window is focused.
Sets the focus to the client window associated with window.
If window is
nil, then no window will have the focus.
If you're unsure, use
window-really-wants-input-pfunction described below.Return
twhen the window window wants input focus in X sense, i.e. if it has asked for the input focus to be assigned to, through theinputfield of itsWM_HINTSproperty.
Like
window-wants-input-p, but in addition, this function also takes into account user option provided by Sawfish, i.e. if the window hasnever-focusproperty or not.
The window manager is responsible for switching the input focus from
client window to client window. Sawfish implements several
focus modes that provide this behavior. Each focus mode is
bound to a symbol; the implementation is bound to that symbol's
focus-mode property slot.
Defines the current method of using the mouse to assign the input focus. This is a symbol from the list
focus-modes.
A list containing all names of focus modes. The built-in values are
enter-exit,enter-only,enter-clickandclick.
Focus mode enter-exit changes focus when the pointer enters a
window or leaves the focused window. Focus mode enter-only
changes focus when the pointer enters a window, but not when it leaves
the focused window. Focus mode click changes focus when you
click on a window. Focus mode enter-click is the union of
enter-only and click, and changes focus on any
of their conditions.
It is possible to add additional focus modes by defining your own handler function. The handler function must obey a “focus-mode-handler” protocol.
A function that implements the
focus-mode-handlerprotocol can be used to define a focus mode. Afocus-mode-handlerresponds to events associated with windows.Argument window is the window that received this event.
Argument event-name is one of the following symbols:
pointer-inpointer-out- The pointer has entered or exited the window. The handler is responsible for checking whether an entered window wants input events. The desktop never receives
pointer-inorpointer-out; only normal windows do.enter-rootleave-root- The pointer has entered or exited the desktop (which is the window argument). Normal windows never receive
enter-rootorleave-root.focus-infocus-out- The window argument has gotten or lost focus. Note that the
focus-inhandler is not responsible for updating the window-order list.before-mode-changeafter-mode-change- Sawfish sends these synthetic events to each window before/after changing that window's focus mode. When the global focus mode changes, all windows get these events.
add-window- Sawfish sends this event to every window immediately after mapping it. Handlers can use this to initialize window-internal data structures.
warp-if-necessary- Warp the cursor to the window if doing so would make the cursor position “consistent” with the focus mode. For example, in
enter-exitmode we warp the cursor if it is not already in this window. Inenter-onlymode, we warp the cursor if it is in another window, but not if it is over the desktop—a window would not lose focus when the cursor moved from it to the desktop.This event is implemented via
warp-cursor-to-window, so Sawfish will not warp unlesswarp-to-window-enabledis true.focus-revert- The focused window has disappeared (the window argument is not used here). The focus mode may react by setting focus to some other window. If a focused transient window disappears, focus normally reverts to the window that the disappearing window was transient for.
focus-revertis not invoked in that case.The protocol allows for any number of additional arguments, but does not define any. Any handler function must be prepared to receive and ignore them.
Unsupported events may be ignored. The return value of this function is ignored.
Defines a new focus mode called name (a symbol). The focus-mode handler fun implements this focus mode.
See the documentation for
focus-mode-handlerfor more information.
Set the focus mode of window window to mode. This triggers
before-mode-changeandafter-mode-changefocus-mode events on window.
Generate a
warp-if-necessaryevent and sends it to the window's focus function.Various functions call
warp-pointer-if-necessaryif they move the focused window out from underneath the pointer.
When in
clickfocus mode, the focus-assigning click is only passed through to the client window if this variable ist(the default).This option may be set on a per-window basis by setting the
focus-click-throughproperty of the window (using thewindow-putfunction).
When true, the current command is being called from within a click-to-focus button press event.
This is a fluid object, not an ordinary variable.
Sawfish also maintains the order in which windows were recently focused.
Return a list of windows, in most-recently-focused order.
If workspace is an integer, then only windows on that workspace are included, otherwise all workspaces are searched.
If allow-iconified is non-nil, iconified windows are included. If
all-viewportsis non-nil, then all viewports of the workspace(s) are scanned.
Return the most-recently focused window in the current workspace. If the optional argument windows is given, it must be a list of windows. In that case, the function will return the most-recently focused window from that list.
Focus the most-recently-focused window of the current workspace.
When true, focusing a window doesn't change it's position in the stack of most-recently focused windows.
Other focus related functions:
Returns
tif the window window should be included when cycling between windows. Desktop windows and those with thecycle-skipproperty should normally not be included.When
t, the ignore-cycle-skip keyword argument forces the function to include windows with thecycle-skipproperty.
Maintain a two-element keymap stack for window.
focus-push-mapmakes keymap current for window, but saves the existing keymap. We can restore this existing keymap withfocus-pop-map.These functions are intended to support click-to-focus. They enforce certain sanity rules: pushing into a two-element stack will only overwrite the top element, while popping a one-element stack has no effect.
MISSING. This does not seem to be used anywhere, and its behavior is unclear.
Waits for the user to left-click on a window, and returns that window. The mouse cursor changes shape, and all normal input events are suppressed until a window is selected. For root window,
nilis returned.
The cursor shape to use when selecting a window. Defaults to
crosshair.
The X window system associates properties with windows (these are totally separate to the properties that sawfish associates with window objects, see Window Property Lists). Most inter-client communication is performed through manipulation of these properties.
All functions defined below, that operate on X properties, accept their
window parameter as either a window object (denoting the
associated client window), the numeric xid of a window, or the symbol
root denoting the root window.
Sawfish represents X atoms (both the names and data types of X
properties) as symbols. There is an exact correspondence between the
names of atoms and the name of the symbol representing them. For
example, the X atom ‘STRING’ is represented by the lisp symbol
STRING.
Return a list of symbols defining the X properties set on window.
Deletes the X property named property (a symbol) associated with window.
Returns a list
(type format data)representing the X property property of window. If no such property exists, return nil.type is the atom defining the type of the property. format is an integer, either 8, 16 or 32, defining the number of bits in each of the data items. data is an array, either a string for an 8-bit format property, or a vector of integers otherwise.
If type is
ATOMand format is 32, then data will be a vector of symbols, representing the atoms read.
Set the X property property of window to the array data, either a string or a vector of integers.
type is a symbol representing the atom defining the type of the property; format is either 8, 16 or 32 defining the number of bits in the data values.
If type is
ATOMand format is 32, then any symbols in data will be converted to their numeric X atoms.
The standard X property formats don't allow for an array of strings to be stored, so these are often encoded as the strings concatenated, separated by zero characters. These are usually called text properties. Sawfish has two functions for manipulating them:
Similar to
get-x-property, but returns eithernilor a vector of strings.
Sets the X text property property of window to the array of strings data.
It's also possible to detect when the value of any property associated
with a managed window changes, using the property-notify-hook.
See Standard Hooks. The following convenience function takes
advantage of this hook:
Arrange for function fun to be called with arguments ‘(window property state)’ when the X11 property named prop (a symbol) changes. Prop may also be a list of property names to monitor.
Sawfish provides extra tools and commands for dealing with ICCCM groups. Most “normal” groups work the same way as they do in the ICCCM standard: windows have a group property that is set to the X window ID of the group leader. These are “group IDs”, and they are always positive integers. In addition, Sawfish allows group IDs to be:
If window is part of a group, return the X window id of the leader of that group. Otherwise return
nil.
There may be certain named groups that always exist, whether or not any window belongs to them.
In any case, a window is limited to belonging to one group, and always belongs to one group.
It is possible to change the group of a window in Sawfish. Use
add-window-to-group, or if necessary you can set the window's
group property explicitly.
Place window in group group-id, replacing any previous group membership. If group-id is
nil, then Sawfish returns the window to whatever group membership was supplied by ICCCM.
Place window into a new group, which will have window as its sole member. This is an anonymous user-defined group. The new group ID is returned.
The Sawfish group assignment never overrides the ICCCM group
assignment, just suppresses it. The window-actual-group-id
function implements this overriding.
Return the (Sawfish) group ID for window. This is, in order of preference:
- The group ID assigned by Sawfish
- The group ID passed in by ICCCM.
- The corresponding values for an owning window, if the given window is transient.
- The window's own window ID.
This means that a window is, at the very least, part of its own group.
Each of the following functions operates on the “actual group ID” as returned by the above function.
Return the list of windows in the group with id group-id. If by-depth is non-nil, then return the windows in order of stacking, from topmost to bottommost.
Return the list of windows in the same group as window w. If by-depth is non-nil, then return the windows in order of stacking, from topmost to bottommost.
Map the single argument function fun over all windows in the same group as window w. Note that fun needs to operate using side-effects, rather than returning values.
Map the single argument function fun over all windows not in the same group as window w. Note that fun needs to operate using side-effects, rather than returning values.
Return a menu definition suitable for
popup-menu. This menu will allow the user to assign the window w into any group of a managed window, or into a brand new group. The window's current group is checked or otherwise marked.
Most of the window manipulation functions that operate on windows are also available for window groups. Each of these functions takes a window as argument; the affected group is that window's group.
These operate like their single-window counterparts. They work by temporarily rebinding
iconify-group-modeanduniconify-group-mode.
These operate like their single-window counterparts.
If window w is sticky, all windows in its group have their stickyness removed. Otherwise all windows in its group become sticky.
These operate like their single-window counterparts.
All windows in the group of w are moved from their existing workspaces to the nearest workspace that w is in. Sticky windows are not affected. If the window had the input focus and it is visible after the move, it retains the input focus.
These operate like their single-window counterparts.
These operate like their single-window counterparts.
When user wants to use a window, displaying, focusing, raising, etc, are necessary. Functions in this section do such jobs.
Roughly speaking, do everything necessary to make window ready for user.
The operations are done in the following order. If the window is iconified, it gets un-iconified. The workspace and the viewport in which the window lies is selected. Unshade if necessary. (See
unshade-selected-windowsvariable below.) Then call theactivate-windowfunction described below.It is defined in
sawfish.wm.util.display-windowmodule.
Raise, focus, warp pointer if necessary, and mark the window as the top of window order. Don't focus if the window doesn't allow that operation.
The stacking order of the display defines the order in which windows are shown, from topmost to bottommost. It's Sawfish that maintains this list. Raising or lowering windows changes their positions in this list.
Return a list of window objects defining the current stacking order of all client windows, from top-most to bottom-most.
Similar to
stacking-order, but only returns windows that are mapped.
Restack all client windows specified in the list of window objects list in the order they occur in the list (from top to bottom). The stacking order of any unspecified windows isn't affected.
Sawfish allows the stacking order to be managed as a sequence of layers, with windows being assigned a particular depth within the order. For any given window with depth d, it will be above all windows with depth less than d, and below all windows with depth greater than d. It may be above or below any other windows with depth d.
The depth property of each window is used to store this depth. A
depth of zero is “normal”, with negative depths stacked below, and
positive depths stacked above this normal level.
Similar to
stacking-order, but only returns windows with depth depth.
Sets the stacking depth of window to depth, then restacks the windows to reflect this change.
Functions to change stacking order.
Change stacking order of window below so that it is immediately below window above. This function alone does not raise / lower windows.
Change stacking order of window above so that it is immediately above window below. This function alone does not raise / lower windows.
Evaluate forms in an implicit
progn, then restore the original window stacking order, returning the value of theprogn.
Assuming that the current stacking order is in a consistent state except, possibly, for the position of window w, restore the consistent state including window w. This is achieved by raising or lowering window W as appropriate.
There're functions which tell how the window is covered by others.
Returns
unobscuredifwindowis unobscured,fully-obscuredif one or more windows completely obscurewindow, orpartially-obscuredif one or more window partially obscurewindow.Deciding between fully and partially obscured can be expensive. If
window-obscuredsatisfies your needs, use that in preference tostacking-visibility.
Returns
nilifwindowis unobscured,tifwindowis completely obscured by exactly one other window, or a list of windows that partially obscurewindow.If a list of partially obscuring windows is returned, taken together they may or may not fully obscure
window.
Returns a symbol defining the current visibility of window. Possible returned symbols are
fully-obscured,partially-obscuredorunobscured.
window-visibilityis deprecated. It is unreliable when using the Composite extention, as every window is reported unobscured. Usewindow-obscuredandstacking-visibilityinstead.
Over time, Sawfish has accumulated several subtle variations of functions for raising and lowering windows. One set of functions operates on single windows. Notice how the function name and command name for each pair differs slightly.
Lower window to the bottom of its stacking depth.
Raise window to the top of its stacking depth.
If window is the highest in its stacking level, lower it to the bottom of this level, otherwise raise it to the top of its level.
Raise / lower window win so that it is above / below window ref. If ref is undefined, win is put at the top / bottom of the stacking order.
Another set of functions supports operating on multiple windows
simultaneously. You have to import sawfish.wm.util.stacking to
use them. Again, the function name and command name for each pair is
different.
Lower window and possibly associated windows to the bottom of their stacking depths.
Raise window and possibly associated windows to the top of their stacking depth.
If window is the highest in its stacking level, lower it and possibly associated windows to the bottom of their level, otherwise raise them to the top of their level.
This user option indicates which windows the
lower-window*,raise-window*andraise-lower-window*functions affect. This variable can be
none- Only the specific argument window is affected.
transients- The specific argument window and all of its transients are affected. This is the default.
group- The specific argument window and all windows in its group are affected.
Sawfish has more general operations that raising a window to the top or lowering it to the bottom. It can place a window relative to one or more other managed windows.
Raise (or lower) all windows in order, such that items earlier in the list are higher (or lower) than later items. The window w is special, always being the highest or lowest window, even if appears in the middle of order.
For
raise-lower-windows, if w would be raised or lowered, then all the other windows are also raised or lowered.
There are also functions (and associated commands) to change a window's depth.
Decrement the stacking depth of window.
Increment the stacking depth of window.
Sawfish provides special support for “click-to-focus” mode, where you may or may not want to raise the window or pass the click to the underlying application.
Raise the window that received the current event with
maybe-raise-window. Then replay any pointer events that invoked the command.
Raise the window that received the current event (if it's focused) with
maybe-raise-window. Then replay any pointer events that invoked the command.
If the window that received the current event is not on top, raise it with
maybe-raise-window. Otherwise replay any pointer events that invoked the command, sending them to the window.
When the above commands are called interactively, Sawfish will try to invoke them on the window that received the current event. Failing that, Sawfish will invoke them on the currently focused window.
As noted above (see Window Attributes), the
window-dimensions and window-position functions return
the current configuration of a window.
Move the top-left corner of the window frame of window to (x, y).
Set the dimensions of the client window associated with object window to (width, height).
Move the top-left corner of the window frame of window to (x, y), and set the dimensions of the frame to (width, height).
Resize the window window respecting the hints (see below). For the first function, the dimensions are cols columns and rows rows. For the second function, the dimensions are width pixels and height pixels.
The hints parameters is either the size hints alist to use, or
nilin which case thewindow-size-hintsfunction is used to retrieve the window's hints.Hints can specify minimum or maximum value of each dimension, and also increase step, as far as these two functions are concerned.
Return an alist defining the size-hints structure specified by the client window associated with window. Possible keys in the alist are
min-height,max-height,min-width,max-width,height-inc,width-inc,min-aspect,max-aspect,base-height,base-width,user-position,program-position,user-size,program-size,window-gravity,border-size.
Usually, however, it is left to the user to configure windows. The following functions may be called interactively: their sole argument is then either the window that received the current event or the currently focused window.
Sawfish honors the min-aspect and max-aspect window
hints when interactively resizing a window.
Move window interactively using the mouse. Releasing any mouse button places the window at its current position.
Resize window interactively using the mouse. Releasing any mouse button places the window at its current position.
Note that this function selects the edge or edges of the window to move from the current position of the mouse when the resizing begins. The window is divided into a three-by-three grid; the rectangle containing the mouse pointer gives the direction to resize in. If the pointer is in the central rectangle the bottom and right edges are moved.
For these commands, first you specify a window dimension(s) in the configurator. The focused window will be resized to that preset size on invocation.
You're prompted to enter the new window size, and the window will be resized.
Wait for the user to select a window using the mouse, then interactively move that window.
Wait for the user to select a window with the mouse, then interactively resize that window.
Double / halve the size of window in both direction, i.e. the area will be 4 or 1/4 times.
Sawfish supports increasing the windows size until it touches another window. This is called “grow”. “Shrink” achieves the opposite, i.e. it decreases the windows size, until it does no longer overlap any other window. More precisely, the grow can be done repeatedly, each time until the edge meets another edge, and shrink is done so that it overlaps with one less window.
Grows window upwards / downwards / left / right until it touches another window. If that edge is beyond the screen edge, it is brought back in. With a universal prefix arg, maximize in that direction instead. With a numeric prefix arg, grow by that many increments specified by window or pixels instead.
There are commands, too, with the same name.
Shrinks window by moving one edge upwards / downwards / left / right until it intersects with one window less than before. (So, in
shrink-window-upfor example, the lower edge is moved.)Window won't be made smaller than the minimum size, or
shrink-window-minimum-size. More precisely, size truncation may make the window smaller than these values.There are commands, too, with the same name.
Moving counterparts, instead of resizing of “grow” and “shrink”, are “pack” and “yank”. So, “pack” moves until the window touches another, and “yank” moves until the overlap reduces.
Moves window upwards / downwards / left /right until it touches another window. If that edge is beyond the screen edge, it is moved back in. With a universal prefix arg, move in that direction maximally instead. With a numeric prefix arg, move by that many pixels instead.
There are commands, too, with the same name.
Yanks window upwards / downwards / left / right until it overlaps with one less window than before.
There are commands, too, with the same name.
Grow, pack, shrink and yank behavior can be customized through the following variables:
Whether growing is considered to be maximization. The default value is
t.
Whether and how to move the pointer, either
alwaysmaybeornever. The default value ismaybe
maybemeans that the pointer is moved along with the window, if the pointer was within the window area before packing.alwayswarps the pointer to the center of the window if it isn't already in the window, then does likemaybe.nevermeans not to warp the pointer.
Whether to bump into fully obscured windows. The default value is
nil.
Whether to bump into windows on a different depth, either
alwaysmaybeornever. The default value isalways.
maybemeans onlyavoidedwindows (see Avoided Windows).
The minimum height or width to which a window may be shrunk. The default value is
10.
The minimum amount of window left visible, if yanked over the screen edge. The default value is
10.
Place window in the middle of the screen (frame-size is respected while calculating position)
The interactive move and resize behavior can be customized through the following variables:
A symbol defining the visual method of interactively moving windows. Current options include
boxfor a wire-frame grid, andopaquefor full redisplay.
A symbol defining the visual method of interactively resizing windows. Current options include
boxfor a wire-frame grid, andopaquefor full redisplay.
When non-nil, the current window position is shown in the center of the screen.
When non-nil, the window size is shown in the center of the screen.
When you move a window and it comes close to another, sawfish adjusts its position so that its edge fits to the other, or “snaps”. (It may be dubbed as “interactive tiling”.) Snapping also takes place agaisnt screen boundary.
The distance in pixels before snapping together two edges. The bigger the value, the more adhesive windows get.
Windows have a “gravity” property, which affect how they are placed in particular positions.
Returns the gravity of window. The order of precedence is Sawfish
gravitywindow property, explicit hints argument, X window size hints. The default gravity when nothing else is specified isnorth-west(specified by ICCCM).
Sawfish provides two low-level functions for (un)withdrawing client windows from the display. These are used to implement both workspaces (see Workspaces) and iconification (see Iconifying Windows).
Prevent object window from being displayed.
This function is low-level and mainly for internal use. You should probably use
iconify-window. (see Iconifying Windows)
Ensure that window is visible, (provided that it has been mapped, and is within the screen boundary).
This function is low-level and mainly for internal use. For interactive use, you should probably use
display-window. (see Activating Window)
Returns
tif object window has not been hidden by thehide-windowfunction.
There are several methods through which X11 client windows may be removed from the display. These differ in the level “politeness” they show the window and its owning application.
Delete window, i.e. send a
WM_DELETE_WINDOWclient-message if possible, or just kill the associated X11 client if not. window may be a window object or a numeric window id.
If the application owning window supports it, send a
WM_DELETE_WINDOWmessage to window. Otherwise just emit a beep.
Destroy window without giving the owning application any warning. window may be a window object or a numeric window id.
Force a close down of the X11 client that created the window specified by window (a window object, or numeric id).
When a managed window is destroyed, the destroy-notify-hook will
subsequently be invoked (see Standard Hooks).
Many window managers allow a window to be shaded; when in this state only the title bar of the window is visible.
Arrange for only the title bar of window to be visible.
If the window is shaded, restore it to it's original state.
Toggle the shaded state of the window.
When true, raise windows when they are unshaded. Defaults to false.
The shaded property of a window is set to t when the
window is shaded. If a window is added with this property already set,
then the window will appear in its shaded state.
The dimensions of a window may be temporarily maximized, stretching as far as possible within the screen in one or two dimensions.
If you have multiple monitors, maximization is done within a head, unless stated explicitly that it's xinerama.
Return
twhen window is maximizable. The window property never-maximize prevents maximization.If defined, direction is a symbol, either
verticalorhorizontal, and maximization will only occur for that direction.The optional argument hints overrides the window's hints.
Return
twhen window is vertically maximized, regardless if it's horizontally maximized or not.
Return
twhen window is horizontally maximized, regardless if it's vertically maximized or not.
Ordinary maximization occurs on the current screen, and possibly rounding down to fit character sizes.
Maximize both dimensions of window on the screen.
If defined, direction is a symbol, either
verticalorhorizontal, and maximization will only occur for that direction.The optional argument only-1d is for internal use. Don't use it.
Maximize the vertical or horizontal dimension of window in the screen.
Toggle the state of window between maximized and unmaximized in the screen.
If defined, direction is a symbol, either
verticalorhorizontal, and maximization will only occur for that direction.
Toggle the state of window between vertically maximized and unmaximized in the screen.
Toggle the state of window between horizontally maximized and unmaximized in the screen.
When true (the default), Sawfish will not allow the user to manually resize maximized windows. It will also prevent the user from moving the windows along their maximized axes.
For example, a vertically maximized window is vertically locked, so a user can slide it left and right, but cannot move it up or down.
If you set this to
niland resize a maximized window, then you can't unmaximize it any more.
Return
tif the part of window can be moved.part is one of the symbols:
top-border,bottom-border,left-border,right-border,top-left-corner,top-right-corner,bottom-left-corner,bottom-right-corner, ortitle
In general, if a window's dimension is larger than the screen size, maximizing that dimension can actually shrink it to fit into the screen. When this variable is true (default false), maximizing a window's dimension will never shrink it.
It is possible to maximize a window where it gets only large enough not to overlap with other windows.
When true (the default), maximized window does not cover avoided windows. (see Avoided Windows)
The “fill” category of maximizing commands provides a convenient way to maximize without overlap to any other windows, except “ignored” ones. (see Ignored Windows)
In addition, they don't shrink the window even if it is already bigger than the screen size.
Maximize both dimensions of window without overlapping other windows.
If defined, direction is a symbol, either
verticalorhorizontal, and maximization will only occur for that direction.
Maximize the vertical dimension of window in the screen without overlapping other windows.
Maximize the horizontal dimension of window in the screen without overlapping other windows.
Toggle the state of window between maximized and unmaximized in the screen without overlapping other windows.
If defined, direction is a symbol, either
verticalorhorizontal, and maximization will only occur for that direction.
Toggle the state of window between vertically maximized and unmaximized in the screen without overlapping other windows.
Toggle the state of window between horizontally maximized and unmaximized in the screen without overlapping other windows.
For “filling” maximization, “ignored” windows are ignored when true (the default). (see Ignored Windows)
The “fullscreen” and “fullxinerama” categories of maximizing commands maximize the window to some extent and remove all the window's decorations. If necessary, Sawfish will pad the bottom and right window edges to make the window fill the complete extent. (This is usually required for terminal windows, for example.)
The “fullscreen” category maximizes the window to the current screen.
Maximize both dimensions of window on the screen, removing window decorations and making the window edges flush with the screen sides.
If state nil, it unmaximizes. Else, it maximizes. If called as a command, it always maximizes.
Toggle the state of window between maximized and unmaximized in the screen, removing window decorations and making the window edges flush with the screen sides.
The “fullxinerama” category maximizes the window to the entire Xinerama display.
Maximize both dimensions of window across all Xinerama screens, removing window decorations and making the window edges flush with the screen sides.
If state nil, it unmaximizes. Else, it maximizes. If called as a command, it always maximizes.
Toggle the state of window between maximized and unmaximized across all Xinerama screeens, removing window decorations and making the window edges flush with the screen sides.
One command restores windows from all the different types of maximization.
Restore the position and dimensions of window to their original, unmaximized, states.
If the window is maximized for example vertically but not horizontally, then only vertical position and dimension are restored.
If defined, direction is a symbol, either
verticalorhorizontal, and unmaximization will only occur for that direction.
Returns a cons-cell
(x.y)indicating the position that thewindowwould unmaximize to.If the window is maximized for example vertically but not horizontally, then y is the y coordinate before maximization, but x is the window's current x coordinate.
Returns a cons-cell
(w.h)indicating the dimensions thatwindowwould unmaximize to.If the window is maximized for example vertically but not horizontally, then y is the height before maximization, but x is the window's current width.
Don't treat window as maximized any more, keeping the size and the position. You'll be able to move and resize, but won't be able to unmaximize.
If the optional argument `direction' is `vertical' or `horizontal', then only that direction is unmaximized.
When window is not maximized, nothing happens.
Sawfish provides two categories of commands for cycling between windows. The first category cycles between windows in an order that is essentially fixed. The second category cycles between windows in a dynamic order.
These commands organize the set of mangaged windows into loops. A loop may consist of all windows in a workspace, or it may consist of all windows anywhere. The positions of windows in this loop do not change, except when a new window is managed or unmanaged.
Switch focus to the “next” or “previous” window in the current workspace.
Switch focus to the “next” or “previous” window in this workspace. If this function reaches the “end” of the windows in this workspace, it switches to the next workspace and displays the first window there.
These commands implement something much close to Microsoft Windows' <Alt-TAB> mechanism, working with a stack of recently used windows.
Cycle through all windows inside the same group. This is somewhat comparable to the <Control-TAB> behavior of Windows OS.
Cycle through windows at the top of each group.
Cycle through all windows whose titles match that of the initial window (up to, but not including, the first colon).
Cycle through all windows whose classes match that of the initial window.
Cycle through all windows in the dock, even those with the
cycle-skipproperty.
Each of these cycling commands may include windows that are not visible on-screen.
If true, Sawfish includes iconified windows when cycling. Defaults to true.
If true, Sawfish includes windows on all workspaces when cycling. Defaults to false.
If true, Sawfish includes windows on all viewports when cycling. Defaults to false.
It is possible to configure the cycling to get more feedback during the process.
If true, Sawfish displays window names and icons while cycling through windows. Defaults to true.
If true, Sawfish raises windows while they're temporarily selected during cycling, and invokes
warp-pointer-if-necessary. Defaults to true.
It is also possible for you to define your own stacking cycle commands, or even to alter the window stack to suit your tastes.
Create a command that will not cause the current cycle operation to abort before execution.
All arguments are passed to define-command.
Create a pair of commands for cycling through windows. The command named forward-name cycles forwards, while the command named reverse-name cycles backwards.
Selector is called when initializing the cycle environment, it should return the list of windows to cycle through, or the symbol `t' to denote all cyclable windows.
Any extra arguments are passed to each call to define-command.
Return managed windows in most-recently used order.
If workspace is non-nil, then only managed windows in that workspace will be returned.
If allow-iconified is non-nil, then iconified windows will be returned instead of ignored.
If all-viewports is non-nil, then windows in all viewports will be returned, instead of just the current viewport.
Return the most-recently focused window in the current workspace. If the windows argument is given it should be a list of windows, in this case the function will restrict its search to the elements of this list.
Switch input focus to the most-recently focused window in the current workspace.
Sawfish can trigger actions particular to each window. More
precisely, if the window's properties match to the user set rule, then
it is executed when the window appears. Check is done in
before-add-window-hook. (see Standard Hooks)
These rules can easily be set by configurater GUI, but there're
functions to manipulate them. They're defined in
sawfish.wm.ext.match-window.
Let us see an example first:
(add-window-matcher '((WM_NAME . "^root$") (WM_CLASS . "^XTerm/xterm$")) '((ignore-program-position . t) (maximize . vertical)))rules is an alist, and each value is matched using regex. Allowed keys are any of
WM_NAME,WM_CLASS,WM_ICON_NAME,WM_WINDOW_ROLE,WM_CLIENT_MACHINE,WM_COMMAND, andWM_LOCALE_NAME. Values to the keys are strings. Windows are selected if all of these rules match.actions is an alist. For possible keys and values, see lisp/sawfish/wm/ext/match-window.jl.
Check for invalid arguments are not done.
Opposite of
add-window-matcher, but unlike it, props are list of properties. Example:(remove-window-matcher '((WM_NAME . "^root$")) '(place-mode ignore-program-position))
The best place to use add-window-matcher is in
~/.sawfish/rc. It's because rules modified by these commands are
not necessarily saved, depending on how you run the configurator.
The rules are stored in variable match-window-profile. Use
the above functions to modify its value. It is not recommended
to directly manipulate it.
Sawfish provides certain window animation capabilities. They have been described as “lame”, so they are off by default.
The animation mode when an window is iconified. The default is
none.You can set the animation mode for each window from the configurator “Window Rules”, or via window property. (see Standard Properties)
Here are listed functions to define and invoke animator.
Define a window animator called name (a symbol) that is managed by function fun. fun is called as ‘(fun window op [action])’ when it should change the state of an animation sequence. Op may be one of the symbols
start,stop.
Construct an autoloader for window animator name from structure struct.
Invoke an animation for action action on window. Action may be one of the symbols
start,stop.
Note that window currently has an animation running, being controlled by animator function animator.
X defines an iconic state for windows, often windows in this state are displayed as small icons. Sawfish does not display these icons. Use softwares called “trayers” and / or “pagers” for such things.
Iconify the window associated with object window.
Return the window associated with window from its iconified state.
Minimize the window associated with window, or restore it if it is already minimized.
Minimize all windows in the current workspace.
A window's iconic state may be tested through examination of its
iconified property—when t the window is iconified.
But it is preferable to use explicit testing functions instead:
Returns true if the window associated with window is iconified, false otherwise.
Returns true if the window associated with window can be iconified, false otherwise. Some reasons a window might not be iconifiable are: it has a
never-iconifyproperty; it is already iconified; it is not a desktop window; or it is markedignoredandiconify-ignoredis not true.
Sawfish allows you to control certain behaviors when restoring minimized windows.
Windows are focused after being unminimized. Defaults to false.
Windows are raised after being unminimized. Defaults to true.
Move windows to the current workspace when they are unminimized. Defaults to true.
When iconifying, it is possible to force other windows to iconify.
Policy for performing chains of minimizations or restorations. When a particular window is minimized or restored, it can cause other windows to be minimized or restored at the same time. Their allowed values are set to the following list. By default, both variables are bound to the symbol
transients. but they are not required to have the same value.
nonetransientsgroupFinally, it's possible to get the icon that would normally be displayed for an iconified window.
Return an image object representing the icon currently associated with window, or
nilif there is no such image.
When a window has a property iconify-on-leave set to non-nil,
it gets iconified when the mouse pointer leaves it. It can be set
from the configurator.
;; Example:
;; ( add-window-matcher '( ( WM_CLASS . "^Konsole/konsole$" ) )
;; '( ( iconify-on-leave . t ) ) )
Windows normally exist in a single workspace and a single viewport into that workspace. When changing workspace or viewport, the current windows disappear. This is sometimes not the correct policy; there are certain windows that should “follow” the user from window to window. These are typically windows that are not bound to a particular activity. The most common example is a dashboard window for calling other applications. Another example might be a diagnostic program such as a load monitory.
Each window has “stickiness” flags that govern this behavior. One flag controls stickiness across workspaces: sticky windows will appear in every workspace automatically. The other flag similarly governs stickiness across viewports. A window is “sticky” if either of these flags are set.
Sticky windows are often ignored, so they lack window
decorations, and avoided so other windows do not cover them up.
Returns true if window is sticky across a particular environment (workspaces, viewports, or either), false otherwise.
Make the window sticky across some environment (workspaces, viewports, or both).
Make the window unsticky across some environment (workspaces, viewports or both).
If
window-sticky-pwould report true for window, make window unsticky for all environments. Otherwise make it sticky for all environments.
Sawfish has a general concept of “ignored” windows; the user does not interact normally with those windows. The concept is actually defined by five different window properties:
ignorednever-focuscycle-skipwindow-list-skiptask-list-skipA monitor application such as “xload” might have all five of these flags set.
Rather than directly manipulating the window properties, it is better to use the following access functions:
Returns true if the window has the
ignoredproperty, false otherwise.
Ignore the window window.
Unignore the window window.
If
window-ignored-pwould return true for window, make it unignored. Otherwise make it ignored.
The remaining flags only have toggle functions implemented right now:
Toggle the appropriate flag on window. They have the same name commands.
All five of the flags are available through the window menu's “Toggle” entry.
“Avoided” windows are kept unobscured by other windows wherever possible. It is involved in window placement (see Window Placement) and maximization (see Maximizing Windows). Most placement modes will attempt to place a new window avoiding overlap with them. Windows can be maximized avoiding overlap to avoided windows.
In this context, windows are categorized into three: windows with
avoid property, those with
ignored property (see Ignored Windows), and the others.
It is possible to avoid overlap only with avoided windows, and also is possible not to avoid overlap only with ignored windows.
Remember that the window with avoid property is avoided
by other windows. Thus property name avoid should have
been named “avoided”. On the other hand, related functions and
variables are named correctly, and no special care is necessary.
Returns t if window is avoided by other windows. It is determined in the following order:
- A window with
avoidproperty is always avoided.- A window with
ignoredproperty is always not avoided unlessdont-avoid-ignoredis non-nil.- Otherwise,
avoid-by-defaultdetermines if it should be avoided.
Returns a list of all windows that are avoided. If window is defined, then it is excluded from the returned list.
Sawfish provides two levels of configuration:
Obviously the first of these requires a lot less specialized knowledge than the second. But even then, the user has to edit startup files containing the Lisp forms setting the variables. To remove this need for hand-editing, Sawfish has a specialized system allowing all customizations to be made through a GUI, and then automatically reloaded each time that the window manager is started.
Invoke the user-customization GUI. group defines the class of customization variables to configure, or all classes if group is undefined.
There also exists commands like customize:appearance, i.e. for
each top-level customization group, the command to customize only it
and its subgroups.
The sawfish-config program can be used to invoke the GUI manually.
In order to provide these customization options however, an extra
requirement is placed on the Lisp programmer. Instead of just using the
defvar special form to declare variables, the defcustom
macro must be used. This augments the variable with extra information
for the GUI, including such things as its required data type.
Customization options are organized into groups. Each group has a name
and contains a set of related options. Groups can be assigned to
parent groups using the :group parameter during construction.
Declares a new customization group whose name is defined by the symbol group. The string real-name is the title of the group as seen by the user.
keys is a list, defining the properties of the group. The members of the list are grouped into pairs of elements, the first element names the property, the second defines its value.
:groupgroup- Specifies the parent customization group of this group. The value of this key is not evaluated.
:requirestruct- Before displaying the customization UI for this group,
requirethe structure struct. This guarantees that all customizable variables will be known at display time. The value of this key is not evaluated.:layoutsymbol- Use a particular UI widget to display this group. The value is a symbol, one of:
single- Holds a single customizable item.
vbox- Holds any number of customizable items, arranging them vertically. This is the default.
hbox- Holds any number of customizable items, arranging them horizontally.
frame- Embed the items in a vbox in a frame.
keymaps- Use a special UI widget for customizing keymaps.
The value of this key is not evaluated.
This macro also creates an interactive function named
customize:group allowing the GUI to be invoked to configure the new group.While
defgroupis a macro, there is a correspondingcustom-declare-groupfunction.
The first three arguments are analogous to the
defvarspecial form, they declare a special variable stored in the symbol variable, whose value is set to value if the variable is currently unbound, with a documentation string documentation.In the configurator, gtk widget appears left to the docstring. But if the docstring ends with “\\w” (literally in the source; the first backslash for escaping the second), then the widget is put right to the text. This feature is supported by only some widgets.
All other parameters are key-value pairs as with
defgroup. The possible pairs are as follows:
:groupgroup- Specifies the customization group that this variable is a member of. This is a list of symbols, indicating a series of nested groups, e.g.,
(workspace edge-flip). A variable in a top-level customization group can also be specified as a plain symbol, e.g.,workspace. The value of this key is not evaluated.:typetype- Specifies the required type of the variable. The current possibilities are:
(symbol [option...])- A symbol. The UI looks for a symbol property
:optionsand interprets it as the list of valid symbols to select from. The option arguments allow you to define a list at eval time. It is also possible to change this list at run time by changing the custom symbol's:optionsproperty; see the access functionscustom-add-optionsandcustom-set-optionsfor more information.(choiceoption...)- One of the option elements. Each option is a symbol. Unlike the
symboltype, there is no expectation that this list will change at run-time.string- An arbitrary string.
(number [[min]max]- Integer number. Two additional arguments specify the minimum and maximum allowed values for the integer. One additional argument specified the maximum allowed value; the minimum defaults to zero. Zero additional arguments implies no minimum nor maximum.
boolean- True (
t) or false (nil) value.color- A color.
font- A font name.
file- A file name.
program- A file name that must be an executable program.
command- A Sawfish command.
event- A Sawfish event.
keymap- A Sawfish keymap.
frame-style- The name of a defined Sawfish frame style.
icon- An X icon.
modifier-list- A list of X modifier keys.
Except where specified, the values of these keys are not evaluated.
:requirefeature- Denotes that the feature feature must be loaded if the variable is set to a non-
nilvalue by user customizations. This is necessary because customization options are loaded on startup, possibly before the modules that define them. The value of this key is not evaluated.:allow-nilbool- Specifies whether the variable may be
nil, instead of a member of its actual type. This is only supported by thestring,symbol,fontandcolortypes.:setfunction- Specifies that the variable must be set by calling function instead of the default
custom-set-variable. The function should accept three arguments:(variable value #!optional require).The usual action of this function is to translate the value into the correct type, then call
custom-set-variable. This translation is necessary since many of the UI widgets accept strings representing more complex types (i.e. a color's name, instead of the actual object):getfunction- Provides a function for reading the current value of the variable. Should return a value that's acceptable to the UI widget associated with the variable. Called with a single argument, the symbol containing the variable.
:before-setfunction:after-setfunction- Functions called both immediately before and after setting the value of the variable. Called with a single parameter: the variable itself.
:range (min.max)- The allowed range for numeric variables. If min is
nilthe the default minimum allowed value is zero; if max isnilthen the default maximum is unbounded. This is obsolete, since the:numbertype now supports range declarations. The value of this key is not evaluated.:tooltopstring- A tooltip that appears when the user's mouse hovers over the widget item.
:dependssymbol- This widget item is only settable when the symbol-value for symbol is non-nil.
While
defcustomis a macro, there is a correspondingcustom-declare-variablefunction.
Note that where necessary the types themselves define default
:set, :get and :widget values that may be
overridden by values in the defcustom call. Usually, however,
this will not be necessary.
Consider the following example:
(defgroup move "Move/Resize")
(defcustom move-outline-mode 'opaque
"The method of drawing windows being moved interactively."
:type (set opaque box)
:group move)
(defcustom move-snap-epsilon 8
"Proximity in pixels before snapping to a window edge."
:group move
:type (number 0 64))
This defines a group and two customization options.
There are two special accessor functions to make it easier to deal with lists of allowed symbols.
Add symbol value option to the list of symbols that can be stored in variable. The new option goes on the end of the list.
User configuration settings are stored in the file referenced by this variable. While this file contains valid Rep forms, users should not edit it directly: Sawfish will overwrite the file's contents each time a customization is made through the GUI.
By default, this variable is set to
"~/.sawfish/custom". The--custom-filecommand-line option sets it to a different file on program startup.
Default customization settings are stored in the file referenced by this variable. These settings are only applied if the user has no personal settings. By default, this variable is set to
"sawfish/wm/custom-defaults.jl"relative to thesawfish-lisp-lib-directorydirectory.
If the file referenced by
custom-user-fileexists, load it. Otherwise ifcustom-default-fileis non-nil, interpret it as a filename and load it.
To get information about a customizable variable, you can use the following functions.
Returns true if symbol has been customized by the user, false otherwise.
The
variable-declared-pfunction returns true if the variable named symbol has a default value declared for it, false otherwise. Thevariable-default-valuefunction returns the default value of that variable, or nil if no such default value exists.
Perhaps one of the most important features of a window manager is its ability to decorate client windows, typically seen as an added border, and then to allow the window to be manipulated through user input on the border.
Sawfish provides an extremely flexible method of decorating windows, the look and feel of the border may be specified completely. Also, no limits are placed on which windows are given which borders, if necessary a completely different border could be dynamically created for each window!
The frame of a client window is defined as all decorations added by the window manager. Usually these decorations will be immediately adjacent to the outer edges of the window, but there is no requirement to use this model.
In Sawfish, each window frame is constructed from a list of frame parts, conceptually rectangular objects with a specified position relative to the edges of the client window. When shaped images are used to define frame parts, they are still thought of as being rectangular, just with some pixels missing from the display.
Each frame part has a list of attributes associated with it, these include items defining the background of the part (i.e. a color or an image), and items defining the foreground of the part (i.e. probably some kind of text, with a color, font, etc...). Non-visual attributes may also be defined, such as, for example, the keymap mapping events occurring in the part to Lisp commands to execute (see Keymaps).
So a window frame is defined in Lisp as a list of frame part definitions (see Frame Part Definition). These frame parts are added to the client window (in the order they are defined, so later frame parts are above earlier parts at the same position), to produce the entire window frame.
Although one of the aims of Sawfish is to provide as much flexibility as possible, this can sometimes be detrimental to the overall experience. For example, it would be easier for the user if all themes use consistent keymaps and cursor images in conceptually similar parts of window frames. That is, it would be better if all close buttons had the same mouse button bindings and the same mouse cursor displayed when the pointer is over them.
To achieve this, Sawfish defines a number of classes of frame parts, each with several default attributes. When defining a window frame, the definitions of each part then specifies which class it is a member of, and inherits the associated default attributes (provided that it hasn't explicitly specified values for these attributes).
This variable is an association list, associating symbols naming frame part classes with an association list of default attributes for that class.
The names of the pre-defined classes are as follows, their meanings should be self-explanatory:
title, menu-button, close-button,
iconify-button, maximize-button, sticky-button,
lock-button, rename-button, move-resize-button,
raise-lower-button, top-border, left-border,
right-border, bottom-border, top-left-corner,
top-right-corner, bottom-left-corner, bottom-right-corner.
Extra classes can be created by adding to frame-part-classes.
However, it's likely that more than one theme may need to use the same
class, and that the user may then wish to customize any extra keymaps
used. The def-frame-class macro should be used to add new
classes, since it handles these situations.
Creates a new frame part class named by the symbol CLASS.
The ALIST-FORM is evaluated to give an association list defining attributes for the class. Each key-value pairs is only set if no existing value exists for that key.
If binding-forms are given, they will be evaluated when no keymap already exists for the class. A keymap will be created, and stored in the variable named ‘class-name’. This variable may then be used within the binding-forms.
So to define a hypothetical shade-button class, the following
might be used:
(def-frame-class shade-button '((cursor . left_ptr))
(bind-keys shade-button-keymap
"Button1-Off" 'toggle-window-shaded))
In some cases it might be valuable to be able to override pre-defined frame part properties. For example, it might be your preference that text in window title bars is always blue.
Creates a new frame part class named by the symbol class.
Unlike
def-frame-class, the trailing argument is just a boolean flag. This flag only indicates whether to create a keymap for the class. Any bindings have to be established through a separate call tobind-keys.The function returns
tif it was able to create and bind the empty keymap,nilotherwise. This allows us to check for errors.
Similar to
frame-part-classesexcept that the properties take precedence over values defined both in that variable and in the frame style itself.
The following function may be used to simplify the customization of these two variables:
Associate value with property key for all frame parts of class class.
If override is non-nil, then the setting is installed in the
override-frame-part-classesvariable, otherwise it's stored in theframe-part-classesvariable.
The following example would override the colors of all title bars:
(set-frame-part-value 'title 'background
'("black" "white" "green" "blue") t)
(See the next section for details about what is actually being set here.)
Each frame part is defined as an association list (or alist), a list of
cons cells, the car of each cell defines the attribute, the cdr defines
the value given to that attribute. So, for example, the alist
((foo . 1) (bar . 2)) specifies two attributes: foo with
value 1, and bar with value 2. See Association Lists.
The attributes that may be defined are as follows:
(class . class)(background . data)(background . (normal focused highlighted clicked))If an image is used it will be scaled to the size of the frame part,
unless it's tiled property is set, in which case it will be
tiled across the frame part.
(foreground . data)(foreground . (normal focused highlighted clicked))Unlike the background attribute, by default images are not
scaled when used to define the foreground of a frame part.
(scale-foreground . value)nil, the foreground image of the frame
part will be scaled to the size of the part.
(font . font)(font . (normal focused highlighted clicked))(text . value)foreground property is an image). Either a string,
or a function, that will be called each time that the part is
refreshed, that will return the string to draw.
(x-justify . value)left, right or center, or a number. If a number it
defines the number of pixels from the left edge if positive, or the
right edge if negative.
(y-justify . value)x-justify, but the accepted symbols are top,
bottom or center instead.
(renderer . function)background attribute.
When the part needs to be drawn function will be called with an
image in which to render the background, and the current state of the
part, a symbol focused, highlighted, clicked, or
nil (for the normal state).
(render-scale . value)renderer property to be reduced by a factor of value, an
integer.
(left-edge . value)(right-edge . value)(top-edge . value)(bottom-edge . value)(width . value)(height . value)(border-width . value)(border-color . value)(keymap . value)(cursor . cursor)get-cursor to create
the required cursor object.
(removable . value)nil, this frame part may
be removed from the frame without being detrimental to the overall
appearance of the frame. This is only important for button classes,
which may sometimes be removed at the request of the client window.
(below-client . value)nil, then this frame part
will be displayed beneath the client window. The default action is for
frame parts to be stacked above the client window.
(hidden . value)nil, don't display this
frame part.
The values specified for the background, foreground,
render-scale, font, left-edge, right-edge,
top-edge, bottom-edge, width, height,
border-color, cursor, below-client and
hidden attributes may actually be functions. In which case the
function will be called (with a single argument, the window object)
when the frame is constructed, the value returned will be used as the
actual value of the attribute.
The coordinate system used for specifying the part's position is relative to the window edge that the position is defined against. Positive values count in from the window edge towards the center of the window, while negative values count out from the edge, away from the center of the window.
Consider the following example, a solid black title bar that is twenty pixels high, directly above the client window:
`((background . "black")
(foreground . "white")
(text . ,window-name)
(x-justify . 30)
(y-justify . center)
(left-edge . 0)
(right-edge . 0)
(top-edge . -20)
(height . 20)
(class . title))
The backquote operator is used since the definition is only mostly
constant, the comma operator inserts the value of the
window-name variable (a function giving the name of a window)
into the definition; see Backquoting).
This function is then used to dynamically specify the string drawn in the foreground. The window manager will automatically refresh the foreground of all frame parts of a window whenever any X property of that window changes.
Given a framed window, and a particular frame part class, it is possible to retrieve the values of individual attributes from the complete list of definitions (including inherited or overrided definitions).
Returns the value of the property property for the frame part object part. Returns
nilif no such attribute exists.
Return the current state for frame part part, one of the symbols
focused,highlighted,clicked,inactive-highlighted,inactive-clicked, ornilif the part is inactive.
Sets the frame of the client window associated with the object window to that defined by the list of frame part definitions frame-def. If the window is mapped the old frame will be destroyed and a new frame constructed.
Return the list of frame part definitions defining the frame associated with window.
Return
twhen window has been reparented to a frame created by the window manager.
Recreates the window frame associated with window, from the previously defined frame definition. All frame parts are reinitialized and recalibrated.
Return the size of the window window including the frame, in a cons cell
(width.height).The size excluding the frame is returned by
window-dimensions. (see Window Attributes)
Return a cons cell
(x.y)defining the offset from the origin of the client window associated with window to the origin of its frame. That is, their values are negative integers.
Return the width of the border of the window that window manages.
Return a pointer to the frame part object that was clicked on as part of the current event. Returns
nilif no frame part was clicked on.
Return a cons cell
(width.height)of dimensions for frame part part.
Return a cons cell
(x.x)of the relative position of frame part part against its window's frame origin.
Returns the numeric id of the framing window associated with object window. Returns nil if the client window has no frame.
If lock equals to
t, frame part redraws will be delayed. The redraws will take place once the function is called with lock set tonil.Returns the previous value.
If lock is non-nil, the state of frame parts will not be altered at pointer enter and leave events.
Returns the previous value.
Call
(function part)on each the frame parts of window and returnnil. If any function returnsnil,map-frame-partsreturnsnilimmediately.
Build a new copy of the frame part part and install the copy in the owning window, replacing the old part.
In order to visually differentiate between different types of windows, several predefined types of window frame exist.
Returns a symbol naming the frame type currently associated with window.
These frame types currently include the following:
defaulttransientshapedshaped-transientshaped and transient types, normally
just a very small title border with no text.
shadedshaded-transientunframednil-frame variable contains a null frame that may be used for
this frame type.
Function fun maps from {window, frame-type} to frame-type.
Each time we want to determine a window's frame-type (
shaded,transient, etc.), we calculate an initial frame type withwindow-typeand run the results through each frame type mapper in sequence (most recent to oldest). The frame type returned from the final mapper function is “the” frame type.This sequence of mappers allows us to override window frame types based on window properties. For example, any shaded window has to have
shadedorshaded-transienttype, regardless of what its normal type is.
Given a window type of type, return the closest matching window type with the given property change. For example:
(window-type-add-title 'unframed) ⇒ 'shapedThis is because shaped windows normally have title bars but not borders, while unframed windows normally have neither.
Returns a list of frame types, suitable for use by the graphical customizer. The frame type of window is automatically checked.
We provide a function to simplify monitoring of window changes to certain
window states. This monitoring runs on top of the
window-state-change-hook.
Arrange for function fun to be called with arguments ‘(window changed-states)’ when one of the states defined by the list of symbols states has been changed. States may also be a single symbol.
Frame styles are used to encapsulate frames of the different types that have a single visual appearance. Each frame style associates a name with a function that creates a frame definition for a particular window and frame type combination.
Several window properties are used while choosing frame styles:
The user-chosen frame style of the window. If
nil, Sawfish will use the default frame style.
The current frame style of the window. This is not set explicitly; window update functions will change it behind the scenes.
Reloads the frame style name from disk if it is already known to the system. All windows with that style are reframed.
Reloads the frame font colors, if use-custom-font-color is true. Use frame-font-active-color and frame-font-inactive-color to modify the frame font colors.
Themes and frame styles are currently almost synonymous, the slight difference being that themes provide a mechanism for loading frame styles from the filing system as they are required. Although it is possible that themes may include other user-interface settings in a later version, at the moment it seems unlikely.
When a frame style is requested, if it is not already available (i.e.
if the add-frame-style function hasn't been called for that
style) then the window manager will attempt to load a theme of the same
name from the filing system.
Each theme is stored in a directory; this directory must have the same
name as the name of the theme itself. Within this directory there must
be a Lisp script named theme.jl or theme.jlc. This script
will be evaluated, it should provide a frame style of the same name as
the theme (by calling add-frame-style).
While the theme script is evaluating the image-load-path
variable is set to include the theme directory as its first element.
This ensures that any image files stored in the directory can be loaded
using the make-image function.
Since rep has no module system, any global variables defined within the
theme must be prefixed by the name of the theme to ensure their
uniqueness. For example, in the theme foo, a variable bar
would actually be called foo:bar.
In most cases however, rep's lexical scoping can be used to avoid
declaring any global variables or functions, the only usual exception
is when declaring customization options with defcustom; these
must be globally visible.
Since themes are generally passed around very casually, sawfish
evaluates all theme code in a very restricted environment; the idea
being that themes should only be able to affect the look of the window
manager. Despite this, it is still possible for malicious themes to
lock, and possibly crash, the window manager; in the first case sending
a SIGINT signal may unblock it. Hopefully themes are unable to
affect the rest of the user's environment, but there are no
guarantees...
A list of directory names, provides the search path for locating theme directories. By default this includes the user's theme directory and the system theme directory.
The name of the user's theme directory, by default ~/.sawfish/themes.
The name of the directory holding themes from the current Sawfish version, by default
(expand-file-name "../themes" sawfish-lisp-lib-directory)
The name of the directory holding system-wide themes, by default
(expand-file-name "../../themes" sawfish-lisp-lib-directory)
Number of seconds between checking if theme files have been modified. Default 60.
If
t, non-nil themes are assumed to be malicious. They will be evaluated in a restricted environment.
Frame type fallbacks. This is an alist whose elements are (required-type . fallback-type). When REQUIRED-TYPE is not supported by the current theme, then FALLBACK-TYPE is used instead."
It is often useful to be able to disable certain parts of a window's
frame. For example, a window may hint to the window manager that it
doesn't want a maximize button. Sawfish allows all parts of a
particular class to be disabled or enabled on a window by window basis.
However, not all frame styles will support this (it depends on the
frame part's removable property, Frame Part Definition).
Enable all frame parts that are a member of class in window.
Returns
tif the frame part class has been removed from window,nilotherwise.
Disable all frame parts that are a member of class in window where possible.
Sawfish can have a virtual desktop which is larger than the computer's screen size. This is done through the use of “viewport”.
Viewport can be thought of as a screen-sized hole through which you can view a portion of the virtual desktop. The entire virtual desktop consists of the grid of “cells” whose size is that of the physical screen. Viewport moves around, and sits on a cell.
In Sawfish, the word “viewport” is sometimes used to mean the entire larger-than-normal desktop. This is natural, but a confusion and not technically correct. When focused to enlargement, “large desktop” is the correct nomenclature, but simply calling it the “workspace” or the “virtual desktop” are correct too.
The word “viewport” is also used to mean the cell on which the viewport is set, like “Go to the next viewport.”
The dimension of the virtual destkop. This is a cons cell
(columns.rows). Defaults to(1 . 1). The number of viewport cells in the virtual desktop iscolumnstimesrows.If
viewport-boundary-modeisdynamic(see Dynamic Viewport) then this variable is set by Sawfish to the current size of the current workspace and should not be set by the user.
Change
viewport-dimensionsto have the value(width.height). Ifviewport-boundary-modeisdynamicthen this sets the minimum dimensions of the virtual workspace (see Dynamic Viewport) rather than setting the dimensions directly.
Each cell is labeled with the index (col, row), and the
top-left cell is (0, 0). Indices are never negative.
Sawfish implements viewport as follows. On a cell change, windows in previous cells are removed, and windows in the current cell appear. Windows that span two or more cells will appear in each cell, appropriately displaced.
Move the viewport to see the cell right columns right and down rows down. Either argument may be zero or negative.
Decides how to act when you call
set-screen-viewportand you try to go outside of the virtual desktop. (Its size is specified byviewport-dimensions.) Defaults tostop.When set to
stop, it stops at the boundary of the virtual desktop.When set to
wrap-around, it behaves as if the leftmost viewport and the rightmost are connected. Same for the top and bottom.If it is set to
dynamic, then the workspace size changes automatically. For details, see See Dynamic Viewport.
Returns whether or not the display is permitted to move past the current workspace boundaries. It returns true if
viewport-boundary-modeis not set todynamic.
Returns a cons cell consisting of
(column.row)of the viewport containing the specified x and y coordinates. The coordinates are specified relative to the current viewport, so(viewport-at 0 0)is equivalent to(screen-viewport).
Returns the offset from the current viewport to viewport which is specified as
(column.row). The return value is the cons cell(x.y). The values are in pixel, and are negative if it lies at left or above the current viewport.viewport can be outside of the workspace. (The check is not done.) If viewport is
nilit is understood as the current viewport, i.e.,(0 . 0)will be returned.
There are lower-level functions which move viewport by pixel, not by multiples of the physical screen dimensions.
Note that use of these breaks the traditional behavior and user interface of Sawfish. Though they are useful, simultaneous use of these functions and other functions may cause weird results.
Change the position of the viewport, such that location
(x,y)is at the top-left of the display. So(set-viewport 0 -5)will shift the viewport up five pixels.
When you move the viewport, the bigger this value, the more smoothly the screen is scrolled. It is the number of steps for scrolling.
The default value 1 means the change is instantaneous, and no scroll is done. The upper limit for customization is 50.
This variable is used for
set-viewport. All interactive commands defined by Sawfish call this function, so this variable is important for the user.
“Dynamic viewport” is enabled by setting
viewport-boundary-mode to the symbol dynamic. It has
two features.
Normally, the viewport cannot move beyond the limits set by
viewport-dimensions, but this limitation is removed in dynamic
viewport. The viewport is allowed to go as far as you wish.
In addition, workspace is automatically resized, both enlarged and shrinked, so that it contains the current viewport and all windows. (Precisely speaking, it takes the minimum such size.) The size is set when you move the viewport, and also at Sawfish startup. Each workspace has its own size independent of the others.
Even in dynamic viewport, the top-left cell is always (0, 0),
and the cell indices are never negative.
The dynamic viewport is still an experimental feature, and its specification may change.
This is only useful if dynamic viewport is enabled.
viewport-dimensionswill never be set to less thanviewport-minimum-dimensions, unless it is a change requested by the user, either by using the configuration interface or by callingset-number-of-viewports.If setting
viewport-minimum-dimensionsby hand (not by the customization interface) be sure to callviewport-minimum-size-changedafter doing so to ensure that the new minimum dimensions immediately go into effect.If
set-number-of-viewportsis called to set the viewport dimensionsviewport-minimum-dimensionswill be set to the same value. Also, if (using the configuration interface) you set the viewport dimensions to less thanviewport-minimum-dimensionsthenviewport-minimum-dimensionswill be adjusted to match. This way those who are not using dynamic viewports do not need to worry aboutviewport-minimum-dimensions.
Under dynamic viewport, viewport-dimensions is the current size
of the current workspace, and does not have the meaning as a user option.
“Infinite desktop” is an intuitive, nice feature. Just move the mouse, for example to right, very far. As the pointer hits the screen edge, the viewport moves as if it is dragged by mouse motion. Viewport moves around by any amount, not limited to by a step of the physical screen size.
To enable infinite desktop, put the following in your ~/.sawfish/rc:
(require 'sawfish.wm.ext.infinite-desktop)
Options can be set from the configurator, under Workspace
section.
Infinite desktop behavior differs noticeably from the usual viewport which lies on grid cells. For example, it does not make sense to ask in which viewport a window lies. The design is not complete yet, and may change in future. There may be some bugs.
It is called “infinite desktop” by historical reason, but in fact you can limit the entire desktop size as you like.
Returns a cons cell
(col.row)of the viewport holding the top-left corner of window.
Returns true if window is completely outside the current viewport in any direction. If viewport is specified check against that viewport rather than the current one.
Returns the coordinates of the window as if the window's viewport is selected. The return value is the cons cell (x . y).
Move window to the cell at
(col,row). The relative position of the window within the cells is preserved.
Move window to the cell col-delta positions across and row-delta positions down from its current cell. The relative position of the window with its cells its preserved.
Move window from its existing viewport to the current viewport. The window's relative position in the existing viewport is preserved after the move.
Move the viewport to a cell that shows window window. For a window that spans multiple cells, this function will pick the cell showing the window's top-left corner.
When true, windows uniconify to the current viewport, rather than to the viewport they were iconified on. Defaults to true.
Workspaces provide another way for users to organize their windows in Sawfish. Unlike viewports, workspaces don't have geometric relationship with each other.
The word “virtual desktop” is sometimes used instead of “workspace”.
While the stack of workspaces conceptually goes from negative infinity to positive infinity, we normally present only the first non-empty workspace through the last non-empty workspace to the user. The non-empty interval is occasionally re-normalized to start with zero.
We typically refer to workspaces with lower IDs being to the “left” of workspaces with higher IDs, as if on a number line.
The ID of the currently active workspace. This is an integer. The “default” workspace has ID 0.
Returns a pair
(first-index.last-index)defining the subset of the workspace continuum that is “interesting” to the user (typically, all those that have ever been explicitly created).
Takes an absolute workspace ID and returns its position in the interval of “interesting” workspaces. If limits is provided, it must be a pair
(first-index.last-index)like that returned byworkspace-limits. If it is not provided, the function uses the result ofworkspace-limitsdirectly.
Takes an offset position into an interval of “interesting” workspaces, and returns the workspace ID at that position. If limits is provided, it must be a pair
(first-index.last-index)like that returned byworkspace-limits. If it is not provided, the function uses the result ofworkspace-limitsdirectly.
A list of workspace names. When displaying the workspace menu, the first N workspaces use the corresponding list elements as their display names (where N is the length of the list). Normally they get the display name ‘space N’ for some value of N.
Sawfish has various functions to create, rearrage and delete workspaces. Windows in a deleted workspace are not lost; they are moved to another workspace.
Activate workspace space, making it current.
By default in
enterandclickfocus modes, the most recently used window will receive focus. The caller can disable this behavior by passing a true dont-focus keyword argument.If the force keyword argument is true, we will go through the activation process even if space already is current.
Select the workspace in position count from the list of “interesting” workspaces.
Select workspace space and then switch to viewport
(col,row)in that workspace.
Insert a new workspace, returning its index. The new index appears before the workspace indicated by before, or the current workspace if before is
nil.
Move the workspace space count positions forward, or count positions backwards if count is negative.
Move the current workspace one place to the right (or count places to the right if count is defined).
Move the current workspace one place to the left (or count places to the left if count is defined).
Switch from the current workspace (index i) to the workspace i+count. The
previous-workspacefunction is identical to(next-workspace (-count)).These functions do not have default values for their count arguments.
Remove workspace index (or the current workspace if index is
nil). All windows in that workspace are moved to the next workspace index+1. This will change the set of “interesting” workspaces.
Delete the current workspace. Its member windows are relocated to the next workspace.
Delete the current workspace. Its member windows are relocated to the previous workspace.
Add or remove workspaces until the number of “interesting” workspaces is equal to wanted.
When adding workspaces, the new workspaces get indices higher than any existing indices. When removing workspaces, the lowest workspaces are always chosen for removal (their windows are merged into the new lowest-index workspace).
When true, preserve the outermost empty workspaces in the pager. Don't quietly remove them when they become empty. Defaults to true.
Workspaces do not need to have windows assigned to them, but most operations with workspaces involve adding and removing windows.
Returns a list of indices for all workspaces that contain windows. Sticky windows appear in the current workspace.
Returns true if workspace space contains zero (non-sticky) windows.
How to act when passing the first or last workspace, one of
stop,wrap-aroundorkeep-going. Defaults tostop.
Each window can be a member of any (positive) number of workspaces;
their workspaces property contains a list of workspace ids.
Sticky windows appear on all workspaces, and have their sticky
property set (with a null workspaces property). If Sawfish
begins managing a window with its workspaces property set, then
the window is added to those workspaces automatically.
Returns true if window is a member of workspace space, false otherwise.
Returns true if window appears in workspace space, false otherwise. To appear, window has to be visible, but it can either be assigned to the workspace or be sticky.
Returns true if window1 and window2 are members of at least one common workspace.
Returns the nearest workspace to space that contains window.
Returns a list of all windows that are members of the current workspace (or space if it is not
nil). The list normally does not contain iconified windows, but they can by included by specifying a true include-iconified argument.
Move window from workspace old to workspace new.
We need the old workspace as an explicit argument because a window can be in more than one workspace. The function does the right thing if the window already appears in workspace new.
If was-focused is true and the window is visible, it gets the input focus in the new workspace.
Arrange it so window appears in both old and new workspaces.
If was-focused is true and the window is visible, it gets the input focus in the new workspace.
Move the window count workspaces to the right. Count does not default to one.
The window is normally removed from the current workspace (if it is in that workspace), or from the first workspace it belongs to. Supplying a true copy argument causes Sawfish to copy the window instead.
If select is true, then we switch to the destination workspace. If the moved window had input focus before the move, it will have input focus after the move as well.
Move the window count workspaces to the left. Count does not default to one.
The window is normally removed from the current workspace (if it is in that workspace), or from the first workspace it belongs to. Supplying a true copy argument causes Sawfish to copy the window instead.
If select is true, then we switch to the destination workspace. If the moved window had input focus before the move, it will have input focus after the move as well.
This is identical to
(send-to-next-workspace window count copy select).
Copy the window count workspaces to the left. Count does not default to one.
If select is true, then we switch to the destination workspace. If the moved window had input focus before the move, it will have input focus after the move as well.
This is identical to
(send-to-next-workspace window count t select).
Copy the window count workspaces to the right. Count does not default to one.
If select is true, then we switch to the destination workspace. If the moved window had input focus before the move, it will have input focus after the move as well.
This is identical to
(send-to-previous-workspace window count t select).
Move window to the workspace at position count in the “interesting” list.
The window is normally removed from the current workspace (if it is in that workspace), or from the first workspace it belongs to. Supplying a true copy argument causes Sawfish to copy the window instead.
If select is true, then we switch to the destination workspace. If the moved window had input focus before the move, it will have input focus after the move as well.
How to act when passing the first or last workspace, while moving a window. One of
stop,keep-going,wrap-around. Defaults tostop.
Remove the copy of window on the current workspace. If this is the last instance remaining, then delete the actual window. Note that this behavior differs from the merging that happens when you delete a workspace.
Map function fun over all workspaces containing window.
When a window appears on more than one workspace, some of its properties may be swapped in and out on demand when the current workspace is changed.
Window properties whose values may differ on differnet workspaces. Defaults to the empty list.
Add all properties in the list props to workspace-local-properties.
It is possible to hide all “normal” windows across workspaces.
“Normal” in this case excludes desktop windows and dock windows, but
includes sticky and ignored windows. The hidden windows are no longer
considered “viewable” according to window-viewable-p.
Return true if non-desktop and non-dock windows are hidden, false otherwise.
EdgeActions is a centralized way to control the behaviour of the screen-borders and -corners, which offers high customizability.
It consists of the following modules: sawfish.wm.edge.subrs -, which
contains the C-subroutines, sawfish.wm.edge.utils - a set of utility
functions, sawfish.wm.edge.actions - infrastucture module,
sawfish.wm.edge.flip - edge-fliping functions,
sawfish.wm.edge.hot-spots - hot-spot functions and
sawfish.wm.edge.viewport-drag - functions for dragging the viewport.
C-Subroutines (sawfish.wm.edge.subrs):
Create the flipper-window, which is -to put it plainly- your screen-border. Actions are performed when the flipper-window is activated. Technically it's one window, but from users point of view it consists of 8 parts (4 borders plus 4 corners).
Recreate the flipper-window, this is done automatically, when the resolution changes, to ensure EdgeActions stays working properly.
Utils (sawfish.wm.edge.utils):
A wrapper-functions around
recreate-flippersanddestroy-flippers, which additionally adds (respectively removes) the required hook-functions.
Length in px (in both x and y direction) wich is used for the hot-spot corners. All remaining pixels represent the borders.
This function returns the corner of the flipper-window which was entered, or nil.
This function returns the border of the flipper-window which was entered, or nil.
Infrastructure (sawfish.wm.edge.actions):
Action to perform for the left and right screen-edges when they are hit by the pointer, either flip-workspace, flip-viewport, viewport-drag or none/hot-spot.
Action to perform for the left and right screen-edges when a window is dragged over them, either flip-workspace, flip-viewport, viewport-drag or none.
Action to perform for the top and buttom screen-edges when they are hit by the pointer, either flip-workspace, flip-viewport, viewport-drag or none/hot-spot.
Action to perform for the top and bottom screen-edges when a window is dragged over them, either flip-workspace, flip-viewport, viewport-drag or none.
This function calls
activate-flippersand adds the required hook-functions to be able to perform user-actions on the edges.
This function calls the desired user-action
funcfor the screen-edgeedge.
This hook-function is responsible to either call
hot-spot-invoke(if a corner was activated) or to calledge-action-callto perform an action, when the edge was activated using the pointer.
This hook-function is responsible to call
edge-action-callto perfom an action, if the edge was activated while dragging a window over it. Hot-Spots is not supported when doing so.
EdgeFlip (sawfish.wm.edge.flip):
This is the traditional EdgeFlip. When a window or the pointer hits the screen-edge, the screen is shifted by either one Viewport or one Workspace in that direction. The pointer is warped accordingly (to keep in logical position).
This function invokes edge-fliping. edge (a symbol) is the screen-edge that is active (left, right, top, bottom), type is either
workspaceorviewport.
ViewportDrag (sawfish.wm.edge.viewport-drag):
iViewportDrag (formerly Infinite-Desktop) is a mechanic, that shifts the Viewport accordingly to which screen edge was activated. This way the Viewport becomes virtually "infinite", regardless of the physical size (thus the old name).
Amount to drag the viewport (in pixel) each time the pointer hits the screen edge.
"Amount to pull back the cursor (in pixel) after dragging the viewport." Recommended is half of
viewport-drag-distance.
This function invokes viewport-dragging. edge is the screen-edge that is active (left, right, top, bottom) (a symbol).
HotSpots (sawfish.wm.edge.hot-spots):
HotSpots is a mechanic, which allows for practically everything to be done when
a screen edge or a corner is activated. the corners are defined via
hot-spots-corner-length. Only HotSpots responds to the corners.
That way your screen-edge is actually split into 12: 4 corners, two times 4 edges (as explained above actions are split for when while moving a window and for when activating the edges using the pointer). Corners are not recognized for for while moving a window.
HotSpots only allows functions to be used as actions, though practically everything can be done this way. If the arguement is not a function, an error is thrown, to in form the user.
The function launched when hitting the top-left-corner.
The function launched when hitting the top-right-corner.
The function launched when hitting the bottom-right-corner.
The function launched when hitting the bottom-left-corner.
This function invokes the hot-spot. spot (a symbol) is either left, top-left, top, top-right, right, bottom-right, bottom or bottom-left.
Example configuration (~/.sawfishrc):
Note: this is just an example, not all functions in it may be availabe on your system.
( defvar-setq edge-flip-delay 250 )
( defvar-setq hot-spot-delay 125 )
( defvar-setq top-left-corner-function
( lambda () ( tile-windows ) ) )
( defvar-setq top-right-corner-function
( lambda () ( pager-unhide ) ) )
( defvar-setq bottom-right-corner-function
( lambda () ( show-desktop ) ) )
( defvar-setq bottom-left-corner-function
( lambda () ( raise-window ( get-window-by-role "panel_" #:regex t ) ) ) )
( defvar-setq top-edge-function
( lambda () ( jump-or-exec "Konsole" "konsole" #:match-class t ) ) )
( defvar-setq bottom-edge-function
( lambda () ( jump-or-exec "Dolphin" "dolphin" #:match-class t ) ) )
;; actions when pointer hits edge
( defvar-setq left-right-edge-action 'flip-viewport )
( defvar-setq top-bottom-edge-action 'none/hot-spot )
;; actions while moving window hits edge
( defvar-setq left-right-edge-move-action 'flip-workspace )
( defvar-setq top-bottom-edge-move-action 'none )
Sawfish supports multiple monitors displaying a single logical screen. Partial support of RandR is done.
Functions which provide information on monitor geometries are available. On the other hand, few user interface functions take them into account, so for example, windows often appear across multiple monitors.
Currently, monitor geometries are taken from Xinerama only. RandR support in this regard is yet to be done.
A “head” means each physical monitor. When there're multiple heads,
the word “screen” means the entire screen which is the combination
of all heads. For example the function screen-width returns the
width of the “screen” in this sense. A viewport contains the entire
screen. The only exception is maximizations which are done within a
head, unless stated explicitly that it's xinerama.
Return a ID for the display head that point (x, y) is in. The return value is an integer; the default head has ID zero. Returns
nilif it cannot determine the head from x and y.
Return the cons cell
(width.height)of the dimensions of the display head indicated by id. Id must be a non-negative integer. Without Xinerama support, id must be zero and the function returns the screen size.
Return the cons cell
(x.y)of the dimensions of the display head indicated by id. Id must be a non-negative integer. Without Xinerama support, id must be zero and the function returns(0 . 0).
Return the ID of the head containing the window with input focus. If window is supplied and a window, return the head containing that window. If window is supplied and nil, return
(pointer-head).
Like
current-head, this will return the ID of the head containing the specified window. But unlikecurrent-head,window-head-any-viewportreturns the head that the window would be in if its viewport were the visible viewport.
Return a cons-cell defining the size in pixels of the current head (that containing the window window, or the pointer if window is false). Returns the screen dimensions if no such head can be identified.
Return a cons-cell defining the origin of the current head (that containing the window window, or the pointer if window is false). Returns
'(0 . 0)if no such head can be identified.
If some changes happen to the screen, hot-plugging, removal, or resolution change, then you can receive the notification.
One way is to use configure-notify-hook.(see X Hooks)
Then the window argument is set to the symbol root. The other way
is to use randr-change-notify-hook below. Both are called,
but there's no guarantee of the order.
Notice that both may be called several times for one change. For example, “xrandr” command invocation from shell triggers three calls of both hooks in an author's environment.
Called when screen configuration changes, via RandR extension support. When RandR is not supported, then this hook will never be called.
Sawfish supports multiple ways of placing new windows on the display. There is a “current” placement mode for normal windows, and another mode for transient windows.
A symbol indicating the method of placing normal windows. This defaults to
top-left.
A symbol indicating the method of placing transient windows. This defaults to
centered-on-parent.
List of names of all placement modes. Sawfish 1.3 ships with the following placement modes:
randomlyThe new window is placed at a random location on the screen.interactivelyPrompt the user to select a position with the mouse. The new window is created such that its top-left corner is at that position.centeredThe new window is created at the center of the screen.centered-on-parentThe new window has a parent, it is centered on that parent. If the new window instead has a focused window in the same group, it is centered on that focused window. Otherwise the new window is simplycentered.under-pointerCreate the new window so that it's under the pointer, without going off the edge of the screen.first-fitbest-fitLook for positions where the new window would have a small overlap area with already visible windows. Thefirst-fitalgorithm uses the first “good” position found. Thebest-fitalgorithm looks at all possible positions and picks the best of them.best-fit-groupAsbest-fit, but the new window is only checked for overlap with other windows in its group.first-fit-or-interactiveAsfirst-fit, but if Sawfish cannot find a “good” position, it falls back tointeractivelymode.staggerAttempts to place each new window below and to the right of the previous window. Seestagger-placement-step.top-leftInterpret the top-left to bottom-right screen diagonal as a series of slots, each of which may have a window. Find the first empty slot and place the window there. Sawfish will shrink the window to prevent it from going past the right or bottom edge, or even beneath a special window like a panel. If Sawfish is not allowed to shrink the window enough to prevent this, it instead places the window randomly.off-centerTries to put windows in the center of the screen, but in such a way that the newly placed window doesn't fully obscure an existing window.This is to handle the case where two windows of the same size are created one after the other, so that the user is sure to see (at least part of) both windows.
noneMake no changes to the window's position. The window remains wherever the X server placed it initially.
In all of these placement modes, the mode is responsible for taking
the window object as an argument, and manipulating its position with,
e.g., move-window-to.
The window to be placed avoids overlapping with already existing
“avoided” windows (see Avoided Windows), unless
the position is explicitly specified by coordinates, or placement mode
interactively is used.
In
staggerplacement mode, the distance down and to the right from the previously placed window to the new one. This is measured in pixels.
There are two circumstances in which Sawfish will place a window:
either the window has just been created, or Sawfish has begun managing
the window's display. In the latter case, the window will have the
placed property.
When
t, program position size hints are not considered when placing windows.
You can define your own placement modes.
Define a new window placement mode called name (a symbol). The function fun will be called with a single argument when a window should be placed using this mode. The single argument is the window to be placed.
If the for-normal keyword is
t, then this placement mode is marked as valid forplace-window-mode. The same applies to for-dialogs andplace-transient-mode.
Define placement mode name (a symbol) to be loaded from structure structure-name (a symbol) when first referenced. The keyword-args are passed along to the call to
define-placement-modethat creates the placement mode.
Sawfish provides popup menus. Each line of a popup menu is either an action or the parent of a submenu. Together with key and mouse bindings, popup menus offer a command invocation method to users.
First let's see popup menus available out-of-box. There are root menu, window operation menu, window list menu, applications menu, and others.
The root menu is obviously the most important one. Many things can be done from the root menu, including other menus invocation. By default, you can call the root menu by middle-clicking the background screen, i.e., anywhere outside of all windows.
The window operation menu is what the name describes. You can call it from window's frames like buttons or the title bar, depending on themes.
The window list menu lets you choose a window. When selected, that window is shown, raised, and focused.
The applications menu lets you invoke softwares. Many options are available, and it's explained in the next section. (see Applications Menu)
Popup menu invocation functions can be called from keyboard or mouse.
Display the window operation menu. This has several bindings by default. In particular, clicking on a window's menu button displays this menu.
Here are popup menu options.
When true, menu items also display the key-binding. Defaults to false.
The actual creation of a popup menu is performed by an auxiliary process. By default, it stays after menu use is done, and reused at the next menu invocation.
Defines if and how long the menu program stays alive after the last menu has completed. If
nil, the program is terminated immediately. This means each time the popup menu is invoked, menu program is executed.If it's
tit is left running indefinitely, if an integer then the program may last for that many seconds.
You can modify menus. See Popup Definitions.
The applications menu lets you invoke installed applications. Sawfish generates applications menu from *.desktop files (usually found in /usr/share/applications/) at Sawfish startup.
Functions in this section are defined in the module
sawfish.wm.ext.apps-menu.
If non-nil, the applications menu is automatically generated from the variable
user-apps-menuand *.desktop files, and stored in the variableapps-menu. Default ist.If you set the applications menu manually to the variable
apps-menu, then it won't happen anyway.
Defines categorization of applications. For example, if a *.desktop file's category has an entry “X-Desktop”, it'll be classified as “Desktop” by Sawfish default.
If another option
apps-menu-associate-categoriesis set to nil, then the original value defined in *.desktop is respected.If you want to customize this variable, see the file lisp/sawfish/wm/ext/apps-menu.jl for the default value.
The filter to use while generating the
apps-menu. For the details, see See Desktop File Processing.It can be a symbol
default,some, or a function.The
defaultfilters includefdo-toplevel-filterfdo-nodisplay-filterfdo-hidden-filterfdo-onlyshowin-filterandfdo-notshowin-filter. This is the default value.The
somefilter only usesfdo-notshowin-filterandfdo-onlyshowin-filter.Or if it is set to nil, no filtering is done.
List of directories to look for *.desktop files. Default is
("/usr/share/applications").
Sort the generated applications menu alphabetically. Defaults is
t.
Human language for applications menu generation, in string, like “en” for English. Default is set from the locale.
You can prepend anything to the applications menu, by setting the
variable user-apps-menu. An example definition:
(("_xterm" (system "xterm &"))
("Emacs" (system "emacs &"))
("Firefox" (system "firefox &"))
("The _GIMP" (system "gimp &"))
() ; Seperation horizontal bar
) ;; Auto generated menu will follow.
The system function simply executes its single argument using
/bin/sh. The underscore defines the keyboard shortcut.
If you set value to apps-menu, Sawfish doesn't generate
applications menu from *.desktop files.
The variable containing the definition of the applications menu. By default, Sawfish automatically sets this.
If you set this variable manually, it is exclusively used, and Sawfish doesn't generate its applications menu.
Your own applications menu entries. In the applications menu, this is followed by auto generated applications menu.
Set
apps-menutouser-apps-menu, and ifapps-menu-autogenis non-nil, append the auto generated one.
Return the applications menu (a list), generated from *.desktop files which can be set to
apps-menu.
Here're functions to process each desktop file. See also the next section. (see Desktop File Processing)
Parse an *.desktop file file list. Returns
(group1 (key1 . value1) ... group2 (keyA . valueA) ...)
Let filter process a desktop file entry fdo-list, and return the result.
If filter is a function, it's executed with the argument fdo-list. If it's a symbol
defaultorsome, thenfdo-default-filterorfdo-some-filteris exectuted, respectively. If filter is not defined, will return the inputfdo-list.This can be useful for testing filters, and is also used internally.
In this section it is shown how Sawfish processes desktop file entries while building the applications menu. Each entry passes through many filters, and they're what you may want to customize.
Desktop file entries are expressed as a list. Here is an example of emacs.desktop file before any filters are performed:
("Desktop Entry"
("Name" . "Emacs Text Editor")
("Name[de]" . "Emacs Texteditor")
("GenericName" . "Text Editor")
("Comment" . "Edit text")
("Exec" . "emacs %f")
("Icon" . "emacs-icon")
("Type" . "Application")
("Terminal" . "false")
("Categories" . "Development;TextEditor;")
("StartupWMClass" . "Emacs"))
It then gets split into two lists. The original “Categories” key contains several values, and each of new entries has “Category” key which contains only one of the original categories.
("Desktop Entry"
("Name" . "Emacs Text Editor")
("Name[de]" . "Emacs Texteditor")
("GenericName" . "Text Editor")
("Comment" . "Edit text")
("Exec" . "emacs %f")
("Icon" . "emacs-icon")
("Type" . "Application")
("Terminal" . "false")
("Categories" . "Development;TextEditor;")
("Cateogry" . "Development") ; Look here
("StartupWMClass" . "Emacs"))
("Desktop Entry"
("Name" . "Emacs Text Editor")
("Name[de]" . "Emacs Texteditor")
("GenericName" . "Text Editor")
("Comment" . "Edit text")
("Exec" . "emacs %f")
("Icon" . "emacs-icon")
("Type" . "Application")
("Terminal" . "false")
("Categories" . "Development;TextEditor;")
("Cateogry" . "TextEditor") ; Look here
("StartupWMClass" . "Emacs"))
This is the entry list format that is used in all of the later filters.
All filtering functions should accept such an entry list as its argument,
and all filtering functions should either return nil or an entry list.
If fdo-associate-categories is t then the “Category” key will be
changed to the main category that will eventually show up in the apps-menu.
The keys that are used by the applications menu are currently,
The name to be displayed in the applications menu. If
apps-menu-lang or the locale coincides with one of the
Name[lang] keys in the entry list, then that will be the name used.
The command to be run when the entry is called.
Whether or not to run the Exec value inside of a terminal or
not. If it's true, the terminal specified by xterm-program is
used.
Which top-level category to place the entry in.
Whether or not the entry should be hidden by default.
Whether or not the entry should be displayed by default.
If an item should not be shown by checking the current desktop enviroment against the value of this key.
If an item should be shown by checking the current desktop enviroment against the value of this key.
Filters are functions, either pre-defined or user-defined, which take
one argument, a desktop file entry. You can set your filter to the
apps-menu-filter variable.
Here we show an example user-defined filter, and all pre-defined filters, which are also available to user codes.
;; This will move emacs to the ``util'' category, in addition to the
;; operations done by default filter.
(setq apps-menu-filter
(lambda (ent)
(let ((ent (fdo-default-filter ent)))
(when ent
(cond ((string-match "[Ee]macs" (cdr (assoc "Name" ent)) nil t)
(rplacd (assoc "Category" ent) "util")))
ent))))
The pre-defined filters:
(define (fdo-nodisplay-filter fdol)
"Return the desktop-file-list if NoDisplay is False, or if NoDisplay is
not present in the desktop-file-list"
(if (assoc "NoDisplay" fdol)
;; [Ff] means match to "false"
(if (string-match "[Ff]" (cdr (assoc "NoDisplay" fdol)))
fdol)
fdol))
(define (fdo-hidden-filter fdol)
"Return the desktop-file-list if Hidden is False, or if Hidden is
not present in the desktop-file-list"
(if (assoc "Hidden" fdol)
(if (string-match "[Ff]" (string-downcase (cdr (assoc "OnlyShowIn" fdol))))
fdol)
fdol))
(define (fdo-onlyshowin-filter fdol)
"Return the desktop-file-list if OnlyShowIn matches `desktop-environment',
or if OnlyShowIn is not present in the desktop-file-list"
(if (assoc "OnlyShowIn" fdol)
(if (string-match desktop-environment (string-downcase (cdr (assoc "OnlyShowIn" fdol))))
fdol)
fdol))
(define (fdo-notshowin-filter fdol)
"Return the desktop-file-list if NotShowIn does not match `desktop-environment',
or if NotShowIn is not present in the desktop-file-list"
(if (assoc "NotShowIn" fdol)
(if (not (string-match desktop-environment (string-downcase (cdr (assoc "NotShowIn" fdol)))))
fdol)
fdol))
(define (fdo-associate-categories-filter fdol)
"If `apps-menu-associate-categories' is true, filter the
desktop-entry through `fdo-associate-categories'."
(when fdol
(if apps-menu-associate-categories
(associate-categories fdol)
fdol)))
(define (fdo-toplevel-filter fdol)
"Return the desktop-file-list if the `Category' is of the
Top-Level variety."
(when fdol
(if (not (equal "Top-Level" (cdr (assoc "Category" fdol))))
fdol)))
(define (fdo-default-filter fdol)
"The default fdo-filter, combines the above."
(fdo-toplevel-filter
(fdo-hidden-filter
(fdo-notshowin-filter
(fdo-onlyshowin-filter
(fdo-nodisplay-filter fdol))))))
(setq apps-menu-filter fdo-default-filter)
Sawfish comes with ready-made popup menus. This section describes how you can modify them.
An entire popup menu is specified by a list. Each element corresponds to a menu item, in the displayed order from top to bottom. Example:
(("Item _1" command-1) ;; list for a command.
("Item _2" . submenu-2) ;; cons for a submenu.
() ;; nil makes a seperator line
("_xterm" (system "xterm &")) ;; lisp expression is possible too.
Each menu item is typically specified by a list with two elements. The first is the name; it's a string, and displayed in the menu. An underscore (_) before a character defines an accelerator, or a shortcut key.
The second element specifies the action to take. Possible choices are:
user module.
If an item is nil (instead of a list with two elements), then it's printed as a seperator line.
An item can invoke a submenu. In this case, the item is a cons. The car is the printed name. The cdr is a symbol which is the name of a variable. That variable specifies another menu's contents. Or the variable refers to a function, it's invoked, and the return value is used. Notice that this variable has to be special, or dynamically scoped, so that its value can be seen inside of the involved module.
It's possible to pass a list with more than two elements as an item, but it is not explained. (Read the code and please tell us the usage.)
Let's see one more example:
(("Workspaces" . workspace-menu)
("Windows" . window-menu)
("Programs" . apps-menu)
("Customize" . custom-menu)
("About..." (customize 'about))
() ; Separation horizontal bar.
("Restart" restart)
("Quit" quit))
This is the old definition of Sawfish's root menu. We can see that four submenus are created by seeing the value of variables. They contain functions, and they're invoked.
Popup menu is made by making a seperate process.
Mainly for developers, one more esoteric thing, “toggle menu”, is explained.
The toggle type submenu of window operations, like “sticky” or “shaded”. By selecting items in this menu, a user can turn the flags on and off for a given window.
Add an item to
window-ops-toggle-menu. The command is a function (or a symbol pointing to a function) that gets run when the menu item is selected.If predicate is non-nil, it must be a function taking a window as argument. If predicate return true, the menu item will have a check mark next to it.
Lisp “event” object is a representation of input, regardless of actual or expected. If it's a keypress for example, it tells which key with which modifiers are pressed, and that's all. Please do not confuse it with X or other's event which is generated only after keypress or other “event”.
Each X input event induced by the mouse or the keyboard has a Lisp representation. X input events that Sawfish receives are either for the root window, the window frames it creates, or grabbed from the client windows themselves.
Sawfish can respond to X events other than input, most often via hooks. (see Standard Hooks)
Each event has a string representation, called its “name”. Names consist of zero or more modifiers, followed by a key or mouse action indicator. Modifiers are separated from succeeding elements by hyphens ‘-’. For example, hitting <x> while holding down the <Control> and <Meta> keys would generate an event named <Control-Meta-x>. This notation is designed to closely match Emacs Lisp's notation.
Functions are available to convert between the name of an event and the event object itself, and vice versa.
Create and return a new input event whose name is event-name.
(lookup-event "C-x") ⇒ (120 . 65540) ;; Internally, event is a pair of integers. (lookup-event "C-M-Button1-Click1") ⇒ (1 . 131340)
This function returns a string naming the input event event.
(event-name (lookup-event "C-x")) ⇒ "C-x"
Sawfish event modifiers are copied directly from the standard X modifiers:
The standard X modifier names are provided, as well as four special modifiers <Meta>, <Alt> <Hyper> and <Super> that are mapped to the keysyms of the same name.
The following table lists the possible modifier prefixes:
You have to set the variable eval-key-release-events to
non-nil to use this modifier.
wm-modifier below.
The default Sawfish bindings use the <Meta> modifier. For convenience, if no X keysym generates <Meta>, Sawfish will treat the first defined modifier of <Alt>, <Hyper> and <Super> (in that order) as <Meta>. The mapping from keysyms to modifiers is exposed in the following variables:
A list defining the names of the X keysyms generating the virtual ‘Meta’ or ‘M’ modifier.
A list defining the names of the X keysyms generating the virtual ‘Alt’ or ‘A’ modifier.
A list defining the names of the X keysyms generating the virtual ‘Hyper’ or ‘H’ modifier.
A list defining the names of the X keysyms generating the virtual ‘Super’ modifier.
There are two functions to manipulate the placeholder “window manager” (<W>) modifier. Unfortunately, these are low-level functions that operate on integer encodings.
Return the current value (an integer) of the placeholder “window manager” (<W>) modifier.
An integer encoding zero or more modifier keys that form the placeholder “window manager” (<W>) modifier. Setting this value through the customization UI automatically calls
set-wm-modifier.
Set the value of the placeholder “window manager” (<W>) modifier to modifiers (an integer).
Sawfish recognizes keyboard actions and mouse actions.
Generally keys have the same names as their X keysyms. The following unusual names are worth listing: ‘SPC’, ‘TAB’, ‘RET’, ‘ESC’, ‘BS’, ‘DEL’, ‘Up’, ‘Down’, ‘Left’, ‘Right’.
For example, pressing the <Delete> key while <Control> is held down generates a Control-DEL event, while releasing the <a> key while <Hyper> is held down generates a H-Release-a event.
multi-click-delay
milliseconds between clicks), the second and third events are
<Click2> and <Click3>, respectively. Any further clicks are
simple <Click> events. For consistency, <Click1> is a synonym
for <Click>.
query-last-pointer to find that information.
For example, a single click of the left mouse button with the <Meta> key held would be described as M-Button1-Click1. After triple-clicking with the <Alt> key held down, Sawfish will receive a Alt-Off3 event.
An integer indicating the maximum number of milliseconds between successive clicks. Defaults to 250 milliseconds at startup; if
nil, Sawfish uses 250 milliseconds.
There is a special function that matches event objects. If the actions of two event objects are not identical, the events do not match. If they are identical, then the events match if the modifiers are identical, or if one of the modifiers is <Any>. See Event Modifiers.
It is possible to create an event inside Sawfish that mimics a real keyboard or mouse event.
Generate a synthetic key press or button press and send it to the X window bound to the window object. Pass the symbol
rootfor the root window. This press is automatically followed by the appropriate release event.The current pointer position becomes the position of the event.
Event is either an event object, or the string representation of an event (such as
"A-f"or"C-M-Button3-Click2"). Strings are parsed into event objects before any work is done. See Event Name Representation.If propagate is true, the event will propagate up the window ancestor chain until it is handled.
A command is roughly speaking a lisp function which can be called from key or mouse input. But it may be preferable for example to pass the currently focused window as the argument, and such mechanism is prepared. So Sawfish distinguishes the notion of commands from functions.
Formally stated, a command is an association of the name to a function, and a way to pass the arguments, and so on.
The name space of commands are independent of that of bindings (which includes functions.)
In configurator "binding" section, show commands of these classes. It is a list. Possible keys are
default,advanced,viewport, anddeprecated.The default value is
(default).
Define a command called name (a symbol). The function fun will be called to execute the command.
spec defines how the arguments are passed by the interactive call of the command. See Interactive Calling Specification.
doc is the documentation string associated with the command. If it's lacking, that of the function fun will be looked up.
Other arguments are mostly for internal use.
type specifies arguments, too. These arguments are statically set in “Bindings” section of the configurator. If type is set, then a lisp expression like
(command-name arg1 arg2...)is bound to the key, in contrast to the usual case where command name is bound. (The precise doc is lacking.)class is a symbol which annotates the command, for example
advanced. Users can choose which commands are shown in the configurator according to class. See the documetation ofcustomize-command-classes(see Commands.)
As
define-command, but any printed output of fun is sent to the screen, i.e.standard-outputis redirected.
Record that loading the module called module (a symbol) will provde a command called name.
The keyword values have the same meanings as for
define-command. Defining those properties as part of the autoload provides useful feedback to the user without having to do loading.
GNU Emacs-like command definition is a deprecated, old-syntax, but
still supported. There command definition is included in function
definition. The first form in the function body must be an
interactive declaration which marks that the function may be
called interactively and tells the call-command function how to
compute the argument values to apply to the command.
The interactive declaration looks like a call to the special form
interactive, in actual fact this special form always returns
nil and has no side-effects. The only effect of this form is to
show the call-command function that the function definition may
be called interactively. The second element of the declaration form
(after the interactive symbol) defines how the argument values
applied to the command are computed.
The structure of an interactive declaration, then, is:
(interactive [calling-spec])
When a command is defined this is how it includes the interactive declaration:
(defun some-command (arg1)
"Optional documentation string."
(interactive ...)
...
The calling-spec is defined in See Interactive Calling Specification.
The spec argument to interactive or define-command
defines the argument values applied to the command when it is called
interactively. It may be one of:
nil or undefinednil.
The currently available prefixes are,
t.
nil if no
window is focused.
current-event-window function.
current-event-window function, or if
this returns nil or root, the currently focused window.
We can extract certain information about commands.
Return the documentation for the command name. It returns the first documentation found by looking at (in order): the documentation property of the command; the doc file entry associated with the doc key property; or the documentation for the function with the same name.
Return the specification, type or class (respectively) of the named command.
Returns the list of commands. Each element is the symbol of a command name, and they're sorted alphabetically.
The optional argument type is for internal use. when it's non-nil,
(command-name #:type type-param)is returned for commands with “type”, instead of a symbol.If the optional argument all is nil, returns commands only user wants, i.e. those specified by
customize-command-classare included. Else, all commands are returned.
When a command is to be invoked, the call-command function is
used. This builds a list of argument values to apply to the command
(using its interactive declaration) then calls the command.
This function calls the command command interactively. See the documentation of
commandpabove for what constitutes a command.If the prefix-argument is non-nil it defines the value of the
current-prefix-argvariable for this command, normally the value of this variable would be taken from the globalprefix-argvariable.There is a corresponding
call-commandcommand that prompts for a command to execute.
Call the function underlying the command name, passing in args as the arguments. This is useful for calling a command in a non-interactive context.
When invoking an interactive command, this is set to the current prefix argument.
The command currently being called. The value is only set during command call, and
nilanytime else.
See Command Hooks, for hooks run before and after commands.
Keymaps are used to associate events with commands. When an event
occurs, the associated command is found and evaluated. A keymap is
simply a list whose first element is the symbol keymap.
Installs zero or more key bindings into the keymap keymap, then returns keymap.
Each binding is defined by two elements in the list of bindings, the first defines the name of an event (or the event itself) and the second defines the command to be associated with the event.
For example to bind two keys in the keymap keymap; the event C-f to the command
fooand the event C-b to the commandbarthe following form would be used,(bind-keys keymap "C-f" 'foo "C-b" 'bar)Currently, multiple keystrokes can't be bound with a single
bind-keyscall. Instead, bind an event to another keymap.
Removes the bindings of the events keys (these may be the names of the events or the event objects themselves) from the keymap keymap.
Functions bind-keys and unbind-keys do not affect the
bindings of existing windows, because keymaps are set on a window when
the window is created and begins to be managed by Sawfish. Update
can be done by following functions.
All bindings stored in keymap get into / out of effect of all windows, including root, but not of frame parts.
Notice that
ungrab-keymaphas to be called BEFORE you change the keymap.If the window foo has its own keymap rather than
window-keymap, then it is not affected by(grab-keymap window-keymap).
Search for a binding of the event event in keymap. If a binding is found a cons cell
(command.event)is returned.
There are several pre-defined keymaps that are always available:
global-keymapwindow-keymaproot-window-keymaptitle-keymapborder-keymapclose-button-keymapiconify-button-keymapmaximize-button-keymapmenu-button-keymapshade-button-keymapsticky-button-keymaplock-button-keymaprename-button-keymapmove-resize-button-keymapraise-lower-button-keymapoverride-keymapnil. If it is a keymap,
this becomes the keymap in which all lookups occur (overriding the window,
root and global keymaps). If it is a symbol, Sawfish finds the
symbol's value and tries again. If it is nil, Sawfish behaves
normally.
The event loop reads all X events received on any of the windows that
Sawfish is aware off. Many of these events invoke hooks, as described
in Standard Hooks. Keyboard and pointer events are translated to
their Lisp equivalents (see Events) and then used to scan all
active keymaps for a binding. If a binding is found, the associated
command is invoked through the call-command function.
The active keymaps are determined as follows:
override-keymap is non-nil, then this is
the only keymap searched
keymap property of the currently “clicked” frame
part if there is one,
keymap property of the currently focused window
global-keymap.
Note that for ButtonRelease events, the frame part's keymap is
only searched if the pointer is actually within the frame part when the
release event occurs.
If no binding may be found in any of the active keymaps, then the
unbound-key-hook hook is called. This is an or type
hook—the first function that returns non-nil will terminate the hook
call.
Perform the usual binding lookup for the event object object. Returns the command found, or
nilif no binding exists.
By default, both key-release events, and events that are bound to modifier keys (e.g. <Control_L>), are ignored. However, this behavior may be changed:
While a command is being evaluated, information about the event that caused it may be found:
Extract the owning window of the current X event (this is a window object, or the symbol
rootfor the root window, ornilif there is no window or no event). This is stored internally as the current event window, and returned.If the optional argument win is a window, then it will be returned as the current event window.
Send the current X event to window, either a window object, a numeric window id, or the symbol
root. If aButtonPressevent the pointer grab will be released first.Mask may be an integer defining the X event mask to pass to the
XSendEventfunction. If not defined, a mask is chosen that would usually be used to select the type of event being proxied.Propagate is a flag (
nil/non-nil) passed directly to an underlyingXSendEventcall. (And if someone would like to explain what that means, please do so ...
This is a wrapper for the
XAllowEventsfunction. The mode parameter may be one of the following symbols:async-pointer,async-keyboard,sync-pointer,sync-keyboard,replay-pointer,replay-keyboard,async-both,sync-both.Events that have to be grabbed to be received (i.e. all bindings in the
global-keymapand thewindow-keymap) are grabbed synchronously. This means that no more events will be received until either the command returns, orallow-eventsis called.This is normally not important, but if the command expects to receive further events it must call
allow-events. See the interactive move and resize functions for an example.
Cause the next button press to be treated as a single click event, no matter how soon it occurs after the prevous button-press event.
Handle any X events received. If mask is non-nil then only events matching this numeric value are handled (see the X header files for details).
Returns a cons cell
(x . y)representing the current mouse pointer position, relative to the origin of the root window.If there is a mouse update current event, the position is read directly from that event. Otherwise it is read from the server. If from-server is non-nil then the position is read directly from the server in any case.
Returns the top-level window under the mouse pointer, or
nilif the cursor is in the root window.
Returns a cons cell
(x.y)representing the second most recent mouse pointer position, relative to the root window.
Returns
(mouse-x.mouse-y)representing the mouse position relative to the root window at the last button-press event.Use this function to track the displacement of the pointer during a drag.
Returns the window that the mouse was in when the button was pressed.
Move the mouse pointer to position (x, y) relative to the origin of the root window.
Move the mouse pointer to position (x, y) relative to the client window associated with object window.
If x and y are
nil, then they are taken as the top-left corner of the window's frame.If
warp-to-window-enabledisnil, this function does nothing.
Offset (%) from window edges when warping pointer. A negative number means outside the left window edge.
If set to an integer value, a pointer must move by this many pixels on either axis before Sawfish considers it to have moved. If the pointer has not moved by this amount, Sawfish will ignore
MotionNotifyevents from X. The variable defaults to 2 pixels. If not an integer, Sawfish assumes a threshold of 0 pixels.
Sawfish provides functions to move the pointer relative to the current
positions. They're named “move-cursor”, and defined in
sawfish.wm.commands.move-cursor.
Move the cursor right pixels to the right across the screen, and down pixels down the screen. The cursor stops at the edge of the screen (although in multi-head environments, this may not be at the edge of the display).
There are also more specialized cursor movement functions. All of them are commands, too.
Move the cursor 1 pixel in the indicated direction.
Move the cursor
move-cursor-incrementpixels in the indicated direction.move-cursor-northeastis equal to the northward move cobmined with the eastward.
The
move-cursor-DIRECTION functions move this cursor this many pixels at a time.
After a call to
grab-serverthis will allow other clients to access the X server again.Note that calls to
grab-serverandungrab-servernest.
Evaluate forms with the server grabbed. Releases the grab afterwards.
Return the result of calling the zero-parameter function thunk. If the server is currently grabbed, ungrab it first, restoring the original grab status after the call to thunk returns.
Grab the mouse pointer and direct all pointer events to window object window. If cursor is defined and a cursor object, display this while the pointer is grabbed.
If window is a window object corresponding to a visible window, the grab will be made on its frame.
If window is an integer, it specifies the window ID of the grab window.
Otherwise the grab will be made on the root window. This includes window corresponding to a non-viewable window.
Confine-to, if non-
nil, is a visible window to confine the pointer to. It is interpreted similarly to the rules for window, except that the “otherwise” case is to not confine the pointer.If the window id of a non-viewable window was specified for either window of confine-to, the grab will be made on the root window without confining the pointer.
If ptr-sync or kbd-sync is non-nil, the pointer or keyboard will be frozen, i.e., the device will not produce events until either the grab is released or events are re-enabled using
allow-events.Returns non-nil if the grab succeeded.
Grab the keyboard and direct all keyboard events to window object window.
If window is a window object corresponding to a visible window, the grab will be made on its frame.
If window is an integer, it specifies the window ID of the grab window.
Otherwise the grab will be made on the root window. This includes window corresponding to a non-viewable window.
If ptr-sync or kbd-sync is non-nil, the pointer or keyboard will be frozen, i.e., the device will not produce events until either the grab is released or events are re-enabled using
allow-events.Returns non-nil if the grab succeeded.
Call the zero-parameter function thunk with the keyboard grabbed. If unable to grab the keyboard then thunk won't be called.
Return the screen dimensions in pixels as a cons cell
(width.height).
Draw an outline of a window of dimensions (width, height) at position (x, y) relative to the root window.
mode is a symbol defining the type of outline drawn, currently it may only be
boxfor a 3x3 grid.Use the
erase-window-outlineto erase the grid. Also note that since these functions draw directly on the root window the server should be grabbed until the outline is erased.
Erase a previously drawn outline of a window of dimensions (width, height) at position (x, y) relative to the root window.
mode is a symbol defining the type of outline drawn, currently it may only be
boxfor a 3x3 grid.
Display the string text in a window on the screen. If text is
nilthen any string previously displayed is removed. Returns the numeric id of the window displaying the message, ornilif no message is displayed.The window is placed on top of X client windows, and basically at the center of the screen. The window remains until another call of this function, or the user clicks on it.
attributes is an alist specifying how the string should be displayed; each element of the list is a cons cell
(attr.value)associating an attribute attr (a symbol) with it's value.Possible attributes currently include:
font- The font to use
foreground- The color (or color name) to draw the text with
background- The color (or color name) to draw the background with
x-justify- The justification method for multi-line strings. One of the symbols
left,right, orcenterspacing- The number of extra pixels of vertical spacing to leave between text lines.
position- A cons cell defining the coordinates at which to display the message window. The cell is
(x.y). x and y are integers ornil(for centered display). If negative they count in from the left and bottom edges respectively.head- The head on which to center the message when a position is not specified or given as nil. If not provided defaults to the head containing the window that has the input focus.
Tip: Don't call this function during initialization. Instead, use
after-initialization-hookto defer. Otherwise the message window is covered by X client windows.
Rectangles define a region of the display. A rectangle is a list of
values: (left top right bottom [weight]). left and
top are the x and y coordinates of the upper left
corner, right and bottom are the coordinates for the lower
right corner. weight is an integer. The bulk of the rectangle
management functions are in sawfish.wm.util.rects.
The x-axis value of the right side of the rectangle. Equivalent to
caddr
Check whether the rectangle
ris wholly or partially contained in rectangleby. Returns one of the symbolsunobscured,partially-obscured, orfully-obscured.
Return a list of rectangles whose union is the part of rectangle
rnot contained in rectangles. Iftailis given, the result is prepended to it.
The two lists of integers
x-pointsandy-pointsdefine a rectangular grid. Return the complete list of rectangles formed by the intersections of the grid.If
predis defined it is called for each rectangle and only those for which it returnstare added to the returned list.Assumes that
x-pointsandy-pointsare both sorted smallest->largest.
Returns a list of rectangle objects representing the list of window objects
windows.If
weight-funis defined, it is a function to call on each window to return the weight for that window. If not defined, the window'sweightproperty is used instead.
Given a list of rectangles
rectsreturn a cons cell(x-points . y-points)defining the grid they represent.If
with-rootis non-nil, then add the root window boundaries to the grid.
Return the rectangle object with origin
pointand dimensionsdims.
Return a list of four cons cells representing the coordinates of the corners of the rectangle
rect.
Returns a cons cell of the (approximate, to the nearest integer) coordinates of the center of the rectangle
rect.
The same as
rectangle-centerexcept that the rectangle is specified via the x,y coordinatespointand the dimensionsdims.
Gives the smallest rectangle containing both
rect1andrect2. The weight of the resulting rectangle is the weight ofrect1.
Gives the intersection of the two rectangles
rect1andrect2. The weigth of the resultant rectangle is the weight ofrect1. Returnsnilif there the two rectangles do not intersect.
a-1toa-2indicates one line segment andb-1tob-2indicates another. Returns the overlap between the two line segments.
Returns the overlap between two rectangles, one with dimensions
dimsand upper-left corner atpoint; the other is defined byrect.
Like
rect-2d-overlap, except that the rectangles arerect1andrect2.
Returns the total area of the overlap between a rectangle defined by
dimsandpoint, and the list of rectanglesrectswhen placed atpoint.
Returns
tifinneris completely within the boundaries ofouter.
These functions are found in sawfish.wm.viewport:
Return
tifrectis entirely inside the screen boundaries for some viewport, regardless of whether it is the current viewport, or even if the viewport currently exists. Ifviewportis specified check only against that viewport.
Return
tifrectis entirely within some head on some viewport. Ifheadis providedrectmust be within that head on some viewport.
The gradient feature allows color gradients to be drawn in
images. Import gradient or sawfish.wm.util.gradient
to use this feature.
Draw a vertical color gradient in image. The color at the top of the image will be from, the color at the bottom to, with a smooth transition between.
Draw a horizontal color gradient in image, from left to right. The color at the left of the image will be from, the color at the right to, with a smooth transition between.
Draw a horizontal color gradient in image, from the top-left corner to the bottom-right. The color at the top-left of the image will be from, the color at the bottom-right to, with a smooth transition between.
The home directory for Sawfish files. For example:
"/usr/share/sawfish". You can override it with the environment variableSAWFISHDIR.
The directory for architechture-specific Sawfish executables. For example:
"/usr/lib/sawfish/1.3/i386-pc-linux-gnu". You can override it with the environment variableSAWFISHEXECDIR.
The top-level directory for Sawfish lisp files. For example:
"/usr/share/sawfish/1.3/lisp". You can override it with the environment variableSAWFISHLISPDIR.
The system directory where Sawfish can find locale files. This is not part of the Sawfish distribution. For example:
"/usr/share/locale".
The top-level directory for site-specific Sawfish lisp files. For example:
"/usr/share/sawfish/site-lisp". You can override it with the environment variableSAWFISHSITELISPDIR.
The list of user's sawfish lisp directories. The default value is
($HOME/.sawfish/lisp). It is prepended toload-path, so that files under these directories are searched prior tosawfish-lisp-lib-directory.You can override the value with environment variable
SAWFISH_USER_LISP_DIR. Paths are seperated by colon, like thePATHenvironmental variable. Example:~/.sawfish/lisp-test:~/.sawfish/lisp.
Quits and restart Sawfish.
Restart does exec (3), replacing the current process. All command line arguments are used again, except that session management related ones are updated.
There also exist same name commands.
If Sawfish is shutting down, this function returns one of the strings
"user-quit","user-restart"or"session-quit". If Sawfish is not shutting down, it returnsnil.
A function for rebooting, halting, suspending and hibernating your machine. Normally this is only used when running outside of GNOME or KDE; they provied their own versions of functions.
action is a symbol, and each invokes the shell command defined by the variable as follows:
action variable rebootreboot-commandhalthalt-commandsuspendsuspend-commandhibernatehibernate-commandWhen action is
rebootorhalt,before-exit-hookis called, anddelete-windowsis applied to each window to ensure we safely quit the current session.
If you don't use GNOME, KDE, nor XFCE, power off related actions are added under the root menu -> “Sessions”.
Send an X
ClientMessageevent to window (a window object, the symbolrootor a numeric xid).The event will be of the type type (a symbol), contain the array of integers data (i.e. a vector or a string), and will be transferred as format sized quantities (8, 16 or 32).
Create an unmapped window that is a child of parent (a window object, an integer window id, or the symbol
root), with the specified dimensions.Returns the window id of the new window.
Return the symbol with the same name as the X atom identified by the integer integer.
A string containing the canonical name of the X display. This includes the full host name and the screen number. For example:
"foo.bar.com:0.0".
A string containing the name of the X display, exactly as passed to Sawfish. For example:
":0", or"foo:0.0".
Holds a list of all of the command line arguments (including the executable name), except options related to session mangement.
Call the zero-parameter function thunk. If an error occurs, trap it and pass its
carandcdrtoerror-handler-function.
Ensure that module name has been loaded. This does not import its bindings or make them accessible.
Evaluates form in the structure named by struct-name. Compare this with
eval, which takes a structure object as its second parameter, not a structure name.
user-evalevaluatesformin*user-module*.user-requireevaluates(requirefeature)in*user-module*.
Escape any ‘_’ characters in string such that the result can be used as the label of a menu item.
Create directory dir. Any missing parent directories will also be created.
Search for a file filename in any of the directories named by the list of strings dirs.
Return x clamped between lower and upper. If x is less than lower, return lower; if it is larger than upper return upper. Otherwise return x.
Return the interval (x, x+w) clamped between lower and upper. If x is less than lower, return lower. If x+w is larger than upper, return upper-w; this is a value of x that satisfies the upper bound, although it may violate the lower bound. Otherwise return x.
Remove all duplicates values from lst, using
eq. The order of elements is not preserved.
Executes a shell command. This is a wrapper for
systemfunction, so in lisp code, use it instead. (see Shell Commands.)
In this chapter relation to external applications is described. See also See Applications Menu, which is a popup to execute applications.
See also the lisp function system which invokes a command from
a shell. (see Shell Commands)
Jump to a window, or if it doesn't exist, start a program. Main use of this function is as a binding to keys. Defined in the module
sawfish.wm.commands.jump-or-exec.Window is searched by matching the name with a regex regex. If booleanmatch-class is non-nil, the value of regex is matched with window's WM_CLASS. When no window matches, action specified by prog is taken.
If prog is a string, then it should be a program name, and executed from a shell in the background. (I.e. Sawfish adds ”&”.) Otherwise, it should be one of a function, command name, or lisp expression. The function is called without any argument. The lisp expression will be evaluated in the
usermodule.If the optional argument onfocused is non-nil, it defines the action when the window is already focused, in the same manner as prog, but the function will receive the focused windows as the argument. This can't be a string.
;; Examples: ;; Jump to a window named "Geany". When not found, invoke "geany" ;; from a shell. (bind-keys global-keymap "W-F10" '(jump-or-exec "Geany" "geany")) ;; Jump to a window with the class "Gnome-run-dialog". (bind-keys global-keymap "W-F2" '(jump-or-exec "Gnome-run-dialog" "/usr/local/bin/gnome-run-dialog" #:match-class t ))
This function adds to
jump-or-execby turning a window to “quake”-like "toggle-windows". That means, if this function is invoked on a matching window, that window will be iconified. Else it works in the same way asjump-or-exec.You may also want to use a window property
iconify-on-leave. (see Iconifying Windows.);; Examples: ;; Application "dolphin", matched by its name (i.e. WM_NAME.) ;; Press "Home" key, and ;; * if no instance of dolphin is running, it's invoked. ;; * if one is there, the focus jumps to it. ;; * if it's already focused, it will be iconified. ;; ;; ( bind-keys global-keymap "Home" ;; `( toggle-or-exec "Dolphin" "dolphin ~" ) ;; "konsole", matched by its window-class (= WM_CLASS). ;; ( bind-keys global-keymap "F12" ;; `( toggle-or-exec "Konsole" "konsole" #:match-class t )
There're some functions and variables for invocation of external
applications. They're defined in sawfish.wm.commands.launcher
module.
Start a new terminal specified the option
xterm-program.Optional argument COMMAND is passed to the terminal with
-eoption, so for most terminals, including xterm, it can contain arguments to be passed.
Start a new browser instance. Visit URL if supplied.
Sawfish detects some desktop environments.
Running desktop environment, detected by Sawfish. Possible values are "kde", "gnome", "xfce", or "none".
Sawfish provides many hooks to allow extension of previously defined functions. Also, many X events are exported to the Lisp environment via the hooks mechanism. For more details on the hooks mechanism see Normal Hooks.
As well as using the standard call-hook function, sawfish also
provides the call-window-hook function. This is used to invoke
hooks which refer to a single window. Such hook is called “window
hook”. If a window hook has a local value defined in the window's
property list then this value is used, before the default value
defined by the actual variable.
Call hook for window with further arguments args. See
call-hookfor a description of hook-type. Each function in the hook is called with arguments(window.args).Root window is represented by the symbol
root.
The available hooks are listed below.
The hook functions are passed one argument which is the command name.
Called before invocation of each command. You can modify
this-commandhere. In particular, if it's set tonilin this hook, then the command won't be executed.
Called when an key or pointer event has been received which there is no binding for. The hook functions return no arguments. This is an
or-type hookk—the first function that returns non-nilwill terminate the hook call.Under normal circumstances, an unbound key release causes a
throwto top-level. Adding any function to this hook suppresses that behavior.
Called when the window is first adopted by the window manager. This occurs before the window is created, installed or placed. At this early stage, the only safe action is to set properties of the window (with
window-put).
add-window-hookis a deprecated hook, replaced bybefore-add-window-hook. It is called immediately afterbefore-add-window-hook.
Called when the window is first adopted by the window manager. This occurs after the window has been created, installed and placed.
Called after a window gets a frame assigned, or after a window's frame is rebuilt.
Called when the window is destroyed. Note that this may be called asynchronously to the normal event loop. In general, once the window manager knows the window has been destroyed, it will attempt to call this hook as soon as possible.
Called with a window is mapped, unmapped, reparented, or has its shape changed, respectively.
Note that iconifying and uniconifying windows triggers unmapping and mapping, respectively.
Called when a window is iconified, uniconified, shaded, unshaded, maximized, unmaximized, or has its depth changed, respectively.
Called when a window's visibility changes. In addition to the window, the hook is called one one of the symbols
fully-obscured,partially-obscured, orunobscured.
Called the first time a window is mapped, or if the window does not have a true
placedproperty. This is anor-type hook—the first function that returns non-nilwill terminate the hook call.
Called whenever the window is moved or resized.
This hook is called inside the
move-window-toandmove-resize-window-tofunctions, so any operation that moves the window will trigger this hook. The window motion does not have to be interactive.Note that outline window sizing and movement does not use
move-window-toormove-resize-window-to, except at the very end of the operation.Compare with
while-moving-hookandwhile-resizing-hook.
Called before starting an interactive move or resize.
Called during every pointer motion event during a move or resize. This includes outline window motion. The calls take place before the window or its outline are actually moved.
Compare with
window-moved-hookandwindow-resized-hook.
Called after completion of an interactive move or resize. In addition to the window, the hook is called with a list of symbols indicating how the window was moved or resized:
horizontalandverticalfor movement,right,left,bottomandtopfor resizing.
Called after any window restacking operation, including (but possibly not limited to
restack-windows,x-raise-windowandx-lower-window. The hook functions take no arguments.
Called after each step of window cycling. (See Cycling Between Windows.)
Called when an X
ConfigureRequestevent is received. In addition to the window, the hook is called with an association list of configure request properties. This alist may contain items(stack . above),(stack . below),(position .coordinates), and(dimensions .dimensions).
Called when an X
ConfigureNotifyevent is received, i.e. when window configuration request is complete.
Called whenever an X window property (not a Sawfish window property) changes. In addition to the window, the hook is called with the atom name and one of the symbols
new-valueordeleted.
Called whenever certain window manager hints change for a window. Currently only
urgencyis monitored. The hint is an additional argument to the hook.
Called when the pointer enters or leaves a window, respectively.
If the window was part of a frame, then
enter-frame-part-hookorleave-frame-part-hookis called with three arguments: the window, the frame part class (see Frame Part Classes), and mode. mode is one of the symbolsnormal,graborungrab.Otherwise
enter-notify-hookorleave-notify-hookis called with two arguments: the window and mode.Entering the root window is reported, too. In that case, the symbol
rootis returned in place of a window object.
Called when a window gains or loses focus, respectively. The hook function receives two arguments: the window that received / lost focus, and mode. mode is one of the symbols
normal,grab,ungraborwhile-grabbed.If your
focus-modeis set toenter-exit, your window focus is tightly bound to your pointer position; focus-related hooks and enter/leave hooks will be called in lockstep. For other values offocus-mode, Sawfish will trigger fewer focus-related hook calls than enter/leave hook calls.This hook is never called for the root window, because the root window never gets nor loses focus.
Called when switching from one workspace to another. This includes switching caused by adding or removing a workspace. The hook is called with a list containing the workspace in question.
Called when a window is added or removed from a workspace. In addition to the window, the hook is called with a list containing the workspace being changed. If the window is in multiple workspaces, then removing triggers
remove-from-workspace-hookfor each workspace.
Called when any aspect of the workspaces change, including adding a workspace, removing a workspace, moving a workspace, inserting or removing a window from a workspace, etc. This hook is called with no arguments, so you should use one of the more specific hooks if possible.
Hook called when the number of rows and columns in each workspace is changed.
Called on each window as Sawfish shuts down (possibly for a restart). The hook functions take no arguments.
Session management hooks, Session Management.
When using the
gtkrcmodule to load the current gtk style parameters, this hook is called when the style changes.
Called with arguments
(window type data-array). This is anor-type hook—the first function that returns non-nilwill terminate the hook call.
As described in an earlier section of this manual, each window has a property list, which may be used to associate arbitrary lisp data with symbolic keys (see Window Property Lists). The following table documents a subset of the keys currently used.
ignoredavoidworkspacesstickysticky-viewportkeymapfocus-click-throughnever-focusfocus-when-mappedignore-program-positionplace-modeplacement-weighttypenil. See Frame Types.
frame-stylecurrent-frame-styleremoved-classesshadedhide-clientdepthplacedplace-window-hook is only called when this is unset.
iconifiediconify-on-leavegravitynorth-west, north,
north-east, west, center, east,
south-west, south, south-east.
fixed-positionclient-set-positionanimatorSawfish has fully integrated support for the X session management protocols. Also, this support is extensible to allow all Lisp modules to save and reload their own window state.
There are two methods of doing this. If the module only wants to save
and restore the values of properties in each window's property list
(i.e. those values set via window-put), then the following
functions may be used:
Arrange for all symbols properties to be saved or restored with the session.
Lists of properties (symbols) to be saved or restored with each session.
If a Lisp module chooses to use this method it may add a function to
the add-window-hook to act on the reloaded properties when the
session is reloaded.
For more complex window properties that can't be saved straight from the window's plist two hooks are available:
A list of functions, each of which is called when the state of each window is saved. Each function is called with a single argument (the window) and should return a list of alist elements that will be saved in the state file. (As such, only values with valid read syntaxes may be included.)
List of functions called when the state of a window is restored. Each is called with arguments
(window alist), where alist defines the state saved for the window.Each function should look for the properties it saved, and then take any action dependent on the values.
The following hook is also called.
The directory that will contain all Sawfish sessions. It must be a string. By default it is
"~/.sawfish/sessions".
When loading sessions, the algorithm that matches saved session data to running clients requires that if one has a session id, then so must the other, and they must match. Setting this variable to true turns that feature off, allowing some broken clients to be session managed. Defaults to false.
Return a recent X server timestamp as an integer.
If from-server is non-nil, the timestamp is read directly from the server; otherwise the most recent timestamp seen by the window manager (i.e., from an event) is returned.
If store is true, this becomes the most recent timestamp seen by the window manager.
Create a new X window at
(x,y)with dimensions(width,height)and border width bw. Attrs is an alist mapping attribute names to values. Allowed attribute names arebackgroundandborder-color.
Reconfigure the window associated with window. Attrs is an alist mapping attribute names to values. Allowed attribute names are
x,y,width,heightandborder-width.
Map the window associated with window to the display. If unraised is not specified, the window will be mapped at the top of the window stack.
Set attributes of the window associated with window. Attrs is an alist mapping attribute names (symbols) to values. Allowed attribute names are
backgroundandborder-color.
These functions are defined in sawfish.wm.util.selection.
Return the string corresponding to the current value of the X11 selection defined by sel, or
nilif the selection currently has no value. Sel should be one ofPRIMARY,SECONDARYorCLIPBOARD.
Returns t if the X11 selection defined by the symbol sel is available for reading. Sel should be one of
PRIMARY,SECONDARYorCLIPBOARD.
Return the Lisp symbol naming the X11 keysym represented by the integer ks.
Return the height / width in pixels of drawable.
Return the X11 drawable-ID (an integer) associated with drawable.
Return a new image object copied from drawable. Mask is a stencil mask for the image; black pixels in mask become transparent in the returned image.
Copy a region of window with top-left corner
(x,y)and dimensions(width,height)to the position(dest-x,dest-y)using gc.
Create a new GC for the specified window window. Attrs is an alist mapping attributes to values. Allowed attribute names are
foreground,background,line-width,line-style,cap-style,join-style,fill-style,fill-rule,arc-mode,tile,stipple,ts-x-origin,ts-y-origin,clip-mask,clip-x-origin,clip-y-originandfunction.
Sets attributes of the X Graphical Context. Attrs is an association list of attribute names and values. Allowed attribute names are
foreground,background,line-width,line-style,cap-style,join-style,fill-style,fill-rule,arc-mode,tile,stipple,ts-x-origin,ts-y-origin,clip-mask,clip-x-origin,clip-y-originandfunction.
Create a graphics context specialized for XOR-ing onto the root window. This is used for drawing outlines for window movement.
Draw a single circular or elliptical arc in window using the graphics context gc. The center of the circle or ellipse is the center of an imaginary rectangle at
(x,y). The major and minor axes are the(width,height)of that rectangle. The arc sweeps from angle1 to angle2; positive angles are rotated counter-clockwise from zero, and negative angles are rotated clockwise from zero.
Render the image object image in window at position
(x,y). If width and height are defined the image is first scaled to these dimensions; otherwise it is drawn using its natural dimensions.
Draw a line from
(x1,y1)to(x2,y2)in window using the graphics context gc.
Draw a rectangle with its top-left corner at
(x,y)and dimensions(width,height)in window using the graphics context gc.
Draw a single filled circular or elliptical arc in window using the graphics context gc. The center of the circle or ellipse is the center of an imaginary rectangle at
(x,y). The major and minor axes are the(width,height)of that rectangle. The arc sweeps from angle1 to angle2; positive angles are rotated counter-clockwise from zero, and negative angles are rotated clockwise from zero.
Draw a single filled polygon in window using the graphics context gc. Points is a list of
(x,y)pairs that defines the polygon vertices.Draw-mode is a hint to the X server on how to draw the polygon; if supplied, it should be one of the symbols
convexornon-convex. The default mode is “Convex”.
Draw a filled rectangle with its top-left corner at
(x,y)and dimensions(width,height)in window using the graphics context gc.
Set the dash style of graphics context gc to the value of pixels-list. Pixels-list is a list of cons cells
((pixels-on . pixels-off) ...)indicating runs of on and off pixels in a dash segment. If offset is given, this should be an integer indicating the number of pixels to offset the dashes.
Return the X object ID (an integer) for the back buffer associated with window. If no such back buffer exists, the function will attempt to create one.
If the function is unable to find or create a back buffer (possibly because the X server does not support them), it returns the window's own ID.
Swap the fore and back buffers of the window associated with window. If the X server does not support double buffers, the function quietly does nothing.
Two functions to draw strings are there. If you need to write a
message like display-message use x-draw-string. If you
need to write on the root-window directly, use x-draw-text.
Draw the specified string at
(x,y)in window using the graphics context gc. If font is specified use that font. See alsox-draw-text.
Draw the specified string at
(x,y)in window using the graphics context gc. See alsox-draw-string.
The following symbols can be used where X window attributes are expected:
border-widthborder-colorexposeconvexnon-convexline-widthline-stylecap-stylejoin-stylefill-stylefill-rulearc-modetilestipplets-x-origints-y-originclip-maskclip-x-originclip-y-originThe following symbols can be used where X window attribute values are expected:
line-solidline-on-off-dashline-double-dashcap-not-lastcap-buttcap-roundcap-projectingjoin-miterjoin-roundjoin-bevelfill-solidfill-tiledfill-stippledfill-opaque-stippledeven-odd-rulewinding-rulearc-chordarc-pie-slicefunctionclearandand-reversecopyand-invertedno-opxorornorequivinvertor-reversecopy-invertedor-invertednandsetSee also http:://sawfish.wikia.com/wiki/Tips.
#sawfish on irc.freenode.net.
Help section.
This is exactly what it's supposed to do, but first try middle-click (by default) on the background. This invokes the menu. (If you have a two-button mouse, try clicking both buttons simultaneously).
Why this is so? Because Sawfish is minimal - Sawfish is a window manager and as such is not responsible for setting the background, starting programs or displaying a pager — these can all be done using separate applications (e.g. by using a desktop environment such as GNOME).
There're two ways, by the configurator GUI and by preparing lisp code. The GUI can be run by middle-clicking background -> “Customize”. Most customizations similar to other window managers can be done through GUI.
For customizations by lisp, first understand that in the startup, files ~/.sawfish/custom, .sawfishrc are read in this order.
Choose the filename either ~/.sawfish/rc or ~/.sawfishrc. The former is recommended, because the directory ~/.sawfish is anyway created to store custom, and you can also put other lisp scripts, like user-contributed codes there.
Sawfish < 1.6 reads sawfish-defaults by default only if ~/.sawfishrc lacks, but now it is always read.
system invokes a shell. Don't forget to add “&”
not to block the Sawfish execution.
(system "firefox doodle.com &")
Bind the event Button1-Click1 in the window-keymap to the
raise-window-and-pass-through-click command
See the ‘Popup Menus’ node in the Info manual (see Popup Menus)
Use the shell command:
sawfish --batch -l compiler -f compile-batch files...
where files... are the names of the files you want to compile. They will normally have .jl suffixes, the compiler will create associated files with .jlc suffixes containing the compiled Lisp code.
Remember that always the latest code is read, i.e., if the source is newer than the byte compiled file, the source is used, unlike emacs.
See the ‘Window Frames’ node of the Info manual (see Window Frames)
Basically though, create a directory ~/.sawfish/themes/foo where foo is the name of your theme. Then copy any images into this directory and create a file theme.jl that will be loaded to initialize the theme
There's no automatic translation available. Get the images used in the window border, then write a theme.jl file telling the window manager how they are used to form a window frame
See the themes/brushed-metal directory for an example, and the Info manual for the documentation
Yes, there are plenty actually. Most of them reside over at freshmeat: http://themes.freshmeat.net/browse/926/. You can also take a look at the Themes section on the Sawfish website: http://sawfish.wikia.com/wiki/Themes.
There was a problem with older versions of the gtk-engines
package preventing engine based themes working with several interpreted
languages. Get the latest gtk-engines from
ftp://ftp.gnome.org/
Here we explain sound support which can't be set via Configurator.
You can add sound files under ~/.sawfish/sounds/. This path can
be changed with audio-load-path variable. See the file
OPTIONS for the format.
The program to play sounds is set by play-sample-program. If
you want to pass arguments or redirect the output, prepare a wrapper script,
for example something like following:
#!/bin/sh
# No need of backgrounding.
mplayer -volume 30 "$1" &>/dev/null
sawfish-client program?
This allows you to connect to a window manager process and evaluate arbitrary Lisp forms. Do ‘sawfish-client -?’ for more details (‘sawfish-client -’ for a read-eval-print loop)
By default you can only connect from the host running the wm (through a
unix-domain socket). To enable the network based server, evaluate the
lisp form (server-net-init).
Note however that this connects through the X server, meaning that anyone who can open windows on your display can also execute any Lisp code on the host running the window manager (and by extension, execute any program).
So don't run the net server with X access control disabled (unless you're not connected to a network).
From a shell lauch the following command: sawfish-client -q -f restart
The Sawfish root-menu has a “session” sub-menu which allows you to
shutdown your machine. If you use GNOME or KDE, no additional work is
required. But if you use Sawfish standalone, the user needs the
privilege to execute shutdown command.
You can do it, for example, with sudo combined with user group
shutdown:
$ groupadd shutdown # add a new group called "shutdown"
$ adduser john shutdown # add user "john" to the "shutdown" group
$ visudo # add the group "shutdown" to sudoers
# add the following:
%shutdown ALL=(root) NOPASSWD: /sbin/shutdown
That's it, now everyone in the shutdown group can do it!
You have to devise a trick, because the strict answer is no. There's “sticky-head” script which partly achives it on the wiki, but it's still incomplete: http://sawfish.wikia.com/wiki/Sticky-head
Technically, Sawfish's workspace implements “virtual desktop” specified in the window manager standard (ewmh), which has to be at least the size of the X screen, so the workspace has to containt all heads. “Per head workspace” has to be implemented as a new mechanism on top of workspace.
Install “unclutter”.
(Current Sawfish community's attitude.)
We can't afford it. We're understaffed.
(Written by John Harper.)
Mainly because I'm lazy; I had already written rep, and therefore understood it completely, whereas I have never used GUILE. Also, rep has some features not available in GUILE (byte-code compilation, autoloading, built-in event-loop, ...)
But before you flame me: yes I do think scheme is a more elegant language.
Possibly. But only if it can be written in Lisp, or doesn't conflict with the overall design aims.
These aims are to build a lightweight, generally applicable, set of core window management functions, then write all high-level functionality as Lisp extensions
No. This can easily be done by a separate application (e.g. with the
GNOME hints, simply monitor property _WIN_WORKSPACE on the root
window).
Sawfish works stably on Solaris, but you may need to do two things:
imlib_config,
the MIT-SHM option is on the ‘Rendering’ page)
Because that window doesn't accept it. Technically, windows ask to receive focus by setting their WM_HINTS property appropriately; for example if I xprop a gnome-terminal:
WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
Initial state is Normal State.
window id # of group leader: 0x5c00001
It seems that there is a problem with these applets that only occurs after restarting Sawfish - they seem to lose track of the current window states.
The simplest way to correct this is to execute the following shell commands:
$ save-session
$ killall panel
(assuming you have a session manager to restart the panel afterwards!)
It means that you're trying to execute Lisp code that was compiled for an outdated version of the Lisp virtual machine. Recompile any Lisp files that you have installed locally.
Because the old name (‘Sawmill’) was already being used by another company, who were in the process of registering it as a trademark.
The rename should be mostly painless, all old binaries still work for the time being, but will be phased out over time (final phasing out started around 1.5.0). Where before you would execute a program called sawmill*, replace it by sawfish*. E.g. sawmill becomes sawfish, and sawmill-client becomes sawfish-client.
Your ~/.sawmill directory will automatically be renamed ~/.sawfish unless it would overwrite an existing file. Only user configuration ~/.sawfish[/]rc will be checked currently, ~/.sawmillrc is not used anymore (it was also read up to version 1.3.5).
My apologies for any inconvenience caused.
Well I had to choose something! And hopefully it satisfies the main requirements:
Incidentally, there was no meaning to the name “Sawmill”, the author grepped /usr/dict/words for something containing “wm”.
accept-x-input: Event Loopactivate-edges: EdgeActionsactivate-flippers: EdgeActionsactivate-window: Activating Windowadd-frame-class: Removing Frame Partsadd-window-matcher: Window Rules by Matchingadd-window-menu-toggle: Popup Definitionsadd-window-to-group: Assigning Windows to Groupsadd-window-to-new-group: Assigning Windows to Groupsall-workspaces: Workspaces and Windowsallow-events: Event Loopapply-command: Invoking Commandsautoload-command: Command Definitionautoload-focus-mode: Input Focusautoload-placement-mode: Window Placementautoload-window-animator: Animating Windowsavoided-windows: Avoided Windowsbevel-image: Imagesbind-keys: Keymapsbrowser: Common Applicationscall-after-property-changed: X Propertiescall-after-state-changed: Frame Typescall-command: Invoking Commandscall-window-hook: Standard Hookscall-with-error-handler: Other Functionscall-with-keyboard-grabbed: Grab Functionscall-with-server-ungrabbed: Grab Functionsclamp: Other Functionsclamp*: Other Functionsclear-image: Imagesclicked-frame-part: Frame Functionscolor-name: Colorscolor-rgb: Colorscolor-rgb-8: Colorscolorp: Colorscommand-class: Operations on Commandscommand-documentation: Operations on Commandscommand-spec: Operations on Commandscommand-type: Operations on Commandscommandp: Operations on Commandscomposite-images: Imagescopy-image: Imagescopy-to-next-workspace: Workspaces and Windowscopy-to-previous-workspace: Workspaces and Windowscopy-window-to-workspace: Workspaces and Windowscreate-flippers: EdgeActionscreate-window: Other Functionscrop-image: Imagescurrent-event: Event Loopcurrent-event-string: Event Loopcurrent-event-window: Event Loopcurrent-head: Multi-head Environmentcurrent-head-dimensions: Multi-head Environmentcurrent-head-offset: Multi-head Environmentcursorp: Cursorscustom-add-option: Defgroup and Defcustomcustom-get-options: Defgroup and Defcustomcustom-load-user-file: Customization Filescustomize: Customizationcycle-among-groups: Dynamic Window Cyclescycle-among-groups-backwards: Dynamic Window Cyclescycle-class: Dynamic Window Cyclescycle-class-backwards: Dynamic Window Cyclescycle-dock: Dynamic Window Cyclescycle-dock-backwards: Dynamic Window Cyclescycle-group: Dynamic Window Cyclescycle-group-backwards: Dynamic Window Cyclescycle-prefix: Dynamic Window Cyclescycle-prefix-backwards: Dynamic Window Cyclescycle-windows: Dynamic Window Cyclescycle-windows-backwards: Dynamic Window Cyclesdef-frame-class: Frame Part Classesdefault-cursor: Cursorsdefcustom: Defgroup and Defcustomdefgroup: Defgroup and Defcustomdefine-command: Command Definitiondefine-command-to-screen: Command Definitiondefine-cycle-command: Dynamic Window Cyclesdefine-cycle-command-pair: Dynamic Window Cyclesdefine-focus-mode: Input Focusdefine-frame-class: Frame Part Classesdefine-frame-type-mapper: Frame Typesdefine-placement-mode: Window Placementdefine-window-animator: Animating Windowsdelete-empty-workspaces: Workspaces and Windowsdelete-window: Destroying Windowsdelete-window-instance: Workspaces and Windowsdelete-window-safely: Destroying Windowsdelete-x-property: X Propertiesdesktop-window-p: Window Typesdestroy-flippers: EdgeActionsdestroy-window: Destroying Windowsdisplay-message: Display Functionsdisplay-window: Activating Windowdisplay-window-position: Window Attributesdock-window-p: Window Typesdouble-window-size: Moving and Resizing Windowsdraw-diagonal-gradient: Gradient Functionsdraw-horizontal-gradient: Gradient Functionsdraw-vertical-gradient: Gradient Functionsdraw-window-outline: Display Functionsedge-action-call: EdgeActionsedge-action-hook-func: EdgeActionsedge-action-move-hook-func: EdgeActionsedge-flip-invoke: EdgeActionserase-window-outline: Display Functionseval-in: Other Functionsevent-match: Event Matchingevent-name: Event Name Representationeventp: Eventsexit-type: Sawfish Invocation Functionsfdo-filter-record: Applications Menu Functionsfilter-windows: Getting Windowsfind-head: Multi-head Environmentflip-image-diagonally: Imagesflip-image-horizontally: Imagesflip-image-vertically: Imagesfocus-pop-map: Input Focusfocus-push-map: Input Focusfont-ascent: Fontsfont-descent: Fontsfont-get: Fontsfont-height: Fontsfont-name: Fontsfont-put: Fontsfont-type: Fontsfont-type-exists-p: Fontsfontp: Fontsforget-button-press: Event Loopframe-class-removed-p: Removing Frame Partsframe-draw-mutex: Frame Functionsframe-part-dimensions: Frame Functionsframe-part-get: Frame Part Definitionframe-part-movable-p: Basic Maximizationsframe-part-position: Frame Functionsframe-part-put: Frame Part Definitionframe-part-state: Frame Part Definitionframe-part-window: Frame Functionsframe-part-x-window: Frame Functionsframe-state-mutex: Frame Functionsframe-type-menu: Frame Typesgenerate-apps-menu: Applications Menu Functionsget-active-border: EdgeActionsget-active-corner: EdgeActionsget-color: Colorsget-color-rgb: Colorsget-cursor: Cursorsget-font: Fontsget-font-typed: Fontsget-window-by-class: Getting Windowsget-window-by-id: Getting Windowsget-window-by-name: Getting Windowsget-window-by-role: Getting Windowsget-window-wm-protocols: Window Attributesget-x-property: X Propertiesget-x-text-property: X Propertiesgrab-keyboard: Grab Functionsgrab-keymap: Keymapsgrab-pointer: Grab Functionsgrab-server: Grab Functionsgrid-from-rectangles: Rectangle Functionsgrow-window-down: Moving and Resizing Windowsgrow-window-left: Moving and Resizing Windowsgrow-window-right: Moving and Resizing Windowsgrow-window-up: Moving and Resizing Windowshalve-window-size: Moving and Resizing Windowshas-randr-p: RandR and Xineramahead-count: Multi-head Environmenthead-dimensions: Multi-head Environmenthead-offset: Multi-head Environmenthide-desktop: Workspaces and Windowshide-window: Showing and Hiding Windowshot-spot-invoke: EdgeActionsiconify-group: Operations on Groupsiconify-transient-group: Operations on Groupsiconify-window: Iconifying Windowsiconify-workspace-windows: Iconifying Windowsimage-border: Imagesimage-dimensions: Imagesimage-fill: Imagesimage-get: Imagesimage-map: Imagesimage-modifier: Imagesimage-put: Imagesimage-ref: Imagesimage-set: Imagesimage-shape-color: Imagesimagep: Imagesindirect-transient-of-p: Window Typesinput-focus: Input Focusinsert-workspace: Workspace Manipulationinsert-workspace-after: Workspace Manipulationinsert-workspace-before: Workspace Manipulationinteractive: Old-style Command Definitionjump-or-exec: Application Invocationkeymapp: Keymapskill-client: Destroying Windowslast-event: Event Looplist-x-properties: X Propertiesload-module: Other Functionslocate-file: Other Functionslookup-event: Event Name Representationlookup-event-binding: Event Looplower-group: Operations on Groupslower-group-depth: Operations on Groupslower-single-window: Raising and Lowering Windowslower-window: Raising and Lowering Windowslower-window*: Raising and Lowering Windowslower-window-and-transients: Window Typeslower-window-depth: Raising and Lowering Windowslower-windows: Raising and Lowering Windowsmake-directory-recursively: Other Functionsmake-group-sticky: Operations on Groupsmake-group-unsticky: Operations on Groupsmake-image: Imagesmake-image-from-x-drawable: Imagesmake-keymap: Keymapsmake-sized-image: Imagesmake-window-ignored: Ignored Windowsmake-window-not-ignored: Ignored Windowsmake-window-sticky: Window Stickinessmake-window-sticky/viewport: Window Stickinessmake-window-sticky/workspace: Window Stickinessmake-window-unsticky: Window Stickinessmake-window-unsticky/viewport: Window Stickinessmake-window-unsticky/workspace: Window Stickinessmanaged-windows: Getting Windowsmap-frame-parts: Frame Functionsmap-other-window-groups: Assigning Windows to Groupsmap-transient-group: Window Typesmap-window-group: Assigning Windows to Groupsmap-window-properties: Window Property Listsmap-window-workspaces: Workspaces and Windowsmap-windows: Getting Windowsmapped-stacking-order: Stacking Ordermark-window-as-desktop: Window Typesmark-window-as-dock: Window Typesmark-window-as-transient: Window Typesmaximize-discard: Unmaximizingmaximize-fill-window: Maximizing Without Overlapmaximize-fill-window-horizontally: Maximizing Without Overlapmaximize-fill-window-horizontally-toggle: Maximizing Without Overlapmaximize-fill-window-toggle: Maximizing Without Overlapmaximize-fill-window-vertically: Maximizing Without Overlapmaximize-fill-window-vertically-toggle: Maximizing Without Overlapmaximize-window: Basic Maximizationsmaximize-window-fullscreen: Maximizing Without Bordersmaximize-window-fullscreen-toggle: Maximizing Without Bordersmaximize-window-fullxinerama: Maximizing Without Bordersmaximize-window-fullxinerama-toggle: Maximizing Without Bordersmaximize-window-horizontally: Basic Maximizationsmaximize-window-horizontally-toggle: Basic Maximizationsmaximize-window-toggle: Basic Maximizationsmaximize-window-vertically: Basic Maximizationsmaximize-window-vertically-toggle: Basic Maximizationsmerge-next-workspace: Workspace Manipulationmerge-previous-workspace: Workspace Manipulationmove-cursor: Pointer Functionsmove-cursor-center: Pointer Functionsmove-cursor-down: Pointer Functionsmove-cursor-down-fine: Pointer Functionsmove-cursor-left: Pointer Functionsmove-cursor-left-fine: Pointer Functionsmove-cursor-northeast: Pointer Functionsmove-cursor-northeast-fine: Pointer Functionsmove-cursor-northwest: Pointer Functionsmove-cursor-northwest-fine: Pointer Functionsmove-cursor-right: Pointer Functionsmove-cursor-right-fine: Pointer Functionsmove-cursor-southeast: Pointer Functionsmove-cursor-southeast-fine: Pointer Functionsmove-cursor-southwest: Pointer Functionsmove-cursor-southwest-fine: Pointer Functionsmove-cursor-up: Pointer Functionsmove-cursor-up-fine: Pointer Functionsmove-group-down: Operations on Groupsmove-group-left: Operations on Groupsmove-group-right: Operations on Groupsmove-group-to-current-viewport: Operations on Groupsmove-group-up: Operations on Groupsmove-group-viewport: Operations on Groupsmove-resize-window-to: Moving and Resizing Windowsmove-selected-window: Moving and Resizing Windowsmove-viewport: Viewport Functionsmove-viewport-to-window: Windows and Viewportsmove-window-center: Moving and Resizing Windowsmove-window-interactively: Moving and Resizing Windowsmove-window-to: Moving and Resizing Windowsmove-window-to-current-viewport: Windows and Viewportsmove-window-to-workspace: Workspaces and Windowsmove-window-viewport: Windows and Viewportsmove-workspace: Workspace Manipulationmove-workspace-backwards: Workspace Manipulationmove-workspace-forwards: Workspace Manipulationnearest-workspace-with-window: Workspaces and Windowsnext-window: Fixed Window Cyclesnext-workspace: Workspace Manipulationnext-workspace-window: Fixed Window Cyclesno-operation: Other Functionspack-window-down: Moving and Resizing Windowspack-window-left: Moving and Resizing Windowspack-window-right: Moving and Resizing Windowspack-window-up: Moving and Resizing Windowsparse-fdo-file: Applications Menu Functionspixmap-cache-control: Imagesplacement-mode: Window Placementpointer-head: Multi-head Environmentpopup-apps-menu: Applications Menu Functionspopup-apps-menu: Ready-made Popupspopup-menu: Popup Definitionspopup-root-menu: Ready-made Popupspopup-window-list-menu: Ready-made Popupspopup-window-menu: Workspaces and Windowspopup-window-ops-menu: Ready-made Popupspopup-workspace-list: Workspace Intervalspoweroff: Sawfish Invocation Functionsprevious-window: Fixed Window Cyclesprevious-workspace: Workspace Manipulationprevious-workspace-window: Fixed Window Cyclesproxy-current-event: Event Loopquery-button-press-pointer: Pointer Functionsquery-button-press-window: Pointer Functionsquery-last-pointer: Pointer Functionsquery-pointer: Pointer Functionsquery-pointer-window: Pointer Functionsquit: Sawfish Invocation Functionsquote-menu-item: Other Functionsraise-and-pass-through-click: Raising and Lowering Windowsraise-and-pass-through-click-if-focused: Raising and Lowering Windowsraise-group: Operations on Groupsraise-group-depth: Operations on Groupsraise-lower-group: Operations on Groupsraise-lower-single-window: Raising and Lowering Windowsraise-lower-window: Raising and Lowering Windowsraise-lower-window*: Raising and Lowering Windowsraise-lower-window-and-transients: Window Typesraise-lower-windows: Raising and Lowering Windowsraise-or-pass-through-click: Raising and Lowering Windowsraise-single-window: Raising and Lowering Windowsraise-window: Raising and Lowering Windowsraise-window*: Raising and Lowering Windowsraise-window-and-transients: Window Typesraise-window-depth: Raising and Lowering Windowsraise-windows: Raising and Lowering Windowsrebuild-frame: Frame Functionsrebuild-frame-part: Frame Functionsrecolor-cursor: Cursorsrecord-window-animator: Animating Windowsrecreate-flippers: EdgeActionsrect-1d-overlap: Rectangle Functionsrect-2d-overlap: Rectangle Functionsrect-2d-overlap*: Rectangle Functionsrect-bottom: Rectangle Functionsrect-left: Rectangle Functionsrect-minus: Rectangle Functionsrect-obscured: Rectangle Functionsrect-right: Rectangle Functionsrect-top: Rectangle Functionsrect-total-overlap: Rectangle Functionsrect-wholly-visible-p: Rectangle Functionsrect-wholly-within-rect: Rectangle Functionsrect-within-head-p: Rectangle Functionsrect-within-viewport-p: Rectangle Functionsrectangle-area: Rectangle Functionsrectangle-center: Rectangle Functionsrectangle-center*: Rectangle Functionsrectangle-corners: Rectangle Functionsrectangle-from-coords: Rectangle Functionsrectangle-heads: Rectangle Functionsrectangle-intersection: Rectangle Functionsrectangle-union: Rectangle Functionsrectangles-from-grid: Rectangle Functionsrectangles-from-windows: Rectangle Functionsrefresh-frame-part: Frame Functionsrefresh-window: Frame Functionsreload-frame-style: Frame Stylesremove-frame-class: Removing Frame Partsremove-window-matcher: Window Rules by Matchingremove-workspace: Workspace Manipulationrename-window: Window Attributesreport-commands: Operations on Commandsresize-selected-window: Moving and Resizing Windowsresize-window-interactively: Moving and Resizing Windowsresize-window-prompt: Moving and Resizing Windowsresize-window-to: Moving and Resizing Windowsresize-window-to-preset-height: Moving and Resizing Windowsresize-window-to-preset-size: Moving and Resizing Windowsresize-window-to-preset-width: Moving and Resizing Windowsresize-window-with-hints: Moving and Resizing Windowsresize-window-with-hints*: Moving and Resizing Windowsrestack-window: Stacking Orderrestack-windows: Stacking Orderrestart: Sawfish Invocation Functionsroot-window-id: Window Attributesrun-shell-command: Other Functionsrun-window-animator: Animating Windowssave-stacking-order: Stacking Orderscale-image: Imagesscreen-dimensions: Display Functionsscreen-height: Display Functionsscreen-viewport: Viewport Functionsscreen-width: Display Functionssearch-keymap: Keymapsselect-window: Input Focusselect-workspace: Workspace Manipulationselect-workspace-and-viewport: Workspace Manipulationselect-workspace-from-first: Workspace Manipulationsend-client-message: Other Functionssend-group-to-current-workspace: Operations on Groupssend-group-to-next-workspace: Operations on Groupssend-group-to-previous-workspace: Operations on Groupssend-group-to-workspace: Operations on Groupssend-to-next-workspace: Workspaces and Windowssend-to-previous-workspace: Workspaces and Windowssend-window-to-workspace-from-first: Workspaces and Windowsserver-grabbed-p: Grab Functionsset-focus-mode: Input Focusset-frame-part-value: Frame Part Classesset-group-frame-style: Operations on Groupsset-image-border: Imagesset-image-modifier: Imagesset-image-shape-color: Imagesset-input-focus: Input Focusset-number-of-viewports: Viewportsset-number-of-workspaces: Workspace Manipulationset-screen-viewport: Viewport Functionsset-viewport: Viewport Functionsset-window-depth: Stacking Orderset-window-frame: Frame Functionsset-window-viewport: Windows and Viewportsset-wm-modifier: Event Modifiersset-x-property: X Propertiesset-x-text-property: X Propertiesshade-window: Shading Windowsshow-desktop: Workspaces and Windowsshow-window: Showing and Hiding Windowsshowing-desktop-p: Workspaces and Windowsshrink-window-down: Moving and Resizing Windowsshrink-window-left: Moving and Resizing Windowsshrink-window-right: Moving and Resizing Windowsshrink-window-up: Moving and Resizing Windowssm-add-restored-properties: Session Managementsm-add-saved-properties: Session Managementstack-window-above: Stacking Orderstack-window-below: Stacking Orderstacking-order: Stacking Orderstacking-order-by-depth: Stacking Orderstacking-visibility: Stacking Visibilitysync-server: Other Functionssynthesize-event: Synthesis of Eventstext-width: Fontstile-image: Imagestoggle-group-sticky: Operations on Groupstoggle-or-exec: Application Invocationtoggle-task-list-skip: Ignored Windowstoggle-window-cycle-skip: Ignored Windowstoggle-window-iconified: Iconifying Windowstoggle-window-ignored: Ignored Windowstoggle-window-list-skip: Ignored Windowstoggle-window-never-focus: Ignored Windowstoggle-window-shade: Shading Windowstoggle-window-shaded: Shading Windowstoggle-window-sticky: Window Stickinesstransient-children: Window Typestransient-group: Window Typestransient-of-p: Window Typestransient-parents: Window Typesunbind-keys: Keymapsungrab-keyboard: Grab Functionsungrab-keymap: Keymapsungrab-pointer: Grab Functionsungrab-server: Grab Functionsuniconify-group: Operations on Groupsuniconify-transient-group: Operations on Groupsuniconify-window: Iconifying Windowsuniquify-list: Other Functionsuniquify-name: Window Attributesuniquify-window-name: Window Attributesunmaximize-window: Unmaximizingunshade-window: Shading Windowsupdate-apps-menu: Applications Menu Functionsupdate-frame-font-color: Frame Stylesuser-eval: Other Functionsuser-require: Other Functionsvariable-customized-p: Customized Variable Statusvariable-declared-p: Customized Variable Statusvariable-default-value: Customized Variable Statusvariable-type: Customized Variable Statusviewport-at: Viewport Functionsviewport-drag: EdgeActionsviewport-honor-workspace-edges: Viewport Functionsviewport-offset-coord: Viewport Functionswarp-cursor: Pointer Functionswarp-cursor-to-window: Pointer Functionswarp-pointer-if-necessary: Input Focuswindow-absolute-position: Windows and Viewportswindow-actual-group-id: Assigning Windows to Groupswindow-appears-in-workspace-p: Workspaces and Windowswindow-avoided-p: Avoided Windowswindow-border-width: Frame Functionswindow-class: Window Attributeswindow-depth: Stacking Orderwindow-dimensions: Window Attributeswindow-frame: Frame Functionswindow-frame-dimensions: Frame Functionswindow-frame-id: Frame Functionswindow-frame-offset: Frame Functionswindow-framed-p: Frame Functionswindow-full-name: Window Attributeswindow-get: Window Property Listswindow-gravity: Moving and Resizing Windowswindow-group-id: Window Groupswindow-group-ids: Window Groupswindow-group-menu: Assigning Windows to Groupswindow-head-any-viewport: Multi-head Environmentwindow-icon-image: Iconifying Windowswindow-icon-name: Iconifying Windowswindow-iconifiable-p: Iconifying Windowswindow-iconified-p: Iconifying Windowswindow-id: Window Attributeswindow-ignored-p: Ignored Windowswindow-in-cycle-p: Input Focuswindow-in-workspace-p: Workspaces and Windowswindow-locked-vertically-p: Basic Maximizationswindow-mapped-p: Window Attributeswindow-maximizable-p: Maximizing Windowswindow-maximized-horizontally-p: Maximizing Windowswindow-maximized-p: Maximizing Windowswindow-maximized-vertically-p: Maximizing Windowswindow-name: Window Attributeswindow-obscured: Stacking Visibilitywindow-on-top-p: Stacking Orderwindow-order: Dynamic Window Cycleswindow-order: Input Focuswindow-order-focus-most-recent: Dynamic Window Cycleswindow-order-focus-most-recent: Input Focuswindow-order-most-recent: Dynamic Window Cycleswindow-order-most-recent: Input Focuswindow-order-pop: Dynamic Window Cycleswindow-order-pop: Input Focuswindow-order-push: Dynamic Window Cycleswindow-order-push: Input Focuswindow-outside-viewport-p: Windows and Viewportswindow-pid: Window Attributeswindow-plist: Window Property Listswindow-position: Window Attributeswindow-put: Window Property Listswindow-really-wants-input-p: Input Focuswindow-really-wants-input-p: Window Attributeswindow-remprop: Window Property Listswindow-role: Window Attributeswindow-shaded-p: Shading Windowswindow-shaped-p: Window Attributeswindow-size-hints: Moving and Resizing Windowswindow-sticky-p: Window Stickinesswindow-sticky-p/viewport: Window Stickinesswindow-sticky-p/workspace: Window Stickinesswindow-supports-wm-protocol-p: Window Attributeswindow-transient-p: Window Typeswindow-type: Frame Typeswindow-type-add-border: Frame Typeswindow-type-add-title: Frame Typeswindow-type-remove-border: Frame Typeswindow-type-remove-title: Frame Typeswindow-unmaximized-dimensions: Unmaximizingwindow-unmaximized-position: Unmaximizingwindow-urgent-p: Window Attributeswindow-viewport: Windows and Viewportswindow-visibility: Stacking Visibilitywindow-visible-p: Showing and Hiding Windowswindow-wants-input-p: Input Focuswindow-wants-input-p: Window Attributeswindowp: Windowswindows-by-group: Assigning Windows to Groupswindows-in-group: Assigning Windows to Groupswindows-share-workspace-p: Workspaces and Windowswith-server-grabbed: Grab Functionswm-modifier: Event Modifiersworkspace-empty-p: Workspaces and Windowsworkspace-id-from-logical: Workspace Intervalsworkspace-id-to-logical: Workspace Intervalsworkspace-limits: Workspace Intervalsworkspace-menu: Workspace Intervalsworkspace-windows: Workspaces and Windowsx-atom: Other Functionsx-atom-name: Other Functionsx-bitmap-p: X Bitmaps and Pixmapsx-change-gc: X Drawingx-change-window-attributes: X Windowsx-clear-window: X Drawingx-configure-window: X Windowsx-copy-area: X Drawingx-create-bitmap: X Bitmaps and Pixmapsx-create-gc: X Drawingx-create-pixmap: X Bitmaps and Pixmapsx-create-root-xor-gc: X Drawingx-create-window: X Windowsx-destroy-drawable: X Bitmaps and Pixmapsx-destroy-gc: X Drawingx-destroy-window: X Windowsx-draw-arc: X Drawingx-draw-image: X Drawingx-draw-line: X Drawingx-draw-rectangle: X Drawingx-draw-string: X Drawingx-draw-text: X Drawingx-drawable-height: X Bitmaps and Pixmapsx-drawable-id: X Bitmaps and Pixmapsx-drawable-p: X Bitmaps and Pixmapsx-drawable-width: X Bitmaps and Pixmapsx-events-queued: Event Loopx-fill-arc: X Drawingx-fill-polygon: X Drawingx-fill-rectangle: X Drawingx-gc-p: X Drawingx-gc-set-dashes: X Drawingx-get-selection: X Selectionsx-grab-image-from-drawable: X Bitmaps and Pixmapsx-keysym-name: X Keysymsx-kill-client: Destroying Windowsx-lookup-keysym: X Keysymsx-lower-window: Raising and Lowering Windowsx-map-window: X Windowsx-pixmap-p: X Bitmaps and Pixmapsx-raise-window: Raising and Lowering Windowsx-selection-active-p: X Selectionsx-server-timestamp: X Serverx-unmap-window: X Windowsx-window-back-buffer: X Drawingx-window-id: X Windowsx-window-p: X Windowsx-window-swap-buffers: X Drawingxterm: Common Applicationsyank-window-down: Moving and Resizing Windowsyank-window-left: Moving and Resizing Windowsyank-window-right: Moving and Resizing Windowsyank-window-up: Moving and Resizing Windows*user-module*: Other Functionsadd-swapped-properties: Workspaces and Windowsadd-to-workspace-hook: Workspace and Viewport Hooksadd-window-hook: Window Construction Hooksafter-add-window-hook: Window Construction Hooksafter-cycle-step-hook: Window Cycling Hooksafter-framing-hook: Window Construction Hooksafter-initialization-hook: Startup and Shutdown Hooksafter-move-hook: Window Motion Hooksafter-resize-hook: Window Motion Hooksafter-restacking-hook: Window Motion Hooksalt-keysyms: Event Modifiersanimator: Standard Propertiesapps-menu: Applications Menu Variablesapps-menu-alphabetize: Applications Menu Variablesapps-menu-associate-categories: Applications Menu Variablesapps-menu-autogen: Applications Menu Variablesapps-menu-filter: Applications Menu Variablesapps-menu-lang: Applications Menu Variablesavoid: Standard Propertiesavoid-by-default: Avoided Windowsbefore-add-window-hook: Window Construction Hooksbefore-exit-hook: Startup and Shutdown Hooksbefore-move-hook: Window Motion Hooksbefore-resize-hook: Window Motion Hooksbefore-slide-hook: Window Motion Hooksbottom-edge-function: EdgeActionsbottom-right-corner-function: EdgeActionsbrowser-program: Common Applicationscanonical-display-name: Other Functionsclient-message-hook: Other Hooksclient-set-position: Standard Propertiesconfigure-notify-hook: X Hooksconfigure-request-hook: X Hookscurrent-frame-style: Standard Propertiescurrent-frame-style: Frame Stylescurrent-prefix-arg: Invoking Commandscurrent-workspace: Workspace Intervalscustom-default-file: Customization Filescustom-user-file: Customization Filescustomize-command-classes: Commandscycle-all-viewports: Dynamic Window Cyclescycle-all-workspaces: Dynamic Window Cyclescycle-include-iconified: Dynamic Window Cyclescycle-raise-windows: Dynamic Window Cyclescycle-show-window-names: Dynamic Window Cyclesdecorate-transients: Window Typesdefault-bevel-percent: Imagesdefault-font: Fontsdefault-foreground: Colorsdefault-window-animator: Animating Windowsdepth: Standard Propertiesdesktop-cat-alist: Applications Menu Variablesdesktop-directory: Applications Menu Variablesdesktop-environment: Common Applicationsdesktop-window-depth: Window Typesdesktop-window-properties: Window Typesdestroy-notify-hook: Window Destruction Hooksdisplay-name: Other Functionsdock-window-depth: Window Typesdock-window-properties: Window Typesdont-avoid-ignored: Avoided Windowsedge-flip-delay: EdgeActionsenter-flipper-hook: Workspace and Viewport Hooksenter-flipper-hook: EdgeActionsenter-frame-part-hook: Pointer Motion Hooksenter-notify-hook: Pointer Motion Hooksenter-workspace-hook: Workspace and Viewport Hookseval-key-release-events: Event Loopeval-modifier-events: Event Loopfixed-position: Standard Propertiesfocus-click-through: Standard Propertiesfocus-click-through: Input Focusfocus-dont-push: Input Focusfocus-in-hook: Pointer Motion Hooksfocus-mode: Input Focusfocus-modes: Input Focusfocus-out-hook: Pointer Motion Hooksfocus-when-mapped: Standard Propertiesfocus-windows-on-uniconify: Iconifying Windowsfocus-windows-when-mapped: Window Typesfocus-within-click-event: Input Focusfonts-are-fontsets: Fontsframe-part-classes: Frame Part Classesframe-style: Standard Propertiesframe-style: Frame Stylesframe-type-fallback-alist: Themesgravity: Standard Propertiesgrow-is-maximize: Moving and Resizing Windowsgrow-pack-bump-ignored: Moving and Resizing Windowsgrow-pack-bump-obscured: Moving and Resizing Windowsgrow-pack-bump-other-depth: Moving and Resizing Windowsgtkrc-changed-hook: Other Hookshide-client: Standard Propertieshot-spot-delay: EdgeActionshot-spots-corner-length: EdgeActionshyper-keysyms: Event Modifiersiconified: Standard Propertiesiconify-group-mode: Iconifying Windowsiconify-ignored: Iconifying Windowsiconify-on-leave: Standard Propertiesiconify-window-hook: Window Mapping Hooksignore-program-position: Standard Propertiesignore-program-positions: Window Placementignored: Standard Propertiesignored: Frame Stylesimage-directory: Imagesimage-load-path: Imageskde-desktop-directories: Applications Menu Variableskeymap: Standard Propertieslast-command: Invoking Commandsleave-flipper-hook: Workspace and Viewport Hooksleave-flipper-hook: EdgeActionsleave-frame-part-hook: Pointer Motion Hooksleave-notify-hook: Pointer Motion Hooksleave-workspace-hook: Workspace and Viewport Hooksleft-edge-function: EdgeActionsleft-right-edge-action: EdgeActionsleft-right-edge-move-action: EdgeActionslock-first-workspace: Workspace Manipulationmap-notify-hook: Window Mapping Hooksmaximize-always-expands: Basic Maximizationsmaximize-avoid-avoided: Maximizing Without Overlapmaximize-ignore-when-filling: Maximizing Without Overlapmaximize-raises: Basic Maximizationsmenu-program: Popup Definitionsmenu-program-stays-running: Ready-made Popupsmenus-include-shortcuts: Ready-made Popupsmeta-keysyms: Event Modifiersmove-cursor-increment: Pointer Functionsmove-lock-when-maximized: Basic Maximizationsmove-outline-mode: Moving and Resizing Windowsmove-show-position: Moving and Resizing Windowsmove-snap-epsilon: Moving and Resizing Windowsmulti-click-delay: Event Actionsnever-focus: Standard Propertiesoverride-frame-part-classes: Frame Part Classespack-warp-pointer: Moving and Resizing Windowsperistent-group-ids: Window Groupsplace-mode: Standard Propertiesplace-transient-mode: Window Placementplace-window-hook: Window Mapping Hooksplace-window-mode: Window Placementplaced: Standard Propertiesplacement-modes: Window Placementplacement-weight: Standard Propertiespointer-motion-threshold: Pointer Functionspost-command-hook: Command Hookspre-command-hook: Command Hooksproperty-notify-hook: X Hooksraise-windows-on-uniconify: Iconifying Windowsraise-windows-when-unshaded: Shading Windowsrandr-change-notify-hook: Screen Change Notificationremove-from-workspace-hook: Workspace and Viewport Hooksremove-window-hook: Startup and Shutdown Hooksremoved-classes: Standard Propertiesreparent-notify-hook: Window Mapping Hooksresize-outline-mode: Moving and Resizing Windowsresize-show-position: Moving and Resizing Windowsright-edge-function: EdgeActionsroot-menu: Popup Definitionssaved-command-line-args: Other Functionssawfish-directory: Sawfish Invocation Functionssawfish-exec-directory: Sawfish Invocation Functionssawfish-lisp-lib-directory: Sawfish Invocation Functionssawfish-locale-directory: Sawfish Invocation Functionssawfish-site-lisp-directory: Sawfish Invocation Functionssawfish-user-lisp-directory: Sawfish Invocation Functionssawfish-version: Sawfish Invocation Functionsscroll-viewport-steps: Viewport Functionsselect-window-cursor-shape: Input Focusshade-window-hook: Window Mapping Hooksshaded: Standard Propertiesshape-notify-hook: Window Mapping Hooksshrink-window-minimum-size: Moving and Resizing Windowssite-theme-directory: Themessm-after-restore-hook: Session Managementsm-after-restore-hook: Startup and Shutdown Hookssm-restore-window-hook: Session Managementsm-restore-window-hook: Startup and Shutdown Hookssm-restored-window-properties: Session Managementsm-save-directory: Session Managementsm-saved-window-properties: Session Managementsm-sloppy-id-matching: Session Managementsm-window-save-functions: Session Managementsm-window-save-functions: Startup and Shutdown Hooksstagger-placement-step: Window Placementsticky: Standard Propertiessticky-viewport: Standard Propertiessuper-keysyms: Event Modifierssystem-theme-directory: Themestheme-load-path: Themestheme-update-interval: Themesthemes-are-gaoled: Themesthis-command: Invoking Commandstop-bottom-edge-action: EdgeActionstop-bottom-edge-move-action: EdgeActionstop-edge-function: EdgeActionstop-left-corner-function: EdgeActionstop-right-corner-function: EdgeActionstype: Standard Propertiesunbound-key-hook: Key Hooksuniconify-group-mode: Iconifying Windowsuniconify-to-current-viewport: Windows and Viewportsuniconify-to-current-workspace: Iconifying Windowsuniconify-window-hook: Window Mapping Hooksuniquify-name-format: Window Attributesunmap-notify-hook: Window Mapping Hooksunshade-selected-windows: Activating Windowunshade-window-hook: Window Mapping Hooksuser-apps-menu: Applications Menu Variablesuser-raise-type: Raising and Lowering Windowsuser-theme-directory: Themesviewport-boundary-mode: Viewport Functionsviewport-dimensions: Viewportsviewport-drag-cursor-distance: EdgeActionsviewport-drag-distance: EdgeActionsviewport-minimum-dimensions: Dynamic Viewportviewport-moved-hook: Workspace and Viewport Hooksviewport-resized-hook: Workspace and Viewport Hooksvisibility-notify-hook: Window Mapping Hookswant-poweroff-menu: Sawfish Invocation Functionswarp-to-window-enabled: Pointer Functionswarp-to-window-offset: Pointer Functionswhile-moving-hook: Window Motion Hookswhile-resizing-hook: Window Motion Hookswindow-depth-change-hook: Window Mapping Hookswindow-maximized-hook: Window Mapping Hookswindow-moved-hook: Window Motion Hookswindow-ops-menu: Popup Definitionswindow-ops-toggle-menu: Popup Definitionswindow-resized-hook: Window Motion Hookswindow-state-change-hook: X Hookswindow-unmaximized-hook: Window Mapping Hookswm-modifier-value: Event Modifiersworkspace-boundary-mode: Workspaces and Windowsworkspace-local-properties: Workspaces and Windowsworkspace-names: Workspace Intervalsworkspace-send-boundary-mode: Workspaces and Windowsworkspace-state-change-hook: Workspace and Viewport Hooksworkspaces: Standard Propertiesxterm-program: Common Applicationsyank-window-minimum-visible: Moving and Resizing Windows