Skip to content

Commit

Permalink
[eos-bash-shared] fixed bugs related to apps ChangeDisplayResolution …
Browse files Browse the repository at this point in the history
…and welcome
  • Loading branch information
manuel-192 committed Aug 7, 2024
1 parent 9e78c3e commit 8edec09
Showing 1 changed file with 2 additions and 26 deletions.
28 changes: 2 additions & 26 deletions eos-script-lib-yad
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,7 @@ source /etc/eos-script-lib-yad.conf # for EOS_ROOTER and other configs
export EOS_WICON=/usr/share/endeavouros/EndeavourOS-icon.png
export EOS_YAD_STARTER_CMD="/usr/bin/yad --window-icon=$EOS_WICON"

eos_yad_orig() { GDK_BACKEND=x11 $EOS_YAD_STARTER_CMD "$@"; }
eos_yad_chk() { # eos_yad() with a check that the required 'yad' package is installed
if [ -x /usr/bin/yad ] ; then
eos_yad_orig "$@"
else
echo "${BASH_SOURCE[1]##*/}: error: this app requires package 'yad'" >&2
exit 1
fi
}

case "$EOS_USE_TEST_FOR_YAD" in
yes) eos_yad() { eos_yad_chk "$@" ; } ;;
*) eos_yad() { eos_yad_orig "$@" ; } ;;
esac
eos_yad() { GDK_BACKEND=x11 $EOS_YAD_STARTER_CMD "$@"; }

translations_dir=/usr/share/endeavouros/scripts # needed in translations.bash
source $translations_dir/translations.bash || {
Expand All @@ -70,25 +57,14 @@ eos-assert-deps() { # params: prog deps
local failcount=0
local dep
for dep in "$@" ; do
which "$dep" &>/dev/null || {
expac %n "$dep" &>/dev/null || {
echo "==> $prog requires package '$dep'" >&2
((failcount++))
}
done
return $failcount
}

eos-assert-deps-fast() { # params: prog deps
local -r prog="$1"
shift
local failcount=0
which "$@" &>/dev/null || {
failcount=$?
echo "==> $prog: missing $failcount of packages: $*"
}
return $failcount
}

eos_icon_path() {
# on success, echo full icon path and return 0
# on failure, return 1
Expand Down

0 comments on commit 8edec09

Please sign in to comment.