From: paperbenni Date: Sun, 2 Aug 2020 14:20:14 +0000 (+0200) Subject: init instantdisper X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=5fb0659e63ace31a38427cf40b73f5091c3cd5d8;p=instantos%2FinstantOS.git init instantdisper --- diff --git a/programs/instantdisper b/programs/instantdisper new file mode 100755 index 0000000..48bec94 --- /dev/null +++ b/programs/instantdisper @@ -0,0 +1,47 @@ +#!/bin/bash + +# menu similar to the super + p menu on windows +# used to quickly change settings when docking a laptop + +mainmenu() { + echo '>>h PROJECT +  Extend +  PC screen only +  Second screen only + Duplicate +:g Set default action +:r Close menu' | instantmenu -l 20 -h -1 -w 400 -c -w -1 -bw 4 -q search +} + +defaultmenu() { + echo '>>h Default projection settings +  Extend +  PC screen only +  Second screen only + Duplicate +:r None +:b Back' | instantmenu -l 20 -h -1 -w 400 -c -w -1 -bw 4 -q search +} + +LOOPING="true" +while [ -n "$LOOPING" ]; do + CHOICE="$(mainmenu)" + case "$CHOICE" in + "*Second screen only") + disper -S + ;; + *Extend) + disper -e + ;; + "*PC screen only") + disper -s + ;; + *Duplicate) + disper -c + ;; + *action) + echo "setting default action" + ;; + esac + unset LOOPING +done