]> www.wagner.pp.ru Git - sites/home_page.git/blobdiff - software/unix/xtitle.sh
Added bringup script to xtitle page, added XVKbd russian layout
[sites/home_page.git] / software / unix / xtitle.sh
index f9b0c75d9de02fc91f2bb0132f7a77ca868be644..84d8ae06fea15672c6b097395f89dd8948ae6485 100755 (executable)
@@ -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