From 5c79f90507c882d552ca5d67a1fb20ee5f855f57 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Thu, 16 Jul 2020 22:41:26 +0200 Subject: [PATCH] Added cmus support --- polybar/config | 21 ++++++++++++++++++++- polybar/scripts/cmus.sh | 16 ++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100755 polybar/scripts/cmus.sh diff --git a/polybar/config b/polybar/config index 74e62a2..0f2cf2b 100644 --- a/polybar/config +++ b/polybar/config @@ -46,7 +46,7 @@ module-margin = 1 modules-left = i3 title modules-center = time -modules-right = pavolume date +modules-right = cmus pavolume date ################################################################################# # MODULES # @@ -79,6 +79,25 @@ label-urgent-foreground = #000000 label-urgent-background = #bd2c40 label-urgent-padding = 1 +[module/cmus] +type = custom/script + +exec = ~/.config/polybar/scripts/cmus.sh +exec-if = pgrep -x cmus +interval = 1 + +click-left = cmus-remote --next +click-right = cmus-remote --prev +click-middle = cmus-remote --pause +scroll-up = cmus-remote --volume +5% +scroll-down = cmus-remote --volume -5% + +label-font = 3 +format =