Re: command line retrieve list of kbd layouts and variants (to use with setxkbmap)

2012-07-27 Thread Giuseppe Penone
Great thank you, just bad that there's not a --help command, it would be
great to parse the output from c code.
Cheers,
Giuseppe.



man xkeyboard-config :)

 Cheers,
   Peter

___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com

Re: command line retrieve list of kbd layouts and variants (to use with setxkbmap)

2012-07-27 Thread Alan Coopersmith
If you're trying to parse them, why not use the original files such as
/usr/share/X11/xkb/rules/base.xml instead of the man page that's generated
from them?The XML  XKB files have a far more reliable format than the
man page, which can change at any time, since we don't expect people to try
to parse it.

-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc

On 07/27/12 04:30 AM, Giuseppe Penone wrote:
 I realize that doing
 
 man -P cat xkeyboard-config
 
 all the output goes to stdout and can be parsed with a script or c code.
 
 Cheers,
 Giuseppe.
 
 
 On Fri, Jul 27, 2012 at 9:24 AM, Giuseppe Penone gius...@gmail.com
 mailto:gius...@gmail.com wrote:
 
 Great thank you, just bad that there's not a --help command, it would be
 great to parse the output from c code.
 Cheers,
 Giuseppe.
 
 
 
 
 man xkeyboard-config :)
 
 Cheers,
   Peter
 
 
 
 
 
 
 ___
 xorg@lists.x.org: X.Org support
 Archives: http://lists.freedesktop.org/archives/xorg
 Info: http://lists.x.org/mailman/listinfo/xorg
 Your subscription address: alan.coopersm...@oracle.com

___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com


Re: command line retrieve list of kbd layouts and variants (to use with setxkbmap)

2012-07-27 Thread Alan Coopersmith
On 07/27/12 08:50 AM, Giuseppe Penone wrote:
 the problem of parsing /usr/share/X11/xkb/rules/base.xml is that the location 
 of
 the file may vary from distribution to distribution
 according to the prefix.

I think /usr/share/X11/xkb/ is fairly common, and newer distros should have
.pc files so you can do one of these:

pkg-config --variable=xkbconfigdir xkbcomp
pkg-config --variable=xkb_base xkeyboard-config

-- 
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com


Re: command line retrieve list of kbd layouts and variants (to use with setxkbmap)

2012-07-27 Thread Giuseppe Penone
this one works on lubuntu 12.04
pkg-config --variable=xkb_base xkeyboard-config
many thanks.
Giuseppe.


On Fri, Jul 27, 2012 at 5:57 PM, Alan Coopersmith 
alan.coopersm...@oracle.com wrote:

 On 07/27/12 08:50 AM, Giuseppe Penone wrote:
  the problem of parsing /usr/share/X11/xkb/rules/base.xml is that the
 location of
  the file may vary from distribution to distribution
  according to the prefix.

 I think /usr/share/X11/xkb/ is fairly common, and newer distros should have
 .pc files so you can do one of these:

 pkg-config --variable=xkbconfigdir xkbcomp
 pkg-config --variable=xkb_base xkeyboard-config

 --
 -Alan Coopersmith-  alan.coopersm...@oracle.com
  Oracle Solaris Engineering - http://blogs.oracle.com/alanc

___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com

Re: command line retrieve list of kbd layouts and variants (to use with setxkbmap)

2012-07-26 Thread Peter Hutterer
On Wed, Jul 25, 2012 at 08:34:00AM +0200, Giuseppe Penone wrote:
 Hi, is there a way from command line to retrieve the list of all available
 keyboard layouts and relative variants?
 
 I need to list all the available layout/variants choices to be used then
 from setxkbmap.
 
 Also about the layout toggle options, is there a way to retrieve a list of
 all available choices
 (e.g. grp:shift_caps_toggle , ...)

man xkeyboard-config :)

Cheers,
  Peter
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com