power menu, redshift, polybar
This commit is contained in:
26
.config/polybar/scripts/updates-pacman-aurhelper/README.md
Normal file
26
.config/polybar/scripts/updates-pacman-aurhelper/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Script: updates-pacman-aurhelper
|
||||
|
||||
A script that shows if there are updates for Arch Linux and AUR updates.
|
||||
|
||||
See also [updates-pacman](../updates-pacman) and [updates-aurhelper](../updates-aurhelper).
|
||||
|
||||

|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
* `pacman-contrib`
|
||||
|
||||
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-pacman-aurhelper]
|
||||
type = custom/script
|
||||
exec = ~/polybar-scripts/updates-pacman-aurhelper.sh
|
||||
interval = 600
|
||||
```
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
|
||||
updates_arch=0
|
||||
fi
|
||||
|
||||
if ! updates_aur=$(yay -Qum 2> /dev/null | wc -l); then
|
||||
# if ! updates_aur=$(paru -Qum 2> /dev/null | wc -l); then
|
||||
# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then
|
||||
# if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
|
||||
# if ! updates_aur=$(pikaur -Qua 2> /dev/null | wc -l); then
|
||||
# if ! updates_aur=$(rua upgrade --printonly 2> /dev/null | wc -l); then
|
||||
updates_aur=0
|
||||
fi
|
||||
|
||||
updates=$((updates_arch + updates_aur))
|
||||
|
||||
if [ "$updates" -gt 0 ]; then
|
||||
echo "# $updates"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
Reference in New Issue
Block a user