Your message dated Mon, 16 Aug 2010 02:37:11 +0200
with message-id <[email protected]>
and subject line Re: Bug#593099: /usr/bin/setxkbmap: bash: getting current
keymap
has caused the Debian Bug report #593099,
regarding /usr/bin/setxkbmap: bash: getting current keymap
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
593099: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593099
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: x11-xkb-utils
Version: 7.5+5
Severity: minor
File: /usr/bin/setxkbmap
I'm writing a little bash script that will toggle the keymap. I am currently
using "setxkbmap -print|grep -q $KBD1" to check the current keymap. It's
working fine for this case but I am wondering if there is a command that
returns the current keymap. I've read man pages for setxkbmap, xmodmap, etc
but couldn't find anything.
#!/bin/bash
KBD1=us
KBD2=ca_enhanced
if setxkbmap -print|grep -q $KBD1
then
setxkbmap $KBD2
else
setxkbmap $KBD1
fi
it could be useful that setxkbmap says which one is currently using :
de, fr, us, ca ;;; or customed ...
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages x11-xkb-utils depends on:
ii libc6 2.11.2-2 Embedded GNU C Library: Shared lib
ii libx11-6 2:1.3.3-3 X11 client-side library
ii libxaw7 2:1.0.7-1 X11 Athena Widget library
ii libxkbfile1 1:1.0.6-2 X11 keyboard file manipulation lib
ii libxmu6 2:1.0.5-1 X11 miscellaneous utility library
ii libxt6 1:1.0.7-1 X11 toolkit intrinsics library
ii x11-common 1:7.5+6 X Window System (X.Org) infrastruc
x11-xkb-utils recommends no packages.
x11-xkb-utils suggests no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
On Sun, Aug 15, 2010 at 15:43:26 +0200, yellow wrote:
> I'm writing a little bash script that will toggle the keymap. I am currently
> using "setxkbmap -print|grep -q $KBD1" to check the current keymap. It's
> working fine for this case but I am wondering if there is a command that
> returns the current keymap. I've read man pages for setxkbmap, xmodmap, etc
> but couldn't find anything.
>
>
> #!/bin/bash
>
> KBD1=us
> KBD2=ca_enhanced
>
> if setxkbmap -print|grep -q $KBD1
> then
> setxkbmap $KBD2
> else
> setxkbmap $KBD1
> fi
>
> it could be useful that setxkbmap says which one is currently using :
> de, fr, us, ca ;;; or customed ...
>
You can use xprop -root _XKB_RULES_NAMES to get some hint. It's kind of
broken in the presence of multiple keyboards, each with its own keymap,
and in the presence of customized layouts, though.
I'm not sure what ca_enhanced is supposed to be (it doesn't seem to
exist in current xkb-config), or what the use case for your shell script
is, but note that you can set multiple (up to 4) layouts in one go and
an xkb option to select a key combination to switch between them.
Cheers,
Julien
signature.asc
Description: Digital signature
--- End Message ---