tbocek/dvorak

Fix for dvorak layout detection

Closed this issue · 4 comments

Layout detection works perfect if replace
if (!(d = XOpenDisplay(NULL))) {
with
if (!(d = XkbOpenDisplay(getenv("DISPLAY"), NULL, NULL, NULL, NULL, NULL))) {
on line 200 in dvorak.c.

Well, that's strange. Layout detecting works if i run the script from cli after login, but if i install and reboot it doesn't. Solution for me is to autostart script in .xprofile

Awesome, just implemented it and for me it works. I added ":0" as a default when env is not set

Same for me after reboot, layout detection not working on startup, when running from shell, all ok:

dvorak[1001]: No protocol specified
dvorak[1001]: cannot open display (default)

Improved now layout detection, using gdbus to get current layout from gnome-shell