playerctl: update playerctl config
This commit is contained in:
		
							parent
							
								
									bd31b35e6b
								
							
						
					
					
						commit
						775181e570
					
				
					 4 changed files with 34 additions and 18 deletions
				
			
		| 
						 | 
				
			
			@ -34,6 +34,7 @@ create_scripts
 | 
			
		|||
    showkeys =
 | 
			
		||||
      [ ]; # This will not work unless programs.wshowkeys is enabled systemwide
 | 
			
		||||
    terminal = [ alacritty ];
 | 
			
		||||
    playerctl-status = [ playerctl ];
 | 
			
		||||
    wpass = [ final.wdmenu fd pass sd wl-clipboard wtype ];
 | 
			
		||||
    screenshotsh =
 | 
			
		||||
      [ capitaine-cursors grim slurp jq sway wl-clipboard xdg-user-dirs ];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										14
									
								
								scripts/playerctl-status
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								scripts/playerctl-status
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
#!/bin/sh
 | 
			
		||||
 | 
			
		||||
PLAYERCTL="playerctl --ignore-player=mpd"
 | 
			
		||||
 | 
			
		||||
STATUS="$(env LC_ALL=C $PLAYERCTL status title)"
 | 
			
		||||
TITLE="$($PLAYERCTL metadata title)"
 | 
			
		||||
ARTIST="$($PLAYERCTL metadata artist)"
 | 
			
		||||
 | 
			
		||||
test "$STATUS" = "Playing" \
 | 
			
		||||
&& printf " %s" "$TITLE" \
 | 
			
		||||
&& test -n "$ARTIST" \
 | 
			
		||||
&& printf " - %s" "$ARTIST"
 | 
			
		||||
 | 
			
		||||
echo ""
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue