diff options
| author | Caroline Larimore <caroline@larimo.re> | 2024-05-28 22:49:56 -0700 |
|---|---|---|
| committer | Caroline Larimore <caroline@larimo.re> | 2024-05-28 22:49:56 -0700 |
| commit | 564ff591da98958f4f1d4b331fc1d90cde8ca5fa (patch) | |
| tree | 90c9cc37e7ea0cdbda199b300d792eb88b261d71 /home/polybar.nix | |
| parent | 99fdd3b6e9fe44ec09e4f9f0598b7f6ec18ac529 (diff) | |
Rework polybar keyboard module
Diffstat (limited to 'home/polybar.nix')
| -rw-r--r-- | home/polybar.nix | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/home/polybar.nix b/home/polybar.nix index 073919d..bc7f0db 100644 --- a/home/polybar.nix +++ b/home/polybar.nix @@ -58,10 +58,26 @@ modules = { left = "cpu memory xwindow"; center = "i3"; - right = "wlan eth filesystem xkeyboard pulseaudio date"; + right = "wlan eth filesystem keyboard xkeyboard pulseaudio date"; }; }; + "module/keyboard" = { + type = "custom/script"; + + exec = "if [[ $(fcitx5-remote -n) == 'mozc' ]]; then printf 'jp'; else printf 'en'; fi"; + + interval = 1; + + click.left = "${pkgs.fcitx5}/bin/fcitx5-remote -t"; + + format = { + prefix = { + text = " "; + foreground = "#${c.accent}"; + }; + }; + }; "module/i3" = { type = "internal/i3"; @@ -139,16 +155,10 @@ indicator.icon = [ "caps lock;;" ]; format = { - text = "<label-indicator> <label-layout>"; - - prefix = { - text = " "; - foreground = "#${c.accent}"; - }; + text = "<label-indicator>"; }; label = { - layout = "%layout%"; indicator.on = "%icon%"; }; }; |