
Hello, I am trying to get xmonad running on my laptop (ubuntu hardy) and run into some small but annoying problems which I cannot solve browsing through the docs: - I do not have extra workspaces: mod + 1 ..9 does not work - I do not have power management: just need suspend when lid is shutdown. I tried launching gnome-power-manager with gnome-settings-daemon but this does not work, reporting failure to connect to dbus - fonts aren't antialiased on firefox (very minor, I know, but unpleasing to the eyes) I would greatly appreciate any help. Thanks Arnaud

On Sun, Sep 21, 2008 at 10:52 PM, Arnaud Bailly
- I do not have extra workspaces: mod + 1 ..9 does not work
What config are you using? That's where magic like that is bound.
- I do not have power management: just need suspend when lid is shutdown. I tried launching gnome-power-manager with gnome-settings-daemon but this does not work, reporting failure to connect to dbus
xmonad's parent process needs to be a part of a dbus. In your .xinitrc or .xsession or wherever, use "dbus-launch xmonad". Then all the processes that are children of xmonad (or whatever you execute with dbus-launch) will be able to communicate via that session bus. -- Fred

Hello,
Fred Blasdel
On Sun, Sep 21, 2008 at 10:52 PM, Arnaud Bailly
wrote: - I do not have extra workspaces: mod + 1 ..9 does not work
What config are you using? That's where magic like that is bound.
Here is my .xmonad/xmonad.hs: import XMonad import XMonad.Config.Gnome import XMonad.Hooks.DynamicLog import XMonad.Hooks.ManageDocks import XMonad.Util.Run(spawnPipe) import XMonad.Util.EZConfig(additionalKeys) import System.IO main = xmonad gnomeConfig { manageHook = manageDocks <+> manageHook defaultConfig ,layoutHook = avoidStruts $ layoutHook defaultConfig ,modMask = mod4Mask } Actually, I removed .gnome2/session file and added WINDOW_MANAGER variable to .gnomerc and now have gnome + xmonad running. I still do not have workspace switching, but power management is OK. Thanks a lot for your answers. I shall continue my exploration of xmonad.. Arnaud

