Sponsored Content
Top Forums Shell Programming and Scripting How to set up a GNOME zenity? Post 303034611 by Defunct_Lizard on Tuesday 30th of April 2019 08:06:24 PM
Old 04-30-2019
How to set up a GNOME zenity?

I'm creating a script that goes something like this:
Code:
#!/bin/bash

zenity --list --checklist --title="Choose Packages to Install" --width="1000" --height="400" \
--column="Select" --column="Package Name" --column="Description" \
GIMP=( " " GIMP "Known as GIMP, GNU Image Manipulation Program is a free and open source photo editor." \ )
if [ $GIMP = "GIMP" ]
then 
	sudo apt-get install $GIMP
fi

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Zenity

Hi! does someone know how can I setup a zenity entry "box" such that comes with the data as default. like it appears an entry box already with the data but it can be modify. thanks (2 Replies)
Discussion started by: ruben.rodrigues
2 Replies

2. Shell Programming and Scripting

Zenity Menu

I have some troubles with zenity and menu. I seach for: MAIN MENU CHOICE 1 "do something" CHOICE 2 "do something 2" CHOICE 3 "do something 3" But then in "do someghing " when i click i want to return to the MAIN MENU So something like: while true; do ... (4 Replies)
Discussion started by: aspire
4 Replies

3. Shell Programming and Scripting

Zenity and IF/ELSE cond'.

Hey guys i wrote this code but it wont give me anything. any ideas? ans=$(zenity --list --text "Do you want to set USER/GROUP quota?" --radiolist --column "Choice" --column "Desc" TRUE Hi FALSE Bye); echo $ans if ; then ./example.sh else exit fi (2 Replies)
Discussion started by: dplate07
2 Replies

4. Shell Programming and Scripting

file zenity

Hello, I have a script with zenity file, but I want to know the file name and path, but this way I just take the name of the file. fl1=`zenity --file-selection --title="Seleccionar fichero"` basename $fl1 .txt > temp nom=`cat temp` Thank you very much (1 Reply)
Discussion started by: uri_crack
1 Replies

5. UNIX for Dummies Questions & Answers

using an array with zenity

I got an array: for i in $(fdisk -l | awk '/Disk\ \/dev\/d/ { print $2 }') ; do drive_list="$i" # echo "$i" ((index++)) done #>/dev/nullI got this zenity code: grub_dev=$(zenity --list --title="Hard Drives" --text="Choose exactly one drive to use for the GRUB bootloader.... (2 Replies)
Discussion started by: tornow
2 Replies

6. Linux

Zenity function

i wanted to put this code on a list zenity but it never worsk, how would i be able to do that? cd /home/mint ls -d */ (3 Replies)
Discussion started by: roozis
3 Replies

7. Shell Programming and Scripting

Zenity help

I have a large system housekeeping script, that I want to use with zenity. One of the processes will be to conduct a virus scan, which I can easily do with something like: clamscan -rv / | zenity --text-info --width 640 --height 640 The problem is that it needs user intervention by... (2 Replies)
Discussion started by: stumpyuk
2 Replies

8. Shell Programming and Scripting

Backup & restore Gnome Desktop and all settings in Gnome

Hi I'm looking for scripts to backup & restore Gnome Desktop and all settings in Gnome. (0 Replies)
Discussion started by: ccc
0 Replies

9. Shell Programming and Scripting

Zenity, While, and Conditions

