| |||||
home move-viewport EsperantÒC iPerl make.pl Opera utilities |
This
patch to sawfish allows it to interactively scroll the workspace by moving the
viewport, not only by a screenfull as before, but by quarter screenfulls or
even any distance you specify. This makes it intuitively clearer that a
viewport is only a means of looking at a workspace which is potentially much
larger than the screen.
The screenshot shows a pager, i.e. a map, of a 2x3 workspace. While before you could only see one of those six gridded cells, now you can move your viewport anywhere. The light viewport would be useful for seeing the active window, which is positioned across four normal viewports. You achieve that by preceding the call to the viewport moving functions with an emacs-style prefix argument. This is a feature that sawfish has long had, but it lacked commands to enable you to set it. This patch adds four kinds of commands for that:
Downloadmove-viewport.patch.gz (2kB)move-viewport.tar.gz (whole files, 10kB) InstallationGo to the right spot:cd sawfish-1.0.1-build-directory configure # unless you already haveUnpack the archive with: gzip -dc path-to-this-file/move-viewport.patch.gz | patch -p1Build it: makeInstall it as root: make install Private InstallationThis is instead of the above. Go to the right spot:cd ~/.sawfishUnpack the archive with one of: tar xzf move-viewport.tar.gz gzip -dc move-viewport.tar.gz | tar xf -Originally not, but as of sawfish 1.0.1 I had problems with this latter procedure. Sawfish stubbornly continued loading the standard commands.jlc. That might have been due to something unrelated? ActivationYou can use the GUI to assign the functions you see below to key-combinations of your liking.Or, in your resource file you could add something like: (require 'sawfish.wm.commands) (bind-keys global-keymap "W-Left" 'move-viewport-left "W-Right" 'move-viewport-right "W-Up" 'move-viewport-up "W-Down" 'move-viewport-down "W-p" 'set-prefix-arg "W-0" 'numeric-arg "W-1" 'numeric-arg "W-2" 'numeric-arg "W-3" 'numeric-arg "W-4" 'numeric-arg "W-5" 'numeric-arg "W-6" 'numeric-arg "W-7" 'numeric-arg "W-8" 'numeric-arg "W-9" 'numeric-arg "W--" 'negative-arg "W-u" 'universal-arg)Or you may just want to put the prefix commands on a menu: (rplacd (cdr root-menu) `(("Prefix Arg" set-prefix-arg) ("Universal Arg" universal-arg) ,@(cddr root-menu)))The configuration proposed above binds quite a few key-combinations to your window-manager modifier key. If that is set to something like meta, then the above will steal useful key-combinations from applications (emacs uses these). You should set keys that you won't miss elsewhere, and the numeric-args must end in a digit. Programming AdviceThere are four ways of passing a number to a command as shown by the following spec letters:
| ||||
(Last modified 2002-09-09)
|