summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorShubham Saini <shubham6405@gmail.com>2020-05-17 14:45:19 +0000
committerShubham Saini <shubham6405@gmail.com>2020-05-17 14:45:19 +0000
commit73a9b71bc6f3a987d1c9e8601ffd85bd87c3eb51 (patch)
treecbf7de687f299adc14de72ed37c00f6fb2e9a708 /bin
parent5bc01819f4c9b453e5b66994217aa61260a49201 (diff)
switched dwm
Diffstat (limited to 'bin')
-rwxr-xr-xbin/.local/bin/statusbar32
1 files changed, 24 insertions, 8 deletions
diff --git a/bin/.local/bin/statusbar b/bin/.local/bin/statusbar
index 00b5d2b..c506244 100755
--- a/bin/.local/bin/statusbar
+++ b/bin/.local/bin/statusbar
@@ -1,29 +1,45 @@
1#!/bin/bash 1#!/bin/bash
2 2
3BOLD='\033[1m' 3# Color definitions.
4BB='\033[00m' 4export BLK="\e[30m"
5export RED="\e[31m"
6export GRN="\e[32m"
7export YLW="\e[33m"
8export BLU="\e[34m"
9export PUR="\e[35m"
10export CYN="\e[36m"
11export RST="\e[0m"
12
13# Other formatting.
14export BLD="\e[1m"
15export DIM="\e[2m"
16export ITA="\e[3m"
17export UND="\e[4m"
18export FLS="\e[5m"
19export REV="\e[7m"
20export INV="\e[8m"
21export STR="\e[9m"
5 22
6vol(){ 23vol(){
7 vol=$(pulsemixer --get-volume | awk '{print $1}') 24 vol=$(pulsemixer --get-volume | awk '{print $1}')
8 echo -e "vol $vol% " 25 echo -e "vol $vol%"
9} 26}
10 27
11bat() { 28bat() {
12 power=$(cat /sys/class/power_supply/BAT0/capacity) 29 power=$(cat /sys/class/power_supply/BAT0/capacity)
13 echo -e "bat $power% " 30 echo -e "bat $power%"
14} 31}
15 32
16dte() { 33dte() {
17 dte=$(date +"%A, %B %d") 34 dte=$(date +"%A, %B %d")
18 echo -e "date $dte " 35 echo -e "date $dte"
19} 36}
20 37
21tie() { 38tie() {
22 tme=$(date +"%I:%M %p") 39 tme=$(date +"%I:%M %p")
23 echo -e "time $tme " 40 echo -e "time $tme"
24} 41}
25
26while :; do 42while :; do
27 echo "$(vol) $(bat) $(tie) $(dte)" 43 echo "$(vol) $(bat) $(tie) $(dte)"
28 sleep 2 44 sleep 2
29done 45done