#!/bin/sh 
# \
exec wish "$0" "$@"


#
#	XBindKeys_Show : show the keybinding off xbindkeys
#
#	License: LGPL v2+ (see the file LICENSE)
#	(c)2001-2002 Philippe BROCHARD
#	email : hocwp@free.fr
#

#####################################################################
#  This program is free software; you can redistribute it and/or    #
#  modify it under the terms of the GNU Library General Public      #
#  License as published by the Free Software Foundation; either     #
#  version 2 of the License, or (at your option) any later version. #
#####################################################################


set list [ exec "xbindkeys" "--show" ]


frame .framelst -borderwidth .5c
pack .framelst -side top -expand yes -fill y

scrollbar .scroll -command ".liste yview" -orient vertical
scrollbar .scrollx -command ".liste xview" -orient horizontal
listbox .liste -yscroll ".scroll set" -xscroll ".scrollx set" \
    -setgrid 1 -height 20 -width 50





foreach p [ split $list "\n" ] {
    .liste insert end "$p"
}

button .but0 -text "X key binding\n  for more details see \$HOME/.xbindkeysrc  " \
    -command { exit }


pack .scroll -in .framelst -side right -fill y
pack .scrollx -in .framelst -side bottom -fill x
pack .liste -in .framelst -side left -expand yes -fill both

pack .but0 -side bottom


bind all <KeyPress> { exit }