Update virtmon

This commit is contained in:
clsty
2025-11-12 17:37:28 +08:00
parent 3f8c62a81b
commit a250675b5c
2 changed files with 36 additions and 7 deletions
+12 -2
View File
@@ -8,12 +8,13 @@ Create virtual monitor for testing multi-monitors.
Options:
-h, --help Show this help message
-k, --keep Do not remove virtual monitors
"
}
# `man getopt` to see more
para=$(getopt \
-o h \
-l help \
-o hk \
-l help,keep \
-n "$0" -- "$@")
[ $? != 0 ] && echo "$0: Error when getopt, please recheck parameters." && exit 1
#####################################################################################
@@ -26,6 +27,15 @@ while true ; do
esac
done
eval set -- "$para"
while true ; do
case "$1" in
-k|--keep) KEEP_VIRTUAL_MONITORS=true;shift;;
--) shift;break ;;
*) sleep 0 ;;
esac
done
#if [[ -f "$1" ]]; then
# echo "Using list file \"$1\".";LIST_FILE_PATH="$1";shift 1
#else