pass $mode to reload, find real path even when sourcing
This commit is contained in:
parent
245dc99887
commit
02fcdf794b
4
_reve.sh
4
_reve.sh
@ -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() {
|
||||
|
@ -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"
|
||||
|
2
reve.sh
2
reve.sh
@ -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"
|
||||
|
||||
|
@ -26,4 +26,4 @@ else
|
||||
cp -T "$first" "$bgl"
|
||||
fi
|
||||
|
||||
reload mode/swww_single
|
||||
reload mode/swww_single $mode
|
||||
|
Loading…
x
Reference in New Issue
Block a user