Added check in config/.scripts/*.sh scripts wether the needed commands are available
Fixed shebang for some scrips Removed unnecessary config/.scripts/lock.sh and replaced lock.sh with i3lock.py in the script that executed lock.shclean_emacs
parent
c0d11e4b79
commit
686f13e21c
|
@ -9,5 +9,5 @@ t:/home/tuan/Templates
|
||||||
w:/home/tuan/workspace_l/Projects
|
w:/home/tuan/workspace_l/Projects
|
||||||
k:/home/tuan/Documents/CTF/TryHackMe/VulnUniversity
|
k:/home/tuan/Documents/CTF/TryHackMe/VulnUniversity
|
||||||
q:/home/tuan/.nextcloud/Quick Drop
|
q:/home/tuan/.nextcloud/Quick Drop
|
||||||
':/home/tuan/Pictures/Screenshots
|
':/home/tuan/.scripts
|
||||||
e:/home/tuan/Documents/CTF/TryHackMe/Ice/2_Recon
|
e:/home/tuan/Documents/CTF/TryHackMe/Ice/2_Recon
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#!/bin/python3
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
/usr/bin/python /home/tuan/.scripts/i3lock.py;
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
type xbacklight >/dev/null 2>&1 || { echo >&2 "I require xbacklight but it's not installed. Aborting."; exit 1; }
|
||||||
|
type dunstify >/dev/null 2>&1 || { echo >&2 "I require dunstify but it's not installed. Aborting."; exit 1; }
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
"up"*)
|
"up"*)
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
type maim >/dev/null 2>&1 || { echo >&2 "I require maim but it's not installed. Aborting."; exit 1; }
|
||||||
|
type dunstify >/dev/null 2>&1 || { echo >&2 "I require dunstify but it's not installed. Aborting."; exit 1; }
|
||||||
|
type xclip >/dev/null 2>&1 || { echo >&2 "I require xclip but it's not installed. Aborting."; exit 1; }
|
||||||
|
type xdotool >/dev/null 2>&1 || { echo >&2 "I require xdotool but it's not installed. Aborting."; exit 1; }
|
||||||
|
|
||||||
d=$HOME/Pictures/Screenshots/$(date +%G-%m);
|
d=$HOME/Pictures/Screenshots/$(date +%G-%m);
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
type pactl >/dev/null 2>&1 || { echo >&2 "I require pactl but it's not installed. Aborting."; exit 1; }
|
||||||
|
type amixer >/dev/null 2>&1 || { echo >&2 "I require amixer but it's not installed. Aborting."; exit 1; }
|
||||||
|
type dunstify >/dev/null 2>&1 || { echo >&2 "I require dunstify but it's not installed. Aborting."; exit 1; }
|
||||||
|
|
||||||
defaultSink=$(pactl info | grep 'Default Sink' | cut -d' ' -f3);
|
defaultSink=$(pactl info | grep 'Default Sink' | cut -d' ' -f3);
|
||||||
curVolume=$(amixer get Master | grep -o \[0-9\]\\+% -m 1);
|
curVolume=$(amixer get Master | grep -o \[0-9\]\\+% -m 1);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
|
type xset >/dev/null 2>&1 || { echo >&2 "I require xset but it's not installed. Aborting."; exit 1; }
|
||||||
|
|
||||||
lower_battery_threshold=10
|
lower_battery_threshold=10
|
||||||
KBD="";
|
KBD="";
|
||||||
|
@ -15,7 +17,7 @@ function kb_routine {
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ "$KBD" != "$oldKBD" ]; then
|
if [ "$KBD" != "$oldKBD" ]; then
|
||||||
notify-send "$KBD";
|
dunstify -r 1 "$KBD";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -23,7 +25,7 @@ function kb_routine {
|
||||||
function battery_routine {
|
function battery_routine {
|
||||||
capacity=$(< /sys/class/power_supply/BAT0/capacity)
|
capacity=$(< /sys/class/power_supply/BAT0/capacity)
|
||||||
if [[ $capacity -lt lower_battery_threshold ]]; then
|
if [[ $capacity -lt lower_battery_threshold ]]; then
|
||||||
notify-send "$capacity";
|
dunstify "$capacity";
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue