Fix for dvorak layout detection
Closed this issue · 4 comments
Deleted user commented
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.
Deleted user commented
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
tbocek commented
Awesome, just implemented it and for me it works. I added ":0" as a default when env is not set
tbocek commented
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)
tbocek commented
Improved now layout detection, using gdbus to get current layout from gnome-shell