Fix monitor problems
Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
parent
92c15e04d0
commit
be92d7f1b3
12 changed files with 149 additions and 128 deletions
24
system/.local/bin/is-connected
Executable file
24
system/.local/bin/is-connected
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# SCRIPT NAME:
|
||||
# is-connected
|
||||
#
|
||||
# AUTHOR:
|
||||
# Severin Kaderli <severin@kaderli.dev>
|
||||
#
|
||||
# DESCRIPTION:
|
||||
# Checks if the output is connected
|
||||
#
|
||||
# USAGE:
|
||||
# ./is-connected OUTPUT
|
||||
|
||||
if [ -z "${1}" ]; then
|
||||
echo "No output given"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$(xrandr --query | grep "${1} connected")" ]; then
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue