Added volume function
This commit is contained in:
		
							parent
							
								
									e4737ecbe9
								
							
						
					
					
						commit
						7388764204
					
				
					 1 changed files with 20 additions and 0 deletions
				
			
		
							
								
								
									
										20
									
								
								config/zshrc
									
										
									
									
									
								
							
							
						
						
									
										20
									
								
								config/zshrc
									
										
									
									
									
								
							|  | @ -100,6 +100,26 @@ alias resblue='systemctl restart bluetooth' | ||||||
| alias Personal='cd ~/Documents/synchronisatie/Personal/_PERSOONLIJK/' | alias Personal='cd ~/Documents/synchronisatie/Personal/_PERSOONLIJK/' | ||||||
| alias UGent='cd ~/Documents/synchronisatie/UGent/Informatica\ J1\ 2021-2022/' | alias UGent='cd ~/Documents/synchronisatie/UGent/Informatica\ J1\ 2021-2022/' | ||||||
| 
 | 
 | ||||||
|  | vol () { | ||||||
|  | 
 | ||||||
|  |     if [[ $# == 0 ]] ; then | ||||||
|  |         echo "Volume: $(pamixer --get-volume-human)" | ||||||
|  |     elif [[ "$1" =~ ^[0-9]*$ ]] ; then | ||||||
|  |         pamixer --set-volume "${1}"  | ||||||
|  |         vol | ||||||
|  |     elif [[ "$1" =~ ^[+] ]] ; then | ||||||
|  |         pamixer -i "${1#\+}" | ||||||
|  |         vol | ||||||
|  |     elif [[ "$1" =~ ^- ]] ; then | ||||||
|  |         pamixer -d "${1#-}" | ||||||
|  |         vol | ||||||
|  |     elif [[ "$1" =~ m ]] ; then | ||||||
|  |         pamixer --toggle | ||||||
|  |         vol | ||||||
|  |     fi | ||||||
|  | 
 | ||||||
|  | } | ||||||
|  | 
 | ||||||
| cpdir () { | cpdir () { | ||||||
| 
 | 
 | ||||||
|     # Check arguments |     # Check arguments | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue