refactor(waybar): remove pacman update
This commit is contained in:
parent
0e7cadc86b
commit
9612ff6b70
@ -19,7 +19,6 @@
|
||||
"custom/media"
|
||||
],
|
||||
"modules-right": [
|
||||
"custom/pacman-update",
|
||||
"systemd-failed-units",
|
||||
"tray",
|
||||
"backlight",
|
||||
@ -207,14 +206,6 @@
|
||||
"on-click": "playerctl play-pause",
|
||||
"exec": "~/.config/waybar/scripts/get-media.bash"
|
||||
},
|
||||
"custom/pacman-update": {
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/get-pacman-package-updates.bash",
|
||||
"format": " {}",
|
||||
"tooltip": true,
|
||||
"interval": 3600,
|
||||
"signal": 8
|
||||
},
|
||||
"wlr/taskbar": {
|
||||
"format": "{icon}",
|
||||
"icon-size": 12,
|
||||
|
@ -1,23 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
main() {
|
||||
set -o pipefail
|
||||
local package_updates
|
||||
package_updates="$(checkupdates | cut -d " " -f1)"
|
||||
|
||||
if [[ "${?}" != 0 ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
package_update_number="$(wc -l <<<"${package_updates}")"
|
||||
|
||||
# Limit the number of results shown to ten, add trailing ellipsis
|
||||
package_updates="$(printf "%s" "${package_updates}" | head -n 10)"
|
||||
if ((package_update_number > 10)); then
|
||||
package_updates+="\n..."
|
||||
fi
|
||||
|
||||
printf '{"text": "%s", "tooltip": "%s"}\n' "${package_update_number}" "${package_updates//$'\n'/\\n}"
|
||||
}
|
||||
|
||||
main
|
@ -68,7 +68,6 @@
|
||||
#submap,
|
||||
tooltip,
|
||||
tooltip label,
|
||||
#custom-pacman-update,
|
||||
#taskbar,
|
||||
#tray,
|
||||
#backlight,
|
||||
@ -264,11 +263,6 @@ tooltip {
|
||||
background: #98bb6c;
|
||||
}
|
||||
|
||||
/* Pacman Updates */
|
||||
#custom-pacman-update {
|
||||
color: #7e9cd8;
|
||||
}
|
||||
|
||||
#systemd-failed-units.ok {
|
||||
color: #98BB6C;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user