Skip to content

Commit

Permalink
make eDP1 primary by default
Browse files Browse the repository at this point in the history
  • Loading branch information
anlutro committed Feb 26, 2024
1 parent 145c9d3 commit f02119e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions configs/xorg/xrandrinit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ done
declare -A outputs
declare -a externals

xrandr_query=$(xrandr -q)
xrandr_query=$(xrandr -q | grep -v '^\s')
xrandr_connected_outputs=$(echo "$xrandr_query" | grep ' connected ' | cut -d' ' -f1 | sort)
xrandr_disconnected_outputs=$(echo "$xrandr_query" | grep ' disconnected ' | cut -d' ' -f1 | sort)
for output in $(echo "$xrandr_connected_outputs" | grep '^e'); do
Expand All @@ -47,11 +47,10 @@ if [ ${#externals[@]} -eq 1 ]; then
if [ "$DUPLICATE" = 'yes' ]; then
outputs[$external]="--same-as $primary_output"
else
outputs[$primary_output]="--auto"
if [ "$DIRECTION" = 'right' ]; then
outputs[$external]="--auto --primary --right-of $primary_output"
outputs[$external]="--auto --right-of $primary_output"
elif [ "$DIRECTION" = 'left' ]; then
outputs[$external]="--auto --primary --left-of $primary_output"
outputs[$external]="--auto --left-of $primary_output"
else
echo "Unknown DIRECTION value: $DIRECTION"
exit 1
Expand Down

0 comments on commit f02119e

Please sign in to comment.