You are not logged in.

#1 2010-04-20 15:39:14

Mr Fix It
Member
Registered: 2010-04-19
Posts: 7

Messenger client notification. Dzen or xmobar

Howdy guys.

I just took the plunge into arch, and have been setting it up from the ground up. Which has been damn fun and i've learnt alot.

I've also jumped into using xmonad, and i'm loving it. However what i want (which i'm confused to accomplish) is a notification when a window wants my attention. I'm using it on a netbook, so i'm making alot of use of the multiple workspaces. I'd like to be informed when a window wants me (someone talking tongue).

Which one would be best to go after this xmobar or dzen?. I'm actually liking having no bars at the top right now, but i would prefer to know whats going on workspace wise.

Any shoves in the right direction would be greatly appreciated

Offline

#2 2010-04-20 16:25:07

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Messenger client notification. Dzen or xmobar

What bar you use does not matter at all.
What you want is XMonad-Hooks-UrgencyHook

I have UrgencyHook in my config which you can find here

Edit: you could also use a notification daemon of some sort, with notification in your bar, a seperate popup or trough macopix or similar.

Last edited by Mr.Elendig (2010-04-20 16:28:40)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#3 2010-04-20 22:34:26

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: Messenger client notification. Dzen or xmobar

I'm currently using dzen, though I prefer xmobar for its simplicity.  Unfortunately, xmobar is currently very unstable when built against ghc-6.12 and may crash when displaying utf8 characters.

Offline

#4 2010-04-21 10:33:52

Mr Fix It
Member
Registered: 2010-04-19
Posts: 7

Re: Messenger client notification. Dzen or xmobar

import XMonad
import XMonad.Hooks.UrgencyHook

main = xmonad $ withUrgencyHookC dzenUrgencyHook { 
            args = ["-bg", "darkblue", "-xs", "1"] }
            UrgencyConfig { suppressWhen = Focused, remindWhen = Every 5 }
        $ defaultConfig { 
            borderWidth = 1
            , modMask = mod4Mask
            , terminal = "urxvt"
            , normalBorderColor = "#000000"
            , focusedBorderColor = "#666666" }

Here's what i've managed to clean so far.

It does seem to pop-up, however i would like it to repeat. I'm a bit new to haskell so i'm not sure if i've written the UrgencyConfig correct, eg the Every 5 constructor.

Im trying to make it appear every 5 seconds.

Thanks.

EDIT:

above code actually works smile. Geussing xmonad didn't refresh properly last night.

Cool. Hope it helps someone else.

Last edited by Mr Fix It (2010-04-21 10:45:30)

Offline

#5 2010-04-21 10:47:28

syre
Member
From: Denmark
Registered: 2009-08-04
Posts: 100

Re: Messenger client notification. Dzen or xmobar

how would one accomplish it with dzen?

Offline

#6 2010-04-21 11:13:16

Mr Fix It
Member
Registered: 2010-04-19
Posts: 7

Re: Messenger client notification. Dzen or xmobar

hey syre.

The code i posted uses dzen. It makes a blue box appear ontop of the screen, that re-appears every 5 seconds (this needs tweaking). It keeps on doing this until you focus the window that wants your attention.

Not sure what would happen when multiple windows want your attention. But so far works really well.
Using emesene it comes up with " xxx wants your attention on workspace y"

Offline

#7 2010-04-21 14:25:08

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Messenger client notification. Dzen or xmobar

chpln wrote:

I'm currently using dzen, though I prefer xmobar for its simplicity.  Unfortunately, xmobar is currently very unstable when built against ghc-6.12 and may crash when displaying utf8 characters.

Not if you use xmobar-darcs


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB