summaryrefslogtreecommitdiff
path: root/bin/.local
diff options
context:
space:
mode:
Diffstat (limited to 'bin/.local')
-rwxr-xr-xbin/.local/bin/bat_check.sh14
-rwxr-xr-xbin/.local/bin/dotstow21
-rwxr-xr-xbin/.local/bin/gitit10
-rwxr-xr-xbin/.local/bin/light19
-rwxr-xr-xbin/.local/bin/lock6
-rwxr-xr-xbin/.local/bin/record10
-rwxr-xr-xbin/.local/bin/screenshot16
-rwxr-xr-xbin/.local/bin/shut11
-rwxr-xr-xbin/.local/bin/statusbar45
-rwxr-xr-xbin/.local/bin/temp2
-rwxr-xr-xbin/.local/bin/unblock8
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
2while true
3do
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
14done
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
6echo "Stowing Dotfiles...";
7
8cd ~/dotfiles
9for 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
16done
17
18# Return back to the your PWD from before you ran the script
19cd ~-
20
21echo '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
2set -e
3printf "\033[0;32mDeploying updates to server...\033[0m\n"
4git add .
5msg="changes"
6if [ -n "$*" ]; then
7 msg="$*"
8fi
9git commit -m "$msg"
10git 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
4case "$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 ;;
18esac
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
2scrot /tmp/screen.png
3convert /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
5i3lock -u -i /tmp/screen.png
6rm /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
3ffmpeg -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
2screenshot() {
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
16screenshot $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
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:antialias=true:autohint=true")
4
5case $RET in
6 shutdown) doas poweroff ;;
7 reboot) doas reboot ;;
8 sleep) xset s activate & doas zzz;;
9 lock) xset s activate ;;
10 *) ;;
11esac
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.
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"
22
23vol(){
24 vol=$(pulsemixer --get-volume | awk '{print $1}')
25 echo -e "vol $vol%"
26}
27
28bat() {
29 power=$(cat /sys/class/power_supply/BAT0/capacity)
30 echo -e "bat $power%"
31}
32
33dte() {
34 dte=$(date +"%A, %B %d")
35 echo -e "date $dte"
36}
37
38tie() {
39 tme=$(date +"%I:%M %p")
40 echo -e "time $tme"
41}
42while :; do
43 echo "$(vol) $(bat) $(tie) $(dte)"
44 sleep 2
45done
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
2paste <(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
3set -e
4printf "\033[0;35mSetting wlo1 down....\033[0m\n"
5sudo ip link set wlo1 down
6printf "\033[0;36mChanging MAC address....\033[0m\n"
7sudo macchanger --mac=FC:77:74:C7:71:71 wlo1
8printf "\033[0;32mEnjoy....\033[0m\n"