Tiny Core Linux

Tiny Core Base => TCB Tips & Tricks => Topic started by: PDP-8 on August 07, 2019, 03:52:17 AM

Title: Fun with TC POPUP gui
Post by: PDP-8 on August 07, 2019, 03:52:17 AM
I was reading bmarkus talking about popups from about 10 years ago ... and just now noticed how cool these lightweight notifications are!

The usual:
Code: [Select]
popup Hello World!
Hijinks:
Code: [Select]
popup About To Erase Boot Drive Y/N ?with only the close button available.... :)

But I see it also works with backticks!

Code: [Select]
popup You have `calc 2*5` minutes left!
popup I really like using TinyCore `version`

Anyway, you get the drift.  I can see using these with backgrounded scripts that merely need to notify me when say a compile is finished, or perhaps with cron jobs etc etc.

Looks like a neat alternative to always having another terminal open and glancing over at it all the time.

Shame on you veteran users and devs from keeping this totally cool secret from me! :)
Title: Re: Fun with TC POPUP gui
Post by: Rich on August 07, 2019, 05:56:50 AM
Hi PDP-8
... Shame on you veteran users and devs from keeping this totally cool secret from me! :)
You know she has a sister called  popask,  right?
Title: Re: Fun with TC POPUP gui
Post by: NewUser on August 07, 2019, 09:28:54 PM
Is popup usable to another TCL computer, like net send in the old Windows days?
Title: Re: Fun with TC POPUP gui
Post by: curaga on August 08, 2019, 12:03:15 AM
It is a local command, but you can use ssh (or remote X11).
Title: Re: Fun with TC POPUP gui
Post by: PDP-8 on August 08, 2019, 01:42:45 AM
WOW!  I dig it - maybe I'm easily amused, but I can put this to use.

However, I need to file a bug report.  If you don't use the mouse to click, but instead use a tab / return key, it will send a different value if you hit the space key!

For now, stick to mouse clicks.
Title: Re: Fun with TC POPUP gui
Post by: pek on September 23, 2021, 09:26:57 AM
Hi, how to add new line in popup?
Code: [Select]
popup Hello World \n Newline..Literally printed
Code: [Select]
Hello World \n Newline..I want to get
Code: [Select]
Hello World
Newline..

How to do that?
Thank you.
Title: Re: Fun with TC POPUP gui
Post by: Rich on September 23, 2021, 12:06:46 PM
Hi pek
I don't think you can. I think it's limited to 1 line. It won't wrap long lines either. It just displays a wider popup.
If you do this:
Code: [Select]
tc@E310:~$ popup "Hello there" &
tc@E310:~$ popup "Helloooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo there" &
You'll see popup just uses a much wider window to display the text.
Title: Re: Fun with TC POPUP gui
Post by: pek on September 23, 2021, 07:13:53 PM
That's such a pity.
But good to know, so now I can stop tearing my hair trying to figure out how to do that  ;D
Thanks for clarifying Rich.