For Darcs-Head: How to change Keybindings

Hi, I just switched from the old way to change the Config to the new one with the .xmonad directory but ran into two problems: 1. I want to override the MOD+p call, because I need dmenu to be run with a additional parameter (fn for fontname). I dont want to copy the whole keys-config to my own config but only override the one keypress. As I got now Haskell-Knowledge at all, I would be glad if somebody could help me here. 2. If I try to restart XMonad using MOD+q nothing happens, it doesnt reload at all. On the Console I can see: ---- xmonad: ExecuteFile: does not exist (No such file or directory) ---- I dont think my setup is special at all: my PATH is ~/bin:~/bin:/usr/local/bin:/usr/bin:/bin:/usr/games I configured xmonad using --prefix=/home/dominik --user and installed it without parameters. The XMonad Binary went into ~/bin/xmonad, which should be right. So, where is the problem? Everything works if I restart XMonad by hand (killing the xserver and starting again) Thanks for everybody who helps me. Thanks Dominik

On Mon, Nov 12, 2007 at 12:58:37AM +0100, Dominik Bruhn wrote:
Hi, I just switched from the old way to change the Config to the new one with the .xmonad directory but ran into two problems:
1. I want to override the MOD+p call, because I need dmenu to be run with a additional parameter (fn for fontname). I dont want to copy the whole keys-config to my own config but only override the one keypress. As I got now Haskell-Knowledge at all, I would be glad if somebody could help me here.
2. If I try to restart XMonad using MOD+q nothing happens, it doesnt reload at all. On the Console I can see: ---- xmonad: ExecuteFile: does not exist (No such file or directory) ----
I dont think my setup is special at all: my PATH is ~/bin:~/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
That should be /home/dominik/bin:/usr/local/bin:/usr/bin:/bin:/usr/games; ~-expansion only occurs directly on the command line, not in other contexts (like $PATH). Stefan

dominik:
Hi, I just switched from the old way to change the Config to the new one with the .xmonad directory but ran into two problems:
1. I want to override the MOD+p call, because I need dmenu to be run with a additional parameter (fn for fontname). I dont want to copy the whole keys-config to my own config but only override the one keypress. As I got now Haskell-Knowledge at all, I would be glad if somebody could help me here.
To override, delete or add keys to the Map of keys you have two options: 1) as for 0.4 and earlier, inline the entire default key set in your config file, and edit it. 2) use Map.union/delete/insert to modify only those bindings you're interested in (leading to a shorter config file) For 2) see sjanssen's config demo in the XMC repo, http://code.haskell.org/XMonadContrib/XMonad/Config/Sjanssen.hs
2. If I try to restart XMonad using MOD+q nothing happens, it doesnt reload at all. On the Console I can see:
Not in your path, most likely.
So, where is the problem? Everything works if I restart XMonad by hand (killing the xserver and starting again)
Thanks for everybody who helps me.
Thanks for the report. We'll have extensive docs and tutorials on configuration before the 0.5 release. Until then , the wiki and the XMC repo, and IRC channel are the best sources, http://haskell.org/haskellwiki/Xmonad/Config_archive -- Don

To override, delete or add keys to the Map of keys you have two options:
1) as for 0.4 and earlier, inline the entire default key set in your config file, and edit it.
2) use Map.union/delete/insert to modify only those bindings you're interested in (leading to a shorter config file)
For 2) see sjanssen's config demo in the XMC repo,
http://code.haskell.org/XMonadContrib/XMonad/Config/Sjanssen.hs
You can also use XMonad.Utils.EZConfig in XMonadContrib for this; see the comments for documentation. Shachaf

Hy, thanks all for your answers, I tried the following Config (based uppon the one from Sjannen in the wiki: See attachment The problem is the following error-message uppon compiling: ---- snip ----- xmonad.hs:18:1: Ambiguous type variable `m' in the constraint: `Monad m' arising from use of `return' at xmonad.hs:18:1-6 Possible cause: the monomorphism restriction applied to the following: dominikConfig :: m (XConfig (Choose Tall (Choose (Mirror Tall) Full))) (bound at xmonad.hs:17:0) Probable fix: give these definition(s) an explicit type signature or use -fno-monomorphism-restriction -------------- Who can help me and give me a hint how to fix this error? Thanks Dominik

On Monday 12 November 2007 08:31:14 Dominik Bruhn wrote:
Hy, thanks all for your answers, I tried the following Config (based uppon the one from Sjannen in the wiki: See attachment
The problem is the following error-message uppon compiling: ---- snip ----- xmonad.hs:18:1: Ambiguous type variable `m' in the constraint: `Monad m' arising from use of `return' at xmonad.hs:18:1-6 Possible cause: the monomorphism restriction applied to the following: dominikConfig :: m (XConfig (Choose Tall (Choose (Mirror Tall) Full))) (bound at xmonad.hs:17:0) Probable fix: give these definition(s) an explicit type signature or use -fno-monomorphism-restriction --------------
Who can help me and give me a hint how to fix this error?
Thanks Dominik
Attached is a file that you can save to ~/.xmonad/xmonad.hs. Cheers, Spencer Janssen

On Sun, Nov 11, 2007 at 04:09:07PM -0800, Shachaf Ben-Kiki wrote:
To override, delete or add keys to the Map of keys you have two options:
2) use Map.union/delete/insert to modify only those bindings you're interested in (leading to a shorter config file)
For 2) see sjanssen's config demo in the XMC repo,
http://code.haskell.org/XMonadContrib/XMonad/Config/Sjanssen.hs
You can also use XMonad.Utils.EZConfig in XMonadContrib for this; see the comments for documentation.
If your config uses this, could you stick it in XMonad/Config? That's (in my opinion) the nicest way to document things. Not that nice textual documentation isn't needed, but documentation in comments naturally degrades, but documentation as code doesn't. Particularly if you actually run the documentation. -- David Roundy Department of Physics Oregon State University
participants (6)
-
David Roundy
-
Dominik Bruhn
-
Don Stewart
-
Shachaf Ben-Kiki
-
Spencer Janssen
-
Stefan O'Rear