home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

commit ed82d4cbbedeecf88cfa42554f6784da9653614f
parent 50af9e24b300ecb39c0323386c004e88b5a11047
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Wed, 24 Aug 2022 18:00:08 +0200

nix/packages: fix redhat-vpn on sway

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Mnix/packages/my/scripts/bin/redhat-vpn | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/nix/packages/my/scripts/bin/redhat-vpn b/nix/packages/my/scripts/bin/redhat-vpn @@ -5,10 +5,12 @@ set -e GRAPHICS=1 -if ! command -v xset &> /dev/null; then - GRAPHICS=0 -elif ! timeout 1s xset q &>/dev/null; then - GRAPHICS=0 +if ! [ "${XDG_CURRENT_DESKTOP}" == "sway" ]; then + if ! command -v xset &> /dev/null; then + GRAPHICS=0 + elif ! timeout 1s xset q &>/dev/null; then + GRAPHICS=0 + fi fi if [[ GRAPHICS -eq 0 ]]; then