39 changed files with 545 additions and 0 deletions
@ -0,0 +1,10 @@
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash |
||||
|
||||
BATI=$(acpi -b | awk {'print $4'}) |
||||
BAT=$(acpi -b | awk {'print $4'} | cut -c 1-2) |
||||
BATCS=$(acpi | awk {'print $3'}) |
||||
|
||||
if [[ $BAT -lt 9 ]] && [[ $BATCS != Charging, ]] ; |
||||
then |
||||
notify-send --urgency critical "low battery" "$BATI" |
||||
fi |
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash |
||||
|
||||
xautolock -time 5 -notify 30 -locker ~/.bin/blurlock & |
||||
|
||||
xautolock -time 15 -locker ~/.bin/blursuspend & |
@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash |
||||
|
||||
synclient VertScrollDelta=-94 |
@ -0,0 +1,10 @@
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash |
||||
|
||||
MEM=$(free -h | grep Mem | awk {'print $3'} | sed 's/G//') |
||||
|
||||
eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME plasma)/environ)"; |
||||
|
||||
if [[ $MEM -gt 8 ]] ; |
||||
then |
||||
notify-send --urgency critical "low memory" "$MEM" |
||||
fi |
@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash |
||||
|
||||
notify-send -u low "ncmpcpp" "$(mpc current)" |
@ -0,0 +1,12 @@
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash |
||||
|
||||
UPDT=$(pacman -Qu | wc -l) |
||||
|
||||
eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME plasma)/environ)"; |
||||
|
||||
if [ $UPDT -gt 0 ] ; |
||||
then |
||||
export DISPLAY=:0 && notify-send "Pacman Updates" "$UPDT" |
||||
else |
||||
: |
||||
fi |
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash |
||||
xrandr --output eDP-1 --scale 1.25x1.25 --panning 3200x1800 |
||||
#xrandr --output eDP-1 --scale 1x1 --panning 2560x1440 |
||||
xinput -disable "ELAN Touchscreen" |
||||
#xrandr --output eDP-1 --scale .8x.8 --panning 2048x1152 |
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash |
||||
|
||||
while true ; |
||||
do |
||||
~/.bin/TempCrit && |
||||
sleep 60 |
||||
done & |
||||
|
||||
while true ; |
||||
do |
||||
~/.bin/BatCrit && |
||||
sleep 300 |
||||
done & |
||||
|
||||
while true ; |
||||
do |
||||
~/.bin/PacaurUpdates && |
||||
sleep 580 |
||||
done |
@ -0,0 +1,12 @@
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash |
||||
|
||||
TEMP=$(~/.bin/temp | sed 's/\..*°C//g') |
||||
|
||||
eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME plasma)/environ)"; |
||||
|
||||
if [ $TEMP -gt 95 ] |
||||
then |
||||
notify-send --urgency critical "High Temp" "$TEMP"°C |
||||
else |
||||
: |
||||
fi |
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash |
||||
|
||||
xinput set-prop "Synaptics TM2438-005" "libinput Tapping Enabled" 1 |
||||
xinput set-prop "Synaptics TM2438-005" "libinput Natural Scrolling Enabled" 1 |
||||
xinput set-prop "Synaptics TM2438-005" "libinput Disable While Typing Enabled" 1 |
||||
xinput set-prop "Synaptics TM2438-005" "libinput Accel Speed" 0 |
||||
xinput set-prop "Synaptics TM2438-005" "libinput Horizontal Scroll Enabled" 0 |
||||
|
||||
xinput set-prop "15320205:00 06CB:5F41" "libinput Tapping Enabled" 1 |
||||
xinput set-prop "15320205:00 06CB:5F41" "libinput Natural Scrolling Enabled" 1 |
||||
xinput set-prop "15320205:00 06CB:5F41" "libinput Disable While Typing Enabled" 1 |
||||
xinput set-prop "15320205:00 06CB:5F41" "libinput Accel Speed" 0 |
||||
xinput set-prop "15320205:00 06CB:5F41" "libinput Horizontal Scroll Enabled" 0 |
||||
|
||||
|
||||
synclient PalmDetect=1 |
||||
synclient TapButton2=3 |
||||
synclient TapButton3=2 |
||||
synclient TapButton1=1 |
||||
synclient HorizScrollDelta=-94 |
||||
synclient VertScrollDelta=-94 |
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash |
||||
|
||||
xinput set-prop "Alps Alps Touchpad Touchpad" "libinput Tapping Enabled" 1 |
||||
xinput set-prop "Alps Alps Touchpad Touchpad" "libinput Natural Scrolling Enabled" 1 |
||||
xinput set-prop "Alps Alps Touchpad Touchpad" "libinput Disable While Typing Enabled" 1 |
||||
xinput set-prop "Alps Alps Touchpad Touchpad" "libinput Accel Speed" 0 |
||||
xinput set-prop "Alps Alps Touchpad Touchpad" "libinput Horizontal Scroll Enabled" 0 |
||||
|
||||
#xinput set-prop "15320205:00 06CB:5F41" "libinput Tapping Enabled" 1 |
||||
#xinput set-prop "15320205:00 06CB:5F41" "libinput Natural Scrolling Enabled" 1 |
||||
#xinput set-prop "15320205:00 06CB:5F41" "libinput Disable While Typing Enabled" 1 |
||||
#xinput set-prop "15320205:00 06CB:5F41" "libinput Accel Speed" 0 |
||||
#xinput set-prop "15320205:00 06CB:5F41" "libinput Horizontal Scroll Enabled" 0 |
||||
|
||||
|
||||
#synclient PalmDetect=1 |
||||
#synclient TapButton2=3 |
||||
#synclient TapButton3=2 |
||||
#synclient TapButton1=1 |
||||
#synclient HorizScrollDelta=-94 |
||||
#synclient VertScrollDelta=-94 |
@ -0,0 +1,18 @@
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash |
||||
|
||||
FRE=$(free -m | awk 'NR==3 { print $4 }') |
||||
FN=$(ls /home/Swap | wc -l) |
||||
|
||||
if [[ $FRE -lt 255 ]] ; |
||||
then |
||||
NS=/home/Swap/$((FN+1)) |
||||
touch $NS ; chmod 600 $NS ; fallocate -l 256mib $NS ; mkswap $NS |
||||
swapon $NS |
||||
elif [[ $FRE -eq 255 ]] |
||||
then |
||||
: |
||||
else |
||||
LS=/home/Swap/$((FN)) |
||||
swapoff $LS |
||||
rm $LS |
||||
fi |
@ -0,0 +1,2 @@
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash |
||||
dpkg-query -W --showformat='${Installed-Size;10}\t${Package}\n' | sort -k1,1n |
@ -0,0 +1,72 @@
@@ -0,0 +1,72 @@
|
||||
#!/bin/bash |
||||
|
||||
# A shoddy AUR helper that will pull, install, |
||||
# update the local repos, purge local repos, |
||||
# or clean local repos. |
||||
|
||||
# Varables |
||||
ARG=$1 |
||||
APP=$2 |
||||
DIR=~/.aur/$APP |
||||
RDIR=~/.aur |
||||
PWDD=pwd | awk '{gsub("/home/piper/.aur/", " ");print}' |
||||
|
||||
############# |
||||
# The Magic # |
||||
############# |
||||
|
||||
if [ -z $ARG ] |
||||
then |
||||
echo -e 'A shoddy aur helper made by Piper' |
||||
elif [ $ARG = pull ] |
||||
then |
||||
git clone https://aur.archlinux.org/$APP.git $DIR &>/dev/null |
||||
if [ $? = 0 ] |
||||
then |
||||
APP="$APP pulled" |
||||
echo $APP |
||||
else |
||||
rm -rf $DIR &>/dev/null && \ |
||||
echo "No such repo" |
||||
fi |
||||
elif [ $ARG = install ] |
||||
then |
||||
less $DIR/PKGBUILD |
||||
wait |
||||
cd $DIR |
||||
makepkg -sirc |
||||
elif [ $ARG = list ] |
||||
then |
||||
ls $RDIR |
||||
elif [ $ARG = update ] |
||||
then |
||||
for SUB in ~/.aur/*/ |
||||
do |
||||
if (cd "$SUB" && echo $(pwd | awk '{gsub("/home/piper/.aur/", " ");print}') $(git pull) | grep -v "Already up-to-date." &>/dev/null) |
||||
then |
||||
cd "$SUB" && echo $(pwd | awk '{gsub("/home/piper/.aur/", " ");print}') "updated" |
||||
else |
||||
: |
||||
fi |
||||
done |
||||
elif [ $ARG = purge ] |
||||
then |
||||
if sudo pacman -Q $APP &> /dev/null ;\ |
||||
then |
||||
sudo pacman -Rsn $APP && \ |
||||
rm -rf $DIR |
||||
else |
||||
rm -rf $DIR && \ |
||||
APP="$APP purged" |
||||
echo $APP |
||||
fi |
||||
elif [ $ARG = clean ] |
||||
then |
||||
for SUB in ~/.aur/*/ |
||||
do |
||||
(cd "$SUB" && rm *.tar* &>/dev/null ; echo $(pwd | awk '{gsub("/home/piper/.aur/", " ");print}') >/dev/null) |
||||
done |
||||
echo "Cleaned" |
||||
else |
||||
echo "Learn how to type" |
||||
fi |
@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash |
||||
|
||||
#STAT=$(acpi | awk '{ print substr($3,0,4) }') |
||||
PERC=$(acpi | awk '{ print $4 }' | tr -d ',') |
||||
LIFE=$(acpi | awk '{ print substr($5,0,6) }') |
||||
|
||||
echo "$STAT $PERC $LIFE" |
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash |
||||
|
||||
## powers |
||||
NOW=$(cat /sys/class/power_supply/BAT0/charge_now) |
||||
|
||||
FULL=$(cat /sys/class/power_supply/BAT0/charge_full) |
||||
|
||||
## set echo vars |
||||
CHRG=$(\ |
||||
echo "($NOW/$FULL)*100" | bc -l | cut -c1-2 \ |
||||
) |
||||
|
||||
STAT=$(\ |
||||
cat /sys/class/power_supply/BAT0/status | \ |
||||
cut -c1-4 \ |
||||
) |
||||
|
||||
## output |
||||
echo $STAT $CHRG |
@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash |
||||
|
||||
notify-send "$1" "$2" |
||||
|
||||
{ |
||||
( speaker-test -t sine -f 2000 )& pid=$! ; sleep .2 ; kill -9 $pid |
||||
} &> /dev/null |
@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash |
||||
~/.bin/blurlock |
||||
systemctl hibernate |
@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash |
||||
scrot /tmp/screen_locked.png |
||||
|
||||
IMAGE=/tmp/screen_locked.png |
||||
TEXT=/tmp/text_locked.png |
||||
ICON=~/Cloud/Config/i3/ENCOMlock.png |
||||
|
||||
#mogrify -scale 20% -scale 500% $IMAGE |
||||
#convert $IMAGE -blur 0x6 $IMAGE |
||||
#convert $IMAGE -scale 10% -scale 1000% $IMAGE |
||||
convert $IMAGE -scale 20% -scale 500% $IMAGE |
||||
|
||||
[ -f $TEXT ] || { |
||||
convert -size 3000x80 xc:#a4dfff -font "Hack-Regular" -pointsize 48 -fill black -gravity center -annotate +0+0 'Group 7 Access Required' $TEXT; |
||||
convert $TEXT -alpha set -channel A -evaluate set 70% $TEXT; |
||||
} |
||||
|
||||
notify-send DUNST_COMMAND_PAUSE |
||||
|
||||
convert $IMAGE $TEXT -gravity center -geometry +0+600 -composite $IMAGE |
||||
convert $IMAGE $ICON -gravity center -composite $IMAGE |
||||
i3lock -n -u -f -i /tmp/screen_locked.png |
||||
|
||||
notify-send DUNST_COMMAND_RESUME |
@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash |
||||
systemctl suspend |
||||
~/bin/blurlock |
@ -0,0 +1,35 @@
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash |
||||
# Show available terminal colours. |
||||
# Heavily modified version of the TLDP script here: |
||||
# http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html |
||||
|
||||
print_colors(){ |
||||
# Print column headers. |
||||
printf "%-4s " '' ${bgs[@]} |
||||
echo |
||||
# Print rows. |
||||
for bold in ${bolds[@]}; do |
||||
for fg in ${fgs[@]}; do |
||||
# Print row header |
||||
printf "%s;%s " $bold $fg |
||||
# Print cells. |
||||
for bg in ${bgs[@]}; do |
||||
# Print cell. |
||||
printf "\e[%s;%s;%sm%s\e[0m " $bold $fg $bg "text" |
||||
done |
||||
echo |
||||
done |
||||
done |
||||
} |
||||
|
||||
# Print standard colors. |
||||
bolds=( 0 1 ) |
||||
fgs=( 3{0..7} ) |
||||
bgs=( 4{0..8} ) |
||||
print_colors |
||||
|
||||
# Print vivid colors. |
||||
bolds=( 0 ) # Bold vivid is the same as bold normal. |
||||
fgs=( 9{0..7} ) |
||||
bgs=( 10{0..8} ) |
||||
print_colors |
@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash |
||||
|
||||
pkill polybar |
||||
|
||||
xrandr --output HDMI1 --auto --right-of eDP1 |
||||
|
||||
polybar desk &>/dev/null & |
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash |
||||
pkill dunst |
||||
|
||||
sleep 2 |
||||
|
||||
dunst -c ~/.config/dunst/dunstrc & |
||||
|
||||
notify-send -u critical "Test message: critical test 1" |
||||
notify-send -u normal "Test message: normal test 2" |
||||
notify-send -u low "Test message: low test 3" |
||||
notify-send -u critical "Test message: critical test 4" |
||||
notify-send -u normal "Test message: normal test 5" |
||||
notify-send -u low "Test message: low test 6" |
||||
notify-send -u critical "Test message: critical test 7" |
||||
notify-send -u normal "Test message: normal test 8" |
||||
notify-send -u low "Test message: low test 9" |
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash |
||||
|
||||
pkill dunst |
||||
dunst -c ~/.config/dunst/dunstrc & |
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash |
||||
|
||||
ENT=$(cat /proc/sys/kernel/random/entropy_avail) |
||||
|
||||
echo $ENT"b" |
@ -0,0 +1,8 @@
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash |
||||
|
||||
FREQ=$(cpupower frequency-info |\ |
||||
grep "asserted" |\ |
||||
awk ' { print $4$5 } '\ |
||||
) |
||||
|
||||
echo "$FREQ" |
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash |
||||
|
||||
curl --silent https://www.dan.me.uk/ipinfo?ip=$1 | grep "% IPInfo" -A 32 --color=never |
||||
|
@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash |
||||
|
||||
expac -H M '%m\t%n' | sort -h |
@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
|
||||
#/bin/bash |
||||
|
||||
echo $(ping -c 1 8.8.8.8 | grep 64 | awk {'print $7'} | cut -c 6-)"ms" |
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
pkill polybar ; polybar bar &>/dev/null & |
@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
|
||||
#/bin/bash |
||||
|
||||
free -h | grep Mem | awk {'print $3'} |
@ -0,0 +1,2 @@
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash |
||||
sensors | grep Package | awk '{ print $4 }' | sed 's/+//g' |
@ -0,0 +1,2 @@
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash |
||||
curl https://www.dan.me.uk/torcheck?ip=$1 --silent | grep "% TOR" -A 8 --color=never |
Loading…
Reference in new issue