[xmonad] A few issues with xmonad I'd like to fix

Laurent Humblet laurent.humblet at gmail.com
Mon Jul 25 10:38:09 CEST 2011


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 at seas.upenn.edu wrote:
> Quoting Laurent Humblet <laurent.humblet at gmail.com>:
>
>
>>> http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-LayoutCombinators.html#7
>>>
>>
>> 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.html#v%3AcycleRecentWindows
>
>
>>>> 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
>
> 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 at haskell.org
> http://www.haskell.org/mailman/listinfo/xmonad
>





More information about the xmonad mailing list