stylish

command module
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

README ยถ

A simple and intuitive way to create and apply stylish config files ๐Ÿ–Œ๏ธ

Works with ls, tree, fd, exa, and anything else that respects $LS_COLORS


Why use stylish โ“

  • NO file editing!
  • NO dealing with encoding strings!
  • NO manual mapping of hex codes to 8-bit colors!
  • NO blindly working without an actual preview!
  • NO need to hunt down scattered, poor documentation and references!

Quick Start ๐ŸŒฉ๏ธ

If you are comfortable with the defaults and just want to fast track your way to a pretty terminal, then you're just 2 steps away.

  • Install via one of the methods below
  • Add the following to your shell's init script:
eval $(stylish apply default)
alias ls=ls --color=auto
  • Be stylish on every future shell launch

Installation โฌ‡๏ธ

Github Releases ๐Ÿ™

  • Go to the Releases tab of the repo here
  • Download the latest binary for your OS
  • Place it on your $PATH and ensure it is executable

Homebrew ๐Ÿบ

  • Have brew installed
  • Run the following:
brew install daltonsw/tap/stylish

Go ๐Ÿ–ฅ๏ธ

  • Have Go
  • Have your Go install location on your $PATH
  • Run the following:
go install go.dalton.dog/stylish@latest

Usage โš™๏ธ

  • Start the program with stylish. This will:
    • Create a stylish directory in your user's default config directory (typically ~/.config)
    • Create a default theme inside of that directory. Note: This theme is intended to be used on a dark background
  • With the program running, you're able to create and edit your themes to your heart's content
  • Once you're ready to apply a theme, you'll need to add the following to your shell's init file (~/.bashrc, ~/.zshrc, etc.):
    • Required: eval $(stylish apply <theme>)
    • Recommended: alias ls=ls --color=auto
  • Once your init file is edited, relaunch your shell to start seeing the updated colors.

P.S.

Want to handle your hex code journey in your terminal too? Check out termpicker!

Commands ๐Ÿ“œ

stylish

Launch the TUI

  • If you run the program without any subcommands, it will launch you directly into the editor TUI

stylish apply [theme]

This command turns the theme's YAML files into the final environment variable expected format

  • Converts the given theme's YAML definition files into a dircolors compatible file
  • Saves the .dircolors file in the root of the theme's directory
  • Runs dircolors on the generated file to get the appropriate LS_COLORS string
  • Returns a command that's ready to be eval'd to automatically export the LS_COLORS string to the environment variable

stylish example [theme]

This command is to make setting up directories for example screenshots significantly easier and quicker

[!WARNING] This command requires the tree command to be installed

  • Creates an example directory located in your theme's root
  • For each style in your theme, a new directory is created matching the style's name
  • For each filetype associated with the theme (up to 4), a random filename is generated and a blank file is created with that name and filetype

Shoutouts ๐Ÿ—จ๏ธ

  • Jess for the great banner!
  • Vivid for being a great program and a great reference
  • Catppuccin for having pretty palettes
  • CharmBracelet for the amazing modules for style, form, and function

Contributions ๐Ÿ’œ

Contributions are very welcome! I'd love for y'all to contribute themes you develop as well as expanding on the defaults to make them more reasonable. Check out the CONTRIBUTING file for specifics.

License โš–๏ธ

Copyright 2025 - Dalton Williams
Check LICENSE in repo for full details

Documentation ยถ

The Go Gopher

There is no documentation for this package.

Directories ยถ

Path Synopsis
internal
tui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher ๐Ÿ‡ป๐Ÿ‡ณ