Hallo,
ich wollte meine Statusbar für DWM (6.0) gern erweitern und mir die up- und download Rate anzeigen. Dafür dachte ich die UTF-8 Symbole Pfeil hoch und runter zu verwenden.
Wenn ich mir die Statusbarausgabe im Terminal ansehe, ist alles ok. Wenn ich es wie im Tutorial
dwm-status | while read -r; do xsetroot -name "$REPLY"; done &
in der oberen Leiste anzeigen lassen, dann bekomme ich lediglich ein Zeichenwirrwar angezeigt. Sprich irgendwie scheint die Statusleiste in DWM nicht UTF8 fähig zu sein.
Ich habe es mit dem Pango patch probiert. Da verschwindet mir aber die Statusleiste in dwm komplett. Keine Ahnung warum die nicht mehr dargestellt wird. Der Xft patch kann nicht kompiliert werden, da
patching push
patching file push.c
patching moveresize
patching file moveresize.c
patching no-border
patching file dwm.c
patching xft
patching file dwm.c
Hunk #13 succeeded at 1605 (offset 9 lines).
Hunk #14 succeeded at 1674 (offset 9 lines).
Hunk #15 succeeded at 1779 (offset 34 lines).
make[1]: Entering directory '/tmp/dwm/src/dwm-6.0'
dwm build options:
CC dwm.c
CFLAGS = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/include/X11 -I/usr/include/freetype2 -DVERSION="6.0" -DXINERAMA
LDFLAGS = -s -L/usr/lib -lc -L/usr/lib/X11 -lX11 -L/usr/lib/X11 -lXinerama
CC = cc
dwm.c: In Funktion »keypress«:
dwm.c:1062:2: Warnung: »XKeycodeToKeysym« ist veraltet (deklariert bei /usr/include/X11/Xlib.h:1699) [-Wdeprecated-declarations]
keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0);
^
CC -o dwm
dwm.o: In function `getcolor':
dwm.c:(.text+0xaa4): undefined reference to `XftColorAllocName'
dwm.o: In function `textnw':
dwm.c:(.text+0xbce): undefined reference to `XftTextExtentsUtf8'
dwm.o: In function `drawtext':
dwm.c:(.text+0xdf9): undefined reference to `XftDrawCreate'
dwm.c:(.text+0xe53): undefined reference to `XftDrawStringUtf8'
dwm.c:(.text+0xe5b): undefined reference to `XftDrawDestroy'
dwm.o: In function `main':
dwm.c:(.text.startup+0x115): undefined reference to `XftFontOpenName'
dwm.c:(.text.startup+0x138): undefined reference to `XftFontOpenName'
collect2: Fehler: ld gab 1 als Ende-Status zurück
Makefile:28: recipe for target 'dwm' failed
make[1]: *** [dwm] Error 1
make[1]: Leaving directory '/tmp/dwm/src/dwm-6.0'
In meiner config.h verwende ich momentan den Font :
#define FONT_SIZE "7"
# define FONT_NAME "terminus-medium-r"
static const char font[] = "-*-"FONT_NAME"-*-*-"FONT_SIZE"-*-*-*-*-*-*-*";
Ich bin nun überfragt, wie ich das mir scheinbar doch nicht so simple Zeichensatzproblem lösen kann. Hat jemand eine Idee, wie ich in der Statusleiste UTF-8 Symbole darstellen kann?
Vielen Dank für eure Hilfe!!
Beste Grüße,
L-K