mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	* Added fullscreen option * Add fullscreen instructions to Readme * Add fullscreen exit instructions to Readme
This commit is contained in:
		
							parent
							
								
									63f5c11a8e
								
							
						
					
					
						commit
						ee0a76dbbb
					
				
					 2 changed files with 13 additions and 4 deletions
				
			
		|  | @ -265,6 +265,7 @@ You can also pass optional parameters | |||
|   --snapshot delete <tag> : Delete a snapshot. | ||||
|   --snapshot info         : Show disk/snapshot info. | ||||
|   --status-quo            : Do not commit any changes to disk/snapshot. | ||||
|   --fullscreen            : Starts VM in full screen mode (Ctl+Alt+f to exit)" | ||||
| ``` | ||||
| 
 | ||||
| ## TODO | ||||
|  |  | |||
							
								
								
									
										16
									
								
								quickemu
									
										
									
									
									
								
							
							
						
						
									
										16
									
								
								quickemu
									
										
									
									
									
								
							|  | @ -311,7 +311,10 @@ function vm_boot() { | |||
|   local Y_RES=648 | ||||
|   if [ "${XDG_SESSION_TYPE}" == "x11" ]; then | ||||
|     local LOWEST_WIDTH=$(xrandr --listmonitors | grep -v Monitors | cut -d' ' -f4 | cut -d'/' -f1 | sort | head -n1) | ||||
|     if [ ${LOWEST_WIDTH} -ge 3840 ]; then | ||||
|     if [ ${FULLSCREEN} ]; then | ||||
|       X_RES=$(xrandr --listmonitors | grep -v Monitors | cut -d' ' -f4 | cut -d'/' -f1 | sort | head -n1) | ||||
|       Y_RES=$(xrandr --listmonitors | grep -v Monitors | cut -d' ' -f4 | cut -d'/' -f2 | cut -d'x' -f2 | sort | head -n1) | ||||
|     elif [ ${LOWEST_WIDTH} -ge 3840 ]; then | ||||
|       X_RES=3200 | ||||
|       Y_RES=1800 | ||||
|     elif [ ${LOWEST_WIDTH} -ge 2560 ]; then | ||||
|  | @ -335,11 +338,11 @@ function vm_boot() { | |||
|   fi | ||||
| 
 | ||||
|   if [ "${DISPLAY_DEVICE}" == "qxl-vga" ]; then | ||||
|     VIDEO="-device ${DISPLAY_DEVICE},xres=${X_RES},yres=${Y_RES}" | ||||
|     VIDEO="-device ${DISPLAY_DEVICE},xres=${X_RES},yres=${Y_RES}, ${FULLSCREEN}" | ||||
|   elif [ "${DISPLAY_DEVICE}" == "virtio-vga" ]; then | ||||
|     VIDEO="-device ${DISPLAY_DEVICE},virgl=${VIRGL},xres=${X_RES},yres=${Y_RES}" | ||||
|     VIDEO="-device ${DISPLAY_DEVICE},virgl=${VIRGL},xres=${X_RES},yres=${Y_RES}, ${FULLSCREEN}" | ||||
|   else | ||||
|     VIDEO="-device VGA,vgamem_mb=128,xres=${X_RES},yres=${Y_RES}" | ||||
|     VIDEO="-device VGA,vgamem_mb=128,xres=${X_RES},yres=${Y_RES}, ${FULLSCREEN}" | ||||
|   fi | ||||
| 
 | ||||
|   echo " - Video:    ${DISPLAY_DEVICE}" | ||||
|  | @ -519,6 +522,7 @@ function usage() { | |||
|   echo "  --snapshot info         : Show disk/snapshot info." | ||||
|   echo "  --status-quo            : Do not commit any changes to disk/snapshot." | ||||
|   echo "  --system-qemu           : Use system install of qemu." | ||||
|   echo "  --fullscreen            : Starts VM in full screen mode" | ||||
|   exit 1 | ||||
| } | ||||
| 
 | ||||
|  | @ -534,6 +538,7 @@ usb_devices=() | |||
| ram="" | ||||
| cpu_cores="" | ||||
| 
 | ||||
| FULLSCREEN="" | ||||
| DELETE=0 | ||||
| ENABLE_EFI=0 | ||||
| SNAPSHOT_ACTION="" | ||||
|  | @ -571,6 +576,9 @@ while [ $# -gt 0 ]; do | |||
|     -status-quo|--status-quo) | ||||
|       STATUS_QUO="-snapshot" | ||||
|       shift;; | ||||
|     -fullscreen|--fullscreen) | ||||
|       FULLSCREEN="--full-screen" | ||||
|       shift;; | ||||
|     -vm|--vm) | ||||
|       VM="${2}" | ||||
|       shift | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue