Using Dpup Exprimo 5.X.3.4.12
dzen is a configurable, flexible utility to show text on screen or even menu's.
I can't choose other fonts than 'fixed' in dzen2, though fc-list and xfontsel show fonts like courier, dejavu sans, nimbus etc.
I have not been able to find a solution. There's Archlinux info, but that doesn't suit Puppy. Does someone know how to select other fonts?
For example:
#echo "Hello World" | dzen2 -fn "DejaVu Sans" -p' gives an error: cannot load font 'DejaVu Sans'. With 'fixed' font it works.
Programmatically, a line could look as follows:
awk ..... { print x | "dzen2 | -fn '-*-fixed-bold-r-*-*-24-*-*-*-*-*-*-*' -fg white -bg black -h 30 -ta l -x 0 -y 574 -w 800" }
That works with the fixed font, but not with others. By the way, the (terrible) -*-*-*-* thing is produced by xfontsel but unforunately I cannot select/copy from xfontsel, but that's another matter.
I suspect dzen looks for fonts in a Puppy place that's not the same as in Archlinux but I don't know for sure....
Attached pets of dzen2 (standard package) and dzen2g (dzen gadgets).
Any help appreciated....
PS I wanted to upload dzen2 pets but it's too slow right now. I'll try again later.
dzen2 - use of fonts
I found a solution to use 'DejaVu Sans' in stead of 'fixed' font. Well, sort of. It's a coincidence on the one hand and a classic 'escape' issue with awk on the other. This program line now works:
#awk .....{ print x | "dzen2 -fn \"-*-DejaVu Sans-*-r-*-*-22-*-*-*-*-*-*\" -bg black -fg white -h 30 -ta l -x 600 -y 450 -w 200"}
Note the the \"....\".
Fine, I'm happy with this but I have no explanation why other fonts (except 'fixed') don't work though reported by xfontsel....
#awk .....{ print x | "dzen2 -fn \"-*-DejaVu Sans-*-r-*-*-22-*-*-*-*-*-*\" -bg black -fg white -h 30 -ta l -x 600 -y 450 -w 200"}
Note the the \"....\".
Fine, I'm happy with this but I have no explanation why other fonts (except 'fixed') don't work though reported by xfontsel....
Hey Linuph
Nice find, thanks!
BTW, I compiled it myself from the source (simple 'make') and have no problems using other fonts in Slacko-5.4.
Greetings!
Nice find, thanks!
BTW, I compiled it myself from the source (simple 'make') and have no problems using other fonts in Slacko-5.4.
Greetings!
- Attachments
-
- dzen2.png
- (14.54 KiB) Downloaded 1268 times
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]
[b][color=green]Omnia mea mecum porto.[/color][/b]
Have you tried using a script?
Can't remember where I got this - probably the ArchWiki...
Puts the date and time at the top right.
Code: Select all
#!/bin/sh
FG='#ffffff'
BG='#003aff'
FONT='-adobe-helvetica-*-*-*-*-24-*-*-*-*-*-*-*'
while true ; do
dt=`date +"%a %b %d %l:%M %p "`
printf "%s\n" "$dt"
sleep 20
done | dzen2 -e '' -x '800' -h '24' -w '880' -ta r -fn $FONT -fg $FG -bg $BG
Puts the date and time at the top right.
- Attachments
-
- dzen2.png
- (185.37 KiB) Downloaded 1232 times
Sorry, I failed to even understand the git site. Does anyone already have a .pet suitable for Slacko 5.6 please? If not - a suggestion as to how I should interpret/use the following site would be great...
https://github.com/robm/dzen
cheers!
https://github.com/robm/dzen
cheers!
Just download the ZIP from the git page, it's located lower right-hand side, extract it somewhere open a terminal in the source directory and type make, a binary will be createdgreengeek wrote:Sorry, I failed to even understand the git site. Does anyone already have a .pet suitable for Slacko 5.6 please? If not - a suggestion as to how I should interpret/use the following site would be great...
https://github.com/robm/dzen
cheers!
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
I got fonts working by using an argument like
Code: Select all
-fn "Sans:size=20"