power menu, redshift, polybar
This commit is contained in:
23
.config/polybar/scripts/updates-dnf/README.md
Normal file
23
.config/polybar/scripts/updates-dnf/README.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Script: updates-dnf
|
||||
|
||||
A script that shows if there are updates for dnf-based distributions like Fedora.
|
||||
|
||||

|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
You have to add the `dnf` command to the `/etc/sudoers` NOPASSWD of your user:
|
||||
|
||||
```
|
||||
user ALL=(ALL) NOPASSWD: /usr/bin/dnf updateinfo -q --list
|
||||
```
|
||||
|
||||
## Module
|
||||
|
||||
```ini
|
||||
[module/updates-dnf]
|
||||
type = custom/script
|
||||
exec = ~/polybar-scripts/updates-dnf.sh
|
||||
interval = 600
|
||||
```
|
||||
BIN
.config/polybar/scripts/updates-dnf/screenshots/1.png
Normal file
BIN
.config/polybar/scripts/updates-dnf/screenshots/1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
9
.config/polybar/scripts/updates-dnf/updates-dnf.sh
Normal file
9
.config/polybar/scripts/updates-dnf/updates-dnf.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
updates=$(dnf updateinfo -q --list | wc -l)
|
||||
|
||||
if [ "$updates" -gt 0 ]; then
|
||||
echo "# $updates"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
Reference in New Issue
Block a user