aboutsummaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
authorCaroline Larimore <caroline@larimo.re>2024-06-15 23:29:10 -0700
committerCaroline Larimore <caroline@larimo.re>2024-06-15 23:29:10 -0700
commit1fa5e4f368e7514ce84c605efb30aefc952e7f73 (patch)
tree86db7e169dc6e8b12e9da83ffc070f80c871cf2e /home
parentbb915820bd6e33646fe5f90446f99b0faeefc73d (diff)
Replace window title with song on bar
Diffstat (limited to 'home')
-rw-r--r--home/polybar.nix17
1 files changed, 15 insertions, 2 deletions
diff --git a/home/polybar.nix b/home/polybar.nix
index bc7f0db..bc3211a 100644
--- a/home/polybar.nix
+++ b/home/polybar.nix
@@ -56,7 +56,7 @@
module.margin = 1;
modules = {
- left = "cpu memory xwindow";
+ left = "cpu memory music";
center = "i3";
right = "wlan eth filesystem keyboard xkeyboard pulseaudio date";
};
@@ -66,7 +66,6 @@
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";
@@ -79,6 +78,20 @@
};
};
+ "module/music" = {
+ type = "custom/script";
+
+ exec = "playerctl --player=cmus,firefox,%any -F metadata --format='{{title}} - {{artist}}'";
+ tail = true;
+
+ format = {
+ prefix = {
+ text = "󰎄 ";
+ foreground = "#${c.accent}";
+ };
+ };
+ };
+
"module/i3" = {
type = "internal/i3";