LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 09-06-2011, 01:45 PM   #1
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Haskell in xmonad


I'm not sure if this might be better off in programming, but it specifically relates to xmonad.

I based my configuration on John Goerzen's configuration, so my manageHooks line looks like this:

Code:
main = do
        xmproc <- spawnPipe "xmobar"
        xmonad $ defaultConfig {
        -- *snip*
            workspaces = ["1:work", "2:im", "3:media", "4:web"] ++ map show [5 .. 9 :: Int],
            manageHook = myManageHook <+> manageDocks <+> manageHook defaultConfig, 
            layoutHook = avoidStruts $ layoutHook defaultConfig,
        -- *snip*
        } --*snip*

myManageHook = composeAll
    [
        className =? "firefox-bin" --> doShift "4:web"
    ]
This is to allow me to put a statusbar and tray at the top of the screen. However, I would also like to use manageHooks as described in this section of the Xmonad wiki, sending e.g. firefox to my 'web' workspace.

I've been unable to find any reference to the <+> operator on the internet, so I don't know if my attempt at customisation even makes any sense; it certainly doesn't work as I would expect (firefox always opens on the current workspace).

So my question is twofold:
* How can I edit my xmonad.hs file to allow me to get it to work?
* Does anyone have a good introduction to Haskell? The simplest one I've found is http://www.haskell.org/tutorial/index.html but I found that a bit heavy going (it seems to be aimed at people who are at least passingly conversant with functional programming)

Thanks,
 
Old 09-06-2011, 04:59 PM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
Quote:
Originally Posted by Snark1994 View Post
I've been unable to find any reference to the <+> operator on the internet
It's documented here:

http://xmonad.org/xmonad-docs/xmonad...#v%3A%3C%2B%3E

Quote:
Does anyone have a good introduction to Haskell?
Yes. Microsoft (of all people) has an excellent introduction to Haskell:

C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals

Last edited by dugan; 09-06-2011 at 05:19 PM.
 
1 members found this post helpful.
Old 09-07-2011, 10:54 AM   #3
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632

Original Poster
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Thank you so much - I'll watch them later

It turns out the problem was not in fact with my haskell but with my manageHook - if I change "firefox-bin" to "Firefox" then it works as required.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Haskell: Why are these ambiguous? hydraMax Programming 3 04-28-2011 12:35 AM
Haskell: I/O Not in Order? hydraMax Programming 2 04-18-2011 07:02 PM
[SOLVED] Are there any haskell programers who can help me with learning? HajdukJanko Programming 12 01-24-2011 06:45 PM
haskell question satori@sanitarium Programming 1 10-20-2009 05:35 PM
Programming Haskell in Slackware 10.2 ivoencarnacao Slackware 4 10-08-2005 10:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 02:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration