From e4cf81239b4ed390fc75cac09e3d6458bebfe333 Mon Sep 17 00:00:00 2001 From: Dovydas Date: Tue, 13 Feb 2024 19:42:53 +0100 Subject: [PATCH] fix: make pywall pickup correct output if monitor is disabled --- config/hypr/scripts/PywalSwww.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/hypr/scripts/PywalSwww.sh b/config/hypr/scripts/PywalSwww.sh index 0cbadaf..8ebf74c 100755 --- a/config/hypr/scripts/PywalSwww.sh +++ b/config/hypr/scripts/PywalSwww.sh @@ -4,6 +4,7 @@ # Define the path to the swww cache directory cache_dir="$HOME/.cache/swww/" +laptop_display_file="$HOME/.config/hypr/UserConfigs/LaptopDisplay.conf" # Get a list of monitor outputs monitor_outputs=($(ls "$cache_dir")) @@ -26,7 +27,10 @@ for output in "${monitor_outputs[@]}"; do ln_success=true # Set the flag to true upon successful execution fi - break # Exit the loop after processing the first found monitor output + # Check if the laptop display is not disabled + if grep -q "preffered" $laptop_display_file; then + break + fi fi done