On Mon, Sep 22, 2008 at 12:57:56PM +0000, Arnaud Bailly wrote:
main = xmonad gnomeConfig { manageHook = manageDocks <+> manageHook defaultConfig ,layoutHook = avoidStruts $ layoutHook defaultConfig gnomeConfig already includes manageDocks/avoidStruts. No need for the above two lines.
I still do not have workspace switching, but power management is OK. That sounds fishy -- other xmonad key bindings work?

Devin Mullins
On Mon, Sep 22, 2008 at 12:57:56PM +0000, Arnaud Bailly wrote:
main = xmonad gnomeConfig { manageHook = manageDocks <+> manageHook defaultConfig ,layoutHook = avoidStruts $ layoutHook defaultConfig gnomeConfig already includes manageDocks/avoidStruts. No need for the above two lines.
OK. Just copy/paste between various configurations :-)
I still do not have workspace switching, but power management is OK. That sounds fishy -- other xmonad key bindings work?
Yes. At least mod + shift + enter, mod + p, mod + tab. mod+q does not work but this seems to be a path problem. I have azerty keyboard where numbers are accessed with shift key on. But I tried activating numpad and it does not work either. Thanks Arnaud

On Mon, Sep 22, 2008 at 3:19 PM, Arnaud Bailly
I have azerty keyboard where numbers are accessed with shift key on.
That sounds like the issue, you'll probably have to futz around with xev, xkeycaps, and the xkb tools to get things straightened out
But I tried activating numpad and it does not work either.
The numpad keys and normal numbers are different keypresses, then are mangled by your keyboard mapping, and then are mapped onto different keysyms (which is what xmonad uses as an xlib program). An easy way out would be to try defining the bindings again manually, only this time using "xK_KP_1" instead of "xK_1" so that the keypad is used. -- Fred

On Mon, Sep 22, 2008 at 08:44:32PM -0700, Fred Blasdel wrote:
An easy way out would be to try defining the bindings again manually, only this time using "xK_KP_1" instead of "xK_1" so that the keypad is used.
As an example of this: import XMonad import qualified XMonad.StackSet as W import XMonad.Config.Gnome import XMonad.Util.EZConfig (additionalKeys) main = xmonad $ gnomeConfig { -- NOTE the extra $ sign modMask = mod4Mask } `additionalKeys` -- copied-ish from XMonad/Config.hs [((m .|. mod4Mask, k), windows $ f i) | (i, k) <- zip (workspaces gnomeConfig) [xK_KP_1 .. xK_KP_9] , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] Given that you're holding shift, I'm surprise it doesn't zap the window to the other workspace. I guess xev might help. Oh, you crazy kids and your keyboard layouts.

Devin Mullins
As an example of this:
import XMonad import qualified XMonad.StackSet as W import XMonad.Config.Gnome import XMonad.Util.EZConfig (additionalKeys)
main = xmonad $ gnomeConfig { -- NOTE the extra $ sign modMask = mod4Mask } `additionalKeys` -- copied-ish from XMonad/Config.hs [((m .|. mod4Mask, k), windows $ f i) | (i, k) <- zip (workspaces gnomeConfig) [xK_KP_1 .. xK_KP_9] , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
Let me translate: - m .|. is modifier of keys - k is keysym (?) - windows is a function that activate some window - f is activation mode (?) - i is window number extracted from gnome The given setting does not work. On my keyboard, 1 is over '&', so maybe I could try xK_K_AMP (or something similar) ?
Given that you're holding shift, I'm surprise it doesn't zap the window to the other workspace. I guess xev might help. Oh, you crazy kids and your keyboard layouts.
Hmmm. I am getting a bit old for a kid, given I have kids myself. And actually, all french, belgian, swiss, french canadian and quite a bunch of african countries keyboards have such a layout, which makes for approximatively a couple hundred million people ;-) Best regards and thanks again for helping, Arnaud

On 2008 Sep 23, at 5:03, Arnaud Bailly wrote:
The given setting does not work. On my keyboard, 1 is over '&', so maybe I could try xK_K_AMP (or something similar) ?
It's actually looking for the 1 key in the numeric keypad (xK_KP_1 vs. xK_1). -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

[((m .|. mod4Mask, k), windows $ f i) | (i, k) <- zip (workspaces gnomeConfig) [xK_KP_1 .. xK_KP_9] , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
Corrections:
- m .|. is modifier of keys m is a modifier bitmask -- 0 means nothing pressed, shiftMask means shift pressed. m .|. n is the combination of two modmasks -- in this case m .|. mod4Mask means "mod4 and m held down". Here, mod4 corresponds to W.greedyView, mod4-shift corresponds to W.shift.
- k is keysym (?) Yes. See: ~$ ghci GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help Loading package base ... linking ... done. Prelude> import XMonad Prelude XMonad> :i xK_KP_1 xK_KP_1 :: KeySym -- Defined in Graphics.X11.Types If you search the internets, you'll find documentation for the Types module, including a list of all the KeySyms. (Assuming it's up to date.)
- windows is a function that activate some window - f is activation mode (?) windows is a bit of a magical function. It converts a pure StackSet mutator into an X action. In other words, f is all the business logic that says "move this window here" and so on, and windows is the dirty greasy implementation that actually interacts with X.
In this case, f is either W.greedyView or W.shift. See StackSet documentation or source code for info.
- i is window number extracted from gnome i is the window number extracted from xlib. See `xprop`, for example.
The given setting does not work. On my keyboard, 1 is over '&', so maybe I could try xK_K_AMP (or something similar) ? What Brandon said.

On 2008 Sep 23, at 0:55, Devin Mullins wrote:
On Mon, Sep 22, 2008 at 08:44:32PM -0700, Fred Blasdel wrote:
An easy way out would be to try defining the bindings again manually, only this time using "xK_KP_1" instead of "xK_1" so that the keypad is used.
I see I missed context. To use the shifted 1-9, you must add `.|. shiftMask' after `.|. mod4Mask' and then use the unshifted keysyms; xmonad's keyboard stuff is at the event layer, so it can't see xK_1 if it requires modifiers. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

Arnaud Bailly
I have azerty keyboard where numbers are accessed with shift key on. But I tried activating numpad and it does not work either.
See examples for french keyboards in http://haskell.org/haskellwiki/Xmonad/Config_archive for example mine http://haskell.org/haskellwiki/Xmonad/Config_archive/TeXitoi%27s_xmonad.hs -- Guillaume Pinot http://www.irccyn.ec-nantes.fr/~pinot/ ``Computers are good at following instructions, but not at reading your mind.'' -- Donald E. Knuth, the TeXbook () ASCII ribbon campaign -- Against HTML e-mail /\ http://www.asciiribbon.org -- Against proprietary attachments

TeXitoi
Arnaud Bailly
writes: I have azerty keyboard where numbers are accessed with shift key on. But I tried activating numpad and it does not work either.
See examples for french keyboards in http://haskell.org/haskellwiki/Xmonad/Config_archive for example mine http://haskell.org/haskellwiki/Xmonad/Config_archive/TeXitoi%27s_xmonad.hs
WUnderbar ! It works ! Thanks a lot, everything works quite fine. Next objective is trying xmobar/dzen :-) Regards, Arnaud Bailly

