From 5bf670ca3ec6a3ce990c6d76703175ee86456012 Mon Sep 17 00:00:00 2001 From: pascal Date: Sat, 18 Jul 2009 11:48:28 +0000 Subject: compose.sh umbenannt in compose_gui.sh erste Ansätze, um compose_gui zu einem graphischen Frontend von make zu machen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit noch zu tun: • Beschreibungen, eventuell auch Anzahl der Module direkt zu ermitteln statt in dieser Datei einzutragen • eventuell vorhandene Standardauswahl aus .config einlesen git-svn-id: https://svn.neo-layout.org@1943 b9310e46-f624-0410-8ea1-cfbb3a30dc96 --- Compose/compose_gui.sh | 72 +++++++++++++++++++ Compose/eigene_Compose_erstellen/compose.sh | 106 ---------------------------- 2 files changed, 72 insertions(+), 106 deletions(-) create mode 100755 Compose/compose_gui.sh delete mode 100755 Compose/eigene_Compose_erstellen/compose.sh diff --git a/Compose/compose_gui.sh b/Compose/compose_gui.sh new file mode 100755 index 0000000..b0a362c --- /dev/null +++ b/Compose/compose_gui.sh @@ -0,0 +1,72 @@ +#!/bin/sh + +# Anzahl der Compose-Module +anzahl=6 + +m[2]=math # Modul +b[2]="mathematische und physikalische Zeichen (≥ ∉ ℏ ℃)" # Beschreibung +d[2]=math.module # Datei +a[2]=off # Standard-Auswahl + +m[3]=greek +b[3]="griechische Buchstaben (A ἀ)" +d[3]=greek.module +a[3]=off + +m[4]=lang +b[4]="Lautschrift und weitere Sprachen ([neːo] Ɱ ʃ ɐ)" +d[4]=lang.module +a[4]=off + +m[5]=roman +b[5]="römische Zahlen >12 (große Datei!) (1868→ⅿⅾⅽⅽⅽⅼⅹⅴⅰⅰⅰ)" +d[5]=roman.module +a[5]=off + +m[6]=klingon +b[6]="klingonische Zahlen (große Datei!) (1984→wa'SaD Hutvatlh chorghmaH loS)" +d[6]=klingon.module +a[6]=off + + +m[0]=base +d[0]=base.module +auswahl=XCompose_${m[0]} + +m[1]=optional +d[1]=optional.module +#auswahl=${m[0]}\ ${m[1]} # Bei Verwendung einer eigenen (optionalen) Compose das Kommentarzeichen (#) entfernen + + +while [ ! "$module" ] +do + case ${1-" "} in + " ") + module=ausgewählt + ;; + *) + echo Aufruf: compose.sh [-g] [COMPOSEMODULE] + 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) + do + echo -e " ${m[$i]}\t\t${b[$i]}" + done + exit;; + 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]}` +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]}"` +fi +menu=$(echo $menu | sed -e 's/\"//g' | sed -e 's/\ /_/g') + +if [ $menu ] +then + make $auswahl\_$menu + make install + make clean +fi diff --git a/Compose/eigene_Compose_erstellen/compose.sh b/Compose/eigene_Compose_erstellen/compose.sh deleted file mode 100755 index 6b7c9f2..0000000 --- a/Compose/eigene_Compose_erstellen/compose.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/sh - -pfad=../src -g=1 # mit graphischer Menüauswahl (g=1 mit GUI, g=0 ohne GUI ) - -# Anzahl der Compose-Module -anzahl=6 - -m[2]=mathephysik # Modul -b[2]="mathematische und physikalische Zeichen (≥ ∉ ℏ ℃)" # Beschreibung -d[2]=math.module # Datei -a[2]=off # Standard-Auswahl - -m[3]=griechisch -b[3]="griechische Buchstaben (A ἀ)" -d[3]=greek.module -a[3]=off - -m[4]=sprachen -b[4]="Lautschrift und weitere Sprachen ([neːo] Ɱ ʃ ɐ)" -d[4]=lang.module -a[4]=off - -m[5]=roemisch -b[5]="römische Zahlen >12 (große Datei!) (1868→ⅿⅾⅽⅽⅽⅼⅹⅴⅰⅰⅰ)" -d[5]=roman.module -a[5]=off - -m[6]=klingonisch -b[6]="klingonische Zahlen (große Datei!) (1984→wa'SaD Hutvatlh chorghmaH loS)" -d[6]=klingon.module -a[6]=off - - -m[0]=standard -d[0]=base.module -auswahl=${m[0]} - -m[1]=optional -d[1]=optional.module -#auswahl=${m[0]}\ ${m[1]} # Bei Verwendung einer eigenen (optionalen) Compose das Kommentarzeichen (#) entfernen - - -while [ ! "$module" ] -do - case ${1-" "} in - " ") - module=ausgewählt - ;; - --help) - echo Aufruf: compose.sh [-g] [COMPOSEMODULE] - 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) - do - echo -e " ${m[$i]}\t\t${b[$i]}" - done - echo -e \\n\\r" -g Startet nicht das Menü, um dort die Auswahl zu treffen.\\n" - exit;; - -g) shift - g=0 - ;; - ${m[2]}) shift - a[2]=on - auswahl=`echo $auswahl ${m[2]}` - ;; - ${m[3]}) shift - a[3]=on - auswahl=`echo $auswahl ${m[3]}` - ;; - ${m[4]}) shift - a[4]=on - auswahl=`echo $auswahl ${m[4]}` - ;; - ${m[5]}) shift - a[5]=on - auswahl=`echo $auswahl ${m[5]}` - ;; - ${m[6]}) shift - a[6]=on - auswahl=`echo $auswahl ${m[6]}` - ;; - *) echo $1 ist kein bekanntes Compose-Modul von Neo - exit;; - esac -done - -if [ $g = 1 ] -then - 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]}` - else - menu=`zenity --title Compose-Module --width=480 --height=250 --list --multiple --column Modulname --column Modulebeschreibung --hide-column=1 --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]}"` - fi - auswahl=$auswahl\ $menu -fi - -echo -e "# with additional definitions by Neo keyboard\n" > XCompose -cat /usr/share/X11/locale/en_US.UTF-8/Compose >> XCompose -for i in $(seq 0 $anzahl) -do - echo $auswahl | grep ${m[$i]} > /dev/null && cat $pfad/${d[$i]} >> XCompose -done - -echo -e "\n# End of Definitions by Neo keyboard layout" >> XCompose -- cgit v1.2.3