Skip to content

Commit

Permalink
--nxagent: Revert previous commit. Allow --keymap=clone #208
Browse files Browse the repository at this point in the history
  • Loading branch information
mviereck committed Dec 26, 2019
1 parent d9dbf55 commit a0c54bb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Project website: https://github.com/mviereck/x11docker

## [Unreleased]
### Changed
- `--nxagent`: Use `keyboard='clone'` for xkb settings.
- `--nxagent --keymap=clone`: Clone xkb settings from host in nxagent.
[(#208)](https://github.com/mviereck/x11docker/issues/208)


Expand Down
11 changes: 9 additions & 2 deletions x11docker
Original file line number Diff line number Diff line change
Expand Up @@ -2979,10 +2979,17 @@ mode=$Screensize
# set keyboard layout
case $Xkblayout in
"") # set layout from host.
Nxagentoptions="$Nxagentoptions,keyboard='clone'"
command -v setxkbmap >/dev/null && {
Nxagentoptions="$Nxagentoptions,keyboard=$(setxkbmap -query | grep rules | awk '{print $2}')/$(setxkbmap -query | grep layout | awk '{print $2}')"
} || note "Could not check your keyboard layout due to missing setxkbmap
If you get mismatching keys, please install setxkbmap.
$Wikipackages"
;;
*) # --keymap
Nxagentoptions="$Nxagentoptions,keyboard='evdev/$Xkblayout'"
case $Xkblayout in
clone) Nxagentoptions="$Nxagentoptions,keyboard='clone'" ;;
*) Nxagentoptions="$Nxagentoptions,keyboard='evdev/$Xkblayout'" ;;
esac
;;
esac

Expand Down

0 comments on commit a0c54bb

Please sign in to comment.