You are not logged in.

#1 2010-09-16 12:10:03

yphqyn
Member
Registered: 2009-04-23
Posts: 20

[SOLVED] xmonad + trayer on all workspaces

hii,

how can i set trayer, that show me it on all my workspaces ?
now it shows me in first workspace only..
im start trayer and xmonad with ~/.xinitrc

reg yp

Last edited by yphqyn (2010-09-16 14:46:08)

Offline

#2 2010-09-16 12:47:00

Anntoin
Member
Registered: 2009-08-10
Posts: 42
Website

Re: [SOLVED] xmonad + trayer on all workspaces

Have had no problem with trayer showing on all workspaces with no extra configuration (Just tried it now). If you're using a multi monitor setup do you mean to have it display on each (physical screen)? If that's not it post your .xinitrc and xmonad.hs and I'll have a look.

Last edited by Anntoin (2010-09-16 12:47:17)

Offline

#3 2010-09-16 12:59:09

yphqyn
Member
Registered: 2009-04-23
Posts: 20

Re: [SOLVED] xmonad + trayer on all workspaces

im using one monitor

my ~/.xinitrc :

xsetroot -cursor_name left_ptr
feh --bg-scale ~/Wallpapers/01267_melancholicrodeo_1280x960.jpg &

exec ~/.xmonad/scripts/logo.sh &
exec ~/.xmonad/scripts/status_bar_right.sh &

exec wbar -balfa 0 -idist 10 &
exec trayer --edge top --align right --widthtype pixel --width 100 --SetDockType true --SetPartialStrut true --transparent true --alpha 0 --tint 0x000000 --expand true --heighttype pixel --height 16 &

exec xmonad

and my ~/.xmonad/xmonad.hs :

import XMonad
import XMonad.Operations
import XMonad.Actions.DwmPromote
import XMonad.Hooks.DynamicLog   ( PP(..), dynamicLogWithPP, dzenColor, wrap, defaultPP )

import XMonad.Layout
import XMonad.Layout.Grid
import XMonad.Layout.NoBorders
import XMonad.Layout.ResizableTile
import XMonad.Layout.Spacing
import XMonad.Layout.Gaps

import XMonad.Prompt             ( XPConfig(..), XPPosition(..) )
import XMonad.Prompt.Shell       ( shellPrompt )
import XMonad.Util.Run
import XMonad.Hooks.ManageDocks

import qualified Data.Map as M
import Data.Bits ((.|.))
import Data.Ratio
import Graphics.X11
import System.IO

statusBarLeft= "dzen2 -bg '#000' -fg '#aecf96' -sa c -fn '-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*' -ta l -w 580 -x 100 -h 16"

main = do din <- spawnPipe statusBarLeft
          xmonad $ defaultConfig
                     { borderWidth        = 0
                     , normalBorderColor  = "grey30"
                     , focusedBorderColor = "#aecf96"
                     , workspaces         = [ "1:work!", 
                                              "2:cups", 
                                              "3:misc", 
                                              "4:crack", 
                                             "5:wifi/aircrack","6:irc/gg/mail/rss","7:rtorrent","8:mjuzik/media", "9:www"]
                     , terminal           = "urxvt +sb -tr -sh 30 -bg black -fg white"
                     , modMask            = mod4Mask
                     , manageHook         = myManageHook
                    -- , logHook            = dynamicLogWithPP $ robPP din
                     , layoutHook         = avoidStruts (gaps [(U,3), (D,3), (R,3), (L,3)] $ tiled ||| Mirror tiled ||| Grid ||| noBorders Full)
                    -- , layoutHook       = avoidStruts (spacing 6 $ tiled ||| Mirror tiled ||| Grid ||| noBorders Full)
                    -- , layoutHook          = avoidStruts (spacing 3 $ tiled ||| Mirror tiled ||| Grid ||| noBorders Full)
                     , logHook              = dynamicLogWithPP $ robPP din
                     , keys               = \c -> robKeys `M.union` 
                                                  keys defaultConfig c 
                     }
                     where
                       tiled = Tall 1 (3/100) (2/3)
                       reztiled = ResizableTall 1 (3/100) (1/2)                       
 
 
myManageHook :: ManageHook
myManageHook = composeAll
                [ className =? "Pidgin"     --> doFloat
                , className =? "Gimp"       --> doFloat 
                , className =? "Kopete"        --> doFloat ]

-- redifine some keys
--
robKeys = M.fromList $
   [ ((mod4Mask     , xK_p      ), shellPrompt robSPConfig)
   , ((mod4Mask     , xK_c      ), spawn "rxvt -e xterm ~/.xmonad/xmonad.hs")
   , ((mod4Mask     , xK_Return ), dwmpromote)
   , ((mod4Mask     , xK_b      ), sendMessage ToggleStruts)
   , ((mod4Mask .|. shiftMask,  xK_b    ), spawn "chromium")
   , ((mod4Mask .|. shiftMask,  xK_p    ), spawn "pidgin")
 
   -- multimedia keys
   --
   -- XF86AudioLowerVolume
   , ((0            , 0x1008ff11), spawn "aumix -v -2")
   -- XF86AudioRaiseVolume
   , ((0            , 0x1008ff13), spawn "aumix -v +2")
   -- XF86AudioMute
   , ((0            , 0x1008ff12), spawn "amixer -q set PCM toggle")
   -- XF86AudioNext
   , ((0            , 0x1008ff17), spawn "mpc next")
   -- XF86AudioPrev
   , ((0            , 0x1008ff16), spawn "mpc prev")
   -- XF86AudioPlay
   , ((0            , 0x1008ff14), spawn "mpc toggle")
   ]
 
 
-- dynamiclog pretty printer for dzen
--
robPP h = defaultPP 
                 { ppCurrent = wrap "^fg(#000000)^bg(#0099ec)^p(4)" "^p(4)^fg()^bg()"
                  , ppHidden = wrap "^bg(#000)^fg(grey75)^p(4)" "^p(4)^fg()^bg()"
                   , ppSep     =  " ^fg(#0099ec)^r(4x4)^fg() "
                  , ppLayout  = dzenColor "#0099ec" "" .
                                (\x -> case x of
                                        "Tall" -> icon "tall.xbm"
                                        "Mirror Tall" -> icon "mtall.xbm"
                                        "Full" -> icon "full.xbm"
                                )
                   , ppTitle   = dzenColor "#b3b3b3" "" . wrap "[ " " ]" 
                   , ppOutput   = hPutStrLn h
                  }
        where
            icon h = "^i(/home/ksl/.xmonad/icons/" ++ h ++ ")"
            fill :: String -> Int -> String
            fill h i = "^p(" ++ show i ++ ")" ++ h ++ "^p(" ++ show i ++ ")"
 
-- shellprompt config
--
robSPConfig = XPC { 
                   font              = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
                 , bgColor           = "#111111"
                 , defaultText       = ""
                 , fgColor           = "#d5d3a7"
                 , bgHLight          = "#aecf96"
                 , fgHLight          = "#000000"
                 , borderColor       = "#000000"
                 , promptBorderWidth = 0
                 , position          = Bottom
                 , height            = 15
                 , historySize       = 256
                   }

Last edited by yphqyn (2010-09-16 13:00:09)

Offline

#4 2010-09-16 13:57:00

Anntoin
Member
Registered: 2009-08-10
Posts: 42
Website

Re: [SOLVED] xmonad + trayer on all workspaces

Here's the problem. Your manage hook doesn't use manageDocks (which you've already imported). Just change it to this and it should work fine:

myManageHook = composeAll
                [ className =? "Pidgin"     --> doFloat
                , className =? "Gimp"       --> doFloat 
                , className =? "Kopete"        --> doFloat 
                , manageDocks]

Hope this works for you.

P.S. Regarding my last post the default config with xmonad also needs manageDocks for this to work.

Last edited by Anntoin (2010-09-16 14:11:21)

Offline

#5 2010-09-16 14:45:08

yphqyn
Member
Registered: 2009-04-23
Posts: 20

Re: [SOLVED] xmonad + trayer on all workspaces

works !!!
very very thx smile

Offline

Board footer

Powered by FluxBB