Skip to content

Commit

Permalink
--nxagent --keymap: allow custom keyboard model like rmlvo #208
Browse files Browse the repository at this point in the history
  • Loading branch information
mviereck committed May 28, 2022
1 parent ad7434d commit adf86cc
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions x11docker
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Run 'x11docker --help' or scroll down to read usage information.
# More documentation at: https://github.com/mviereck/x11docker

Version="7.1.5-beta-10"
Version="7.1.5-beta-11"

# --enforce-i: Enforce running in interactive mode to allow commands tty and weston-launch in special setups.
grep -q -- "--enforce-i" <<< "$*" && case $- in
Expand Down Expand Up @@ -3339,7 +3339,7 @@ create_modelinefile() { # generate a set of smaller modelines for screen
echo "$Newmodelinefile"
}
create_xcommand() { ### create command to start X server and/or Wayland compositor
local Xserveroptions_custom= Xpraoptions= Nxagentoptions= Compositorpid= Weston= Westonoutput= Count= Usemitshm
local Xserveroptions_custom= Xpraoptions= Nxagentoptions= Compositorpid= Weston= Westonoutput= Count= Usemitshm Xkbmodel

Xserveroptions_custom="$Xserveroptions"
Xserveroptions=""
Expand Down Expand Up @@ -3489,6 +3489,12 @@ create_xcommand() { ### create command to start X server and/or Wayl
[ -n "$Dpi" ] && Xserveroptions="$Xserveroptions \\
-dpi $Dpi"

# --keymap
# Regard possible custom keyboard model like rmlvo.
# Inofficial feature, see ticket #208. Currently regarded with --nxagent only.
Xkbmodel="$(cut -d/ -f1 -s <<< "$Xkblayout")"
[ -n "$Xkbmodel" ] && Xkblayout="$(cut -d/ -f2- <<< "$Xkblayout")"
Xkbmodel="${Xkbmodel:-evdev}"

#### xpra server and client command
case "$Xserver" in
Expand Down Expand Up @@ -3778,16 +3784,10 @@ mode=$Screensize
no) Nxagentoptions="$Nxagentoptions,composite=0" ;;
esac

# set keyboard layout
# --keymap: set keyboard layout
case "$Xkblayout" in
"") # set layout from host.
Nxagentoptions="$Nxagentoptions,keyboard=clone" ;;
*) # --keymap
case "$Xkblayout" in
clone) Nxagentoptions="$Nxagentoptions,keyboard=clone" ;;
*) Nxagentoptions="$Nxagentoptions,keyboard=evdev/$Xkblayout" ;;
esac
;;
""|clone) Nxagentoptions="$Nxagentoptions,keyboard=clone" ;;
*) Nxagentoptions="$Nxagentoptions,keyboard=${Xkbmodel}/${Xkblayout}" ;;
esac

Nxagentoptions="${Nxagentoptions}:${Newdisplaynumber}"
Expand Down

0 comments on commit adf86cc

Please sign in to comment.