summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpascal <pascal@b9310e46-f624-0410-8ea1-cfbb3a30dc96>2009-07-18 19:57:12 +0000
committerpascal <pascal@b9310e46-f624-0410-8ea1-cfbb3a30dc96>2009-07-18 19:57:12 +0000
commitc208c3c3e46c4907a4884792683927664b6a168c (patch)
tree1949266ad4bbdf5ac36fbbd9388f0d824f25e334
parente54e9618080e46b94fa1cf3a7f4149c82519334b (diff)
downloadneo-layout-c208c3c3e46c4907a4884792683927664b6a168c.tar.gz
neo-layout-c208c3c3e46c4907a4884792683927664b6a168c.tar.bz2
neo-layout-c208c3c3e46c4907a4884792683927664b6a168c.zip
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) git-svn-id: https://svn.neo-layout.org@1946 b9310e46-f624-0410-8ea1-cfbb3a30dc96
-rwxr-xr-xCompose/compose_gui.sh73
-rw-r--r--Compose/src/base.module2
-rw-r--r--Compose/src/greek.module2
-rw-r--r--Compose/src/klingon.module2
-rw-r--r--Compose/src/lang.module2
-rw-r--r--Compose/src/math.module2
-rw-r--r--Compose/src/roman.module2
7 files changed, 47 insertions, 38 deletions
diff --git a/Compose/compose_gui.sh b/Compose/compose_gui.sh
index a92252f..8358ded 100755
--- a/Compose/compose_gui.sh
+++ b/Compose/compose_gui.sh
@@ -1,40 +1,48 @@
#!/bin/sh
-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
+# 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)
-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
+SRC=./src # Source directory
+CONFFILE=.config
+typeset -i anzahl
-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
+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
+}
-m[0]=base
-auswahl=XCompose_${m[0]}
+\${
+ 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 no‑break 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')
diff --git a/Compose/src/base.module b/Compose/src/base.module
index 706b8dc..62e2380 100644
--- a/Compose/src/base.module
+++ b/Compose/src/base.module
@@ -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
diff --git a/Compose/src/greek.module b/Compose/src/greek.module
index b7c0f00..368fc26 100644
--- a/Compose/src/greek.module
+++ b/Compose/src/greek.module
@@ -1,4 +1,4 @@
-#configinfo Griechische Buchstaben mit Akzenten
+#configinfo Griechische Buchstaben mit Akzenten (A ἀ)
# additional Definitions by Neo keyboard layout - greek letters
diff --git a/Compose/src/klingon.module b/Compose/src/klingon.module
index 2f7f1a8..86fa594 100644
--- a/Compose/src/klingon.module
+++ b/Compose/src/klingon.module
@@ -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
diff --git a/Compose/src/lang.module b/Compose/src/lang.module
index 104bd46..31c4fd2 100644
--- a/Compose/src/lang.module
+++ b/Compose/src/lang.module
@@ -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
diff --git a/Compose/src/math.module b/Compose/src/math.module
index f0538df..f417177 100644
--- a/Compose/src/math.module
+++ b/Compose/src/math.module
@@ -1,4 +1,4 @@
-#configinfo mathematische Sonderzeichen
+#configinfo mathematische und physikalische Zeichen (≥ ∉ ℏ ℃)
# additional Definitions by Neo keyboard layout - mathematical symbols
diff --git a/Compose/src/roman.module b/Compose/src/roman.module
index b5aca2b..4dcb30f 100644
--- a/Compose/src/roman.module
+++ b/Compose/src/roman.module
@@ -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