refactor(waybar): remove pacman update
This commit is contained in:
parent
0e7cadc86b
commit
9612ff6b70
@ -19,7 +19,6 @@
|
|||||||
"custom/media"
|
"custom/media"
|
||||||
],
|
],
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
"custom/pacman-update",
|
|
||||||
"systemd-failed-units",
|
"systemd-failed-units",
|
||||||
"tray",
|
"tray",
|
||||||
"backlight",
|
"backlight",
|
||||||
@ -207,14 +206,6 @@
|
|||||||
"on-click": "playerctl play-pause",
|
"on-click": "playerctl play-pause",
|
||||||
"exec": "~/.config/waybar/scripts/get-media.bash"
|
"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": {
|
"wlr/taskbar": {
|
||||||
"format": "{icon}",
|
"format": "{icon}",
|
||||||
"icon-size": 12,
|
"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,
|
#submap,
|
||||||
tooltip,
|
tooltip,
|
||||||
tooltip label,
|
tooltip label,
|
||||||
#custom-pacman-update,
|
|
||||||
#taskbar,
|
#taskbar,
|
||||||
#tray,
|
#tray,
|
||||||
#backlight,
|
#backlight,
|
||||||
@ -264,11 +263,6 @@ tooltip {
|
|||||||
background: #98bb6c;
|
background: #98bb6c;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Pacman Updates */
|
|
||||||
#custom-pacman-update {
|
|
||||||
color: #7e9cd8;
|
|
||||||
}
|
|
||||||
|
|
||||||
#systemd-failed-units.ok {
|
#systemd-failed-units.ok {
|
||||||
color: #98BB6C;
|
color: #98BB6C;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user