diff options
-rwxr-xr-x | alacritty-xwayland-patch | 7 | ||||
-rw-r--r-- | alacritty-xwayland.install | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/alacritty-xwayland-patch b/alacritty-xwayland-patch index 11d9e9d3bc0d..a2a29148258d 100755 --- a/alacritty-xwayland-patch +++ b/alacritty-xwayland-patch @@ -1,5 +1,10 @@ #!/bin/sh path="/usr/share/applications/Alacritty.desktop" -sed -i "s|^Exec=|Exec=env WAYLAND_DISPLAY= |" $path + +if [[ "$1" = "remove" ]]; then + sed -i "s|^Exec=env WAYLAND_DISPLAY= |Exec=|" $path +else + sed -i "s|^Exec=|Exec=env WAYLAND_DISPLAY= |" $path +fi diff --git a/alacritty-xwayland.install b/alacritty-xwayland.install index cfbb11d37c06..3e58cf1f2a27 100644 --- a/alacritty-xwayland.install +++ b/alacritty-xwayland.install @@ -2,3 +2,7 @@ post_install() { /usr/share/libalpm/scripts/alacritty-xwayland-patch } +pre_remove() { + /usr/share/libalpm/scripts/alacritty-xwayland-patch remove +} + |