im-switch-1.23ubuntu1/0000775000000000000000000000000012142137756011567 5ustar im-switch-1.23ubuntu1/debian/0000775000000000000000000000000012142137757013012 5ustar im-switch-1.23ubuntu1/debian/control0000664000000000000000000000240712142137721014407 0ustar Source: im-switch Section: oldlibs Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Osamu Aoki Uploaders: Kenshi Muto Build-Depends: debhelper (>= 7.0.50~) Standards-Version: 3.8.4 Vcs-Git: git://git.debian.org/git/collab-maint/im-switch.git Vcs-browser: http://git.debian.org/?p=collab-maint/im-switch.git Package: im-switch Architecture: all Recommends: x11-common | xfree86-common Depends: ${misc:Depends}, zenity | x-terminal-emulator Suggests: zenity Description: Input method switch framework im-switch provides the framework to configure and to switch the input method on X Window System depending on the locale. This input method is the essential mechanism for Japanese, Chinese and Korean (CJK) language to enter their non-ASCII native characters. . Some input methods such as SCIM support not only one of these CJK languages but support almost all languages simultaneously by dynamically switching keyboard modes with GUI. . By installing this package, the most desirable input method and its backend conversion engine are automatically configured with both XIM or IMmodule mechanism. . You can further customize your input method with 'im-switch' command. im-switch-1.23ubuntu1/debian/prerm0000664000000000000000000000101312142137721014044 0ustar #!/bin/sh set -e ua_remove () { update-alternatives \ --remove xinput-$1 \ /etc/X11/xinit/xinput.d/$2 ; } case "$1" in remove|upgrade|deconfigure) ua_remove all_ALL default ua_remove all_ALL default-xim ua_remove lo_TH lo-gtk ua_remove all_ALL none ua_remove th_TH th-xim ua_remove th_TH th-gtk ;; failed-upgrade) ;; *) echo "prerm called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# exit 0 im-switch-1.23ubuntu1/debian/README.Debian0000664000000000000000000003217212142137721015047 0ustar im-switch for Debian ========================================================================= ! im-switch is deprecated for Wheezy. ! ! Please migrate to im-config ! ========================================================================= If you were using im-switch without much complicated configuration, simply removing im-switch and installing im-config is sufficient. If there are many users on your system, please inform them in advance to run the im-config command to set a new configuration after the transition. This package is kept in this shape only for preventing system upgrade from Squeeze system with dist-upgrade to install im-config automatically. You are given extra time to inform users including yourself. This package will be droped completely for Wheezy+1. If you find any files under the following directories after transitioning to the im-config, you can safely remove them. $HOME/.xinput.d/* /etc/X11/xinit/xinput.d/* -- Osamu Aoki , Wed, 01 Feb 2012 14:18:14 +0000 === OLD CONTENTS as Below === Some contents may be out dated. (GNOME here is GNOME2, Wheezy is GNOME3) ========================================================================= ! im-switch command behaves differently depending on whether command ! ! is executed from root or not. ! ========================================================================= Alternative documents in Japanese and English are available at: http://wiki.debian.org/JapaneseEnvironmentE (English) http://wiki.debian.org/JapaneseEnvironment (Japanese) http://wiki.debian.org/UTF8vimE (English) http://wiki.debian.org/UTF8vim (Japanese) These are focused to use im-switch and UTF-8 locales under etch. ========================================================================= ! Quick Guide ! ========================================================================= GUI menu for "System" -> "Preferences" -> "Input Method Preferences" runs "im-switch" (which is practically "im-switch -c" with pause.). * IBus (under GNOME) - Install all useful IBus packages (use "l" under aptitude to find them.) ibus, ibus-anthy (Japanese), ibus-gtk, ... - "System" -> "Preferences" -> "Input Method Preferences" and select "ibus" - "System" -> "Preferences" -> "IBus Preferences" -> "Input Method" -> "Select an input method" -> "Japanese" -> "Anthy" and click "Add". - Relogin to user account to refresh X session. * uim (under GNOME) - Install all useful uim packages (use "l" under aptitude to find them.) uim, uim-anthy (Japanese), uim-gtk2.0, ... - "System" -> "Preferences" -> "Input Method Preferences" and select "uim" - Add /usr/bin/uim-toolbar-gtk to gnome session start up list. + Pick /usr/bin/uim-toolbar-gtk-systray instead, if you like status display in systray. + Pick /usr/bin/uim-toolbar-qt instead, if you like KDE. - Relogin to user account to refresh X session. FYI: (With the method written in uim package, you can use toolbar under non-gnome environment) * SCIM (under GNOME) - Install all useful scim packages (use "l" under aptitude to find them.) scim, scim-anthy (Japanese), ... - "System" -> "Preferences" -> "Input Method Preferences" and select "scim" - Relogin to user account to refresh X session. * Not to set MODIFIERS to make X act in old en_US way. - select "none" in im-switch command. * Set back to default - run "im-switch -a" in console. - Relogin to user account to refresh X session. * Check IM setting - run "im-switch -l" in console. Please note that selection of IM started by im-switch mechanism depends on the locale value. ========================================================================= ! Trouble shoot ! ========================================================================= Upgrade may leave 90im-switch.dpkg-* in /etc/X11/Xsession.d/. Make sure to install new version and remove old one. If you have any problem, see the first part of ~/.xsession-errors . Somehow, relogin may cause unknown errors. When you check problem with this relogin, please check to see the reboot has the same issue. Please file your bug report with the reportbug program. ========================================================================= ! How im-switch works ! ========================================================================= * The input method under im-switch mechanism: - The first existing configuration from the below list is sourced by the X start up code /etc/X1/Xsesion.d/90im-switch to activate the input method (IM) under ll_CC locale, if no other program has set IM related variables ("$XIM", "$XIM_PROGRAM", "$XIM_ARGS", "$XMODIFIERS", "$GTK_IM_MODULE", "$QT_IM_MODULE", $XIM_PROGRAM_SETS_ITSELF_AS_DAEMON) before this script. $HOME/.xinput.d/ (as link to configuration file) $HOME/.xinput.d/all_ALL (as link to configuration file) /etc/X11/xinit/xinput.d/ (as link to configuration file) /etc/X11/xinit/xinput.d/all_ALL (as link to configuration file) /etc/X11/xinit/xinput.d/default (This always exists as config file) * im-switch commands and their results: - To check input method configuration under im-switch: For system wide configuration, execute from ROOT account: # im-switch -l For user configuration, execute from USER account: $ im-switch -l - To change input method to : For system wide default for current locale, execute from ROOT account: # im-switch -s This changes /etc/alternatives/xinput- if it exists. For system wide default for locale, execute from ROOT account: # im-switch -z -s This changes /etc/alternatives/xinput- if it exists. For user configuration for current locale, execute from USER account: $ im-switch -s This set ~/.xinput.d/xinput- pointing to For user configuration for locale, execute from USER account: $ im-switch -z -s This set ~/.xinput.d/xinput- pointing to - To reset input method to system default: For system wide default for current locale, execute from ROOT account: # im-switch -a This changes /etc/alternatives/xinput- if it exists. For system wide default for locale, execute from ROOT account: # im-switch -z -a This changes /etc/alternatives/xinput- if it exists. For user configuration for current locale, execute from USER account: $ im-switch -a This removes ~/.xinput.d/xinput- For user configuration for locale, execute from USER account: $ im-switch -z -a This removes ~/.xinput.d/xinput- - To configure input method by menu: For system wide default for current locale, execute from ROOT account: # im-switch -c This changes /etc/alternatives/xinput- if it exists. For system wide default for locale, execute from ROOT account: # im-switch -z -c This changes /etc/alternatives/xinput- if it exists. For user configuration for current locale, execute from USER account: $ im-switch -c This set ~/.xinput.d/xinput- For user configuration for locale, execute from USER account: $ im-switch -z -c This set ~/.xinput.d/xinput- Here, is one of the files (not symlinks) located in XINPUT_PATH=/etc/X11/xinit/xinput.d or DOTXINPUT_PATH= ~/.xinput.d/ such as uim-xim, scim, etc.. When quasi-locale value all_ALL is fed to im-switch command through -z, it sets IM configuration for the local without configuration. Please note there is no real locale called all_ALL. ========================================================================= ! Appendix ! ========================================================================= ----------------------------- Support new input method (User info) ----------------------------- If you find out that your input method is not supported under your desired locale , here is how you configure it as a user. Create the IM configuration file as $HOME/.xinput.d/. Run "im-switch -z -s " from the user account. Start X under locale for the user. You can use /etc/X11/xinit/xinput.d/default as the template for the configuration. Some IM such as SCIM requires further manual configuration such as adding locale to the user configuration of the supported locale. If you find out that your input method is not well supported by the Debian package, here is how you configure it as a user to over ride it. Create the IM configuration file as $HOME/.xinput.d/ Run "im-switch -s " (This may be the same name as the system one.) or "im-switch -c" from the user account. Restart X. ----------------------------- Support new input method (System admin info) ----------------------------- If you find out that your input method is not supported by the package using im-switch, you can stillsuport it. Edit the IM configuration file /etc/X11/xinit/xinput.d/default to support your IM. Run "sudo im-switch -s default" under used locales on the system. If you want to set SCIM as the system default for all locale, here is how you configure it. Run "sudo im-switch -z all_ALL -s scim". Restart X. Some IM such as SCIM requires further manual configuration such as adding locale to the system configuration of the supported locale. uim can be made default in similar way. ----------------------------- Support new input method (Developer info) ----------------------------- (Following information is intended for the package developer. If particular input method package lacks proper support for im-switch, running equivalent commands from root account should provide workaround.) Each input method deb should provide alternative for the relevant locale such as (example from uim): [postinst] 8X------------------------------------------------------X8 #! /bin/sh set -e ua_inst () { update-alternatives \ --install /etc/X11/xinit/xinput.d/$1 xinput-$1 \ /etc/X11/xinit/xinput.d/$2 $3 ; } case "$1" in configure) # Set up default ua_inst all_ALL uim 0 ua_inst ja_JP uim 50 ua_inst ko_KR uim 50 ua_inst zh_CN uim 50 ua_inst zh_TW uim 50 ua_inst zh_HK uim 50 ua_inst zh_SG uim 50 ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# exit 0 8X------------------------------------------------------X8 [prerm] 8X------------------------------------------------------X8 #!/bin/sh set -e ua_remove () { update-alternatives \ --remove xinput-$1 \ /etc/X11/xinit/xinput.d/$2 ; } case "$1" in remove|upgrade|deconfigure) ua_remove all_ALL uim ua_remove ja_JP uim ua_remove ko_KR uim ua_remove zh_CN uim ua_remove zh_TW uim ua_remove zh_HK uim ua_remove zh_SG uim ;; failed-upgrade) ;; *) echo "prerm called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# exit 0 8X------------------------------------------------------X8 And add 'Recommends: im-switch' (or Suggests:). Note on values: (all_ALL is quasi-local value for fall back) Osamu thinks followings are good values for priority: (May 2006) 0 none 0 scim (SCIM under all_ALL) 0 scim-immodule (for all_ALL and others) 0 uim (uim under all_ALL) 0 default-xim (Use GTK_IM_MODULE=xim for all_ALL) 10 default 20 th-xim (any old XIM based methods) (For xim based non-CJK IM configuration, please send us more data.) 50 scim (SCIM under CJK language locales: ja_JP, ...) 50 uim (uim with toolbar under CJK language locales: ja_JP, ...) (All modern language specific input method for each locale) Do not try to change update-alternatives value from multiple packages unless it is very well cordinated between related packages. -- Kenshi Muto , Sun, 13 Feb 2005 21:12:00 +0900 -- Osamu Aoki , Mon, 24 Dec 2007 22:49:40 +0900 To some SCIM packages (in Ubunts) If you need to make package like SCIM to chose between * GTK_IM_MODULE=xim * GTK_IM_MODULE=SCIM during install time, the best approach is to let the main scim package to offer debconf choices. The file: /etc/defaults/scim is good place to keep that results. Then you can adopt new script for scim to use such value and drop scim-immodule. After all the im-switch configuration files are sourced by the shell. I understand this im-switch is too complicated for the purpose. -- Osamu Aoki , Mon, 24 Dec 2007 22:49:40 +0900 im-switch-1.23ubuntu1/debian/source/0000775000000000000000000000000012142137756014311 5ustar im-switch-1.23ubuntu1/debian/source/format0000664000000000000000000000001612142137721015511 0ustar 3.0 (native) im-switch-1.23ubuntu1/debian/install0000664000000000000000000000031412142137721014370 0ustar im-switch usr/bin build/im-switch usr/lib/im-switch im-switch.desktop usr/share/applications 80im-switch etc/X11/Xsession.d xinput.d/* etc/X11/xinit/xinput.d lintian/im-switch usr/share/lintian/overrides im-switch-1.23ubuntu1/debian/dirs0000664000000000000000000000010612142137721013662 0ustar usr/bin etc/X11/xinit/xinput.d etc/X11/Xsession.d usr/share/im-switch im-switch-1.23ubuntu1/debian/rules0000775000000000000000000000042612142137721014063 0ustar #!/usr/bin/make -f %: dh $@ override_dh_auto_build: mkdir -p build sed -e "s/@@VERSION@@/$$(dpkg-parsechangelog --format dpkg|sed -ne '/^Version/s/Version: *//p')/"\ build/im-switch chmod 755 build/im-switch override_dh_auto_clean: -rm -rf build/ im-switch-1.23ubuntu1/debian/manpages0000664000000000000000000000001412142137721014512 0ustar im-switch.8 im-switch-1.23ubuntu1/debian/compat0000664000000000000000000000000212142137721014177 0ustar 7 im-switch-1.23ubuntu1/debian/menu0000664000000000000000000000022112142137721013663 0ustar ?package(im-switch):needs="text" section="Applications/System/Language Environment"\ title="Input Method Swicher" command="/usr/bin/im-switch" im-switch-1.23ubuntu1/debian/changelog0000664000000000000000000003260712142137736014671 0ustar im-switch (1.23ubuntu1) saucy; urgency=low * Merge from Debian unstable. Remaining changes: - handle missing zenity better (LP: #1071690) - im-switch.in: add check for zenity existance - im-switch: add wrapper script starting in terminal if called from the menu without zenity - im-switch.desktop: call wrapper scrict - debian/control: depend on zenity | x-terminal-emulator - im-switch.in: - replace "imput" with "input" line 380 (LP: #621204). - 80im-switch: - Delay the start of an input method framework with 10 seconds to increase the chances that its icon (e.g. an iBus icon) is shown in Unity's menu bar (LP: #875435). - im-switch.desktop: - Dont show the menu item on LXDE as the GUI is handled by language-selector-gnome (LP: #1041941). - Suggest not Depend on zenity, graphical functions are handled by language-selector in Ubuntu and this brings in lots of unnecessary nits into Kubuntu -- Vibhav Pant Tue, 30 Apr 2013 17:18:31 +0530 im-switch (1.23) unstable; urgency=low * Disable hook script if package is removed. Closes: #701181 -- Osamu Aoki Fri, 22 Feb 2013 22:46:40 +0900 im-switch (1.22ubuntu6) raring; urgency=low * 80im-switch: - A line added to prevent that 80im-switch is sourced if the package has been removed but not purged (LP: #1101836). -- Gunnar Hjalmarsson Sat, 23 Feb 2013 04:27:00 +0100 im-switch (1.22ubuntu5) raring; urgency=low * handle missing zenity better (LP: #1071690) - im-switch.in: add check for zenity existance - im-switch: add wrapper script starting in terminal if called from the menu without zenity - im-switch.desktop: call wrapper script - debian/control: depend on zenity | x-terminal-emulator -- Julian Taylor Sun, 16 Dec 2012 14:35:06 +0100 im-switch (1.22ubuntu4) raring; urgency=low * im-switch.in: - replace "imput" with "input" line 380 (LP: #621204). -- Mohamed Alaa Thu, 04 Oct 2012 17:33:52 +0300 im-switch (1.22ubuntu3) raring; urgency=low * 80im-switch: - Delay the start of an input method framework with 10 seconds to increase the chances that its icon (e.g. an iBus icon) is shown in Unity's menu bar (LP: #875435). Thanks to Aron Xu for reviewing and improving the patch! -- Gunnar Hjalmarsson Tue, 30 Oct 2012 19:06:00 +0100 im-switch (1.22ubuntu2) quantal; urgency=low * im-switch.desktop: - Dont show the menu item on LXDE as the GUI is handled by language-selector-gnome (LP: #1041941). -- Julien Lavergne Fri, 07 Sep 2012 21:06:27 +0200 im-switch (1.22ubuntu1) quantal; urgency=low * Merge from Debian Unstable (LP: #1019262). Remaining Changes: - im-switch.desktop: - Dont show the menu item on KDE as the GUI is handled by language-selector-kde. - Suggest not Depend on zenity, graphical functions are handled by language-selector in Ubuntu and this brings in lots of unnecessary nits into Kubuntu -- Vibhav Pant Fri, 29 Jun 2012 18:04:21 +0530 im-switch (1.22) unstable; urgency=low * Update README.Debian and move section to oldlibs. -- Osamu Aoki Wed, 01 Feb 2012 23:21:58 +0900 im-switch (1.21) unstable; urgency=low * Updated README.Debian for Wheezy to indicate this is deprecated and recommended to use im-config instead. Closes: #650062, 649188 -- Osamu Aoki Wed, 07 Dec 2011 23:57:36 +0900 im-switch (1.20ubuntu5) oneiric; urgency=low * 80im-switch and im-switch.in: - Reverse of changes in version 1.20ubuntu4. This is not a functional change, considering other related changes in gdm and language-selector (LP: #786986). -- Gunnar Hjalmarsson Tue, 07 Jun 2011 07:37:16 +0200 im-switch (1.20ubuntu4) oneiric; urgency=low * 80im-switch and im-switch.in: - Replace occurrences of LC_CTYPE with LC_MESSAGES, since the latter unlike LC_CTYPE represents the current language in Ubuntu. That way e.g. the ibus daemon will start automatically at session startup if the current language is mapped to ibus (LP: #663776). -- Gunnar Hjalmarsson Fri, 20 May 2011 01:50:00 +0200 im-switch (1.20ubuntu3) natty; urgency=low * im-switch.desktop: - Don't show the menu item on KDE as the GUI is handled by language-selector-kde. -- Felix Geyer Sat, 12 Mar 2011 11:58:41 +0100 im-switch (1.20ubuntu2) maverick; urgency=low * Suggest not Depend on zenity, graphical functions are handled by language-selector in Ubuntu and this brings in lots of unnecessary bits into Kubuntu -- Jonathan Riddell Thu, 09 Sep 2010 17:22:30 +0100 im-switch (1.20ubuntu1) maverick; urgency=low * im-switch.desktop: - Don't show the capplet in GNOME, it is accessed from the keyboard indicator (LP: #613081) -- Robert Ancell Fri, 27 Aug 2010 16:39:16 +1000 im-switch (1.20) unstable; urgency=low * Updated README.Debian for IBus. * Updated im-switch for Debian menu and Freedesktop.org menu. Closes: #586262 * Updated to use GUI interface for menu under X using zenity. -- Osamu Aoki Tue, 22 Jun 2010 21:55:57 +0900 im-switch (1.19) unstable; urgency=low * Swiched to rules.tiny. * Added ${misc:Depends}. * Updated im-switch(8) to address confusion over all_ALL. (My best effort answer to issues raised by #513242) -- Osamu Aoki Thu, 10 Dec 2009 19:53:29 +0900 im-switch (1.18) unstable; urgency=low * Reorganized files and converted debian/rules to a simple one. * Fixed lintian warnings: W dh-clean-k-is-deprecated W package-lacks-versioned-build-depends-on-debhelper W menu-item-uses-apps-section /usr/share/menu/im-switch:2 W menu-item-creates-new-section Apps/Tools/usr/share/menu/im-switch:2 * Set lintian overrides for: W package-contains-empty-directory usr/share/im-switch/ -- Osamu Aoki Sun, 06 Dec 2009 21:53:06 +0900 im-switch (1.17) unstable; urgency=low * Swiched Maintainer and Uploaders. * Fixed lintian warnings and error: debian-rules-ignores-make-clean-error binary-arch-rules-but-pkg-is-arch-indep package-uses-deprecated-debhelper-compat-version ancient-standards-version copyright-lists-upstream-authors-with-dh_make-boilerplate * Added md5sum of the /etc/X11/Xsession.d/90im-switch conffile in version 1.3 (dapper version) in the postinst script, so that if this file is unmodified, it will be deleted during dapper-to-hardy upgrade from 1.16ubuntu1 (LP: #176660) * Fixed s/UIM/uim/g. Closes: Bug#405448 * Added Thai-Lao GTK+ stock immodule support and created xinput.d/ directory separate from sample/. Closes: Bug#426883 * Published source in git at alioth. -- Osamu Aoki Sun, 29 Nov 2009 23:38:32 +0900 im-switch (1.16) unstable; urgency=low * Corrected the changelog in 1.15 from "45742" to "457421" and from 2 "loww" to "low". (closes: Bug#457421) * Updated README.Debian. -- Osamu Aoki Mon, 24 Dec 2007 23:35:17 +0900 im-switch (1.15) unstable; urgency=low * To fix Bug #431294 for SCIM, new variable is introduced to control im-switch behavior: $XIM_PROGRAM_SETS_ITSELF_AS_DAEMON * Fixed display of "*" for current selection of ~/.xinput.d/* . * Added default-xim by Teemu Likonen (closes: Bug#457421) -- Osamu Aoki Sat, 22 Dec 2007 23:23:50 +0900 im-switch (1.14) unstable; urgency=low * Add pointer to wiki page. -- Osamu Aoki Mon, 1 Jan 2007 01:15:50 +0900 im-switch (1.13) unstable; urgency=low * Remove old 901m-switch script. (closes: Bug#400877) * Update README.Debian for uim. -- Osamu Aoki Thu, 30 Nov 2006 00:00:40 +0900 im-switch (1.12) unstable; urgency=low * Address gtk.immodules isues with gpg-agent by starting im-switch at /etc/X11/Xsession.d/80im-switch (closes: #375974) -- Osamu Aoki Wed, 8 Nov 2006 00:25:20 +0900 im-switch (1.11) unstable; urgency=low * Better display im-switch -c in user mode. * Run hook script even if some IM related environment values were set per discussion on http://bugs.debian.org/349397 . -- Osamu Aoki Sun, 21 May 2006 03:30:01 +0900 im-switch (1.10) unstable; urgency=low * When setting IM as root for the locale without im-switch alternative, the quasi-locale all_ALL is automatically assumed as good fall-back. * Trouble shoot guide. -- Osamu Aoki Sat, 20 May 2006 06:57:44 +0900 im-switch (1.9) unstable; urgency=low * Make sure to exit TRUE even if all IM parameters are NULL when executing /etc/X11/Xsession.d/90im-switch. -- Osamu Aoki Fri, 19 May 2006 15:41:53 +0900 im-switch (1.8) unstable; urgency=low * Ensured to run even if locale is null string. (closes:#367880) * Fixed errors in uim, scim examples missing quotation. * Fixed errors handling and typo in /etc/X11/Xsession.d/90im-switch. -- Osamu Aoki Fri, 19 May 2006 05:04:03 +0900 im-switch (1.7) unstable; urgency=low * Added -a in /etc/X11/Xsession.d/90im-switch. (closes:#367613) -- Osamu Aoki Wed, 17 May 2006 05:35:12 +0900 im-switch (1.6) unstable; urgency=low * Avoided filling up alternatives by using all_ALL. * Provided mechanism to start an extra program after the XIM_PROGRAM execution with XIM_PROGRAM_XTRA parameter to help uim. * Updated documentation and examples. -- Osamu Aoki Tue, 16 May 2006 08:16:21 +0900 im-switch (1.5) unstable; urgency=low * Osamu Aoki becomes co-maintainer and made following changes. * Fixed dependency check (closes: #349398) * Cleaned up and enhanced code for im-switch - Added -c -v options. - Substituted perl script with shell script and removed external dependency to libapt-pkg-perl . * Lowered evaluation priority of user specific default script. * System wide default and none scripts are installed as fallback for all locales. * Use /bin/sh instead of /bin/bash * Updated README.Debian. -- Osamu Aoki Sun, 14 May 2006 05:29:05 +0900 im-switch (1.4) unstable; urgency=low * Apply a fallback routine for Thai locale, contributed by Michael Vogt. - debian/rules, sample/th-xim: - Provide Thai XIM configuration. - debian/postinst, debian/prerm: - Add/remove xinput-th_TH alternative as lowest priority config for th_TH locale. * Add dependency to x11-common. * Modify im-switch to show current user's choice when -l option is defined. -- Kenshi Muto Wed, 29 Mar 2006 23:49:48 +0900 im-switch (1.3) unstable; urgency=low * Fix minor typo in help message. * Modify /etc/X11/90im-switch to respect user's environment values around input methods. (closes: #335453, #328222) -- Kenshi Muto Wed, 13 Jul 2005 03:09:30 +0900 im-switch (1.2) unstable; urgency=low * Modify dependscheck.pl to check libapt-pkg-perl before running. * Needs -xim instead of +xim for kinput2. * Replace bashism (xinput.sh). (closes: #316243) -- Kenshi Muto Fri, 17 Jun 2005 11:58:42 +0900 im-switch (1.1) unstable; urgency=low * Downgrade xfree86-common dependency to Recommends, because uim may run without X. -- Kenshi Muto Thu, 16 Jun 2005 20:59:09 +0900 im-switch (1.0) unstable; urgency=low * Bump up to 1.0, Initial release for Debian. (closes: #311859) -- Kenshi Muto Sun, 5 Jun 2005 23:07:32 +0900 im-switch (0.8) unstable-mtu; urgency=low * Support QT_IM_MODULE. (Although current Debian Qt package doesn't support this feature.) * Add Debian specific version number to im-switch script. -- Kenshi Muto Wed, 23 Feb 2005 22:03:38 +0900 im-switch (0.7) unstable-mtu; urgency=low * Fix script typo. -- Kenshi Muto Tue, 15 Feb 2005 20:25:14 +0900 im-switch (0.6) unstable-mtu; urgency=low * Add hook routine. You can locate your own IM hook on /usr/lib/im-switch. Hook will be called with "install" (when it is chosen) or "remove" (when it is changed from default) im-switch just call hook. Such as uid check is the work of script. -- Kenshi Muto Tue, 15 Feb 2005 16:57:41 +0900 im-switch (0.5) unstable-mtu; urgency=low * Update sample files. -- Kenshi Muto Mon, 14 Feb 2005 23:37:43 +0900 im-switch (0.4) unstable-mtu; urgency=low * From now, im-switch is managed on Subversion. Commiters: Kenshi Muto, Akira TAGOH, and Masanori GOTO. * Kenshi Muto - Use full path for XIM_PROGRAM. - Add dependscheck.pl to check dependency. -- Kenshi Muto Mon, 14 Feb 2005 13:38:17 +0900 im-switch (0.3) unstable-mtu; urgency=low * Fix alternative path. -- Kenshi Muto Mon, 14 Feb 2005 00:44:15 +0900 im-switch (0.2) unstable-mtu; urgency=low * Add empty input method configuration file ('none'). -- Kenshi Muto Mon, 14 Feb 2005 00:27:54 +0900 im-switch (0.1-1) unstable-mtu; urgency=low * Initial Release. -- Kenshi Muto Sun, 13 Feb 2005 21:12:00 +0900 im-switch-1.23ubuntu1/debian/copyright0000664000000000000000000000117112142137721014734 0ustar This package was debianized by Kenshi Muto on Sun, 13 Feb 2005 21:12:00 +0900. This package is Debian specific package. Copyright: 2005 Kenshi Muto Upstream Authors: Kenshi Muto . xinput.sh and im-switch is derrived from FedoraCore. # Copyright (C) 1999 - 2004 Red Hat, Inc. All rights reserved. This # copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the # GNU General Public License version 2. License: GNU General Public License version 2. See /usr/share/common-licenses/GPL-2 for the full license. im-switch-1.23ubuntu1/debian/postinst0000664000000000000000000000256512142137721014617 0ustar #!/bin/sh set -e ua_inst () { update-alternatives \ --install /etc/X11/xinit/xinput.d/$1 xinput-$1 \ /etc/X11/xinit/xinput.d/$2 $3 ; } # fix for 90im-switch -> 80im-switch transition. (After 1.13) # If old version exists, clean it up. if [ -f /etc/X11/Xsession.d/90im-switch ]; then case `md5sum /etc/X11/Xsession.d/90im-switch|sed 's/ .*$//'` in # md5sum for previous releases 0555954437ad61fe51850fae0a89378d |\ 58e24e5a127a953e05a0bed82b943700 |\ cb724d4db7f531b50c218007a2b9d7f2 |\ fac350767f9316f0ceb65b7da9638f5f |\ 9711c96cdaf57a74f36793c30e964537 |\ 012637550e0bfbdf83f703474acccea2 |\ acb685ae9264be3fc1800f98a70b12bb ) rm -f /etc/X11/Xsession.d/90im-switch ;; * ) echo You have customized /etc/X11/Xsession.d/90im-switch file echo with its md5sum = `md5sum /etc/X11/Xsession.d/90im-switch|sed 's/ .*$//'`. echo Please remove it or move it up to 80im-switch. ;; esac fi case "$1" in configure) # Set up default ua_inst all_ALL default 10 ua_inst all_ALL default-xim 0 ua_inst lo_TH lo-gtk 10 ua_inst all_ALL none 0 ua_inst th_TH th-xim 20 ua_inst th_TH th-gtk 10 ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# exit 0 im-switch-1.23ubuntu1/lintian/0000775000000000000000000000000012142137756013225 5ustar im-switch-1.23ubuntu1/lintian/im-switch0000664000000000000000000000006312142137721015043 0ustar im-switch binary: package-contains-empty-directory im-switch-1.23ubuntu1/80im-switch0000775000000000000000000000453012142137721013563 0ustar #!/bin/sh # Copyright (C) 2005 Kenshi Muto # Modified for Debian package. # Copyright (C) 1999 - 2004 Red Hat, Inc. All rights reserved. This # copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the # GNU General Public License version 2. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # X Input method setup script [ -x /usr/bin/im-switch ] || return 0 # Keep original values related to IM _XIM=$XIM _XIM_PROGRAM=$XIM_PROGRAM _XIM_ARGS=$XIM_ARGS _XMODIFIERS=$XMODIFIERS _GTK_IM_MODULE=$GTK_IM_MODULE _QT_IM_MODULE=$QT_IM_MODULE # $LNG is locale _ without . and .@EURO LNG=${LC_ALL:-${LC_CTYPE:-${LANG}}} LNG=${LNG%@*} LNG=${LNG%.*} [ -z "$LNG" ] && LNG="all_ALL" || true echo "Setting IM through im-switch for locale=$LNG." # Source first found configuration under $LNG locale for f in "$HOME/.xinput.d/${LNG}" \ "$HOME/.xinput.d/all_ALL" \ "/etc/X11/xinit/xinput.d/${LNG}" \ "/etc/X11/xinit/xinput.d/all_ALL" \ "/etc/X11/xinit/xinput.d/default" ; do if [ -f "$f" -a -r "$f" ]; then echo "Start IM through $f linked to $(readlink -f $f)." . "$f" break fi done unset LNG # Revibe IM related environment if other values were set. [ "$_XIM" ] && XIM=$_XIM || true [ "$_XIM_PROGRAM" ] && XIM_PROGRAM=$_XIM_PROGRAM || true [ "$_XIM_ARGS" ] && XIM_ARGS=$_XIM_ARGS || true [ "$_XMODIFIERS" ] && XMODIFIERS=$_XMODIFIERS ||true [ "$_GTK_IM_MODULE" ] && GTK_IM_MODULE=$_GTK_IM_MODULE || true [ "$_QT_IM_MODULE" ] && QT_IM_MODULE=$_QT_IM_MODULE || true [ -n "$GTK_IM_MODULE" ] && export GTK_IM_MODULE || true [ -n "$QT_IM_MODULE" ] && export QT_IM_MODULE || true # setup XMODIFIERS [ -z "$XMODIFIERS" -a -n "$XIM" ] && XMODIFIERS="@im=$XIM" || true [ -n "$XMODIFIERS" ] && export XMODIFIERS || true # execute XIM_PROGRAM if [ -n "$XIM_PROGRAM" -a -x "$XIM_PROGRAM" ]; then if [ -z "$XIM_PROGRAM_SETS_ITSELF_AS_DAEMON" ]; then { sleep 10 eval "$XIM_PROGRAM $XIM_ARGS &" || true } & else { sleep 10 eval "$XIM_PROGRAM $XIM_ARGS" || true } & fi fi # execute XIM_PROGRAM_XTRA [ -n "$XIM_PROGRAM_XTRA" ] && eval "$XIM_PROGRAM_XTRA &" || true im-switch-1.23ubuntu1/sample/0000775000000000000000000000000012142137756013050 5ustar im-switch-1.23ubuntu1/sample/README0000664000000000000000000000015412142137721013720 0ustar These files in this directory are provided as a guide for IM package maintainers only. These are not used. im-switch-1.23ubuntu1/sample/uim-systray0000664000000000000000000000053012142137721015267 0ustar XIM=uim XIM_PROGRAM=/usr/bin/uim-xim XIM_ARGS= GTK_IM_MODULE=uim QT_IM_MODULE=uim # For gnome, it is better to use its own strat up code to start systray program # Below is included as not-so-good example :) XIM_PROGRAM_XTRA=/usr/bin/uim-toolbar-gtk-systray DEPENDS="uim-xim,uim-gtk2.0|uim-qt,uim-anthy|uim-canna|uim-prime|uim-skk|uim-m17nlib" im-switch-1.23ubuntu1/sample/scim0000664000000000000000000000160212142137721013715 0ustar # # Following choice scripts are disabled in line with Ming's Documentation. # ##scim_bridge="/usr/lib/gtk-2.0/2.4.0/immodules/im-scim-bridge.so" ##im_scim="/usr/lib/gtk-2.0/2.4.0/immodules/im-scim.so" ##libqscim="/usr/lib/qt3/plugins/inputmethods/libqscim.so" ## ##if [ -e "$scim_bridge" ]; then ## gtkim="scim-bridge" ##elif [ -e "$im_scim" ]; then ## gtkim="scim" ##else ## gtkim="xim" ##fi ## ##if [ -e "$libqscim" ]; then ## qtim="scim" ##else ## qtim="xim" ##fi # Use safe default. You can menu select IM default anyway. gtkim="xim" qtim="xim" XIM=SCIM XIM_PROGRAM=/usr/bin/scim XIM_ARGS="-d" GTK_IM_MODULE="$gtkim" QT_IM_MODULE="$qtim" XIM_PROGRAM_SETS_ITSELF_AS_DAEMON=YES DEPENDS="scim,scim-gtk2-immodule,scim-anthy|scim-canna|scim-chewing|scim-pynyin|scim-hangle|scim-prime|scim-skk|scim-tables-additional|scim-m17n|scim-uim|scim-tables-ja|scim-tables-ko|scim-tables-zh" im-switch-1.23ubuntu1/sample/kinput2-canna-wnn_wnn0000664000000000000000000000016512142137721017121 0ustar XIM=kinput2 XIM_PROGRAM=/usr/X11R6/bin/kinput2-canna-wnn XIM_ARGS="-wnn -xim" GTK_IM_MODULE= DEPENDS=freewnn-jserver im-switch-1.23ubuntu1/sample/kinput2-canna_canna0000664000000000000000000000013412142137721016573 0ustar XIM=kinput2 XIM_PROGRAM=/usr/X11R6/bin/kinput2-canna XIM_ARGS= GTK_IM_MODULE= DEPENDS=canna im-switch-1.23ubuntu1/sample/kinput2-canna-wnn_canna0000664000000000000000000000015512142137721017376 0ustar XIM=kinput2 XIM_PROGRAM=/usr/X11R6/bin/kinput2-canna-wnn XIM_ARGS="-canna -xim" GTK_IM_MODULE= DEPENDS=canna im-switch-1.23ubuntu1/sample/iiimf_atokx20000664000000000000000000000042112142137721015345 0ustar XIM=htt XIM_PROGRAM=/usr/bin/httx XIM_ARGS="-if atokx2 -xim htt_xbe" GTK_IM_MODULE=iiim DEPENDS=atokx2 HTT_DISABLE_STATUS_WINDOW=t HTT_GENERATES_KANAKEY=t HTT_USES_LINUX_XKEYSYM=t export HTT_DISABLE_STATUS_WINDOW export HTT_GENERATES_KANAKEY export HTT_USES_LINUX_XKEYSYM im-switch-1.23ubuntu1/sample/skkinput0000664000000000000000000000015312142137721014632 0ustar XIM=skkinput XIM_PROGRAM=skkinput XIM_ARGS= GTK_IM_MODULE= DEPENDS="skkserv|dbskkd-cdb|skksearch|rskkserv" im-switch-1.23ubuntu1/sample/uim-toolbar0000664000000000000000000000052012142137721015212 0ustar XIM=uim XIM_PROGRAM=/usr/bin/uim-xim XIM_ARGS= GTK_IM_MODULE=uim QT_IM_MODULE=uim # For gnome, it is better to use its own strat up code to start toolbar program # Below is included as not-so-good example :) XIM_PROGRAM_XTRA=/usr/bin/uim-toolbar-gtk DEPENDS="uim-xim,uim-gtk2.0|uim-qt,uim-anthy|uim-canna|uim-prime|uim-skk|uim-m17nlib" im-switch-1.23ubuntu1/sample/kinput2-canna0000664000000000000000000000014212142137721015432 0ustar XIM=kinput2 XIM_PROGRAM=/usr/X11R6/bin/kinput2-canna XIM_ARGS="-xim" GTK_IM_MODULE= DEPENDS=canna im-switch-1.23ubuntu1/sample/uim0000664000000000000000000000046412142137721013561 0ustar XIM=uim XIM_PROGRAM=/usr/bin/uim-xim XIM_ARGS= GTK_IM_MODULE=uim QT_IM_MODULE=uim # Use this configuration always with im-switch # Start GUI indicator programs (toolbar/sysstray,..) with session manager. XIM_PROGRAM_XTRA= DEPENDS="uim-xim,uim-gtk2.0|uim-qt,uim-anthy|uim-canna|uim-prime|uim-skk|uim-m17nlib" im-switch-1.23ubuntu1/im-switch.desktop0000664000000000000000000000113312142137721015054 0ustar [Desktop Entry] Name=Input Method Switcher Name[ja]=入力メソッド切換器 Name[zh_TW]=輸入法切換器 Name[zh_HK]=輸入法切換器 Name[zh_CN]=输入法切换器 Name[vi_VN]=Trình chuyển cách nhập liệu Comment=Set Keyboard Input Method Comment[ja]=キーボード入力メソッドの設定 Comment[zh_TW]=設定鍵盤輸入模式 Comment[zh_HK]=設定鍵盤輸入模式 Comment[zh_CN]=设定键盘输入模式 Comment[vi_VN]=Chọn kiểu nhập bàn phím Type=Application Exec=im-switch --from-menu Terminal=false Icon=input-keyboard Categories=Settings NotShowIn=GNOME;KDE;LXDE; im-switch-1.23ubuntu1/im-switch.80000664000000000000000000000513712142137736013570 0ustar .TH IM\-SWITCH 8 .\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection .\" other parms are allowed: see man(7), man(1) .SH NAME im\-switch \- set up input method for X Window .SH SYNOPSIS .B .B im\-switch [\-v][\-z ll_CC] \-s inputmethodname .TP .B im\-switch [\-v][\-z ll_CC] \-c .TP .B im\-switch [\-v][\-z ll_CC] \-a .TP .B im\-switch [\-v][\-z ll_CC] \-l .TP .B im\-switch \-h .TP .B im\-switch .SH "DESCRIPTION" This manual page very briefly documents the .B im\-switch command. .PP The .B im\-switch command provides the framework to configure and to switch the input method on X Window System depending on the locale. This input method is the essential mechanism for Japanese, Chinese and Korean (CJK) languages to enter their non-ASCII native characters. .PP Some input methods such as IBus, SCIM, and uim support not only one of these CJK languages but support almost all languages simultaneously by dynamically switching keyboard modes with GUI. .PP The most desirable input method is provided as the configurable system wide default using Debian alternatives mechanism with .B /etc/alternatives/xinput-ll_CC link. .PP The X start up code sources .B /etc/X11/Xsession.d/90im-switch which read the configuration file and activates the input method. The user configuration files and links are located in .B ~/.xinput.d/ . The system configuration files and links are located in .B /etc/X11/xinit/xinput.d/ . .PP This structure ensures to have different input methods to be installed side-by-side. .PP .B im\-switch understands the following options: .TP .BR \-v Display verbose message during execution. .TP .BR \-z " ll_CC" Set up the input method for X run under .B ll_CC locale (ISO 639 / ISO 3188). When changing the fallback default for all locales, use .B all_ALL as the quasi-locale value here. The setup by this .B all_ALL does not override specific setups. .TP .BR \-s " inputmethodname" Set up the input method to use inputmethodname. .TP .BR \-c Configure the input method with menu. (Under X, this uses GUI.) .TP .BR \-a Reset the input method to the system default. .TP .BR \-l List the input method configuration. .TP .BR \-h Print a help message to the standard output and exit. .PP When the .B im\-switch command is invoked without any command arguments, it functions as .BR \-c option case. This is meant to be used by the GUI menu. .SH "SEE ALSO" .BR update\-alternatives (8) .BR /usr/share/doc/im\-switch/README.Debian .BR /etc/X11/xinit/xinput.d/default .SH AUTHOR This manual page was written by Osamu Aoki , for the Debian GNU/Linux system (but may be used by others). im-switch-1.23ubuntu1/COPYING0000664000000000000000000004311012142137721012611 0ustar GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. im-switch-1.23ubuntu1/xinput.d/0000775000000000000000000000000012142137756013340 5ustar im-switch-1.23ubuntu1/xinput.d/th-gtk0000664000000000000000000000120312142137721014445 0ustar # # This configuration provides default IM setting for Thai with stock GTK+ # Thai-Lao input method. # See im-switch(8) and /usr/share/doc/im-switch/README.Debian . # # Define IM for traditional X application with XIM # # XIM server name # XIM program /path/filename # XIM program command line arguments # XMODIFIERS environment parameter # XIM=BasicCheck XIM_PROGRAM= XIM_ARGS= # # Define GTK and QT IM module # They may or may not be using xim as the IM. # GTK_IM_MODULE="thai" QT_IM_MODULE="xim" # # Define lists of packages neded for above IM to function # DEPENDS= # # Define X start up hook script to update IM environment # im-switch-1.23ubuntu1/xinput.d/lo-gtk0000664000000000000000000000117412142137721014453 0ustar # # This configuration provides default IM setting for Lao with stock GTK+ # Thai-Lao input method. # See im-switch(8) and /usr/share/doc/im-switch/README.Debian . # # Define IM for traditional X application with XIM # # XIM server name # XIM program /path/filename # XIM program command line arguments # XMODIFIERS environment parameter # XIM=none XIM_PROGRAM= XIM_ARGS= # # Define GTK and QT IM module # They may or may not be using xim as the IM. # GTK_IM_MODULE="thai" QT_IM_MODULE="xim" # # Define lists of packages neded for above IM to function # DEPENDS= # # Define X start up hook script to update IM environment # im-switch-1.23ubuntu1/xinput.d/none0000664000000000000000000000073212142137721014214 0ustar # # This configuration provides setting not to use any IM (keep as this is) # See im-switch(8) and /usr/share/doc/im-switch/README.Debian . # XIM= XIM_PROGRAM= XIM_ARGS= XIM_PROGRAM_XTRA= # # Define GTK and QT IM module # They may or may not be using xim as the IM. # GTK_IM_MODULE= QT_IM_MODULE= # Make sure to set as -z XMODIFIERS= # # Define lists of packages neded for above IM to function # DEPENDS= # # Define X start up hook script to update IM environment # im-switch-1.23ubuntu1/xinput.d/th-xim0000664000000000000000000000114212142137721014457 0ustar # # This configuration provides default IM setting for Thai with xim # See im-switch(8) and /usr/share/doc/im-switch/README.Debian . # # Define IM for traditional X application with XIM # # XIM server name # XIM program /path/filename # XIM program command line arguments # XMODIFIERS environment parameter # XIM=BasicCheck XIM_PROGRAM= XIM_ARGS= # # Define GTK and QT IM module # They may or may not be using xim as the IM. # GTK_IM_MODULE="xim" QT_IM_MODULE="xim" # # Define lists of packages neded for above IM to function # DEPENDS= # # Define X start up hook script to update IM environment # im-switch-1.23ubuntu1/xinput.d/default0000664000000000000000000000220012142137721014671 0ustar # # This configuration provides default IM setting (user edittable) # See im-switch(8) and /usr/share/doc/im-switch/README.Debian . # # Define IM for traditional X application with XIM # # XIM server name used for XMODIFIERS="@im=$XIM" # XIM program /path/filename # XIM program command line arguments # # These were traditional setting before uim and scim for CJK languages # Language LC_CTYPE XIM server XMODIFIERS Start key # Japanese ja_JP* kinput2 "@im=kinput2" Shift-Space # Korean ko_KR* ami "@im=Ami" Shift-Space # Chinese(T) zh_TW.Big5 xcin "@im=xcin-zh_TW.big5" Ctrl-Space # Chinese(S) zh_CN.GB2312 xcin "@im=xcin-zh_CN.GB2312" Ctrl-Space # XIM= XIM_PROGRAM= XIM_ARGS= XIM_PROGRAM_XTRA= # Set following variable to non-zero string if program set itself as deamon XIM_PROGRAM_SETS_ITSELF_AS_DAEMON= # # Define GTK and QT IM module # They may or may not be using xim as the IM. # GTK_IM_MODULE= QT_IM_MODULE= # # Define lists of packages neded for above IM to function # DEPENDS= # # Define X start up hook script to update IM environment # im-switch-1.23ubuntu1/xinput.d/default-xim0000664000000000000000000000113112142137721015466 0ustar # # General configuration to set X Input Method (xim) for GTK and QT. # See im-switch(8) and /usr/share/doc/im-switch/README.Debian . # # Define IM for traditional X application with XIM # # XIM server name # XIM program /path/filename # XIM program command line arguments # XMODIFIERS environment parameter # XIM=none XIM_PROGRAM= XIM_ARGS= # # Define GTK and QT IM module # They may or may not be using xim as the IM. # GTK_IM_MODULE=xim QT_IM_MODULE=xim # # Define lists of packages neded for above IM to function # DEPENDS= # # Define X start up hook script to update IM environment # im-switch-1.23ubuntu1/im-switch0000775000000000000000000000035112142137721013410 0ustar #!/bin/sh if [ "$1" = "--from-menu" ]; then shift menu=yes fi if [ "$menu" = "yes" ] && [ ! -x "/usr/bin/zenity" ]; then x-terminal-emulator -e /usr/lib/im-switch/im-switch "$@" else exec /usr/lib/im-switch/im-switch "$@" fi im-switch-1.23ubuntu1/im-switch.in0000664000000000000000000004202312142137721014014 0ustar #!/bin/sh # Copyright (C) 2006 Osamu Aoki # Copyright (C) 2005 - 2006 Kenshi Muto # Modified for Debian package. # Copyright (C) 1999 - 2004 Red Hat, Inc. All rights reserved. This # copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the # GNU General Public License version 2. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # system wide configuration directory XINPUT_PATH=/etc/X11/xinit/xinput.d # user specific customization directory DOTXINPUT_PATH=${HOME}/.xinput.d # All im-switch related alternatives start with xinput- ALTER_XINPUT=/etc/alternatives/xinput- # location for special hook scripts installed by each IM packages HOOKDIR=/usr/share/im-switch # $LNG is locale e_ without . and .@EURO LNG=${LC_ALL:-${LC_CTYPE:-${LANG}}} LNG=${LNG%@*} LNG=${LNG%.*} [ -z "$LNG" ] && LNG="all_ALL" || true USERID=$(id -u) VER=@@VERSION@@ VERBOSE=0 # echo to STDERR when VERBOSE is on. vecho() { if [ $VERBOSE -eq 1 ] ; then echo "$1" >&2 fi } # echo local setups to STDERR when VERBOSE is on. vlang() { if [ $VERBOSE -eq 1 ] ; then echo "LC_ALL=\"$LC_ALL\"" >&2 echo "LC_CTYPE=\"$LC_CTYPE\"" >&2 echo "LANG=\"$LANG\"" >&2 echo "LNG=\"$LNG\"" >&2 fi } # echo command line info to STDERR when VERBOSE is on. errcmd() { echo "Error: \"${0##*/}\" invoked with \"$ORGAT\" as options." >&2 echo "Error: Try \"${0##*/} -h\" for usage." >&2 } # echo missing dependency information for $1=$LNG dependency() { if [ -z "$1" ] ; then return fi if [ -r ${HOME}/$(basename "$1") ]; then DEPENDS=$(grep -e "DEPENDS=" ${HOME}/$(basename $1) | sed -e 's/DEPENDS=//' -e 's/"//g') elif [ -r "${XINPUT_PATH}/$1" ]; then DEPENDS=$(grep -e "DEPENDS=" $XINPUT_PATH/$1 | sed -e 's/DEPENDS=//' -e 's/"//g') else DEPENDS="" fi vecho "From the package dependency information requires" vecho " \"$DEPENDS\"." if [ -z "$DEPENDS" ]; then return fi RESULT="" # split with "," IFS="," for i in `echo "$DEPENDS"`; do INSTALLED=0 # split with | IFS="|" for j in `echo "$i"`; do unset IFS vecho "checking status of \"$j\" package" if dpkg -s $j 2>/dev/null | grep -q -e "Status: install ok installed" ; then vecho "+++ \"$j\" package is installed." INSTALLED=1 else vecho "---- \"$j\" package is NOT installed." fi done done if [ $INSTALLED -eq 0 ]; then if [ -z "$RESULT" ]; then RESULT="( $i )" else RESULT="${RESULT} and ( $i )" fi fi if [ -n "$RESULT" ]; then echo "Please install following packages:" echo " $(echo \"$RESULT\" | sed -e 's/|/ or /g') ." fi } # echo current system wide default IM setup name current_system_im () { if [ -r "${ALTER_XINPUT}${LNG}" ]; then /usr/sbin/update-alternatives --display xinput-$LNG | \ sed -ne 's/^ *link currently points to \([^ ]*\)/\1/p' | \ sed -e "s%${XINPUT_PATH}/%%" elif [ -r "${ALTER_XINPUT}all_ALL" ]; then /usr/sbin/update-alternatives --display xinput-all_ALL | \ sed -ne 's/^ *link currently points to \([^ ]*\)/\1/p' | \ sed -e "s%${XINPUT_PATH}/%%" else echo "No system wide default \"${ALTER_XINPUT}${LNG} or ${ALTER_XINPUT}all_ALL\" is defined." exit 1 fi } # echo current user IM setup name current_user_im () { if [ -h ${DOTXINPUT_PATH}/$LNG ]; then readlink ${DOTXINPUT_PATH}/$LNG | \ sed -e "s%${XINPUT_PATH}/%%" -e "s%${DOTXINPUT_PATH}/%~/.xinput.d/%" fi } # echo IM setup candidates possible_im () { ( (/usr/bin/find $XINPUT_PATH -type f| sed -e "s%$XINPUT_PATH/%%") ; \ (/usr/bin/find $DOTXINPUT_PATH -type f| sed -e "s%$DOTXINPUT_PATH/%%" ; ) ) | \ sort -u # XXX FIXME : should test for executable } # run system hook script when system wide IM setup is changed # So far, I have not see its use yet. # $PREVIOUS # $DEFAULT runhookscripts () { if [ "$DEFAULT" != "$PREVIOUS" ]; then [ "$PREVIOUS" -a -x "$HOOKDIR/$PREVIOUS" ] && $HOOKDIR/$PREVIOUS remove [ "$DEFAULT" -a -x "$HOOKDIR/$DEFAULT" ] && $HOOKDIR/$DEFAULT install fi } list() { echo "Your input method setup under $LNG locale as below." echo "=======================================================" if [ "$USERID" -eq 0 ]; then echo "No private configuration can be defined for root account." elif [ -r "${DOTXINPUT_PATH}/${LNG}" ]; then if [ -L "${DOTXINPUT_PATH}/${LNG}" ]; then echo "The configuration \"${DOTXINPUT_PATH}/${LNG}\" is defined as a link pointing to" echo "$(basename $(readlink "${DOTXINPUT_PATH}/${LNG}"))" else echo "The private configuration is a static file \"${DOTXINPUT_PATH}/${LNG}\" ." fi echo "This private configuration supersedes the system wide default." elif [ -L "${DOTXINPUT_PATH}/all_ALL" ]; then if [ -L "${DOTXINPUT_PATH}/all_ALL" ]; then echo "The configuration \"${DOTXINPUT_PATH}/all_ALL\" is defined as a link pointing to" echo "$(basename $(readlink "${DOTXINPUT_PATH}/all_ALL"))" else echo "The private configuration is a static file \"${DOTXINPUT_PATH}/all_ALL\" ." fi echo "This private configuration supersedes the system wide default." else echo "No private \"${DOTXINPUT_PATH}/${LNG} or ${DOTXINPUT_PATH}/all_ALL\" is defined." fi echo "=======================================================" if [ -r "${ALTER_XINPUT}${LNG}" ]; then echo "The system wide default is pointed by \"${ALTER_XINPUT}${LNG}\" ." /usr/sbin/update-alternatives --display xinput-$LNG | sed -e "s%$XINPUT_PATH/%%" elif [ -r "${ALTER_XINPUT}all_ALL" ]; then echo "The system wide default is pointed by \"${ALTER_XINPUT}all_ALL\" ." /usr/sbin/update-alternatives --display xinput-all_ALL | sed -e "s%$XINPUT_PATH/%%" else echo "No system wide default \"${ALTER_XINPUT}${LNG} or ${ALTER_XINPUT}all_ALL\" is defined." fi vecho "=======================================================" vecho "The system wide default input methods are available for the locales:" for i in `/bin/ls $ALTER_XINPUT* | sed -e "s%$ALTER_XINPUT%%"`; do vecho -n "$i " done vecho echo "=======================================================" echo "The available input method configuration files are:" for i in `possible_im` ; do if [ -r $DOTXINPUT_PATH/$i ]; then echo -n "~/.xinput.d/$i " else echo -n "$i " fi done echo vecho "=======================================================" vecho "The available input method hook scripts are in $HOOKDIR:" for i in `/usr/bin/find $HOOKDIR -type f| sed -e "s%$HOOKDIR/%%"`; do vecho -n "$i " done vecho echo "=======================================================" } # set IM to defaults auto() { if [ "$USERID" -eq 0 ]; then if [ ! -r "${ALTER_XINPUT}${LNG}" ]; then echo "No system wide default defined just for locale ${LNG} ." echo "Use \"all_ALL\" quasi-locale and set IM." LNG="all_ALL" fi PREVIOUS=$(current_system_im) /usr/sbin/update-alternatives --auto xinput-$LNG else if [ -r "${DOTXINPUT_PATH}/${LNG}" ]; then PREVIOUS=$(current_user_im) mv ${DOTXINPUT_PATH}/${LNG} ${DOTXINPUT_PATH}/${LNG}.backup fi fi DEFAULT=$(current_system_im) dependency $DEFAULT runhookscripts } # set im setup pointing to to $1 script in $XINPUT_PATH setalt() { if [ "$USERID" -eq 0 ]; then vecho "You are root user." # sanity check if [ ! -r "$XINPUT_PATH/$1" ] ; then echo "Error: no system wide configuration file \"$1\" exists." >&2 echo "Error: No action taken." >&2 exit 1 fi if [ ! -r "${ALTER_XINPUT}${LNG}" ]; then echo "No system wide default defined just for locale $LNG ." echo "Use \"all_ALL\" quasi-locale and set IM." LNG="all_ALL" fi PREVIOUS=$(current_system_im) /usr/sbin/update-alternatives --set xinput-$LNG $XINPUT_PATH/${1} DEFAULT=$(current_system_im) vecho "Changed system wide default from $PREVIOUS to $DEFAULT." else # sanity check if [ ! -r "$XINPUT_PATH/${1}" -a ! -r "$DOTXINPUT_PATH/${1}" ] ; then echo "Error: no configuration file \"${1}\" exists." >&2 echo "Error: No action taken." >&2 exit 1 fi vecho "You are non-root user." if [ ! -d ${DOTXINPUT_PATH} ]; then mkdir -p ${DOTXINPUT_PATH} vecho "Creating ${DOTXINPUT_PATH} directory." fi if [ -r "${DOTXINPUT_PATH}/${LNG}" ]; then PREVIOUS=$(current_user_im) mv ${DOTXINPUT_PATH}/${LNG} ${DOTXINPUT_PATH}/${LNG}.backup vecho "Backed up user configuration pointing to $PREVIOUS." fi if [ -r "$DOTXINPUT_PATH/${1}" ] ; then ln -s $DOTXINPUT_PATH/${1} ${DOTXINPUT_PATH}/$LNG else ln -s $XINPUT_PATH/${1} ${DOTXINPUT_PATH}/$LNG fi DEFAULT=$(current_user_im) vecho "Set user configuration pointing to $DEFAULT." fi dependency "$DEFAULT" runhookscripts } # set im setup pointing to to a script in $XINPUT_PATH by terminal menu cfgalt() { if [ "$USERID" -eq 0 ]; then vecho "You are root user." if [ ! -r "${ALTER_XINPUT}${LNG}" ]; then echo "No system wide default defined just for locale $LNG ." echo "Use \"all_ALL\" quasi-locale and set IM." LNG="all_ALL" fi PREVIOUS=$(current_system_im) echo "System wide default for ${LNG} locale is marked with [+]." /usr/sbin/update-alternatives --config xinput-$LNG DEFAULT=$(current_system_im) vecho "Changed system wide default from $PREVIOUS to $DEFAULT." else vecho "You are non-root user." if [ ! -d ${DOTXINPUT_PATH} ]; then mkdir -p ${DOTXINPUT_PATH} vecho "Creating ${DOTXINPUT_PATH} directory." fi PREVIOUS_SYS=$(current_system_im) if [ -r "${DOTXINPUT_PATH}/${LNG}" ]; then PREVIOUS=$(current_user_im) cp -a ${DOTXINPUT_PATH}/${LNG} ${DOTXINPUT_PATH}/${LNG}.backup vecho "Backed up user configuration pointing to $PREVIOUS." fi vecho " PREVIOUS_SYS=\"$PREVIOUS_SYS\"" vecho " PREVIOUS=\"$PREVIOUS\"" COUNT=`possible_im | wc -l` if [ "x$DISPLAY" != "x" ] && [ -x "/usr/bin/zenity" ]; then zenity_ucfgalt else console_ucfgalt fi fi DEFAULT=$(current_user_im) vecho "Set user configuration pointing to $DEFAULT." dependency "$DEFAULT" runhookscripts } # set user im setup pointing to to a script in $XINPUT_PATH by console menu console_ucfgalt() { echo "Input Method Switcher im-switch Version: $VER" echo " Selection Input Method Candidates for ${DOTXINPUT_PATH}/${LNG}:" echo " ------------------------------------------------------------------" INDEX=0 for i in `possible_im`; do INDEX=$(($INDEX+1)) if [ -r $DOTXINPUT_PATH/$i ]; then if [ "$PREVIOUS" = "~/.xinput.d/$i" ]; then echo -n "*" else echo -n " " fi if [ "$PREVIOUS_SYS" = "~/.xinput.d/$i" ]; then echo -n "+" else echo -n " " fi echo " $INDEX ~/.xinput.d/$i " else if [ "$PREVIOUS" = "$i" ]; then echo -n "*" else echo -n " " fi if [ "$PREVIOUS_SYS" = "$i" ]; then echo -n "+" else echo -n " " fi echo " $INDEX $i" fi done echo "System wide default for ${LNG} (or all_ALL) locale is marked with [+]." echo "Type \"REMOVE\" to remove user selection to enable system default." echo -n "Press enter to keep the current selection[*], or type selection number: " read SEL echo if [ -z "$SEL" ]; then # No action because INDEX is larger than 0 SEL=0 fi if [ "$SEL" != "REMOVE" ]; then INDEX=0 for i in `possible_im`; do INDEX=$(($INDEX+1)) if [ "$SEL" -eq "$INDEX" ]; then if [ -r "$DOTXINPUT_PATH/$i" ] ; then ln -fs $DOTXINPUT_PATH/$i ${DOTXINPUT_PATH}/$LNG else ln -fs $XINPUT_PATH/$i ${DOTXINPUT_PATH}/$LNG fi fi done else if [ -h "$DOTXINPUT_PATH/$LNG" ] ; then rm ${DOTXINPUT_PATH}/$LNG vecho "${DOTXINPUT_PATH}/$LNG removed" fi fi echo "Please read /usr/share/doc/im-switch/README.Debian.gz ." echo "Please restart the X session to activate the selected Input Method." } menuitem_im () { echo $1 | sed \ -e "s/^~\/\.xinput\.d\//User local configuration at ~\/\.xinput\.d\/: /" \ -e "s/default-xim$/Use xim (default-xim)/" \ -e "s/default$/Use setting by the sysadmin. (default)/" \ -e "s/ibus$/Use IBus (ibus)/" \ -e "s/lo-gtk$/Use thai IM_MODULE (lo-gtk)/" \ -e "s/none$/Do not use Input Method. (none)/" \ -e "s/scim-bridge$/Use SCIM via scim-bridge (scim-bridge)/" \ -e "s/scim-immodule$/Use SCIM via IM_MODULE (scim-immodule)/" \ -e "s/scim$/Use SCIM via xim (scim)/" \ -e "s/skim$/Use SCIM via IM_MODULE (skim)/" \ -e "s/th-gtk$/Use thai IM_MODULE (th-gtk)/" \ -e "s/th-xim$/Use thai xim (th-xim)/" } # set user im setup pointing to to a script in $XINPUT_PATH by zenity menu zenity_ucfgalt() { ZCMD0="zenity --title=\"Input Method Switcher (ver $VER)\" --width=600 --height=400 --text=\"Select User Input Method for ${LNG} . User choice supercedes system choice marked as default.\" --list --radiolist --hide-column=2 --column \"User\" --column \"im\" --column \"system\" --column \"Description of Input Method\"" ZCMD="" for i in `possible_im`; do if [ -r $DOTXINPUT_PATH/$i ]; then if [ "$PREVIOUS" = "~/.xinput.d/$i" ]; then ZCMD="$ZCMD TRUE" else ZCMD="$ZCMD FALSE" fi ZCMD="$ZCMD ~/.xinput.d/$i" if [ "$PREVIOUS_SYS" = "~/.xinput.d/$i" ]; then ZCMD="$ZCMD default" else ZCMD="$ZCMD \" \"" fi ZCMD="$ZCMD \"$(menuitem_im ~/.xinput.d/$i)\"" else if [ "$PREVIOUS" = "$i" ]; then ZCMD="$ZCMD TRUE" else ZCMD="$ZCMD FALSE" fi ZCMD="$ZCMD $i" if [ "$PREVIOUS_SYS" = "$i" ]; then ZCMD="$ZCMD default" else ZCMD="$ZCMD \" \"" fi ZCMD="$ZCMD \"$(menuitem_im $i)\"" fi done ZCMD="$ZCMD FALSE REMOVE \" \" \"Remove user choice to enable system choice\"" vecho "$ZCMD0 $ZCMD" SEL=$(eval $ZCMD0 $ZCMD) if [ -z "$SEL" ]; then SEL=$PREVIOUS fi ZMES="No user configuration enabled for $LNG." if [ -n "$SEL" ]; then if [ "$SEL" != "REMOVE" ]; then if [ -r "$DOTXINPUT_PATH/$SEL" ] ; then ln -fs $DOTXINPUT_PATH/$SEL ${DOTXINPUT_PATH}/$LNG ZMES="User configuration $(menuitem_im $SEL) enabled for $LNG." else ln -fs $XINPUT_PATH/$SEL ${DOTXINPUT_PATH}/$LNG ZMES="User configuration $(menuitem_im $SEL) enabled for $LNG." fi else if [ -h "$DOTXINPUT_PATH/$LNG" ] ; then rm ${DOTXINPUT_PATH}/$LNG vecho "${DOTXINPUT_PATH}/$LNG removed" ZMES="User configuration removed for $LNG." fi fi fi zenity --info --text "Please read /usr/share/doc/im-switch/README.Debian.gz . \n\n$ZMES\n\nRestart the X session to activate the selected Imput Method." } help() { echo "Input Method Switcher: im-switch Version=$VER" echo "" echo "\"${0##*/}\" configures the input method to be automatically switched based " echo "on the locale (ll_CC) using Debian \"update-alternatives\" mechanism." echo "When \"${0##*/}\" is invoked from root user, it sets system wide alternatives." echo "" echo "Usage: ${0##*/} [-v][-z ll_CC] -s inputmethodname" echo " to set a specific input method for the language" echo " ${0##*/} [-v][-z ll_CC] -c" echo " to set an input method for the language by menu" echo " ${0##*/} [-v][-z ll_CC] -a" echo " to revert to the default input method for the language" echo " ${0##*/} [-v][-z ll_CC] -l" echo " to list current settings and available input methods for" echo " the language, and also all the available languages" echo " ${0##*/} -h" echo " to show this help" echo "" echo "The \"ll_CC\" argument of -z takes the form \"_\" and " echo "is used to override the current locale (ISO 639 / ISO 3188) : eg \"-z ja_JP\"" echo "" echo "The use of -v option produces verbose outputs." echo "" } ORGAT="$@" while getopts "vfz:als:ch" OPTION; do case $OPTION in v) VERBOSE=1;; z) vlang; LNG="$OPTARG"; LNG=${LNG%@*}; LNG=${LNG%.*};; a) vlang; auto; exit 0;; l) vlang; list; exit 0;; s) vlang; setalt "$OPTARG"; exit 0;; c) vlang; cfgalt; exit 0;; h) vlang; help; exit 0;; ?) errcmd; exit 1;; esac done # If no option --> Menu use under X :-) vlang cfgalt exit 0