From: Victor Wagner Date: Tue, 29 Aug 2006 13:17:09 +0000 (+0000) Subject: Added bringup script to xtitle page, added XVKbd russian layout X-Git-Url: http://www.wagner.pp.ru/gitweb/?p=sites%2Fhome_page.git;a=commitdiff_plain;h=80ef9a31a67d47857199502734a95700aae707ea Added bringup script to xtitle page, added XVKbd russian layout --- diff --git a/software/unix/XVkbd-russian b/software/unix/XVkbd-russian new file mode 100644 index 0000000..ed5e3ba --- /dev/null +++ b/software/unix/XVkbd-russian @@ -0,0 +1,108 @@ +!! XVkbd-russian.ad - Russian (win-keyboard like) layout for xvkbd +!! by Victor Wagner , http://homepage3.nifty.com/tsato/ +!! +!! Requires xvkbd to be started in ru_RU.KOI8-R (or ru_UA.KOI8-R) locale +!! to show key labels correctly. You may recode this file to any other +!! 8-bit cyrillic encoding and change font resources appropriately. But +!! as of xvkbd ver 2.6 it doesn't show labels correctly if resourses +!! are in utf-8 +!! +!! Last update: 2006-07-27 + +#include "XVkbd-common" + +xvkbd.title: xvkbd - Virtual Keyboard (Russian) + +xvkbd*generalFont: -*-fixed-medium-r-normal-*-13-*-*-*-*-*-koi8-r +xvkbd*letterFont: -*-fixed-medium-r-normal-*-13-*-*-*-*-*-koi8-r + +xvkbd*space.width: 80 + +xvkbd.modalKeytop: true + +xvkbd.NormalKeys: \ + F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 BackSpace \n\ + Escape 1 2 3 4 5 6 7 8 9 0 - = ` # \n\ + Tab q w e r t y u i o p [ ] Delete \n\ + Control_L a s d f g h j k l ; ' Return \n\ + Shift_L \\ z x c v b n m , . / Multi_key Shift_R \n\ + MainMenu Caps_Lock Alt_L Meta_L space Meta_R Mode_switch Left Right Up Down Focus + +xvkbd.ShiftKeys: \ + F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 BackSpace \n\ + Escape ! @ # $ % ^ & = ( ) _ + ~ # \n\ + Tab Q W E R T Y U I O P { } Delete \n\ + Control_L A S D F G H J K L : " Return \n\ + Shift_L | Z X C V B N M < > ? Multi_key Shift_R \n\ + MainMenu Caps_Lock Alt_L Meta_L space Meta_R Mode_switch Left Right Up Down Focus + + +xvkbd.KeyLabels: \ + F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Backspace \n\ + Esc 1 2 3 4 5 6 7 8 9 0 - = ` # \n\ + Tab q w e r t y u i o p [ ] Del \n\ + Ctrl a s d f g h j k l ; ' Return \n\ + Shift \\ z x c v b n m , . / Comp Shift \n\ + MainMenu Caps Alt Meta space Meta Rus left right up down Focus + +xvkbd.NormalKeyLabels: \ + F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Backspace \n\ + Esc 1 2 3 4 5 6 7 8 9 0 - = ` # \n\ + Tab q w e r t y u i o p [ ] Del \n\ + Ctrl a s d f g h j k l ; ' Return \n\ + Shift \\ z x c v b n m , . / Comp Shift \n\ + MainMenu Caps Alt Meta space Meta Rus left right up down Focus + + +xvkbd.ShiftKeyLabels: \ + F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Backspace \n\ + Esc ! @ # $ % ^ & = ( ) _ + ~ # \n\ + Tab Q W E R T Y U I O P { } Del \n\ + Ctrl A S D F G H J K L : " Return \n\ + Shift | Z X C V B N M < > ? Comp Shift \n\ + MainMenu Caps Alt Meta space Meta Rus left right up down Focus + + +xvkbd.AltgrKeys: \ + F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 BackSpace \n\ + Escape 1 2 3 4 5 6 7 8 9 0 - = Cyrillic_io # \n\ + Tab Cyrillic_shorti Cyrillic_tse Cyrillic_u Cyrillic_ka Cyrillic_ie\ + Cyrillic_en Cyrillic_ghe Cyrillic_sha Cyrillic_shcha Cyrillic_ze\ + Cyrillic_ha Cyrillic_hardsign Delete \n\ + Control_L Cyrillic_ef Cyrillic_yeru Cyrillic_ve Cyrillic_a Cyrillic_pe\ + Cyrillic_er Cyrillic_o Cyrillic_el Cyrillic_de Cyrillic_zhe Cyrillic_e\ + Return \n\ + Shift_L \\ Cyrillic_ya Cyrillic_che Cyrillic_es Cyrillic_em Cyrillic_i\ + Cyrillic_te Cyrillic_softsign Cyrillic_be Cyrillic_yu . Multi_key Shift_R \n\ + MainMenu Caps_Lock Alt_L Meta_L space Meta_R Mode_switch Left Right Up Down Focus + +xvkbd.ShiftAltgrKeys: \ + F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 BackSpace \n\ + Escape ! " # ; % : ? * ( ) _ + Cyrillic_IO # \n\ + Tab Cyrillic_SHORTI Cyrillic_TSE Cyrillic_U Cyrillic_KA Cyrillic_IE\ + Cyrillic_EN Cyrillic_GHE Cyrillic_SHA Cyrillic_SHCHA Cyrillic_ZE\ + Cyrillic_HA Cyrillic_HARDSIGN Delete \n\ + Control_L Cyrillic_EF Cyrillic_YERU Cyrillic_VE Cyrillic_A Cyrillic_PE\ + Cyrillic_ER Cyrillic_O Cyrillic_EL Cyrillic_DE Cyrillic_ZHE Cyrillic_E\ + Return \n\ + Shift_L \\ Cyrillic_YA Cyrillic_CHE Cyrillic_ES Cyrillic_EM Cyrillic_I\ + Cyrillic_TE Cyrillic_SOFTSIGN Cyrillic_BE Cyrillic_YU , Multi_key Shift_R \n\ + MainMenu Caps_Lock Alt_L Meta_L space Meta_R Mode_switch Left Right Up Down Focus + +xvkbd.AltgrKeyLabels: \ + F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 BackSpace \n\ + Escape 1 2 3 4 5 6 7 8 9 0 - = £ # \n\ + Tab Ê Ã Õ Ë Å Î Ç Û Ý Ú È ß Delete \n\ + Control Æ Ù × Á Ð Ò Ï Ì Ä Ö Ü Return \n\ + Shift \\ Ñ Þ Ó Í É Ô Ø Â À . Comp Shift \n\ + Menu Caps Alt Meta space Meta Eng left right up down Focus + +xvkbd.ShiftAltgrKeyLabels: \ + F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Backspace \n\ + Esc ! " # ; % : ? * ( ) _ + ³ ~ \n\ + Tab ê ã õ ë å î ç û ý ú è ÿ Del \n\ + Ctrl æ ù ÷ á ð ò ï ì ä ö ü Return \n\ + Shift / ñ þ ó í é ô ø â à , Comp Shift \n\ + Menu Caps Alt Meta space Meta Eng left right up down Focus diff --git a/software/unix/bringup.sh b/software/unix/bringup.sh new file mode 100644 index 0000000..efc8739 --- /dev/null +++ b/software/unix/bringup.sh @@ -0,0 +1,38 @@ +#!/bin/sh +TITLE="$1" +shift +COMMAND=$1 + +ttyprefix=/dev/; #for linux systems with /dev/pts +cmdcolumn=5 ;# where to find command in ps output +ttycolumn=2 ;# where to find tty name in ps output +psargs=aww; +get_tty_from_command () { + local t + t=`ps $psargs|awk "\\$$cmdcolumn~/$1/ {print \"$ttyprefix\" \\$$ttycolumn;exit}"` + if [ -z "$t" ] + then + return 1 + fi + check_tty $t +} + +check_tty () { + if [ ! -c $1 ] + then + echo "$i is not valid tty name" >&2 + exit 1 + fi + if [ ! -w $1 ] + then + echo "$i is not writable for you" >&2 + exit 1 + fi + tty=$1 +} + +if get_tty_from_command $COMMAND; then + echo -n '' >$tty +else + xterm -T "$TITLE" -name $COMMAND -e "$@" & +fi diff --git a/software/unix/xtitle.html b/software/unix/xtitle.html index c8bcdc7..fe227e3 100644 --- a/software/unix/xtitle.html +++ b/software/unix/xtitle.html @@ -13,8 +13,44 @@ title of window:
  • given as pseudo-tty name in command line
  • where given command is running -script itself +script itself +

    Parameters

    +
    +xtitle [ -t tty|-c command] [-i|-w|-f] title
    +
    +
    +
    -t /dev/pts/N
    specifies tty associated with xterm to +change
    +
    -c someprogram
    specifies command running in this +xterm
    +
    -i
    notifies, that only icon name should be changed
    +
    -w
    that window name only, not the icon name should be +changed (default - both)
    +
    -f
    changes font instead of title. If you are specifying +XLFD font name, which start with hyphen, use -- to separate it from +options
    +
    -r
    raises/deiconifies window instead of changing name
    +
    +

    BringUp script

    +

    +This script brings up an xterm window with given command running, i.e +launches new one, if no is executed, or finds exisiting and +raises/deiconifies it. +

    +

    +script. +

    +

    +Usage: +

    +
    +	bringup Title command [parameters]
    +
    + +Note that only command name is taking into account when searching for +existing running program, not parameters. + diff --git a/software/unix/xtitle.sh b/software/unix/xtitle.sh index f9b0c75..84d8ae0 100755 --- a/software/unix/xtitle.sh +++ b/software/unix/xtitle.sh @@ -2,9 +2,9 @@ # customization parameters #ttyprefix=/dev/tty ;# what to add to ttycolumn's word to obtain valid device ttyprefix=/dev/; #for linux systems with /dev/pts -cmdcolumn=4 ;# where to find command in ps output +cmdcolumn=5 ;# where to find command in ps output ttycolumn=2 ;# where to find tty name in ps output -psargs=-aww; +psargs=aww; # displays usage information usage () { echo "xtitle [ -t tty|-c command] [-i|-w|-f] title" >&2 @@ -13,6 +13,7 @@ usage () { echo " -i notifies, that only icon name should be changed" >&2 echo " -w that window name only (default - both)">&2 echo " -f changes font instead of title" >&2 + echo " -r raises/deiconifies window instead of changing title" >&2 } # tries to get tty name from command name get_tty_from_command () { @@ -44,7 +45,7 @@ check_tty () { tty=`tty` # by default change both window name and icon name mode=0 -set -- `getopt "iwfc:t:h" $*` +set -- `getopt "iwrfc:t:h" $*` if [ $? != 0 ] then usage @@ -64,9 +65,14 @@ do usage exit 0 ;; + -r) raise_mode=1; shift;; --) shift; break;; esac done +echo "tty=$tty" +if [ -n "$raise_mode" ]; then + echo -ne "\\033[1t\\033[5t" >$tty +fi echo -e "\\033]$mode;$*\a\c" >$tty diff --git a/software/unix/xvkbd-rus.html b/software/unix/xvkbd-rus.html new file mode 100644 index 0000000..5acfa63 --- /dev/null +++ b/software/unix/xvkbd-rus.html @@ -0,0 +1,36 @@ + + +Russian layout for xvkbd + + +

    Russian layout for xvkbd

    +

    +xvkbd is a piece +of software useful for keyboard-less computers such as PDA or +web-tablets. It includes layouts for some languages, but no Russian +among them. But xvkbd is highly customizable via X resources +

    +

    +So, I've written my own keyboard layout for xvkbd. Download XVkbd-russian file and use it as described +in xvkbd manual. +

    +

    +It is recommended to turn on "Lock AltGr" menu option in xvkbd +(I've found no way to turn it on from resource file, but xvkbd would +remember your settings). +

    +

    +This file assumes that xvkbd is running with ru_RU.KOI8-R locale. +If you want to run it in different locale, just recode filename and fix +font charset in the first lines of file. Note version of xvkbd +provided in Debian stable (2.6) is not able to display Cyrillic key +lables correctly if they are UTF-8. So, don't run xvkbd in +ru_RU.UTF-8 locale, even if rest of your X application use that +locale. This layout produce correct X keysyms, so cyrillic letters would +be entered properly even if xvkbd and application run in different +locales. +

    + +