You are not logged in.

#1 2008-10-26 03:45:40

hack.augusto
Member
From: Brazil
Registered: 2008-08-28
Posts: 124

[solved]dzen2 configuration issue

I want split the groups + windows in the right side of the dzen bar and the time and "system tray" to the left.

my first idea was to have two dzen2 processes running, one align to the right and one to the left, but looking through the wiki I found ^p(_RIGHT) and ^p(_LEFT), great! but it doesn't work.

here is my code:

append(){

        txt=$*$text

}
 
while true; do

        append "^p(_LEFT)"\
        `ratpoison -c groups -c windows | sed -e 's\^[0-9][*]\^fg(#FF00FF)\' -e 's\^[0-9][-]\^fg(#A800A8)\' -e 's\^[0-9][+]\^fg(#000054)\'`\
        "^p(_RIGHT)"\
        `date | awk '{print $4}'`
        echo "$txt"
        sleep 1

done  | dzen2

other question, how could I have the sed output in only one line? the function append just does that, take the break lines out, and how could I use outside variables with sed? it would be easier to change the colors because i didn't found a good color set(any sugestions?)

Last edited by hack.augusto (2009-02-05 00:37:57)

Offline

#2 2009-01-21 14:26:48

mci_nano
Member
From: Germany/Braunschweig
Registered: 2008-10-26
Posts: 14

Re: [solved]dzen2 configuration issue

anybody ever got an answer to this?
I want to put Text in different corners(left<->right) too and thought i should use ^p...

How did you solve this?

Last edited by mci_nano (2009-01-21 14:27:57)

Offline

#3 2009-01-24 21:48:40

hack.augusto
Member
From: Brazil
Registered: 2008-08-28
Posts: 124

Re: [solved]dzen2 configuration issue

I didn't. I have all my txt centered.
But if you have a fixed width for your (rigth|left) hand text you can make two processes and have one aligned to the left and the other to the rigth

Offline

#4 2009-02-05 00:42:45

hack.augusto
Member
From: Brazil
Registered: 2008-08-28
Posts: 124

Re: [solved]dzen2 configuration issue

After mci_nano asked I tryied it once more, and I found that if you have the text centered - without "-ta" argument - and insert "^p(_CENTER)" between text you want to split, you are going get the expected behavior.

Offline

#5 2011-12-21 08:22:05

stalphonzo
Member
Registered: 2009-10-01
Posts: 8

Re: [solved]dzen2 configuration issue

The command ^p(_RIGHT) aligns the following text to the right, but in somewhat strange manner:
the first letter you type after this commmand occurs right of the right edge of the screen, so of course it isn't visible.
So to get the expected behaviour you have to do following:
Be W the width of the text you want to have right aligned in pixels, type

^p(_RIGHT)^p(-W)textyouwannadisplay

So ^p(KEYWORD) is to understand as a switch that jumps to the position KEYWORD.
Hope that will help someone.
EDIT: This may concern only the actual svn-version

Last edited by stalphonzo (2011-12-21 08:34:14)

Offline

#6 2011-12-24 05:06:05

fsckd
Forum Moderator
Registered: 2009-06-15
Posts: 3,077

Re: [solved]dzen2 configuration issue

Thank you stalphonzo. I'm going to close this thread as it is old and I doubt the original participants are aware of any new posts. Further discussion should be in a new thread.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

Board footer

Powered by FluxBB