The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
0

Increase font size of dmenu / j4-dmenu

asked Jul 13 '14

alex gravatar image

Hi,

I can't find a way to increase the font size of the application launcher menu (dmenu / j4-dmenu).

Is there way to do that?

Cheers, Alex

3 answers

Sort by » oldest newest most voted
1

answered Jul 13 '14

ANOKNUSA gravatar image

updated Jul 13 '14

I'm not familiar with j4-dmenu, but the font size of dmenu itself is dictated by the '-fn' flag used when it's launched. i3-dmenu-desktop is a nice convenience, but that's really all it is---the only thing that makes it different from plain old dmenu is that it specifically searches for *.desktop files rather than all executable files in $PATH. You simply need to edit the part of i3-dmenu-desktop/j4-dmenu that calls dmenu and add the '-fn' flag to your taste. Personally, I've just tied dmenu_run to a keybinding in my config:

bindsym $mod+space exec dmenu_run -i -b -p 'Arch Linux' -fn 'Ubuntu Mono:bold:pixelsize=15' -nb '#fdf6e3' -nf '#586c75' -sf '#fdf6e3' -sb '#b58900'

The dmenu man page has all the information on what those flags do. I'd rather have complete control over how dmenu looks and behaves than a pre-made script that tells me what I want. I'll tell you what I want, dmenu, thank you very much. ;)

Also, note that you'd need to build dmenu yourself with the Xft patch to use TTF fonts; otherwise you'd need to use xfont-style notation to declare the font.

Comments

Thanks for your suggestion. Changing j4-dmenu-desktop's call to dmenu did the trick. I've edited the Main.hh to include the font specification when calling dmenu and it works flawlessly now.

alex gravatar imagealex (Jul 14 '14)edit

Thanks for this. I was finally able to tune dmenu to my likings. I don't use dmenu very often, but when I do, I do it big :-) bindsym $mod+d exec dmenu_run -i -l 23 -p 'gogo Gadget' -fn 'Source Code Pro for Powerline:bold:pixelsize=32' -nb '#222222' -nf '#ceecee' -sb '#f8f893' -sf '#222222'

cee gravatar imagecee (Jul 14 '14)edit

I already noticed that in Ubuntu 14.04 there's an alternative dmenu executable (dmenu.xft) with the patch already compiled. Can be selected via: sudo update-alternatives --config dmenu

Ruben G gravatar imageRuben G (Feb 25 '15)edit
0

answered Jul 13 '14

tigrezno gravatar image

Use the "-fn" option for setting the font, for example:

dmenu_run -fn '--fixed-bold-r-normal--15-----*-iso10646-1'

Comments

Thanks. As stated above I added this to the dmenu call in the Main.hh of j4-dmenu-desktop and it works fine after recompiling. Unfortunately I can only select one answer as the correct one.

alex gravatar imagealex (Jul 14 '14)edit
0

answered May 1 '15

erikdubois gravatar image

great works with j4-dmenu

Question Tools

Stats

Asked: Jul 13 '14

Seen: 3,441 times

Last updated: May 01