dzen icon indicating copy to clipboard operation
dzen copied to clipboard

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

Open cshapeshifter opened this issue 12 years ago • 3 comments

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.

cshapeshifter avatar Mar 31 '13 10:03 cshapeshifter

I guess the most sensible way would be to position the text/whatever inside dzen's window rather than shifting the window "out" of the screen.

Consider this:

echo 'foo ^p(;-10)bar ^p(;+20)baz' | ./dzen2 -h 40 -y 100 -w 400 -x 300 -ta l -p

So basically prefixing the lines you pipe to dzen with with ^p(;-offset) will shift everything up offset pixels.

dzen-positioning

robm avatar Apr 12 '13 09:04 robm

I see, seems like I missed that feature. It should work for my purpose, but something seems wrong.

Here's a screenshot of the bar without any offset:

2013-04-12-112310_124x26_scrot

This is the when I prepend ^p(;-1). While the text has been raised by 1px correctly, it seems like the icons are drawn too high. The same thing happens to bars. It seems like the bar borders are raised by 1px, but the fill is raised higher up...

2013-04-12-112328_130x16_scrot

2013-04-12-112343_260x15_scrot

I should probably try a simpler config, maybe it's due to the pipes and things I use. But it seems odd.

cshapeshifter avatar Apr 12 '13 09:04 cshapeshifter

This behavior is inconsistent from 0.8.5 -> 0.8.9. In 0.8.5, setting a negative value with -y would shift the panel off the top of the screen.

This would be a useful thing to have back, as on OSX the top portion of the screen is reserved for the menu bar. When I upgraded from 0.8.5, I could no longer get dzen to display in that reserved region.

windelicato avatar Oct 16 '14 21:10 windelicato