envycontrol
envycontrol copied to clipboard
[REQUEST] Provide a way to customize lightdm setup script
I'm using envycontrol in conjunction with lightdm, it works fine, but I'd like to customize the generated /etc/lightdm/nvidia.sh
The default script looks like this:
xrandr --setprovideroutputsource "modesetting" NVIDIA-0
xrandr --auto
However I'm using autorandr
to setup monitors' layout, so having xrandr to manage it interferes with autorandr. I currently hacked together something quick and dirty by forking envycontrol to have something like this instead:
xrandr --setprovideroutputsource "modesetting" NVIDIA-0
autorandr -c
It would be nice to have a generic way to configure what to do after the modesetting bit.
Apologies if there's already a way to achieve this, I've probably missed it, and thanks for the project!
Edit the script at /usr/lib/python3.11/site-packages/envycontrol.py
line 199
NVIDIA_XRANDR_SCRIPT = '''#!/bin/sh
# Automatically generated by EnvyControl
xrandr --setprovideroutputsource "{}" NVIDIA-0
xrandr --auto
'''
NVIDIA_XRANDR_SCRIPT = '''#!/bin/sh
# Automatically generated by EnvyControl
xrandr --setprovideroutputsource "{}" NVIDIA-0
autorandr -c
'''
Then edit /etc/pacman.conf
line 25
#IgnorePkg =
IgnorePkg = envycontrol