You are not logged in.

#1 2012-05-08 14:06:30

2OceanLovers
Member
Registered: 2012-05-04
Posts: 6

{Solved!!} Xmonad, XMobar, and Trayer Help

I have been working for days to get my XMonad desktop to function the way I want it to.  This is my first time trying to configure it to work.  I really enjoy the tiling aspect of XMonad, but I really feel the need some tray icons.  I have XMobar and Trayer installed, with XMobar configured to give some room for trayer, and trayer just won't show any icons.  I am at a loss.  I have searched Google, the forums here, and even on a couple of other distro forums.  Please someone help me get a working trayer!!  Thank you in advance.

Specs:
Dell Inspiron 1545
Intel Core 2 Duo T6400
Intel Graphics 945
Broadcom 4312
Kernel 3.3.5-1 ARCH

/usr/bin/startxmonad

#!/bin/bash
nitrogen --restore &
conky &
trayer --edge top --align right --widthtype request --expand true --SetDockType true --SetPartialStrut true --transparent true --alpha 0 --tint 0x1A1918 --expand true --heighttype pixel --height 14 --monitor 1 --padding 1 &
if [ -x /usr/bin/nm-applet ] ; then
   (sleep 1; nm-applet --sm-disable &)
fi
exec xmonad

~/.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 "/usr/bin/xmobar ~/.xmobarrc"   
xmonad $ defaultConfig   
      { manageHook = manageDocks <+> manageHook defaultConfig 
      , layoutHook = avoidStruts $ layoutHook defaultConfig 
      , modMask = mod4Mask     -- Rebind Mod to the Windows key
      , logHook = dynamicLogWithPP xmobarPP 
           { ppOutput = hPutStrLn xmproc 
           , ppTitle = xmobarColor "blue" "" . shorten 0   
           , ppLayout = const "" -- to disable the layout info on xmobar 
           }   
      }  `additionalKeys`
        [ ((mod1Mask, xK_t), spawn "lxterminal")
        , ((mod1Mask, xK_f), spawn "firefox")
        , ((mod1Mask, xK_g), spawn "google-chrome")
        , ((mod1Mask, xK_n), spawn "nautilus")
        ]

~/.xmobarrc

Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
       , bgColor = "black"
       , fgColor = "grey"
       , position = TopW L 85
       , lowerOnStart = True
       , commands = [ Run Network "eth1" ["-L","0","-H","32","--normal","green","--high","red"] 10
                    , Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10
                    , Run Memory ["-t","Mem: <usedratio>%"] 10
                    , Run Com "uname" ["-s","-r"] "" 36000
                    , Run Date "%a %b %_d %Y %H:%M:%S" "date" 10
                    ]
       , sepChar = "%"
       , alignSep = "}{"
       , template = "%cpu% | %memory% | %eth1% }{ <fc=#ee9a00>%date%</fc>| %uname%"
       }

Last edited by 2OceanLovers (2012-05-08 19:43:02)

Offline

#2 2012-05-08 15:59:27

wolframio74
Member
Registered: 2011-12-29
Posts: 17

Re: {Solved!!} Xmonad, XMobar, and Trayer Help

Why don't you use XMonad + GNOME 3 Fallback ?  you get all the goodies from GNOME 3 and XMonad smile

Offline

#3 2012-05-08 16:14:50

2OceanLovers
Member
Registered: 2012-05-04
Posts: 6

Re: {Solved!!} Xmonad, XMobar, and Trayer Help

I am not a big fan of GNOME 3 at all.  Configuring it, to me at least, seems harder and counterintuitive than just a WM.  Plus, I like a very minimalistic desktop.  I am just almost there too.  I have tried to integrate XMonad into LXDE and didn't get a very good result, so I wanted to go pure XMonad.

Offline

#4 2012-05-08 19:17:23

Holeyshoe
Member
Registered: 2011-09-11
Posts: 9

Re: {Solved!!} Xmonad, XMobar, and Trayer Help

For the sake of elimination, try starting trayer with a fixed width and increasing it's height to 18 pixels. I know it sounds kinda pointless and silly but it solved my missing nm-applet issue.

Offline

#5 2012-05-08 19:42:34

2OceanLovers
Member
Registered: 2012-05-04
Posts: 6

Re: {Solved!!} Xmonad, XMobar, and Trayer Help

That worked!! Thank you so much.  I didn't even think about changing the height.  It matches up perfectly now.  Now I am off to add some more applets to it.  Thanks again.

Offline

Board footer

Powered by FluxBB