summaryrefslogtreecommitdiff
path: root/ar
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-29 14:05:38 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-29 14:05:38 +0900
commit7bf3f2f31c74385b95f4068c5d7dacff720d7292 (patch)
treeaa5095202a14fcbaf423375cf6dd76fba82f53bd /ar
parent3e65d676e91fbc6294dcb375923d71168fc11bac (diff)
modified bin/displayselect
Diffstat (limited to 'ar')
-rwxr-xr-xar/.local/bin/displayselect3
1 files changed, 3 insertions, 0 deletions
diff --git a/ar/.local/bin/displayselect b/ar/.local/bin/displayselect
index 38fc942..e8e9dbf 100755
--- a/ar/.local/bin/displayselect
+++ b/ar/.local/bin/displayselect
@@ -6,6 +6,7 @@
twoscreen() { # If multi-monitor is selected and there are two screens.
mirror=$(printf "no\\nyes" | dmenu -i -p "Mirror displays?")
+ [ -z "$mirror" ] && exit
# Mirror displays using native resolution of external display and a scaled
# version for the internal display
if [ "$mirror" = "yes" ]; then
@@ -30,6 +31,7 @@ twoscreen() { # If multi-monitor is selected and there are two screens.
--scale "$scale_x"x"$scale_y"
else
primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
+ [ -z "$primary" ] && exit
secondary=$(echo "$screens" | grep -v ^"$primary"$)
direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction"-of "$primary" --auto --scale 1.0x1.0
@@ -38,6 +40,7 @@ twoscreen() { # If multi-monitor is selected and there are two screens.
morescreen() { # If multi-monitor is selected and there are more than two screens.
primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
+ [ -z "$primary" ] && exit
secondary=$(echo "$screens" | grep -v ^"$primary"$ | dmenu -i -p "Select secondary display:")
direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
tertiary=$(echo "$screens" | grep -v ^"$primary"$ | grep -v ^"$secondary"$ | dmenu -i -p "Select third display:")