A pseudo-GUI for a new shell project...

Code junkies hangout here

Moderators: ChrisThornett, LXF moderators

Postby Bazza » Tue Mar 25, 2014 7:55 am

Hi Ram...

The cursor visibility is an important piece of info. Thanks...
I will see if turning the cursor visibility off, and placing a character is its place is any good. How about "^" or maybe "<". I would like opinions as to what character would suit you, plural.

@jh...

I have no idea except that your terminal does not support pseudo-graphics modes.
Does the cursor move?
If "yes" then I might have to go backwards to these characters "+-|" to produce the boxes...

So far though the many outweigh the few... ;o)
(__Spock__)

Thanks again for all the input.
You guys rock...
73...

Bazza, G0LCU...

Team AMIGA...
User avatar
Bazza
LXF regular
 
Posts: 1476
Joined: Sat Mar 21, 2009 11:16 am
Location: Loughborough

Postby nelz » Tue Mar 25, 2014 8:43 am

johnhudson wrote:I tried it again and didn't get the fi error at the end but otherwise it was the same. None of the beautiful displays that others have got.


It looks like you're pasting the code directly into a shell, instead of saving it as a script and running that.

Bazza: It might be easier if you put the script somewhere on the net and posted a link here, trying to paste from code tags into an editor is no fun.
Last edited by nelz on Tue Mar 25, 2014 1:20 pm, edited 1 time in total.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8493
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby Ram » Tue Mar 25, 2014 9:31 am

Cheers nelz, this brought a smile to my face "trying to paste from code tags into an editor is no fun"

I copied into 'vi'

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
User avatar
Ram
LXF regular
 
Posts: 1676
Joined: Thu Apr 07, 2005 9:44 pm
Location: Guisborough

Postby guy » Tue Mar 25, 2014 11:00 am

Forgot to say, no cursor visible, just the command caret blinking top left.
Cheers,
Guy
The eternal help vampire
User avatar
guy
LXF regular
 
Posts: 1077
Joined: Thu Apr 07, 2005 12:07 pm
Location: Worcestershire

Postby Bazza » Tue Mar 25, 2014 6:19 pm

Hi nelz...

Done!

The latest here:-

http://wisecracker.host22.com/public/Fu ... nerator.sh

It now cleanly closes.

@guy...

How about a piccy so I can see what you mean...
73...

Bazza, G0LCU...

Team AMIGA...
User avatar
Bazza
LXF regular
 
Posts: 1476
Joined: Sat Mar 21, 2009 11:16 am
Location: Loughborough

Postby johnhudson » Tue Mar 25, 2014 9:36 pm

nelz wrote:It looks like you're pasting the code directly into a shell, instead of saving it as a script and running that.


Right in one. Running it as a script returns the line:
Code: Select all
./test: line 15: text: command not found

followed by a background screen about six times the size of the buttons plus prompt but without the title bar that others have displayed and the buttons in the lower left hand corner.

Changing to xterm, I simply get the buttons plus prompt without the title bar in the top left on a background slightly larger than the buttons. I get the same with Terminology (Enlightenment).

Changing to lxterminal, I get the buttons plus prompt without the title bar in the bottom half of the background which is only slightly wider than the buttons but twice as tall. I get the same result with xfceterminal.
johnhudson
LXF regular
 
Posts: 876
Joined: Wed Aug 03, 2005 1:37 pm

Postby Bazza » Wed Mar 26, 2014 8:29 am

Hi jh...

Line 15 now corrected...

OSX 10.7.5, using xterm, not the default terminal...
Image
73...

Bazza, G0LCU...

Team AMIGA...
User avatar
Bazza
LXF regular
 
Posts: 1476
Joined: Sat Mar 21, 2009 11:16 am
Location: Loughborough

Postby guy » Wed Mar 26, 2014 10:47 am

Bazza wrote:@guy...

How about a piccy so I can see what you mean...


Using your updated code from yesterday:

Image

The black rectangle does move as a cursor using the arrow keys, but not using A,D, etc. as you described. I now suspect it was coincidence that the command prompt appeared over it when the program quit: with your updated code, the screen clears nicely.

Note improved button and display borders, too. You made a lot of changes?
Cheers,
Guy
The eternal help vampire
User avatar
guy
LXF regular
 
Posts: 1077
Joined: Thu Apr 07, 2005 12:07 pm
Location: Worcestershire

Postby Ram » Wed Mar 26, 2014 6:06 pm

@Guy,

You did use Capital A,B,C,D.

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
User avatar
Ram
LXF regular
 
Posts: 1676
Joined: Thu Apr 07, 2005 9:44 pm
Location: Guisborough

Postby Bazza » Wed Mar 26, 2014 6:42 pm

guy wrote:The black rectangle does move as a cursor using the arrow keys, but not using A,D, etc. as you described. I now suspect it was coincidence that the command prompt appeared over it when the program quit: with your updated code, the screen clears nicely.

Note improved button and display borders, too. You made a lot of changes?


The letters are uppercase not lowercase but are a byproduct of the cursor keys so therefore as long as any of them work that is mighty fine by me...

Changes to the display, no, to the while loop, yes and very minor. This will be changed in due course...

Corrected line 15 which was a command call instead of an array although it will be removed in due course as this code is proof of concept only. The next stage is enabling and disabling the buttons and to make the text inside them light up too.

This site is getting the very first of the experiments and I will upgrade the version accordingly soon.

@Ram...

You beat me to it...

Again you guys are really helpful many thanks...
73...

Bazza, G0LCU...

Team AMIGA...
User avatar
Bazza
LXF regular
 
Posts: 1476
Joined: Sat Mar 21, 2009 11:16 am
Location: Loughborough

Postby guy » Wed Mar 26, 2014 8:55 pm

Ah, upper case does work. I just assumed you were talking keycap legends, silly me.

One other thing, the cursor tends to disappear when "over" the series of blank spaces after the text in each button. Reappears when I move it away again. It's as if it were running underneath the space characters or something. Odd.
Cheers,
Guy
The eternal help vampire
User avatar
guy
LXF regular
 
Posts: 1077
Joined: Thu Apr 07, 2005 12:07 pm
Location: Worcestershire

Postby johnhudson » Thu Mar 27, 2014 9:55 pm

Quick try of the new version; Konsole is the most badly behaved - does not display the titlebar.

xterm/terminology are as displayed above.

xfceterminal/lxterminal have the titlebar above the dropdown options.
johnhudson
LXF regular
 
Posts: 876
Joined: Wed Aug 03, 2005 1:37 pm

Previous

Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest