diff options
Diffstat (limited to 'bin/.local')
-rwxr-xr-x | bin/.local/bin/shut | 6 | ||||
-rwxr-xr-x | bin/.local/bin/statusbar | 25 |
2 files changed, 28 insertions, 3 deletions
diff --git a/bin/.local/bin/shut b/bin/.local/bin/shut index 527dfb1..801d5bf 100755 --- a/bin/.local/bin/shut +++ b/bin/.local/bin/shut | |||
@@ -1,11 +1,11 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | RET=$(echo -e "shutdown\nreboot\nsleep\nlock\ncancel" | dmenu -l 5 -p "Sayonara") | 3 | RET=$(echo -e "shutdown\nreboot\nsleep\nlock\ncancel" | dmenu -l 5 -p "Sayonara" -nb "#000000" -nf "#bfbfbf" -sb "#84a0c6" -sf "#000000" -fn "Hermit:size=10") |
4 | 4 | ||
5 | case $RET in | 5 | case $RET in |
6 | shutdown) sudo poweroff ;; | 6 | shutdown) sudo poweroff ;; |
7 | reboot) sudo reboot ;; | 7 | reboot) sudo reboot ;; |
8 | sleep) /home/fd0e/.local/bin/lock & sudo sh -c "echo -n mem > /sys/power/state" ;; | 8 | sleep) xset s activate & sudo zzz ;; |
9 | lock) /home/fd0e/.local/bin/lock ;; | 9 | lock) xset s activate ;; |
10 | *) ;; | 10 | *) ;; |
11 | esac | 11 | esac |
diff --git a/bin/.local/bin/statusbar b/bin/.local/bin/statusbar new file mode 100755 index 0000000..020429e --- /dev/null +++ b/bin/.local/bin/statusbar | |||
@@ -0,0 +1,25 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | BOLD='\033[1m' | ||
4 | BB='\033[00m' | ||
5 | |||
6 | vol(){ | ||
7 | vol=$(amixer get Master | awk -F'[][]' 'END{ print $2 }') | ||
8 | echo -e "+@fg=1;vol+@fg=0; $vol " | ||
9 | } | ||
10 | |||
11 | bat() { | ||
12 | power=$(cat /sys/class/power_supply/BAT0/capacity) | ||
13 | echo -e "+@fg=1;bat+@fg=0; $power% " | ||
14 | } | ||
15 | |||
16 | dte() { | ||
17 | dte="$(date +"%A, %B %d")" | ||
18 | time="$(date +"%l:%M %p")" | ||
19 | echo -e "+@fg=1;date+@fg=0; $dte +@fg=1;time+@fg=0; $time" | ||
20 | } | ||
21 | |||
22 | while :; do | ||
23 | echo "$(vol) $(bat) $(dte)" | ||
24 | sleep 2 | ||
25 | done | ||