You are not logged in.

#1 2011-04-13 22:56:25

arinlares
Member
From: Anaheim, CA
Registered: 2010-02-01
Posts: 165
Website

[solved] Xmonad, lexicon error with 'additionalKeys'

I'm working on getting Xmonad running with Tint2, and have it working except for being able to toggle the struts on/off.  I've hit a bump because I'm getting an error on what should be syntactically correct, yet I get this error when I run xmonad --recompile:

Error detected while loading xmonad configuration file: /home/arin/.xmonad/xmonad.hs

xmonad.hs:17:3:
    lexical error in string/character literal at character 'd'

Please check the file for errors.

xmonad: xmessage: executeFile: does not exist (No such file or directory)

My xmonad.hs: http://pastebin.com/7v7LYrVM

I've tried changing my indentation to 8-spaced indents, and the compiler counts the same letter as incorrect (it picks up on 17:11 rather than 17:3).  So, is there anything wrong with my setup?  As near as I can tell and according to this, it seems correct.

Last edited by arinlares (2011-04-14 07:06:38)

Offline

#2 2011-04-14 00:56:22

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: [solved] Xmonad, lexicon error with 'additionalKeys'

It looks like you're using

'additionalKeys'

where I think it expects

`additionalKeys`

So switch your single quotes to back-ticks :-)

Last edited by BurntSushi (2011-04-14 00:57:07)


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#3 2011-04-14 00:56:28

pseup
Member
Registered: 2008-06-06
Posts: 103

Re: [solved] Xmonad, lexicon error with 'additionalKeys'

You need to use backticks not single quotes. (The compiler error is because a char, as expected by using ' ', can only be 1 single char not a string of chars)

`additionalKeys` not 'additionalKeys'

And unless its a bad paste you also need to indent it below 'xmonad'

main = do  
        xmonad $ ewmh defaultConfig
          { terminal    = "urxvtc"
             ...
          }  
          `additionalKeys`
                [((mod4Mask, xK_b     ), sendMessage ToggleStruts)]

Offline

#4 2011-04-14 03:38:45

arinlares
Member
From: Anaheim, CA
Registered: 2010-02-01
Posts: 165
Website

Re: [solved] Xmonad, lexicon error with 'additionalKeys'

Thanks a bunch!  I was cross-reading the documentation on my netbook (Arch), and my desktop (Vista), and thought they were just funny quotes as today was my first time encountering them, ever.

That wasn't a bad paste, it was bad tabbing, and I'm off to go read some Vim documentation to try to get it set up once and for all as a penance for my sins.

Last edited by arinlares (2011-04-14 07:07:24)

Offline

Board footer

Powered by FluxBB