You are not logged in.

#1 2010-02-07 16:34:24

Roline
Member
From: Netherlands
Registered: 2009-12-05
Posts: 207
Website

[SOLVED]Size dmenu

Quick question. Is there a way to change the size of dmenu? Padding? Margin?
Thanks.

Last edited by Roline (2010-02-07 22:26:36)


Bitbucket - DeviantART - Userstyles
*Currently Not Using Arch

Offline

#2 2010-02-07 16:56:01

lagagnon
Member
From: an Island in the Pacific...
Registered: 2009-12-10
Posts: 1,087
Website

Re: [SOLVED]Size dmenu

"man dmenu" shows that you can change the font size and fore/background colours of dmenu, but that is it. Otherwise margins and paddings might be controlled by whatever window manager you use - which is what??


Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.

Offline

#3 2010-02-07 18:51:03

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: [SOLVED]Size dmenu

There's a heavily patched version of dmenu in the AUR. It's awesome, try it. smile

Offline

#4 2010-02-07 19:19:02

Roline
Member
From: Netherlands
Registered: 2009-12-05
Posts: 207
Website

Re: [SOLVED]Size dmenu

lagagnon wrote:

"man dmenu" shows that you can change the font size and fore/background colours of dmenu, but that is it. Otherwise margins and paddings might be controlled by whatever window manager you use - which is what??

Openbox - with margin (~/.config/openbox/rc.xml)

<margins>
<top>15</top>
<bottom>26</bottom>
<left>10</left>
<right>10</right>
</margins>

But dmenu doesnt get initially placed (placed top or bottom), so it overrides the margins?

PS: I open dmenu with a script (for the keybinding)
~/.scripts/OBDmenu.sh:

#!/bin/sh
exec $(dmenu_path | dmenu -nb '#303030' -nf '#8f8f8f' -sb '#303030' -sf '#e0e0e0' && eval "exec $exe")

Is it possible to change the script so it fits the margins I want? (see above).


Bitbucket - DeviantART - Userstyles
*Currently Not Using Arch

Offline

#5 2010-02-07 20:38:25

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: [SOLVED]Size dmenu

Roline,

Put the fonts, colors, margins, etc... from the man page into your script, then dmenu will run with those new settings whenever the script is called.

So, if you want your 15 pixel margin at the top recognized, or your 26 pixel margin at the bottom you will need to put the -y offset option into your script with the appropriate nbr of pixels to make it do what you want.  Same with the 10 pixels on either side, that would be the -x offset option.

HTH,


Knute

Offline

#6 2010-02-07 22:26:13

Roline
Member
From: Netherlands
Registered: 2009-12-05
Posts: 207
Website

Re: [SOLVED]Size dmenu

Knute wrote:

Roline,

Put the fonts, colors, margins, etc... from the man page into your script, then dmenu will run with those new settings whenever the script is called.

So, if you want your 15 pixel margin at the top recognized, or your 26 pixel margin at the bottom you will need to put the -y offset option into your script with the appropriate nbr of pixels to make it do what you want.  Same with the 10 pixels on either side, that would be the -x offset option.

HTH,

Thanks for the quick replay!
I tried the xoffset and yoffset(with and without the -b option) but I coudn't get it to work properly. Also, man dmenu doesn't show offset variable, thus no offset options. But I found a way to fix it! This patch by fresch added the options. So now the script shows:

#!/bin/sh
exec $(dmenu_path | dmenu -nb '#303030' -nf '#8f8f8f' -sb '#303030' -sf '#e0e0e0' -x 10 -w 1260 && eval "exec $exe")

-x 10 for left 10 pix and my screen is 1280 so the -w needs to be 1260 for the left "margin".

Screenshot:
febscrotbusy.th.png

Last edited by Roline (2010-02-07 23:38:50)


Bitbucket - DeviantART - Userstyles
*Currently Not Using Arch

Offline

Board footer

Powered by FluxBB