mirror of
				https://github.com/WarrenHood/dotfiles.git
				synced 2025-11-04 01:38:41 +00:00 
			
		
		
		
	
		
			
	
	
		
			38 lines
		
	
	
		
			623 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
		
		
			
		
	
	
			38 lines
		
	
	
		
			623 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| 
								 | 
							
								#!/usr/bin/env bash
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								set -euo pipefail
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								case "${1:-}" in
							 | 
						||
| 
								 | 
							
								  next)
							 | 
						||
| 
								 | 
							
								    MEMBER=Next
							 | 
						||
| 
								 | 
							
								    ;;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  previous)
							 | 
						||
| 
								 | 
							
								    MEMBER=Previous
							 | 
						||
| 
								 | 
							
								    ;;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  play)
							 | 
						||
| 
								 | 
							
								    MEMBER=Play
							 | 
						||
| 
								 | 
							
								    ;;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  pause)
							 | 
						||
| 
								 | 
							
								    MEMBER=Pause
							 | 
						||
| 
								 | 
							
								    ;;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  play-pause)
							 | 
						||
| 
								 | 
							
								    MEMBER=PlayPause
							 | 
						||
| 
								 | 
							
								    ;;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  *)
							 | 
						||
| 
								 | 
							
								    echo "Usage: $0 next|previous|play|pause|play-pause"
							 | 
						||
| 
								 | 
							
								    exit 1
							 | 
						||
| 
								 | 
							
								    ;;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								esac
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								exec dbus-send                                                \
							 | 
						||
| 
								 | 
							
								  --print-reply                                               \
							 | 
						||
| 
								 | 
							
								  --dest="org.mpris.MediaPlayer2.$(playerctl -l | head -n 1)" \
							 | 
						||
| 
								 | 
							
								  /org/mpris/MediaPlayer2                                     \
							 | 
						||
| 
								 | 
							
								  "org.mpris.MediaPlayer2.Player.$MEMBER"
							 |