diff options
Diffstat (limited to 'bin/wb-lang')
| -rwxr-xr-x | bin/wb-lang | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/wb-lang b/bin/wb-lang index 5a0cd5d..4e846b6 100755 --- a/bin/wb-lang +++ b/bin/wb-lang @@ -10,8 +10,8 @@ # # wb-lang # print "$path\n$tooltip" for the image module # -# The flags live next to this bar's config because the icon theme ships 13 and -# neither Italian nor British is among them. +# The images live next to this bar's config: the icon theme ships 13 flags and +# Italian is not among them, and it has no hamburger at all. set -euo pipefail flags="$HOME/.config/waybar-udt" @@ -30,11 +30,14 @@ for k in d.get("keyboards", []): print(k.get("active_keymap", "")) break' 2>/dev/null || true)" +# Italian gets its flag; English gets the hamburger, which is what the stock +# bar showed for it. Not a national flag on purpose: the layout is "us" but +# the joke predates this bar, so restoring it matters more than consistency. case "$layout" in Italian*) flag="flag-it.svg"; name="Italian" ;; -English*) flag="flag-gb.svg"; name="English" ;; +English*) flag="burger.svg"; name="English" ;; "") flag="flag-it.svg"; name="unknown" ;; -*) flag="flag-gb.svg"; name="$layout" ;; +*) flag="burger.svg"; name="$layout" ;; esac if [[ ! -r "$flags/$flag" ]]; then |
