XMonad Overriding xmodmap?

I am trying to swap my Left Alt with the Left Windows key. It works fine using this .Xmodmap
remove Mod1 = Alt_L
remove Mod4 = Super_L
keysym Super_L = Alt_L
keysym Alt_L = Super_L
add Mod1 = Super_L
add Mod4 = Alt_L
clear Lock
add Control = Caps_Lock
then I added "xmodmap ~/.Xmodmap" to my .xinitrc. Using just xmodmap and xev I can confirm that the keys have indeed been swapped. The problem occurs when I launch Xmonad.
Here is my xmodmap before Xmonad
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock
control Control_L (0x25), Control_R (0x6d), Caps_Lock (0x42)
mod1 Super_L (0x40), Alt_R (0x71), Meta_L (0x9c), Super_L (0x7d)
mod2 Num_Lock (0x4d)
mod3
mod4 Alt_L (0x73), Super_R (0x74), Alt_L (0x7f), Hyper_L (0x80)
mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c)
and then directly after
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x6d)
mod1 Alt_L (0x40), Alt_R (0x71), Meta_L (0x9c)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x73), Super_R (0x74), Super_L (0x7f), Hyper_L (0x80)
mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c)
No matter what commands I use, xmodmap always stays the same after XMonad has been launched. I'm not sure if there is something I'm missing but I can't seem to swap the keys. If anyone has experience with this, it would be much obliged.

moljac024 wrote:Are you saying that it works if you run in when XMonad has already started ?
No, sorry that I didn't make that clearer but it does not work even if I run it while XMonad has been started.
But strangely, if I do this
xmodmap ~/.Xmodmap; xmodmap; sleep 3; xmodmap
The first plain "xmodmap" shows that the keys have all been switched according to my .Xmodmap config file. The second xmodmap, after waiting three seconds, shows that all of the keys have been changed back as if I hadn't even ran xmodmap.
Last edited by Angle (2009-07-23 14:02:01)

