aboutsummaryrefslogtreecommitdiff
path: root/home/.config/i3/status
diff options
context:
space:
mode:
authorJakob Odersky <jakob@odersky.com>2017-04-01 11:48:39 -0700
committerJakob Odersky <jakob@odersky.com>2017-04-01 11:48:39 -0700
commitb391f1ba7347501707cf7056cba95a8b56b19055 (patch)
treec81eb4a305e0476b7bfe53c1fc2b6be7f043c332 /home/.config/i3/status
parentcbfdbe795021a02a955aee741cec736293e4ac02 (diff)
downloaddotfiles-b391f1ba7347501707cf7056cba95a8b56b19055.tar.gz
dotfiles-b391f1ba7347501707cf7056cba95a8b56b19055.tar.bz2
dotfiles-b391f1ba7347501707cf7056cba95a8b56b19055.zip
some style tweaks
Diffstat (limited to 'home/.config/i3/status')
-rwxr-xr-xhome/.config/i3/status/brightness10
-rwxr-xr-xhome/.config/i3/status/repo_status7
2 files changed, 17 insertions, 0 deletions
diff --git a/home/.config/i3/status/brightness b/home/.config/i3/status/brightness
new file mode 100755
index 0000000..8e4bf06
--- /dev/null
+++ b/home/.config/i3/status/brightness
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+device="/sys/class/$BLOCK_INSTANCE"
+
+brightness=$(cat "$device/brightness")
+max_brightness=$(cat "$device/max_brightness")
+
+percent=$(( $brightness*100/$max_brightness ))
+
+echo "$percent%"
diff --git a/home/.config/i3/status/repo_status b/home/.config/i3/status/repo_status
new file mode 100755
index 0000000..16fce9e
--- /dev/null
+++ b/home/.config/i3/status/repo_status
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+find ~/src -name .git -type d -prune -printf "%h\n" | \
+ xargs -I "{}" sh -c 'echo $(git -C {} status --porcelain | wc -l) {}' | sort -n
+
+#find ~/src -name .git -type d -prune | \
+# xargs -I '{}' git -C '{}' ls-files -m -d