Merge fe78ccc87e
into 7a87d5ac7e
This commit is contained in:
commit
3735c4be79
@ -750,6 +750,7 @@ You can also pass optional parameters
|
|||||||
--fullscreen : Starts VM in full screen mode (Ctl+Alt+f to exit)
|
--fullscreen : Starts VM in full screen mode (Ctl+Alt+f to exit)
|
||||||
--ignore-msrs-always : Configure KVM to always ignore unhandled machine-specific registers
|
--ignore-msrs-always : Configure KVM to always ignore unhandled machine-specific registers
|
||||||
--screen <screen> : Use specified screen to determine the window size.
|
--screen <screen> : Use specified screen to determine the window size.
|
||||||
|
--screenpct <percent> : Percent of fullscreen for VM if --fullscreen is not specified."
|
||||||
--shortcut : Create a desktop shortcut
|
--shortcut : Create a desktop shortcut
|
||||||
--snapshot apply <tag> : Apply/restore a snapshot.
|
--snapshot apply <tag> : Apply/restore a snapshot.
|
||||||
--snapshot create <tag> : Create a snapshot.
|
--snapshot create <tag> : Create a snapshot.
|
||||||
@ -832,6 +833,11 @@ which Quickemu sizes to 2048x1152. Without the `--screen` option,
|
|||||||
Quickemu would have used the 1920x1080 monitor which results in a window
|
Quickemu would have used the 1920x1080 monitor which results in a window
|
||||||
size of 1664x936.
|
size of 1664x936.
|
||||||
|
|
||||||
|
The '--screenpct' is an optional interger value between 25 <= pct < 100
|
||||||
|
which will override system default screen sizes. The VM size will be
|
||||||
|
'pct' of the chosen screen. **If --fullscreen is chosen screen will be
|
||||||
|
fullsize instead of being scaled down by --screenpct value.**
|
||||||
|
|
||||||
# References
|
# References
|
||||||
|
|
||||||
Useful reference that assisted the development of Quickemu.
|
Useful reference that assisted the development of Quickemu.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.\" Automatically generated by Pandoc 2.19.2
|
.\" Automatically generated by Pandoc 3.0.1
|
||||||
.\"
|
.\"
|
||||||
.\" Define V font for inline verbatim, using C font in formats
|
.\" Define V font for inline verbatim, using C font in formats
|
||||||
.\" that render this, and otherwise B font.
|
.\" that render this, and otherwise B font.
|
||||||
@ -248,8 +248,7 @@ Mauray (https://github.com/ymauray).
|
|||||||
.PP
|
.PP
|
||||||
Many thanks to Luke Wesley-Holley (https://github.com/Lukewh) and
|
Many thanks to Luke Wesley-Holley (https://github.com/Lukewh) and
|
||||||
Philipp Kiemle (https://github.com/daPhipz) for creating the
|
Philipp Kiemle (https://github.com/daPhipz) for creating the
|
||||||
\f[B]Quickemu icons (https://github.com/Lukewh/quickemu-icons)\f[R]
|
\f[B]Quickemu icons (https://github.com/Lukewh/quickemu-icons)\f[R] 🎨
|
||||||
\[u1F3A8]
|
|
||||||
.SS Quickgui for Ubuntu
|
.SS Quickgui for Ubuntu
|
||||||
.IP
|
.IP
|
||||||
.nf
|
.nf
|
||||||
@ -843,6 +842,12 @@ The above uses the 2560x1440 screen to compute the size of the window,
|
|||||||
which Quickemu sizes to 2048x1152.
|
which Quickemu sizes to 2048x1152.
|
||||||
Without the \f[V]--screen\f[R] option, Quickemu would have used the
|
Without the \f[V]--screen\f[R] option, Quickemu would have used the
|
||||||
1920x1080 monitor which results in a window size of 1664x936.
|
1920x1080 monitor which results in a window size of 1664x936.
|
||||||
|
.PP
|
||||||
|
The `\[en]screenpct' is an optional integer value between 25 <= pct <
|
||||||
|
100 which will override the system default screen sizes.
|
||||||
|
The VM size will be `pct' of the chosen screen.
|
||||||
|
\f[B]If \[en]fullscreen is chosen the screen will be fullsize instead
|
||||||
|
being scaled down by \[en]screenpct value.\f[R]
|
||||||
.SH References
|
.SH References
|
||||||
.PP
|
.PP
|
||||||
Useful reference that assisted the development of Quickemu.
|
Useful reference that assisted the development of Quickemu.
|
||||||
|
@ -617,6 +617,11 @@ which Quickemu sizes to 2048x1152. Without the `--screen` option,
|
|||||||
Quickemu would have used the 1920x1080 monitor which results in a window
|
Quickemu would have used the 1920x1080 monitor which results in a window
|
||||||
size of 1664x936.
|
size of 1664x936.
|
||||||
|
|
||||||
|
The '--screenpct' is an optional integer value between 25 <= pct < 100
|
||||||
|
which will override the system default screen sizes. The VM size will be
|
||||||
|
'pct' of the chosen screen. **If --fullscreen is chosen the screen will be
|
||||||
|
fullsize instead being scaled down by --screenpct value.**
|
||||||
|
|
||||||
# References
|
# References
|
||||||
|
|
||||||
Useful reference that assisted the development of Quickemu.
|
Useful reference that assisted the development of Quickemu.
|
||||||
|
48
quickemu
48
quickemu
@ -677,32 +677,33 @@ function vm_boot() {
|
|||||||
local X_RES=1152
|
local X_RES=1152
|
||||||
local Y_RES=648
|
local Y_RES=648
|
||||||
if [ "${XDG_SESSION_TYPE}" == "x11" ]; then
|
if [ "${XDG_SESSION_TYPE}" == "x11" ]; then
|
||||||
local LOWEST_WIDTH=""
|
|
||||||
if [ -z "${SCREEN}" ]; then
|
if [ -z "${SCREEN}" ]; then
|
||||||
LOWEST_WIDTH=$(xrandr --listmonitors | grep -v Monitors | cut -d' ' -f4 | cut -d'/' -f1 | sort | head -n1)
|
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)
|
||||||
else
|
else
|
||||||
LOWEST_WIDTH=$(xrandr --listmonitors | grep -v Monitors | grep "^ ${SCREEN}:" | cut -d' ' -f4 | cut -d'/' -f1 | head -n1)
|
X_RES=$(xrandr --listmonitors | grep -v Monitors | grep "^ ${SCREEN}:" | cut -d' ' -f4 | cut -d'/' -f1 | head -n1)
|
||||||
|
Y_RES=$(xrandr --listmonitors | grep -v Monitors | grep "^ ${SCREEN}:" | cut -d' ' -f4 | cut -d'/' -f2 | cut -d'x' -f2 | head -n1)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${FULLSCREEN}" ]; then
|
if [ "${FULLSCREEN}" ]; then
|
||||||
if [ -z "${SCREEN}" ]; then
|
:
|
||||||
X_RES=$(xrandr --listmonitors | grep -v Monitors | cut -d' ' -f4 | cut -d'/' -f1 | sort | head -n1)
|
elif [ "${SCREENPCT}" ] ; then
|
||||||
Y_RES=$(xrandr --listmonitors | grep -v Monitors | cut -d' ' -f4 | cut -d'/' -f2 | cut -d'x' -f2 | sort | head -n1)
|
X_RES=$(( X_RES*SCREENPCT/100 ))
|
||||||
else
|
Y_RES=$(( Y_RES*SCREENPCT/100 ))
|
||||||
X_RES=$(xrandr --listmonitors | grep -v Monitors | grep "^ ${SCREEN}:" | cut -d' ' -f4 | cut -d'/' -f1 | head -n1)
|
elif [ "${X_RES}" -ge 3840 ]; then
|
||||||
Y_RES=$(xrandr --listmonitors | grep -v Monitors | grep "^ ${SCREEN}:" | cut -d' ' -f4 | cut -d'/' -f2 | cut -d'x' -f2 | head -n1)
|
|
||||||
fi
|
|
||||||
elif [ "${LOWEST_WIDTH}" -ge 3840 ]; then
|
|
||||||
X_RES=3200
|
X_RES=3200
|
||||||
Y_RES=1800
|
Y_RES=1800
|
||||||
elif [ "${LOWEST_WIDTH}" -ge 2560 ]; then
|
elif [ "${X_RES}" -ge 2560 ]; then
|
||||||
X_RES=2048
|
X_RES=2048
|
||||||
Y_RES=1152
|
Y_RES=1152
|
||||||
elif [ "${LOWEST_WIDTH}" -ge 1920 ]; then
|
elif [ "${X_RES}" -ge 1920 ]; then
|
||||||
X_RES=1664
|
X_RES=1664
|
||||||
Y_RES=936
|
Y_RES=936
|
||||||
elif [ "${LOWEST_WIDTH}" -ge 1280 ]; then
|
elif [ "${X_RES}" -ge 1280 ]; then
|
||||||
X_RES=1152
|
X_RES=1152
|
||||||
Y_RES=648
|
Y_RES=648
|
||||||
|
else
|
||||||
|
:
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -1229,6 +1230,7 @@ function vm_boot() {
|
|||||||
sdl) export SDL_MOUSE_FOCUS_CLICKTHROUGH=1;;
|
sdl) export SDL_MOUSE_FOCUS_CLICKTHROUGH=1;;
|
||||||
esac
|
esac
|
||||||
echo "${QEMU}" "${SHELL_ARGS}" >> "${VMDIR}/${VMNAME}.sh"
|
echo "${QEMU}" "${SHELL_ARGS}" >> "${VMDIR}/${VMNAME}.sh"
|
||||||
|
sed -i -e 's/ -/ \\\n -/g' ${VMDIR}/${VMNAME}.sh
|
||||||
${QEMU} "${args[@]}" > "${VMDIR}/${VMNAME}.log" &
|
${QEMU} "${args[@]}" > "${VMDIR}/${VMNAME}.log" &
|
||||||
sleep 0.25
|
sleep 0.25
|
||||||
fi
|
fi
|
||||||
@ -1308,6 +1310,7 @@ function usage() {
|
|||||||
echo " --fullscreen : Starts VM in full screen mode (Ctl+Alt+f to exit)"
|
echo " --fullscreen : Starts VM in full screen mode (Ctl+Alt+f to exit)"
|
||||||
echo " --ignore-msrs-always : Configure KVM to always ignore unhandled machine-specific registers"
|
echo " --ignore-msrs-always : Configure KVM to always ignore unhandled machine-specific registers"
|
||||||
echo " --screen <screen> : Use specified screen to determine the window size."
|
echo " --screen <screen> : Use specified screen to determine the window size."
|
||||||
|
echo " --screenpct <percent> : Percent of fullscreen for VM if --fullscreen is not specified."
|
||||||
echo " --shortcut : Create a desktop shortcut"
|
echo " --shortcut : Create a desktop shortcut"
|
||||||
echo " --snapshot apply <tag> : Apply/restore a snapshot."
|
echo " --snapshot apply <tag> : Apply/restore a snapshot."
|
||||||
echo " --snapshot create <tag> : Create a snapshot."
|
echo " --snapshot create <tag> : Create a snapshot."
|
||||||
@ -1472,6 +1475,7 @@ PUBLIC=""
|
|||||||
PUBLIC_PERMS=""
|
PUBLIC_PERMS=""
|
||||||
PUBLIC_TAG=""
|
PUBLIC_TAG=""
|
||||||
SCREEN=""
|
SCREEN=""
|
||||||
|
SCREENPCT=""
|
||||||
SHORTCUT=0
|
SHORTCUT=0
|
||||||
SNAPSHOT_ACTION=""
|
SNAPSHOT_ACTION=""
|
||||||
SNAPSHOT_TAG=""
|
SNAPSHOT_TAG=""
|
||||||
@ -1551,6 +1555,22 @@ else
|
|||||||
SCREEN="${2}"
|
SCREEN="${2}"
|
||||||
shift
|
shift
|
||||||
shift;;
|
shift;;
|
||||||
|
-screenpct|--screenpct)
|
||||||
|
if [ ! -z "${2##*[!0-9]*}" ] ; then
|
||||||
|
if [[ ${2} -ge 25 && ${2} -lt 100 ]] ; then
|
||||||
|
SCREENPCT=${2}
|
||||||
|
else
|
||||||
|
echo "screenpct invalid must be 25 <= pct < 100"
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "screenpct needs to be an integer in range 25 <= pct < 100"
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
shift;;
|
||||||
-snapshot|--snapshot)
|
-snapshot|--snapshot)
|
||||||
SNAPSHOT_ACTION="${2}"
|
SNAPSHOT_ACTION="${2}"
|
||||||
if [ -z "${SNAPSHOT_ACTION}" ]; then
|
if [ -z "${SNAPSHOT_ACTION}" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user