You are not logged in.

#1 2011-06-11 17:38:16

Draucia
Member
Registered: 2011-06-05
Posts: 128

[SOLVED]xmobar on xmonad

Hey I just installed xmonad (total noob atm) and I was reading this guide: http://www.haskell.org/haskellwiki/Xmon … figuration and I installed xmobar through pacman. For some reason it's not showing up. Here is my ~/.xmonad/xmonad.hs

import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO

main = do
    xmproc <- spawnPipe "~/.xmobarrc"
    xmonad $ defaultConfig
        { manageHook = manageDocks <+> manageHook defaultConfig
        , layoutHook = avoidStruts  $  layoutHook defaultConfig
    , logHook = dynamicLogWithPP xmobarPP
                        { ppOutput = hPutStrLn xmproc
                        , ppTitle = xmobarColor "green" "" . shorten 50
                        }
        , modMask = mod4Mask     -- Rebind Mod to the Windows key
        } `additionalKeys`
        [ ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
        , ((0, xK_Print), spawn "scrot")
        ]

Here is my ~/.xmobarrc

Config { font = "-*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*"
       , bgColor = "black"
       , fgColor = "grey"
       , position = TopW L 90
       , lowerOnStart = True
       , commands = [ Run Weather "EGPF" ["-t"," <tempF>F","-L","64","-H","77","--normal","green","--high","red","--low","lightblue"] 36000
                    , Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10
                    , Run Memory ["-t","Mem: <usedratio>%"] 10
                    , Run Swap [] 10
                    , Run Date "%a %b %_d %l:%M" "date" 10
                    , Run StdinReader
                    ]
       , sepChar = "%"
       , alignSep = "}{"
       , template = "%StdinReader% }{ %cpu% | %memory% * %swap%    <fc=#ee9a00>%date%</fc> | %EGPF%"
       }

And here is my xinitrc:

# sets the cursor
xsetroot -cursor_name left_ptr
# start xmonad
exec ck-launch-session xmonad

I don't have xmobar on my xinitrc because on the guide (linked at the starting of the thread) it used a different method (xmproc <- spawnPipe "~/.xmobarrc").

xmobar isn't showing up sad Any help would be appreciated.

Last edited by Draucia (2011-06-11 21:14:25)

Offline

#2 2011-06-11 17:59:28

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED]xmobar on xmonad

You posted your xmonad.hs file instead of your xmobarrc file...

It's been ages since I've used xmobar (dzen2 here), but the command from the link you pasted above calls xmobar in the spawnPipe command:

xmproc <- spawnPipe "/path/to/xmobarbinary /home/jgoerzen/.xmobarrc"

As well, it's possible that you'll need to use the full path for your user directory. I don't know if that's the case though.

Offline

#3 2011-06-11 18:21:40

Draucia
Member
Registered: 2011-06-05
Posts: 128

Re: [SOLVED]xmobar on xmonad

skottish wrote:

You posted your xmonad.hs file instead of your xmobarrc file...

It's been ages since I've used xmobar (dzen2 here), but the command from the link you pasted above calls xmobar in the spawnPipe command:

xmproc <- spawnPipe "/path/to/xmobarbinary /home/jgoerzen/.xmobarrc"

As well, it's possible that you'll need to use the full path for your user directory. I don't know if that's the case though.

Yeah sorry I should of proof read lol. Anyways, what is my xmobarbinary?

Offline

#4 2011-06-11 18:48:13

kofrad
Member
From: South Florida, USA
Registered: 2011-05-15
Posts: 45

Re: [SOLVED]xmobar on xmonad

It should be '/usr/bin/xmobar'


Desktop: Arch Linux | AMD Athlon 64 X2 Dual Core 5000+ | 3GB RAM | GeForce 6800 XT 512MB | 1TB+
Audio Studio: XP SP3 | Intel Pentium 4 3GHz Prescott | 1GB DDR | GeForce 6800 128MB | 120GB

Offline

#5 2011-06-11 21:13:55

Draucia
Member
Registered: 2011-06-05
Posts: 128

Re: [SOLVED]xmobar on xmonad

Thanks guys... I overlooked that part in the guide. You guys are really helpful.

Offline

Board footer

Powered by FluxBB