You are not logged in.

#1 2012-04-17 20:18:23

kwakshot
Member
From: UK
Registered: 2011-06-12
Posts: 35
Website

[SOLVED] dmenu font change not working in dwm

I just installed dwm to try it out as I previously used Openbox.

Everything works great, except for that dmenu isn't using the correct font (terminus) and is instead using this horrible looking sans-serif font...

Here's the relevant lines of my config.h:

static const char font[]            = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*";

static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };

Last edited by kwakshot (2012-04-17 22:18:50)

Offline

#2 2012-04-17 21:15:58

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] dmenu font change not working in dwm

Are you using dmenu 4.5-2?

Offline

#3 2012-04-17 21:19:35

kwakshot
Member
From: UK
Registered: 2011-06-12
Posts: 35
Website

Re: [SOLVED] dmenu font change not working in dwm

karol wrote:

Are you using dmenu 4.5-2?

Using 4.5, not 4.5-2

Offline

#4 2012-04-17 21:21:02

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] dmenu font change not working in dwm

kwakshot wrote:
karol wrote:

Are you using dmenu 4.5-2?

Using 4.5, not 4.5-2

Umm, where did you get it from? Why aren't you using the one from the repos?

Offline

#5 2012-04-17 21:22:43

kwakshot
Member
From: UK
Registered: 2011-06-12
Posts: 35
Website

Re: [SOLVED] dmenu font change not working in dwm

Ahh okay I just tried to install it from the repo, and it was clashing with dmenu-xft, so I removed dmenu-xft, let's see about it now

EDIT: Nope, same problem, it works fine in openbox just not in dwm

Last edited by kwakshot (2012-04-17 21:24:15)

Offline

#6 2012-04-17 21:23:54

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,557
Website

Re: [SOLVED] dmenu font change not working in dwm

Also, if you have done any modification to the dmenu_run script, you may want to ensure that doesn't interfere.

If that sounds foolish, I wouldn't hold it against you ... It's the mistake I made!


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2012-04-17 21:24:29

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] dmenu font change not working in dwm

dmenu 4.5-2 has the xft patch applied: https://projects.archlinux.org/svntogit … 40bb2d22a5

Offline

#8 2012-04-17 21:26:42

kwakshot
Member
From: UK
Registered: 2011-06-12
Posts: 35
Website

Re: [SOLVED] dmenu font change not working in dwm

Trilby wrote:

Also, if you have done any modification to the dmenu_run script, you may want to ensure that doesn't interfere.

If that sounds foolish, I wouldn't hold it against you ... It's the mistake I made!

Here's the contents of the script

#!/bin/sh
cachedir=${XDG_CACHE_HOME:-"$HOME/.cache"}
if [ -d "$cachedir" ]; then
	cache=$cachedir/dmenu_run
else
	cache=$HOME/.dmenu_cache # if no xdg dir, fall back to dotfile in ~
fi
(
	IFS=:
	if stest -dqr -n "$cache" $PATH; then
		stest -flx $PATH | sort -u | tee "$cache" | dmenu "$@"
	else
		dmenu "$@" < "$cache"
	fi
) | ${SHELL:-"/bin/sh"} & 

Offline

#9 2012-04-17 21:29:04

kwakshot
Member
From: UK
Registered: 2011-06-12
Posts: 35
Website

Re: [SOLVED] dmenu font change not working in dwm

karol wrote:

dmenu 4.5-2 has the xft patch applied: https://projects.archlinux.org/svntogit … 40bb2d22a5

Still the same problem with dmenu 4.5-2, working fine in Openbox but in dwm, the font isn't preserved, and reverts to a sans-serif font

Offline

#10 2012-04-17 21:39:37

kwakshot
Member
From: UK
Registered: 2011-06-12
Posts: 35
Website

Re: [SOLVED] dmenu font change not working in dwm

I checked my openbox autostart.sh for anything that might be making it work properly, there isn't anything there that's relevant...

Offline

#11 2012-04-17 22:14:11

magicalChicken
Member
From: in the sky
Registered: 2012-03-03
Posts: 73
Website

Re: [SOLVED] dmenu font change not working in dwm

I had this problem too, a quick and dirty fix is simply to remove the -fn fontname part of the dmenu_run command in the config.h file as with no font specified dmenu reverts to the same default 9 pt terminus as dwm uses. I do not know why specifying font does not work right, it dosent from the command line either which makes me think that there may be a bug in the xtf patch.

Offline

#12 2012-04-17 22:18:35

kwakshot
Member
From: UK
Registered: 2011-06-12
Posts: 35
Website

Re: [SOLVED] dmenu font change not working in dwm

magicalChicken wrote:

I had this problem too, a quick and dirty fix is simply to remove the -fn fontname part of the dmenu_run command in the config.h file as with no font specified dmenu reverts to the same default 9 pt terminus as dwm uses. I do not know why specifying font does not work right, it dosent from the command line either which makes me think that there may be a bug in the xtf patch.

Worked like a charm thank you smile This may be a problem for people who want to set their dmenu font to something else though

Offline

Board footer

Powered by FluxBB