3

I am trying to change the font of dmenu. I am running the i3 window manager.

$ dmenu_run -v
/bin/bash: line 1: dmenu-4.5,: command not found

$ dmenu_run -fn "-xos4-terminus-medium-r-*-*-14-*"                                                                      
cannot load font '-xos4-terminus-medium-r-*-*-14-*'

I want to use the following font - font pango:DejaVu Sans Mono 12 because it is the same font I am using inside my i3 config. However, no matter what font I try to use, dmenu reports it cannot load the font.

How do I get dmenu to allow me to load the above font?

2
  • 1
    Which version of dmenu are you using? Since 4.6 Xft is used for font rendering, so you need to follow the font specification syntax from freedesktop.org/software/fontconfig/fontconfig-user.html.
    – Wieland
    Jun 3, 2016 at 8:25
  • It returns as dmenu-4.5. I am guessing that it is an older version because I am on a LTS version of Ubuntu. Jun 3, 2016 at 15:24

1 Answer 1

6

I was able to resolve my issue.

In my .i3/config file I am using this line -

# start dmenu (a program launcher)
# bindsym $mod+d exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
bindsym $mod+d exec --no-startup-id i3-dmenu-desktop --dmenu="dmenu -fn 'DejaVu Sans Mono-15'"

I then opened my 'source' folder that I created under my home directory -

$ cd /home/me/Applications
$ git clone http://git.suckless.org/dmenu
$ cd  dmenu

I then ran these commands

$ make (to make sure it compiles)
$ sudo make install clean (to install it)

I then had the latest version of dmenu which I was able to confirm by doing -

$ dmenu_run -v (it reports version 4.6)

This version supports the Xft font rendering. If the original make fails, be sure to install build tools and such. Just google the error you get and get any supporting compilation tools.

Thanks @wieland.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .