customize dialog ? #81

Closed
opened 2017-03-02 20:05:46 +00:00 by oberon · 41 comments
oberon commented 2017-03-02 20:05:46 +00:00 (Migrated from gitlab2.manjaro.org)

If we want to change the default appearance of dialog it can be done with configuration in ~/.dialogrc

# Run-time configuration file for dialog
#
# Automatically generated by "dialog --create-rc <file>"
#
#
# Types of values:
#
# Number     -  <number>
# String     -  "string"
# Boolean    -  <ON|OFF>
# Attribute  -  (foreground,background,highlight?)

# Set aspect-ration.
aspect = 0

# Set separator (for multiple widgets output).
separate_widget = ""

# Set tab-length (for textbox tab-conversion).
tab_len = 0

# Make tab-traversal for checklist, etc., include the list.
visit_items = OFF

# Shadow dialog boxes? This also turns on color.
use_shadow = ON

# Turn color support ON or OFF
use_colors = ON

# Screen color
screen_color = (CYAN,GREEN,ON)

# Shadow color
shadow_color = (BLACK,BLACK,ON)

# Dialog box color
dialog_color = (BLACK,WHITE,OFF)

# Dialog box title color
title_color = (BLUE,WHITE,ON)

# Dialog box border color
border_color = (WHITE,WHITE,ON)

# Active button color
button_active_color = (WHITE,BLUE,ON)

# Inactive button color
button_inactive_color = (BLACK,WHITE,OFF)

# Active button key color
button_key_active_color = (WHITE,BLUE,ON)

# Inactive button key color
button_key_inactive_color = (RED,WHITE,OFF)

# Active button label color
button_label_active_color = (YELLOW,BLUE,ON)

# Inactive button label color
button_label_inactive_color = (BLACK,WHITE,ON)

# Input box color
inputbox_color = (BLACK,WHITE,OFF)

# Input box border color
inputbox_border_color = (BLACK,WHITE,OFF)

# Search box color
searchbox_color = (BLACK,WHITE,OFF)

# Search box title color
searchbox_title_color = (BLUE,WHITE,ON)

# Search box border color
searchbox_border_color = (WHITE,WHITE,ON)

# File position indicator color
position_indicator_color = (BLUE,WHITE,ON)

# Menu box color
menubox_color = (BLACK,WHITE,OFF)

# Menu box border color
menubox_border_color = (WHITE,WHITE,ON)

# Item color
item_color = (BLACK,WHITE,OFF)

# Selected item color
item_selected_color = (WHITE,BLUE,ON)

# Tag color
tag_color = (BLUE,WHITE,ON)

# Selected tag color
tag_selected_color = (YELLOW,BLUE,ON)

# Tag key color
tag_key_color = (RED,WHITE,OFF)

# Selected tag key color
tag_key_selected_color = (RED,BLUE,ON)

# Check box color
check_color = (BLACK,WHITE,OFF)

# Selected check box color
check_selected_color = (WHITE,BLUE,ON)

# Up arrow color
uarrow_color = (GREEN,WHITE,ON)

# Down arrow color
darrow_color = (GREEN,WHITE,ON)

# Item help-text color
itemhelp_color = (WHITE,BLACK,OFF)

# Active form text color
form_active_text_color = (WHITE,BLUE,ON)

# Form text color
form_text_color = (WHITE,CYAN,ON)

# Readonly form item color
form_item_readonly_color = (CYAN,WHITE,ON)

low priority! 😉

