Improve host-mode script
This commit is contained in:
parent
b033291384
commit
a4d7b69f76
4 changed files with 46 additions and 43 deletions
|
@ -1,26 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
modes="std
|
||||
single
|
||||
single-sec
|
||||
modes="monitor-std
|
||||
monitor-single
|
||||
monitor-single-sec
|
||||
monitor-fhd
|
||||
zellij"
|
||||
|
||||
portalo_mode_std () {
|
||||
echo "Loading portalo standard screen layout"
|
||||
yadm config --unset-all local.class monitor-single
|
||||
yadm config --unset-all local.class monitor-single-sec
|
||||
}
|
||||
portalo_mode_monitor () {
|
||||
echo "Loading portalo monitor layout ${1:-std}"
|
||||
yadm config --unset-all local.class monitor-single
|
||||
yadm config --unset-all local.class monitor-single-sec
|
||||
yadm config --unset-all local.class monitor-fhd
|
||||
|
||||
portalo_mode_single () {
|
||||
echo "Loading portalo single screen layout"
|
||||
yadm config --unset-all local.class monitor-single-sec
|
||||
yadm config --add local.class monitor-single
|
||||
}
|
||||
|
||||
portalo_mode_single_sec () {
|
||||
echo "Loading portalo single screen layout on secondary screen"
|
||||
yadm config --unset-all local.class monitor-single
|
||||
yadm config --add local.class monitor-single-sec
|
||||
if [ -n "$1" ]; then
|
||||
yadm config --add local.class "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
portalo_mode_zellij () {
|
||||
|
@ -39,9 +33,10 @@ else
|
|||
fi
|
||||
|
||||
case $mode in
|
||||
"std") portalo_mode_std ;;
|
||||
"single") portalo_mode_single ;;
|
||||
"single-sec") portalo_mode_single_sec ;;
|
||||
"monitor-std") portalo_mode_monitor ;;
|
||||
"monitor-single") portalo_mode_monitor "$mode" ;;
|
||||
"monitor-single-sec") portalo_mode_monitor "$mode" ;;
|
||||
"monitor-fhd") portalo_mode_monitor "$mode" ;;
|
||||
"zellij") portalo_mode_zellij ;;
|
||||
*) echo "'$mode' is not a valid mode (single, std)" ;;
|
||||
esac
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue