~ubuntu-branches/ubuntu/lucid/kkbswitch/lucid

« back to all changes in this revision

Viewing changes to kkbswitch.upd/kkbswitch_update_14_icons

  • Committer: Bazaar Package Importer
  • Author(s): Lior Kaplan
  • Date: 2005-09-07 02:01:14 UTC
  • Revision ID: james.westby@ubuntu.com-20050907020114-2wyo9eu21uihq86n
Tags: upstream-1.4.3
ImportĀ upstreamĀ versionĀ 1.4.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# update Icons section
 
4
if [ -z "$DISPLAY" ]; then
 
5
  DISPLAY=":0"
 
6
fi      
 
7
 
 
8
# get group names
 
9
eval $(xkbcomp $DISPLAY - | grep -i 'name\[group[0-9]*\] *=' | sed -e 's/\[/_/;s/]//')
 
10
 
 
11
IFS='='
 
12
while read name value; do
 
13
  loname=$(echo "$name" | tr 'A-Z' 'a-z');
 
14
  case "$loname" in 
 
15
    group[1-4])  
 
16
      groupname=$(eval echo -n \$"name_$loname");
 
17
      if [ -n "$groupname" ]; then
 
18
        echo "$groupname=$value"  
 
19
        echo "# DELETE $name"    
 
20
      else
 
21
        echo "$name=$value"   
 
22
      fi             
 
23
      ;;
 
24
    *)
 
25
      echo "$name=$value"   
 
26
      ;;
 
27
  esac                
 
28
done;
 
29