1
0
Fork 0
dotfiles/.local/bin/statusbar/sb-pacpackages

16 lines
519 B
Bash
Executable File

#!/bin/sh
# For this to work, have a `pacman -Sy` command run in the background as a
# cronjob every so often as root. This script will then read those packages.
# Add the following text as a file in /usr/share/libalpm/hooks/statusbar.hook:
#
# [Trigger]
# Operation = Upgrade
# Type = Package
# Target = *
#
# [Action]
# Description = Updating statusbar...
# When = PostTransaction
# Exec = /usr/bin/pkill -RTMIN+8 dwmblocks # Or i3blocks if using i3.
pacman -Qu | grep -Fcv "[ignored]" | sed "s/^/ /;s/^ 0$//g"