[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: zenity --text-info autoscrolling?



On Tue, 28 Mar 2017 21:26:43 +0200
Floris <jkfloris@dds.nl> wrote:

>Op Tue, 28 Mar 2017 04:03:20 +0200 schreef Jason <electron@emypeople.net>:
>
>> On Sun, 26 Mar 2017 22:03:33 +0200
>> Floris <jkfloris@dds.nl> wrote:
>>
>>> Op Fri, 24 Mar 2017 23:33:06 +0100 schreef Jason  
>>> <electron@emypeople.net>:
>>>
>>>> In interactive shell scripts I like piping output into zenity
>>>> --text-info for display. If
>>>> the output is more than fits in the zenity window, any additional lines
>>>> will be too far
>>>> down to display unless the user manually scrolls down to the bottom of
>>>> the text.
>>>>
>>>> Does anyone know if there is a way to tell zenity to automatically
>>>> scroll down as lines
>>>> are added so that the last lines are always visible? This way the  
>>>> output
>>>> of the current
>>>> action would be displaying at the bottom of the zenity dialog box,
>>>> instead of not being
>>>> visible.
>>>>
>>>> Using zenity 3.4.0-2 on Debian 8.1.
>>>>
>>>> --
>>>> Thanks.
>>>> Jason
>>>>
>>>
>>> perhaps you can use yad, a fork of zenity, with the tail option:
>>> https://packages.debian.org/sid/yad
>>>
>>> $ yad --help-text
>>> Usage:
>>>   yad [OPTION...] - Yet another dialoging program
>>>
>>> Text information options
>>>   --text-info                                    Display text  
>>> information
>>> dialog
>>>   --fore=COLOR                                   Use specified color for
>>> text
>>>   --back=COLOR                                   Use specified color for
>>> background
>>>   --wrap                                         Enable text wrapping
>>>   --justify=TYPE                                 Set justification  
>>> (left,
>>> right, center or fill)
>>>   --margins=SIZE                                 Set text margins
>>>   --tail                                         Autoscroll to end of  
>>> text
>>>   --show-cursor                                  Show cursor in  
>>> read-only
>>> mode
>>>   --show-uri                                     Make URI clickable
>>>   --uri-color=COLOR                              Use specified color for
>>> links
>>>
>>>
>>> success,
>>>
>>> floris
>>
>> Thanks for the suggestion; it sounds like something that would work.  
>> Unfortunately, I
>> must work with something that already exists on my target systems  
>> (zenity does but not
>> yad) as it is not an option to add programs on some of these systems. Of  
>> course, you
>> could not know that as I had not stated it in my original post.
>>
>> Thanks for your reply!
>> Jason
>>
>
>Is it possible to update to version 3.12 or higher?
>https://download.gnome.org/sources/zenity/3.12/zenity-3.12.1.news
>Zenity 3.12.1
>         ...
>         - Bug #667711 - man page points to nonexisting doc (Arx Cruz)
>         - Bug #600533 zenity --text-info should have an auto scroll option  
>(Arx Cruz)
>         - Bug #534935 Need hability to specify default answer in  
>--question dialog (Berislav Kovacki)
>	...
>
>Floris

That is the answer I needed - now using version 3.14.0 and auto-scroll works!
(As an aside, I did not actually install the package but just extracted
the zenity binary from its .deb and it executes fine on a system that only
has version 3.4.0 officially installed.)

Thanks all!
Jason


Reply to: