Skip to content

Commit

Permalink
daemon: Check on dev status instead of edid (#19)
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Venriès <thomas.venries@gmail.com>
  • Loading branch information
Thomas Venriès committed Nov 13, 2017
1 parent ecffc29 commit 3a9de78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mons
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ main() {
if $aFlag ; then
prev=0; i=0
while true; do
for edid in /sys/class/drm/*/edid; do
[ -n "$(cat "$edid")" ] && i=$((i+1))
for status in /sys/class/drm/*/status; do
[ "$(<"$status")" = 'connected' ] && i=$((i+1))
done
if [ "$i" -eq 1 ] && [ "$i" != "$prev" ]; then
"${XRANDR}" --auto --dpi "${dpi}"
Expand Down

0 comments on commit 3a9de78

Please sign in to comment.