A few issues with xmonad I'd like to fix

Hi, I'm now using xmonad for two months and I really like it. I have a few questions about some issues I'd like to fix so here there are: 1) I would like to use my keypad to switch to a given layout but I don't know how to do it. For instance: MOD + SHIFT + Keypad 1 => switch to 'tiled' MOD + SHIFT + Keypad 2 => switch to 'Full' etc ... 2) When I ALT-TAB once and release ALT and TAB, I like to go back to the previous window in the stack instead of going forward again, is this possible ? 3) Is there any bypass or automatic script that could do the "# cat /proc/####/fd/4" thing automatically when xmonad freezes? 4) Is there some kind of online config generator ? Some kind of html/javascript page that would generate an xmonad.hs file automatically from a set of checkboxes (azerty keyboard, add new layouts, etc). The idea here is to ease the quick config setup for a non developer or for someone less willing to learn and hack in Haskell for instance. 5) My desktops/workspaces 6 and 8 do not work. When I MOD + 6 or MOD + 8, it doesn't switch to it at all and MOD + SHIFT + 6 or 8 doesn't move the window to that workspace. Maybe this is tied to the fact that I have an belgian azerty keyboard but I do use the azerty config. Here is my xmonad.hs config: http://pastebin.com/gd9LLn6U The config still has some commented parts in it but it's fairly clean. Thank you for your help. Best regards, Laurent

Quoting Laurent Humblet
1) I would like to use my keypad to switch to a given layout but I don't know how to do it. For instance:
MOD + SHIFT + Keypad 1 => switch to 'tiled' MOD + SHIFT + Keypad 2 => switch to 'Full' etc ...
http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-LayoutCombinators...
2) When I ALT-TAB once and release ALT and TAB, I like to go back to the previous window in the stack instead of going forward again, is this possible ?
don't understand the request
3) Is there any bypass or automatic script that could do the "# cat /proc/####/fd/4" thing automatically when xmonad freezes?
Wouldn't it be better to just avoid having xmonad freeze, instead? It looks like you're sending output to xmobar; does xmobar have a PipeReader working? Could you paste your .xmobarrc somewhere for us to take a look at?
4) Is there some kind of online config generator ? Some kind of html/javascript page that would generate an xmonad.hs file automatically from a set of checkboxes (azerty keyboard, add new layouts, etc). The idea here is to ease the quick config setup for a non developer or for someone less willing to learn and hack in Haskell for instance.
http://braincrater.wordpress.com/2008/08/28/announcing-xmonad-light/
5) My desktops/workspaces 6 and 8 do not work. When I MOD + 6 or MOD + 8, it doesn't switch to it at all and MOD + SHIFT + 6 or 8 doesn't move the window to that workspace. Maybe this is tied to the fact that I have an belgian azerty keyboard but I do use the azerty config.
The azertyKeys function appears to use raw hex-codes to specify the workspace bindings, which, I must say, doesn't sound terribly portable. I think a patch that replaced the hex-codes with their equivalent xK_* named constants would be welcomed, and probably also would reveal why they're not working for you. In any case, it will help immensely to open up xev, whack your 6 and 8 keys, and take a look at the output there. Good luck, ~d

On Wed, Jun 29, 2011 at 11:58:58AM -0400, wagnerdm@seas.upenn.edu wrote:
Quoting Laurent Humblet
: 1) I would like to use my keypad to switch to a given layout but I don't know how to do it. For instance:
MOD + SHIFT + Keypad 1 => switch to 'tiled' MOD + SHIFT + Keypad 2 => switch to 'Full' etc ...
http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-LayoutCombinators...
2) When I ALT-TAB once and release ALT and TAB, I like to go back to the previous window in the stack instead of going forward again, is this possible ?
don't understand the request
I think the OP is asking for what keys you should press focus the previous window. Dear OP, have you tried mod-shift-tab, as specified in the manual page of xmonad? (alt-shift-tab, if alt is your mod key). -- Hans Ekbrand

