rkd77 / elinks

Fork of elinks
Other
335 stars 35 forks source link

how to set background color #259

Open newyorkthink opened 1 year ago

newyorkthink commented 1 year ago

image

can you tell me

rkd77 commented 1 year ago

Is it real? In other programs white is white?

0-issue commented 1 year ago

@newyorkthink In past, with another application background appeared like this. At that time what resolved it was perhaps a setting for terminfo. Maybe set terminal.tmux-256color.colors = 1 in ~/.config/elinks/elinks.conf and then launch elinks again. If things still don't look optimal, backup your elinks.conf, download and rename
elinks.conf.txt to elinks.conf and save it as ~/.config/elinks/elinks.conf. Then close all existing elinks sessions, and open new elinks.

@rkd77 A year or so ago went through a process of quickly trying and testing lynx, w3m, links, and elinks and had chosen lynx at the time. The test was simple, application should: 1) install with no errors, 2) display webpages and html documents well without spending time debugging it. At that time I didn't have much time to debug and adapt default config. Check how elinks opens in tmux on macOS after first install in image below. A lot of users who might not have time to debug, might be moving to another browser just because it didn't open well the first time. What might resolve this problem is: 1) add support for background/foreground color to support "default" meaning default terminal colors, 2) set the default background to "default" instead of black. Not sure if I am missing something though. @newyorkthink The issue will go away with config file settings, and then elinks turns out to be the best terminal based browser out there...

Screenshot 2023-08-08 at 1 55 11 PM
newyorkthink commented 1 year ago

@newyorkthink In past, with another application background appeared like this. At that time what resolved it was perhaps a setting for terminfo. Maybe set terminal.tmux-256color.colors = 1 in ~/.config/elinks/elinks.conf and then launch elinks again. If things still don't look optimal, backup your elinks.conf, download and rename elinks.conf.txt to elinks.conf and save it as ~/.config/elinks/elinks.conf. Then close all existing elinks sessions, and open new elinks.

@rkd77 A year or so ago went through a process of quickly trying and testing lynx, w3m, links, and elinks and had chosen lynx at the time. The test was simple, application should: 1) install with no errors, 2) display webpages and html documents well without spending time debugging it. At that time I didn't have much time to debug and adapt default config. Check how elinks opens in tmux on macOS after first install in image below. A lot of users who might not have time to debug, might be moving to another browser just because it didn't open well the first time. What might resolve this problem is: 1) add support for background/foreground color to support "default" meaning default terminal colors, 2) set the default background to "default" instead of black. Not sure if I am missing something though. @newyorkthink The issue will go away with config file settings, and then elinks turns out to be the best terminal based browser out there...

Screenshot 2023-08-08 at 1 55 11 PM

can you give me show you elinks config

newyorkthink commented 1 year ago

Is it real? In other programs white is white?

not , it just only elinks

newyorkthink commented 1 year ago
## ELinks 0.16.1.1 configuration file

## This is ELinks configuration file. You can edit it manually,
## if you wish so; this file is edited by ELinks when you save
## options through UI, however only option values will be altered
## and missing options will be added at the end of file; if option
## is not written in this file, but in some file included from it,
## it is NOT counted as missing. Note that all your formatting,
## own comments and so on will be kept as-is.
##
## Obviously, if you don't like what ELinks is going to do with
## this file, you can change it by altering the config.saving_style
## option. Come on, aren't we friendly guys after all?

##############################
# Automatically saved options
#

## config 
#  Configuration handling options.

  ## config.saving_style_w [0|1]
  #  This is internal option used when displaying a warning about obsolete
  #  config.saving_style. You shouldn't touch it.
  set config.saving_style_w = 1

## terminal 
#  Terminal options.

  ## terminal.tmux-256color 
  #  Options specific to this terminal type (according to $TERM value).

    ## terminal.tmux-256color.colors <num>
    set terminal.tmux-256color.colors = 1

## ui 
#  User interface options.

  ## ui.language <language>
  #  Language of user interface. 'System' means that the language will be
  #  extracted from the environment dynamically.
  set ui.language = "System"

##############################
# Automatically saved options
#

## ui 
#  User interface options.

  ## ui.success_msgbox [0|1]
  #  When you pressed a [ Save ] button in some manager, this option will make
  #  sure that a box confirming success of the operation will pop up.
  set ui.success_msgbox = 0

i config elinks, it show like this: image

oh not :( ,my eye

newyorkthink commented 1 year ago

this is lf command, they not like elinks

image

0-issue commented 1 year ago

@newyorkthink

can you give me show you elinks config

It's already posted in the comment, check again.

newyorkthink commented 1 year ago

@newyorkthink

can you give me show you elinks config

It's already posted in the comment, check again.

is not work, and i don't set color

rkd77 commented 1 year ago

@newyorkthink first, ESC, F9 -> Setup -> Terminal options . Choose appropriate frames, color mode, and Save. Then o (Options manager). User interface -> Color settings -> Color terminals -> .. and so on. I don't know what you mean by background color exactly. In User interface -> .. there is Desktop , but there are also options related to document colors: Options manager -> Document -> Default color settings

newyorkthink commented 1 year ago

@newyorkthink first, ESC, F9 -> Setup -> Terminal options . Choose appropriate frames, color mode, and Save. Then o (Options manager). User interface -> Color settings -> Color terminals -> .. and so on. I don't know what you mean by background color exactly. In User interface -> .. there is Desktop , but there are also options related to document colors: Options manager -> Document -> Default color settings

i try to set black , but it not work

## ELinks 0.16.1.1 configuration file

## This is ELinks configuration file. You can edit it manually,
## if you wish so; this file is edited by ELinks when you save
## options through UI, however only option values will be altered
## and missing options will be added at the end of file; if option
## is not written in this file, but in some file included from it,
## it is NOT counted as missing. Note that all your formatting,
## own comments and so on will be kept as-is.
##
## Obviously, if you don't like what ELinks is going to do with
## this file, you can change it by altering the config.saving_style
## option. Come on, aren't we friendly guys after all?

##############################
# Automatically saved options
#

## config 
#  Configuration handling options.

  ## config.saving_style_w [0|1]
  #  This is internal option used when displaying a warning about obsolete
  #  config.saving_style. You shouldn't touch it.
  set config.saving_style_w = 1

## terminal 
#  Terminal options.

  ## terminal.tmux-256color 
  #  Options specific to this terminal type (according to $TERM value).

    ## terminal.tmux-256color.colors <num>
    set terminal.tmux-256color.colors = 3

## ui 
#  User interface options.

  ## ui.language <language>
  #  Language of user interface. 'System' means that the language will be
  #  extracted from the environment dynamically.
  set ui.language = "System"

##############################
# Automatically saved options
#

## ui 
#  User interface options.

  ## ui.success_msgbox [0|1]
  #  When you pressed a [ Save ] button in some manager, this option will make
  #  sure that a box confirming success of the operation will pop up.
  set ui.success_msgbox = 0

##############################
# Automatically saved options
#

## ui 
#  User interface options.

  ## ui.colors 
  #  Default user interface color settings.

    ## ui.colors.color 
    #  Color settings for color terminal.

      ## ui.colors.color.mainmenu 
      #  Main menu bar colors.

        ## ui.colors.color.mainmenu.normal 
        #  Unselected main menu bar item colors.

          ## ui.colors.color.mainmenu.normal.background <color|#rrggbb>
          #  Default background color.
          set ui.colors.color.mainmenu.normal.background = "black"

image

rkd77 commented 1 year ago

Need also set appropriate text color, because usually black on black, or white on white won't work. Save settings, quit all elinks instances and start elinks again. Please spend some time to figure out which setting is "connected" to given element of interface or document.

newyorkthink commented 1 year ago

Need also set appropriate text color, because usually black on black, or white on white won't work. Save settings, quit all elinks instances and start elinks again. Please spend some time to figure out which setting is "connected" to given element of interface or document.

oh my gold, to difficult