diff options
author | jao <jao@gnu.org> | 2019-06-30 00:49:00 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2019-06-30 00:49:00 +0100 |
commit | 365d0a7c97f3905c16caf70c0bb7ef6054b232f2 (patch) | |
tree | 82d42a8705ebc1b3f44f538b2bdb4e4a27a25054 /readme.md | |
parent | a160cc25ba27b17e798f9d0eadd2c9576473ae9a (diff) | |
download | xmobar-365d0a7c97f3905c16caf70c0bb7ef6054b232f2.tar.gz xmobar-365d0a7c97f3905c16caf70c0bb7ef6054b232f2.tar.bz2 |
New options -a, -A for low battery notifications
Diffstat (limited to 'readme.md')
-rw-r--r-- | readme.md | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -898,6 +898,12 @@ specification, such as `("clear", "<icon=weather-clear.xbm/>")`. - `-p`: color to display positive power (battery charging) - `-f`: file in `/sys/class/power_supply` with AC info (default: "AC/online") + - `-A`: a number between 0 and 100, threshold below which the action + given by `-a`, if any, is performed (default: 5) + - `-a`: a string with a system command that is run when the + percentage left in the battery is less or equal than the threshold + given by the `-A` option. If not present, no action is + undertaken. - `--on-icon-pattern`: dynamic string for current battery charge when AC is "on" in `leftipat`. - `--off-icon-pattern`: dynamic string for current battery charge @@ -916,14 +922,18 @@ specification, such as `("clear", "<icon=weather-clear.xbm/>")`. "-L", "10", "-H", "80", "-p", "3", "--", "-O", "<fc=green>On</fc> - ", "-i", "", "-L", "-15", "-H", "-5", - "-l", "red", "-m", "blue", "-h", "green"] + "-l", "red", "-m", "blue", "-h", "green" + "-a", "notify-send -u critical 'Battery running out!!'", + "-A", "3"] 600 In the above example, the thresholds before the "--" separator affect only the `<left>` and `<leftbar>` fields, while those after the separator affect how `<watts>` is displayed. For this monitor, neither the generic nor the specific options have any effect on - `<timeleft>`. + `<timeleft>`. We are also telling the monitor to execute the unix + command `notify-send` when the percentage left in the battery + reaches 6%. It is also possible to specify template variables in the `-O` and `-o` switches, as in the following example: |