robm / dzen Goto Github PK
View Code? Open in Web Editor NEWDzen is a general purpose messaging, notification and menuing program for X11.
License: MIT License
Dzen is a general purpose messaging, notification and menuing program for X11.
License: MIT License
==================================== dzen, (c) 2007-2010 by Robert Manea ==================================== Dzen is a general purpose messaging, notification and menuing program for X11. It was designed to be fast, tiny and scriptable in any language. Features -------- * Small, fast, very tiny set of dependencies (Xlib only by default) * Scriptable in any language * Sophisticated formating language - including colours, icons, graphics * Versatile - display all sorts of information * Interactive - user defined mouse and keyboard actions * Optional XFT support * Optional XINERAMA support Requirements ------------ In order to build dzen you need the Xlib header files. Installation ------------ Edit config.mk to match your local setup (dzen is installed into the /usr/local namespace by default). Afterwards enter the following command to build and install dzen (if necessary as root): make clean install Optionally if you want to use dzen's gadgets: cd gadgets make clean install Note: By default dzen will not be compiled with Xinerama and XPM support. Uncomment the respective lines in config.mk to change this. Contact: -------- Feature requests, patches or anything else related to dzen can be send to: rob dot manea at gmail dot com Running dzen ------------ dzen accepts a couple of options: -fg foreground color -bg background color -fn font -ta alignement of title window content l(eft), c(center), r(ight) -tw title window width -sa alignment of slave window, see "-ta" -l lines, see (1) -e events and actions, see (2) -m menu mode, see (3) -u update contents of title and slave window simultaneously, see (4) -p persist EOF (optional timeout in seconds) -x x position -y y position -h line height (default: fontheight + 2 pixels) -w width -xs number of Xinerama screen -v version information see (5) for the in-text formating language. X resources ----------- Dzen is able to read font and color setting from X resources. As an example you can add following lines to ~/.Xresources dzen2.font: -*-fixed-*-*-*-*-*-*-*-*-*-*-*-* dzen2.foreground: #22EE11 dzen2.background: black Window layout ------------- Dzen's window layout is as follows: ------------------------------------------ | Title window, single line | `------------------------------------------´ | | | scrollable | | Slave window | | multiple lines | | lines to display simultaneously | | controlled with the | | '-l' option | | | | | `------------------------------------------´ The first line you provide to dzen always goes to the title window, all other consecutive lines will be drawn to the slave window unless you explicitly overide this with the (5) In-text formating language command ^tw(). QA: --- Q1: I don't want a slave window, what to do? A1: Do not provide the '-l' option, all lines will be displayed in the title window, this is the default behaviour. Q2: I used the '-l' option but no slave window appears. A2: With the default event/action handling the slave window will only be displayed if you hoover with the mouse over the title window. See "(2) Events and actions" if you'd like to change this. Q3: If I echo some text or cat a file dzen closes itself imediatelly. A3: There are 2 different approaches dzen uses to terminate itself, see next section "Termination". Q4: Ok, the title and slave thing works, can I update the contents of both windows at the same time? A4: Sure, see "(4) Simultaneous updates" or use the in-text command "^tw()" to explicitly draw to the title windwow. See section (5) for further details Q5: Can i chnage color of my input at runtime? A5: Yes, you can change both background and foreground colors and much more See "(5) In-Text formating language" Q6: Can I use dzen as a menu? A6: Yes, both vertical and horizontal menus are supported. See "(3) Menu" for further details. Termination: ------------ dzen uses two different approaches to terminate itself: * Timed termination: if EOF is received -> terminate - unless the '-p' option is set · '-p' without argument persist forever · '-p' with argument n persist for n seconds * Interactive termination: if mouse button3 is clicked -> terminate - this is the default behaviour, see (2) - in some modes the Escape key terminates too, see (2) Return values: -------------- 0 - dzen received EOF 1 - some error occured, inspect the error message user defined - set with 'exit:retval' action, see (2) (1) Option "-l": Slave window -------------------------------- Enables support for displaying multiple lines. The parameter to "-l" specifies the number of lines to be displayed. These lines of input are held in the slave window which becomes active as soon as the pointer enters the title (default action) window. If the mouse leaves the slave window it will be hidden unless it is set sticky by clicking with Button2 into it (default action). Button4 and Button5 (mouse wheel) will scroll the slave window up and down if the content exceeds the window height (default action). (2) Option '-e': Events and actions ----------------------------------- dzen allows the user to associate actions to events. The command line syntax is as follows: -e 'event1=action1:option1:...option<n>,...,action<m>;...;event<l>' Every event can take any number of actions and every action can take any number of options. (By default limited to 64 each, easily changable in action.h) An example: -e 'button1=exec:xterm:firefox;entertitle=uncollapse,unhide;button3=exit' Meaning: button1=exec:xterm:firefox; on Button1 event (Button1 press on the mouse) execute xterm and firefox. Note: xterm and firefox are options to the exec action entertitle=uncollapse,unhide; on entertitle (mouse pointer enters the title window) uncollapse slave window and unhide the title window button3=exit on button3 event exit dzen Supported events: ----------------- onstart Perform actions right after startup onexit Perform actions just before exiting onnewinput Perform actions if there is new input for the slave window button1 Mouse button1 released button2 Mouse button2 released button3 Mouse button3 released button4 Mouse button4 released (usually scrollwheel) button5 Mouse button5 released (usually scrollwheel) button6 Mouse button6 released button7 Mouse button7 released entertitle Mouse enters the title window leavetitle Mouse leaves the title window enterslave Mouse enters the slave window leaveslave Mouse leaves the slave window sigusr1 SIGUSR1 received sigusr2 SIGUSR2 received key_KEYNAME Keyboard events (*) (*) Keyboard events: -------------------- Every key can be bound to an action (see below). The format is: key_KEYNAME where KEYNAME is the name of the key as defined in keysymdef.h (usually: /usr/include/X11/keysymdef.h). The part after 'XK_' in keysymdef.h must be used for KEYNAME. Supported actions: ------------------ exec:command1:..:n execute all given options menuexec executes selected menu entry exit:retval exit dzen and return 'retval' print:str1:...:n write all given options to STDOUT menuprint write selected menu entry to STDOUT collapse collapse (roll-up) slave window uncollapse uncollapse (roll-down) slave window togglecollapse toggle collapsed state stick stick slave window unstick unstick slave window togglestick toggle sticky state hide hide title window unhide unhide title window togglehide toggle hide state raise raise window to view (above all others) lower lower window (behind all others) scrollhome show head of input scrollend show tail of input scrollup:n scroll slave window n lines up (default n=1) scrolldown:n scroll slave window n lines down (default n=1) grabkeys enable keyboard support ungrabkeys disable keyboard support grabmouse enable mouse support only needed with specific windowmanagers, such as fluxbox ungrabmouse release mouse only needed with specific windowmanagers, such as fluxbox Note: If no events/actions are specified dzen defaults to: Title only mode: ---------------- -e 'button3=exit:13' Multiple lines and vertical menu mode: -------------------------------------- -e 'entertitle=uncollapse,grabkeys; enterslave=grabkeys;leaveslave=collapse,ungrabkeys; button1=menuexec;button2=togglestick;button3=exit:13; button4=scrollup;button5=scrolldown; key_Escape=ungrabkeys,exit' Horizontal menu mode: --------------------- -e 'enterslave=grabkeys;leaveslave=ungrabkeys; button4=scrollup;button5=scrolldown; key_Left=scrollup;key_Right=scrolldown; button1=menuexec;button3=exit:13 key_Escape=ungrabkeys,exit' If you define any events/actions, there is no default behaviour, i.e. you will have to specify _all_ events/actions you want to use. (3) Option '-m', Menu --------------------- Dzen provides two menu modes, vertical and horizontal menus. You can access these modes by adding 'v'(ertical) or 'h'(horizontal) to the '-m' option. If nothing is specified dzen defaults to vertical menus. Vertical menu, both invocations are equivalent: dzen2 -p -l 4 -m < file dzen2 -p -l 4 -m v < file Horizontal menu: dzen2 -p -l 4 -m h < file All actions beginning with "menu" work on the selected menu entry. Note: Menu mode only makes sense if '-l <n>' is specified! Horizontal menus have no title window, so all actions affecting the title window will be silently discarded in this mode. (4) Option '-u', Simultaneous updates ------------------------------------- ** DEPRECATED ** This option provides facilities to update the title and slave window at the same time. The way it works is best described by an example: Motivation: We want to display an updating clock in the title and some log output in the slave window. Solution: while true; do date # output goes to the title window dmesg | tail -n 10 # output goes to the slave window sleep 1 done | dzen2 -l 10 -u For this to work correctly it is essential to provide exactly the number of lines to the slave window as defined by the parameter to '-l'. (5) In-text formating & control language: ----------------------------------------- This feature allows to dynamically (at runtime) format the text dzen displays and control its behaviour. Currently the following commands are supported: Note: Doubling the '^' character ('^^') will remove the special meaning from it. Colors: ------- ^fg(color) set foreground color ^fg() without arguments, sets default fg color ^bg(color) set background color ^bg() without arguments, sets default bg color Graphics: --------- ^i(path) draw icon specified by path Supported formats: XBM and optionally XPM ^r(WIDTHxHEIGHT) draw a rectangle with the dimensions WIDTH and HEIGHT ^ro(WIDTHxHEIGHT) rectangle outline ^c(RADIUS) draw a circle with size RADIUS pixels ^co(RADIUS) circle outline Positioning: ------------ ^p(ARGUMENT) position next input amount of PIXELs to the right or left of the current position a.k.a. relative positioning ^pa(ARGUMENT) position next input at PIXEL a.k.a. absolute positioning ARGUMENT: ^p(+-X) move X pixels to the right or left of the current position (on the X axis) ^p(+-X;+-Y) move X pixels to the right or left and Y pixels up or down of the current position (on the X and Y axis) ^p(;+-Y) move Y pixels up or down of the current position (on the Y axis) ^p() without parameters resets the Y position to its default ^pa() takes the same parameters as described above but positions at the absolute X and Y coordinates Further ^p() also takes some symbolic names as argument: _LOCK_X Lock the current X position, useful if you want to align things vertically _UNLOCK_X Unlock the X position _LEFT Move current x-position to the left edge _RIGHT Move current x-position to the right edge _TOP Move current y-position to the top edge _CENTER Move current x-position to center of the window _BOTTOM Move current y-position to the bottom edge Interaction: ------------ ^ca(BTN, CMD) ... ^ca() Used to define 'clickable areas' anywhere inside the title window or slave window. - 'BTN' denotes the mouse button (1=left, 2=right, 3=middle, etc.) - 'CMD' denotes the command that should be spawned when the specific area has been clicked with the defined button - '...' denotes any text or formating commands dzen accepts - '^ca()' without arguments denotes the end of this clickable area Example: foo ^ca(1, echo one)^fg(red)click me and i'll echo one^fg()^ca() bar Actions as commands: -------------------- ^togglecollapse() ^collapse() ^uncollapse() ^togglestick() ^stick() See section (2) 'Events and actions' for a detailed description ^unstick() of each command. ^togglehide() ^hide() ^unhide() ^raise() ^lower() ^scrollhome() ^scrollend() ^exit() Other: ------ ^tw() draw to title window This command has some annoyances, as only the input after the command will be drawn to the title window, so it is best used only once and as first command per line. ^cs() clear slave window This command must be the first and only command per line. ^ib(VALUE) ignore background setting, VALUE can be either 1 to ignore or 0 to not ignore the bg color set with ^bg(color). This command is useful in combination with ^p() and ^pa() in order to position the input inside other already drawn input. Example: ^ib(1)^fg(red)^ro(100x15)^p(-98)^fg(blue)^r(20x10)^fg(orange)^p(3)^r(40x10)^p(4)^fg(darkgreen)^co(12)^p(2)^c(10) These commands can appear anywhere and in any combination in dzen's input. The color can be specified either as symbolic name (e.g. red, darkgreen, etc.) or as #rrggbb hex-value (e.g. #ffffaa). Icons must be in the XBM or optionally XPM format, see the "bitmaps" directory for some sample icons. With the standard "bitmap" application you can easily draw your own icons. Some examples: Input: ^fg(red)I'm red text ^fg(blue)I am blue Input: ^bg(#ffaaaa)The ^fg(yellow)text to ^bg(blue)^fg(orange)colorize Input: ^fg(grey70)Some text containing ^^ characters Input for icons: ^i(bitmaps/envelope.xbm) I am an envelope ^fg(yellow)and ^i(bitmaps/battery.xbm) I'm a baterry. Input for rectangles: 6x4 rectangle ^r(6x4) ^fg(red)12x8 ^r(12x8) ^fg(yellow)and finally 100x15 ^r(100x15) Input for relative positioning: Some text^p(100)^fg(yellow)100 pixels to the right^p(50)^fg(red)50 more pixels to the right Examples: --------- * Display message and timeout after 10 seconds: (echo "This is a message"; sleep 10) | dzen2 -bg darkred -fg grey80 -fn fixed * Display message and never timeout: echo "This is a message"| dzen2 -p * Display updating single line message: for i in $(seq 1 20); do A=${A}'='; print $A; sleep 1; done | dzen2 * Display header and a message with multiple lines: (echo Header; cal; sleep 20) | dzen2 -l 8 Displays "Header" in the title window and the output of cal in the 8 lines high slave window. * Display updating messages: (echo Header; while true; do echo test$((i++)); sleep 1; done) | dzen2 -l 12 The slave window will update contents if new input has arrived. * Display log files: (su -c "echo LOGFILENAME; tail -f /var/log/messages") | dzen2 -l 20 -x 100 -y 300 -w 500 * Monthly schedule with remind: (echo Monthly Schedule; remind -c1 -m) | dzen2 -l 52 -w 410 -p -fn lime -bg '#e0e8ea' -fg black -x 635 * Simple menu: echo "Applications" | dzen2 -l 4 -p -m < menufile * Horizontal menu without any files: {echo Menu; echo -e "xterm\nxclock\nxeyes\nxfontsel"} | dzen2 -l 4 -m h -p * Extract PIDs from the process table: {echo Procs; ps -a} | dzen2 -m -l 12 -p \ -e 'button1=menuprint;button3=exit;button4=scrollup:3;button5=scrolldown:3;entertitle=uncollapse;leaveslave=collapse' \ | awk '{print $1}' * Dzen as xmonad (see http://xmonad.org) statusbar: status.sh | dzen2 -ta r -fn '-*-profont-*-*-*-*-11-*-*-*-*-*-iso8859' -bg '#aecf96' -fg black \ -p -e 'sigusr1=raise;sigusr2=lower;onquit=exec:rm /tmp/dzen2-pid;button3=exit' & echo $! > /tmp/dzen2-pid Have fun.
This is referencing the issue on google code reported earlier by someone else and seems to have been lost in the transition to github. I have this same problem.
I have both key_Return=menuprint;
and button1=menuprint;
as events. Pressing button1 works as it should, but pressing Return will only work the first time. After that, nothing appears on stdout if I press Return again.
My version is dzen-0.9.5-svn
Any chance of tagging a release? It would greatly help in updating dzen ports (in my case to OpenBSD), since 'master.zip' holds no version info and managing versions based on specific commits is a bit of a PITA.
Seeing the latest commit is from 2 years back, can I assume this project is dead? A shame, since now we have just Lemonbar left if I'm right.
subj
Hello!
All cyrillic characters are displayed as rectangles with terminus-font:
echo "hello world кириллицав" | dzen2 -fn '-*-terminus-medium-*-*-*-22-*-*-*-*-*-koi8-u' -p -x 500 -y 1000 -w 500
Tested with:
community/terminus-font 4.36-2
aur/terminus-cyrillic 4.38-1
aur/terminus-font-td1 4.38-1
community/dzen2 0.9.5git-1
aur/dzen2-xft-xpm-xinerama-svn 271-2
aur/dzen2-svn 271-3
In urxvt/roxterm symbols displayed correctly.
Sorry for my poor english.
if you load up a browser with this page http://pastebin.com/47jj8C1n you'll get a listing of your home directory in the dzen title bar: http://i.imgur.com/5ElKK.png
:/ I'm pretty sure it shouldn't work like that. Maybe it's something I've done wrong?
Wuold be possible to include an event MouseHover and MouseLeave in an especific area like ^ca()?
displaying xpm files with the ^i(path)
command
causes xorg RAM usage to grow excessively
(eventually consuming several GB on my system)
until the script is terminated which releases the memory
I see no leak for xbm files
Add:
^scrollup(n)
^scrolldown(n)
This ability is available as scrollup:n action for events, but not during "runtime".
benalb@t410 ~
dzen2 -v
dzen-0.9.5-svn, (C)opyright 2007-2009 Robert Manea
Enabled optional features: XFT XINERAMA
crontab -l
0 */4 * * * export DISPLAY=:0 && echo "something something, something" | dzen2 -fg black -bg white -geometry 500x80 -p -e 'button1=exit'
While the same command in a terminal will work as expected, showing in the screen a white rectangle with the "something" text, and when clicked, disappears, when invoked by cron, it segfaults, thought it also shows the rectangle and respond to the click.
I managed to get a core dump and a backtrace with gdb:
https://pastebin.com/qLHk4d1W
just to say that a couple of commits are available there for some time, mostly some cleanups and use of dpy-independant X11 functions.
https://gitorious.org/drzraf/dzen/commits/
I was looking at the menu option (i.e. -m
) control flow since it's the only option with an optional argument and noticed it doesn't process the option correctly when given a v
argument.
For example, the following example from the Examples section in the README returns the usage information rather than creating a vertical mode (using version 0.8.5-7):
dzen2 -p -l 4 -m v < file
I have a script which opens dzen2 and accepts a single key (and then does something and exits). If I use event string:
entertitle=grabkeys;enterslave=grabkeys;onstart=uncollapse,grabkeys
then it works fine when I invoke the script from a shell. But when I invoke the script from xbindkeys, it does not do the grabkeys. I have to manually
move the mouse out and into the window (activating enterslave/entertitle) to get it to read the key. My kludge fix was to do this:
entertitle=grabkeys;enterslave=grabkeys;onstart=uncollapse,grabkeys,exec:xdotool mousemove 960 0 sleep 0.2 mousemove 900 35
which moves it for me (activating enterslave/entertitle). The sleep is required. Sleeping 0.1 does not work.
So I wonder if this a bug in the program, or is there something I did wrong regarding grabkeys such that it did not work from xbindkeys?
Font switches on XFT build leak. I think I sent you a mail about this way back.
in draw.c before 155, add if(dzen.font.xftfont) XftFontClose(dzen.dpy, dzen.font.xftfont); to fix.
dzen seems to align the content of the main window vertically. I would like the text to stick to the top edge of dzen, without any margin. In the following screenshot, you can see that there's a 1px gap between the text and the top edge of the screen.
This bar uses FONT='--terminus------70------' and a height of 12.
I can think of two reasonable ways this gap could be eliminated:
The reason why I would like this is because the physical screen I use has a gap from the top most line of pixels to the actual screen bezel. The gap at the top of dzen is unneccessary and actually throws off the visual alignment downwards. Even increasing the height of dzen doesn't help much since - visually/physically - the text will always sit too low compared to the physical screen bezel and the bottom edge of dzen.
I accidentially ran something like dzen2 -fn "$FONT"
without setting $FONT and dzen2 crashed.
To reproduce, just try this:
$ dzen2 -fn ''
Segmentation fault
See the following input strings:
^r(5x6)^p(;5)^r(5x6)
^r(5x8)^p(;4)^r(5x8)
^r(5x12)^p(;2)^r(5x12)
All of them draw two rectangles at the same height. The y-position to achieve this (apart from leaving the positioning out obviously) seems very random. This makes it impossible to draw vertical progress bars.
Hello,
using dzen by following this : https://brandonio21.com/2015/04/building-a-volume-popup-using-dzen2/
when im changing volume by holding key, multiple windows are displaying and its showing ugly shadows.
Is there a way to get rid of this with a flag or something?
Hi,
Im pretty happy with dzen and its scriptable capabilties. Aside from a general menu-like program, I also use it as a statusbar. I have however struggled with alignment issues.
Im aware (at least I believe so) that ^p()
and even ^p(_LEFT/_RIGHT/_CENTER)
are calculated relative to the current cursor position on the dzen instance. So, this isnt necessarily the best option if one is aiming to have a bar with left, center and right aligned text/icons.
Im also aware of the undocumented ^ba($bar_width, _LEFT/_CENTER/_RIGHT)
option. However, if I was to run
echo "^ba(1920,_LEFT)Left^ba(1920,_CENTER)Center" | dzen2 -w 1920 -ta l -p
Things don't go as planned. Its hard to know why or if I am using it incorrectly since there isnt much to read on. But it seems that this justification of text is always relative to the current cursor position.
Im also aware of textwidth
, where one could sample the width in pixels of a given string with a given font. That way knowing the width of ones text, together with the usage of absolute positioning of pa()
, it then becomes feasible a proper alignment of a statusbar.
However, using different fonts through fn()
, especially nerd/patched/powerline fonts, I at least have not been successfully able to find pixelwidths of different texts that are patched with icons. It may well be due to the fact that textwidth
may only accept X logical font description of fonts and apparently icon patched fonts do not fall into that configuration.
Therefore alignment ends up hard coded which is a bit of a bummer.
I was wondering if a veteran user or mantainer or anyone knows about undocumented features or solutions to properly align a dzen statusbar which contains different fonts and/or with icons, could enlighten me.
Consider this example:
dzen2 \
-fg black \
-w 300 \
-h 30 \
-l 3 \
-p \
-m \
-e 'onstart=uncollapse,grabkeys,scrollhome;button4=scrollup;key_k=scrollup;button5=scrolldown;key_j=scrolldown;key_Escape=ungrabkeys,exit;button1=ungrabkeys,menuprint,exit;key_Return=ungrabkeys,menuprint,exit' <<EOF
TITLE
aaa
bbb
ccc
ddd
eee
EOF
Which produces a menu named TITLE with three entries visible at a time that can be scrolled either with a mouse-like device, or with j
/k
(and then selected either with the left button or with Return
).
Now, if we hover a mouse over the menu, the entry below the mouse pointer will get highlighted. However, if we then start scrolling, the highlight will be gone, so it won't be possible to tell, which menu entry is currently selected (obviously, until we click on it).
Same if scrolling with keys, except no highlight will be present at all (and when pressing Return
, the first visible entry will be selected1).
So, am I missing some configuration here, or nothing can be done, and this is probably a bug? :)
Which also leads to another problematic side-effect: if in this example we scroll with keyboard, then the last entry we are able to select is ccc
, while entries ddd
and eee
are simply inaccessible. ↩
available here (migrated with svn2git)
https://gitorious.org/drzraf/dzen/
After calling inline command ^hide(), one line on top of the window is kept visible. Is there way to get rid of this?
I get a segfault when clicking on a menu item with this command:
echo -e "^fg(yellow)menu^fg()\none\ntwo\nthree\nfour\nfive\nsix\n" | ./dzen2 -l 7 -x 400 -y 200 -w 200 -p -m -e 'onstart=uncollapse;button1=menuprint'
From what I can see the crash is happening at line 458 in action.c
That's as far as I've been able to figure it out so far.
This command generates a 3-item horizontal menu, with "menuprint" sending the left-click choice to stdout:
echo -e "xterm\nxeyes\nxfontsel" | dzen2 -x 450 -y 450 -w 250 -l 3 -m h -sa c -p -e "button1=menuprint;button3=exit:13"
If I left-click on each item in turn, I get
xterm
xeyes
xfontsel
In the following command, stdout is piped to sed:
echo -e "xterm\nxeyes\nxfontsel" | dzen2 -x 450 -y 450 -w 250 -l 3 -m h -sa c -p -e "button1=menuprint;button3=exit:13" | sed 's/xeyes/aaaaa/'
Clicking on each item in turn gives
xterm
aaaaa
xfontsel
But not all downstream processes accept stdout the way sed does in the example. Neither
echo -e "xterm\nxeyes\nxfontsel" | dzen2 -x 450 -y 450 -w 250 -l 3 -m h -sa c -p -e "button1=menuprint;button3=exit:13" | xclip
nor
echo -e "xterm\nxeyes\nxfontsel" | dzen2 -x 450 -y 450 -w 250 -l 3 -m h -sa c -p -e "button1=menuprint;button3=exit:13" | xsel
sends the menu choice to the X clipboard.
Any suggestions about what's going on here? Many thanks in advance.
Dzen2 used to stick to the screen even when apps were fullscreened. I liked to be able to do that because I have the temps and memory and such in a dzen2 bar at all times. Unless there's a way to make this happen that I'm unaware of?
I'm making a system menu with dzen for bspwm. I directly use onstart=grabbeys event to receive kb events and then dispatch them (with kb_XX events after that) and manage the output in the bash script.
SEL=$(echo " [l]ock e[x]it re[b]oot [p]oweroff " | dzen2 -p $TIMEOUT -w 400 -h 28 -x 100 -e "onstart=grabkeys;key_Escape=exit;key_l=print:l,exit;key_x=print:x,exit;key_b=print:b,exit;key_p=print:p,exit;")
But bspwm doesn't seem to let dzen keep the keyboard focus. On other WM/DM dzen keeps keyboard focus, with bspwm it doesn't. Is there a workaround ?
I just discover dzen because notify-send was broken and I'm very happy with it. IMO it just lack on 1 features:
progress bar
with a -b and a number between 0 and 100 to display only a part of the bar in the fg color and the rest in the bg color
could be awesome for a lot of cases like displaying volume, display loading, compilation status, battery and much more
Currently, if the tags ^p(_LEFT)
, ^p(_CENTER)
or ^p(_RIGHT)
are used, only the cursor is moved. This causes all following text to be drawn after the cursor rather than it being centered or right justified.
If this is intended functionality, then I would like to suggest adding a center and right-justify tag.
e.g. #aaa
becomes #a0a0a0
instead of #aaaaaa
This is really an almost insignificant issue, but I thought I would note that the replacement text, VERSION
, within the control flow for the version (i.e. -v
) option, is not defined.
There was a crash reported on Fedora, can you please take a look?
Bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=1076054
Hi,
I obsorved some strange behaviour of dzen regarding the click events: If I click at an area that launches a programm or switches the workspace or whatever, it works just fine, but if I click again a second, third, … time w/o having moved the mouse, nothing happens.
To make it work again, I first have to leave the area of dzen with the mouse and then click again on the desired item. That doesn't happen always, i.e. it's not totally reproducable, but sometimes, and this whole behaviour doesn't seem to go away…
Anybody knows what's going on here? Btw. this issue occurs on three different machines/systems.
It's not possible to use multiple fonts in dzen2 :-(
Should be able to say xft:Font Awesome:size=9,xft:Fira Sans:size=9
and it should try showing characters from the first font if they exist there, otherwise try the second font, etc.
Here's how st does it. And here's xmobar.
Hi,
This is my xmonad.hs whch calls dzen2 two times: https://pastebin.com/BDdbT0ZY
The right Bar works, the left Bar disappears after some seconds after login and if pressing keys for window layouts in xmonad. With the -p -e parameters, it does not vanish but does not show any content after all. I have no clue where the problem might be. OS is OpenBSD, xmonad 0.11.1, dzen2 0.9.5
I've noticed that there seem to be no font fallback mechanism.
Maybe dzen2 could either:
-fn "Font1,Font2,Font3"
...?
I hope you can add it to the wiki.
Is it possible to add a border around the window? I am using this for notifications and right now I am making one slightly larger one to go underneath. It would be great to have a feature where you can specify a border width and a colour.
I'm using fluxbox WM and dzen 0.8.5.
I have a shell script that detects new windows opening on other workspaces than the current. What I want to do is optionally press enter and go to that workspace.
This is a snippet of the code I've been testing:
DIFF="2"
DZEN="dzen2 -x 0 -y $(($Y-25)) -w 70 -h 25 -l 1 -bg black -fg gray -e 'key_Return=exit:9'"
(echo "[ $DIFF ]"; sleep 15) | $DZEN
When the window pops up it doesn't have focus and pressing enter just goes to the terminal.
If I click the mouse on it and then press enter it doesn't change.
Hello,
I was testing some fonts on dzen2 and I've found that this font: -misc-fixed-medium-r-normal--13-120-75-75-c-80-iso10646-1
isn't showing correctly on dzen2. Instead a bigger bold font is displayed. Even using -misc-fixed-medium-r-normal--13-*-*-*-*-*-*-*
has the same result.
Both -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso10646-1
and -misc-fixed-medium-r-semicondensed--12-110-75-75-c-60-iso10646-1
are displayed correctly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.