Add music player module
This commit is contained in:
@@ -23,16 +23,19 @@ font-0 = FiraCode:size=11
|
||||
font-1 = FontAwesome5Brands:size=11
|
||||
font-2 = FontAwesome5FreeSolid:size=11
|
||||
|
||||
modules-left = workspaces
|
||||
modules-left = workspaces player
|
||||
modules-center = date
|
||||
modules-right = keyboard-layout volume-control control network power-menu
|
||||
|
||||
module-margin = 1
|
||||
|
||||
|
||||
;
|
||||
; LEFT MODULES
|
||||
;
|
||||
; _ _____ _____ _____ __ __ ___ ____ _ _ _ _____ ____
|
||||
; | | | ____| ___|_ _| | \/ |/ _ \| _ \| | | | | | ____/ ___|
|
||||
; | | | _| | |_ | | | |\/| | | | | | | | | | | | | _| \___ \
|
||||
; | |___| |___| _| | | | | | | |_| | |_| | |_| | |___| |___ ___) |
|
||||
; |_____|_____|_| |_| |_| |_|\___/|____/ \___/|_____|_____|____/
|
||||
;
|
||||
|
||||
[module/workspaces]
|
||||
type = internal/i3
|
||||
@@ -53,17 +56,33 @@ label-urgent-background = ${colors.primary}
|
||||
|
||||
label-mode = --%mode%--
|
||||
|
||||
[module/active-window]
|
||||
type = internal/xwindow
|
||||
[module/player]
|
||||
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>
|
||||
|
||||
label = %title%
|
||||
label-maxlen = 40
|
||||
label = %output%
|
||||
|
||||
click-left = playerctl play-pause
|
||||
|
||||
|
||||
|
||||
; ____ _____ _ _ _____ _____ ____
|
||||
; / ___| ____| \ | |_ _| ____| _ \
|
||||
; | | | _| | \| | | | | _| | |_) |
|
||||
; | |___| |___| |\ | | | | |___| _ <
|
||||
; \____|_____|_| \_| |_| |_____|_| \_\
|
||||
;
|
||||
; __ __ ___ ____ _ _ _ _____ ____
|
||||
; | \/ |/ _ \| _ \| | | | | | ____/ ___|
|
||||
; | |\/| | | | | | | | | | | | | _| \___ \
|
||||
; | | | | |_| | |_| | |_| | |___| |___ ___) |
|
||||
; |_| |_|\___/|____/ \___/|_____|_____|____/
|
||||
|
||||
|
||||
;
|
||||
; CENTER MODULES
|
||||
;
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
@@ -72,10 +91,13 @@ date = "%d %b %H:%M, %A"
|
||||
|
||||
label = %date%
|
||||
|
||||
;
|
||||
; RIGHT MODULES
|
||||
;
|
||||
|
||||
; ____ ___ ____ _ _ _____ __ __ ___ ____ _ _ _ _____ ____
|
||||
; | _ \|_ _/ ___| | | |_ _| | \/ |/ _ \| _ \| | | | | | ____/ ___|
|
||||
; | |_) || | | _| |_| | | | | |\/| | | | | | | | | | | | | _| \___ \
|
||||
; | _ < | | |_| | _ | | | | | | | |_| | |_| | |_| | |___| |___ ___) |
|
||||
; |_| \_\___\____|_| |_| |_| |_| |_|\___/|____/ \___/|_____|_____|____/
|
||||
;
|
||||
|
||||
[module/keyboard-layout]
|
||||
type = internal/xkeyboard
|
||||
|
||||
Reference in New Issue
Block a user