Skip to content

Commit

Permalink
--preset: experimental option to allow predefined option sets #218
Browse files Browse the repository at this point in the history
  • Loading branch information
mviereck committed Jan 29, 2020
1 parent cb35011 commit 37d488d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion x11docker
Original file line number Diff line number Diff line change
Expand Up @@ -7797,6 +7797,7 @@ declare_variables() { # declare global variables
Dockerexe="" # Can be docker.exe on MS Windows
Hostexe="" # --exe: Host command
Passwordterminal="" # Terminal emulator to use for password prompt (if no terminal emulator is needed, it will be 'bash -c')
Presetdir="$HOME/.config/x11docker/preset"
Imagebasename="" # Image name without tags and / replaced with -. For use of --home folders.
Preservecachefiles="no" # If yes, don't delete cache files on exit. For few failure cases only.
Pullimage="ask" # --pull: Allow 'docker pull' yes|no|always|ask
Expand Down Expand Up @@ -7911,7 +7912,7 @@ parse_options() { # parse cli options
Longoptions="$Longoptions,cleanup,help,launcher,licence,license,version,wmlist" # Special options without starting X or container
Longoptions="$Longoptions,install,remove,update,update-master" # Installation
#
Longoptions="$Longoptions,iglx,xcomposite,xorgconf:" # Experimental
Longoptions="$Longoptions,iglx,xcomposite,xorgconf:,preset:" # Experimental
Longoptions="$Longoptions,dbus-system,homedir:,no-xhost,sharedir:,systemd" # Deprecated
Longoptions="$Longoptions,cachedir:,no-init,nothing,no-xtest,openrc,ps,runit,silent,starter,stderr,stdout" # Removed
Longoptions="$Longoptions,sys-admin,sysvinit,tini,trusted,untrusted,vcxsrv" # Removed
Expand Down Expand Up @@ -8120,6 +8121,14 @@ ${2:-}" ; shift ;; # Add custo
--launcher) Createlauncher="yes" ;; # Create application launcher on desktop and exit

#### Experimental options
--preset) [ -e "$Presetdir/${2:-}" ] && {
parse_options $(cat "$Presetdir/${2:-}")
:
} || [ -e "${2:-}" ] && {
parse_options $(cat "${2:-}")
:
} || note "Option --preset: Not found: ${2:-}"
shift ; note "Option --preset: experimental only." ;;
--iglx) Iglx="yes" ; note "Option --iglx: experimental only." ;; # Indirect rendering; broken since Xorg ~18.2
--xcomposite) Xcomposite="yes" ; note "Option --xcomposite: experimental only." ;; # Enable X extension COMPOSITE
--xorgconf) Xorgconf="${2:-}" ; note "Option --xorgconf: eperimental only" ; shift ;; # Custom xorg.conf
Expand Down

0 comments on commit 37d488d

Please sign in to comment.