Add refresh-awesomewm-menubar
This commit is contained in:
parent
62da89680a
commit
7c22185c95
2 changed files with 26 additions and 0 deletions
15
refresh-awesomewm-menubar/hooks.bin/refresh-awesomewm-menubar.sh
Executable file
15
refresh-awesomewm-menubar/hooks.bin/refresh-awesomewm-menubar.sh
Executable file
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
uid="$(find /run/user/ -maxdepth 1 -mindepth 1 -type d | awk -F/ '{print $NF}')"
|
||||||
|
user="$(grep $uid /etc/passwd | sed 's/:.*//')"
|
||||||
|
display="$(DISPLAY=$(echo "$DISPLAY"))"
|
||||||
|
xdg_rd="$(XDG_RUNTIME_DIR=/run/user/$uid)"
|
||||||
|
xauth="$(XAUTHORITY=/home/$user/.Xauthority)"
|
||||||
|
dbus_sba="$(DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$uid/bus)"
|
||||||
|
|
||||||
|
export XAUTHORITY=/home/$user/.Xauthority
|
||||||
|
export DISPLAY=$(echo "$DISPLAY")
|
||||||
|
export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$uid/bus"
|
||||||
|
|
||||||
|
su $user -c "$display $xauth $dbus_sba $xdg_rd awesome-client 'require(\"menubar\").refresh()'"
|
||||||
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
[Trigger]
|
||||||
|
Operation = Install
|
||||||
|
Operation = Remove
|
||||||
|
Type = Package
|
||||||
|
Target = *
|
||||||
|
|
||||||
|
[Action]
|
||||||
|
Description = Refreshing awesomeWM menubar...
|
||||||
|
Exec = /etc/pacman.d/hooks.bin/refresh-awesomewm-menubar.sh
|
||||||
|
When = PostTransaction
|
||||||
|
Depends = awesome
|
||||||
Loading…
Add table
Add a link
Reference in a new issue