summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2014-10-20 15:19:57 +0200
committerJan Pokorný <jpokorny@redhat.com>2014-10-20 15:19:57 +0200
commit7df5286e51d2c4bef7c941a47a5724e2ef900b9b (patch)
tree50dd99c7530103ef0cfad9d9b817b97dded39990
parent4475705dd06fad66611d23360a9014e1c4110a8f (diff)
downloaddotfiles-7df5286e51d2c4bef7c941a47a5724e2ef900b9b.zip
dotfiles-7df5286e51d2c4bef7c941a47a5724e2ef900b9b.tar.gz
dotfiles-7df5286e51d2c4bef7c941a47a5724e2ef900b9b.tar.xz
Bash: add .bashrc-nb for some NB usage related functions
Like monitoring state of the battery. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r--.bashrc-nb7
1 files changed, 7 insertions, 0 deletions
diff --git a/.bashrc-nb b/.bashrc-nb
new file mode 100644
index 0000000..dd66783
--- /dev/null
+++ b/.bashrc-nb
@@ -0,0 +1,7 @@
+# .bashrc-nb
+
+nb-bat() {
+ echo -n "current voltage: $(cat /sys/bus/acpi/drivers/battery/PNP0C0A\:00/power_supply/BAT0/voltage_now)"
+ echo " (min-design: $(cat /sys/bus/acpi/drivers/battery/PNP0C0A\:00/power_supply/BAT0/voltage_min_design))"
+ echo "status: $(cat /sys/bus/acpi/drivers/battery/PNP0C0A\:00/power_supply/BAT0/status)"
+}