Similar Messages

  • [SOLVED] xmodmap hangs and crashes after update

    UPDATE: See pabloc's post for a solution. keyboard plugin of gnome-settings-daemon was overriding Xmodmap bindings.
    After a pacman -Syu today, ~/.Xmodmap is no longer being loaded on login. Running `xmodmap ~/.Xmodmap` in a terminal window causes the entire DE (Cinnamon) to freeze, and it fixes itself after a minute or so (terminal window closes).
    Here is my ~/.xinitrc
    #!/bin/sh
    if [ -f $HOME/.Xmodmap ]; then
        /usr/bin/xmodmap $HOME/.Xmodmap
    fi
    exec gnome-session-cinnamon
    I haven't modified ~/.Xmodmap recently, and it was working fine prior to the update. The only modifications are swapping of the PgUp/PgDn keys with Home/End because ThinkPads have them in a weird spot.
    Here are my pacman.log entries from today:
    [2012-10-31 14:09] Running 'pacman -Sy'
    [2012-10-31 14:09] synchronizing package lists
    [2012-10-31 14:10] Running 'pacman -S -u'
    [2012-10-31 14:10] starting full system upgrade
    [2012-10-31 14:25] removed python-mechanize (0.2.5-2)
    [2012-10-31 14:25] removed python-imaging (1.1.7-4)
    [2012-10-31 14:25] removed libwebkit3 (1.8.3-1)
    [2012-10-31 14:25] removed libwebkit (1.8.3-1)
    [2012-10-31 14:25] upgraded glib2 (2.32.4-1 -> 2.34.1-1)
    [2012-10-31 14:25] upgraded at-spi2-core (2.4.2-1 -> 2.6.1-1)
    [2012-10-31 14:25] upgraded atk (2.4.0-1 -> 2.6.0-1)
    [2012-10-31 14:25] upgraded dconf (0.12.1-2 -> 0.14.0-1)
    [2012-10-31 14:25] upgraded at-spi2-atk (2.4.0-1 -> 2.6.1-1)
    [2012-10-31 14:25] upgraded linux-api-headers (3.5.5-1 -> 3.6.3-1)
    [2012-10-31 14:25] upgraded tzdata (2012f-1 -> 2012h-1)
    [2012-10-31 14:25] Generating locales...
    [2012-10-31 14:25]   en_CA.UTF-8... done
    [2012-10-31 14:25] Generation complete.
    [2012-10-31 14:25] upgraded glibc (2.16.0-4 -> 2.16.0-5)
    [2012-10-31 14:25] upgraded binutils (2.22-10 -> 2.23-1)
    [2012-10-31 14:25] upgraded bison (2.6.2-1 -> 2.6.4-1)
    [2012-10-31 14:25] upgraded libpng (1.5.12-1 -> 1.5.13-1)
    [2012-10-31 14:25] upgraded cairo (1.12.2-3 -> 1.12.6-2)
    [2012-10-31 14:25] upgraded python2-cssutils (0.9.9-2 -> 0.9.9-3)
    [2012-10-31 14:25] upgraded python2-cherrypy (3.2.2-1 -> 3.2.2-2)
    [2012-10-31 14:25] installed python2-mechanize (0.2.5-3)
    [2012-10-31 14:25] upgraded pam (1.1.5-4 -> 1.1.6-1)
    [2012-10-31 14:25] upgraded coreutils (8.19-1 -> 8.20-1)
    [2012-10-31 14:25] upgraded perl (5.16.1-1 -> 5.16.1-2)
    [2012-10-31 14:25] upgraded imagemagick (6.7.9.8-2 -> 6.8.0.3-1)
    [2012-10-31 14:25] upgraded gcc-libs (4.7.2-1 -> 4.7.2-2)
    [2012-10-31 14:25] upgraded poppler (0.20.3-1 -> 0.20.5-1)
    [2012-10-31 14:25] upgraded poppler-qt (0.20.3-1 -> 0.20.5-1)
    [2012-10-31 14:25] upgraded python2-lxml (2.3.5-1 -> 3.0.1-1)
    [2012-10-31 14:25] installed python2-imaging (1.1.7-5)
    [2012-10-31 14:25] upgraded sip (4.13.3-2 -> 4.14-2)
    [2012-10-31 14:25] upgraded python2-sip (4.13.3-2 -> 4.14-2)
    [2012-10-31 14:25] upgraded python-dbus-common (1.1.1-1 -> 1.1.1-2)
    [2012-10-31 14:25] upgraded python2-dbus (1.1.1-1 -> 1.1.1-2)
    [2012-10-31 14:25] upgraded pyqt-common (4.9.4-2 -> 4.9.5-3)
    [2012-10-31 14:25] upgraded python2-pyqt (4.9.4-2 -> 4.9.5-3)
    [2012-10-31 14:25] upgraded python2-psutil (0.6.1-1 -> 0.6.1-2)
    [2012-10-31 14:25] installed python2-cssselect (0.7.1-2)
    [2012-10-31 14:25] upgraded calibre (0.9.2-1 -> 0.9.4-2)
    [2012-10-31 14:25] Fontconfig warning: "/etc/fonts/conf.d/53-monospace-lcd-filter.conf", line 10: Having multiple values in <test> isn't supported and may not works as expected
    [2012-10-31 14:26] upgraded cantarell-fonts (0.0.10-1 -> 0.0.10.1-1)
    [2012-10-31 14:26] installed harfbuzz (0.9.5-1)
    [2012-10-31 14:26] upgraded pango (1.30.1-1 -> 1.32.1-1)
    [2012-10-31 14:26] upgraded kmod (10-1 -> 10-2)
    [2012-10-31 14:26] upgraded hwids (20120922-1 -> 20121022-1)
    [2012-10-31 14:26] upgraded util-linux (2.22-7 -> 2.22.1-2)
    [2012-10-31 14:26] ==> journald now writes to /var/log/journal by default. This can be
    [2012-10-31 14:26]     controlled with the Storage setting in /etc/systemd/journald.conf
    [2012-10-31 14:26] upgraded systemd (194-3 -> 195-2)
    [2012-10-31 14:26] upgraded polkit (0.105-1 -> 0.107-4)
    [2012-10-31 14:26] upgraded colord (0.1.21-2 -> 0.1.24-1)
    [2012-10-31 14:26] upgraded gtk3 (3.4.4-1 -> 3.6.1-1)
    [2012-10-31 14:26] installed gstreamer (1.0.2-1)
    [2012-10-31 14:26] installed gst-plugins-base-libs (1.0.2-1)
    [2012-10-31 14:26] installed chromaprint (0.7-1)
    [2012-10-31 14:26] installed mpg123 (1.14.4-1)
    [2012-10-31 14:26] installed celt (0.11.1-4)
    [2012-10-31 14:26] installed spandsp (0.0.6pre21-1)
    [2012-10-31 14:26] installed gst-plugins-bad (1.0.2-1)
    [2012-10-31 14:26] installed gst-plugins-base (1.0.2-1)
    [2012-10-31 14:26] upgraded gsettings-desktop-schemas (3.4.2-1 -> 3.6.0-1)
    [2012-10-31 14:26] upgraded libtasn1 (2.14-1 -> 3.0-1)
    [2012-10-31 14:26] upgraded gnutls (3.1.3-1 -> 3.1.3-2)
    [2012-10-31 14:26] upgraded glib-networking (2.32.3-1 -> 2.34.0-1)
    [2012-10-31 14:26] upgraded libsoup (2.38.1-1 -> 2.40.1-1)
    [2012-10-31 14:26] upgraded gdk-pixbuf2 (2.26.3-1 -> 2.26.4-1)
    [2012-10-31 14:26] installed gst-plugins-good (1.0.2-1)
    [2012-10-31 14:26] upgraded json-glib (0.14.2-1 -> 0.15.2-1)
    [2012-10-31 14:26] upgraded clutter (1.10.6-1 -> 1.12.2-1)
    [2012-10-31 14:26] upgraded clutter-gst (1.6.0-1 -> 1.9.92-1)
    [2012-10-31 14:26] upgraded clutter-gtk (1.2.0-1 -> 1.4.0-1)
    [2012-10-31 14:26] upgraded tdb (1.2.9-2 -> 1.2.10-1)
    [2012-10-31 14:26] upgraded libcanberra (0.28-5 -> 0.30-1)
    [2012-10-31 14:26] upgraded libgee (0.6.5-1 -> 0.6.6-1)
    [2012-10-31 14:26] upgraded gnome-video-effects (0.4.0-1 -> 0.4.0-2)
    [2012-10-31 14:26] upgraded libcroco (0.6.5-1 -> 0.6.8-1)
    [2012-10-31 14:26] upgraded librsvg (2.36.3-1 -> 2.36.4-1)
    [2012-10-31 14:26] upgraded gnome-desktop (1:3.4.2-1 -> 1:3.6.1-1)
    [2012-10-31 14:26] upgraded cheese (3.4.2-1 -> 3.6.1-1)
    [2012-10-31 14:26] upgraded libwbclient (3.6.8-1 -> 3.6.9-1)
    [2012-10-31 14:26] upgraded cifs-utils (5.6-2 -> 5.7-1)
    [2012-10-31 14:26] upgraded device-mapper (2.02.97-1 -> 2.02.98-1)
    [2012-10-31 14:26] upgraded cryptsetup (1.5.0-2 -> 1.5.1-1)
    [2012-10-31 14:26] upgraded cups-pk-helper (0.2.2-1 -> 0.2.4-1)
    [2012-10-31 14:26] upgraded python2-xdg (0.23-1 -> 0.23-2)
    [2012-10-31 14:26] upgraded libtorrent-rasterbar (1:0.16.3-1 -> 1:0.16.5-1)
    [2012-10-31 14:26] upgraded python2-crypto (2.6-2 -> 2.6-3)
    [2012-10-31 14:26] upgraded python2-zope-interface (3.8.0-1 -> 4.0.1-1)
    [2012-10-31 14:26] upgraded twisted (12.2.0-1 -> 12.2.0-2)
    [2012-10-31 14:26] upgraded python2-pyopenssl (0.13-1 -> 0.13-2)
    [2012-10-31 14:26] upgraded xdg-utils (1.1.0-2.20120520 -> 1.1.0.git20121008-1)
    [2012-10-31 14:26] upgraded python2-chardet (2.0.1-5 -> 2.0.1-6)
    [2012-10-31 14:26] upgraded python2-distribute (0.6.28-1 -> 0.6.29-1)
    [2012-10-31 14:26] upgraded deluge (1.3.5-1 -> 1.3.5-3)
    [2012-10-31 14:26] upgraded e2fsprogs (1.42.5-1 -> 1.42.6-1)
    [2012-10-31 14:26] upgraded libgnome-keyring (3.4.1-1 -> 3.6.0-1)
    [2012-10-31 14:26] upgraded libsoup-gnome (2.38.1-1 -> 2.40.1-1)
    [2012-10-31 14:26] installed webkitgtk3 (1.10.1-1)
    [2012-10-31 14:26] upgraded nspr (4.9.2-1 -> 4.9.3-1)
    [2012-10-31 14:26] upgraded nss (3.13.6-1 -> 3.14-1)
    [2012-10-31 14:26] upgraded gobject-introspection (1.32.1-2 -> 1.34.1.1-1)
    [2012-10-31 14:26] upgraded gcr (3.4.1-1 -> 3.6.1-1)
    [2012-10-31 14:26] upgraded epiphany (3.4.3-1 -> 3.6.1-1)
    [2012-10-31 14:26] upgraded ethtool (1:3.5-1 -> 1:3.6-1)
    [2012-10-31 14:26] upgraded poppler-glib (0.20.3-1 -> 0.20.5-1)
    [2012-10-31 14:27] upgraded gnome-icon-theme-symbolic (3.4.0-1 -> 3.6.0-1)
    [2012-10-31 14:27] upgraded gnome-icon-theme (3.4.0-1 -> 3.6.0-1)
    [2012-10-31 14:27] upgraded evince (3.4.0-1 -> 3.6.1-1)
    [2012-10-31 14:27] upgraded rest (0.7.12-1 -> 0.7.90-1)
    [2012-10-31 14:27] installed libsecret (0.10-1)
    [2012-10-31 14:27] upgraded gnome-online-accounts (3.4.2-1 -> 3.6.0-1)
    [2012-10-31 14:27] upgraded libgweather (3.4.1-1 -> 3.6.0-1)
    [2012-10-31 14:27] upgraded libgdata (0.12.0-1 -> 0.13.2-1)
    [2012-10-31 14:27] upgraded evolution-data-server (3.4.4-1 -> 3.6.1-1)
    [2012-10-31 14:27] upgraded libnice (0.1.2-1 -> 0.1.3-1)
    [2012-10-31 14:27] upgraded farstream (0.1.2-1 -> 0.2.1-1)
    [2012-10-31 14:27] upgraded file-roller (3.4.2-1 -> 3.6.1.1-1)
    [2012-10-31 14:27] installed nss-myhostname (0.3-3)
    [2012-10-31 14:27] warning: /etc/shadow installed as /etc/shadow.pacnew
    [2012-10-31 14:27] upgraded filesystem (2012.10-1 -> 2012.10-2)
    [2012-10-31 14:27] upgraded firefox (16.0.1-1 -> 16.0.2-1)
    [2012-10-31 14:27] upgraded telepathy-glib (0.18.2-1 -> 0.20.0-1)
    [2012-10-31 14:27] installed libzeitgeist (0.3.18-3)
    [2012-10-31 14:27] upgraded folks (0.6.9-2 -> 0.8.0-1)
    [2012-10-31 14:27] upgraded gcc (4.7.2-1 -> 4.7.2-2)
    [2012-10-31 14:27] upgraded gconf (3.2.5-2 -> 3.2.5-3)
    [2012-10-31 14:27] upgraded gegl (0.2.0-4 -> 0.2.0-5)
    [2012-10-31 14:27] upgraded git (1.7.12.3-1 -> 1.8.0-1)
    [2012-10-31 14:27] upgraded gjs (1.32.0-2 -> 1.34.0-1)
    [2012-10-31 14:27] upgraded glibmm (2.32.1-1 -> 2.34.0-1)
    [2012-10-31 14:27] upgraded gnome-backgrounds (3.4.2-1 -> 3.6.0-1)
    [2012-10-31 14:27] upgraded udisks2 (1.94.0-2 -> 2.0.0-1)
    [2012-10-31 14:27] upgraded gvfs (1.12.3-3 -> 1.14.0-1)
    [2012-10-31 14:27] upgraded obex-data-server (0.4.6-2 -> 0.4.6-3)
    [2012-10-31 14:27] upgraded gvfs-obexftp (1.12.3-3 -> 1.14.0-1)
    [2012-10-31 14:27] upgraded gnome-bluetooth (3.4.2-1 -> 3.6.0-2)
    [2012-10-31 14:27] upgraded gnome-common (3.4.0.1-2 -> 3.6.0-1)
    [2012-10-31 14:27] upgraded pygobject-devel (3.2.2-1 -> 3.4.1.1-1)
    [2012-10-31 14:27] upgraded python2-gobject (3.2.2-1 -> 3.4.1.1-1)
    [2012-10-31 14:27] upgraded gnome-menus (3.4.2-1 -> 3.6.0-1)
    [2012-10-31 14:27] upgraded libcanberra-pulse (0.28-5 -> 0.30-1)
    [2012-10-31 14:27] installed ibus (1.4.99.20121006-1)
    [2012-10-31 14:27] upgraded gnome-settings-daemon (3.4.2-1 -> 3.6.1-2)
    [2012-10-31 14:27] installed iptables (1.4.16.2-1)
    [2012-10-31 14:27] upgraded iproute2 (3.5.1-1 -> 3.6.0-2)
    [2012-10-31 14:27] upgraded wpa_supplicant (1.0-1 -> 1.0-2)
    [2012-10-31 14:27] upgraded ppp (2.4.5-4 -> 2.4.5-5)
    [2012-10-31 14:27] installed net-tools (1.60.20120804git-2)
    [2012-10-31 14:27] installed dhclient (4.2.4.1-3)
    [2012-10-31 14:27] upgraded networkmanager (0.9.6.0-2 -> 0.9.6.4-1)
    [2012-10-31 14:27] upgraded network-manager-applet (0.9.6.2-1 -> 0.9.6.4-1)
    [2012-10-31 14:27] installed libpwquality (1.2.0-1)
    [2012-10-31 14:27] warning: directory permissions differ on usr/share/polkit-1/rules.d/
    filesystem: 700  package: 755
    [2012-10-31 14:27] upgraded gnome-control-center (3.4.2-1 -> 3.6.2-1)
    [2012-10-31 14:27] upgraded gnome-keyring (3.4.1-3 -> 3.6.1-1)
    [2012-10-31 14:28] upgraded gnome-panel (3.4.2.1-1 -> 3.6.0-1)
    [2012-10-31 14:28] upgraded libxklavier (5.2.1-2 -> 5.3-1)
    [2012-10-31 14:28] upgraded libgnomekbd (3.4.0.2-1 -> 3.6.0-1)
    [2012-10-31 14:28] upgraded gnome-screensaver (3.4.4-1 -> 3.6.1-1)
    [2012-10-31 14:28] upgraded gnome-session (3.4.2-3 -> 3.6.1-1)
    [2012-10-31 14:28] upgraded zenity (3.4.0-1 -> 3.6.0-1)
    [2012-10-31 14:28] upgraded mutter (3.4.1-2 -> 3.6.1-2)
    [2012-10-31 14:28] upgraded libtracker-sparql (0.14.2-1 -> 0.14.3-1)
    [2012-10-31 14:28] upgraded nautilus (3.4.2-1 -> 3.6.2-1)
    [2012-10-31 14:28] upgraded telepathy-logger (0.4.0-1 -> 0.6.0-1)
    [2012-10-31 14:28] upgraded telepathy-mission-control (5.12.1-1 -> 5.14.0-1)
    [2012-10-31 14:28] upgraded gnome-shell (3.4.2-1 -> 3.6.1-2)
    [2012-10-31 14:28] upgraded gtkmm3 (3.4.1-1 -> 3.6.0-1)
    [2012-10-31 14:28] upgraded gnome-system-monitor (3.4.1-1 -> 3.6.0-1)
    [2012-10-31 14:28] upgraded vte-common (0.32.2-1 -> 0.34.1-1)
    [2012-10-31 14:28] upgraded vte3 (0.32.2-1 -> 0.34.1-1)
    [2012-10-31 14:28] upgraded gnome-terminal (3.4.1.1-1 -> 3.6.0-1)
    [2012-10-31 14:28] upgraded gnome-themes-standard (3.4.2-1 -> 3.6.1-1)
    [2012-10-31 14:28] upgraded yelp-xsl (3.4.2-1 -> 3.6.0-1)
    [2012-10-31 14:28] upgraded yelp (3.4.2-1 -> 3.6.1-1)
    [2012-10-31 14:28] upgraded gnome-user-docs (3.4.2-1 -> 3.6.0-1)
    [2012-10-31 14:28] upgraded gpm (1.20.6-10 -> 1.20.7-1)
    [2012-10-31 14:28] upgraded smbclient (3.6.8-1 -> 3.6.9-1)
    [2012-10-31 14:28] upgraded gvfs-smb (1.12.3-3 -> 1.14.0-1)
    [2012-10-31 14:28] upgraded ilmbase (1.0.2-1 -> 1.0.3-1)
    [2012-10-31 14:28] upgraded inkscape (0.48.3.1-5 -> 0.48.3.1-7)
    [2012-10-31 14:28] upgraded iputils (20101006-7 -> 20121011-1)
    [2012-10-31 14:28] upgraded jre7-openjdk-headless (7.u7_2.3.2-2 -> 7.u9_2.3.3-1)
    [2012-10-31 14:28] upgraded jre7-openjdk (7.u7_2.3.2-2 -> 7.u9_2.3.3-1)
    [2012-10-31 14:28] upgraded jdk7-openjdk (7.u7_2.3.2-2 -> 7.u9_2.3.3-1)
    [2012-10-31 14:28] upgraded openexr (1.7.1-1 -> 1.7.1-2)
    [2012-10-31 14:28] upgraded phonon (1:4.6.0-2 -> 1:4.6.0-3)
    [2012-10-31 14:28] upgraded kdelibs (4.9.2-2 -> 4.9.2-3)
    [2012-10-31 14:28] upgraded ldns (1.6.13-1 -> 1.6.14-1)
    [2012-10-31 14:28] upgraded lib32-atk (2.4.0-1 -> 2.6.0-1)
    [2012-10-31 14:28] upgraded lib32-glibc (2.16.0-4 -> 2.16.0-5)
    [2012-10-31 14:28] upgraded lib32-util-linux (2.22-1 -> 2.22.1-1)
    [2012-10-31 14:28] upgraded lib32-e2fsprogs (1.42.4-1 -> 1.42.6-1)
    [2012-10-31 14:28] upgraded lib32-gcc-libs (4.7.2-1 -> 4.7.2-2)
    [2012-10-31 14:28] upgraded lib32-libpng (1.5.12-1 -> 1.5.13-1)
    [2012-10-31 14:28] upgraded libpurple (2.10.6-1 -> 2.10.6-2)
    [2012-10-31 14:29] upgraded libreoffice-en-US (3.6.2-2 -> 3.6.2-3)
    [2012-10-31 14:29] upgraded libreoffice-common (3.6.2-2 -> 3.6.2-3)
    [2012-10-31 14:29] upgraded libreoffice-base (3.6.2-2 -> 3.6.2-3)
    [2012-10-31 14:29] upgraded libreoffice-calc (3.6.2-2 -> 3.6.2-3)
    [2012-10-31 14:29] upgraded libreoffice-draw (3.6.2-2 -> 3.6.2-3)
    [2012-10-31 14:29] upgraded libreoffice-gnome (3.6.2-2 -> 3.6.2-3)
    [2012-10-31 14:29] upgraded libreoffice-impress (3.6.2-2 -> 3.6.2-3)
    [2012-10-31 14:29] upgraded libreoffice-kde4 (3.6.2-2 -> 3.6.2-3)
    [2012-10-31 14:29] upgraded libreoffice-math (3.6.2-2 -> 3.6.2-3)
    [2012-10-31 14:29] upgraded postgresql-libs (9.2.1-1 -> 9.2.1-2)
    [2012-10-31 14:29] upgraded libreoffice-postgresql-connector (3.6.2-2 -> 3.6.2-3)
    [2012-10-31 14:29] upgraded libreoffice-sdk (3.6.2-2 -> 3.6.2-3)
    [2012-10-31 14:29] upgraded libreoffice-sdk-doc (3.6.2-2 -> 3.6.2-3)
    [2012-10-31 14:29] upgraded libreoffice-writer (3.6.2-2 -> 3.6.2-3)
    [2012-10-31 14:29] installed webkitgtk2 (1.10.1-1)
    [2012-10-31 14:29] upgraded mkinitcpio (0.10-1 -> 0.11.0-1)
    [2012-10-31 14:30] >>> Updating module dependencies. Please wait ...
    [2012-10-31 14:30] >>> Generating initial ramdisk, using mkinitcpio.  Please wait...
    [2012-10-31 14:30] ==> Building image from preset: 'default'
    [2012-10-31 14:30]   -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
    [2012-10-31 14:30] ==> Starting build: 3.6.4-1-ARCH
    [2012-10-31 14:30]   -> Running build hook: [base]
    [2012-10-31 14:30]   -> Running build hook: [udev]
    [2012-10-31 14:30]   -> Running build hook: [autodetect]
    [2012-10-31 14:30]   -> Running build hook: [pata]
    [2012-10-31 14:30]   -> Running build hook: [scsi]
    [2012-10-31 14:30]   -> Running build hook: [sata]
    [2012-10-31 14:30]   -> Running build hook: [filesystems]
    [2012-10-31 14:30]   -> Running build hook: [usbinput]
    [2012-10-31 14:30]   -> Running build hook: [fsck]
    [2012-10-31 14:30] ==> Generating module dependencies
    [2012-10-31 14:30] ==> Creating gzip initcpio image: /boot/initramfs-linux.img
    [2012-10-31 14:30] ==> Image generation successful
    [2012-10-31 14:30] ==> Building image from preset: 'fallback'
    [2012-10-31 14:30]   -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
    [2012-10-31 14:30] ==> Starting build: 3.6.4-1-ARCH
    [2012-10-31 14:30]   -> Running build hook: [base]
    [2012-10-31 14:30]   -> Running build hook: [udev]
    [2012-10-31 14:30]   -> Running build hook: [pata]
    [2012-10-31 14:30]   -> Running build hook: [scsi]
    [2012-10-31 14:30]   -> Running build hook: [sata]
    [2012-10-31 14:30]   -> Running build hook: [filesystems]
    [2012-10-31 14:30]   -> Running build hook: [usbinput]
    [2012-10-31 14:30]   -> Running build hook: [fsck]
    [2012-10-31 14:30] ==> Generating module dependencies
    [2012-10-31 14:30] ==> Creating gzip initcpio image: /boot/initramfs-linux-fallback.img
    [2012-10-31 14:30] ==> Image generation successful
    [2012-10-31 14:30] upgraded linux (3.5.6-1 -> 3.6.4-1)
    [2012-10-31 14:30] upgraded linux-headers (3.5.6-1 -> 3.6.4-1)
    [2012-10-31 14:30] upgraded lvm2 (2.02.97-1 -> 2.02.98-1)
    [2012-10-31 14:30] upgraded man-pages (3.42-1 -> 3.43-1)
    [2012-10-31 14:30] upgraded mdadm (3.2.5-2 -> 3.2.6-1)
    [2012-10-31 14:30] upgraded metacity (2.34.8-1 -> 2.34.13-1)
    [2012-10-31 14:30] upgraded net-snmp (5.7.1-4 -> 5.7.2-1)
    [2012-10-31 14:30] upgraded netcfg (2.8.11-1 -> 3.0-1)
    [2012-10-31 14:30] upgraded openssh (6.1p1-2 -> 6.1p1-3)
    [2012-10-31 14:30] upgraded pidgin (2.10.6-1 -> 2.10.6-2)
    [2012-10-31 14:30] upgraded pygobject2-devel (2.28.6-6 -> 2.28.6-8)
    [2012-10-31 14:30] upgraded python2-gobject2 (2.28.6-6 -> 2.28.6-8)
    [2012-10-31 14:30] upgraded slim (1.3.4-3 -> 1.3.4-4)
    [2012-10-31 14:30] upgraded slim-themes (1.2.3-5 -> 1.2.3-6)
    [2012-10-31 14:30] ==> syslog-ng now reads from /run/systemd/journal/syslog in the
    [2012-10-31 14:30]     default config. If you still use sysvinit/initscripts, this
    [2012-10-31 14:30]     must be /dev/log in /etc/syslog-ng/syslog-ng.conf
    [2012-10-31 14:30] upgraded syslog-ng (3.3.6-1 -> 3.3.6-3)
    [2012-10-31 14:31] >>> texlive: updating the filename database...
    [2012-10-31 14:31] mktexlsr: Updating /etc/texmf/ls-R...
    [2012-10-31 14:31] mktexlsr: Updating /usr/share/texmf/ls-R...
    [2012-10-31 14:31] mktexlsr: Updating /usr/share/texmf-dist/ls-R...
    [2012-10-31 14:31] mktexlsr: Updating /var/lib/texmf/ls-R...
    [2012-10-31 14:31] mktexlsr: Done.
    [2012-10-31 14:31] recreating all formats... done.
    [2012-10-31 14:31]  (logs are under /var/lib/texmf/web2c/<engine>/<formatname>.log)
    [2012-10-31 14:31] upgraded texlive-bin (2012.0-4 -> 2012.0-5)
    [2012-10-31 14:31] Updating font cache... Fontconfig warning: "/etc/fonts/conf.d/53-monospace-lcd-filter.conf", line 10: Having multiple values in <test> isn't supported and may not works as expected
    [2012-10-31 14:31] done.
    [2012-10-31 14:31] upgraded ttf-liberation (2.00.0-1 -> 2.00.1-1)
    [2012-10-31 14:32] In order to use the new version, reload all virtualbox modules manually.
    [2012-10-31 14:32] upgraded virtualbox-host-modules (4.2.0-5 -> 4.2.4-2)
    [2012-10-31 14:32]
    [2012-10-31 14:32] Creating symlink /var/lib/dkms/vboxhost/4.2.4/source ->
    [2012-10-31 14:32]                  /usr/src/vboxhost-4.2.4
    [2012-10-31 14:32]
    [2012-10-31 14:32] DKMS: add completed.
    [2012-10-31 14:32] ==> To build and install your modules run dkms install vboxhost/4.2.4
    [2012-10-31 14:32] ==> To do this automatically at startup you can add dkms in your DAEMONS
    [2012-10-31 14:32] upgraded virtualbox-host-source (4.2.0-3 -> 4.2.4-1)
    [2012-10-31 14:32] upgraded virtualbox (4.2.0-3 -> 4.2.4-1)
    [2012-10-31 14:32] upgraded vlc (2.0.3-4 -> 2.0.4-2)
    [2012-10-31 14:32] upgraded wget (1.14-1 -> 1.14-2)
    [2012-10-31 14:32] upgraded xf86-input-evdev (2.7.3-1 -> 2.7.3-2)
    [2012-10-31 14:32] upgraded xf86-input-synaptics (1.6.2-1 -> 1.6.2-2)
    [2012-10-31 14:32] upgraded xf86-video-intel (2.20.9-1 -> 2.20.12-1)
    [2012-10-31 14:32] upgraded xorg-server-common (1.12.4-1 -> 1.13.0-3)
    [2012-10-31 14:32] upgraded xorg-server (1.12.4-1 -> 1.13.0-3)
    [2012-10-31 14:32] upgraded xorg-xinit (1.3.2-1 -> 1.3.2-3)
    [2012-10-31 14:38] Running 'pacman -S baobab'
    [2012-10-31 14:38] installed baobab (3.6.2-1)
    [2012-10-31 17:08] Running 'pacman -S syslinux'
    [2012-10-31 17:10] Running 'pacman -S syslinux'
    [2012-10-31 17:11] ==> If you want to use syslinux as your bootloader
    [2012-10-31 17:11] ==> edit /boot/syslinux/syslinux.cfg and run
    [2012-10-31 17:11] ==>   # /usr/sbin/syslinux-install_update -i -a -m
    [2012-10-31 17:11] ==> to install it.
    [2012-10-31 17:11] installed syslinux (4.06-1)
    [2012-10-31 17:30] Running 'pacman -Syyu gnome-settings-daemon'
    [2012-10-31 17:30] synchronizing package lists
    [2012-10-31 17:30] starting full system upgrade
    [2012-10-31 17:30] upgraded gnome-settings-daemon (3.6.1-2 -> 3.6.1-2)
    [2012-10-31 17:30] Running 'pacman -Syu'
    [2012-10-31 17:30] synchronizing package lists
    [2012-10-31 17:30] starting full system upgrade
    [2012-10-31 17:39] Running 'pacman -Sy'
    [2012-10-31 17:39] synchronizing package lists
    [2012-10-31 17:39] starting full system upgrade
    [2012-10-31 17:39] Running 'pacman -U /tmp/yaourt-tmp-root/PKGDEST.yAV/downgrade-3.2-1-any.pkg.tar.xz'
    [2012-10-31 17:39] upgraded downgrade (3.1-1 -> 3.2-1)
    [2012-10-31 17:40] Running 'pacman -U /tmp/yaourt-tmp-root/PKGDEST.P2k/dropbox-1.4.20-1-x86_64.pkg.tar.xz'
    [2012-10-31 17:40] upgraded dropbox (1.4.17-1 -> 1.4.20-1)
    [2012-10-31 17:41] Running 'pacman -U /tmp/yaourt-tmp-root/PKGDEST.C5t/package-query-1.1-2-x86_64.pkg.tar.xz'
    [2012-10-31 17:41] upgraded package-query (1.0.1-1 -> 1.1-2)
    [2012-10-31 17:42] Running 'pacman -U /tmp/yaourt-tmp-root/PKGDEST.i8t/teamviewer-7.0.9377-1-x86_64.pkg.tar.xz'
    [2012-10-31 17:42] upgraded teamviewer (7.0.9360-1 -> 7.0.9377-1)
    [2012-10-31 17:42] Running 'pacman -U /tmp/yaourt-tmp-root/PKGDEST.21N/yaourt-1.2.1-1-any.pkg.tar.xz'
    [2012-10-31 17:42] upgraded yaourt (1.1-1 -> 1.2.1-1)
    [2012-10-31 17:44] Running 'pacman -U /tmp/yaourt-tmp-daniel/PKGDEST.nxI/cinnamon-git-20121031-1-x86_64.pkg.tar.xz'
    [2012-10-31 17:44] upgraded cinnamon-git (20121015-1 -> 20121031-1)
    Last edited by dtomasiewicz (2012-11-20 20:11:06)

    I've done a bit more playing around with this. It seems running xmodmap ~/.Xmodmap does work, it's just very slow and CPU-hungry. Reducing my .Xmodmap file to include only the overrides (4 of them) allows it to complete in about a second.
    However, it's still not being loaded on login, despite being in .xinitrc. In order to get my keybinds to work in a program, I need to open a terminal, run xmodmap manually, then execute whatever program I want them to work in.
    I tried downgrading xf86-input-evdev but my keyboard no longer worked on boot, once the display manager appeared (and I couldn't switch TTYs with Ctrl+Shift+F*).
    Last edited by dtomasiewicz (2012-11-02 16:43:21)

  • Xmonad.hs file: I need a template, but the official one gives errors

    I just installed Xmonad and I am LOVING it, but I need some help setting up an xmonad.hs file. I created one in ~/.xmonad/xmonad.hs and looked for a well-commented template since I don't know any Haskell (or any programming language, for that matter). This is the one I copied to the file:
    http://www.haskell.org/haskellwiki/Xmon … _xmonad.hs
    Which gives:
    -- xmonad example config file.
    -- A template showing all available configuration hooks,
    -- and how to override the defaults in your own xmonad.hs conf file.
    -- Normally, you'd only override those defaults you care about.
    import XMonad
    import System.Exit
    import qualified XMonad.StackSet as W
    import qualified Data.Map as M
    -- The preferred terminal program, which is used in a binding below and by
    -- certain contrib modules.
    myTerminal = "xterm"
    -- Width of the window border in pixels.
    myBorderWidth = 1
    -- modMask lets you specify which modkey you want to use. The default
    -- is mod1Mask ("left alt"). You may also consider using mod3Mask
    -- ("right alt"), which does not conflict with emacs keybindings. The
    -- "windows key" is usually mod4Mask.
    myModMask = mod1Mask
    -- The mask for the numlock key. Numlock status is "masked" from the
    -- current modifier status, so the keybindings will work with numlock on or
    -- off. You may need to change this on some systems.
    -- You can find the numlock modifier by running "xmodmap" and looking for a
    -- modifier with Num_Lock bound to it:
    -- > $ xmodmap | grep Num
    -- > mod2 Num_Lock (0x4d)
    -- Set numlockMask = 0 if you don't have a numlock key, or want to treat
    -- numlock status separately.
    myNumlockMask = mod2Mask
    -- The default number of workspaces (virtual screens) and their names.
    -- By default we use numeric strings, but any string may be used as a
    -- workspace name. The number of workspaces is determined by the length
    -- of this list.
    -- A tagging example:
    -- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
    myWorkspaces = ["1","2","3","4","5","6","7","8","9"]
    -- Border colors for unfocused and focused windows, respectively.
    myNormalBorderColor = "#dddddd"
    myFocusedBorderColor = "#ff0000"
    -- Default offset of drawable screen boundaries from each physical
    -- screen. Anything non-zero here will leave a gap of that many pixels
    -- on the given edge, on the that screen. A useful gap at top of screen
    -- for a menu bar (e.g. 15)
    -- An example, to set a top gap on monitor 1, and a gap on the bottom of
    -- monitor 2, you'd use a list of geometries like so:
    -- > defaultGaps = [(18,0,0,0),(0,18,0,0)] -- 2 gaps on 2 monitors
    -- Fields are: top, bottom, left, right.
    myDefaultGaps = [(0,0,0,0)]
    -- Key bindings. Add, modify or remove key bindings here.
    myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
    -- launch a terminal
    [ ((modMask .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)
    -- launch dmenu
    , ((modMask, xK_p ), spawn "exe=`dmenu_path | dmenu` && eval \"exec $exe\"")
    -- launch gmrun
    , ((modMask .|. shiftMask, xK_p ), spawn "gmrun")
    -- close focused window
    , ((modMask .|. shiftMask, xK_c ), kill)
    -- Rotate through the available layout algorithms
    , ((modMask, xK_space ), sendMessage NextLayout)
    -- Reset the layouts on the current workspace to default
    , ((modMask .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
    -- Resize viewed windows to the correct size
    , ((modMask, xK_n ), refresh)
    -- Move focus to the next window
    , ((modMask, xK_Tab ), windows W.focusDown)
    -- Move focus to the next window
    , ((modMask, xK_j ), windows W.focusDown)
    -- Move focus to the previous window
    , ((modMask, xK_k ), windows W.focusUp )
    -- Move focus to the master window
    , ((modMask, xK_m ), windows W.focusMaster )
    -- Swap the focused window and the master window
    , ((modMask, xK_Return), windows W.swapMaster)
    -- Swap the focused window with the next window
    , ((modMask .|. shiftMask, xK_j ), windows W.swapDown )
    -- Swap the focused window with the previous window
    , ((modMask .|. shiftMask, xK_k ), windows W.swapUp )
    -- Shrink the master area
    , ((modMask, xK_h ), sendMessage Shrink)
    -- Expand the master area
    , ((modMask, xK_l ), sendMessage Expand)
    -- Push window back into tiling
    , ((modMask, xK_t ), withFocused $ windows . W.sink)
    -- Increment the number of windows in the master area
    , ((modMask , xK_comma ), sendMessage (IncMasterN 1))
    -- Deincrement the number of windows in the master area
    , ((modMask , xK_period), sendMessage (IncMasterN (-1)))
    -- toggle the status bar gap
    , ((modMask , xK_b ),
    modifyGap (\i n -> let x = (XMonad.defaultGaps conf ++ repeat (0,0,0,0)) !! i
    in if n == x then (0,0,0,0) else x))
    -- Quit xmonad
    , ((modMask .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
    -- Restart xmonad
    , ((modMask , xK_q ),
    broadcastMessage ReleaseResources >> restart "xmonad" True)
    ++
    -- mod-[1..9], Switch to workspace N
    -- mod-shift-[1..9], Move client to workspace N
    [((m .|. modMask, k), windows $ f i)
    | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
    , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
    ++
    -- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
    -- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
    [((m .|. modMask, key), screenWorkspace sc >>= flip whenJust (windows . f))
    | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
    , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
    -- Mouse bindings: default actions bound to mouse events
    myMouseBindings (XConfig {XMonad.modMask = modMask}) = M.fromList $
    -- mod-button1, Set the window to floating mode and move by dragging
    [ ((modMask, button1), (\w -> focus w >> mouseMoveWindow w))
    -- mod-button2, Raise the window to the top of the stack
    , ((modMask, button2), (\w -> focus w >> windows W.swapMaster))
    -- mod-button3, Set the window to floating mode and resize by dragging
    , ((modMask, button3), (\w -> focus w >> mouseResizeWindow w))
    -- you may also bind events to the mouse scroll wheel (button4 and button5)
    -- Layouts:
    -- You can specify and transform your layouts by modifying these values.
    -- If you change layout bindings be sure to use 'mod-shift-space' after
    -- restarting (with 'mod-q') to reset your layout state to the new
    -- defaults, as xmonad preserves your old layout settings by default.
    -- The available layouts. Note that each layout is separated by |||,
    -- which denotes layout choice.
    myLayout = tiled ||| Mirror tiled ||| Full
    where
    -- default tiling algorithm partitions the screen into two panes
    tiled = Tall nmaster delta ratio
    -- The default number of windows in the master pane
    nmaster = 1
    -- Default proportion of screen occupied by master pane
    ratio = 1/2
    -- Percent of screen to increment by when resizing panes
    delta = 3/100
    -- Window rules:
    -- Execute arbitrary actions and WindowSet manipulations when managing
    -- a new window. You can use this to, for example, always float a
    -- particular program, or have a client always appear on a particular
    -- workspace.
    -- To find the property name associated with a program, use
    -- > xprop | grep WM_CLASS
    -- and click on the client you're interested in.
    -- To match on the WM_NAME, you can use 'title' in the same way that
    -- 'className' and 'resource' are used below.
    myManageHook = composeAll
    [ className =? "MPlayer" --> doFloat
    , className =? "Gimp" --> doFloat
    , resource =? "desktop_window" --> doIgnore
    , resource =? "kdesktop" --> doIgnore ]
    -- Whether focus follows the mouse pointer.
    myFocusFollowsMouse :: Bool
    myFocusFollowsMouse = True
    -- Status bars and logging
    -- Perform an arbitrary action on each internal state change or X event.
    -- See the 'DynamicLog' extension for examples.
    -- To emulate dwm's status bar
    -- > logHook = dynamicLogDzen
    myLogHook = return ()
    -- Now run xmonad with all the defaults we set up.
    -- Run xmonad with the settings you specify. No need to modify this.
    main = xmonad defaults
    -- A structure containing your configuration settings, overriding
    -- fields in the default config. Any you don't override, will
    -- use the defaults defined in xmonad/XMonad/Config.hs
    -- No need to modify this.
    defaults = defaultConfig {
    -- simple stuff
    terminal = myTerminal,
    focusFollowsMouse = myFocusFollowsMouse,
    borderWidth = myBorderWidth,
    modMask = myModMask,
    numlockMask = myNumlockMask,
    workspaces = myWorkspaces,
    normalBorderColor = myNormalBorderColor,
    focusedBorderColor = myFocusedBorderColor,
    defaultGaps = myDefaultGaps,
    -- key bindings
    keys = myKeys,
    mouseBindings = myMouseBindings,
    -- hooks, layouts
    layoutHook = myLayout,
    manageHook = myManageHook,
    logHook = myLogHook
    So I copied all this into my new xmonad.hs file and then restarted xmonad with mod+q, but a window popped up giving me this error:
    Error detected while loading xmonad configuration file: /home/agi/.xmonad/xmonad.hs
    on the commandline:
    Warning: -no-recomp is deprecated: Use -fforce-recomp instead
    xmonad.hs:141:10: Not in scope: `modifyGap'
    xmonad.hs:141:38: Not in scope: `XMonad.defaultGaps'
    xmonad.hs:273:8: Not in scope: `defaultGaps'
    Please check the file for errors.
    I'm not exactly sure what any of this means. If someone could help me decipher this or, better yet, post a better (well-commented so I can understand it) default xmonad.hs file that I can use, that would be great.

    Alright! I've got xmonad almost set up! One major thing I still want to do is add some sort of pager-like display in the top left of xmobar. Just to show workspaces 1-9 and highlight the one I'm in (giving a preview of my windows or telling me which ones I have windows in would be great, but not absolutely necessary).
    I can't find anything (that I understand) online. Help?
    Here's my xmonad.hs:
    import XMonad
    import XMonad.Hooks.DynamicLog
    import XMonad.Hooks.ManageDocks
    import XMonad.Util.Run(spawnPipe)
    import XMonad.Util.EZConfig(additionalKeys)
    import System.IO
    myManageHook = composeAll
    [ className =? "Gimp" --> doFloat
    main = do
    xmproc <- spawnPipe "/path/to/xmobarbinary /home/jgoerzen/.xmobarrc"
    -- make sure to edit paths to xmobar and .xmobarrc to match your system.
    -- If xmobar is in your $PATH, with config ~/.xmobarrc you don't need the
    -- xmobar path or config file, use: xmproc <- spawnPipe "xmobar"
    xmonad $ defaultConfig
    { manageHook = manageDocks <+> manageHook defaultConfig
    , layoutHook = avoidStruts $ layoutHook defaultConfig
    , logHook = dynamicLogWithPP $ xmobarPP
    { ppOutput = hPutStrLn xmproc
    , ppTitle = xmobarColor "green" "" . shorten 50
    , modMask = mod1Mask
    } `additionalKeys`
    [ ((mod1Mask .|. shiftMask, xK_z), spawn "xscreensaver-command -lock")
    , ((controlMask, xK_Print), spawn "scrot -s")
    , ((0, xK_Print), spawn "scrot")
    and here's my xmobarrc:
    Config { font = "-Misc-Fixed-Bold-R-Normal--13-120-75-75-C-70-ISO8859-1"
    , bgColor = "black"
    , fgColor = "grey"
    , position = TopW L 90
    , commands = [ Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10
    , Run Memory ["-t","Mem: <usedratio>%"] 10
    , Run Swap [] 10
    , Run Date "%a %b %_d %l:%M" "date" 10
    , Run StdinReader
    , sepChar = "%"
    , alignSep = "}{"
    , template = "%StdinReader% }{ %cpu% | %memory% * %swap% <fc=#ee9a00>%date%</fc> |"

  • Get VLC to do fullscreen float in Xmonad

    Hi,
    Short background: I have started to use XBMC for watching and organizing videos. Everything works great except playing the videos. I have a constant stutter about every 3-4 seconds and from time to time the picture freeze but the movie running in the background with sound OK, moving the mouse take away the freeze.
    I do not have thous problems with VLC. I have configured XBMC to use VLC to play videos.
    I have two monitors, one for movies. Using a Nvidia-card in TwinView.
    My problem is that when I start a movie VLC starts and XMONAD tiling it as it should. But of cause I do not want VLC and XBMC side by side on the monitor. I would like VLC fullscreen on top of XBMC.
    I have tried to solve it by using  XMonad.Hooks.ManageHelpers but no luck.
    My xmonad.hs looks like this.
    -- xmonad example config file.
    -- A template showing all available configuration hooks,
    -- and how to override the defaults in your own xmonad.hs conf file.
    -- Normally, you'd only override those defaults you care about.
    import XMonad
    import Data.Monoid
    import System.Exit
    import XMonad.Hooks.ManageDocks
    import XMonad.Util.Run(spawnPipe)
    import XMonad.Hooks.DynamicLog
    import System.IO
    import XMonad.Hooks.ManageHelpers
    import qualified XMonad.StackSet as W
    import qualified Data.Map as M
    main = do
    xmproc <- spawnPipe "/usr/bin/xmobar /home/christer/.xmonad/xmobarrc"
    xmonad defaults
    -- { manageHook = manageDocks <+> manageHook defaultConfig
    { manageHook = myManageHook
    , layoutHook = avoidStruts $ layoutHook defaultConfig
    , logHook = dynamicLogWithPP xmobarPP
    { ppOutput = hPutStrLn xmproc
    , ppTitle = xmobarColor "green" "" . shorten 100
    myManageHook = composeOne
    [ className =? "vlc" -?> doFullFloat
    , className =? "skype" -?> doFloat
    , resource =? "desktop_window" -?> doIgnore
    , resource =? "kdesktop" -?> doIgnore ]
    -- The preferred terminal program, which is used in a binding below and by
    -- certain contrib modules.
    -- myTerminal = "xterm"
    myTerminal = "urxvt"
    -- Whether focus follows the mouse pointer.
    myFocusFollowsMouse :: Bool
    myFocusFollowsMouse = True
    -- Width of the window border in pixels.
    myBorderWidth = 3
    -- modMask lets you specify which modkey you want to use. The default
    -- is mod1Mask ("left alt"). You may also consider using mod3Mask
    -- ("right alt"), which does not conflict with emacs keybindings. The
    -- "windows key" is usually mod4Mask.
    myModMask = mod4Mask
    -- The default number of workspaces (virtual screens) and their names.
    -- By default we use numeric strings, but any string may be used as a
    -- workspace name. The number of workspaces is determined by the length
    -- of this list.
    -- A tagging example:
    -- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
    myWorkspaces = ["1","2","3","4","5","6","7","8","9"]
    -- Border colors for unfocused and focused windows, respectively.
    -- myNormalBorderColor = "#dddddd"
    myNormalBorderColor = "#000000"
    myFocusedBorderColor = "#ff0000"
    -- Key bindings. Add, modify or remove key bindings here.
    myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
    -- launch a terminal
    [ ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)
    -- launch dmenu
    , ((modm, xK_p ), spawn "dmenu_run -b")
    -- launch gmrun
    , ((modm .|. shiftMask, xK_p ), spawn "gmrun")
    -- close focused window
    , ((modm .|. shiftMask, xK_c ), kill)
    -- Rotate through the available layout algorithms
    , ((modm, xK_space ), sendMessage NextLayout)
    -- Reset the layouts on the current workspace to default
    , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
    -- Resize viewed windows to the correct size
    , ((modm, xK_n ), refresh)
    -- Move focus to the next window
    , ((modm, xK_Tab ), windows W.focusDown)
    -- Move focus to the next window
    , ((modm, xK_j ), windows W.focusDown)
    -- Move focus to the previous window
    , ((modm, xK_k ), windows W.focusUp )
    -- Move focus to the master window
    , ((modm, xK_m ), windows W.focusMaster )
    -- Swap the focused window and the master window
    , ((modm, xK_Return), windows W.swapMaster)
    -- Swap the focused window with the next window
    , ((modm .|. shiftMask, xK_j ), windows W.swapDown )
    -- Swap the focused window with the previous window
    , ((modm .|. shiftMask, xK_k ), windows W.swapUp )
    -- Shrink the master area
    , ((modm, xK_h ), sendMessage Shrink)
    -- Expand the master area
    , ((modm, xK_l ), sendMessage Expand)
    -- Push window back into tiling
    , ((modm, xK_t ), withFocused $ windows . W.sink)
    -- Increment the number of windows in the master area
    , ((modm , xK_comma ), sendMessage (IncMasterN 1))
    -- Deincrement the number of windows in the master area
    , ((modm , xK_period), sendMessage (IncMasterN (-1)))
    -- Toggle the status bar gap
    -- Use this binding with avoidStruts from Hooks.ManageDocks.
    -- See also the statusBar function from Hooks.DynamicLog.
    -- , ((modm , xK_b ), sendMessage ToggleStruts)
    -- Quit xmonad
    , ((modm .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
    -- Restart xmonad
    , ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart")
    -- mod-[1..9], Switch to workspace N
    -- mod-shift-[1..9], Move client to workspace N
    [((m .|. modm, k), windows $ f i)
    | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
    , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
    ++
    -- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
    -- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
    [((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
    | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
    , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
    -- Mouse bindings: default actions bound to mouse events
    myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
    -- mod-button1, Set the window to floating mode and move by dragging
    [ ((modm, button1), (\w -> focus w >> mouseMoveWindow w
    >> windows W.shiftMaster))
    -- mod-button2, Raise the window to the top of the stack
    , ((modm, button2), (\w -> focus w >> windows W.shiftMaster))
    -- mod-button3, Set the window to floating mode and resize by dragging
    , ((modm, button3), (\w -> focus w >> mouseResizeWindow w
    >> windows W.shiftMaster))
    -- you may also bind events to the mouse scroll wheel (button4 and button5)
    -- Layouts:
    -- You can specify and transform your layouts by modifying these values.
    -- If you change layout bindings be sure to use 'mod-shift-space' after
    -- restarting (with 'mod-q') to reset your layout state to the new
    -- defaults, as xmonad preserves your old layout settings by default.
    -- The available layouts. Note that each layout is separated by |||,
    -- which denotes layout choice.
    myLayout = tiled ||| Mirror tiled ||| Full
    where
    -- default tiling algorithm partitions the screen into two panes
    tiled = Tall nmaster delta ratio
    -- The default number of windows in the master pane
    nmaster = 1
    -- Default proportion of screen occupied by master pane
    ratio = 1/4
    -- Percent of screen to increment by when resizing panes
    delta = 3/100
    -- Window rules:
    -- Execute arbitrary actions and WindowSet manipulations when managing
    -- a new window. You can use this to, for example, always float a
    -- particular program, or have a client always appear on a particular
    -- workspace.
    -- To find the property name associated with a program, use
    -- > xprop | grep WM_CLASS
    -- and click on the client you're interested in.
    -- To match on the WM_NAME, you can use 'title' in the same way that
    -- 'className' and 'resource' are used below.
    -- Event handling
    -- * EwmhDesktops users should change this to ewmhDesktopsEventHook
    -- Defines a custom handler function for X Events. The function should
    -- return (All True) if the default handler is to be run afterwards. To
    -- combine event hooks use mappend or mconcat from Data.Monoid.
    myEventHook = mempty
    -- Status bars and logging
    -- Perform an arbitrary action on each internal state change or X event.
    -- See the 'XMonad.Hooks.DynamicLog' extension for examples.
    myLogHook = return ()
    -- Startup hook
    -- Perform an arbitrary action each time xmonad starts or is restarted
    -- with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize
    -- per-workspace layout choices.
    -- By default, do nothing.
    myStartupHook = return ()
    -- Now run xmonad with all the defaults we set up.
    -- Run xmonad with the settings you specify. No need to modify this.
    -- main = xmonad defaults
    -- A structure containing your configuration settings, overriding
    -- fields in the default config. Any you don't override, will
    -- use the defaults defined in xmonad/XMonad/Config.hs
    -- No need to modify this.
    defaults = defaultConfig {
    -- simple stuff
    terminal = myTerminal,
    focusFollowsMouse = myFocusFollowsMouse,
    borderWidth = myBorderWidth,
    modMask = myModMask,
    workspaces = myWorkspaces,
    normalBorderColor = myNormalBorderColor,
    focusedBorderColor = myFocusedBorderColor,
    -- key bindings
    keys = myKeys,
    mouseBindings = myMouseBindings,
    -- hooks, layouts
    layoutHook = myLayout,
    manageHook = myManageHook,
    handleEventHook = myEventHook,
    logHook = myLogHook,
    startupHook = myStartupHook
    Any idea what I missed?
    Best regards.
    Christer

    Try this, it works very well for me.
    import XMonad.Hooks.ManageHelpers (composeOne, isFullscreen, isDialog, doFullFloat, doCenterFloat)
    myManageHook = composeAll. concat $
    [ [ className =? c --> doCenterFloat| c <- floats]
    , [ resource =? r --> doIgnore | r <- ignore]
    , [ resource =? "gecko" --> doF (W.shift "net") ]
    , [ isFullscreen --> doFullFloat]
    , [ isDialog --> doCenterFloat]]
    where floats = ["sdlpal", "MPlayer", "Gimp", "qemu-system-x86_64", "Gnome-typing-monitor", "Vlc", "Dia", "DDMS", "Audacious", "Wine"]
    ignore = []
    myLayout = tall ||| Mirror tall||| Full ||| tab ||| float
    where
    tall = named "Tall" $ limitWindows 4 $ minimize $ Tall 1 (3/100) (1/2)
    tab = named "Tab" simpleTabbedBottom
    float = named "Float" simpleFloat
    main = do
    myStatusBarPipe <- spawnPipe myBar
    conkyBarProc <- spawnPipe conkyBar
    trayproc <- spawnPipe myTrayer
    xmonad $ ewmh $ withUrgencyHook NoUrgencyHook $ defaultConfig {
    terminal = "urxvt"
    , manageHook = manageDocks <+> myManageHook <+> manageHook defaultConfig
    Last edited by helloworld1 (2012-08-14 05:20:56)

  • Firefox on linux, change tab to right alt with xmodmap don't work on firefox

    Hi, I changed my tab key with my altgr key using xmodmap on linux, (for my xmonad setup) it works everywhere but firefox and thunderbird, my main concern is about firefox, I tried safe mode and disabling all extensions but it didn't work, any one knows why?

    Hi
    Igarcez, It is not specific altgr key mapping. any key mapped through xmodmap does not work in firefox or thunderbird. I repaired an old laptop where the x is not working. assigned the x to the windows key, and only in mozilla products, it will not work.
    looks like mozilla uses its own keymapping program....
    See also this filed bug here.
    [https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1016996 https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1016996]
    btw, i am in the english forum...

  • Question about xmonad package in the repos.

    When I
    sudo pacman -S xmonad
    it installs xmonad and ghc goodness. But one thing that has always bothered me is that I had to hunt down a default .xmonad/xmonad.hs config file for xmonad. Can anyone explain why the package doesn't come with a default configuration file?

    xmonad's "default config" is no config.  i believe the file you want is buried somewhere in /usr under a different name.  if you poke around xmonad.org you can find the path/name to that file but also a copy/pastable (albeit older) version of it.
    i think it's done this way b/c the tweaking method is different with xmonad.  it's not like editing /etc/xmonad.hs and putting it in ~, you actually /load/ the defaults into ~/.xmonad/xmonad.hs and then /override/ them with your changes.  this is done with a simple main function like this:
    main = do
    xmonad $ defaultConfig
    and whatever's between { } (explicit commands or calling of functions) is passed through the defaultConfig, picking up any settings not yet set, then fed to xmonad.
    so unlike other WMs where you copy a default config and edit it from there.  in xmonad, you load the default config into yours with $ defaultConfig and put your tweaks (and only your tweaks) in xmonad.hs.  bit of a change in thinking.
    /edit: yes Xyne, i second Ashren.  it's a wonderful WM and haskell's awesome.  my xmonad.hs is available in my sig if you want it, i'm fairly proud of it.
    Last edited by brisbin33 (2009-07-31 16:49:10)

  • Xorg or some other system overriding xinitrc

    I have the following .xinitrc configuration. The important parts are the xmodmap and the xset lines.
    xset r rate 195 35
    xrdb -merge $HOME/.Xresources
    xrdb -merge $HOME/.Xdefaults
    pkill urxvtd ; urxvtd &
    $HOME/bin/gpg-agent.sh
    xsetroot -cursor_name left_ptr
    xscreensaver &
    skype &
    $HOME/bin/tray &
    $HOME/bin/randBackground.sh &
    xsetkbmap -model evdev
    xmodmap $HOME/.Xmodmap
    xmodmap > $HOME/logs/xmodmap
    exec ssh-agent xmonad
    All of the commands work after x and xmonad have started succesfully, xmodmap changes the caps lock to work as esc, and xset enables dpms just as expected.
    However if I start X with startx, the xmodmap command does not work in its entirety. Caps lock will function as esc, but also as lock. If I start with slim (which also reads the same xinitrc), the xmodmap commands works fine. The "xmodmap >" line shows that the lock has been cleared at that point of time, so sometimes after the xmodmap lines and functional working X, the lock has been reset. For the xmodmap command to work with slim, points me to believe that something during X startup resets the lock.
    The xset dpms command doesn't work with either startx or slim. I had also set
    Option "DPMS" "true"
    to xorg.conf Monitor section, and still no luck, which points me to believe that something after X (hal?) is interfering with xinitrc and xorg.conf.
    masse@libre:~ $ pacman -Qi xorg-server
    Name : xorg-server
    Version : 1.7.6-3

    loafer wrote:Out of interest what are your examples of a kernel update breaking things with such regularity.  Do you have esoteric hardware etc. that makes this more likely?
    I can't remember exactly anymore, but there were a lot of acpi troubles, which got worse with almost every update. At first it stopped from booting randomly, then consistently, then again randomly. Actually the problem still persists, but I can "fix" it by using framebuffer. My theory is that it slows down the booting by few milliseconds which gives time for some hardware to initialize.
    The last time I upgraded kernel and most importantly nvidia drivers, the drivers had become so slow to start that kdm would rather shut down than wait for a bit longer.
    http://bbs.archlinux.org/viewtopic.php?id=90340
    Last edited by Masse (2010-07-03 17:46:20)

  • [SOLVED] Xmonad updatepointer help

    hello Ive recently moved to arch and now xmonad. And I cannot believe i did not discover these beauties before!! (Previous distro was fedora)
    So little by little with google and examples of configs out there ive manage to customize a xmonad.hs file to how i work and would like to work.
    To a degree i can read my own hs file but some things idk what they do or how they work (like main).
    I would basically like to implement an update pointer action. I've seen the 3rd party extensions page for xmonad but i can seem to figure out how to implement it in my xmonad config file.
    I created a "myLogHook" variable (not sure if that's what haskell calls it) but dont know where to go from there. Here is my config:
    import System.IO
    import System.Exit
    import XMonad
    import XMonad.Hooks.DynamicLog
    import XMonad.Hooks.ManageDocks
    import XMonad.Hooks.ManageHelpers
    import XMonad.Hooks.SetWMName
    import XMonad.Layout.Fullscreen
    import XMonad.Layout.NoBorders
    import XMonad.Layout.Spiral
    import XMonad.Layout.Tabbed
    import XMonad.Layout.ThreeColumns
    import XMonad.Util.Run(spawnPipe)
    import XMonad.Util.EZConfig(additionalKeys)
    import qualified XMonad.StackSet as W
    import qualified Data.Map as M
    import XMonad.Actions.SpawnOn
    import XMonad.Actions.CycleWS
    import XMonad.Actions.PhysicalScreens
    import XMonad.Layout.Circle
    import XMonad.Actions.UpdatePointer
    -- FOR MULTIMEDIA KEYS RUN:
    -- "xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'"
    -- Then look in /usr/include/X11/XF86keysym.h and look for the name and code.
    -- Terminal
    -- The preferred terminal program, which is used in a binding below and by
    -- certain contrib modules.
    myTerminal = "terminator"
    myInternet = "google-chrome-stable"
    myIM = "pidgin"
    myCalc = "libreoffice --calc"
    myEditor = "gedit"
    myBackground = "feh --bg-scale '/home/dvm/Pictures/infinity___widescreen_pack_by_morague.jpg'"
    myScreenshot = "scrot /home/dvm/Pictures/screen_%Y-%m-%d-%H-%M-%S.png -d 1"
    myMouseshot = "sleep 0.2; scrot -s ~/Pictures/screen_%Y-%m-%d-%H-%M-%S.png -d 1"
    myVirtual = "virtualbox"
    myRdesktop = "/home/dvm/.xmonad/bin/usrds006"
    myWTL = "/home/dvm/.xmonad/bin/wtl.sh"
    -- Workspaces
    -- The default number of workspaces (virtual screens) and their names.
    myWorkspaces = ["1:main","2:www","3:office","4:rdp","5:editor","6:email","7:files","8:chat","9:WTL"]
    -- Window rules
    -- Execute arbitrary actions and WindowSet manipulations when managing
    -- a new window. You can use this to, for example, always float a
    -- particular program, or have a client always appear on a particular
    -- workspace.
    -- To find the property name associated with a program, use
    -- > xprop | grep WM_CLASS
    -- and click on the client you're interested in.
    -- To match on the WM_NAME, you can use 'title' in the same way that
    -- 'className' and 'resource' are used below.
    myManageHook = composeAll
    [ resource =? "desktop_window" --> doIgnore
    , className =? "Galculator" --> doFloat
    , className =? "Steam" --> doFloat
    , className =? "Gimp" --> doFloat
    , resource =? "gpicview" --> doFloat
    , className =? "MPlayer" --> doFloat
    , className =? "Google-chrome-stable" --> doShift "2:www"
    , className =? "libreoffice-calc" --> doShift "3:office"
    , className =? "VirtualBox" --> doShift "3:office"
    , className =? "rdesktop" --> doShift "4:rdp"
    , className =? "Gedit" --> doShift "5:editor"
    , className =? "Evolution" --> doShift "6:email"
    , className =? "Nautilus" --> doShift "7:files"
    , className =? "Pidgin" --> doShift "8:chat"
    , className =? "Wine" --> doShift "9:WTL"
    , className =? "stalonetray" --> doIgnore
    , isFullscreen --> (doF W.focusDown <+> doFullFloat)]
    -- Layouts
    -- You can specify and transform your layouts by modifying these values.
    -- If you change layout bindings be sure to use 'mod-shift-space' after
    -- restarting (with 'mod-q') to reset your layout state to the new
    -- defaults, as xmonad preserves your old layout settings by default.
    -- The available layouts. Note that each layout is separated by |||,
    -- which denotes layout choice.
    myLayout = avoidStruts (
    Tall 1 (3/100) (1/2) |||
    Mirror (Tall 1 (3/100) (1/2)) |||
    tabbed shrinkText tabConfig |||
    Full |||
    Circle |||
    spiral (6/7)) |||
    noBorders (fullscreenFull Full)
    -- Colors and borders
    -- Currently based on the ir_black theme.
    myNormalBorderColor = "#000000"
    myFocusedBorderColor = "#FF0000"
    -- Colors for text and backgrounds of each tab when in "Tabbed" layout.
    tabConfig = defaultTheme {
    activeBorderColor = "#FF0000",
    activeTextColor = "#CEFFAC",
    activeColor = "#000000",
    inactiveBorderColor = "#FF0000",
    inactiveTextColor = "#EEEEEE",
    inactiveColor = "#000000"
    -- Color of current window title in xmobar.
    xmobarTitleColor = "#00ff00"
    -- Color of current workspace in xmobar.
    xmobarCurrentWorkspaceColor = "#ee9a00"
    -- Width of the window border in pixels.
    myBorderWidth = 2
    -- Key bindings
    -- modMask lets you specify which modkey you want to use. The default
    -- is mod1Mask ("left alt"). You may also consider using mod3Mask
    -- ("right alt"), which does not conflict with emacs keybindings. The
    -- "windows key" is usually mod4Mask.
    myModMask = mod4Mask
    myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
    -- Custom key bindings
    -- Start a terminal. Terminal to start is specified by myTerminal variable.
    [ ((modMask .|. controlMask, xK_t), spawn $ XMonad.terminal conf)
    -- Lock the screen using xscreensaver.
    , ((0, 0x1008FF2F), spawn "xscreensaver-command -lock")
    -- Run dmenu
    , ((modMask, xK_p), spawn "dmenu_run")
    -- Launch remote desktop script
    , ((modMask .|. controlMask, xK_r), spawn myRdesktop)
    -- Launch Google Chrome
    , ((modMask .|. controlMask, xK_i), spawn myInternet)
    -- Launch Gedit
    , ((modMask .|. controlMask, xK_g), spawn myEditor)
    -- Launch Libreoffice Calc
    , ((modMask .|. controlMask, xK_c), spawn myCalc)
    -- Launch Virtualbox
    , ((modMask .|. controlMask, xK_v), spawn myVirtual)
    -- Launch Evolution Email Client
    , ((modMask .|. controlMask, xK_e), spawn "evolution")
    -- Launch WT Library
    , ((modMask .|. controlMask, xK_w), spawn myWTL)
    -- Launch nautilius File Manager
    , ((modMask .|. controlMask, xK_f), spawn "nautilus")
    -- Switch to next workspace
    , ((modMask, xK_Page_Up), nextWS)
    -- Switch to prev workspace
    , ((modMask, xK_Page_Down), prevWS)
    -- Take a screenshot in select mode.
    -- After pressing this key binding, click a window, or draw a rectangle with the mouse.
    , ((modMask, xK_Print), spawn myMouseshot)
    -- Take full screenshot in multi-head mode.
    -- That is, take a screenshot of everything you see.
    -- , ((modMask .|. controlMask .|. shiftMask, xK_p), spawn "screenshot")
    , ((0, xK_Print), spawn myScreenshot)
    -- Fetch a single use password.
    , ((modMask .|. shiftMask, xK_o), spawn "fetchotp -x")
    -- Mute volume.
    -- , ((0, xK_F9), spawn "amixer -q set Master toggle")
    , ((0, 0x1008FF12), spawn "amixer -q set Master toggle")
    -- Decrease volume.
    -- , ((0, xK_F10), spawn "amixer -q set Master 10%-")
    , ((0, 0x1008FF11), spawn "amixer -q set Master 10%-")
    -- Increase volume.
    -- , ((0, xK_F11), spawn "amixer -q set Master 10%+")
    , ((0, 0x1008FF13), spawn "amixer -q set Master 10%+")
    -- Audio previous.
    , ((0, 0x1008FF16), spawn "")
    -- Play/pause.
    , ((0, 0x1008FF14), spawn "")
    -- Audio next.
    , ((0, 0x1008FF17), spawn "")
    -- Audio stop.
    , ((0, 0x1008FF15), spawn "")
    -- Eject CD tray.
    -- , ((0, 0x1008FF2C), spawn "eject -T")
    -- Switch to Prev Xinerama
    , ((modMask, xK_Right), onPrevNeighbour W.view)
    -- Switch to Next Xinerama
    , ((modMask, xK_Left), onNextNeighbour W.view)
    -- Switch to Prev Workspace
    , ((modMask, xK_Down), prevWS)
    -- Switch to Next Workspace
    , ((modMask, xK_Up), nextWS)
    -- "Standard" xmonad key bindings
    -- Close focused window.
    , ((modMask .|. shiftMask, xK_c), kill)
    -- Cycle through the available layout algorithms.
    , ((modMask, xK_space), sendMessage NextLayout)
    -- Reset the layouts on the current workspace to default.
    , ((modMask .|. shiftMask, xK_space), setLayout $ XMonad.layoutHook conf)
    -- Resize viewed windows to the correct size.
    , ((modMask, xK_n), refresh)
    -- Move focus to the next window.
    , ((modMask, xK_Tab), windows W.focusDown)
    -- Move focus to the next window.
    , ((modMask, xK_j), windows W.focusDown)
    -- Move focus to the previous window.
    , ((modMask, xK_k), windows W.focusUp )
    -- Move focus to the master window.
    , ((modMask, xK_m), windows W.focusMaster )
    -- Swap the focused window and the master window.
    , ((modMask, xK_Return), windows W.swapMaster)
    -- Swap the focused window with the next window.
    , ((modMask .|. shiftMask, xK_j), windows W.swapDown )
    -- Swap the focused window with the previous window.
    , ((modMask .|. shiftMask, xK_k), windows W.swapUp )
    -- Shrink the master area.
    , ((modMask, xK_h), sendMessage Shrink)
    -- Expand the master area.
    , ((modMask, xK_l), sendMessage Expand)
    -- Push window back into tiling.
    , ((modMask, xK_t), withFocused $ windows . W.sink)
    -- Increment the number of windows in the master area.
    , ((modMask, xK_comma), sendMessage (IncMasterN 1))
    -- Decrement the number of windows in the master area.
    , ((modMask, xK_period), sendMessage (IncMasterN (-1)))
    -- Toggle the status bar gap.
    -- TODO: update this binding with avoidStruts, ((modMask, xK_b),
    -- Quit xmonad.
    , ((modMask .|. shiftMask, xK_q), io (exitWith ExitSuccess))
    -- Restart xmonad.
    , ((modMask, xK_q), restart "xmonad" True)
    ++
    -- mod-[1..9], Switch to workspace N
    -- mod-shift-[1..9], Move client to workspace N
    [((m .|. modMask, k), windows $ f i)
    | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
    , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
    ++
    -- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
    -- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
    [((m .|. modMask, key), screenWorkspace sc >>= flip whenJust (windows . f))
    | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
    , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
    -- Mouse bindings
    -- Focus rules
    -- True if your focus should follow your mouse cursor.
    myFocusFollowsMouse :: Bool
    myFocusFollowsMouse = True
    myMouseBindings (XConfig {XMonad.modMask = modMask}) = M.fromList $
    -- mod-button1, Set the window to floating mode and move by dragging
    ((modMask, button1),
    (\w -> focus w >> mouseMoveWindow w))
    -- mod-button2, Raise the window to the top of the stack
    , ((modMask, button2),
    (\w -> focus w >> windows W.swapMaster))
    -- Closed focus window. Modmask + Ctrl + Middle mouse button.
    , ((modMask .|. controlMask, button2), (\w -> focus w >> kill))
    -- mod-button3, Set the window to floating mode and resize by dragging
    , ((modMask, button3),
    (\w -> focus w >> mouseResizeWindow w))
    -- you may also bind events to the mouse scroll wheel (button4 and button5)
    -- mod-button4, Switch to next workspace
    , ((modMask, button4),
    (\w -> focus w >> nextWS))
    -- mod-button5, Switch to previous workspace
    , ((modMask, button5),
    (\w -> focus w >> prevWS))
    -- Status bars and logging
    -- Perform an arbitrary action on each internal state change or X event.
    -- See the 'DynamicLog' extension for examples.
    -- To emulate dwm's status bar
    -- > logHook = dynamicLogDzen
    myLogHook = updatePointer (Relative 1 1)
    -- Startup hook
    -- Perform an arbitrary action each time xmonad starts or is restarted
    -- with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize
    -- per-workspace layout choices.
    -- By default, do nothing.
    myStartupHook = return ()
    -- Run xmonad with all the defaults we set up.
    main = do
    xmproc <- spawnPipe "xmobar ~/.xmonad/xmobar.hs"
    xmonad $ defaults {
    logHook = dynamicLogWithPP $ xmobarPP {
    ppOutput = hPutStrLn xmproc
    , ppTitle = xmobarColor xmobarTitleColor "" . shorten 50
    , ppCurrent = xmobarColor xmobarCurrentWorkspaceColor ""
    , ppSep = " : "
    , ppLayout = xmobarColor "orange" ""
    -- , manageHook = manageDocks <+> myManageHook
    , manageHook = manageSpawn <+> manageDocks <+> myManageHook
    , startupHook = setWMName "LG3D"
    -- >> spawnHere "trayer --edge top --align left --SetDockType true --SetPartialStrut true --expand true --width 6 --transparent true --alpha 0 --tint 0x000000 --height 16"
    >> spawnHere "/usr/bin/xscreensaver -no-splash &"
    >> spawnHere "udiskie --tray &"
    >> spawnHere myBackground
    -- >> spawnHere "mpd"
    -- >> spawnOn "1:main" "/home/dvm/.xmonad/bin/nload.sh"
    -- >> spawnOn "1:main" "/home/dvm/.xmonad/bin/clock.sh"
    -- >> spawnOn "1:main" "/home/dvm/.xmonad/bin/visual.sh"
    -- >> spawnHere myTerminal
    -- >> spawnOn "2:www" myInternet
    -- >> spawnOn "3:office" myCalc
    -- >> spawnOn "4:rdp" "/home/dvm/.xmonad/bin/usrds006"
    -- >> spawnOn "5:editor" myEditor
    -- >> spawnOn "6:email" "evolution"
    -- >> spawnOn "7:files" "nautilus"
    -- >> spawnOn "9:WTL" myWTL
    -- Combine it all together
    -- A structure containing your configuration settings, overriding
    -- fields in the default config. Any you don't override, will
    -- use the defaults defined in xmonad/XMonad/Config.hs
    -- No need to modify this.
    defaults = defaultConfig {
    -- simple stuff
    terminal = myTerminal,
    focusFollowsMouse = myFocusFollowsMouse,
    borderWidth = myBorderWidth,
    modMask = myModMask,
    workspaces = myWorkspaces,
    normalBorderColor = myNormalBorderColor,
    focusedBorderColor = myFocusedBorderColor,
    -- key bindings
    keys = myKeys,
    mouseBindings = myMouseBindings,
    -- hooks, layouts
    layoutHook = smartBorders $ myLayout,
    manageHook = myManageHook,
    startupHook = myStartupHook
    Any input/insight would be greatly appreciated. Thank you for you time.
    Last edited by davama (2014-04-08 13:53:59)

    Awesome!!
    Skotish, thank you! I copied your code into my config and it worked like a charm. At first I thought they were identical so i  tried it with my code, since you mentioned watch for tabs and spaces. My block didn't work of course but I didn't understand why since "tabs and spaces" were identical. Until i put your block side by side with my block. Then i noticed the "$" was removed from:
    logHook = dynamicLogWithPP $ xmobarPP {
    I still dont understand Haskell much and what the "$" means but Im still learning.
    BTW my config has changed a bit so im going to post it (with pointer update included):
    import System.IO
    import System.Exit
    import XMonad
    import XMonad.Hooks.DynamicLog
    import XMonad.Hooks.ManageDocks
    import XMonad.Hooks.ManageHelpers
    import XMonad.Hooks.SetWMName
    import XMonad.Layout.Fullscreen
    import XMonad.Layout.NoBorders
    --import XMonad.Layout.Spiral
    import XMonad.Layout.Tabbed
    import XMonad.Layout.ThreeColumns
    import XMonad.Util.Run(spawnPipe)
    import XMonad.Util.EZConfig(additionalKeys)
    import qualified XMonad.StackSet as W
    import qualified Data.Map as M
    import XMonad.Actions.SpawnOn
    import XMonad.Actions.CycleWS
    import XMonad.Actions.PhysicalScreens
    import XMonad.Layout.Circle
    import XMonad.Actions.WindowBringer
    import XMonad.Layout.Cross
    import XMonad.Layout.Grid
    import XMonad.Layout.Minimize
    import XMonad.Layout.Maximize
    import XMonad.Actions.WindowMenu
    import XMonad.Actions.UpdatePointer
    -- FOR MULTIMEDIA KEYS RUN:
    -- xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'
    -- Then look in /usr/include/X11/XF86keysym.h and look for the name and code.
    -- Terminal
    -- The preferred terminal program, which is used in a binding below and by
    -- certain contrib modules.
    myTerminal = "terminator"
    myInternet = "google-chrome-stable"
    myIM = "pidgin"
    myCalc = "libreoffice --calc"
    myEditor = "gedit"
    myBackground = "feh --bg-scale '/home/dvm/Pictures/infinity___widescreen_pack_by_morague.jpg'"
    myScreenshot = "scrot /home/dvm/Pictures/screen_%Y-%m-%d-%H-%M-%S.png -d 1"
    myMouseshot = "sleep 0.2; scrot -s ~/Pictures/screen_%Y-%m-%d-%H-%M-%S.png -d 1"
    myVirtual = "virtualbox"
    myRdesktop = "/home/dvm/.xmonad/bin/usrds006"
    myWTL = "/home/dvm/.xmonad/bin/wtl.sh"
    -- Workspaces
    -- The default number of workspaces (virtual screens) and their names.
    myWorkspaces = ["1:main","2:www","3:office","4:rdp","5:editor","6:email","7:files","8:chat","9:WTL"]
    -- Window rules
    -- Execute arbitrary actions and WindowSet manipulations when managing
    -- a new window. You can use this to, for example, always float a
    -- particular program, or have a client always appear on a particular
    -- workspace.
    -- To find the property name associated with a program, use
    -- > xprop | grep WM_CLASS
    -- and click on the client you're interested in.
    -- To match on the WM_NAME, you can use 'title' in the same way that
    -- 'className' and 'resource' are used below.
    myManageHook = composeAll
    [ resource =? "desktop_window" --> doIgnore
    , className =? "Galculator" --> doFloat
    , className =? "Steam" --> doFloat
    , className =? "Gimp" --> doFloat
    , resource =? "gpicview" --> doFloat
    , className =? "MPlayer" --> doFloat
    , className =? "Google-chrome-stable" --> doShift "2:www"
    , className =? "libreoffice-calc" --> doShift "3:office"
    , className =? "VirtualBox" --> doShift "3:office"
    , className =? "rdesktop" --> doShift "4:rdp"
    , className =? "Gedit" --> doShift "5:editor"
    , className =? "Evolution" --> doShift "6:email"
    , className =? "Nautilus" --> doShift "7:files"
    , className =? "Pidgin" --> doShift "8:chat"
    , className =? "Wine" --> doShift "9:WTL"
    , className =? "stalonetray" --> doIgnore
    , isFullscreen --> (doF W.focusDown <+> doFullFloat)]
    -- Layouts
    -- You can specify and transform your layouts by modifying these values.
    -- If you change layout bindings be sure to use 'mod-shift-space' after
    -- restarting (with 'mod-q') to reset your layout state to the new
    -- defaults, as xmonad preserves your old layout settings by default.
    -- The available layouts. Note that each layout is separated by |||,
    -- which denotes layout choice.
    myLayout = avoidStruts (
    Tall 1 (3/100) (1/2) |||
    Mirror (Tall 1 (3/100) (1/2)) |||
    tabbed shrinkText tabConfig |||
    Full |||
    Grid ||| -- This one is nice
    Circle ||| -- This and cross are similar but
    simpleCross) ||| -- cross sends focus window to center.
    -- spiral (6/7)) |||
    noBorders (fullscreenFull Full)
    -- Colors and borders
    -- Currently based on the ir_black theme.
    myNormalBorderColor = "#000000"
    myFocusedBorderColor = "#FF0000"
    -- Colors for text and backgrounds of each tab when in "Tabbed" layout.
    tabConfig = defaultTheme {
    activeBorderColor = "#FF0000",
    activeTextColor = "#CEFFAC",
    activeColor = "#000000",
    inactiveBorderColor = "#FF0000",
    inactiveTextColor = "#EEEEEE",
    inactiveColor = "#000000"
    -- Color of current window title in xmobar.
    xmobarTitleColor = "#00ff00"
    -- Color of current workspace in xmobar.
    xmobarCurrentWorkspaceColor = "#ee9a00"
    -- Width of the window border in pixels.
    myBorderWidth = 2
    -- Key bindings
    -- modMask lets you specify which modkey you want to use. The default
    -- is mod1Mask ("left alt"). You may also consider using mod3Mask
    -- ("right alt"), which does not conflict with emacs keybindings. The
    -- "windows key" is usually mod4Mask.
    myModMask = mod4Mask
    myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
    -- Custom key bindings
    -- Start a terminal. Terminal to start is specified by myTerminal variable.
    [ ((modMask .|. controlMask, xK_t), spawn $ XMonad.terminal conf)
    -- Launch remote desktop script
    , ((modMask .|. controlMask, xK_r), spawn myRdesktop)
    -- Launch Google Chrome
    , ((modMask .|. controlMask, xK_i), spawn myInternet)
    -- Launch Gedit
    , ((modMask .|. controlMask, xK_g), spawn myEditor)
    -- Launch Libreoffice Calc
    , ((modMask .|. controlMask, xK_c), spawn myCalc)
    -- Launch Virtualbox
    , ((modMask .|. controlMask, xK_v), spawn myVirtual)
    -- Launch Evolution Email Client
    , ((modMask .|. controlMask, xK_e), spawn "evolution")
    -- Launch WT Library
    , ((modMask .|. controlMask, xK_w), spawn myWTL)
    -- Launch nautilius File Manager
    , ((modMask .|. controlMask, xK_f), spawn "nautilus")
    -- display a number of actions related to window management in the center of the focused window.
    -- Actions include: Closing, maximizing, minimizing and shifting the window to another workspace.
    , ((modMask .|. shiftMask, xK_s), windowMenu)
    -- Pops open a dmenu with window titles. Choose one,
    -- and you will be taken to the corresponding workspace.
    , ((modMask .|. shiftMask, xK_g), gotoMenu)
    -- Pops open an application with window titles given
    -- over stdin. Choose one, and it will be dragged, kicking
    -- and screaming, into your current workspace.
    , ((modMask .|. shiftMask, xK_b), bringMenu)
    -- Lock the screen using xscreensaver. Using sleep button
    , ((0, 0x1008FF2F), spawn "xscreensaver-command -lock")
    -- Mute volume.
    -- , ((0, xK_F9), spawn "amixer -q set Master toggle")
    , ((0, 0x1008FF12), spawn "amixer -q set Master toggle")
    -- Decrease volume.
    -- , ((0, xK_F10), spawn "amixer -q set Master 10%-")
    , ((0, 0x1008FF11), spawn "amixer -q set Master 10%-")
    -- Increase volume.
    -- , ((0, xK_F11), spawn "amixer -q set Master 10%+")
    , ((0, 0x1008FF13), spawn "amixer -q set Master 10%+")
    -- Audio previous.
    , ((0, 0x1008FF16), spawn "ncmpcpp prev")
    -- Play/pause.
    , ((0, 0x1008FF14), spawn "ncmpcpp toggle")
    -- , ((0, 0x1008FF14), spawn "ncmpcpp stop; ncmpcpp play")
    -- Audio next.
    , ((0, 0x1008FF17), spawn "ncmpcpp next")
    -- Audio stop.
    , ((0, 0x1008FF15), spawn "ncmpcpp stop")
    -- Take full screenshot in multi-head mode.
    -- That is, take a screenshot of everything you see.
    -- , ((modMask .|. controlMask .|. shiftMask, xK_p), spawn "screenshot")
    , ((0, xK_Print), spawn myScreenshot)
    -- Take a screenshot in select mode.
    -- After pressing this key binding, click a window, or draw a rectangle with the mouse.
    , ((modMask, xK_Print), spawn myMouseshot)
    -- Run dmenu
    , ((modMask, xK_p), spawn "dmenu_run")
    -- Eject CD tray.
    , ((modMask, xK_F12), spawn "eject -T")
    -- Switch to Prev Xinerama
    , ((modMask, xK_Right), onPrevNeighbour W.view)
    -- Switch to Next Xinerama
    , ((modMask, xK_Left), onNextNeighbour W.view)
    -- Switch to Prev Workspace
    , ((modMask, xK_Down), moveTo Prev HiddenNonEmptyWS)
    -- Switch to Next Workspace
    , ((modMask, xK_Up), moveTo Next HiddenNonEmptyWS)
    -- Switch to next workspace
    , ((modMask, xK_Page_Up), moveTo Next HiddenWS)
    -- Switch to prev workspace
    , ((modMask, xK_Page_Down), moveTo Prev HiddenWS)
    -- "Standard" xmonad key bindings
    -- Close focused window.
    , ((modMask .|. shiftMask, xK_c), kill)
    -- Cycle through the available layout algorithms.
    , ((modMask, xK_space), sendMessage NextLayout)
    -- Reset the layouts on the current workspace to default.
    , ((modMask .|. shiftMask, xK_space), setLayout $ XMonad.layoutHook conf)
    -- Resize viewed windows to the correct size.
    , ((modMask, xK_n), refresh)
    -- Move focus to the next window.
    , ((modMask, xK_Tab), windows W.focusDown)
    -- Move focus to the next window.
    , ((modMask, xK_j), windows W.focusDown)
    -- Move focus to the previous window.
    , ((modMask, xK_k), windows W.focusUp )
    -- Move focus to the master window.
    , ((modMask, xK_m), windows W.focusMaster )
    -- Swap the focused window and the master window.
    , ((modMask, xK_Return), windows W.swapMaster)
    -- Swap the focused window with the next window.
    , ((modMask .|. shiftMask, xK_j), windows W.swapDown )
    -- Swap the focused window with the previous window.
    , ((modMask .|. shiftMask, xK_k), windows W.swapUp )
    -- Shrink the master area.
    , ((modMask, xK_h), sendMessage Shrink)
    -- Expand the master area.
    , ((modMask, xK_l), sendMessage Expand)
    -- Push window back into tiling.
    , ((modMask, xK_t), withFocused $ windows . W.sink)
    -- Increment the number of windows in the master area.
    , ((modMask, xK_comma), sendMessage (IncMasterN 1))
    -- Decrement the number of windows in the master area.
    , ((modMask, xK_period), sendMessage (IncMasterN (-1)))
    -- Toggle the status bar gap.
    -- TODO: update this binding with avoidStruts, ((modMask, xK_b),
    -- Quit xmonad.
    , ((modMask .|. shiftMask, xK_q), io (exitWith ExitSuccess))
    -- Restart xmonad.
    , ((modMask, xK_q), restart "xmonad" True)
    ++
    -- mod-[1..9], Switch to workspace N
    -- mod-shift-[1..9], Move client to workspace N
    [((m .|. modMask, k), windows $ f i)
    | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
    , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
    ++
    -- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
    -- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
    [((m .|. modMask, key), screenWorkspace sc >>= flip whenJust (windows . f))
    | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
    , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
    -- Mouse bindings
    -- Focus rules
    -- True if your focus should follow your mouse cursor.
    myFocusFollowsMouse :: Bool
    myFocusFollowsMouse = True
    myMouseBindings (XConfig {XMonad.modMask = modMask}) = M.fromList $
    -- mod-button1, Set the window to floating mode and move by dragging
    ((modMask, button1),
    (\w -> focus w >> mouseMoveWindow w))
    -- mod-button2, Raise the window to the top of the stack
    , ((modMask, button2),
    (\w -> focus w >> windows W.swapMaster))
    -- Closed focus window. Modmask + Ctrl + Middle mouse button.
    , ((modMask .|. controlMask, button2), (\w -> focus w >> kill))
    -- mod-button3, Set the window to floating mode and resize by dragging
    , ((modMask, button3),
    (\w -> focus w >> mouseResizeWindow w))
    -- you may also bind events to the mouse scroll wheel (button4 and button5)
    -- mod-button4, Switch to next workspace
    , ((modMask, button4),
    (\w -> focus w >> moveTo Next HiddenNonEmptyWS))
    -- mod-button5, Switch to previous workspace
    , ((modMask, button5),
    (\w -> focus w >> moveTo Prev HiddenNonEmptyWS))
    -- Status bars and logging
    -- Perform an arbitrary action on each internal state change or X event.
    -- See the 'DynamicLog' extension for examples.
    -- To emulate dwm's status bar
    -- > logHook = dynamicLogDzen
    -- Startup hook
    -- Perform an arbitrary action each time xmonad starts or is restarted
    -- with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize
    -- per-workspace layout choices.
    -- By default, do nothing.
    myStartupHook = return ()
    -- Run xmonad with all the defaults we set up.
    main = do
    xmproc <- spawnPipe "xmobar ~/.xmonad/xmobar.hs"
    xmonad $ defaults {
    logHook = dynamicLogWithPP xmobarPP {
    ppOutput = hPutStrLn xmproc
    , ppTitle = xmobarColor xmobarTitleColor "" . shorten 50
    , ppCurrent = xmobarColor xmobarCurrentWorkspaceColor ""
    , ppSep = " : "
    , ppLayout = xmobarColor "orange" ""
    >> updatePointer (TowardsCentre 0.99 0.99) -- moves pointer to center of focused window
    -- >> updatePointer (Relative 0.99 0.99) -- moves pointer to lower right corner of focused window
    -- , manageHook = manageDocks <+> myManageHook
    , manageHook = manageSpawn <+> manageDocks <+> myManageHook
    , startupHook = setWMName "LG3D"
    -- >> spawnHere "trayer --edge top --align left --SetDockType true --SetPartialStrut true --expand true --width 6 --transparent true --alpha 0 --tint 0x000000 --height 16"
    >> spawnHere "/usr/bin/xscreensaver -no-splash &"
    >> spawnHere "udiskie --tray &"
    >> spawnHere myBackground
    -- >> spawnHere "mpd"
    -- >> spawnOn "1:main" "/home/dvm/.xmonad/bin/nload.sh"
    -- >> spawnOn "1:main" "/home/dvm/.xmonad/bin/clock.sh"
    -- >> spawnOn "1:main" "/home/dvm/.xmonad/bin/visual.sh"
    -- >> spawnHere myTerminal
    -- >> spawnOn "2:www" myInternet
    -- >> spawnOn "3:office" myCalc
    -- >> spawnOn "4:rdp" "/home/dvm/.xmonad/bin/usrds006"
    -- >> spawnOn "5:editor" myEditor
    -- >> spawnOn "6:email" "evolution"
    -- >> spawnOn "7:files" "nautilus"
    -- >> spawnOn "9:WTL" myWTL
    -- Combine it all together
    -- A structure containing your configuration settings, overriding
    -- fields in the default config. Any you don't override, will
    -- use the defaults defined in xmonad/XMonad/Config.hs
    -- No need to modify this.
    defaults = defaultConfig {
    -- simple stuff
    terminal = myTerminal,
    focusFollowsMouse = myFocusFollowsMouse,
    borderWidth = myBorderWidth,
    modMask = myModMask,
    workspaces = myWorkspaces,
    normalBorderColor = myNormalBorderColor,
    focusedBorderColor = myFocusedBorderColor,
    -- key bindings
    keys = myKeys,
    mouseBindings = myMouseBindings,
    -- hooks, layouts
    layoutHook = smartBorders $ myLayout,
    manageHook = myManageHook,
    startupHook = myStartupHook
    Actually decided to use "TowardsCentre" instead.
    For anyone else reading this, i'm currently using xmonad v0.11 and xmobar v0.20.1
    Woa! Rayman just saw you updated the post. Thanks for the explanation! Going to have to sit on that one to reread it cuz it just went over my head. Thanks for updating. I'll try your suggestion too, looks cleaner.
    Thank you all for your time.
    -Dave

  • Xmonad Status Bar Not Appearing

    Hey guys I've been reading through posts and trying to get dzen2 to appear. But it simply doesn't show up.
    So I tried using a default status bar
    main = xmonad $ defaultConfig {
    logHook = dynamicLog
    Provided from
    http://xmonad.org/xmonad-docs/xmonad-co … icLog.html
    and I still do not have any status bars appearing.
    Refer Below, changed my current xmonad configuration.
    My xmonad.hs is based of thayer's configuration.
    Last edited by Jabrick (2011-10-30 22:01:26)

    Ok I've finally got a dzen bar to appear.
    In my xinitrc where i normally start xmonad
    I now have the line
    exec xmonad | dzen2
    But nothing appears in the bar I've tried several examples and it doesn't seem to work.
    Is there something I'm missing?
    I do have a ~/.conkyrc file
    That looks like
    # Conky Config File
    # just log everything to the desktop
    # Main options (alphabetically)
    alignment bl
    background yes
    default_color 606060
    draw_outline no
    draw_shades no
    double_buffer yes
    gap_x 10
    gap_y 10
    minimum_size 100 100
    own_window yes
    own_window_type override
    own_window_transparent yes
    total_run_times 0
    update_interval 1
    use_xft yes
    xftalpha 0.7
    xftfont Verdana:size=8
    # After TEXT is formatted on screen
    TEXT
    ${tail /var/log/everything.log 20}
    This is my  xmonad config file right now....
    If I could just get this to work I can finally tinker around.
    Been frustrating! Urgh!
    --Imports--
    import XMonad
    --Actions--
    import XMonad.Actions.CycleWindows -- classic alt-tab
    import XMonad.Actions.CycleWS -- cycle thru WS', toggle last WS
    import XMonad.Actions.DwmPromote -- swap master like dwm
    --Hooks--
    import XMonad.Hooks.DynamicLog -- statusbar
    import XMonad.Hooks.EwmhDesktops -- fullscreenEventHook fixes chrome fullscreen
    import XMonad.Hooks.ManageDocks -- dock/tray mgmt
    import XMonad.Hooks.UrgencyHook -- window alert bells
    import XMonad.Hooks.SetWMName -- matlab fix
    --Layouts--
    import XMonad.Layout.Named -- custom layout names
    import XMonad.Layout.NoBorders -- smart borders on solo clients
    --Utils--
    import XMonad.Util.EZConfig -- append key/mouse bindings
    import XMonad.Util.Run(spawnPipe) -- spawnPipe and hPutStrLn
    import System.IO -- hPutStrLn scope
    import qualified XMonad.StackSet as W -- manageHook rules
    main = do
    status <- spawnPipe myDzenStatus -- xmonad status on the left
    conky <- spawnPipe myDzenConky -- conky stats on the right
    xmonad $ withUrgencyHook NoUrgencyHook $ defaultConfig
    { modMask = mod4Mask
    , borderWidth = 2
    , normalBorderColor = "#dddddd"
    , focusedBorderColor = "#0000ff"
    -- , handleEventHook = fullscreenEventHook
    , workspaces = myWorkspaces
    , layoutHook = myLayoutHook
    , manageHook = manageDocks <+> myManageHook
    <+> manageHook defaultConfig
    ,logHook = myLogHook status
    , startupHook= setWMName "LG3D"
    `additionalKeysP` myKeys
    -- Tags/Workspaces
    -- clickable workspaces via dzen/xdotool
    myWorkspaces :: [String]
    myWorkspaces = clickable . (map dzenEscape) $ ["1","2","3","4","5"]
    where clickable l = [ "^ca(1,xdotool key super+" ++ show (n) ++ ")" ++ ws ++ "^ca()" |
    (i,ws) <- zip [1..] l,
    let n = i ]
    -- Layouts
    -- the default layout is fullscreen with smartborders applied to all
    myLayoutHook = avoidStruts $ smartBorders ( full ||| mtiled ||| tiled )
    where
    full = named "X" $ Full
    mtiled = named "M" $ Mirror tiled
    tiled = named "T" $ Tall 1 (5/100) (2/(1+(toRational(sqrt(5)::Double))))
    -- sets default tile as: Tall nmaster (delta) (golden ratio)
    -- Window management
    myManageHook = composeAll
    [ className =? "MPlayer" --> doFloat
    , className =? "Vlc" --> doFloat
    , className =? "Gimp" --> doFloat
    , className =? "XCalc" --> doFloat
    , className =? "Chromium" --> doF (W.shift (myWorkspaces !! 1)) -- send to ws 2
    , className =? "Nautilus" --> doF (W.shift (myWorkspaces !! 2)) -- send to ws 3
    , className =? "Gimp" --> doF (W.shift (myWorkspaces !! 3)) -- send to ws 4
    , className =? "stalonetray" --> doIgnore
    -- Statusbar
    myLogHook h = dynamicLogWithPP $ myDzenPP { ppOutput = hPutStrLn h }
    myDzenStatus = "dzen2 -w '320' -ta 'l'" ++ myDzenStyle
    myDzenConky = "conky -c ~/.conkyrc | dzen2 -x '320' -w '704' -ta 'r'" ++ myDzenStyle
    myDzenStyle = " -h '20' -fg '#777777' -bg '#222222' -fn 'arial:bold:size=11'"
    myDzenPP = dzenPP
    { ppCurrent = dzenColor "#3399ff" "" . wrap " " " "
    , ppHidden = dzenColor "#dddddd" "" . wrap " " " "
    , ppHiddenNoWindows = dzenColor "#777777" "" . wrap " " " "
    , ppUrgent = dzenColor "#ff0000" "" . wrap " " " "
    , ppSep = " "
    , ppLayout = dzenColor "#aaaaaa" "" . wrap "^ca(1,xdotool key super+space)· " " ·^ca()"
    , ppTitle = dzenColor "#ffffff" ""
    . wrap "^ca(1,xdotool key super+k)^ca(2,xdotool key super+shift+c)"
    " ^ca()^ca()" . shorten 20 . dzenEscape
    -- Key bindings
    myKeys = [ ("M1-<Tab>" , cycleRecentWindows [xK_Alt_L] xK_Tab xK_Tab ) -- classic alt-tab behaviour
    , ("M-b" , sendMessage ToggleStruts ) -- toggle the status bar gap
    , ("M-<Tab>" , toggleWS ) -- toggle last workspace (super-tab)
    , ("M-<Right>" , nextWS ) -- go to next workspace
    , ("M-<Left>" , prevWS ) -- go to prev workspace
    , ("M-S-<Right>", shiftToNext ) -- move client to next workspace
    , ("M-S-<Left>" , shiftToPrev ) -- move client to prev workspace
    , ("M-r" , spawn "xmonad --restart" ) -- restart xmonad w/o recompiling
    , ("M-x" , spawn "chromium" ) -- launch browser
    , ("M-S-x" , spawn "chromium --incognito" ) -- launch private browser
    , ("C-M1-<Delete>" , spawn "sudo shutdown -r now" ) -- reboot
    , ("C-M1-<End>" , spawn "sudo shutdown -h now" ) -- poweroff
    , ("<XF86AudioMute>" , spawn "amixer -q sset Master toggle") --Toggle Volume
    , ("<XF86AudioLowerVolume>", spawn "amixer -q sset Master 2- unmute") -- lower volume
    , ("<XF86AudioRaiseVolume>", spawn "amixer -q sset Master 2+ unmute") -- raise volume
    , ("<Print>" , spawn "import -window root `date '+%Y%m%d-%H%M%S'`.png") --Take a Screenshot

  • GHC , haskell-x11, xmonad etc issues.

    Hi,
    I upgraded ghc yesterday (or the day before, not sure) and when rebuilding xmonad I have some issues.
    When upgrading ghc I had this message:
    Proceed with installation? [Y/n] y
    checking package integrity...
    (1/1) checking for file conflicts [##############################################] 100%
    ==> Unregistering cabalized packages...
    ==> Done.
    (1/1) upgrading ghc [##############################################] 100%
    ==> All cabalized and yaourt-installed packages need to be reinstalled now.
    ==> See /usr/share/haskell/ and ghc-pkg list --user for a tentative list of affected packages.
    I assume reinstalling them using pacman/yaourt is sufficient. When installing haskell-x11 for instance I have these messages:
    Targets (1): haskell-x11-1.4.5-1
    Total Download Size: 0.00 MB
    Total Installed Size: 3.96 MB
    Proceed with installation? [Y/n] y
    checking package integrity...
    (1/1) checking for file conflicts [##############################################] 100%
    ghc-pkg: cannot find package X11-1.4.5
    error: scriptlet failed to execute correctly
    (1/1) upgrading haskell-x11 [##############################################] 100%
    Reading package info from stdin ... done.
    X11-1.4.5: dependency base-3.0.3.0 doesn't exist (use --force to override)
    error: scriptlet failed to execute correctly
    If you like this package, please install aurvote
    and vote for its inclusion/keeping in [community]
    As a consequence haskell-x11 is not available when recompiling xmonad. I have similar messages for xmonad:
    Targets (1): xmonad-0.8.1-1
    Total Download Size: 0.00 MB
    Total Installed Size: 2.93 MB
    Proceed with installation? [Y/n] y
    checking package integrity...
    (1/1) checking for file conflicts [##############################################] 100%
    ghc-pkg: cannot find package xmonad-0.8.1
    error: scriptlet failed to execute correctly
    (1/1) upgrading xmonad [##############################################] 100%
    Reading package info from stdin ... done.
    xmonad-0.8.1: dependency X11-1.4.5 doesn't exist (use --force to override)
    xmonad-0.8.1: dependency base-3.0.3.0 doesn't exist (use --force to override)
    xmonad-0.8.1: dependency containers-0.2.0.0 doesn't exist (use --force to override)
    xmonad-0.8.1: dependency directory-1.0.0.2 doesn't exist (use --force to override)
    xmonad-0.8.1: dependency process-1.0.1.0 doesn't exist (use --force to override)
    xmonad-0.8.1: dependency unix-2.3.1.0 doesn't exist (use --force to override)
    error: scriptlet failed to execute correctly
    If you like this package, please install aurvote
    and vote for its inclusion/keeping in [community]
    When I downgrade to ghc in extra and reinstall these packages they work fine, and don't have the above dependency error messages. The only error message I keep having is:
    error: scriptlet failed to execute correctly
    But this might have been there before. I have no experience in actually using ghc, so maybe I'm missing something?

    It's the right idea, but technically not feasible currently. [community] is maintained by a different set of people than [core], [extra] and [testing] (not only that, they are technically implemented differently at the moment, but devs are working on that about now). So only packages from [core] and [extra] can go through [testing] at present. Hence there is always only one version of a package in [community], and naturally it needs to be in sync with [core/extra], not [testing]. So currently it's assumed that people that use testing are technically skilled enough to know (and know how) to rebuild some community packages that need it.

  • Simple Xmonad configuration help needed.

    I have no idea how haskell works at all. But I simply love xmonad!
    Could someone help me out with my configuration? It is currently
    import XMonad
    import XMonad.Config.Xfce
    main = xmonad xfceConfig
    This works pretty well for me, for the most part. However, I need a few keybinding. First, I want ctrl-alt-arrow to change desktops and I found I can do this with "XMonad.Actions.CycleWS", which I have installed and the configuration of:
    , ("M-<Left>", prevWS )
    , ("M-<Right>", nextWS )
    , ("M-S-<Left>", shiftToPrev )
    , ("M-S-<Right>", shiftToNext )
    However, I have no idea how to do this. Also, I would like XF86AudioRaiseVolume to execute "amixer set Master 5dB+" and XF86AudioLowerVolume to "amixer set Master 5dB-" and XF86AudioMute to "amixer set Master toggle". I know I could easily do this with xbindkeys or some other extra keybinding daemon, but I want to learn how to do this the correct way in haskell. Thanks!

    Is this your whole xmonad.hs ? Anyway for the keybindings part ( for multimediakeys i use xbindkeys because i use the same xmonad.hs on my laptop plus desktop ) , but you can do it without xbindkeys wich is much nicer, less apps needed. If your keys are already reconignized as XF86AudioMute then you wouldnt have to use xmodmap. You can define keys in two various ways in XMonad with the additional keysP (Util.EZconfig ) or with keys = Mykeys
    I always learn from looking into others people's configs , so here is an config from another arch user. Look for the section myKeys, and define something like :
    , ("<XF86AudioLowerVolume>", spawn amixer set Master 5dB+)
    if you are interested here is my config
    Further reference
    Last edited by jelly (2009-07-31 00:31:09)

  • Xmonad, lock the mod key to simulate modal behavior.

    Hi,  I just had an idea that I would like to try out, however I can't figure out a good way to go about implementing it.
    I'm currently using xmonad as my wm, and I have myModMask set to the Super_L key.  what I would like to do is have this key lock in a similar fashion to the caps-lock key so that I can achieve a vim like modal behavior for my desktop environment.  basically I spend a lot of time moving windows around etc. and I'm tired of having my pinky tied up during these moves, so I thought I'd try this out.
    xmodmap doesn't seem to allow me to do what I need, so I'm thinking I might be able to do something with my xmonad.hs... any ideas?

    Hi!
    I haven't had the patience to start learning haskell... in the mean time I hacked this together;
    http://pastebin.com/3BDTier2
    There's a "recursive submap" called myGeneralSubMap. It works for the basic stuff (moving windows around and stuff), but spawning stuff is broken/ugly; it'll spawn the command only once you *leave* the recursive submap.
    Does anyone have an idea on how to fix that?
    What bothers me with this is that the list of my keybindings is doubled; once for the normal keys, and once for the submap. What would be the elegant haskell way of using one list for both instances?
    Last edited by wonko7 (2011-12-29 21:46:40)

  • Xmonad change modMask if mac keyboard

    I'd like to change my modMask in xmonad if I'm on a mac, but otherwise leave it alone.  I'm confused about two different aspects of this.  Can I tell the difference between a qwerty on a mac vs non-mac keyboards?  And is there a way to get the default value for modMask or conditionally set it (instead of just looking up the default and hardcoding it)?  I'm not sure how this would work if I had an external keyboard hooked up to my mac, but it'd be cool to at least get it working for the normal cases.  Thanks for any help

    To answer the questions directly:
    1) The only means I know of is using the USB product and vendor IDs.  The layout and variant is not published by the keyboard.
    2) It's haskell.  But this may not be necessary:
    Perhaps instead of making the modMask dynamic, you could use xmodmap to change the key membership of the corresponding modifier?  And udev should be able to handle the keyboard detection.
    I have 2 xmodmap config files (one for each state), which are triggered by a udev script like:
    /etc/udev/rules.d/90-kbd.rules:
    SUBSYSTEM=="usb", ATTRS{idVendor}=="<USB vendor ID>", ATTRS{idProduct}=="<USB product ID>", ENV{REMOVE_CMD}="<command to set state on removal>", RUN+="<command to set state on device connection>"
    And so you can use this to set a default layout (REMOVE_CMD), and alter it when a certain device is attached (RUN).
    You will probably need to use xhost to loosen security on the X11 session so xmodmap can make the changes when initiated via udev.

  • Gnome-settings-daemon crash constantly in xmonad

    Until a few days ago i used openbox and gnome-settings-daemon. This worked flawlessly and i dont think it crashed once.
    Then i wanted to try out xmonad since i read it was great. Since then gnome-settings-daemon have crashed constantly i would call it. It can work for hours or it can crash two or three times in an hour. I have tried to search for a solution but with no luck. There is no pattern to it. It can crash if i close gedit, firefox, digikam, etc.
    [yama@inferi ~]$ gnome-settings-daemon
    (gnome-settings-daemon:5565): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",
    (gnome-settings-daemon:5565): Gtk-WARNING **: Default font does not have a positive size
    (gnome-settings-daemon:5565): Gtk-WARNING **: Default font does not have a positive size
    (gnome-settings-daemon:5565): Gtk-WARNING **: Default font does not have a positive size
    (gnome-settings-daemon:5565): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",
    (gnome-settings-daemon:5565): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",
    xrdb: "*Label.background" on line 220 overrides entry on line 150
    xrdb: "*Text.background" on line 226 overrides entry on line 191
    xrdb: "*Label.foreground" on line 232 overrides entry on line 151
    xrdb: "*Text.foreground" on line 238 overrides entry on line 192
    (gnome-screensaver:5576): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",
    (gnome-screensaver:5576): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",
    The program 'gnome-settings-daemon' received an X Window System error.
    This probably reflects a bug in the program.
    The error was 'BadMatch (invalid parameter attributes)'.
    (Details: serial 15206 error_code 8 request_code 20 minor_code 0)
    (Note to programmers: normally, X errors are reported asynchronously;
    that is, you will receive the error a while after causing it.
    To debug your program, run it with the --sync command line
    option to change this behavior. You can then get a meaningful
    backtrace from your debugger if you break on the gdk_x_error() function.)
    [1223385076,000,xklavier.c:xkl_engine_start_listen/] The backend does not require manual layout management - but it is provided by the application[yama@inferi ~]$
    (gnome-screensaver:5580): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",
    The only process that survive is gnome-screensaver.
    I dont know if there is more info to add. If i have let something out please let me know.

    The same happens to me.

  • Xmonad doesn't respect dual screen

    I have a dual screen setup.
    When I run xmonad it maximizes the windows across the screens and not on each monitor.
    Do I have to change something in the config file ?
    regards,

    Hi here is the xmonad.sh
    import XMonad
    import System.Exit
    import qualified XMonad.StackSet as W
    import qualified Data.Map as M
    import XMonad.Util.Run
    import XMonad.Hooks.DynamicLog
    import XMonad.Hooks.ManageDocks
    import XMonad.Layout.NoBorders
    import XMonad.Layout.Tabbed
    import System.IO
    -- -xos4-terminus-medium-r-*-*-14-*-*-*-*-*-*-*
    myLauncher :: String
    myLauncher = "`dmenu_path | dmenu -fn '-xos4-terminus-medium-r-*-*-14-*-*-*-*-*-*-*' -nb '#303030' -nf '#959595' -sf '#FFFFFF' -sb '#606060'`"
    myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
    [ ((modMask .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)
    , ((modMask, xK_p ), spawn myLauncher)
    , ((modMask .|. shiftMask, xK_c ), kill)
    , ((modMask, xK_space ), sendMessage NextLayout)
    , ((modMask .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
    , ((modMask, xK_n ), refresh)
    , ((modMask, xK_Tab ), windows W.focusDown)
    , ((modMask, xK_j ), windows W.focusDown)
    , ((modMask, xK_k ), windows W.focusUp )
    , ((modMask, xK_m ), windows W.focusMaster )
    , ((modMask, xK_Return), windows W.swapMaster)
    , ((modMask .|. shiftMask, xK_j ), windows W.swapDown )
    , ((modMask .|. shiftMask, xK_k ), windows W.swapUp ) , ((modMask, xK_h ), sendMessage Shrink) , ((modMask, xK_l ), sendMessage Expand)
    , ((modMask, xK_t ), withFocused $ windows . W.sink)
    , ((modMask , xK_comma ), sendMessage (IncMasterN 1))
    , ((modMask , xK_period), sendMessage (IncMasterN (-1)))
    , ((modMask .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
    , ((modMask , xK_q ), restart "xmonad" True)
    , ((modMask .|.shiftMask .|. controlMask , xK_c ), spawn "emacs ~/.xmonad/xmonad.hs")
    , ((modMask .|. controlMask , xK_l ), spawn "xscreensaver-command -lock")
    , ((modMask .|. controlMask , xK_k ), spawn "python ~/pythonScripts/SwitchKbLayoutDesk/src/setNextKbLayout.py")
    , ((modMask , xK_b ), sendMessage ToggleStruts)
    ++
    [((m .|. modMask, k), windows $ f i)
    | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_6]
    , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
    myMouseBindings (XConfig {XMonad.modMask = modMask}) = M.fromList $
    [ ((modMask, button1), (\w -> focus w >> mouseMoveWindow w))
    , ((modMask, button2), (\w -> focus w >> windows W.swapMaster))
    , ((modMask, button3), (\w -> focus w >> mouseResizeWindow w))
    myLayouts = tiled ||| Mirror tiled ||| noBorders Full ||| simpleTabbedBottom
    where
    tiled = Tall 1 (2/100) (1/2)
    myManageHook = composeAll
    [ className =? "MPlayer" --> doFloat
    , className =? "Gimp" --> doFloat
    , className =? "Gimp" --> doFloat
    , resource =? "desktop_window" --> doIgnore ]
    myStartupHook :: X ()
    myStartupHook = do
    spawn "xset -b"
    spawn "xrdb -load ~/.Xdafaults"
    spawn "xmodmap ~/.Xmodmap"
    spawn "xscreensaver -no-splash"
    main = do
    h <- spawnPipe "dzen2 -w 1024 -ta l -fn ' -*-lucida-*-*-normal-*-14-*-*-*-*-*-*-*' -bg '#303030' -fg '#FFFFFF'"
    xmonad $ defaultConfig {
    terminal = "xterm",
    focusFollowsMouse = True,
    borderWidth = 1,
    modMask = mod1Mask,
    workspaces = [" colnsole "," dev "," email "," browser "," SSH ", " extra "],
    normalBorderColor = "#303030",
    focusedBorderColor = "#55BBFF",
    keys = myKeys,
    mouseBindings = myMouseBindings,
    layoutHook = avoidStruts $ smartBorders myLayouts,
    manageHook = myManageHook <+> manageDocks,
    startupHook = myStartupHook,
    logHook = dynamicLogWithPP $ defaultPP {
    ppCurrent = wrap "^fg(#FFFFFF)^bg(#606060)" "^fg()^bg()"
    ,ppVisible = wrap "^fg(#FFFFFF)^bg()" "^fg()^bg()"
    ,ppHidden = wrap "^fg(#55BBFF)^bg()" "^fg()^bg()"
    ,ppHiddenNoWindows = wrap "^fg(#808080)^bg()" "^fg()^bg()"
    ,ppUrgent = wrap "^fg(#FF0000)^bg()" "^fg()^bg()"
    ,ppTitle = wrap " ^fg(#FFFFFF)^bg()" "^fg()^bg()"
    ,ppLayout = \x -> "^fg(#FFBB00)^bg()"
    ++ case x of
    "Tall" -> "Tiled"
    "Full" -> "Full"
    "Mirror Tall" -> "Tiled Bottom"
    "Tabbed Bottom Simplest" -> "Tabbed"
    _ -> x
    ++ "^fg()^bg()"
    ,ppSep = " "
    ,ppWsSep = ""
    ,ppOutput = hPutStrLn h
    here the xorg.conf
    # xorg.conf (X.Org X Window System server configuration file)
    # This file was generated by dexconf, the Debian X Configuration tool, using
    # values from the debconf database.
    # Edit this file with caution, and see the xorg.conf manual page.
    # (Type "man xorg.conf" at the shell prompt.)
    # This file is automatically updated on xserver-xorg package upgrades *only*
    # if it has not been modified since the last upgrade of the xserver-xorg
    # package.
    # If you have edited this file but would like it to be automatically updated
    # again, run the following command:
    # sudo dpkg-reconfigure -phigh xserver-xorg
    Section "Screen"
    Identifier "Default Screen"
    Monitor "Configured Monitor"
    Device "Configured Video Device"
    Defaultdepth 24
    EndSection
    Section "Device"
    Identifier "Configured Video Device"
    Option "UseFBDev" "true"
    Option "VideoOverlay" "on"
    Option "OpenGLOverlay" "off"
    Driver "fglrx"
    EndSection
    Section "InputDevice"
    Identifier "Generic Keyboard"
    Driver "kbd"
    Option "XkbRules" "xorg"
    Option "XkbModel" "pc105"
    #Option "XkbLayout" "us"
    #Option "XkbVariant" "us"
    #Option "XkbOptions" "compose:lwin"
    #Option "XkbOptions" "compose:rwin"
    EndSection
    Section "InputDevice"
    Identifier "Configured Mouse"
    Driver "mouse"
    Option "CorePointer"
    EndSection
    Section "ServerLayout"
    Identifier "Default Layout"
    screen "Default Screen"
    EndSection
    Section "Monitor"
    Identifier "Configured Monitor"
    EndSection
    Section "Extensions"
    Option "Composite" "Enable"
    EndSection

Maybe you are looking for