power menu, redshift, polybar
This commit is contained in:
18
.config/polybar/scripts/updates-fwupd/README.md
Normal file
18
.config/polybar/scripts/updates-fwupd/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Script: updates-fwupd
|
||||
|
||||
A script that shows if there are firmware updates available.
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
* `fwupd`
|
||||
|
||||
|
||||
## Module
|
||||
|
||||
```ini
|
||||
[module/updates-fwupd]
|
||||
type = custom/script
|
||||
exec = ~/polybar-scripts/updates-fwupd.sh
|
||||
interval = 3600
|
||||
```
|
||||
11
.config/polybar/scripts/updates-fwupd/updates-fwupdmgr.sh
Normal file
11
.config/polybar/scripts/updates-fwupd/updates-fwupdmgr.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
fwupdmgr refresh >> /dev/null 2>&1
|
||||
|
||||
updates=$(fwupdmgr get-updates 2> /dev/null | grep -c "Updatable")
|
||||
|
||||
if [ "$updates" -gt 0 ]; then
|
||||
echo "# $updates"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
Reference in New Issue
Block a user