Last active
September 26, 2023 14:29
-
-
Save miraculixx/4cfb26cad33943f90742ad98b4ce9f87 to your computer and use it in GitHub Desktop.
fix barrier issue on suspend/resume on linux mint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# run this from /usr/lib/systemd/system-sleep/pre-suspend.sh | |
# adopted from https://www.addictivetips.com/ubuntu-linux-tips/run-scripts-and-commands-on-suspend-and-resume-on-linux/ | |
USER=$(ls /home | grep -v root | tail -n1) | |
if [ "${1}" == "pre" ]; then | |
killall barrier barrierc | |
elif [ "${1}" == "post" ]; then | |
# need to run in background to ensure other post resume processing happens first | |
sudo su - $USER -c "nohup bash -c 'sleep 10; env DISPLAY=:0 /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=barrier com.github.debauchee.barrier' &" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment