diff options
-rw-r--r-- | example/example.sb | 10 | ||||
-rwxr-xr-x | soibox | 14 |
2 files changed, 12 insertions, 12 deletions
diff --git a/example/example.sb b/example/example.sb index 87b9956..4417fc7 100644 --- a/example/example.sb +++ b/example/example.sb @@ -3,12 +3,14 @@ # acording to the game profile location # 2) if an option is specified in the soibox config # its ignored from game profiles unless specified -# 3) soibox config is located at ~/.config/soibox/soibox.conf, this applies -# to all games, game profiles are specific to each game +# 3) soibox config is located at /etc/soibox/soibox.conf and ~/.config/soibox/soibox.conf, +# this applies to all games, game profiles are specific to each game +# 4) command line arguments overrides game profiles overrides ~/.config/soibox/soibox.conf +# overrides /etc/soibox/soibox.conf # use mangohud perfomance overlay, the value can either be on, 1,2,3,4 or path to # a mangohud config. 1 being just the fps and 4 being the most verbose option, -# mangohud : 3 +# mangohud : 2 # 4 options 0,1,2,3. 1 outputs just progress bars and banners, 3 being the most verbose # loglevel : 1 @@ -48,8 +50,6 @@ # path to wine prefix # wine_prefix : path/to/wine/prefix -# note: this does not ignore game profile if specified in the soibox config -# but appends game profile version to the config # WINEDLLOVERRIDES # winedll_ovrids : mshtml=d @@ -108,7 +108,7 @@ parse_config() : "${wine:=$val}" ;; winedll_ovrids) - winedll_ovrids="${winedll_ovrids:+${winedll_ovrids};}${val}" + : "${winedll_ovrids:=$val}" ;; wine_tag) : "${wine_tag:=$val}" @@ -473,7 +473,6 @@ setup_mangohud() : "${1:?setup_mangohud: empty \$1}" MANGOHUD_CONFIG= - mangohud=on dep_check "mangohud" case "$1" in @@ -498,8 +497,7 @@ setup_mangohud() MANGOHUD_CONFIGFILE="$(absolute_path "$mangohud" "$local_config" )" export MANGOHUD_CONFIGFILE else - warn "config, mangohud, ${1}, invalid option" - mangohud=off + warn "config, mangohud, ${1}, invalid option, falling back to default layout" fi ;; esac @@ -578,9 +576,11 @@ main() # parse input parse_opts "$@" - [ -f "$config_dir/soibox.conf" ] && [ "$ignore_globalconf" != true ] - parse_config "$config_dir/soibox.conf" parse_config "$local_config" + [ -f "$config_dir/soibox.conf" ] && [ "$ignore_globalconf" != true ] && + parse_config "$config_dir/soibox.conf" + [ -f "/etc/soibox/soibox.conf" ] && [ "$ignore_globalconf" != true ] && + parse_config "/etc/soibox/soibox.conf" : "${loglevel:=1}" # validate input @@ -649,7 +649,7 @@ main() [ -n "$wine" ] && cmd="${wine_exe} ${cmd}" - [ "$mangohud" = on ] && + [ -n "$mangohud" ] && cmd="mangohud ${cmd}" [ "$gamemode" = on ] && dep_check "gamemoderun" && cmd="gamemoderun ${cmd}" |