Handy scripts you'd like to share

I didn’t really think there was too much interest in my gun.sh “Garuda Update Now” script, so I didn’t bother to post more info on modifying its appearance. Now that I see @gampel mentioned using it recently I’ll post some further information and screen shots.



TUI Dialog customization for gun.sh using a config file:



You can customize various aspects of the dialog command by creating a ~/.dialogrc file. A .dialogrc file is required to customize the gun.sh dialog window’s size/appearance.

To create a sample/default ~/.dialogrc file enter the following command in the terminal:

dialog --create-rc ~/.dialogrc

To customize the ~/.dialogrc default settings, open the file in your favorite text editor and experiment with altering the default settings.

Here are some tips:

Turn on shadow dialog boxes

use_shadow = ON

Turn on color support ON

use_colors = ON

Change default blue background color to BLACK

screen_color = (CYAN,BLACK,ON)

Available colors are (numbers from 0 through 7), corresponding to, black, red, green, yellow, blue, magenta, cyan, and white. After modifying any Dialog config settings, save and close the file, then relaunch gun.sh to view your changes.

This was the appearance of the default Dialog TUI window before I altered it with a modified ~/.dialogrc file:

This is the current appearance of my gun.sh Dialog TUI window now, after altering it with a modified ~/.dialogrc file:

This is the modified version of the ~/.dialogrc file I am currently using:

# cat ~/.dialogrc
#
#black background - white text
#
aspect = 0
separate_widget = ""
tab_len = 0
visit_items = OFF
use_shadow = OFF
use_colors = ON
screen_color = (WHITE,DEFAULT,OFF)
shadow_color = (WHITE,WHITE,OFF)
dialog_color = (WHITE,BLACK,OFF)
title_color = (GREEN,BLACK,OFF)
border_color = (WHITE,BLACK,OFF)
button_active_color = (BLACK,YELLOW,OFF)
button_inactive_color = (WHITE,BLACK,OFF)
button_key_active_color = (BLACK,GREEN,OFF)
button_key_inactive_color = (RED,BLACK,OFF)
button_label_active_color = (BLACK,YELLOW,OFF)
button_label_inactive_color = (WHITE,BLACK,OFF)
inputbox_color = (WHITE,BLACK,OFF)
inputbox_border_color = (BLACK,BLACK,OFF)
searchbox_color = (WHITE,BLACK,OFF)
searchbox_title_color = (GREEN,BLACK,OFF)
searchbox_border_color = (WHITE,BLACK,OFF)
position_indicator_color = (GREEN,BLACK,OFF)
menubox_color = (BLACK,BLACK,OFF)
menubox_border_color = (BLACK,BLACK,OFF)
item_color = (WHITE,BLACK,OFF)
item_selected_color = (BLACK,GREEN,OFF)
tag_color = (BLUE,BLACK,OFF)
tag_selected_color = (BLACK,GREEN,OFF)
tag_key_color = (YELLOW,BLACK,OFF)
tag_key_selected_color = (BLACK,GREEN,OFF)
check_color = (WHITE,BLACK,OFF)
check_selected_color = (BLACK,GREEN,OFF)
uarrow_color = (GREEN,BLACK,OFF)
darrow_color = (GREEN,BLACK,OFF)
itemhelp_color = (BLACK,WHITE,OFF)
form_active_text_color = (BLACK,BLUE,OFF)
form_text_color = (WHITE,BLACK,OFF)
form_item_readonly_color = (BLACK,WHITE,OFF)

For more in depth details you will need to search online, as I found the documentation to be rather sparse. Play with the ~/.dialogrc file configuration settings to create your own customized appearance that you prefer.

Just thought I’d add a little extra bonus info for those interested in these kind of things.

7 Likes