diff options
author | Shubham Saini <shubham6405@gmail.com> | 2020-05-17 14:45:19 +0000 |
---|---|---|
committer | Shubham Saini <shubham6405@gmail.com> | 2020-05-17 14:45:19 +0000 |
commit | 73a9b71bc6f3a987d1c9e8601ffd85bd87c3eb51 (patch) | |
tree | cbf7de687f299adc14de72ed37c00f6fb2e9a708 | |
parent | 5bc01819f4c9b453e5b66994217aa61260a49201 (diff) |
switched dwm
-rwxr-xr-x | bin/.local/bin/statusbar | 32 | ||||
-rw-r--r-- | x/.xinitrc | 7 |
2 files changed, 28 insertions, 11 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 | ||
3 | BOLD='\033[1m' | 3 | # Color definitions. |
4 | BB='\033[00m' | 4 | export BLK="\e[30m" |
5 | export RED="\e[31m" | ||
6 | export GRN="\e[32m" | ||
7 | export YLW="\e[33m" | ||
8 | export BLU="\e[34m" | ||
9 | export PUR="\e[35m" | ||
10 | export CYN="\e[36m" | ||
11 | export RST="\e[0m" | ||
12 | |||
13 | # Other formatting. | ||
14 | export BLD="\e[1m" | ||
15 | export DIM="\e[2m" | ||
16 | export ITA="\e[3m" | ||
17 | export UND="\e[4m" | ||
18 | export FLS="\e[5m" | ||
19 | export REV="\e[7m" | ||
20 | export INV="\e[8m" | ||
21 | export STR="\e[9m" | ||
5 | 22 | ||
6 | vol(){ | 23 | vol(){ |
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 | ||
11 | bat() { | 28 | bat() { |
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 | ||
16 | dte() { | 33 | dte() { |
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 | ||
21 | tie() { | 38 | tie() { |
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 | |||
26 | while :; do | 42 | while :; do |
27 | echo "$(vol) $(bat) $(tie) $(dte)" | 43 | echo "$(vol) $(bat) $(tie) $(dte)" |
28 | sleep 2 | 44 | sleep 2 |
29 | done | 45 | done |
@@ -1,9 +1,10 @@ | |||
1 | #exec dbus-launch --exit-with-session spectrwm | 1 | #!/bin/bash |
2 | #xrdb ~/.Xresources & | 2 | #.xinitrc |
3 | xset b off & | 3 | xset b off & |
4 | xset s 600 & | 4 | xset s 600 & |
5 | ~/bin/xss & | 5 | ~/bin/xss & |
6 | ~/.fehbg & | 6 | ~/.fehbg & |
7 | picom 2>/dev/null & | 7 | picom 2>/dev/null & |
8 | xsetroot -name "bat $(cat /sys/class/power_supply/BAT0/capacity)" | 8 | dwmbar & |
9 | |||
9 | exec dbus-launch --exit-with-session startdwm | 10 | exec dbus-launch --exit-with-session startdwm |