summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorShubham Saini <shubham6405@gmail.com>2020-04-20 06:34:27 +0000
committerShubham Saini <shubham6405@gmail.com>2020-04-20 06:34:27 +0000
commit04eaf5c25193ba74c1613c958015f47e2b896e50 (patch)
tree9f577ad83ff95dad560539725d5c39b504a06dc6 /bin
parent8422687d96868ab8eb84bc60efb6b0647841dcdc (diff)
mass changes
Diffstat (limited to 'bin')
-rwxr-xr-xbin/.local/bin/shut6
-rwxr-xr-xbin/.local/bin/statusbar25
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
3RET=$(echo -e "shutdown\nreboot\nsleep\nlock\ncancel" | dmenu -l 5 -p "Sayonara") 3RET=$(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
5case $RET in 5case $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 *) ;;
11esac 11esac
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
3BOLD='\033[1m'
4BB='\033[00m'
5
6vol(){
7 vol=$(amixer get Master | awk -F'[][]' 'END{ print $2 }')
8 echo -e "+@fg=1;vol+@fg=0; $vol "
9}
10
11bat() {
12 power=$(cat /sys/class/power_supply/BAT0/capacity)
13 echo -e "+@fg=1;bat+@fg=0; $power% "
14}
15
16dte() {
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
22while :; do
23 echo "$(vol) $(bat) $(dte)"
24 sleep 2
25done