All, I'm having fighting a losing battle with what I though would be simple. My goal is this: Show a zenity progress or info dialog until the system obtains an ip address, then close the dialog and continue through the rest of the script. Right now I've got the following: ip=`ifconfig |... (2 Replies)
Discussion started by: timbrammer91091
2 Replies
Imager::Fountain(3pm)					User Contributed Perl Documentation				     Imager::Fountain(3pm)

NAME
Imager::Fountain - a class for building fountain fills suitable for use by the fountain filter. SYNOPSIS
use Imager::Fountain; my $f1 = Imager::Fountain->read(gimp=>$filename); $f->write(gimp=>$filename); my $f1 = Imager::Fountain->new; $f1->add(start=>0, middle=>0.5, end=>1.0, c0=>Imager::Color->new(...), c1=>Imager::Color->new(...), type=>$trans_type, color=>$color_trans_type); DESCRIPTION
Provide an interface to build arrays suitable for use by the Imager fountain filter. These can be loaded from or saved to a GIMP gradient file or you can build them from scratch. read(gimp=>$filename) read(gimp=>$filename, name=>$name) Loads a gradient from the given GIMP gradient file, and returns a new Imager::Fountain object. If the name parameter is supplied as a scalar reference then any name field from newer GIMP gradient files will be returned in it. my $gradient = Imager::Fountain->read(gimp=>'foo.ggr'); my $name; my $gradient2 = Imager::Fountain->read(gimp=>'bar.ggr', name=>$name); write(gimp=>$filename) write(gimp=>$filename, name=>$name) Save the gradient to a GIMP gradient file. The second variant allows the gradient name to be set (for newer versions of the GIMP). $gradient->write(gimp=>'foo.ggr') or die Imager->errstr; $gradient->write(gimp=>'bar.ggr', name=>'the bar gradient') or die Imager->errstr; new Create an empty fountain fill description. add(start=>$start, middle=>$middle, end=>1.0, c0=>$start_color, c1=>$end_color, type=>$trans_type, color=>$color_trans_type) Adds a new segment to the fountain fill, the possible options are: o "start" - the start position in the gradient where this segment takes effect between 0 and 1. Default: 0. o "middle" - the mid-point of the transition between the 2 colors, between 0 and 1. Default: average of "start" and "end". o "end" - the end of the gradient, from 0 to 1. Default: 1. o "c0" - the color of the fountain fill where the fill parameter is equal to start. Default: opaque black. o "c1" - the color of the fountain fill where the fill parameter is equal to end. Default: opaque black. o "type" - the type of segment, controls the way in which the fill parameter moves from 0 to 1. Default: linear. This can take any of the following values: o "linear" o "curved" - unimplemented so far. o "sine" o "sphereup" o "spheredown" o "color" - the way in which the color transitions between "c0" and "c1". Default: direct. This can take any of the following values: o "direct" - each channel is simple scaled between c0 and c1. o "hueup" - the color is converted to a HSV value and the scaling is done such that the hue increases as the fill parameter increases. o "huedown" - the color is converted to a HSV value and the scaling is done such that the hue decreases as the fill parameter increases. In most cases you can ignore some of the arguments, eg. # assuming $f is a new Imager::Fountain in each case here use Imager ':handy'; # simple transition from red to blue $f->add(c0=>NC('#FF0000'), c1=>NC('#0000FF')); # simple 2 stages from red to green to blue $f->add(end=>0.5, c0=>NC('#FF0000'), c1=>NC('#00FF00')) $f->add(start=>0.5, c0=>NC('#00FF00'), c1=>NC('#0000FF')); simple(positions=>[ ... ], colors=>[...]) Creates a simple fountain fill object consisting of linear segments. The array references passed as positions and colors must have the same number of elements. They must have at least 2 elements each. colors must contain Imager::Color or Imager::Color::Float objects. eg. my $f = Imager::Fountain->simple(positions=>[0, 0.2, 1.0], colors=>[ NC(255,0,0), NC(0,255,0), NC(0,0,255) ]); Implementation Functions Documented for internal use. _load_gimp_gradient($class, $fh, $name) Does the work of loading a GIMP gradient file. _save_gimp_gradient($self, $fh, $name) Does the work of saving to a GIMP gradient file. FILL PARAMETER
The add() documentation mentions a fill parameter in a few places, this is as good a place as any to discuss it. The process of deciding the color produced by the gradient works through the following steps: 1. calculate the base value, which is typically a distance or an angle of some sort. This can be positive or occasionally negative, depending on the type of fill being performed (linear, radial, etc). 2. clamp or convert the base value to the range 0 through 1, how this is done depends on the repeat parameter. I'm calling this result the fill parameter. 3. the appropriate segment is found. This is currently done with a linear search, and the first matching segment is used. If there is no matching segment the pixel is not touched. 4. the fill parameter is scaled from 0 to 1 depending on the segment type. 5. the color produced, depending on the segment color type. AUTHOR
Tony Cook <tony@develop-help.com> SEE ALSO
Imager(3) perl v5.14.2 2011-06-06 Imager::Fountain(3pm)
All times are GMT -4. The time now is 09:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy