Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/daemon/client/include/input.client.class

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2039 by niro, Mon Aug 13 11:28:11 2012 UTC revision 2040 by niro, Wed Apr 17 14:17:26 2013 UTC
# Line 53  get_input_keymap() Line 53  get_input_keymap()
53   then   then
54   keymap=$(x11runas "setxkbmap -query" | grep layout | awk '{print $2}')   keymap=$(x11runas "setxkbmap -query" | grep layout | awk '{print $2}')
55   else   else
56   keymap=$(grep "Option.*XkbLayout" ${MROOT}/etc/X11/xorg.conf.d/25-layout.conf \   keymap=$(grep "Option.*XkbLayout" ${MROOT}/etc/X11/xorg.conf.d/00-keyboard.conf \
57   | sed -e 's:\"::' -e 's:.*XkbLayout\(.*\):\1:' -e 's:[\ \t]::g')   | sed -e 's:\"::' -e 's:.*XkbLayout\(.*\):\1:' -e 's:[\ \t]::g')
58   fi   fi
59   rvecho "${keymap}"   rvecho "${keymap}"
# Line 63  get_input_keymap() Line 63  get_input_keymap()
63  set_input_keymap()  set_input_keymap()
64  {  {
65   local value="$1"   local value="$1"
66   local CONFIG="${MROOT}/etc/X11/xorg.conf.d/25-layout.conf"   local CONFIG="${MROOT}/etc/X11/xorg.conf.d/00-keyboard.conf"
67    
68   [[ -z ${value} ]] && help_input_keymap && return 1   [[ -z ${value} ]] && help_input_keymap && return 1
69    
70   clearconfig   # systemd support
71     if [ -x $(type -P localectl) ]
72   addconfig 'Section "InputClass"'   then
73   addconfig ' Identifier "keyboard layout"'   localectl set-x11-keymap "${value}"
74   addconfig ' MatchIsKeyboard "on"'   else
75   addconfig " Option \"XkbLayout\" \"${value}\""   clearconfig
76   addconfig 'EndSection'   addconfig 'Section "InputClass"'
77     addconfig ' Identifier "keyboard layout"'
78     addconfig ' MatchIsKeyboard "on"'
79     addconfig " Option \"XkbLayout\" \"${value}\""
80     addconfig 'EndSection'
81     fi
82    
83   if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]   if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]
84   then   then

Legend:
Removed from v.2039  
changed lines
  Added in v.2040