From 26498f5d151eea11ebcaf87d0dbbab73e988d0d4 Mon Sep 17 00:00:00 2001 From: endormi <39559256+endormi@users.noreply.github.com> Date: Wed, 13 Dec 2023 20:08:28 +0200 Subject: [PATCH] Personalize the appearance with custom colors and font settings * Add the ability to personalize the appearance with custom colors and font settings, but it is totally optional. --- .custom_settings.example.yaml | 13 +++ CONTRIBUTING.md | 2 +- Dockerfile | 7 +- GUIDE.md | 84 ++++++++++++++++++- README.md | 6 +- build | 5 +- docs/source/{commands.md => guide.md} | 84 +++++++++++++++++-- docs/source/index.rst | 2 +- docs/source/usage.md | 6 +- scripts/README.md | 1 - scripts/copy_content | 22 +++-- scripts/list_of_files | 24 ------ ...olor_names_spec.rb => ansi_colors_spec.rb} | 4 +- spec/color_settings_spec.rb | 36 ++++++++ spec/command_processor_spec.rb | 9 ++ spec/helpers_spec.rb | 7 -- tools/README.md | 13 +-- tools/logos.py | 21 +++-- tools/tilux/ansi_colors.rb | 31 +++++++ tools/tilux/color_names.rb | 51 ----------- tools/tilux/color_settings.rb | 35 ++++++++ tools/tilux/command_processor.rb | 43 ++++++---- tools/tilux/helpers.rb | 9 +- 23 files changed, 363 insertions(+), 152 deletions(-) create mode 100644 .custom_settings.example.yaml rename docs/source/{commands.md => guide.md} (67%) delete mode 100755 scripts/list_of_files rename spec/{color_names_spec.rb => ansi_colors_spec.rb} (95%) create mode 100644 spec/color_settings_spec.rb create mode 100755 tools/tilux/ansi_colors.rb delete mode 100755 tools/tilux/color_names.rb create mode 100755 tools/tilux/color_settings.rb diff --git a/.custom_settings.example.yaml b/.custom_settings.example.yaml new file mode 100644 index 0000000..f520e01 --- /dev/null +++ b/.custom_settings.example.yaml @@ -0,0 +1,13 @@ +# Default values +custom: + header_color: red + version_text_color: light_white + version_number_color: light_blue + author_color: light_white + link_color: light_white + prompt_text_color: light_white + prompt_color: light_yellow + + # For Python logo tool + logo_color: red + logo_font: slant diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a71b8b5..795680e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,7 +37,7 @@ and add the file to `docs/source/index.rst` `toctree`. ## Updating Docs -In the case you are updating `docs/source/commands.md`, `docs/source/packages.md`, +In the case you are updating `docs/source/guide.md`, `docs/source/packages.md`, `GUIDE.md` and/or `PACKAGES.md`. Changes must be made in `GUIDE.md` and/or `PACKAGES.md`. Applying the changes also to `docs/source/` using `scripts/copy_content`. diff --git a/Dockerfile b/Dockerfile index 774f656..5218073 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,10 +16,7 @@ RUN apt update \ clang-format \ && apt clean -RUN git clone https://github.com/endormi/tilux.git \ - && cd tilux - -COPY . ./ +RUN git clone https://github.com/endormi/tilux.git . ENV BUNDLER_VERSION=2.1.4 @@ -33,7 +30,7 @@ ENV BUNDLE_SILENCE_ROOT_WARNING=1 \ BUNDLE_APP_CONFIG="$GEM_HOME" # Will install required packages and give permission for scripts -# When installing Python packages, it will give an warning: +# When installing Python packages, it will give a warning: # Running pip as root will break packages and permissions. # Since we're using a container, we don't need to worry about this. RUN bash build y diff --git a/GUIDE.md b/GUIDE.md index 6a8048d..5372f64 100644 --- a/GUIDE.md +++ b/GUIDE.md @@ -1,9 +1,10 @@ # Guide -- [Commands to use](#commands) -- [Run from any folder](#run-from-any-folder) +- [Commands](#commands) +- [Running Individual Scripts](#running-individual-scripts) - [Running with Docker](#running-with-docker) -- [Download script or scripts](#download-script-or-scripts) +- [Download Script or Scripts](#download-script-or-scripts) +- [Customize-Colors-and-Font](#customize-colors-and-font) ## Commands @@ -188,3 +189,80 @@ wget -O - https://raw.githubusercontent.com/endormi/tilux/master/download/downlo After downloading the scripts, you can add them to your `dotfiles` or any other desired location. + +## Customize Colors and Font + +You can now personalize the appearance with custom colors and font settings. +To get started, create a new file named `.custom_settings.yaml`. + +Here's an example of the file contents, derived from the +`.custom_settings.example.yaml` file, which provides default values: + +``` +# Default values +custom: + header_color: red + version_text_color: light_white + version_number_color: light_blue + author_color: light_white + link_color: light_white + prompt_text_color: light_white + prompt_color: light_yellow + + # For Python logo tool + logo_color: red + logo_font: slant +``` + +You can customize your preferences by modifying the file `.custom_settings.yaml` +as shown below: + +> **NOTE:** The provided example below has just a subset of the available +customization options. Feel free to explore and modify other values in the +`.custom_settings.yaml` file according to your preferences. +Refer to the default values for the full list of customization options. + +``` +custom: + header_color: blue + prompt_text_color: red + prompt_color: blue + + logo_color: blue + logo_font: block +``` + +When creating the `.custom_settings.yaml` file, ensure it is not empty +to avoid errors. You can choose to customize specific values, +such as `header_color`, while leaving others to retain their +default color and font values. + +### Supported Customizations + +For the colors, `ANSI` foreground colors are supported. Utilize the following values: + +> **NOTE:** To use light colors, simply prepend `light_` +to the color name, such as `light_red`. + +``` +black +red +green +yellow +blue +purple +cyan +white +``` + +For `logo_color` and `logo_font`, the options are drawn from `termcolor` and `FIGlet`. +Explore the available options for `logo_color` in the `termcolor` +[README.md](https://github.com/termcolor/termcolor#text-properties). The color options +provided here align with the earlier set values, with the only distinction being +the use of purple instead of magenta and some light colors. + +For font options, refer to this [example site](http://www.figlet.org/examples.html) +showcasing various fonts. + +Customize different configurations to find the perfect customization +that suits your preferences. diff --git a/README.md b/README.md index 6740a56..bfd9c2e 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,8 @@ deactivate You can now use the `tilux` command: +> **NOTE:** Remember to `chmod +x tilux` before. + ```bash ./tilux ``` @@ -177,7 +179,7 @@ tilux ``` > **NOTE**: `tilux` is not required to run scripts individually. -For more information, refer to [this section](GUIDE.md#run-from-any-folder) +For more information, refer to [this section](GUIDE.md#running-individual-scripts) in the guide. ### Platform Compatibility @@ -191,7 +193,7 @@ Pull requests for adding support for different distros are highly appreciated. ### Additional Information To explore additional commands, learn how to run scripts from any folder, use Docker, -or download scripts, please refer to the [guide](GUIDE.md). +download scripts, or customize colors and font, please refer to the [guide](GUIDE.md). For running the documentation locally, use the following command: diff --git a/build b/build index 5ba7a98..7dc575d 100644 --- a/build +++ b/build @@ -1,8 +1,5 @@ #!/bin/bash -green="\033[0;32m" -white="\033[1;37m" - version=$(cat .version) text="Building Tilux v.$version" @@ -64,4 +61,4 @@ pip3 install -r requirements.txt && bundle install clear echo "Note: Certain scripts might require you to install a package. It's included in the script." -echo -e "${green}Thanks for using Tilux!${white}\n" +echo -e "Thanks for using Tilux!\n" diff --git a/docs/source/commands.md b/docs/source/guide.md similarity index 67% rename from docs/source/commands.md rename to docs/source/guide.md index 1b5297d..e5ea5d4 100644 --- a/docs/source/commands.md +++ b/docs/source/guide.md @@ -1,9 +1,4 @@ -# Commands - -- [Commands to use](#commands) -- [Run from any folder](#run-from-any-folder) -- [Running with Docker](#running-with-docker) -- [Download script or scripts](#download-script-or-scripts) +# Guide ## Commands @@ -188,3 +183,80 @@ wget -O - https://raw.githubusercontent.com/endormi/tilux/master/download/downlo After downloading the scripts, you can add them to your `dotfiles` or any other desired location. + +## Customize Colors and Font + +You can now personalize the appearance with custom colors and font settings. +To get started, create a new file named `.custom_settings.yaml`. + +Here's an example of the file contents, derived from the +`.custom_settings.example.yaml` file, which provides default values: + +``` +# Default values +custom: + header_color: red + version_text_color: light_white + version_number_color: light_blue + author_color: light_white + link_color: light_white + prompt_text_color: light_white + prompt_color: light_yellow + + # For Python logo tool + logo_color: red + logo_font: slant +``` + +You can customize your preferences by modifying the file `.custom_settings.yaml` +as shown below: + +> **NOTE:** The provided example below has just a subset of the available +customization options. Feel free to explore and modify other values in the +`.custom_settings.yaml` file according to your preferences. +Refer to the default values for the full list of customization options. + +``` +custom: + header_color: blue + prompt_text_color: red + prompt_color: blue + + logo_color: blue + logo_font: block +``` + +When creating the `.custom_settings.yaml` file, ensure it is not empty +to avoid errors. You can choose to customize specific values, +such as `header_color`, while leaving others to retain their +default color and font values. + +### Supported Customizations + +For the colors, `ANSI` foreground colors are supported. Utilize the following values: + +> **NOTE:** To use light colors, simply prepend `light_` +to the color name, such as `light_red`. + +``` +black +red +green +yellow +blue +purple +cyan +white +``` + +For `logo_color` and `logo_font`, the options are drawn from `termcolor` and `FIGlet`. +Explore the available options for `logo_color` in the `termcolor` +[README.md](https://github.com/termcolor/termcolor#text-properties). The color options +provided here align with the earlier set values, with the only distinction being +the use of purple instead of magenta and some light colors. + +For font options, refer to this [example site](http://www.figlet.org/examples.html) +showcasing various fonts. + +Customize different configurations to find the perfect customization +that suits your preferences. diff --git a/docs/source/index.rst b/docs/source/index.rst index 98b36d5..4fe730d 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -31,7 +31,7 @@ I have utilized multiple programming languages instead of just one.* :caption: Contents: usage - commands + guide packages Indices and tables diff --git a/docs/source/usage.md b/docs/source/usage.md index 784afee..b2f731c 100644 --- a/docs/source/usage.md +++ b/docs/source/usage.md @@ -96,6 +96,8 @@ deactivate You can now use the `tilux` command: +> **NOTE:** Remember to `chmod +x tilux` before. + ``` ./tilux ``` @@ -145,8 +147,8 @@ tilux ``` **NOTE**: `tilux` is not required to run scripts individually. -For more information, refer to #run-from-any-folder from -the commands section. +For more information, refer to #running-individual-scripts from +the guide section. ## Additional Information diff --git a/scripts/README.md b/scripts/README.md index bc08c88..1ca77a9 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -29,7 +29,6 @@ adding it to the system's `PATH` - `groff` - Runs the manpage - `install_req` - Installs required packages - `latest_release` - Display latest release -- `list_of_files` - Display list of files in each language, because there are many - `open_repo` - Opens tilux repository - `resize_term` - Resizes terminal - `run_sphinx_locally` - Run sphinx documentation locally diff --git a/scripts/copy_content b/scripts/copy_content index 23acc29..ccd68d3 100755 --- a/scripts/copy_content +++ b/scripts/copy_content @@ -7,15 +7,19 @@ ./scripts/utils/check_and_install_package sed docs_dir="docs/source" -copy_guide="GUIDE.md" -write_to_commands="$docs_dir/commands.md" -new_heading="# Commands" -cp $copy_guide $write_to_commands -sed -i "1 s/.*/$new_heading/" $write_to_commands +copy_pairs() { + cp "$1" "$docs_dir/$2" +} -copy_packages="packages.md" -uppercase_packages="$(tr '[:lower:]' '[:upper:]' <<< ${copy_packages:0:8})${copy_packages:8}" +file_pairs=( + "GUIDE.md guide.md" + "PACKAGES.md packages.md" +) -cp $uppercase_packages $docs_dir/$copy_packages -sed -i "$ d" $docs_dir/$copy_packages +for pair in "${file_pairs[@]}"; do + copy_pairs $pair +done + +sed -i '2,7d' "$docs_dir/guide.md" +sed -i '30,31d' "$docs_dir/packages.md" diff --git a/scripts/list_of_files b/scripts/list_of_files deleted file mode 100755 index a104e44..0000000 --- a/scripts/list_of_files +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -[ ! -d scripts ] && cd .. - -function list_of_files(){ - args="$1" - - find . -type f -name "*.$args" -not -path "./venv/*" && echo -} - -declare -a languages=( - "rb" - "py" - "c" - "sh" -) - -for i in "${languages[@]}" -do - list_of_files "$i" -done - -echo "Bash files:" -find ./scripts -type f -not \( -name "*~" -or -name "*#" \) -print diff --git a/spec/color_names_spec.rb b/spec/ansi_colors_spec.rb similarity index 95% rename from spec/color_names_spec.rb rename to spec/ansi_colors_spec.rb index 3cb285b..1abf38a 100644 --- a/spec/color_names_spec.rb +++ b/spec/ansi_colors_spec.rb @@ -1,4 +1,4 @@ -require_relative '../tools/tilux/color_names' +require_relative '../tools/tilux/ansi_colors' RSpec.describe ANSIColors do let(:string) { 'Test String' } @@ -76,7 +76,7 @@ describe '#white' do it 'returns the string wrapped with the white color code' do colored_string = string.white - expect(colored_string).to eq("\e[1;37mTest String\e[0m") + expect(colored_string).to eq("\e[37mTest String\e[0m") end end end diff --git a/spec/color_settings_spec.rb b/spec/color_settings_spec.rb new file mode 100644 index 0000000..ee30ccb --- /dev/null +++ b/spec/color_settings_spec.rb @@ -0,0 +1,36 @@ +require 'yaml' +require_relative '../tools/tilux/color_settings' + +PATH = '/mock/path'.freeze + +RSpec.describe ColorSettings do + describe '.load_colors' do + context 'when custom settings file exists' do + before do + allow(File).to receive(:exist?).with("#{PATH}/.custom_settings.yaml").and_return(true) + end + + it 'loads custom colors from the file' do + allow(YAML).to receive(:load_file) + .with("#{PATH}/.custom_settings.yaml") + .and_return('custom' => { 'header_color' => 'blue' }) + expect(ColorSettings.load_colors).to include('header_color' => 'blue') + end + + it 'falls back to default colors if not specified in the file' do + allow(YAML).to receive(:load_file).with("#{PATH}/.custom_settings.yaml").and_return('custom' => {}) + expect(ColorSettings.load_colors['undefined_color']).to eq(ColorSettings::DEFAULT_COLORS['undefined_color']) + end + end + + context 'when custom settings file does not exist' do + before do + allow(File).to receive(:exist?).with("#{PATH}/.custom_settings.yaml").and_return(false) + end + + it 'returns default colors' do + expect(ColorSettings.load_colors).to eq(ColorSettings::DEFAULT_COLORS) + end + end + end +end diff --git a/spec/command_processor_spec.rb b/spec/command_processor_spec.rb index 6093938..a15ce49 100644 --- a/spec/command_processor_spec.rb +++ b/spec/command_processor_spec.rb @@ -66,6 +66,15 @@ end end + describe '#prompt' do + it 'returns a formatted prompt with the correct color' do + # Stub or set up any necessary methods or properties, including load_colors + allow(command_processor).to receive(:load_colors).and_return({ 'prompt_color' => 'light_yellow' }) + expected_prompt = "\ntilux~# ".send(command_processor.instance_variable_get(:@all_colors)['prompt_color']) + expect(command_processor.prompt).to eq(expected_prompt) + end + end + describe '#print_script_prompt' do it 'prints the script prompt' do expect { command_processor.print_script_prompt }.to output(/.*What script do you want to run?.*/).to_stdout diff --git a/spec/helpers_spec.rb b/spec/helpers_spec.rb index 3552777..15abae9 100644 --- a/spec/helpers_spec.rb +++ b/spec/helpers_spec.rb @@ -11,13 +11,6 @@ end end - describe '.prompt' do - it 'returns the Tilux prompt string' do - prompt = described_class.prompt - expect(prompt).to eq("\ntilux~# ".light_yellow) - end - end - describe '.sys' do it 'clears the screen and executes the given system command' do expect(described_class).to receive(:system).with('clear') diff --git a/tools/README.md b/tools/README.md index fbe67d4..64c1b80 100644 --- a/tools/README.md +++ b/tools/README.md @@ -14,14 +14,15 @@ empty inputs in different languages (since I've used multiple languages). Inside the folder Tilux: -- `color_names.rb` ANSI-Colors. +- `ansi_colors.rb` ANSI-Colors. -- `command_options.rb` to run files. +- `color_settings.rb` manages color customization settings. -- `command_processor.rb` class encapsulates the functionality related to -processing commands in Tilux. The helper methods are instance methods of the class, -allowing better organization and encapsulation. +- `command_options.rb` to run all of the scripts Tilux provides. + +- `command_processor.rb` Manages command processing in Tilux with encapsulated +helper methods for improved organization and encapsulation. - `helpers.rb` collection of helper methods. -- `print_options.rb` to print options. +- `print_options.rb` offers interactive and command-line options. diff --git a/tools/logos.py b/tools/logos.py index 740f3d7..28b780f 100644 --- a/tools/logos.py +++ b/tools/logos.py @@ -1,13 +1,24 @@ #!/usr/bin/env python3 +import os +import yaml from pyfiglet import figlet_format from termcolor import cprint -font = 'slant' -c = 'red' - - class Logo: def __init__(self, name): - self.name = cprint(figlet_format(name, font=font), c) + try: + logos_tool_path = os.path.dirname(os.path.abspath(__file__)) + custom_settings_file_path = os.path.join(logos_tool_path, os.pardir, '.custom_settings.yaml') + + with open(custom_settings_file_path, 'r') as custom_settings_file: + config = yaml.safe_load(custom_settings_file).get('custom', {}) + logo_color = config.get('logo_color', 'red') + logo_font = config.get('logo_font', 'slant') + + except (FileNotFoundError, yaml.YAMLError): + logo_color = 'red' + logo_font = 'slant' + + self.name = cprint(figlet_format(name, font=logo_font), logo_color) diff --git a/tools/tilux/ansi_colors.rb b/tools/tilux/ansi_colors.rb new file mode 100755 index 0000000..72b5391 --- /dev/null +++ b/tools/tilux/ansi_colors.rb @@ -0,0 +1,31 @@ +#!/usr/bin/ruby + +# ANSI-Colors module for Ruby string colors +module ANSIColors + COLOR_CODES = { + 'black' => 30, + 'red' => 31, + 'green' => 32, + 'yellow' => 33, + 'blue' => 34, + 'purple' => 35, + 'cyan' => 36, + 'white' => 37 + }.freeze + + def color(color_code) + "\e[#{color_code}m#{self}\e[0m" + end + + def light_color(lcolor_code) + "\e[1;#{lcolor_code}m#{self}\e[0m" + end + + COLOR_CODES.each do |color_name, color_code| + define_method(color_name) { color(color_code.to_s) } + define_method("light_#{color_name}") { light_color(color_code.to_s) } + end +end + +# Include ANSIColors module in the String class +String.include(ANSIColors) diff --git a/tools/tilux/color_names.rb b/tools/tilux/color_names.rb deleted file mode 100755 index 182c4d9..0000000 --- a/tools/tilux/color_names.rb +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/ruby - -# ANSI-Colors module for Ruby string colors -module ANSIColors - def color(color_code) - "\e[#{color_code}m#{self}\e[0m" - end - - def light_color(lcolor_code) - "\e[1;#{lcolor_code}m#{self}\e[0m" - end - - def red - color(31) - end - - def light_red - light_color(31) - end - - def green - color(32) - end - - def light_green - light_color(32) - end - - def yellow - color(33) - end - - def light_yellow - light_color(33) - end - - def blue - color(34) - end - - def light_blue - light_color(34) - end - - def white - light_color(37) - end -end - -# Include ANSIColors module in the String class -String.include(ANSIColors) diff --git a/tools/tilux/color_settings.rb b/tools/tilux/color_settings.rb new file mode 100755 index 0000000..6f85245 --- /dev/null +++ b/tools/tilux/color_settings.rb @@ -0,0 +1,35 @@ +#!/usr/bin/ruby + +require 'yaml' + +# ColorSettings manages color customization settings for Tilux. +class ColorSettings + DEFAULT_COLORS = { + 'header_color' => 'red', + 'version_text_color' => 'light_white', + 'version_number_color' => 'light_blue', + 'author_color' => 'light_white', + 'link_color' => 'light_white', + 'prompt_text_color' => 'light_white', + 'prompt_color' => 'light_yellow' + }.freeze + + def self.load_colors + custom_settings_file = File.join(PATH, '.custom_settings.yaml') + + if File.exist?(custom_settings_file) + config = YAML.load_file(custom_settings_file)['custom'] || {} + colors = %w[header_color version_text_color version_number_color author_color link_color + prompt_text_color prompt_color] + result_colors = {} + + colors.each do |color| + result_colors[color] = config.fetch(color, DEFAULT_COLORS[color]) + end + + result_colors + else + DEFAULT_COLORS + end + end +end diff --git a/tools/tilux/command_processor.rb b/tools/tilux/command_processor.rb index 5d5b400..ba19c9e 100755 --- a/tools/tilux/command_processor.rb +++ b/tools/tilux/command_processor.rb @@ -1,19 +1,13 @@ #!/usr/bin/ruby require_relative '../catch_exception' -require_relative 'color_names' +require_relative 'ansi_colors' +require_relative 'color_settings' require_relative 'command_options' require_relative 'helpers' require_relative 'print_options' -# TiluxCommandProcessor is responsible for processing user commands and executing corresponding actions. -class TiluxCommandProcessor - def initialize(version) - @version = version - end - - def print_header - puts " +HEADER = " ooooooooooooo ooooo ooooo ooooo ooo ooooooo ooooo 8 888 8 888 888 888 8 8888 d8 888 888 888 888 8 Y888..8P @@ -21,9 +15,21 @@ def print_header 888 888 888 888 8 .8PY888. 888 888 888 o 88. .8 d8 888b o888o o888o o888ooooood8 YbodP o888o o88888o - ".red - print 'version'.white, " #{@version}".light_blue, ' by Endormi '.white - print "\e]8;;https://github.com/endormi/tilux\a(github.com/endormi/tilux)\e]8;;\a".white, "\n" +".freeze + +# TiluxCommandProcessor is responsible for processing user commands and executing corresponding actions. +class TiluxCommandProcessor + def initialize(version) + @all_colors = ColorSettings.load_colors + @version = version + end + + def print_header + puts HEADER.send(@all_colors['header_color']) + print 'version'.send(@all_colors['version_text_color']), " #{@version}".send(@all_colors['version_number_color']) + print ' by Endormi '.send(@all_colors['author_color']) + print "\e]8;;https://github.com/endormi/tilux\a(github.com/endormi/tilux)\e]8;;\a".send(@all_colors['link_color']) + print "\n" end # Prints the option choices and executes the selected choice. @@ -41,7 +47,7 @@ def print_option(choice, cmd_hash) else abort 'Invalid choice!' end - print TiluxHelpers.prompt + print prompt end # Handles the main choices and executes the corresponding action. @@ -86,11 +92,18 @@ def nested_choices(nested_choice) ) end + # Generate the prompt for Tilux + # + # @return [String] The prompt string. + def prompt + "\ntilux~# ".send(@all_colors['prompt_color']) + end + # Prints the prompt for script selection. def print_script_prompt - puts "\nWhat script do you want to run?\n".white + puts "\nWhat script do you want to run?\n".send(@all_colors['prompt_text_color']) tilux_print - print TiluxHelpers.prompt + print prompt end # Executes the specified value as a command. diff --git a/tools/tilux/helpers.rb b/tools/tilux/helpers.rb index b30d501..c449b55 100755 --- a/tools/tilux/helpers.rb +++ b/tools/tilux/helpers.rb @@ -1,6 +1,6 @@ #!/usr/bin/ruby -require_relative 'color_names' +require_relative 'ansi_colors' require_relative 'print_options' VERSION_FILE_PATH = File.expand_path('../../.version', File.dirname(__FILE__)) @@ -14,13 +14,6 @@ def self.load_version File.open(VERSION_FILE_PATH) { |file| file.read.strip } end - # Generate the prompt for Tilux - # - # @return [String] The prompt string. - def self.prompt - "\ntilux~# ".light_yellow - end - # Clear the screen and execute a system command # # @param file [String] The system command to execute.