compose_gui.sh liest nun Beschreibungen aus Quell-Dateien – Beschreibungen dafür mit no-break space getrennt

Vorauswahl wird aus .config gelesen und mit kdialog angezeigt (für zenity habe ich dafür keinen Weg gefunden)
This commit is contained in:
pascal 2009-07-18 19:57:12 +00:00
parent 0e3ebf19c1
commit 31c781ced5
7 changed files with 50 additions and 41 deletions

View File

@ -1,40 +1,48 @@
#!/bin/sh
# This file is part of the german Neo keyboard layout
#
# GUI to combine several Compose modules written by Neo keyboard layout
# This file has been originally written by Pascal Hauck (neo@pascalhauck.de)
SRC=./src # Source directory
# Anzahl der Compose-Module
anzahl=6
m[2]=math # name of modul
b[2]="mathematische und physikalische Zeichen (≥ ∉ ℏ ℃)" # description of module
a[2]=off # default value for this module
m[3]=greek
b[3]="griechische Buchstaben (A ἀ)"
a[3]=off
m[4]=lang
b[4]="Lautschrift und weitere Sprachen ([neːo] Ɱ ʃ ɐ)"
a[4]=off
m[5]=roman
b[5]="römische Zahlen >12 (große Datei!) (1868→ⅿ)"
a[5]=off
m[6]=klingon
b[6]="klingonische Zahlen (große Datei!) (1984→wa'SaD Hutvatlh chorghmaH loS)"
a[6]=off
CONFFILE=.config
typeset -i anzahl
m[0]=base
auswahl=XCompose_${m[0]}
auswahl=XCompose_base
for i in src/*.module
do
name=$(basename $i .module) # name of modul
if [ ! "$name" = "base" ]
then
anzahl=anzahl+1
m[$anzahl]=$name
b[$anzahl]=$(sed -n "
/^#configinfo[ \t]*/{
s///
s/^\(.\{10\}\) */\1/
p;q
}
\${
s/.*/ohne Beschreibung/
s/^\(.\{10\}\) */\1/
p
}" $SRC/$name.module) # description of module
if grep -q $name $CONFFILE
then
a[$anzahl]=on # default value for this module
else
a[$anzahl]=off
fi
fi
klist=$klist\ ${m[$anzahl]}\ ${b[$anzahl]}\ ${a[$anzahl]}
glist=$glist\ ${m[$anzahl]}\ ${b[$anzahl]}
done
if [ -f $SRC/optional.module ]
then
m[1]=optional
b[1]=eigene Compose-Datei # for zenity written with a nobreak space
a[1]=on
fi
while [ ! "$module" ]
do
@ -43,10 +51,10 @@ do
module=ausgewählt
;;
*)
echo Aufruf: compose.sh [-g] [COMPOSEMODULE]
echo Aufruf: compose.sh
echo Mit »compose.sh« können die Compose-Module von Neo zusammengesetzt werden.
echo Folgende Module sind verfügbar:
for i in $(seq 2 $anzahl)
for i in $(seq 1 $anzahl)
do
echo -e " ${m[$i]}\t\t${b[$i]}"
done
@ -54,11 +62,12 @@ do
esac
done
if [ $KDE_FULL_SESSION = true ]
then
menu=`kdialog --title Compose-Module --checklist " Wählen Sie die optionalen Compose-Module von Neo aus, die Sie verwenden möchten. " ${m[2]} "${b[2]}" ${a[2]} ${m[3]} "${b[3]}" ${a[3]} ${m[4]} "${b[4]}" ${a[4]} ${m[5]} "${b[5]}" ${a[5]} ${m[6]} "${b[6]}" ${a[6]} ${m[1]} "${b[1]}" ${a[1]}`
menu=`kdialog --title Compose-Module --checklist " Wählen Sie die optionalen Compose-Module von Neo aus, die Sie verwenden möchten. " $klist`
else
menu=`zenity --title Compose-Module --width=480 --height=250 --list --multiple --column Modulname --column Modulebeschreibung --hide-column=1 --separator=_ --text " Wählen Sie die optionalen Compose-Module von Neo aus, die Sie verwenden möchten.\n Für Für mehrere Module STRG bzw. CTRL gedrückt halten. " ${m[2]} "${b[2]}" ${m[3]} "${b[3]}" ${m[4]} "${b[4]}" ${m[5]} "${b[5]}" ${m[6]} "${b[6]}" ${m[1]} ${b[1]}`
menu=`zenity --title Compose-Module --width=480 --height=250 --list --multiple --column Modulname --column Modulebeschreibung --hide-column=1 --separator=_ --text " Wählen Sie die optionalen Compose-Module von Neo aus, die Sie verwenden möchten.\n Für Für mehrere Module STRG bzw. CTRL gedrückt halten. " $glist`
fi
menu=$(echo $menu | sed -e 's/\"//g' | sed -e 's/\ /_/g')

View File

@ -1,4 +1,4 @@
#configinfo Standard-Definitionen (weitgehend auch außerhalb Neo verwendet)
#configinfo Standard-Erweiterung der Compose-Definitionen
# standard Definitions by Neo keyboard layout
# diacritical marks

View File

@ -1,4 +1,4 @@
#configinfo Griechische Buchstaben mit Akzenten
#configinfo Griechische Buchstaben mit Akzenten (A ἀ)
# additional Definitions by Neo keyboard layout - greek letters

View File

@ -6,7 +6,7 @@
# Licence (short name): CC-BY-SA 3.0 DE
# Licence (full name): Creative Commons Namensnennung-Weitergabe unter gleichen Bedingungen 3.0 Deutschland
# Licence-URL: http://creativecommons.org/licenses/by-sa/3.0/de/
#configinfo Klingonische Zahlen 0 bis 3999
#configinfo klingonische Zahlen 0 bis 3999 (1984→wa'SaD Hutvatlh chorghmaH loS)
<Multi_key> <k> <0> <space> : "pagh" # KLINGON NUMERAL 0

View File

@ -1,4 +1,4 @@
#configinfo IPA (international phonetic alphabet)
#configinfo IPA (international phonetic alphabet) und weitere Sprachen ([neːo] Ɱ ʃ ɐ)
# IPA-Compose by aleχ, 2009, CC-BY-SA DE 3.
<Multi_key> <B> <B> : "ʙ" U0299 # LATIN LETTER SMALL CAPITAL B

View File

@ -1,4 +1,4 @@
#configinfo mathematische Sonderzeichen
#configinfo mathematische und physikalische Zeichen (≥ ∉ ℏ ℃)
# additional Definitions by Neo keyboard layout - mathematical symbols

View File

@ -6,7 +6,7 @@
# Licence (short name): CC-BY-SA 3.0 DE
# Licence (full name): Creative Commons Namensnennung-Weitergabe unter gleichen Bedingungen 3.0 Deutschland
# Licence-URL: http://creativecommons.org/licenses/by-sa/3.0/de/
#configinfo römische Zahlen 1 bis 3999
#configinfo römische Zahlen 13 bis 3999 (1868→ⅿ)
<Multi_key> <r> <1> <space> : "" # SMALL ROMAN NUMERAL 1