Large update to configs
This commit is contained in:
@ -65,7 +65,7 @@ while getopts ":hvqwcbrl" opt; do
|
||||
*Lock) i3lock-fancy ;;
|
||||
*Logout) session-logout ;;
|
||||
*Reboot) systemctl reboot ;;
|
||||
*Shutdown) systemctl poweroff
|
||||
*Shutdown) systemctl -i poweroff
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
Name=$(basename "$0")
|
||||
Version="0.1"
|
||||
Version="0.2"
|
||||
_usage() {
|
||||
cat <<EOF
|
||||
|
||||
@ -43,7 +43,7 @@ toggle_polybar() {
|
||||
|
||||
|
||||
toggle_compton() {
|
||||
if [[ $opt -eq 1 ]]; then
|
||||
if (( $opt == 1 )); then
|
||||
if [[ $(pidof compton) ]]; then
|
||||
al-compositor --stop
|
||||
else
|
||||
@ -65,7 +65,7 @@ toggle_compton() {
|
||||
|
||||
|
||||
toggle_redshift() {
|
||||
if [[ $opt -eq 1 ]]; then
|
||||
if (( $opt == 1 )); then
|
||||
if [[ $(pidof redshift) ]]; then
|
||||
pkill redshift
|
||||
else
|
||||
@ -93,7 +93,7 @@ toggle_redshift() {
|
||||
|
||||
|
||||
toggle_caffeine() {
|
||||
if [[ $opt -eq 1 ]]; then
|
||||
if (( $opt == 1 )); then
|
||||
if [[ $(pidof caffeine) ]]; then
|
||||
killall caffeine
|
||||
else
|
||||
|
@ -8,26 +8,26 @@ total() { UPD=$(checkupdates | wc -l) ;}
|
||||
while true; do
|
||||
total
|
||||
if hash notify-send &>/dev/null; then
|
||||
if [[ $UPD -gt 50 ]]; then
|
||||
if (( $UPD > 50 )); then
|
||||
notify-send -u critical -i $ICON "You really need to update!!" "$UPD New packages"
|
||||
elif [[ $UPD -gt 25 ]]; then
|
||||
elif (( $UPD > 25 )); then
|
||||
notify-send -u normal -i $ICON "You should update soon" "$UPD New packages"
|
||||
elif [[ $UPD -gt 2 ]]; then
|
||||
elif (( $UPD > 2 )); then
|
||||
notify-send -u low -i $ICON "$UPD New packages"
|
||||
fi
|
||||
fi
|
||||
|
||||
while [[ $UPD -gt 0 ]]; do
|
||||
if [[ $UPD -eq 1 ]]; then
|
||||
while (( $UPD > 0 )); do
|
||||
if (( $UPD == 1 )); then
|
||||
echo "$UPD Update"
|
||||
elif [[ $UPD -gt 1 ]]; then
|
||||
elif (( $UPD > 1 )); then
|
||||
echo "$UPD Updates"
|
||||
fi
|
||||
sleep 10
|
||||
total
|
||||
done
|
||||
|
||||
while [[ $UPD -eq 0 ]]; do
|
||||
while (( $UPD == 0 )); do
|
||||
echo $BAR_ICON
|
||||
sleep 1800
|
||||
total
|
||||
|
Reference in New Issue
Block a user