You are not logged in.

#1 2013-05-17 16:25:39

kaivai
Member
Registered: 2013-05-17
Posts: 21

[Solved] Xmobar UTF-8 problems

Hey Folks!

I've recently migrated from Debian, and I'm trying to use the same .xmobarrc I wrote for that installation in Arch.Debian did a bit more hand-holding and had a precompiled binary available in it's repo with all of the bells and whistles compiled into xmbobar.

I have xmobar running fine, initially I installed with pacman, but then issued the following command to install xmobar with UTF8, xft etc:
<code>cabal install xmobar --flags="all_extensions"</code>

That didn't work for me, so I was a bit more explicit with the flags:
<code>cabal install xmobar --flags="with_utf8 with_xft with_mpd with_inotify with_iwlib"</code>

The command executes properly, but I still cannot get UTF8 characters to show up. Even after restarting xmobar, and also rebooting.



After reading a bit on the GIT page for xmobar, I read that UTF8 characters require a package called "utf8-string". However "pacman -Ss utf8-string" shows that I have this package installed (haskell-utf8-string)


I have tried both pasting actual UTF8 characters, and also calling "echo -e '\xE2\x96\xA0'\" (the code I was using in Debian). And neither seems to work.


Has anyone else had any success using UTF8 characters with xmobar? I'm surely doing something wrong, I just can't seem to figure out what.

Thank you so much for reading, and hopefully one of you has had some more success.

Last edited by kaivai (2013-05-24 04:09:30)

Offline

#2 2013-05-23 23:10:13

kaivai
Member
Registered: 2013-05-17
Posts: 21

Re: [Solved] Xmobar UTF-8 problems

I wouldn't qualify this a complete solution just yet, but I had previously set the font to:

font = "xft:Sans-9:bold"

If I remove the xft: part, the utf8 character shows up perfectly (albeit at the cost of anti-aliased fonts).

Offline

#3 2013-05-24 03:41:18

kaivai
Member
Registered: 2013-05-17
Posts: 21

Re: [Solved] Xmobar UTF-8 problems

I figured it out!

I did not realize that not all UTF8 fonts supported all UTF8 characters. The UTF8 characters for play, pause and stop were not supported in Droid Sans Mono, Sans, Sans Mono, or Droid Naskh Shift Alt.

Switching to Deja Vu Sans Oblique Mono solved it for me!

Offline

Board footer

Powered by FluxBB