all repos — dotfiles @ 37e3aaed55e62d4b55e6d68ebcba603cb46a7f80

my *nix dotfiles

bin/bar (view raw)

 1#!/bin/sh
 2
 3dt() {
 4    date +"%a, %d %b" | tr A-Z a-z
 5}
 6
 7vol() {
 8    v="$(sndioctl -n output.level)"
 9    echo $(echo "$v"*100 / 1 | bc)%
10}
11
12pad="%{015}"
13
14while :; do
15    bat="$(bat -q)"
16    time="$(date +"%H:%M")"
17    echo "$pad $(dt) $pad $time %{r}bat $bat %{O14}vol $(vol) $pad"
18    sleep 0.5
19done | lemonbar-xft -n bar -f 'Input:style=Regular:size=12:antialias=true' -g x30 \
20    -F '#f4f4f4' -B '#222'