You are not logged in.

#1 2010-02-15 22:57:16

eDio
Member
From: Ukraine, Kyiv
Registered: 2008-12-02
Posts: 422

[SOLVED] Any way to display long text in popup in KDE?

Hello, I'm working on script, which displays interesting quotes from web forismatic.com (it is in Russian).

Here is script

#!/bin/bash
FORISMATIC_API_ANSWER=$(curl --silent --data-urlencode "method=getQuote" http://www.forismatic.com/api/1.0/)

FORISMATIC_API_QUOTE=$(echo $FORISMATIC_API_ANSWER | xml_grep -t '/forismatic/quote/quoteText')
FORISMATIC_API_AUTHOR=$(echo $FORISMATIC_API_ANSWER | xml_grep -t '/forismatic/quote/quoteAuthor')
if [ -z "$FORISMATIC_API_AUTHOR" ] ; then
  FORISMATIC_API_AUTHOR="Author is unknown"
fi

notify-send --expire-time=10000 "$(echo $FORISMATIC_API_AUTHOR)" "$(echo $FORISMATIC_API_QUOTE)"

The problem is that popup, created by libnotify-send in KDE (I think, it is important), is too small to display variable FORISMATIC_API_QUOTE.

So is there any way, to display big popup, which will be able to contain long text without trimming it?

Thanks in advance.

Last edited by eDio (2010-02-20 21:08:19)

Offline

#2 2010-02-16 02:20:53

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: [SOLVED] Any way to display long text in popup in KDE?

Not a KDE app, but you can try Xdialog, which provides pop-ups.  It lets you define the size of the window, and if you give it a gtk rc file, you can even define the font and colors of the window.  You can see my mplayerstart script on my blog for an example.

Offline

#3 2010-02-18 22:44:58

barto
Member
From: Budapest, Hungary
Registered: 2009-10-22
Posts: 88

Re: [SOLVED] Any way to display long text in popup in KDE?

Not a KDE app either, but I would recommend gxmessage. Similar to xmessage but handles non-ASCII characters too.


“First principle, Clarice. Simplicity” – Dr. Hannibal Lecter

Offline

#4 2010-02-20 21:00:04

IgnorantGuru
Member
Registered: 2009-11-09
Posts: 640
Website

Re: [SOLVED] Any way to display long text in popup in KDE?

Another one I just came across that works great...  Zenity
http://linux.byexamples.com/archives/26 … xamples-2/

Offline

#5 2010-02-20 21:08:02

eDio
Member
From: Ukraine, Kyiv
Registered: 2008-12-02
Posts: 422

Re: [SOLVED] Any way to display long text in popup in KDE?

I've found, I can use fold to wrap text. I was using this solution till now.
Now I'm going to try all proposed solutions (I had no time to try them earlier).

I think, I can mark thread as solved.

P.S. Sorry for so late response.

Offline

Board footer

Powered by FluxBB