dye-your-shell


Namedye-your-shell JSON
Version 0.8.0 PyPI version JSON
download
home_pageNone
SummaryApply color themes to a variety of shell command line tools.
upload_time2025-01-10 05:19:57
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License Copyright (c) 2023 kotfu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords shell bash theme command line
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # shell-themer

There are many modern *nix and *bsd command line tools which can output
using a full 16.7 million color palette. For example:

* [fzf](https://github.com/junegunn/fzf)
* [dust](https://github.com/bootandy/dust)
* [bat](https://github.com/sharkdp/bat)
* [gum](https://github.com/charmbracelet/gum)
* [eza](https://eza.rocks/)

Even the venerable `ls` can show various types of files in different colors.

Unfortunately, these tools all use slightly different color configuration mechanisms.
With enough fiddling, you can get your shell init scripts to make all these tools
use a similar color scheme, but if you want to change it, you've got a lot of work
ahead.

`shell-themer` uses a single theme configuration file to standardize and unify
a set of color configurations, and generates the shell code to implement those
changes.

All that hand tweaking in your shell init files can now be replaced with:
```
export THEME_FILE=~/themes/dracula.toml
source <(shell-themer generate)
```

This changes all your environment variables and other settings for the many
shell tools you use to reflect the colors in the theme you have specified.

## Theme Files

Here's an example of a theme file:
```
#
# sample definition for a dracula theme

version = "1.0.0"
name = "dracula"

[styles]
# these are from https://draculatheme.com/contribute
background =  "#282a36"
foreground =  "#f8f8f2"

# styles for text and the highlighted line
# these are the only things fzf supports background colors for
text = "#f8f8f2 on default"
current_line =  "#f8f8f2 on #44475a"

# other colors from the dracula palette
comment =  "#6272a4"
cyan =  "#8be9fd"
green =  "#50fa7b"
orange =  "#ffb86c"
pink =  "#ff79c6"
purple =  "#bd93f9"
red =  "#ff5555"
yellow =  "#f1fa8c"

[scope.iterm]
agent = "iterm"
style.foreground = "foreground"
style.background = "background"

[scope.ls_colors]
agent = "environment_variables"
export.LS_COLORS = "$(vivid generate dracula)"

[scope.bat]
agent = "environment_variables"
export.BAT_THEME = "Dracula"

[scope.fzf]
agent = "fzf"
environment_variable = "FZF_DEFAULT_OPTS"
colorbase = "dark"

# command line options
opt.--pointer = "•"
opt.--prompt = "> "
opt.--bind = "ctrl-k:kill-line,ctrl-j:ignore,ctrl-u:unix-line-discard"

# these styles are special because they set both foreground and background
style.text = "text"
style.current_line = "current_line"

# no special parsing for these styles, just use the fzf color name
# highlighted substrings
style.hl = "pink"
# highlighted substrings current line
style."hl+" = "pink"
style.label = "green"
style.border = "orange"
style.prompt = "green"
style.pointer = "cyan"
style.query = "pink"
```

## Installation

You'll need python version 3.9 or higher. Install with [pipx](https://pipx.pypa.io/stable/):
```
$ pipx install shell_themer
```

You need a *nix-ish bash shell environment. Probably works in Windows Subsystem
for Linux, but isn't tested there.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "dye-your-shell",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "shell, bash, theme, command line",
    "author": null,
    "author_email": "Jared Crapo <jared@kotfu.net>",
    "download_url": "https://files.pythonhosted.org/packages/5d/4a/639e3cc3c6e370efd52c7d7bd2d68345d1274340d12cf165d690d29f7dcf/dye_your_shell-0.8.0.tar.gz",
    "platform": null,
    "description": "# shell-themer\n\nThere are many modern *nix and *bsd command line tools which can output\nusing a full 16.7 million color palette. For example:\n\n* [fzf](https://github.com/junegunn/fzf)\n* [dust](https://github.com/bootandy/dust)\n* [bat](https://github.com/sharkdp/bat)\n* [gum](https://github.com/charmbracelet/gum)\n* [eza](https://eza.rocks/)\n\nEven the venerable `ls` can show various types of files in different colors.\n\nUnfortunately, these tools all use slightly different color configuration mechanisms.\nWith enough fiddling, you can get your shell init scripts to make all these tools\nuse a similar color scheme, but if you want to change it, you've got a lot of work\nahead.\n\n`shell-themer` uses a single theme configuration file to standardize and unify\na set of color configurations, and generates the shell code to implement those\nchanges.\n\nAll that hand tweaking in your shell init files can now be replaced with:\n```\nexport THEME_FILE=~/themes/dracula.toml\nsource <(shell-themer generate)\n```\n\nThis changes all your environment variables and other settings for the many\nshell tools you use to reflect the colors in the theme you have specified.\n\n## Theme Files\n\nHere's an example of a theme file:\n```\n#\n# sample definition for a dracula theme\n\nversion = \"1.0.0\"\nname = \"dracula\"\n\n[styles]\n# these are from https://draculatheme.com/contribute\nbackground =  \"#282a36\"\nforeground =  \"#f8f8f2\"\n\n# styles for text and the highlighted line\n# these are the only things fzf supports background colors for\ntext = \"#f8f8f2 on default\"\ncurrent_line =  \"#f8f8f2 on #44475a\"\n\n# other colors from the dracula palette\ncomment =  \"#6272a4\"\ncyan =  \"#8be9fd\"\ngreen =  \"#50fa7b\"\norange =  \"#ffb86c\"\npink =  \"#ff79c6\"\npurple =  \"#bd93f9\"\nred =  \"#ff5555\"\nyellow =  \"#f1fa8c\"\n\n[scope.iterm]\nagent = \"iterm\"\nstyle.foreground = \"foreground\"\nstyle.background = \"background\"\n\n[scope.ls_colors]\nagent = \"environment_variables\"\nexport.LS_COLORS = \"$(vivid generate dracula)\"\n\n[scope.bat]\nagent = \"environment_variables\"\nexport.BAT_THEME = \"Dracula\"\n\n[scope.fzf]\nagent = \"fzf\"\nenvironment_variable = \"FZF_DEFAULT_OPTS\"\ncolorbase = \"dark\"\n\n# command line options\nopt.--pointer = \"\u2022\"\nopt.--prompt = \"> \"\nopt.--bind = \"ctrl-k:kill-line,ctrl-j:ignore,ctrl-u:unix-line-discard\"\n\n# these styles are special because they set both foreground and background\nstyle.text = \"text\"\nstyle.current_line = \"current_line\"\n\n# no special parsing for these styles, just use the fzf color name\n# highlighted substrings\nstyle.hl = \"pink\"\n# highlighted substrings current line\nstyle.\"hl+\" = \"pink\"\nstyle.label = \"green\"\nstyle.border = \"orange\"\nstyle.prompt = \"green\"\nstyle.pointer = \"cyan\"\nstyle.query = \"pink\"\n```\n\n## Installation\n\nYou'll need python version 3.9 or higher. Install with [pipx](https://pipx.pypa.io/stable/):\n```\n$ pipx install shell_themer\n```\n\nYou need a *nix-ish bash shell environment. Probably works in Windows Subsystem\nfor Linux, but isn't tested there.\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 kotfu  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Apply color themes to a variety of shell command line tools.",
    "version": "0.8.0",
    "project_urls": {
        "homepage": "https://github.com/kotfu/dye-your-shell",
        "repository": "https://github.com/kotfu/dye-your-shell"
    },
    "split_keywords": [
        "shell",
        " bash",
        " theme",
        " command line"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c92bb952580315e82fa607c75367f3d85d87bc29c19b4b6fa9857518581765bf",
                "md5": "6f9e94e7820e7111db44412dd85973cf",
                "sha256": "524e04b02dc0fcdd66b65c6ac2bd95f60c020d2b45157c2139803968c7b83520"
            },
            "downloads": -1,
            "filename": "dye_your_shell-0.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6f9e94e7820e7111db44412dd85973cf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 31330,
            "upload_time": "2025-01-10T05:19:54",
            "upload_time_iso_8601": "2025-01-10T05:19:54.891303Z",
            "url": "https://files.pythonhosted.org/packages/c9/2b/b952580315e82fa607c75367f3d85d87bc29c19b4b6fa9857518581765bf/dye_your_shell-0.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5d4a639e3cc3c6e370efd52c7d7bd2d68345d1274340d12cf165d690d29f7dcf",
                "md5": "2ce054d9c5e81ceb5f06f9b9cf0e2dd9",
                "sha256": "0d61ee79041b1fa9bcbadbb9eef084e3dec533904c1be7fd0d7f1939812a9786"
            },
            "downloads": -1,
            "filename": "dye_your_shell-0.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2ce054d9c5e81ceb5f06f9b9cf0e2dd9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 50957,
            "upload_time": "2025-01-10T05:19:57",
            "upload_time_iso_8601": "2025-01-10T05:19:57.289220Z",
            "url": "https://files.pythonhosted.org/packages/5d/4a/639e3cc3c6e370efd52c7d7bd2d68345d1274340d12cf165d690d29f7dcf/dye_your_shell-0.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-10 05:19:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kotfu",
    "github_project": "dye-your-shell",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "dye-your-shell"
}
        
Elapsed time: 1.90413s