ronin-rb / ronin-core

A core library for all ronin libraries.
https://ronin-rb.dev
GNU Lesser General Public License v3.0
3 stars 3 forks source link

Add a custom Reline color scheme to the `Core::CLI::RubyShell` #44

Closed postmodern closed 1 month ago

postmodern commented 8 months ago

As of reline 0.4.0, reline now supports custom color schemes for the tab-completion menu. Ronin could customize the default cyan background + grey text + magenta highlighted text completion menu.

AI-Mozi commented 1 month ago

Screenshot 2024-08-31 at 13 38 48

Something like that?

postmodern commented 1 month ago

@AI-Mozi nice! We should probably think about the color scheme.

AI-Mozi commented 1 month ago

Oh.. I thought you want a cyan background + grey text + magenta highlighted text 😅 I'll play with it a bit, but I think the black/white/gray/navy color pallet is associated with ronin.

AI-Mozi commented 1 month ago

Screenshot 2024-09-01 at 18 19 16

@postmodern what do you think? I like that red background for highlighted option as it matches the irb(ronin-test)>

postmodern commented 1 month ago

@AI-Mozi I played around with some different color schemes. Here's white text on gray:

          Reline::Face.config(:completion_dialog) do |conf|
            conf.define :default, foreground: :white, background: :gray
            conf.define :enhanced, foreground: :black, background: :white
            conf.define :scrollbar, foreground: :white, background: :gray
          end

ronin_ruby_shell_white_on_gray

and here is white text on black:

          Reline::Face.config(:completion_dialog) do |conf|
            conf.define :default, foreground: :white, background: :black
            conf.define :enhanced, foreground: :black, background: :white
            conf.define :scrollbar, foreground: :white, background: :black
          end

ronin_ruby_shell_white_on_black

Here's what white on gray with red highlighting looks like in my terminal: ronin_ruby_shell_white_on_gray_with_red

Thoughts on which one is better?

AI-Mozi commented 1 month ago

white on gray with red highlighting does not look as good as in my terminal.. Maybe just white text on gray?

postmodern commented 1 month ago

@AI-Mozi yeah I'm liking both white text on gray and white text on black.

AI-Mozi commented 1 month ago

@postmodern I'll check which one looks better in my terminal, and I'll chose it

postmodern commented 1 month ago

Implemented by PR #57.