mirror of
https://github.com/phillipberndt/autorandr
synced 2025-02-19 21:36:58 +00:00
Set AUTORANDR_BATCH_PID environment variable in batch invocations
This commit is contained in:
parent
455809c32d
commit
c583fb4389
@ -843,6 +843,9 @@ def dispatch_call_to_sessions(argv):
|
||||
process_environ[name] = value
|
||||
display = process_environ["DISPLAY"] if "DISPLAY" in process_environ else None
|
||||
|
||||
# To allow scripts to detect batch invocation (especially useful for predetect)
|
||||
process_environ["AUTORANDR_BATCH_PID"] = os.getpid()
|
||||
|
||||
if display and display not in X11_displays_done:
|
||||
try:
|
||||
pwent = pwd.getpwuid(uid)
|
||||
|
Loading…
Reference in New Issue
Block a user