On Tue, Sep 23, 2008 at 11:02:59AM +0200, TeXitoi wrote:
See examples for french keyboards in http://haskell.org/haskellwiki/Xmonad/Config_archive for example mine http://haskell.org/haskellwiki/Xmonad/Config_archive/TeXitoi%27s_xmonad.hs
I went ahead and converted the azerty-related portion of that into xmonad-contrib as XMonad.Config.Azerty. Is that useful to any body?

Devin Mullins
On Tue, Sep 23, 2008 at 11:02:59AM +0200, TeXitoi wrote:
See examples for french keyboards in http://haskell.org/haskellwiki/Xmonad/Config_archive for example mine http://haskell.org/haskellwiki/Xmonad/Config_archive/TeXitoi%27s_xmonad.hs
I went ahead and converted the azerty-related portion of that into xmonad-contrib as XMonad.Config.Azerty. Is that useful to any body?
I think it's great. Thanks for the feature. I must say that the keycodes for "1..9,0" came from http://haskell.org/haskellwiki/Xmonad/Config_archive/nattfodd%27s_xmonad.hs -- Guillaume Pinot http://www.irccyn.ec-nantes.fr/~pinot/ ``Computers are good at following instructions, but not at reading your mind.'' -- Donald E. Knuth, the TeXbook () ASCII ribbon campaign -- Against HTML e-mail /\ http://www.asciiribbon.org -- Against proprietary attachments

On 2008 Sep 22, at 18:19, Arnaud Bailly wrote:
Devin Mullins
writes: On Mon, Sep 22, 2008 at 12:57:56PM +0000, Arnaud Bailly wrote:
I still do not have workspace switching, but power management is OK. That sounds fishy -- other xmonad key bindings work?
Yes. At least mod + shift + enter, mod + p, mod + tab. mod+q does not work but this seems to be a path problem.
I have azerty keyboard where numbers are accessed with shift key on. But I tried activating numpad and it does not work either.
Still more context (sorry, our mail server bit the dust over the weekend). The problem with the keypad is almost certainly that you need to strip out the modifier that represents the numlock key (which is "nonstandard" from the point of view of X11, which was developed on and for workstations that didn't use a numlock key --- that came in only with PCs). -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH
participants (5)
-
Arnaud Bailly
-
Brandon S. Allbery KF8NH
-
Devin Mullins
-
Fred Blasdel
-
TeXitoi