summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Ulmer <thomasmulmer02@gmail.com>2026-06-19 11:12:19 -0700
committerThomas Ulmer <thomasmulmer02@gmail.com>2026-06-19 11:12:19 -0700
commit2bc6652ba8e4802f0601d90d593e9a377e9581b7 (patch)
tree416c83023677f0df951fd735912882d2d21ccd8d
parentb4d93e641418285a0796fbb1a9cc145e9f629d96 (diff)
tmux battery indicator
-rw-r--r--config/tmux.conf2
-rwxr-xr-xscripts/misc/battery.sh11
2 files changed, 12 insertions, 1 deletions
diff --git a/config/tmux.conf b/config/tmux.conf
index 7a7429a..1cc4aad 100644
--- a/config/tmux.conf
+++ b/config/tmux.conf
@@ -2,4 +2,4 @@ set-option -g prefix C-s
bind C-s send-prefix
unbind C-b
bind C-t choose-tree "join-pane -t %%"
-
+set -g status-right "%H:%M | #(tmubattery) | #{USER}@#(uname -n)"
diff --git a/scripts/misc/battery.sh b/scripts/misc/battery.sh
new file mode 100755
index 0000000..c3e5e48
--- /dev/null
+++ b/scripts/misc/battery.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+#print battery info in a short way
+
+if uname -o | grep -qi "linux"
+then
+ acpi -b | cut -d"," -f 1-2 | cut -d" " -f 3-
+else
+ echo "TODO BSD battery"
+ exit 1
+fi