On 11/08/2015 13:54, Florian Lindner wrote:
> Am Montag, 10. August 2015, 18:30:13 schrieb Anton Löfgren:
>> AFAIK, the shebang must be an absolute path. That is, you'll probably have 
>> more luck replacing #!env with #!/usr/bin/env.
> It seemed to be a problem with PATH. Starting /usr/bin/python explicitly 
> makes it work.
>  
>> How do you call it standalone? I'm assuming by invoking python manually. 
> No, without python.

Hi

It may not answer all your questions but I wanted to point out that
*py3status* [1] provides a *xrandr* *module* to handle your screen
layouts easily and automatically if you want (with click event support
to switch easily).

You can maybe take a look at the source code [2] to get inspiration for
your own or use it through py3status and contribute to it if you want ;)

DISCLAIMER : I created py3status, so ofc I'm biased but I sincerly think
that this module could help you one way or another

[1] py3status : https://github.com/ultrabug/py3status
[2] xrandr module :
https://github.com/ultrabug/py3status/blob/master/py3status/modules/xrandr.py

Have a nice day

>
> Some more questions:
>
> *) The monitor in the middle is set primary and assigned workspace 2. Howeve 
> the i3-nagbar always appears at workspace 1 (left of 2). How can I make the 
> nagbar appears on the primary output?
>
> *) For setting my backgrounds I use feh:
>
> exec --no-startup-id feh --randomize --bg-max Bilder/Backgrounds 
>
> This works fine if executed in a shell, after i3 startup. Each display is 
> assigned a different background image, if the aspect ratio does not fit there 
> are black bars. But if I put in my i3 config it behaves differently. It gives 
> each screen the same background image. Instead of black bars there is another 
> image under it when aspect ration does not fit. This question may not fit 
> here, but maybe someone has an idea...
>
> *) 
> bar {
>         status_command i3status
>         # tray_output primary
> }
>
> puts the tray output on workspace 3, left of my primary. Activating the 
> tray_output primary and restart (mod+shift+r) and it works like it should, 
> tray on the primary. But a real restart (exit and log in again) screws it. 
> There are no tray icons at all. The owncloud client (which is started using 
> dex -ae i3) opens in a window, instead minmized. However, all programs that 
> should appear in the tray are running (klipper, kmix)
>
> Sorry for putting so much questions at you ;-)
>
> Thanks!
> Florian
>
>> /Anton 
>>
>> On August 10, 2015 3:48:36 PM CEST, Florian Lindner <mailingli...@xgm.de> 
>> wrote:
>>> Hello,
>>>
>>> I try to launch an xrandr script to set the multi monitor
>>> configuration. The script works when called standalone after i3
>>> startup, but not at startup
>>>
>>> #!env python
>>>
>>> import functools, subprocess, sys
>>> call = functools.partial(subprocess.check_call, shell=True)
>>>
>>> call("sleep 3")
>>>
>>> if sys.argv[1] == "uni":
>>>    call("xrandr --output DP2-2 --auto --primary")
>>>    call("xrandr --output eDP1  --auto --left-of DP2-2")
>>>    call("xrandr --output HDMI1 --auto --right-of DP2-2")
>>>    
>>>
>>> The sleep 3 I put just to test, shouldn't be needed.
>>>
>>> It is launched as my first exec in my i3 config:
>>>
>>> exec --no-startup-id /home/florian/software/bin/screen_config uni
>>>
>>> but seems to have no effect at all, configuration is not changed.
>>>
>>> What can be the problem there?
>>>
>>> Thanks,
>>> Florian
>>

Reply via email to