add eww
This commit is contained in:
24
eww/scripts/checksystemupdates
Executable file
24
eww/scripts/checksystemupdates
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
# Requires pacman-contrib trizen
|
||||
|
||||
# Define threshholds for color indicators
|
||||
threshhold_green=0
|
||||
threshhold_yellow=25
|
||||
threshhold_red=100
|
||||
|
||||
# Calculate available updates pacman and aur (with trizen)
|
||||
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
|
||||
updates_arch=0
|
||||
fi
|
||||
|
||||
if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
|
||||
updates_aur=0
|
||||
fi
|
||||
|
||||
updates=$(("$updates_arch" + "$updates_aur"))
|
||||
|
||||
if [[ $updates -gt 0 ]]; then
|
||||
printf ''
|
||||
else
|
||||
printf ''
|
||||
fi
|
3
eww/scripts/network
Executable file
3
eww/scripts/network
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
kitty ~/dotfiles/scripts/networkmanager.sh
|
40
eww/scripts/systemupdates
Executable file
40
eww/scripts/systemupdates
Executable file
@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
|
||||
updates_arch=0
|
||||
fi
|
||||
|
||||
if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
|
||||
updates_aur=0
|
||||
fi
|
||||
|
||||
updates=$(("$updates_arch" + "$updates_aur"))
|
||||
|
||||
function check () {
|
||||
if [[ $updates -gt 0 ]]; then
|
||||
printf ''
|
||||
else
|
||||
printf ''
|
||||
fi
|
||||
}
|
||||
|
||||
function count () {
|
||||
printf '%s Update(s)' "$updates"
|
||||
}
|
||||
|
||||
function install () {
|
||||
echo "Starting install updates"
|
||||
echo ""
|
||||
|
||||
yay
|
||||
|
||||
notify-send "Update complete"
|
||||
}
|
||||
|
||||
if [[ $1 == "--check" ]]; then
|
||||
check
|
||||
elif [[ $1 == "--install" ]]; then
|
||||
install
|
||||
elif [[ $1 == "--count" ]]; then
|
||||
count
|
||||
fi
|
3
eww/scripts/wlogout
Executable file
3
eww/scripts/wlogout
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
wlogout
|
Reference in New Issue
Block a user