Fix: Update usage to reflect name: xrsbs

Update usage to refer to the scheduler by its new name and declare
constant variables as readonly.
This commit is contained in:
Narvin Singh 2020-12-29 11:36:23 -05:00
parent 8a512754e5
commit f0734ee8cb

14
xrsbs
View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
USAGE=" declare -r USAGE="
USAGE: xrsb-sched <action> [<when>] [<repeat>] USAGE: xrsbs <action> [<when>] [<repeat>]
action A comma or space separated list of actions to associate with the action A comma or space separated list of actions to associate with the
update signal. update signal.
@ -22,22 +22,22 @@ EXAMPLES:
volume and backlight statuses, respectively, send a signal to volume and backlight statuses, respectively, send a signal to
immediately update both of those statuses. immediately update both of those statuses.
xsrb-sched 'vol,bl' xrsbs 'vol,bl'
If the daemon interprets the actions 'cpu' and 'mem' to mean update the If the daemon interprets the actions 'cpu' and 'mem' to mean update the
cpu and memory usage statuses, respectively, send a signal to update cpu and memory usage statuses, respectively, send a signal to update
both of those statuses every 5 seconds. both of those statuses every 5 seconds.
xsrb-sched 'cpu,mem' 5000 1 xrsbs 'cpu,mem' 5000 1
If the daemon interprets the actions 'bat' and 'dt' to mean update the If the daemon interprets the actions 'bat' and 'dt' to mean update the
battery and date/time statuses, respectively, send a signal to update battery and date/time statuses, respectively, send a signal to update
both of those statuses at the top of every minute. both of those statuses at the top of every minute.
xsrb-sched 'bat,dt' m true xrsbs 'bat,dt' m true
" "
DAEMON=xrsbd declare -r DAEMON=xrsbd
ACTION_DIR=/tmp/xrsb-action/ declare -r ACTION_DIR=/tmp/xrsb-action/
# Convert integer milliseconds to floating point seconds # Convert integer milliseconds to floating point seconds
ms_to_s () { ms_to_s () {