Add laptop configs
This commit is contained in:
		
							parent
							
								
									a60d88a5ef
								
							
						
					
					
						commit
						a88f3ec73a
					
				
					 5 changed files with 56 additions and 0 deletions
				
			
		
							
								
								
									
										27
									
								
								.bin/host-mode##hostname.serguzim-laptop
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										27
									
								
								.bin/host-mode##hostname.serguzim-laptop
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,27 @@
 | 
			
		|||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
modes="monitor-std
 | 
			
		||||
monitor-presenter"
 | 
			
		||||
 | 
			
		||||
host_mode_monitor () {
 | 
			
		||||
    echo "Loading portalo monitor layout ${1:-std}"
 | 
			
		||||
    yadm config --unset-all local.class monitor-*
 | 
			
		||||
 | 
			
		||||
    if [ -n "$1" ]; then
 | 
			
		||||
        yadm config --add local.class "$1"
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    swaymsg reload
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if [ -z "$1" ]; then
 | 
			
		||||
    mode=$(echo "$modes" | $DMENU -p "mode")
 | 
			
		||||
else 
 | 
			
		||||
    mode=$1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
case $mode in
 | 
			
		||||
    "monitor-std")  host_mode_monitor ;;
 | 
			
		||||
    "monitor-"*)    host_mode_monitor "$mode" ;;
 | 
			
		||||
    *)              echo "'$mode' is not a valid mode" ;;
 | 
			
		||||
esac
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue