Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions mons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,15 @@ main() {
# =============================

[ -z "$DISPLAY" ] && { echo 'DISPLAY: no variable set.'; exit 1; }
command -vp xrandr >/dev/null 2>&1 || { echo 'xrandr: command not found.'; exit 1; }
XRANDR="$(command -pv xrandr)"

if command -v xrandr >/dev/null 2>&1 ; then
XRANDR="$(command -v xrandr)"
elif command -vp xrandr >/dev/null 2>&1 ; then
XRANDR="$(command -pv xrandr)"
else
echo 'xrandr: command not found.'
exit 1
fi

# =============================
# Argument Checking
Expand Down