diff options
Diffstat (limited to 'bin/.local')
-rwxr-xr-x | bin/.local/bin/bat_check.sh | 14 | ||||
-rwxr-xr-x | bin/.local/bin/dotstow | 21 | ||||
-rwxr-xr-x | bin/.local/bin/gitit | 10 | ||||
-rwxr-xr-x | bin/.local/bin/light | 19 | ||||
-rwxr-xr-x | bin/.local/bin/lock | 6 | ||||
-rwxr-xr-x | bin/.local/bin/record | 10 | ||||
-rwxr-xr-x | bin/.local/bin/screenshot | 16 | ||||
-rwxr-xr-x | bin/.local/bin/shut | 11 | ||||
-rwxr-xr-x | bin/.local/bin/statusbar | 45 | ||||
-rwxr-xr-x | bin/.local/bin/temp | 2 | ||||
-rwxr-xr-x | bin/.local/bin/unblock | 8 |
11 files changed, 0 insertions, 162 deletions
diff --git a/bin/.local/bin/bat_check.sh b/bin/.local/bin/bat_check.sh deleted file mode 100755 index 547b976..0000000 --- a/bin/.local/bin/bat_check.sh +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | while true | ||
3 | do | ||
4 | battery_level=$(cat /sys/class/power_supply/BAT0/capacity) | ||
5 | state=$(cat /sys/class/power_supply/BAT0/status) | ||
6 | if [ $battery_level -ge 90 ] && [ $state == "Charging" ]; then | ||
7 | notify-send 'Pull the plug!' $battery_level% | ||
8 | elif [ $battery_level -le 30 -a $battery_level -ge 20 ] && [ $state == "Discharging" ]; then | ||
9 | notify-send 'Plug me!' $battery_level% | ||
10 | elif [ $battery_level -le 20 ] && [ $state == "Discharging" ]; then | ||
11 | notify-send -u critical 'Plug me NOW!' $battery_level% | ||
12 | fi | ||
13 | sleep 300 # 300 seconds or 5 minutes | ||
14 | done | ||
diff --git a/bin/.local/bin/dotstow b/bin/.local/bin/dotstow deleted file mode 100755 index bcadc5e..0000000 --- a/bin/.local/bin/dotstow +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # This script will Stow all the dotfiles located in the ~/dotfiles folder. | ||
4 | # The -R flag is used to force a 'restow' which will remove any existing symlinks before attempting to Stow. | ||
5 | |||
6 | echo "Stowing Dotfiles..."; | ||
7 | |||
8 | cd ~/dotfiles | ||
9 | for file in ~/dotfiles/*; do | ||
10 | # Only run Stow on the directories in the dotfiles folder and not the individual files. | ||
11 | # Using 'basename' strips the filepath from the directory name. | ||
12 | if [ -d ${file} ]; then | ||
13 | stow -R $(basename $file) | ||
14 | echo "$(basename $file) stowed."; | ||
15 | fi | ||
16 | done | ||
17 | |||
18 | # Return back to the your PWD from before you ran the script | ||
19 | cd ~- | ||
20 | |||
21 | echo 'All stowed'; | ||
diff --git a/bin/.local/bin/gitit b/bin/.local/bin/gitit deleted file mode 100755 index 5d576c2..0000000 --- a/bin/.local/bin/gitit +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | set -e | ||
3 | printf "\033[0;32mDeploying updates to server...\033[0m\n" | ||
4 | git add . | ||
5 | msg="changes" | ||
6 | if [ -n "$*" ]; then | ||
7 | msg="$*" | ||
8 | fi | ||
9 | git commit -m "$msg" | ||
10 | git push origin master | ||
diff --git a/bin/.local/bin/light b/bin/.local/bin/light deleted file mode 100755 index b34150f..0000000 --- a/bin/.local/bin/light +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | # brightness wrapper | ||
3 | |||
4 | case "$1" in | ||
5 | u*) | ||
6 | for f in /sys/class/backlight/*; do | ||
7 | echo $(($(<$f/brightness)+5*$(<$f/max_brightness)/100)) > $f/brightness; | ||
8 | done | ||
9 | ;; | ||
10 | d*) | ||
11 | for f in /sys/class/backlight/*; do | ||
12 | echo $(($(<$f/brightness)-5*$(<$f/max_brightness)/100)) > $f/brightness; | ||
13 | done | ||
14 | ;; | ||
15 | *) | ||
16 | echo "choose u or d" | ||
17 | ;; | ||
18 | esac | ||
19 | |||
diff --git a/bin/.local/bin/lock b/bin/.local/bin/lock deleted file mode 100755 index d7dc632..0000000 --- a/bin/.local/bin/lock +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | scrot /tmp/screen.png | ||
3 | convert /tmp/screen.png -scale 10% -scale 1000% /tmp/screen.png | ||
4 | [[ -f $1 ]] && convert /tmp/screen.png $1 -gravity center -composite -matte /tmp/screen.png | ||
5 | i3lock -u -i /tmp/screen.png | ||
6 | rm /tmp/screen.png | ||
diff --git a/bin/.local/bin/record b/bin/.local/bin/record deleted file mode 100755 index f254e20..0000000 --- a/bin/.local/bin/record +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | ffmpeg -f x11grab \ | ||
4 | -s 1366x768 \ | ||
5 | -an -i :0.0 \ | ||
6 | -c:v libvpx \ | ||
7 | -b:v 5M \ | ||
8 | -crf 10 \ | ||
9 | -quality realtime \ | ||
10 | -y ~/record.mkv | ||
diff --git a/bin/.local/bin/screenshot b/bin/.local/bin/screenshot deleted file mode 100755 index 56310fc..0000000 --- a/bin/.local/bin/screenshot +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | screenshot() { | ||
3 | case $1 in | ||
4 | f*) | ||
5 | scrot -m -e 'mv $f ~/scrots' | ||
6 | ;; | ||
7 | w*) | ||
8 | sleep 1 | ||
9 | scrot -s -e 'mv $f ~/scrots' | ||
10 | ;; | ||
11 | *) | ||
12 | ;; | ||
13 | esac; | ||
14 | } | ||
15 | |||
16 | screenshot $1 | ||
diff --git a/bin/.local/bin/shut b/bin/.local/bin/shut deleted file mode 100755 index 1fb1295..0000000 --- a/bin/.local/bin/shut +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | |||
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:antialias=true:autohint=true") | ||
4 | |||
5 | case $RET in | ||
6 | shutdown) doas poweroff ;; | ||
7 | reboot) doas reboot ;; | ||
8 | sleep) xset s activate & doas zzz;; | ||
9 | lock) xset s activate ;; | ||
10 | *) ;; | ||
11 | esac | ||
diff --git a/bin/.local/bin/statusbar b/bin/.local/bin/statusbar deleted file mode 100755 index c506244..0000000 --- a/bin/.local/bin/statusbar +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # Color definitions. | ||
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" | ||
22 | |||
23 | vol(){ | ||
24 | vol=$(pulsemixer --get-volume | awk '{print $1}') | ||
25 | echo -e "vol $vol%" | ||
26 | } | ||
27 | |||
28 | bat() { | ||
29 | power=$(cat /sys/class/power_supply/BAT0/capacity) | ||
30 | echo -e "bat $power%" | ||
31 | } | ||
32 | |||
33 | dte() { | ||
34 | dte=$(date +"%A, %B %d") | ||
35 | echo -e "date $dte" | ||
36 | } | ||
37 | |||
38 | tie() { | ||
39 | tme=$(date +"%I:%M %p") | ||
40 | echo -e "time $tme" | ||
41 | } | ||
42 | while :; do | ||
43 | echo "$(vol) $(bat) $(tie) $(dte)" | ||
44 | sleep 2 | ||
45 | done | ||
diff --git a/bin/.local/bin/temp b/bin/.local/bin/temp deleted file mode 100755 index fec8439..0000000 --- a/bin/.local/bin/temp +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | paste <(cat /sys/class/thermal/thermal_zone*/type) <(cat /sys/class/thermal/thermal_zone*/temp) | column -s $'\t' -t | sed 's/\(.\)..$/.\1°C/' | ||
diff --git a/bin/.local/bin/unblock b/bin/.local/bin/unblock deleted file mode 100755 index 257c4fb..0000000 --- a/bin/.local/bin/unblock +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | #whitelist escape | ||
3 | set -e | ||
4 | printf "\033[0;35mSetting wlo1 down....\033[0m\n" | ||
5 | sudo ip link set wlo1 down | ||
6 | printf "\033[0;36mChanging MAC address....\033[0m\n" | ||
7 | sudo macchanger --mac=FC:77:74:C7:71:71 wlo1 | ||
8 | printf "\033[0;32mEnjoy....\033[0m\n" | ||