power menu, redshift, polybar
This commit is contained in:
20
.config/polybar/scripts/updates-aurhelper/README.md
Normal file
20
.config/polybar/scripts/updates-aurhelper/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Script: updates-aurhelper
|
||||
|
||||
A script that shows if there are AUR updates for Arch Linux.
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
The possibilities depend on your AUR helper. Not all helpers can report the pending updates.
|
||||
|
||||
At the moment `yay`, `paru`, `trizen`, `pikaur`, `rua` and `cower` are documented. Take a look at the script to see how it works.
|
||||
|
||||
|
||||
## Module
|
||||
|
||||
```ini
|
||||
[module/updates-aurhelper]
|
||||
type = custom/script
|
||||
exec = ~/polybar-scripts/updates-aurhelper.sh
|
||||
interval = 600
|
||||
```
|
||||
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
if ! updates=$(yay -Qum 2> /dev/null | wc -l); then
|
||||
# if ! updates=$(paru -Qum 2> /dev/null | wc -l); then
|
||||
# if ! updates=$(cower -u 2> /dev/null | wc -l); then
|
||||
# if ! updates=$(trizen -Su --aur --quiet | wc -l); then
|
||||
# if ! updates=$(pikaur -Qua 2> /dev/null | wc -l); then
|
||||
# if ! updates=$(rua upgrade --printonly 2> /dev/null | wc -l); then
|
||||
updates=0
|
||||
fi
|
||||
|
||||
if [ "$updates" -gt 0 ]; then
|
||||
echo "# $updates"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
Reference in New Issue
Block a user