Skip to content

Instantly share code, notes, and snippets.

@mrtrkmn
Created May 27, 2022 12:37
Show Gist options
  • Save mrtrkmn/a509bbaab4b8b6b0363c1110248c772b to your computer and use it in GitHub Desktop.
Save mrtrkmn/a509bbaab4b8b6b0363c1110248c772b to your computer and use it in GitHub Desktop.
how to set only one screen - ubuntu
#!/bin/bash
NR_OF_MONITORS=$(xrandr -d :0 -q | grep ' connected' | wc -l)
if [ $NR_OF_MONITORS = "2" ]; then
xrandr --output DFP1 --primary
fi
# refer to https://askubuntu.com/questions/88858/how-to-only-have-one-display
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment