chore(default-flatpaks): No need to query DISPLAY variable for notify-send
Notifications work without it & custom images without XWayland don't have `DISPLAY` variable at all (eg. secureblue & custom images based on it)
This commit is contained in:
parent
7d08c2e39f
commit
89ea220f5e
1 changed files with 4 additions and 8 deletions
|
|
@ -157,32 +157,28 @@ function notify-send-pre-install {
|
|||
user_name=$(loginctl list-users --output=json | jq -r '.[] | select(.state == "active") | .user')
|
||||
uid=$(loginctl list-users --output=json | jq -r '.[] | select(.state == "active") | .uid')
|
||||
xdg_runtime_path="/run/user/$uid"
|
||||
display_var=$(printenv DISPLAY)
|
||||
sudo -u "$user_name" DBUS_SESSION_BUS_ADDRESS=unix:path="$xdg_runtime_path"/bus DISPLAY="$display_var" notify-send "Flatpak Installer" "Started install of system flatpaks" --app-name="Flatpak Installer" -u NORMAL
|
||||
sudo -u "$user_name" DBUS_SESSION_BUS_ADDRESS=unix:path="$xdg_runtime_path"/bus notify-send "Flatpak Installer" "Started install of system flatpaks" --app-name="Flatpak Installer" -u NORMAL
|
||||
}
|
||||
|
||||
function notify-send-install {
|
||||
user_name=$(loginctl list-users --output=json | jq -r '.[] | select(.state == "active") | .user')
|
||||
uid=$(loginctl list-users --output=json | jq -r '.[] | select(.state == "active") | .uid')
|
||||
xdg_runtime_path="/run/user/$uid"
|
||||
display_var=$(printenv DISPLAY)
|
||||
sudo -u "$user_name" DBUS_SESSION_BUS_ADDRESS=unix:path="$xdg_runtime_path"/bus DISPLAY="$display_var" notify-send "Flatpak Installer" "Finished install of system flatpaks:\n$INSTALL_LIST" --app-name="Flatpak Installer" -u NORMAL
|
||||
sudo -u "$user_name" DBUS_SESSION_BUS_ADDRESS=unix:path="$xdg_runtime_path"/bus notify-send "Flatpak Installer" "Finished install of system flatpaks:\n$INSTALL_LIST" --app-name="Flatpak Installer" -u NORMAL
|
||||
}
|
||||
|
||||
function notify-send-pre-uninstall {
|
||||
user_name=$(loginctl list-users --output=json | jq -r '.[] | select(.state == "active") | .user')
|
||||
uid=$(loginctl list-users --output=json | jq -r '.[] | select(.state == "active") | .uid')
|
||||
xdg_runtime_path="/run/user/$uid"
|
||||
display_var=$(printenv DISPLAY)
|
||||
sudo -u "$user_name" DBUS_SESSION_BUS_ADDRESS=unix:path="$xdg_runtime_path"/bus DISPLAY="$display_var" notify-send "Flatpak Installer" "Started uninstall of some system flatpaks" --app-name="Flatpak Installer" -u NORMAL
|
||||
sudo -u "$user_name" DBUS_SESSION_BUS_ADDRESS=unix:path="$xdg_runtime_path"/bus notify-send "Flatpak Installer" "Started uninstall of some system flatpaks" --app-name="Flatpak Installer" -u NORMAL
|
||||
}
|
||||
|
||||
function notify-send-uninstall {
|
||||
user_name=$(loginctl list-users --output=json | jq -r '.[] | select(.state == "active") | .user')
|
||||
uid=$(loginctl list-users --output=json | jq -r '.[] | select(.state == "active") | .uid')
|
||||
xdg_runtime_path="/run/user/$uid"
|
||||
display_var=$(printenv DISPLAY)
|
||||
sudo -u "$user_name" DBUS_SESSION_BUS_ADDRESS=unix:path="$xdg_runtime_path"/bus DISPLAY="$display_var" notify-send "Flatpak Installer" "Finished uninstall of system flatpaks:\n$REMOVE_LIST" --app-name="Flatpak Installer" -u NORMAL
|
||||
sudo -u "$user_name" DBUS_SESSION_BUS_ADDRESS=unix:path="$xdg_runtime_path"/bus notify-send "Flatpak Installer" "Finished uninstall of system flatpaks:\n$REMOVE_LIST" --app-name="Flatpak Installer" -u NORMAL
|
||||
}
|
||||
|
||||
# Install flatpaks in list
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue