diff --git a/Makefile b/Makefile index fb28005..4347d03 100644 --- a/Makefile +++ b/Makefile @@ -42,6 +42,7 @@ uninstall: ${DESTDIR}${PREFIX}/bin/dwmblocks-pulse-listener \ ${DESTDIR}${PREFIX}/bin/dwmblocks-battery \ ${DESTDIR}${PREFIX}/bin/dwmblocks-network \ - ${DESTDIR}${PREFIX}/bin/dwmblocks-volume + ${DESTDIR}${PREFIX}/bin/dwmblocks-volume \ + ${DESTDIR}${PREFIX}/bin/dwmblocks-fcitx5 .PHONY: all options clean install uninstall diff --git a/scripts/dwmblocks-fcitx5 b/scripts/dwmblocks-fcitx5 new file mode 100755 index 0000000..2f2f3e8 --- /dev/null +++ b/scripts/dwmblocks-fcitx5 @@ -0,0 +1,12 @@ +#!/usr/bin/env zsh + +local ime_sym='?' +case "$(fcitx5-remote -n)" in + 'keyboard-us') + ime_sym='E' + ;; + 'mozc') + ime_sym="和" + ;; +esac +printf '󰌌 %s' "${ime_sym}" diff --git a/scripts/dwmblocks-volume b/scripts/dwmblocks-volume index c1f7fed..7f0cd10 100755 --- a/scripts/dwmblocks-volume +++ b/scripts/dwmblocks-volume @@ -6,7 +6,7 @@ if [[ "$(pamixer --get-mute)" = "true" ]]; then icon='󰸈' elif ((${volume} > 50)); then icon='󰕾' -elif ((${volume} > 0)); then +elif ((${volume} >= 0)); then icon='󰖀' else icon='?'