Dzen

From ArchWiki

Jump to: navigation, search
Image:Tango-document-new.png This article is a stub.
This typically means the article is a placeholder for more content to come. Knowledgeable users are encouraged to help expand the article.
i18n
English

Contents

Introduction

From the dzen website:

"Dzen is a general purpose messaging, notification and menuing program for X11. It was desigend to be scriptable in any language and integrate well with window managers like dwm, wmii and xmonad though it will work with any windowmanger."

Installation

dzen is available from the community repository:

# pacman -S dzen2


Tips & Tricks

Using custom fonts with Dzen

If you wish to use custom fonts with dzen2 (like the popular Terminus font), you need to add the path to your local fonts folder in xorg.conf.

Section "Files"
     ...
     FontPath     "/usr/share/fonts/local"
     ...
EndSection

If you do not have permission or do not want to change xorg.conf, you may add this to ~/.xinitrc:

xset +fp /usr/share/fonts/local
xset fp rehash

Dzen & conky-cli

conky-cli, a stripped-down version of the Conky status utility, can be used to pipe information directly to dzen for output in a statusbar. The following example displays the the loadavg values in red and the current time in the default dzen foreground colour:

~/.conkyrc:

background no
out_to_console yes
update_interval 1.0
total_run_times 0
use_spacer none

TEXT
^fg(#ff0000)${loadavg 1 2 3} ^fg()${time %a %b %d %I:%M%P}


~/bin/dzconky:

#!/bin/sh

FG='#aaaaaa'
BG='#1a1a1a'
FONT='-*-terminus-*-r-normal-*-*-120-*-*-*-*-iso8859-*'
conky | dzen2 -e - -h '16' -w '600' -ta r -fg $FG -bg $BG -fn $FONT

Simply execute dzconky in your startup scripts.

Enabling Xft support for dzen

Note: You need to install libxft package.

As of revision 241 (development), dzen2 has optional support for Xft. To enable Xft, you should build dzen2 with these options: (edit config.mk)

## Option: With Xinerama and XPM and XFT
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lXinerama -lXpm `pkg-config --libs xft`
CFLAGS = -Wall -Os ${INCS} -DVERSION=\"${VERSION}\" -DDZEN_XINERAMA -DDZEN_XPM -DDZEN_XFT `pkg-config --cflags xft`

To check libxft support, you can use this command:

  echo "ehlo world" | dzen2 -fn 'Times New Roman' -p
Personal tools