Statusbar with icons for spectrwm - BSD
nopc0de
Hey folks,

Do any of you have a statusbar with icons working with spectrwm?

I tried using spectrwm's status_bar with conky.
I tried using conky | dzen2
I tried using xmobar

In none of those I can get icons working. I tried using the siji font and FontAwesome font.

I can see all the siji fonts using xfd (both with the FontStruct format and xft format).
xfd -fa siji = works
xfd -fn -wuncon-siji-.. = works

But my terminals and bars show white squares...

If I set the font to siji on dzen2, I get icons but no text.
Do I need to run multiple dzen2 instances? One for every icon? (That sounds terrible workaround).

Thanks in advance
Wildefyr
Try lemonbar, you'll need the xft patch though.
neeasade
>If I set the font to siji on dzen2, I get icons but no text.

weird, I just set the default text font for dzen2, and then echo icons in whatever scripts I'm sending to it (font awesome though). It's been falling back/resolving them well enough so far.
z3bra
You can't use a font like siji with dzen2. dzen2 only supports one font, and XBM icons, so that's how you're supposed to get icons working.
On the other hand, lemonbar supports "fallback fonts" which lets you specify multiple fonts, so that if the first one doesn't include a glyph, it then uses the second one to display it. You can use this hack to get icons in your bar, by using, eg, siji as a fallback font.
URxvt uses the same mechanism.
neeasade
(06-01-2016, 06:38 AM)z3bra Wrote: You can't use a font like siji with dzen2. dzen2 only supports one font, and XBM icons, so that's how you're supposed to get icons working.
On the other hand, lemonbar supports "fallback fonts" which lets you specify multiple fonts, so that if the first one doesn't include a glyph, it then uses the second one to display it. You can use this hack to get icons in your bar, by using, eg, siji as a fallback font.
URxvt uses the same mechanism.

note that you can define an icon font inline if you want, I checked what I was doing: https://github.com/neeasade/dotfiles/blo...zen.sh#L58

edit: or would this not work because siji is only available in bdf/pcf?
z3bra
Ah, I forgot this part. I didn't check though, but this should work in theory
nopc0de
This is doing my head in

I tried defining the font inline (following neeasade's example) with no avail.
^fn(FontAwesome-10) -> dzen: error, cannot load font: 'FontAwesome-10' (it loads in xfd)
^fn(-wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1) -> Works if I only use icons (As soon as I add text, the icons disappear)

I also tried to merge 2 BDF fonts (Siji+gohu) but for some reason the gohu chars take the width of the siji glyphs. I have no idea why and I think it its a bug in X11/OpenBSD.

Lemonbar doesn't compile on OpenBSD, and I don't have to skills to patch lemonbar to make it work.

hours wasted...
neeasade
(06-01-2016, 03:15 PM)nopc0de Wrote: ^fn(-wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1) -> Works if I only use icons (As soon as I add text, the icons disappear)
you wrap _only_ the icons with that ^fn() syntax (you might be doing this just doesn't appear from your post) - my link was a function wrapper for one icon. example:

Code:
^fn(-wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1) icon from siji here ^() text to be displayed (font will be from launch -fn flag)

unsure on your font awesome not working, but here's a tip on compiling lemonbar in openbsd(unsure if relevant): https://nixers.net/showthread.php?tid=1328
nopc0de
Yea, this is the script I pipe to dzen2: http://ix.io/neb (I also tried with ^fn())
It shows a blank bar.

Compiling lemonbar gives the following:
lemonbar.c:51: warning: declaration does not declare anything
lemonbar.c: In function 'fill_gradient':
lemonbar.c:116: error: 'rgba_t' has no member named 'r'

I don't know how to fix that, I can't write C.

Thanks for helping me btw


UPDATE:

I was able to compile lemonbar on openbsd with the following command:
LDFLAGS="-L/usr/X11R6/lib/" CFLAGS="-I/usr/X11R6/include/" CC=egcc gmake

(requires pkg_add xcb gcc)
neeasade
(06-01-2016, 04:58 PM)nopc0de Wrote: (I also tried with ^fn())

so you tried like so?:
Code:
#!/usr/local/bin/bash

echo -n '^fn(-wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1)'
echo -e -n '\ue0a0'
echo -n '^fn()'
echo -n '^fn(-xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1)'
echo -n ' = pacman'
echo -n '^fn()'
(sorry not currently in a place to test things)

sweet for the lemonbar update :)




Members  |  Stats  |  Night Mode