pass $mode to reload, find real path even when sourcing

This commit is contained in:
yigid balaban 2024-10-10 10:20:47 +03:00
parent 245dc99887
commit 02fcdf794b
Signed by: fyb
GPG Key ID: CF1BBD1336C0A3D6
4 changed files with 5 additions and 5 deletions

View File

@ -7,7 +7,7 @@
reve_installation="$HOME/.local/bin/reve"
reve_config="$HOME/.config/reve"
_current_dir=$(realpath "$(dirname "$0")")
_current_dir=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
# shellcheck source=_reve_states.sh
source "$_current_dir/_reve_states" >&/dev/null
(($? == 1)) && source "$_current_dir/_reve_states.sh"
@ -66,7 +66,7 @@ util_run_utility() {
}
reload() {
util_run_chore "$1"
util_run_chore "$1" "$2"
}
reload_util() {

View File

@ -6,7 +6,7 @@
# reve internal: _reve_states
# defines state management API
_current_dir=$(realpath "$(dirname "$0")")
_current_dir=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
# shellcheck source=_reve_utils.sh
source "$_current_dir/_reve_utils" >&/dev/null
(($? == 1)) && source "$_current_dir/_reve_utils.sh"

View File

@ -10,7 +10,7 @@ in_desktop_mode=""
in_reason=""
in_chore_name=""
rt_script_dir=$(realpath "$(dirname "$0")")
rt_script_dir=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
rt_has_mode_changed=0
rt_current_mode="unset"

View File

@ -26,4 +26,4 @@ else
cp -T "$first" "$bgl"
fi
reload mode/swww_single
reload mode/swww_single $mode