Skip to content

Commit 1bb944a

Browse files
author
nix
committed
force env var QT_QPA_PLATFORM=xcb on nix
1 parent 5b4b910 commit 1bb944a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

funscript_editor/__main__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,10 @@ def main():
2222
if os.getcwd() not in os.environ['PATH']:
2323
os.environ['PATH'] = os.getcwd() + os.sep + os.environ['PATH']
2424

25+
if os.path.abspath(__file__).startswith("/nix"):
26+
# pynput does not work well with native wayland so we use xwayland to get proper keyboard inputs
27+
print("Warning: Force QT_QPA_PLATFORM=xcb")
28+
os.environ['QT_QPA_PLATFORM'] = "xcb"
29+
2530
if not args.generator: show_editor()
2631
else: generate_funscript(args.input, args.start, args.end, args.output, args.multiaxis, args.no_tracking, args.logs, args.stdout)

0 commit comments

Comments
 (0)