If we want to change the default appearance of dialog it can be done with configuration in **~/.dialogrc** ``` # Run-time configuration file for dialog # # Automatically generated by "dialog --create-rc <file>" # # # Types of values: # # Number - <number> # String - "string" # Boolean - <ON|OFF> # Attribute - (foreground,background,highlight?) # Set aspect-ration. aspect = 0 # Set separator (for multiple widgets output). separate_widget = "" # Set tab-length (for textbox tab-conversion). tab_len = 0 # Make tab-traversal for checklist, etc., include the list. visit_items = OFF # Shadow dialog boxes? This also turns on color. use_shadow = ON # Turn color support ON or OFF use_colors = ON # Screen color screen_color = (CYAN,GREEN,ON) # Shadow color shadow_color = (BLACK,BLACK,ON) # Dialog box color dialog_color = (BLACK,WHITE,OFF) # Dialog box title color title_color = (BLUE,WHITE,ON) # Dialog box border color border_color = (WHITE,WHITE,ON) # Active button color button_active_color = (WHITE,BLUE,ON) # Inactive button color button_inactive_color = (BLACK,WHITE,OFF) # Active button key color button_key_active_color = (WHITE,BLUE,ON) # Inactive button key color button_key_inactive_color = (RED,WHITE,OFF) # Active button label color button_label_active_color = (YELLOW,BLUE,ON) # Inactive button label color button_label_inactive_color = (BLACK,WHITE,ON) # Input box color inputbox_color = (BLACK,WHITE,OFF) # Input box border color inputbox_border_color = (BLACK,WHITE,OFF) # Search box color searchbox_color = (BLACK,WHITE,OFF) # Search box title color searchbox_title_color = (BLUE,WHITE,ON) # Search box border color searchbox_border_color = (WHITE,WHITE,ON) # File position indicator color position_indicator_color = (BLUE,WHITE,ON) # Menu box color menubox_color = (BLACK,WHITE,OFF) # Menu box border color menubox_border_color = (WHITE,WHITE,ON) # Item color item_color = (BLACK,WHITE,OFF) # Selected item color item_selected_color = (WHITE,BLUE,ON) # Tag color tag_color = (BLUE,WHITE,ON) # Selected tag color tag_selected_color = (YELLOW,BLUE,ON) # Tag key color tag_key_color = (RED,WHITE,OFF) # Selected tag key color tag_key_selected_color = (RED,BLUE,ON) # Check box color check_color = (BLACK,WHITE,OFF) # Selected check box color check_selected_color = (WHITE,BLUE,ON) # Up arrow color uarrow_color = (GREEN,WHITE,ON) # Down arrow color darrow_color = (GREEN,WHITE,ON) # Item help-text color itemhelp_color = (WHITE,BLACK,OFF) # Active form text color form_active_text_color = (WHITE,BLUE,ON) # Form text color form_text_color = (WHITE,CYAN,ON) # Readonly form item color form_item_readonly_color = (CYAN,WHITE,ON) ``` low priority! :wink:
papajoke commented 2017-03-02 22:13:15 +00:00 (Migrated from gitlab2.manjaro.org)

tested not simple the colors choice, add in source:

 export DIALOGRC="$PWD/data/.dialog.rc"
tested not simple the colors choice, add in source: export DIALOGRC="$PWD/data/.dialog.rc"
oberon commented 2017-03-02 22:22:17 +00:00 (Migrated from gitlab2.manjaro.org)

well we could simply deploy the config file to the live user's home with manjaro-tools. But it's really not high priority! ;)

well we could simply deploy the config file to the live user's home with manjaro-tools. But it's really not high priority! ;)
oberon commented 2017-03-02 22:26:43 +00:00 (Migrated from gitlab2.manjaro.org)

when manjaro-tools creates user 'manjaro' in the live session, whatever has been installed to /etc/skel via overlay or by a settings-package will end up in /home/user/manjaro/...
so that should not be a problem.

when manjaro-tools creates user 'manjaro' in the live session, whatever has been installed to **/etc/skel** via overlay or by a settings-package will end up in **/home/user/manjaro/...** so that should not be a problem.
oberon commented 2017-03-03 20:01:26 +00:00 (Migrated from gitlab2.manjaro.org)

I was just looking at the package console-solarized and how they achieve the costomized console colors. They use systemd getty services and export the colors with a script. For the architect ISO It wouldn't be a problem to do the same.
Like that we are free to not use only the few pre-defined console colors but can modify them to whatever we like. We have 16 colors available to define with hexcodes - more than we could possibly ever use! ;)

some_color0="123abc"
some_color1= ...

echo -en "\e]P0$some_grey"   # Black
echo -en "\e]P1$some_red"    # Red
echo -en "\e]P2$some_green"  # Green
...
echo -en "\e]Pe$..."
echo -en "\e]Pf$..."
I was just looking at the package **console-solarized** and how they achieve the costomized console colors. They use systemd getty services and export the colors with a script. For the architect ISO It wouldn't be a problem to do the same. Like that we are free to not use only the few pre-defined console colors but can modify them to whatever we like. We have 16 colors available to define with hexcodes - more than we could possibly ever use! ;) ``` some_color0="123abc" some_color1= ... echo -en "\e]P0$some_grey" # Black echo -en "\e]P1$some_red" # Red echo -en "\e]P2$some_green" # Green ... echo -en "\e]Pe$..." echo -en "\e]Pf$..." ```
oberon commented 2017-03-04 03:15:37 +00:00 (Migrated from gitlab2.manjaro.org)

dialogrc is a bit unintuitive ... but I'm getting there, I think 😁
How about some more maia?

😆
What do you think, @Chrysostomus @papajoker

**dialogrc** is a bit unintuitive ... but I'm getting there, I think :grin: How about some more maia? ![](http://imgur.com/rGwpBI0.png) :laughing: What do you think, @Chrysostomus @papajoker
Chrysostomus commented 2017-03-04 03:17:57 +00:00 (Migrated from gitlab2.manjaro.org)

Better colors than my current attempt, though work in progress. Background title could also be cyan

Better colors than my current attempt, though work in progress. Background title could also be cyan
Chrysostomus commented 2017-03-04 03:18:56 +00:00 (Migrated from gitlab2.manjaro.org)

That dark gray text is not not sufficiently legible on that background though.

That dark gray text is not not sufficiently legible on that background though.
oberon commented 2017-03-04 03:41:03 +00:00 (Migrated from gitlab2.manjaro.org)

which dark grey text do you mean?

which dark grey text do you mean?
oberon commented 2017-03-04 03:42:17 +00:00 (Migrated from gitlab2.manjaro.org)

the inactive numbers? I didn't yet manage to find where they are defined ... 😛

the inactive numbers? I didn't yet manage to find where they are defined ... :stuck_out_tongue:
Chrysostomus commented 2017-03-04 03:42:52 +00:00 (Migrated from gitlab2.manjaro.org)

Inactive numbers, yes

Inactive numbers, yes
oberon commented 2017-03-04 03:47:01 +00:00 (Migrated from gitlab2.manjaro.org)

The only place where I have set that darkest color is the shadow I think. But changing that value doesn't move them either ...

The only place where I have set that darkest color is the shadow I think. But changing that value doesn't move them either ...
oberon commented 2017-03-04 03:49:06 +00:00 (Migrated from gitlab2.manjaro.org)

I made a package with that stuff so we can test it on the ISO. It needs to be installed in the first place though for the systemd stuff to work and the config being copied to root's home - will build a new ISO tomorrow. - Now off for some sleep ... ... :)

I made a package with that stuff so we can test it on the ISO. It needs to be installed in the first place though for the systemd stuff to work and the config being copied to root's home - will build a new ISO tomorrow. - Now off for some sleep ... ... :)
oberon commented 2017-03-04 03:50:08 +00:00 (Migrated from gitlab2.manjaro.org)

ma-console-colors

**ma-console-colors**
oberon commented 2017-03-04 03:52:01 +00:00 (Migrated from gitlab2.manjaro.org)

maybe those numbers take button_key_inactive_color

maybe those numbers take ``button_key_inactive_color``
Chrysostomus commented 2017-03-04 03:54:23 +00:00 (Migrated from gitlab2.manjaro.org)

Sleep well! You have done great!

Sleep well! You have done great!
oberon commented 2017-03-04 04:11:25 +00:00 (Migrated from gitlab2.manjaro.org)

thank you! :)

thank you! :)
oberon commented 2017-03-04 12:34:34 +00:00 (Migrated from gitlab2.manjaro.org)

Got it now I think. 😄

Might be that we find some places still in special dialog windows that will need some adjustment, but in general this is cracked I'd say. I'll just try some more things with that systemd service and might just make a console-maia package from that... openrc would need a different approach, but that's not really relevant for us, since there's really no need for the installer ISO to come with different init systems.

Got it now I think. :smile: ![](http://imgur.com/oU7BAyw.png) Might be that we find some places still in special dialog windows that will need some adjustment, but in general this is cracked I'd say. I'll just try some more things with that systemd service and might just make a console-maia package from that... openrc would need a different approach, but that's not really relevant for us, since there's really no need for the installer ISO to come with different init systems.
Chrysostomus commented 2017-03-04 12:45:32 +00:00 (Migrated from gitlab2.manjaro.org)

I might be switching console-solarized to console-maia then... Would be awesome if package supported openrc too, but not high priority

I might be switching console-solarized to console-maia then... Would be awesome if package supported openrc too, but not high priority
oberon commented 2017-03-04 13:09:08 +00:00 (Migrated from gitlab2.manjaro.org)

Building it already 😃 It will be maia-console. For openrc there seems to be a way via /etc/issue ... We can sort that out later 😉

Building it already :smiley: It will be **maia-console**. For openrc there seems to be a way via **/etc/issue** ... We can sort that out later :wink:
oberon commented 2017-03-08 13:53:47 +00:00 (Migrated from gitlab2.manjaro.org)

@Chrysostomus after juggling around some more with colors I've just pushed maia-console 1.2, including an adjusted dialogrc. Dialog now looks pratically almost like before, but the theme now should work a lot better in the console also for ranger and stuff. Please check!
I'll have to rebuild the architect ISO with this, which is not a big deal... I will also do a 32bit additionally this time.

@Chrysostomus after juggling around some more with colors I've just pushed **maia-console 1.2**, including an adjusted **dialogrc**. Dialog now looks pratically almost like before, but the theme now should work a lot better in the console also for ranger and stuff. Please check! I'll have to rebuild the architect ISO with this, which is not a big deal... I will also do a 32bit additionally this time.
oberon commented 2017-03-08 13:58:13 +00:00 (Migrated from gitlab2.manjaro.org)

The dialogrc will just work with maia-console only. It's an impossible task to do both I think: make the maia theme work and provide a dialog config that works for other themes. Try with three different terminal emulators and you get three completely different results. It also depends totally on the color profile your terminal uses, of course... ... So. It's just gonna have to be dialog default if not in the console and/or on the ISO I think.

The dialogrc will just work with maia-console only. It's an impossible task to do both I think: make the maia theme work and provide a dialog config that works for other themes. Try with three different terminal emulators and you get three completely different results. It also depends totally on the color profile your terminal uses, of course... ... So. It's just gonna have to be dialog default if not in the console and/or on the ISO I think.
oberon commented 2017-03-08 14:34:20 +00:00 (Migrated from gitlab2.manjaro.org)

I'll make the text a little whiter still to make it more clearly readable... Also I can do a little better for the buttons - stay tuned 😉

I'll make the text a little whiter still to make it more clearly readable... Also I can do a little better for the buttons - stay tuned :wink:
oberon commented 2017-03-08 14:53:46 +00:00 (Migrated from gitlab2.manjaro.org)

maia-console 1.2-2 😄

**maia-console 1.2-2** :smile:
oberon commented 2017-03-08 15:00:43 +00:00 (Migrated from gitlab2.manjaro.org)

ok. I now see that ranger uses magenta for regular highlight. That color is currently ugly, but there's no problem in changing it to whatever we like, since our new the dialogrc isn't using it anyway...

ok. I now see that ranger uses magenta for regular highlight. That color is currently ugly, but there's no problem in changing it to whatever we like, since our new the dialogrc isn't using it anyway...
Chrysostomus commented 2017-03-08 15:13:02 +00:00 (Migrated from gitlab2.manjaro.org)

I'll test it tonight. I'm especially interested in in how it works together with zsh-syntax-highlighting that manjaro-zsh-config uses by default

I'll test it tonight. I'm especially interested in in how it works together with zsh-syntax-highlighting that manjaro-zsh-config uses by default
oberon commented 2017-03-08 15:18:47 +00:00 (Migrated from gitlab2.manjaro.org)

Hm. Let me know. But I'm a little afraid this is getting bottomless to serve all the different color customizations...

Hm. Let me know. But I'm a little afraid this is getting bottomless to serve all the different color customizations...
Chrysostomus commented 2017-03-08 15:22:49 +00:00 (Migrated from gitlab2.manjaro.org)

Worry not, we should be close to the finishing line :)

Worry not, we should be close to the finishing line :)
oberon commented 2017-03-08 16:25:57 +00:00 (Migrated from gitlab2.manjaro.org)

1.2-3 tested also with manajro zsh shell - maybe not ideal, but it works ok I think ...

**1.2-3** tested also with manajro zsh shell - maybe not ideal, but it works ok I think ...
Chrysostomus commented 2017-03-08 16:41:55 +00:00 (Migrated from gitlab2.manjaro.org)

Not on my mirror just yet. 1.2-3 was already a significant improvement. I'll test the next when I get it.

Idea: would it be possible to assign that maia green to cyan?

Not on my mirror just yet. 1.2-3 was already a significant improvement. I'll test the next when I get it. Idea: would it be possible to assign that maia green to cyan?
oberon commented 2017-03-08 17:15:44 +00:00 (Migrated from gitlab2.manjaro.org)

