Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 18 Apr 2014, 04:28
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Rxvt/Xterm-Replacement with sakura
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
aragon

Joined: 15 Oct 2007
Posts: 1696
Location: Germany

PostPosted: Tue 19 Jan 2010, 08:06    Post subject:  Rxvt/Xterm-Replacement with sakura
Subject description: Code cleanup/better workaround
 

i want to replace rxvt and xterm with sakura. i have a script (see attached) that does convert the input and strips out every option that is not supported by sakura. it basically works (tested with rxvt) but i have the felling that some things could be done better/lighter/faster.

any recommendations are welcome.

thanks aragon

Code:
#!/bin/sh
#
# this script should be a replacement for xterm and rxvt using sakura. as sakura
# does not understand most option of xterm/rxvt, we try to only commit those it
# does:
# -hold (only Xterm)
# -title/-T
# -e
#
# aragon, 2010.01.19

## variables
inp="${*}" #all params
hold="`echo "${inp}" | grep -e -hold`" #is hold in params
title="`echo "${inp}" | tr "-" "\n" | grep -e "^title " | sed 's/title //'`" #get title from -title
ttitle="`echo "${inp}" | tr "-" "\n" | grep -e "^T " | sed 's/T //'`" #get title from -T
exe="`echo "${inp}" | tr "-" "\n" | grep -e "^e " | sed 's/e //'`" #get command to execute from -e

## set hold-option from -hold
if [ ! -z "${hold}" ]
then
sakhold="-h"
else
sakhold=""
fi

## set title-option from -title or -T
if [ ! -z "${title}" ]
then
   saktitle="-t '"${title}"'"
   elif [ ! -z "${ttitle}" ]
   then
      saktitle="-t '"${ttitle}"'"
else
saktitle=""
fi

## set execute-option from -e
if [ ! -z "${exe}" ]
then
sakexe="-e ${exe}"
else
sakexe=""
fi

## build output and squeeze blanks in output
sakoutput="`echo "sakura "${sakhold}" "${saktitle}" "${sakexe}"" | tr -s " "`"

## output (later without echo)
echo "${sakoutput}"

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Back to top
View user's profile Send private message 
ttuuxxx


Joined: 05 May 2007
Posts: 10730
Location: Ontario Canada,Sydney Australia

PostPosted: Tue 19 Jan 2010, 10:34    Post subject: Re: Rxvt/Xterm-Replacement with sakura
Subject description: Code cleanup/better workaround
 

aragon wrote:
i want to replace rxvt and xterm with sakura. i have a script (see attached) that does convert the input and strips out every option that is not supported by sakura. it basically works (tested with rxvt) but i have the felling that some things could be done better/lighter/faster.

any recommendations are welcome.

thanks aragon]


Hi aragon, yes that is one of the draw backs of it. I found that out like 2yrs ago, when I made my first Sakura pet post on here, The petget pet manager stopped being fully functional because of it, it wouldn't install packages when I made it default.
I then contacted the Sakura developer and he mentioned that he would like to fix it, but just never did, Slacker!!
But really isn't it a vte issue? and if so you might be able to find a patch for it, I haven't looked in years.

Also have you tried Mrxvt if you place rxvt on a 1 to 10 scale and rxvt is a 1 and sakura is a 10, Mrxvt is about a 6.5. But its way,way,way,way,way smaller than sakura since its rxvt based and not vte
You can read about it at, and it doesn't need any patching to be fully compatible with puppy Smile works straight out of the compiler's box Smile
http://www.murga-linux.com/puppy/viewtopic.php?p=383193#383193

ttuuxxx

_________________
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games Smile

Back to top
View user's profile Send private message Visit poster's website 
aragon

Joined: 15 Oct 2007
Posts: 1696
Location: Germany

PostPosted: Tue 19 Jan 2010, 10:49    Post subject:  

hi ttuuxxx,

yes i'm using mrxvt on my home-machine, i do like it very much.

generally i don't see any problem in the fact that sakura doesn't understand the whole Xterm/rxvt-optionset. i think -e/-hold/-title are the only 'really' necessary option, correct me if i'm wrong.

Quote:
The petget pet manager stopped being fully functional because of it, it wouldn't install packages when I made it default.

i'm actually working in virtualbox for the scripts so this won't kill me, but thanks for the tip will test that soon.

aragon

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0496s ][ Queries: 12 (0.0077s) ][ GZIP on ]