Git Product home page Git Product logo

dzen's People

Contributors

alexanders avatar baskerville avatar cloudef avatar fimad avatar robm avatar theunknowncylon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dzen's Issues

Mouseenter event

Wuold be possible to include an event MouseHover and MouseLeave in an especific area like ^ca()?

Click events sometimes don't work multiple times

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.

dzen2 segfaults when invoked from cron

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

Action "menuprint" via keypress only works once

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

Y-Positioning is Broken

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.

Allow negative values for -x / -y or allow setting a vertical offset

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.

2013-03-31-121411_1919x22_scrot

This bar uses FONT='--terminus------70------' and a height of 12.

I can think of two reasonable ways this gap could be eliminated:

  • Allow setting -y to "-1", so that the entire bar is drawn a bit higher. Right now, when doing this, dzen is drawn at the bottom of the screen.
  • Allow setting an explicit margin or offset to be used at the top of dzen which would override the automatic vertical centering.

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.

fn() leak on XFT build

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.

grabkeys not working on bspwm

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 ?

Text Alignment with Different Fonts/Fonts that contain Icons

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.

Font Fallback Mechanism

I've noticed that there seem to be no font fallback mechanism.

Maybe dzen2 could either:

  • Handle fontconfig fallback configuration.
  • Provide an internal mechanism: -fn "Font1,Font2,Font3"...

?

^hide() keeps one line

After calling inline command ^hide(), one line on top of the window is kept visible. Is there way to get rid of this?

xpm icons cause xorg memory leak

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

[Feature request] Border

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.

VERSION undefined

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.

Center/Right Alignment

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.

Tag release

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.

Menu mode command line parsing

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

Does not get focus in fluxbox. Unable to capture keyboard.

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.

segmentation fault with empty font name

I accidentially ran something like dzen2 -fn "$FONT" without setting $FONT and dzen2 crashed.
To reproduce, just try this:

$ dzen2 -fn ''
Segmentation fault

"progressbar" (suggrestion)

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

All cyrillic characters are displayed as rectangles [terminus-font]

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

2012-12-29-033259_1920x1200_scrot

Arch Linux

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.

Fixed font size 13 doesn't work

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.

Is this project dead?

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.

Does not grabkeys sometimes.

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?

dzen2 disappearing seconds after booting and pressing keys

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

ANSI Escape Sequences for Colors

When using dzen2, it seems like ANSI escape sequences for colors are not parsed.

So something that is supposed to be output like this:
2015-06-28-090113_1600x900_scrot

Is actually output like this:
2015-06-28-090134_1600x900_scrot

Document the `-dock` flag

The -dock flag seems necessary to work together with some WM, e.g. EXWM and i3.
I cannot find any documentation anywhere, am I missing something?

Strange behavior of dzen2 menu stdout

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.

Segfault when using menuprint

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.