assign that maia green to cyan

let me just find out what happens 😜

> assign that maia green to cyan let me just find out what happens :stuck_out_tongue_winking_eye:
Chrysostomus commented 2017-03-08 17:34:56 +00:00 (Migrated from gitlab2.manjaro.org)

Now online. It is better and worse than previous. Prompt gets diaplayed better, but syntax highlighting and autosuggestion colors are weird, as are man pages. Not unusable or hindering weird, just not as nice as they could be.

I'll see if I can hack it a bit too...

Now online. It is better and worse than previous. Prompt gets diaplayed better, but syntax highlighting and autosuggestion colors are weird, as are man pages. Not unusable or hindering weird, just not as nice as they could be. I'll see if I can hack it a bit too...
oberon commented 2017-03-08 17:36:23 +00:00 (Migrated from gitlab2.manjaro.org)

so. maia green on cyan works, in ranger just everything gets really bright and similar, in zsh shell i don't see a huge difference. What I still don't find good is how ranger displays image files. They are too dark...

so. maia green on cyan works, in ranger just everything gets really bright and similar, in zsh shell i don't see a huge difference. What I still don't find good is how ranger displays image files. They are too dark...
oberon commented 2017-03-08 17:46:03 +00:00 (Migrated from gitlab2.manjaro.org)

The problem with dialog is this:
When I look at for example how solarized console theme is organized: They leave colors 0-7 what their names actually are as the hightlight colors.
But with dialog we don't have the free choice to use colors 8-15 since it is only possible to specify the eight color names while in fact 16 colors are being applied in the end - kind of stupid!

The problem with dialog is this: When I look at for example how [solarized console theme](https://github.com/adeverteuil/console-solarized/blob/master/console-solarized) is organized: They leave colors 0-7 what their names actually are as the hightlight colors. But with dialog we don't have the free choice to use colors 8-15 since it is only possible to specify the eight color names while in fact 16 colors are being applied in the end - kind of stupid!
Chrysostomus commented 2017-03-08 17:48:33 +00:00 (Migrated from gitlab2.manjaro.org)

I assume it applies the "bright" colors on bold text?

I assume it applies the "bright" colors on bold text?
Chrysostomus commented 2017-03-08 17:49:11 +00:00 (Migrated from gitlab2.manjaro.org)

But yeah, sounds mighty inconvenient

But yeah, sounds mighty inconvenient
oberon commented 2017-03-08 17:50:40 +00:00 (Migrated from gitlab2.manjaro.org)

no. it's somehow associated to foreground and background as in screen(background)color vs dialog box I think. bold is dealt with separately as what it is and with terminus as we have it, not at all. Could we btw configure vconsole in a way that it uses normal and bold variants of terminus?

no. it's somehow associated to foreground and background as in screen(background)color vs dialog box I think. bold is dealt with separately as what it is and with terminus as we have it, not at all. Could we btw configure vconsole in a way that it uses normal and bold variants of terminus?
Chrysostomus commented 2017-03-08 17:51:47 +00:00 (Migrated from gitlab2.manjaro.org)

I don't think so, but I can be wrong

I don't think so, but I can be wrong
oberon commented 2017-03-08 17:59:36 +00:00 (Migrated from gitlab2.manjaro.org)

yeah. I also assumed it's only possible in the terminal.

yeah. I also assumed it's only possible in the terminal.
Chrysostomus commented 2017-03-08 18:03:54 +00:00 (Migrated from gitlab2.manjaro.org)

You could try http://stackoverflow.com/questions/2924697/how-does-one-output-bold-text-in-bash

If text doesn't get bolded, it may switch to bright variant instead

You could try http://stackoverflow.com/questions/2924697/how-does-one-output-bold-text-in-bash If text doesn't get bolded, it may switch to bright variant instead
oberon commented 2017-03-08 18:23:28 +00:00 (Migrated from gitlab2.manjaro.org)

we can live without bold I think. looks like this is all more for terminal anyway?

we can live without bold I think. looks like this is all more for terminal anyway?
oberon commented 2017-03-08 18:24:07 +00:00 (Migrated from gitlab2.manjaro.org)

the on/off property in the terminal btw works fine - for bold text, no color change! 😉

the on/off property in the terminal btw works fine - for bold text, no color change! :wink:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
applications/manjaro-architect#81
No description provided.