diff options
author | Jakob Odersky <jakob@odersky.com> | 2017-04-01 11:48:39 -0700 |
---|---|---|
committer | Jakob Odersky <jakob@odersky.com> | 2017-04-01 11:48:39 -0700 |
commit | b391f1ba7347501707cf7056cba95a8b56b19055 (patch) | |
tree | c81eb4a305e0476b7bfe53c1fc2b6be7f043c332 /home/.config/i3/status | |
parent | cbfdbe795021a02a955aee741cec736293e4ac02 (diff) | |
download | dotfiles-b391f1ba7347501707cf7056cba95a8b56b19055.tar.gz dotfiles-b391f1ba7347501707cf7056cba95a8b56b19055.tar.bz2 dotfiles-b391f1ba7347501707cf7056cba95a8b56b19055.zip |
some style tweaks
Diffstat (limited to 'home/.config/i3/status')
-rwxr-xr-x | home/.config/i3/status/brightness | 10 | ||||
-rwxr-xr-x | home/.config/i3/status/repo_status | 7 |
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 |