20 Commits

Author SHA1 Message Date
8be2e7f13e battery.plugin: Refactor 2023-04-09 00:27:34 +09:00
9875246872 plugins/battery: Get battery capacity by /sys/class/power_supply
Reference:- https://www.kernel.org/doc/html/latest/admin-guide/abi-testing.html?#abi-sys-class-power-supply-supply-name-capacity

Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
2023-04-09 00:25:51 +09:00
ca95a7f8a1 plugins/battery: Get adapter status by /sys/class/power_supply
Reference:- https://www.kernel.org/doc/html/latest/admin-guide/abi-testing.html?#abi-sys-class-power-supply-supply-name-online

Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
2023-04-09 00:25:32 +09:00
59f6ef145b global: Switch the function-declarations to avoid unexpected alias expansions 2023-02-10 00:38:56 +09:00
M
de66a70f91 Refactor "{ => _omb_util_}command_exists"
https://github.com/ohmybash/oh-my-bash/pull/239#issuecomment-1007886245

Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
2022-08-23 18:09:50 +09:00
827277253a lib/omb-prompt-colors: Rename basic colors 2022-02-01 01:43:32 +09:00
8eb9fec5ed lib, themes: Resolve conflicting variables
"lib" has used the variables "red", "green", "yellow", "blue", and
"purple" for outputting logs to stdout/stderr.  On the other hand,
"themes" has used the same variables for including escape sequences in
PS1.  These two sets of variables have different values, i.e., the
latter is enclosed by '\[' and '\]' and contains escaped '\e', which
means that there have been variable conflicts.  In this commit, more
specific variables are used in these places to resolve the conflicts.
2022-02-01 01:42:52 +09:00
7ed389eafd themes: Use new color variables 2022-02-01 01:42:50 +09:00
c3bcc5c6d2 refactor: Normalize shebang of scripts to source 2022-01-15 19:00:35 +09:00
3d2b35a3eb refactor: Replace invalid shebang lines 2022-01-15 15:46:11 +09:00
548fbb188c plugins/battery: Fix an error message on no battery systems 2022-01-15 14:03:55 +09:00
1c9af65069 plugins/battery: Remove composure.sh annotations 2022-01-15 14:02:04 +09:00
738c65dbff plugins/battery: Refactor extraction of percentage without a non-POSIX option 2022-01-08 15:40:06 +09:00
4637e4bd2e plugins/battery: Refactor "upower --show-info" 2022-01-08 15:40:06 +09:00
5cbaa84cc7 plugins/battery: Fix regex for the POSIX compatibility 2022-01-08 15:40:06 +09:00
b07199fac1 Update regular expression to be POSIX compatible 2022-01-08 15:40:06 +09:00
614fa98211 Update grep regex when upower is used to avoid to catch 'discharging' 2022-01-08 15:40:06 +09:00
062a128cb6 plugins/battery: Correct grep regex when upower is used 2022-01-08 15:40:06 +09:00
7a3a7b01d6 plugins/battery: Attempt to fix https://github.com/ohmybash/oh-my-bash/issues/68 (#104)
Fixes: https://github.com/ohmybash/oh-my-bash/issues/68
2020-02-17 13:46:33 +11:00
e65c390bfa Improve oh-my-bash functionality
* Implement aliases, completion in oh-my-bash
 * Added default themes from Bash-it
 * Fixed few issues
2017-10-10 18:07:01 +07:00