I'm currently manually running setxkb.sh every time I fire up my laptop.
One thing I did note is that if you swap keyboard then you have to rerun setxkb
Have been playing with extend today! On a machine where I'm not currently using emacs so it makes a lot of sense to give it a whirl..
]]>However, if you could live with setxkbmap after all, I'd make aliases to commands that switch both model and layout at once for you. Also, your /etc/default/keyboard file there doesn't give you Extend as that's an -option.
I wouldn't source setxkb.sh, but use its option to write a setxkbmap command to a file (yes, it's the -a switch). By default it'll be the ~/.bashrc file as I find that's fairly robustly sourced by most distros, but ideally it should be the ~/.xsession or ~/.xprofile file. Did you look in ~/.bashrc for the command? If you use the other switch you can specify a file instead so you could get it anywhere you want.
]]>Do you know how to get setxkb.sh to output the setxkbmap command so I can put that in my .xsession instead - seems a bit cleaner that way?
I tried combinations of the -a and -f options but they didn't seem to do anything.
]]>seems sub optimal as you have to open a term to get the layout loaded, you have to enter your root pwd (and for every additional term you open) and the script automatically closes the term.
I think I'm missing something here...
the only way I can get the layout I want currently is running:
source setxkb.sh '5ca gb ks'
I can't get the equivalent layout using the ubuntu settings -> language dialog
Theres got to be another way right?
]]>cmk_ed_ks gb: English (UK, Colemak[eD], keep local symbols)
but for colemak-dh:
cmk_ed_dh us: English (Colemak[eD], Curl-DH ergo mod)
I sort of need:
cmk_ed_dh gb: English (Colemak[eD], Curl-DH ergo mod)
Then I could set up my keyboard layout from the Ubuntu Settings->Language & Region dialog box
Feel like I'm getting a bit closer, but possibly need a bit of a steer to implement it?
]]>If my desired layout can be specified as:
$ bash setxkb.sh '5ca gb ks'
resulting in show-xkb.sh output:
••• DreymaR's Show XKB info script (by GadOE, 2014) •••
••• Output from 'xprop -root | grep "XKB"': •••
_XKB_RULES_NAMES(STRING) = "evdev", "pc105angle", "gb(cmk_ed_ks)", "", "misc:extend,lv5:caps_switch_lock,grp:shifts_toggle,compose:menu,misc:cmk_curl_dh"
••• Output from 'gsettings list-recursively org.gnome.libgnomekbd.keyboard': •••
org.gnome.libgnomekbd.keyboard layouts @as []
org.gnome.libgnomekbd.keyboard options @as []
org.gnome.libgnomekbd.keyboard model ''
••• Output from 'setxkbmap -print': •••
xkb_keymap {
xkb_keycodes { include "evdev(pc105angle)+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+gb(cmk_ed_ks)+inet(evdev)+group(shifts_toggle)+compose(menu)+level5(caps_switch_lock)+extend(basic)+colemak(cmk_ed_dh)" };
xkb_geometry { include "pc(pc105angle)" };
};
What would my
/etc/default/keyboard
file have to look like to represent the same setup?
It currently looks like this:
XKBMODEL=pc105angle
XKBLAYOUT=gb,gb
BACKSPACE=guess
XKBVARIANT=,cmk_ed_dh
I'd rather set my keyboard file directly as using the setxkb.sh mucks up having multiple keyboard layouts available as drop-down options top right of screen in ubuntu
That keyboard file (I think) represents two available layouts, a qwerty one and a colemak-dh one.
In a perfect world I'd have the qwerty on a pc105 layout and the colemak-dh on pc105angle. Is that even possible?
Note that using the setxkb script seems to break things a little bit, i.e. after executing it I can no longer C-x C-f to open a file in emacs, I get an error:
C-x <XF86Back is undefined