Browse files

Fix last commit.

  • Loading branch information...
Kris Maglione
Kris Maglione committed Jun 12, 2010
1 parent fec393e commit 979a0703064f5f05685ed1f06c0f37e58754b7f9
113 FAQ
@@ -0,0 +1,113 @@
+ wmii 3.10
+@@ If you're reading this file before it's been installed,
+@@ substitute the following directories for their placeholders.
+@@ @DOCDIR@ doc/
+@@ @EXAMPLES@ examples/
+@@ @LOCALCONF@ ~/.wmii or ~/.wmii-hg (if this is a snapshot)
+@@ @ALTDOC@ alternative_wmiircs/
+Frequently Asked Questions
+1. I've just upgraded and something doesn't work.
+If you compiled wmii yourself, please try again from a clean source
+tree. If wmii still fails, try deleting or renaming your old
+configuration files. If this fails, see questions #2.
+2. I've read all of the docs, but I still need help.
+You can get support[1] in the #suckless irc channel on, or
+you can subscribe to the mailing list by sending an email to You can also browse or search the
+mailing list archives[2] at Gmane.
+3. I think I've found a bug.
+You can report bugs at the issue tracker at the Google Code
+project[3]. Please be sure to search for your problem before you
+open a new issue.
+4. How do I get a list of keyboard shortcuts?
+The default keyboard shortcuts are listed in both the wmii(1)
+manpage and in the user guide[4]. You can also get a list of all
+current keyboard shortcuts at any time by selecting 'showkeys' from
+the actions menu (M-a).
+5. How do I customize wmii? How do I change my keyboard shortcuts?
+You can customize wmii by editing its configuration script. If
+you're using the stock wmiirc configuration script, you can add key
+bindings and change your theme by editing @LOCALCONF@/wmiirc_local.
+See @EXAMPLES@/wmiirc_local for more information. You should also be
+sure to read wmii(1) and the user guide[4].
+6. I've heard I can do my configuration in any language?
+While wmii is driven by a sh(1) script by default, it ships with
+configuration scripts in several other languages, and more still are
+available elsewhere on the web. See @ALTDOC@/README for more
+7. I've made some changes to my configuration. How do I reload it?
+You can rerun your wmiirc script from the actions menu at any time.
+If you're running the stock wmiirc, just select wmiirc. If you're
+running the python wmiirc (and haven't moved it to
+@LOCALCONF@/wmiirc), type python/wmiirc, and so on.
+8. How do I restart wmii without killing X?
+You can either run 'exec wmii' from the actions menu or write
+'exec wmii' to the /ctl virtual file.
+9. Why is there space around my terminal windows?
+Your terminal has asked to only be resized in certain increments,
+and there's not enough space for another row. `wmii` is forced to
+compromise and leave blank space around it. If you'd rather wmii to
+ignore the terminal's request, write 'incmode ignore'[5] to the /ctl
+virtual file.
+10. On FreeBSD, using p9p[6], I get an error about not being able to open /dev/fd/7.
+You need to mount fdescfs on /dev/fd. See the BUGS section of rc(1)
+for details.
+11. How do I set a background image?
+This isn't the job of a window manager. You can set the background
+with a third party tool, such as wmsetbg, Esetbg, feh, qiv,
+xsetroot, etc.
+12. How do I enable sequential shortcuts (like in ratpoison)?
+ or How do I use wmii with emacs? The shortcuts collide!
+Some applications make extensive use of the Alt key. The preferred
+solution is to use the Windows, Apple, or Penguin key in its place.
+It's assigned the identifier Mod4 on most systems. Set the
+following in wmiirc_local:
+Alternatively, you can use key chains, so you're required to press a
+certain key combination before wmii accepts its shortcuts:
+ MODKEY=Control-i,
+13. How do I find out the names of keys to define keyboard shorcuts?
+The easiest way is to run wikeyname(1) and type the key you want to
+[4] @DOCDIR@/wmii.pdf
+[5] For more information, see wmii(1).
@@ -10,8 +10,9 @@ DIRS = \
rc \
IFS=', '; \
@@ -47,8 +47,8 @@ Configuration
The configuration of wmii is done by customizing the rc script wmiirc,
which remotely controls the window manager and handles various events.
-The main wmiirc script lives in @CONFPREFIX@/wmii@CONFVERSION@/, while
-wmiirc_local goes in $HOME/.wmii@CONFVERSION@/.
+The main wmiirc script lives in @GLOBALCONF@ while wmiirc_local goes
More advanced versions of wmiirc are provided in python and ruby.
For more information on them, see alternative_wmiircs/README.
@@ -11,7 +11,7 @@ It usually suffices to start the included `wmiirc` script at
wmii startup. Invoking wmii with the flag '-r python/wmiirc',
for instance, will start the python implementation.
Alternatively, if you use a session manager, you can add this
-line to ~/.wmii/wmiirc (which must be executable):
+line to @LOCALCONF@/wmiirc (which must be executable):
wmiir xwrite /ctl spawn python/wmiirc
@@ -5,6 +5,6 @@ This directory contains a Plan 9 based wmiirc script. This script was
traditionally the default wmiirc for wmii, but has been moved for
portability reasons. To run this script, either Plan 9 from User
Space[1] (plan9port for short) or 9base[2] is required. Modifications
-can be placed in $home/.wmii@CONFVERSION@/wmiirc_local.rc, which must
+can be placed in @LOCALCONF@/wmiirc_local.rc, which must
be executable.
@@ -5,7 +5,7 @@ This directory contains a pure Python implementation of
wmiirc. The two included libraries, pyxp and pygmi, are a 9P
client and wmii filesystem utility module, respectively. To
use this library, simply copy the contents of this direcctory
-to ~/.wmii/. To customize it, either modify
+to @LOCALCONF@. To customize it, either modify
directly, or create and store your modifications
there. The latter approach is preferable in that future
modifications to can usually be painlessly
@@ -81,6 +81,8 @@ def __setitem__(self, key, val):
assert '\n' not in key
self.cache[key] = val
if key in self.ctl_types:
+ if self.ctl_types[key][1] is None:
+ raise NotImplementedError('%s: %s is not writable' % (self.ctl_path, key))
val = self.ctl_types[key][1](val)
self.ctl(key, val)
@@ -91,7 +93,7 @@ def get(self, key, default=sentinel):
doesn't exist, a KeyError is raised.
- val = self[key]
+ return self[key]
except KeyError, e:
if default is not self.sentinel:
return default
@@ -165,7 +167,7 @@ class ctl_property(object):
def __init__(self, key):
self.key = key
def __get__(self, dir, cls):
- return dir[self.key]
+ return dir.get(self.key, None)
def __set__(self, dir, val):
dir[self.key] = val
@@ -178,6 +180,9 @@ class toggle_property(ctl_property):
props = {
'on': True,
'off': False,
+ 'toggle': Toggle,
+ 'always': Always,
+ 'never': Never
def __get__(self, dir, cls):
val = dir[self.key]
@@ -234,12 +239,19 @@ class Client(Dir):
below /client.
base_path = '/client'
+ ctl_types = {
+ 'group': (lambda s: int(s, 16), str),
+ 'pid': (int, None),
+ }
+ allow = Dir.ctl_property('allow')
fullscreen = Dir.toggle_property('fullscreen')
+ group = Dir.ctl_property('group')
+ pid = Dir.ctl_property('pid')
+ tags = Dir.ctl_property('tags')
urgent = Dir.toggle_property('urgent')
label = Dir.file_property('label', writable=True)
- tags = Dir.file_property('tags', writable=True)
props = Dir.file_property('props')
def kill(self):
@@ -615,6 +627,8 @@ class Rule(collections.MutableMapping, utf8):
def quotekey(cls, key):
+ if key.endswith('_'):
+ key = key[:-1]
return key.replace('_', '-')
def quotevalue(cls, val):
@@ -752,11 +766,16 @@ def next(self, reverse=False):
def select(self, tag, take_client=None):
def goto(tag):
if take_client:
+ # Make a new instance in case this is Client('sel'),
+ # which would cause problems given 'sel' changes in the
+ # process.
+ client = Client(
sel = Tag('sel').id
- take_client.tags = '+%s' % tag
+ client.tags = '+%s' % tag
wmii['view'] = tag
if tag != sel:
- take_client.tags = '-%s' % sel
+ client.tags = '-%s' % sel
wmii['view'] = tag
@@ -62,7 +62,7 @@ def time(self):
wmii.rules = (
# Apps with system tray icons like to their main windows
# Give them permission.
- (ur'^Pidgin:' dict(allow='+activate')),
+ (ur'^Pidgin:', dict(allow='+activate')),
# MPlayer and VLC don't float by default, but should.
(ur'MPlayer|VLC', dict(floating=True)),
@@ -8,10 +8,9 @@ string interpolation in key bindings, as should be apparent in
the included config.yaml.
In particular, not that there is no need to copy any files to
-~/.wmii-hg or ~/.wmii other than config.yaml. The script will
-happily load the requisite files from their default install
-location. They can be loaded either by involing wmii as
+@LOCALCONF@ other than config.yaml. The script will happily load
+the requisite files from their default install location. They
+can be loaded either by involing wmii as follows:
wmiir -r ruby/wmiirc
@@ -51,11 +50,11 @@ Installation:
gem install librmpd # optional
# install
- mv ~/.wmii-hg ~/.wmii-hg.backup
- git clone git:// ~/.wmii-hg
+ git clone git:// @LOCALCONF@
# choose
- cd ~/.wmii-hg
git checkout --track -b CHOICE origin/CHOICE # choices are:
@@ -68,21 +67,21 @@ Installation:
# run
- ~/.wmii-hg/wmiirc
+ @LOCALCONF@/wmiirc
# see list of all key bindings
- egrep '^ +\$\{\w+\}' ~/.wmii-hg/config.yaml
+ egrep '^ +\$\{\w+\}' @LOCALCONF@/config.yaml
# read the configuration file
- less ~/.wmii-hg/config.yaml
+ less @LOCALCONF@/config.yaml
- Edit ~/.wmii-hg/config.yaml to your liking.
+ Edit @LOCALCONF@/config.yaml to your liking.
- Run ~/.wmii-hg/wmiirc to apply your changes.
+ Run @LOCALCONF@/wmiirc to apply your changes.
@@ -5,6 +5,7 @@ include $(ROOT)/mk/
wmiir.c: $(ROOT)/mk/
DIRS = wmii \
+ keyname \
menu \
strut \
@@ -0,0 +1,15 @@
+ROOT= ../..
+include $(ROOT)/mk/
+include $(ROOT)/mk/
+main.c: $(ROOT)/mk/
+TARG = wikeyname
+LIB = $(LIBS9)
+OBJ = main
+include $(ROOT)/mk/
Oops, something went wrong.

0 comments on commit 979a070

Please sign in to comment.