You are not logged in.

#1 2022-11-09 18:43:25

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Waybar Sway Language module

I am using the sway/language module in waybar, but when I use the flag format ( "format": "{flag} {variant}", ) , it doesn't display the correct icon. I just get 2 rectangles with some gibberish in them- probably a hex code and then the variant which is dvorak. Can someone tell me which font package the sway/language uses for the flags? I searched but didn't find this anywhere.

I do have the ttf-font-awesome (6.2.0-1) already installed but the unicode for a US flag (f74d) seems to be producing some other icon unfortunately.


Thanks in advance.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#2 2022-11-09 20:34:24

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

Re: Waybar Sway Language module

I'm not sure if it would / should make a difference, but waybar lists - as an optional dependency - otf-font-awesome not fft-font-awesome.  It should be a simple test whether that'd be sufficient.  As that symbol is in the unicode private use area (and not generally defined) it is likely dependent on using the exact font it is designed for.

Last edited by Trilby (2022-11-09 20:39:43)


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

Offline

#3 2022-11-09 21:12:59

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Waybar Sway Language module

Thanks Trilby.

I tried installing the otf-font-awesome and then ran

sudo fc-cache -f -v

and finally reloading waybar but that didn't change anything, unfortunately. I even tried uninstalling the ttf version and running fc-cache, but still no luck.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#4 2022-11-09 21:33:26

progandy
Member
Registered: 2012-05-17
Posts: 5,307

Re: Waybar Sway Language module

U+f74d is part of the "solid" variant of Font Awesome 6 Free, it is not part of the "regular" style You'll have to explicitly select that font in the waybar stylesheet or configure it as a fallback in fontconfi I think.

fc-list ':charset=f74d'

Edit: the waybar module should use the emoji flags, though, so you need an emoji font, e.g. noto-fonts-emoji or ttf-joypixels

Last edited by progandy (2022-11-09 21:56:16)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#5 2022-11-09 23:42:50

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Waybar Sway Language module

thanks @progandy.
there were 2 separate issues here

  • When using sway/language module in waybar -- installing the noto-fonts-emoji package does use the correct flag emoji if I am using the US layout...but when I switch to another language say Arabic, it doesn't display anything. I guess I was hoping it would switch the flag to the country of the language/layout being used currently.

  • As for the wrong fontawesome icon showing up in waybar and the terminal -- seems that was because of alacritty. I found a couple of github issues (see below) where others have complained that country flags don't show up correctly in alacritty. I tried it with kitty and sure enough the same Unicode -U+f74d shows the US flag correctly in kitty

https://github.com/alacritty/alacritty/issues/4025
https://github.com/alacritty/alacritty/issues/50

Last edited by Inxsible (2022-11-10 00:15:13)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

Board footer

Powered by FluxBB