|
From: | Dimitri Minaev |
Subject: | Re: [STUMP] Dim inactive monitor in dual head configuration |
Date: | Mon, 6 Jun 2016 09:05:36 +0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 |
On 06/03/2016 09:28 AM, Dimitri Minaev wrote:
There is also the problem that there is absolutely no guarantee that xrandr and StumpWM will list heads in the same order. In fact, for me, it's the other way around right now.But Stumpwm gets the list of head from `xdpyinfo -ext XINERAMA', right? I could replace `xrandr' with the `xdpyinfo', too.
I'm wise as king Solomon. And in my wisdom, I proclaim: render unto the user the thing that is user's. May he provides the list of heads in the correct order:
(setf *xrandr-heads* '("HDMI1" "VGA1")) (defun dim-inactive-head (arg1 arg2) (let* ((brighthead (slot-value (current-head) 'number)) (dimhead (if (eql brighthead 0) 1 0))) (run-shell-command(format nil "/usr/bin/xrandr --output ~d --brightness 1.0" (nth brighthead *xrandr-heads*)))
(run-shell-command(format nil "/usr/bin/xrandr --output ~d --brightness 0.7" (nth dimhead *xrandr-heads*)))))
That'll "fix" the problem of the stuck xrandr, too ;)
[Prev in Thread] | Current Thread | [Next in Thread] |