You are not logged in.

#226 2010-04-07 01:36:21

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: dzen & xmobar Hacking Thread

I guess my dzen2 script is just too basic, but when I issue the command

% killall dzen2

It kills the script calling dzen2 as well...

Offline

#227 2010-04-07 04:06:08

valadil
Member
Registered: 2009-06-04
Posts: 6

Re: dzen & xmobar Hacking Thread

Berticus wrote:

I guess my dzen2 script is just too basic, but when I issue the command

% killall dzen2

It kills the script calling dzen2 as well...

Is dzen2 being called multiple times in your script?  If it's only being called once, it's the only thing keeping your script open so when dzen2 completes the script goes with it.

Offline

#228 2010-04-09 21:35:26

keevie
Member
Registered: 2008-09-09
Posts: 7

Re: dzen & xmobar Hacking Thread

#!/bin/bash
FG='gray'
BG='black'
FN='-*-terminus-*-r-normal-*-*-120-*-*-*-*-iso8859-*'
while true ; do
        echo  "`cat /home/daniel/highlights/list.txt`"
        sleep 1
done | dzen2 -e '' -y '1008' -h '16' -w '1100' -x '1280' -l 5 -ta l -fg $FG -bg $BG -fn $FN

could anyone help me with this script? It should update once a second and get the new contents of that file, but instead it just runs once and never updates.

Offline

#229 2010-04-09 22:13:57

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: dzen & xmobar Hacking Thread

keevie: It does update. Read this: http://dzen.geekmode.org/dwiki/doku.php … n:option-l

The following creates a quite interesting effect:

#!/bin/bash
FG='gray'
BG='black'
FN='-*-terminus-*-r-normal-*-*-120-*-*-*-*-iso8859-*'
while :; do
        echo  "`cat ./list.txt`"
        sleep 1
done | dzen2 -u -y '1008' -h '16' -w '1100' -ta l -l 5 -fg $FG -bg $BG -fn $FN

Offline

#230 2010-05-02 16:23:08

lymphatik
Member
From: Somewhere else
Registered: 2009-03-07
Posts: 119

Re: dzen & xmobar Hacking Thread

Just wondering if anyone was able to use dzen to open firefox with a specific link.

I tried the following code without any success. I switched " to ' but no success so far. That is a bit upsetting because it works perfectly to launch simple url without special character in it.

dzen2 -e 'button1=exec: firefox "http://www.accuweather.com/world-forecast-hourly.asp?partner=accuweather&traveler=0&locCode=EUR|FR|FR011|ROUEN&metric=1" ;'

Offline

#231 2010-06-09 14:21:48

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: dzen & xmobar Hacking Thread

Has anyone been able to display "proper" Japanese in dzen?It won't work if I feed the following line into it:

一 二 三 四 五 六 七 八 九

Statusbar only displays rectangles,

Edit; Nevermind, I solved it – I just gave it the wrong font format.

Instead of

xft:Meguri P:size=9

it should have been

Meguri P-9

Last edited by Runiq (2010-06-09 15:02:51)

Offline

#232 2010-06-09 21:54:31

roy_hu
Member
Registered: 2009-10-29
Posts: 85

Re: dzen & xmobar Hacking Thread

Runiq wrote:

Has anyone been able to display "proper" Japanese in dzen?It won't work if I feed the following line into it:

一 二 三 四 五 六 七 八 九

Statusbar only displays rectangles,

Edit; Nevermind, I solved it – I just gave it the wrong font format.

Instead of

xft:Meguri P:size=9

it should have been

Meguri P-9

Man, that's so Chinese, not Japanese!

Offline

#233 2010-06-09 22:09:09

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: dzen & xmobar Hacking Thread

roy_hu wrote:

Man, that's so Chinese, not Japanese!

Yah, whatever. tongue

Offline

#234 2010-06-09 22:28:38

awkwood
Member
From: .au <=> .ca
Registered: 2009-04-23
Posts: 91

Re: dzen & xmobar Hacking Thread

Actually that is 1-9 in Japanese Kanji too.
ichi, ni, san, shi (yon), go, roku, shichi, hachi, kyu

I knew taking Japanese in high school would come in useful for something! wink

Offline

#235 2010-06-10 05:22:26

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: dzen & xmobar Hacking Thread

I think he meant that it's the "Chinese" way of numbering things in Japanese. So you're both right. smile

And I am too. Yay!

Offline

#236 2010-06-13 17:33:59

gotmor
Member
From: Germany
Registered: 2007-09-03
Posts: 84
Website

Re: dzen & xmobar Hacking Thread

Hey guys,

after quite some time of inactivity dzen has finally reached version 0.9.5-svn.

The most noticable new feature is support for nested ^ca() commands (thanks to Devin J. Pohly).
(Besides all the goodies that the svn version already had over 0.8.5, of course)

Feel free to give it a try and report any bugs you may find.

If things go well I'll release a new stable version within the next two weeks.


Thanks for your attention, Rob.

Last edited by gotmor (2010-06-13 17:39:19)

Offline

#237 2010-06-13 17:43:53

myrkiada
Member
From: Norway
Registered: 2009-04-15
Posts: 74

Re: dzen & xmobar Hacking Thread

gotmor wrote:

Hey guys,

after quite some time of inactivity dzen has finally reached version 0.9.5-svn.

The most noticable new feature is support for nested ^ca() commands (thanks to Devin J. Polhy).
(Besides all the goodies that the svn version already had over 0.8.5, of course)

Feel free to give it a try and report any bugs you may find.

If things go well I'll release a new stable version within the next two weeks.


Thanks for your attention, Rob.

I'll give it a try later! Nice too see it's development continue. I will get back to you if there are any problems. smile


My Configs @ Github

Offline

#238 2010-06-13 20:38:13

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: dzen & xmobar Hacking Thread

It's back! It's back! *runs around in circles*

Rob, if you, by any chance, add transparency support, I can finally die a happy man after using it for many, many years.

Last edited by Runiq (2010-06-13 21:01:09)

Offline

#239 2010-06-13 20:43:43

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: dzen & xmobar Hacking Thread

Runiq wrote:

It's back! It's back! *runs around in circles*

Rob, if you, by any chance, add transparency support, I can finally die a happy man.

That's counterproductive. You should wait until a reasonable time period has passed after the release of something cool before you kick the bucket. That way, the great piece of software in question will actually have users.

/end bump

Offline

#240 2010-06-13 21:02:01

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: dzen & xmobar Hacking Thread

skottish wrote:
Runiq wrote:

It's back! It's back! *runs around in circles*

Rob, if you, by any chance, add transparency support, I can finally die a happy man.

That's counterproductive. You should wait until a reasonable time period has passed after the release of something cool before you kick the bucket. That way, the great piece of software in question will actually have users.

/end bump

Thank you for your consideration. Post edited accordingly.

Offline

#241 2010-06-18 01:27:15

tammer
Member
From: Philadelphia
Registered: 2010-06-18
Posts: 11

Re: dzen & xmobar Hacking Thread

Quick question that I can't seem to find an answer for via google:

Is it possible to use dzen2 in XMonad and have dzen appear on only a single workspace? When I launch dzen, it appears across all workspaces regardless of what I specify in myManageHook in my xmonad.hs.

Is this propagation a function of dzen itself? Or is this something I can change within XMonad?

Offline

#242 2010-06-18 06:33:47

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: dzen & xmobar Hacking Thread

Offline

#243 2010-06-18 13:44:40

tammer
Member
From: Philadelphia
Registered: 2010-06-18
Posts: 11

Re: dzen & xmobar Hacking Thread

Thanks for the tip, but the problem is I've only got one monitor, and therefore I don't have different Xinerama screens. (I tried passing -xs 9 to dzen, and it still appears on all workspaces.) What I'm trying to do is get dzen to appear on a single XMonad workspace.

Offline

#244 2010-06-18 14:00:43

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: dzen & xmobar Hacking Thread

tammer wrote:

Thanks for the tip, but the problem is I've only got one monitor, and therefore I don't have different Xinerama screens. (I tried passing -xs 9 to dzen, and it still appears on all workspaces.) What I'm trying to do is get dzen to appear on a single XMonad workspace.

Whoops, sorry – I misread workspace for monitor. sad

You probably can do that, but I have no idea how to achieve that. Probably something involving an eventHook.

Offline

#245 2010-07-06 00:06:06

dibon
Member
From: Norway
Registered: 2010-07-05
Posts: 4

Re: dzen & xmobar Hacking Thread

I'm having trouble getting colors to work with dzen.

