Add music player module

This commit is contained in:
2021-10-02 23:02:29 +03:00
parent 1a93941c28
commit b417d75807

View File

@@ -23,15 +23,18 @@ font-0 = FiraCode:size=11
font-1 = FontAwesome5Brands:size=11 font-1 = FontAwesome5Brands:size=11
font-2 = FontAwesome5FreeSolid:size=11 font-2 = FontAwesome5FreeSolid:size=11
modules-left = workspaces modules-left = workspaces player
modules-center = date modules-center = date
modules-right = keyboard-layout volume-control control network power-menu modules-right = keyboard-layout volume-control control network power-menu
module-margin = 1 module-margin = 1
; ; _ _____ _____ _____ __ __ ___ ____ _ _ _ _____ ____
; LEFT MODULES ; | | | ____| ___|_ _| | \/ |/ _ \| _ \| | | | | | ____/ ___|
; | | | _| | |_ | | | |\/| | | | | | | | | | | | | _| \___ \
; | |___| |___| _| | | | | | | |_| | |_| | |_| | |___| |___ ___) |
; |_____|_____|_| |_| |_| |_|\___/|____/ \___/|_____|_____|____/
; ;
[module/workspaces] [module/workspaces]
@@ -53,17 +56,33 @@ label-urgent-background = ${colors.primary}
label-mode = --%mode%-- label-mode = --%mode%--
[module/active-window] [module/player]
type = internal/xwindow type = custom/script
exec = players=`playerctl -l | wc -l` ; [[ $players != "0" ]] && playerctl metadata -f "{{status}}: {{trunc(title, 40)}} by {{artist}}" || echo "Nothing playing"
tail = true
format = <label> format = <label>
label = %title% label = %output%
label-maxlen = 40
click-left = playerctl play-pause
; ____ _____ _ _ _____ _____ ____
; / ___| ____| \ | |_ _| ____| _ \
; | | | _| | \| | | | | _| | |_) |
; | |___| |___| |\ | | | | |___| _ <
; \____|_____|_| \_| |_| |_____|_| \_\
; ;
; CENTER MODULES ; __ __ ___ ____ _ _ _ _____ ____
; ; | \/ |/ _ \| _ \| | | | | | ____/ ___|
; | |\/| | | | | | | | | | | | | _| \___ \
; | | | | |_| | |_| | |_| | |___| |___ ___) |
; |_| |_|\___/|____/ \___/|_____|_____|____/
[module/date] [module/date]
type = internal/date type = internal/date
@@ -72,10 +91,13 @@ date = "%d %b %H:%M, %A"
label = %date% label = %date%
;
; RIGHT MODULES
;
; ____ ___ ____ _ _ _____ __ __ ___ ____ _ _ _ _____ ____
; | _ \|_ _/ ___| | | |_ _| | \/ |/ _ \| _ \| | | | | | ____/ ___|
; | |_) || | | _| |_| | | | | |\/| | | | | | | | | | | | | _| \___ \
; | _ < | | |_| | _ | | | | | | | |_| | |_| | |_| | |___| |___ ___) |
; |_| \_\___\____|_| |_| |_| |_| |_|\___/|____/ \___/|_____|_____|____/
;
[module/keyboard-layout] [module/keyboard-layout]
type = internal/xkeyboard type = internal/xkeyboard