Excerpts from Hans Ekbrand's message from Wed 29-Jun-11 19:48:
On Wed, Jun 29, 2011 at 11:58:58AM -0400, wagnerdm@seas.upenn.edu wrote:
Quoting Laurent Humblet
: 2) When I ALT-TAB once and release ALT and TAB, I like to go back to the previous window in the stack instead of going forward again, is this possible ?
don't understand the request
I think the OP is asking for what keys you should press focus the previous window.
Dear OP, have you tried mod-shift-tab, as specified in the manual page of xmonad?
(alt-shift-tab, if alt is your mod key).
I do understand what the OP wants. You press Alt-Tab (but don't release) - xmonad switches to another workspace you want just to take look, e.g. if gcc has finished compiling, then you release Alt-Tab and return to the original workspace. That would save extra Alt-Tab press. Could be useful, I agree, but not sure how to implement it. -- Cheers, Sergey

Excerpts from Sergey Manucharian's message from Fri 01-Jul-11 13:56:
Excerpts from Hans Ekbrand's message from Wed 29-Jun-11 19:48:
On Wed, Jun 29, 2011 at 11:58:58AM -0400, wagnerdm@seas.upenn.edu wrote:
Quoting Laurent Humblet
: 2) When I ALT-TAB once and release ALT and TAB, I like to go back to the previous window in the stack instead of going forward again, is this possible ?
don't understand the request
I think the OP is asking for what keys you should press focus the previous window.
Dear OP, have you tried mod-shift-tab, as specified in the manual page of xmonad?
(alt-shift-tab, if alt is your mod key).
I do understand what the OP wants. You press Alt-Tab (but don't release) - xmonad switches to another workspace you want just to take look, e.g. if gcc has finished compiling, then you release Alt-Tab and return to the original workspace.
That would save extra Alt-Tab press. Could be useful, I agree, but not sure how to implement it.
Correction: he was talking about the windows, not workspaces, but the idea is the same. -- Cheers, Sergey

Excerpts from Sergey Manucharian's message of Fri Jul 01 13:58:28 -0600 2011:
I do understand what the OP wants. You press Alt-Tab (but don't release) - xmonad switches to another workspace you want just to take look, e.g. if gcc has finished compiling, then you release Alt-Tab and return to the original workspace.
That would save extra Alt-Tab press. Could be useful, I agree, but not sure how to implement it.
Correction: he was talking about the windows, not workspaces, but the idea is the same.
Yes the workspace one is Actions.CycleRecentWS and AFAIK the closest to what was requested for windows is the previously mentioned cycleRecentWindows from Actions.CycleWindows. The windows one isn't very comfortable for many layouts however, since it uses stack order, grabbing "previous" and "next" windows from elsewhere and putting the old focused window below or above the grabbed window. So in Full it makes sense, and for some workflows in other layouts it's helpful. It also allows "previewing without altering stack order" like cycleRecentWS, and enables picking the nth window up or down with a number key. There are several interpretations of what should be done with the window that was where the alt-tabbed new window goes. Should they swap? Should they act like they're stacked in the frame and one hides the other? In some layouts there are tools in CycleWindows to make these latter two happen too. regards, wmw

Hi, Thank you for your mail.
http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-LayoutCombinators... I was more looking for a small script snippet but I'll dig a bit more ;)
2) When I ALT-TAB once and release ALT and TAB, I like to go back to the previous window in the stack instead of going forward again, is this possible ?
don't understand the request
Forget about this, it's an old Windows habit that I have and it actually doesn't really translate into xmonad now that I think about it.
3) Is there any bypass or automatic script that could do the "# cat /proc/####/fd/4" thing automatically when xmonad freezes?
Wouldn't it be better to just avoid having xmonad freeze, instead? It looks like you're sending output to xmobar; does xmobar have a PipeReader working? Could you paste your .xmobarrc somewhere for us to take a look at?
Of course, here is my .xmobarrc: http://pastebin.com/DNzRKyWf
http://braincrater.wordpress.com/2008/08/28/announcing-xmonad-light/
Interesting.
In any case, it will help immensely to open up xev, whack your 6 and 8 keys, and take a look at the output there.
Here is the xev output for those two keys (6 = § and 8 = !) http://pastebin.com/sggScfeN Thank you for your time, Laurent

Quoting Laurent Humblet
http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-LayoutCombinators...
I was more looking for a small script snippet but I'll dig a bit more ;)
The small script snippet is to follow the import advice outlined there, then add a keybinding to the action sendMessage (JumpToLayout "Tall") for example, for the Tall layout. For other layouts, see the instructions in the link for finding out what String to put instead of "Tall".
2) When I ALT-TAB once and release ALT and TAB, I like to go back to the previous window in the stack instead of going forward again, is this possible ?
don't understand the request
Forget about this, it's an old Windows habit that I have and it actually doesn't really translate into xmonad now that I think about it.
Ah, now I know what you're asking for! I think there is functionality like Windows' alt+tab somewhere, but I can't find it. Perhaps this is like it? http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-CycleWindows.htm...
3) Is there any bypass or automatic script that could do the "# cat /proc/####/fd/4" thing automatically when xmonad freezes?
Wouldn't it be better to just avoid having xmonad freeze, instead? It looks like you're sending output to xmobar; does xmobar have a PipeReader working? Could you paste your .xmobarrc somewhere for us to take a look at?
Of course, here is my .xmobarrc:
As I suspected, you don't have a StdinReader in use. Either add that as a plugin and in your xmobar template, or simply remove logging from xmonad.hs. The latter change would leave your "main" function looking like this (with "..." in places where you don't need to make changes): main = xmonad defaultConfig { manageHook = ... , layoutHook = ... , focusedBorderColor = ... , normalBorderColor = ... , borderWidth = ... -- NO logHook! DELETE it , startupHook = spawn "/usr/bin/xmobar /home/laurent/.xmobarrc" , keys = ... } You can probably run "spawn" on its own in a do-block as you did before, but I wasn't sure whether spawn had a X () return type or a MonadIO m => m () return type, so I played it safe here and stuck it in the startupHook. Which you do is a matter of taste. After you make this change, xmonad should stop locking up.
In any case, it will help immensely to open up xev, whack your 6 and 8 keys, and take a look at the output there.
Here is the xev output for those two keys (6 = § and 8 = !)
Then perhaps you would like to use xK_section and xK_exclam in your keybindings. Good luck! ~d

Hi, Thank you for your help on fixing the various issues I had with xmonad. Sorry I didn't send this email sooner. I have applied your code and it fixed the _very_ annoying regular crash, that really did help so thank you again particularly for this :) I'm still stuck with the xK_section and xK_exclam keys and I'm requesting help here again. The issue I have is simple: I have a really hard time understanding the haskell config file. Here is my config cleaned up a bit: http://pastebin.com/rxbLXaX5 and the following line is where I'm stuck: , keys = \c -> azertyKeys c `M.union` keys defaultConfig c Here is what I'd like: set/create at the start of my config 3 distinct key bindings in 3 different vars: - custom keybindings for the 'sendMessage (JumpToLayout "Tall")' for my layouts shortcuts (myLayoutKeys) - azerty config (azertyKeys - use the existing xmonad one) - custom keybindings for xK_section and xK_exclam (myAzertyExceptionsKeys) Then I'd like to put it all into one var called myGlobalConfigKeys and add it to the main xmonad setup in xmonad.hs : xmonad $ defaultconfig { ... , keys = myGlobalConfigKeys ... } So I'm looking for a very simple sample on which I could keep on working on it alone. Sorry for asking this which might seem fairly straightforward but I have a very hard time understanding the config file. To really understand it, I believe that the best would be for me to be on voice coms for about half an hour with someone who understands it well to talk through the config itself. I can also learn haskell which I would love to do if I have some spare time but it's not the case at the moment. I did the website tutorial but it's still not clear enough for me at the moment. Thank you once again for your help, Best regards, Laurent On 07/01/2011 06:15 PM, wagnerdm@seas.upenn.edu wrote:
Quoting Laurent Humblet
: http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-LayoutCombinators...
I was more looking for a small script snippet but I'll dig a bit more ;)
The small script snippet is to follow the import advice outlined there, then add a keybinding to the action
sendMessage (JumpToLayout "Tall")
for example, for the Tall layout. For other layouts, see the instructions in the link for finding out what String to put instead of "Tall".
2) When I ALT-TAB once and release ALT and TAB, I like to go back to the previous window in the stack instead of going forward again, is this possible ?
don't understand the request
Forget about this, it's an old Windows habit that I have and it actually doesn't really translate into xmonad now that I think about it.
Ah, now I know what you're asking for! I think there is functionality like Windows' alt+tab somewhere, but I can't find it. Perhaps this is like it? http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Actions-CycleWindows.htm...
3) Is there any bypass or automatic script that could do the "# cat /proc/####/fd/4" thing automatically when xmonad freezes?
Wouldn't it be better to just avoid having xmonad freeze, instead? It looks like you're sending output to xmobar; does xmobar have a PipeReader working? Could you paste your .xmobarrc somewhere for us to take a look at?
Of course, here is my .xmobarrc:
As I suspected, you don't have a StdinReader in use. Either add that as a plugin and in your xmobar template, or simply remove logging from xmonad.hs. The latter change would leave your "main" function looking like this (with "..." in places where you don't need to make changes):
main = xmonad defaultConfig { manageHook = ... , layoutHook = ... , focusedBorderColor = ... , normalBorderColor = ... , borderWidth = ... -- NO logHook! DELETE it , startupHook = spawn "/usr/bin/xmobar /home/laurent/.xmobarrc" , keys = ... }
You can probably run "spawn" on its own in a do-block as you did before, but I wasn't sure whether spawn had a X () return type or a MonadIO m => m () return type, so I played it safe here and stuck it in the startupHook. Which you do is a matter of taste.
After you make this change, xmonad should stop locking up.
In any case, it will help immensely to open up xev, whack your 6 and 8 keys, and take a look at the output there.
Here is the xev output for those two keys (6 = § and 8 = !)
Then perhaps you would like to use xK_section and xK_exclam in your keybindings.
Good luck! ~d
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
participants (5)
-
Hans Ekbrand
-
Laurent Humblet
-
Sergey Manucharian
-
wagnerdm@seas.upenn.edu
-
Wirt Wolff