Score:0

Where should `setxkbmap us_programmer` go to make it persistent?

vn flag

Where should my custom setxkbmap us_programmer goto to make it persistent when I log into Ubuntu graphically and also from SSH?

Gunnar Hjalmarsson avatar
uz flag
Have you tried to add it to your input sources in **Settings -> Keyboard** ?
Gabriel avatar
vn flag
is apprantly does not show up... i used https://github.com/eren/programmer-qwerty/blob/master/linux/us_programmer
Gunnar Hjalmarsson avatar
uz flag
Well, apparently not if you didn't edit evdev.xml accordingly. But you may want to try to add the setxkbmap command to your `~/.profile` file.
Gunnar Hjalmarsson avatar
uz flag
OTOH it's not clear to me what it is you want to achieve. If you enable the file that way, only the first "basic" section is used. The rest of the file is unnecessary noise. I'd say that the GitHub page you linked to does not apply to a desktop with a modern graphical interface.
Score:1
uz flag

If I would want to use that layout, this is how I would probably do it.

First add this variant to the bottom of /usr/share/X11/xkb/symbols/us:

partial alphanumeric_keys
xkb_symbols "programmer" {

    include "us(basic)"
    name[Group1] = "English (US, programmer)";

    key <AE01> {    [      exclam,  1   ]   };
    key <AE02> {    [          at,  2   ]   };
    key <AE03> {    [  numbersign,  3   ]   };
    key <AE04> {    [      dollar,  4   ]   };
    key <AE05> {    [     percent,  5   ]   };
    key <AE06> {    [ asciicircum,  6   ]   };
    key <AE07> {    [   ampersand,  7   ]   };
    key <AE08> {    [    asterisk,  8   ]   };
    key <AE09> {    [   parenleft,  9   ]   };
    key <AE10> {    [  parenright,  0   ]   };
};

Then add this entry to /usr/share/X11/xkb/rules/evdev.xml within the <variantList></variantList> of the us layout:

        <variant>
          <configItem>
            <name>programmer</name>
            <description>English (US, programmer)</description>
          </configItem>
        </variant>

After next login I can then add the layout in Settings -> Keyboard and use it as any other keyboard layout.

enter image description here

Gabriel avatar
vn flag
Really strange, i tried everything, but it does not work. Reboot etc. Is there anything else needed, it just does not show up in the menu. I added it correctly to the xml.
Gunnar Hjalmarsson avatar
uz flag
@Gabriel: There is nothing else AFAIK. I actually did it successfully on my machine. Where in the menu did you look? You should choose "English (United States)", and then it should be included in the sub menu.
Gabriel avatar
vn flag
strange, it seems I had some issues with spaces not sure, however the thing was buggy, eventually it workes like you explained
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.