diff options
| author | srdusr <trevorgray@srdusr.com> | 2025-09-24 05:25:39 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2025-09-24 05:25:39 +0200 |
| commit | a1627ac743289e768b138f1a60753a62e0869cc4 (patch) | |
| tree | 92ab373442943f621bb26b3b284bb1da90e2923a /unix/utils/run_with_display.sh | |
| parent | fdb0eb921205c34fb6ff5728727a097767ffae5a (diff) | |
| download | dotfiles-a1627ac743289e768b138f1a60753a62e0869cc4.tar.gz dotfiles-a1627ac743289e768b138f1a60753a62e0869cc4.zip | |
Update/Overhaul
Diffstat (limited to 'unix/utils/run_with_display.sh')
| -rwxr-xr-x | unix/utils/run_with_display.sh | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/unix/utils/run_with_display.sh b/unix/utils/run_with_display.sh deleted file mode 100755 index 5f1f3a0..0000000 --- a/unix/utils/run_with_display.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -run_with_display() { - output=$("$@" 2>&1) - exit_status=$? - - if [[ $exit_status -ne 0 && ("$output" =~ "cannot open display" || "$output" =~ "DISPLAY environment variable is missing") ]]; then - DISPLAY=:0 "$@" - else - echo "$output" - return $exit_status - fi -} - -# Call this script with any command you want to run -command=$1 -shift -run_with_display "$command" "$@" - |
