diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-08-09 07:59:58 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-08-09 07:59:58 -0700 |
commit | 1a7cdcf038f398e1d900970456da535324108e7a (patch) | |
tree | 35fe1980e954a848553cc82c08e9a09c1b1b7234 | |
parent | e89c8ae8024670906b8a3c92443f6f4281cffa96 (diff) | |
download | basta-1a7cdcf038f398e1d900970456da535324108e7a.tar.gz basta-1a7cdcf038f398e1d900970456da535324108e7a.tar.bz2 basta-1a7cdcf038f398e1d900970456da535324108e7a.zip |
renaming around alarm timer.
Before or after hot-reloading this change, run the command
"kill $update_status_alarm", since this will run a new
background process to update the status line.
- the update_status_alarm variable becomes properly
namespaced as basta_status_alarm_pid and is defined
at the top.
- the basta.basta_alarm_timer function is renamed
to basta.alarm_timer to drop the repetition.
-rw-r--r-- | basta.sh | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -6,6 +6,8 @@ basta_old_cols=${basta_old_cols-0} basta_prev_reserved_rows=${basta_prev_reserved_rows-} +basta_status_alarm_pid=${basta_status_alarm_pid-} + basta.calc_prev_reserved() { local esc=$(printf "\033") @@ -88,7 +90,7 @@ basta.prompt_hook() basta.update_status } -basta.basta_alarm_timer() +basta.alarm_timer() { exec 0>&- 1>&- 2>&- trap : INT @@ -123,10 +125,10 @@ basta.cleanup() PROMPT_COMMAND='basta.prompt_hook' -if ! [ $update_status_alarm ] ; then +if ! [ $basta_status_alarm_pid ] ; then trap basta.update_status ALRM - basta.basta_alarm_timer & - update_status_alarm=$! + basta.alarm_timer & + basta_status_alarm_pid=$! disown $! fi |