aboutsummaryrefslogtreecommitdiff
path: root/scripts/.local/bin/personal/bar/smallstatus
blob: 09ddd9feef092d1a66ffb9a7ac7f02e10c115958 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/dash

flash() {
  second="$(date +'%s')"

  if [ $((second % 2)) = 1 ]; then
    echo $1
  else
    echo $2
  fi
}

sep="|"

message="$(volume) $sep $(network) $sep $(temp) $sep $(datetime)"

if [ ischarging ]; then
  echo "$message"
else
  flash "NOT CHARGING" "$message"
fi