diff options
author | teknsl | 2022-01-09 13:17:06 +0100 |
---|---|---|
committer | teknsl | 2022-01-09 13:17:06 +0100 |
commit | 06f341949cc39d269f778338fc3994e5d4343ade (patch) | |
tree | 531e37cdd3f3ce8d53bd63ea69a02a4097479fd6 | |
parent | c846ac36bd60f173aa7228b63c332bb81bde4660 (diff) | |
download | aur-alacritty-xwayland.tar.gz |
add revert patch function
-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 +} + |