Skip to content

Update variable after pacman upgrade #511

Answered by Aiz0
Aiz0 asked this question in Q&A
Discussion options

You must be logged in to vote

I've gotten it to work nicely with this pacman hook.
runuser seems to get XDG_CONFIG_HOME but not XDG_RUNTIME_DIR.

This can probably be simplified or made more robust but it works great for now.

# pacman hook to trigger an update of the "package-updates" variable

[Trigger]
Operation = Upgrade
Type = File
Target = *

[Action]
Description = eww: update package-updates variable
When = PostTransaction
Exec = /bin/sh -c "runuser -u $DOAS_USER $SUDO_USER -- sh -c 'XDG_RUNTIME_DIR=/run/user/$(id -u) eww update package-updates=0'"
Depends = eww

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
4 replies
@Aiz0
Comment options

@Aiz0
Comment options

@viandoxdev
Comment options

@Aiz0
Comment options

Comment options

You must be logged in to vote
1 reply
@Aiz0
Comment options

Answer selected by Aiz0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants