stumpwm-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [STUMP] Dim inactive monitor in dual head configuration


From: David Bjergaard
Subject: Re: [STUMP] Dim inactive monitor in dual head configuration
Date: Mon, 06 Jun 2016 13:52:57 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hi,

Here's some POC that might get you started, it wouldn't take much to generalize
and get the hooks right:
> (run-shell-command (format nil "transset -t --id ~a" (window-id (first
> (visible-windows)))))
One could imagine mapping over the visible windows and toggling their
transparancy as long as it didn't have focus. 

If I get further inspired I'll hack this into a module later (unless you'd like
to Dimitri :))

    David
    
David Bjergaard <address@hidden> writes:

> It occurs to me, I have the following in my .Xresources and it dims the
> unfocused terminal when not selected:
>> *background:            S_base03
>> *foreground:            S_base0
>> *fading:                40
>> *fadeColor:             S_base03
>> *cursorColor:           S_base1
>> *pointerColorBackground:S_base01
>> *pointerColorForeground:S_base1
>
> The S_base* colors are defined earlier.  It works well.  I only ever confuse
> active windows when its firefox or emacs that have focus.  I'm sure you could
> find a dimmer for emacs... Firefox wouldn't be as simple.
>
> Here's a neat idea if you have xcompmgr installed. It comes with transset, so
> you can map over the non-focused windows and set their transparancy be
> transparent, and the focused window to have opacity 1.  I don't have time to
> hack up the lisp, but if it were packaged in a module I'd probably use it.  I
> like it better than messing with xrandr since that feels like a bit of 
> overkill
> (but I only have two monitors, some people have 4-5).  Also, it would show the
> exact window focused, and not just the monitor the window is on.
>
>     David
>     
>
> Dimitri Minaev <address@hidden> writes:
>
>> 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 ;)
>>
>> _______________________________________________
>> Stumpwm-devel mailing list
>> address@hidden
>> https://lists.nongnu.org/mailman/listinfo/stumpwm-devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]