You are not logged in.

#26 2009-07-09 13:57:58

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

OK guys, a day later and we're still logging 0.0% cpu usage by X.

one of two things solved this issue.

-- using dzen2 instead of xmobar
-- using xmonad-darcs

i'm gonna mark as [SOLVED], but i have one last nagging issue that maybe can be answered here.  i can't get ugency hints working.  i put in the required info as per xmonad.org (see below), i have a feeling i need to use the EwmhDesktops Module but when i try that, it keeps giving me out of scope errors, is this not included in the xmonad-contrib-darcs package?

import XMonad.Hooks.UrgencyHook

...

myLogHook h = dynamicLogWithPP $ defaultPP
  { ...
  , ppUrgent          = dzenColor "#afaf87" "#000000"

...

main = do
  d <- spawnPipe myStatusBar
  xmonad $ withUrgencyHook NoUrgencyHook $ defaultConfig
    { ...

this isn't a huge deal, but am i missing something? do i have to go back to the non darcs version of xmonad-contrib to get the EwmhDesktops module?

Offline

#27 2009-07-09 14:16:35

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

You're missing something Sally (if you don't get it, see the IE 8 commercial):

import XMonad.Hooks.EwmhDesktops

But that doesn't have anything to do with it, as far as I know. Anyway, I have to disappoint you: It won't work that way. The problem is if you have defined colors for ppHidden, then ppUrgent won't do squat (because it applies ppUrgent IN ADDITION to ppHidden (don't ask what that means exactly, those are words from the official contrib docs)). At least, I haven't found a way to make it work, and I've even talked to xmonad devs in #xmonad.

As a compromise I'm using this:

, ppUrgent   = wrap (dzenColor "#ff0000" "" "->") (dzenColor "#ff0000" "" "")

That prints a nice red arrow pointing to the urgent workspace. I know it sucks, but it's not that bad when you get used to it. At least it's better than a temporary dzen popping up. This has irritated me from the moment I started using Xmonad though...


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#28 2009-07-09 16:42:31

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

thanks moljac, i'll try your arrow-wrap method.

as for the EwmhDesktops, i did have the include line (seems the obvious solution for out of scope errors, hence i quadrople checked spelling) and i still get out of scope errors... hence my confusion.

as long as that doesn't have anything to do with my ungency hints then i don't care that i can't get it working.

thanks all.

Offline

#29 2009-07-12 00:51:01

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

Good news brisbin, I've figured it out. As always, it was obvious as hell...
Just don't specify the background or foreground color of ppHidden (it will then use the color you specify to dzen2 on the command line).
Then you can specify that color for ppUrgent and it will work. Here, have a look at my logHook:

myLogHook h = dynamicLogWithPP ( defaultPP {
              ppCurrent  = dzenColor "#ffffff" "#ff7500" . pad
            , ppVisible  = dzenColor "#ffffff" "#000000" . pad
            , ppHidden   = dzenColor "#ffffff" "" . pad
            , ppHiddenNoWindows = dzenColor "#999999"  "#000000" . pad
            , ppUrgent   = dzenColor "#ffffff" "#ff0000"
            --, ppUrgent   = wrap (dzenColor "#ff0000" "" ">") (dzenColor "#ff0000" "" "<")
            --, ppUrgent   = wrap (dzenColor "#ff0000" "" "^r(4x4)") ("")
            , ppSep     = " " 
            , ppWsSep    = ""
            , ppTitle    = dzenColor "#ffffff" "#000000" . pad
        , ppLayout   = dzenColor "#ffffff" "" .
                   (\x -> case x of
                                        "Tall" -> "[]="
                                        "Hinted Tall" -> "[]="
                                        "Mirror Tall" -> "TTT"
                                        "Hinted Mirror Tall" -> "TTT"
                                        "Wide" -> "TTT"
                                        "Hinted Wide" -> "TTT"
                                        "Full" -> "[F]"
                                        "Hinted Full" -> "[F]"
                                        "Grid" -> "[G]"
                                        "Hinted Grid" -> "[G]"
                                        "Accordion" -> "[A]"
                                        "Hinted Accordion" -> "[A]"
                                        "Dishes" -> "[D]"
                                        "Hinted Dishes" -> "[D]"
                                        "SimplestFloat" -> "><>"
                                        "Hinted SimplestFloat" -> "><>"
                                        _ -> "???"
               )
            , ppOutput   = hPutStrLn h
            } )
        >> ewmhDesktopsLogHook
        >> setWMName "LG3D"

myStatusBar = "dzen2 -ta l -fn '-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*' -x 0 -y 0 -w 730 -h 18 -fg '#ffffff' -bg '#000000' -e ''"

Have fun wink

Last edited by moljac024 (2009-07-12 00:51:38)


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#30 2009-07-12 18:45:45

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED-sorta] xmonad gradually uses more and more cpu while idling.

moljac024 wrote:

Good news brisbin, I've figured it out. As always, it was obvious as hell...
Just don't specify the background or foreground color of ppHidden (it will then use the color you specify to dzen2 on the command line).
Then you can specify that color for ppUrgent and it will work. Here, have a look at my logHook:

myLogHook h = dynamicLogWithPP ( defaultPP {
              ppCurrent  = dzenColor "#ffffff" "#ff7500" . pad
            , ppVisible  = dzenColor "#ffffff" "#000000" . pad
            , ppHidden   = dzenColor "#ffffff" "" . pad
            , ppHiddenNoWindows = dzenColor "#999999"  "#000000" . pad
            , ppUrgent   = dzenColor "#ffffff" "#ff0000"
            --, ppUrgent   = wrap (dzenColor "#ff0000" "" ">") (dzenColor "#ff0000" "" "<")
            --, ppUrgent   = wrap (dzenColor "#ff0000" "" "^r(4x4)") ("")
            , ppSep     = " " 
            , ppWsSep    = ""
            , ppTitle    = dzenColor "#ffffff" "#000000" . pad
        , ppLayout   = dzenColor "#ffffff" "" .
                   (\x -> case x of
                                        "Tall" -> "[]="
                                        "Hinted Tall" -> "[]="
                                        "Mirror Tall" -> "TTT"
                                        "Hinted Mirror Tall" -> "TTT"
                                        "Wide" -> "TTT"
                                        "Hinted Wide" -> "TTT"
                                        "Full" -> "[F]"
                                        "Hinted Full" -> "[F]"
                                        "Grid" -> "[G]"
                                        "Hinted Grid" -> "[G]"
                                        "Accordion" -> "[A]"
                                        "Hinted Accordion" -> "[A]"
                                        "Dishes" -> "[D]"
                                        "Hinted Dishes" -> "[D]"
                                        "SimplestFloat" -> "><>"
                                        "Hinted SimplestFloat" -> "><>"
                                        _ -> "???"
               )
            , ppOutput   = hPutStrLn h
            } )
        >> ewmhDesktopsLogHook
        >> setWMName "LG3D"

myStatusBar = "dzen2 -ta l -fn '-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*' -x 0 -y 0 -w 730 -h 18 -fg '#ffffff' -bg '#000000' -e ''"

Have fun wink

that's awesome, i'm actually kinda getting used to my workaround though, red curly braces around an urgent WS

{1-irssi} 2-web 2-im ...

but good to know i have the 'normal' option available to me again.  thanks.

also, protip:

if you want to test out different kinds of urgency hints, execute this in a terminal then quickly switch workspaces...

sleep 5 && echo -e "\a"

Offline

Board footer

Powered by FluxBB