If I write ^fg(red) text here ^fg() it turns red (#FF0000), but if I try using hex values the text just disappears. For example ^fg(#FF0000) text here ^fg() doesn't show anything.

What am I doing wrong?

Offline

#246 2010-07-06 11:02:25

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: dzen & xmobar Hacking Thread

dibon: This is not a dzen2 problem, but is caused by how newer versions of conky handles #'s. Try escaping the hex colors with backslashes like this

^fg(\#FF0000)

Offline

#247 2010-07-06 16:17:01

dibon
Member
From: Norway
Registered: 2010-07-05
Posts: 4

Re: dzen & xmobar Hacking Thread

That worked!

Thanks smile

Offline

#248 2010-10-10 09:59:31

xrchz
Member
Registered: 2009-04-03
Posts: 36

Re: dzen & xmobar Hacking Thread

XMonad/dzen/dmenu configuration that all share the same fonts and colors. Includes a dzen clock that updates on the minute.

% cat .xmonad/xmonad.hs
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Layout.ThreeColumns
import XMonad.Layout.Named
import XMonad.Util.CustomKeys
import qualified XMonad.StackSet as W
main = xmonad =<< statusBar dzen2 pp toggleStrutsKey conf
  where
    dzen2 = "dzen2 -e 'onstart=lower' -w 1980 -ta l " ++ dzenOpts 
    toggleStrutsKey XConfig {modMask = modm} = (modm, xK_b)
    conf = defaultConfig { layoutHook = threeCol ||| Full
                         , keys = customKeys delKeys insKeys 
                         , startupHook = spawn ("~/.clock " ++ dzenOpts)
                         }
    threeCol = named "[]||" (ThreeCol 1 (3/100) (1/3))
    nb = "black"
    nf = "white"
    sb = "white"
    sf = "black"
    fn = "DejaVu Sans Mono-10"
    dzenOpts = "-fn '" ++ fn ++ "' -bg '" ++ nb ++ "' -fg '" ++ nf ++ "'"
    dmenuOpts = "-nb '" ++ nb ++ "' -nf  '" ++ nf ++ "' -sb '" ++ sb ++ "' -sf '" ++ sf ++ "' -fa '" ++ fn ++ "'"
    pp = dzenPP { ppCurrent = dzenColor sf sb . pad
                , ppHidden  = dzenColor nf nb . pad
                , ppLayout  = dzenColor nf nb . pad
                , ppTitle   = dzenEscape
                }
    delKeys XConfig {modMask = modm} = 
      [ (modm, k) | k <- [xK_j, xK_k, xK_m, xK_Return, xK_comma, xK_period, xK_w, xK_e, xK_r] ] ++
      [ (modm .|. shiftMask, k) | k <- [xK_p, xK_j, xK_k, xK_w, xK_e, xK_r] ]
    insKeys XConfig {modMask = modm} =
      [ ((modm, xK_p), spawn ("exe=`dmenu_path | dmenu " ++ dmenuOpts ++ "` && eval \"exec $exe\""))
      , ((modm .|. shiftMask, xK_comma), windows W.swapDown)
      , ((modm .|. shiftMask, xK_period), windows W.swapUp)
      ]
% cat .clock 
#!/bin/bash
pidf=/var/run/clock.pid
[ -f $pidf ] && kill $(< $pidf)
echo $$ > $pidf
trap "rm -f $pidf; exit" HUP INT TERM QUIT EXIT
while [ -f $pidf ]; do
  date +'%A %-d %B %-l:%M%P'
  sleep $((60 - $(date +%S)))
done | dzen2 -x 1720 -ta r "$@"

Last edited by xrchz (2010-10-10 10:09:53)

Offline

#249 2010-10-10 22:49:48

Arthenik
Member
Registered: 2010-02-13
Posts: 44

Re: dzen & xmobar Hacking Thread

I have trouble piping conky-cli into dzen2. Piping simple bash scripts works wonderfully, but not with Conky. A Dzen bar shows, but it's empty. It doesn't work with simpler Conky configurations either.

EDIT: Solved, the filepaths were wrong.

Last edited by Arthenik (2010-10-11 13:53:14)

Offline

#250 2011-01-18 22:08:40

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: dzen & xmobar Hacking Thread

I have perl-weather-com installed, and up until today it was working. Has anybody else had this issue?

Errors

Use of uninitialized value in concatenation (.) or string at /usr/share/perl15/vendor_perl/Weather/Com/Base.pm line 108.
Use of uninitialized value in lc at /usr/share/perl15/vendor_perl/Weather/Com/Base.pm line 312.
Can't determine type of REF(0xa48190) at blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/_store.al) line 264, at /usr/share/perl15/vendor_perl/Weather/Com/Cached.pm line 98

My weather script is:

#!/usr/bin/perl

use Weather::Com::Finder;

my $PartnerId  = 'removed';
my $LicenseKey = 'removed';
my $iconpath = '/home/berticus/.local/share/icons/dzen/weather';

my %weatherargs = (
    'partner_id' => $PartnerId,
    'license' => $LicenseKey,
    'units' => 's'
);

my $weather_finder = Weather::Com::Finder->new(%weatherargs);

my $loc1 = $weather_finder->find('01720');
my $loc2 = $weather_finder->find('14228');

my $temp_today1 = sprintf("% 3d", $loc1->[0]->current_conditions()->temperature());
my $icon_today1 = $loc1->[0]->current_conditions()->icon();

my $temp_today2 = sprintf("% 3d", $loc2->[0]->current_conditions()->temperature());
my $icon_today2 = $loc2->[0]->current_conditions()->icon();

print "^i(${iconpath}/${icon_today1}-scaled.xpm)^p(2)${temp_today1}°",
      "^i(${iconpath}/${icon_today2}-scaled.xpm)^p(2)${temp_today2}°",
      "\n";

Offline

Board footer

Powered by FluxBB