{"id":13667322,"url":"https://github.com/antoniosarosi/pycritty","last_synced_at":"2025-04-05T00:09:18.766Z","repository":{"id":43353662,"uuid":"320054354","full_name":"antoniosarosi/pycritty","owner":"antoniosarosi","description":"CLI program that allows you to change your Alacritty config with one command without editing the config file.","archived":false,"fork":false,"pushed_at":"2024-07-21T17:51:42.000Z","size":255,"stargazers_count":233,"open_issues_count":2,"forks_count":37,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-28T23:07:55.299Z","etag":null,"topics":["alacritty","alacritty-config","alacritty-theme","alacritty-theme-changer","nerd-fonts","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antoniosarosi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-09T19:09:31.000Z","updated_at":"2025-03-18T19:41:52.000Z","dependencies_parsed_at":"2024-01-14T16:13:07.669Z","dependency_job_id":"d0b3a3d7-d83c-49ed-931f-324197251357","html_url":"https://github.com/antoniosarosi/pycritty","commit_stats":{"total_commits":72,"total_committers":8,"mean_commits":9.0,"dds":"0.26388888888888884","last_synced_commit":"bf785c5aa464358f5b692832562fd983bd407b0f"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniosarosi%2Fpycritty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniosarosi%2Fpycritty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniosarosi%2Fpycritty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniosarosi%2Fpycritty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antoniosarosi","download_url":"https://codeload.github.com/antoniosarosi/pycritty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266564,"owners_count":20910836,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alacritty","alacritty-config","alacritty-theme","alacritty-theme-changer","nerd-fonts","python"],"created_at":"2024-08-02T07:00:35.104Z","updated_at":"2025-04-05T00:09:18.746Z","avatar_url":"https://github.com/antoniosarosi.png","language":"Python","funding_links":[],"categories":["Python","HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# Pycritty\n\nChange your alacritty config on the fly!\n\n![Preview Image](https://raw.githubusercontent.com/antoniosarosi/pycritty/master/preview.png)\n\n## Installation:\n\n```bash\npip install pycritty\n```\n\nBy default, only the program itself will be installed, but you can install\ndefault themes from [```config/themes```](https://github.com/antoniosarosi/pycritty/tree/master/config):\n\n```bash\npip install --install-option=\"--themes=onedark,dracula,nord\" pycritty\n```\n\nOr if you want them all:\n```bash\npip install --install-option=\"--themes=all\" pycritty\n```\n\nMake sure to have ```~/.local/bin``` directory in your ```$PATH```, otherwise\nyour shell won't find the ```pycritty``` command. Add this line to your\n```~/.xprofile``` if you haven't already:\n\n```bash\nexport PATH=$HOME/.local/bin:$PATH\n```\n\nAlso if you are an Arch user you can install from the AUR (only the program will be installed)\n```bash\ngit clone https://aur.archlinux.org/pycritty.git\ncd pycritty\nmakepkg -si\n```\nOr with an AUR helper like yay\n```bash\nyay -S pycritty\n```\n\n## Usage:\n\nChange your current config:\n\n```bash\npycritty --font UbuntuMono --font-size 14 --opacity 0.95 --padding 3 3\n```\n\nSave multiple configs and reuse them later:\n\n```bash\npycritty save ThisConfig\npycritty load AnotherConfig\n```\n\nInstall themes and configs from URLs:\n```bash\npycritty install --theme https://raw.githubusercontent.com/antoniosarosi/pycritty/master/config/themes/breeze.yaml\npycritty --theme breeze # Apply downloaded theme\npycritty install --config --name SomeCoolConfig https://raw.githubusercontent.com/antoniosarosi/dotfiles/master/.config/alacritty/config.yaml\npycritty load SomeCoolConfig # Apply downloaded config\n```\n\nCheck help for all available options:\n```bash\npycritty -h\n# pycritty subcomand -h\npycritty save -h\n```\n\n## Fonts Config\n\nFonts are configured at ```~/.config/alacritty/fonts.yaml``` with this format:\n```yaml\nfonts:\n    Alias: Font Name\n```\n\nWhen applied using ```pycritty -f Alias```, the previous format will be\nconverted into the alacritty equivalent:\n\n```yaml\nfont:\n    normal:\n        family: Font Name\n    italic:\n        family: Font Name\n    bold:\n        family: Font Name\n```\n\nYou can also specify a different font for each font type:\n\n```yaml\nfonts:\n    Alias:\n        normal: Normal Font Name\n        bold: Bold Font Name\n        italic: Italic Font Name\n```\n\nNote that the fonts must be installed on your system.\n\n## Theme Config\n\nYou can make your own custom themes by creating new theme files with the\ncorrect format, ```~/.config/alacritty/themes/custom.yaml``` should look like\nthis:\n\n```yaml\ncolors:\n    # Default colors\n    primary:\n        background: '0x292d3e'\n        foreground: '0xbbc5ff'\n    # Normal colors\n    normal:\n        black:   '0x101010'\n        red:     '0xf07178'\n        green:   '0xc3e88d'\n        yellow:  '0xffcb6b'\n        blue:    '0x82aaff'\n        magenta: '0xc792ea'\n        cyan:    '0x89ddff'\n        white:   '0xd0d0d0'\n    # Bright colors\n    bright:\n        black:   '0x434758'\n        red:     '0xff8b92'\n        green:   '0xddffa7'\n        yellow:  '0xffe585'\n        blue:    '0x9cc4ff'\n        magenta: '0xe1acff'\n        cyan:    '0xa3f7ff'\n        white:   '0xffffff'\n```\n\nThen you can apply it using the name of the file:\n\n```bash\npycritty -t custom\n```\n\n## Custom scripts\n\nIf you want to apply different configs programmatically, you can either use\nthe CLI in a shell script or use ```pycritty``` as a python module:\n\n```python\n#!/bin/python3\n\n# Dummy script that changes the theme every 5 minutes\n\nimport time\nimport pycritty\n\n\ndef main():\n    config = pycritty.Config()\n    while True:\n        for theme in pycritty.list_themes():\n            config.change_theme(theme)  # or config.set(theme=theme)\n            config.apply()\n            time.sleep(300)\n\n\nif __name__ == '__main__':\n    main()\n```\n\nShell equivalent:\n\n```bash\n#!/bin/bash\n\nwhile :; do\n    # Same as pycritty ls --themes --iterable\n    for theme in $(pycritty ls -ti); do\n        pycritty -t $theme\n        sleep 300\n    done\ndone\n```\n\n## Development\n\nClone the repository and run it as a module.\n\n```bash\ngit clone git@github.com:antoniosarosi/pycritty\ncd pycritty\npython -m pycritty.main\n```\n\n## Publishing\n\n### PyPi\n\n```bash\n# First make sure you have these packages installed\npip install --user --upgrade setuptools wheel twine\n# Generate distribution files\npython setup.py sdist bdist_wheel\n# Test upload\npython -m twine upload --repository testpypi dist/*\n# Test download\npip install -i https://test.pypi.org/simple/ --no-deps pycritty\n# Upload to PyPi\npython -m twine upload --repository pypi dist/*\n```\n\n### AUR\n```bash\n# In the AUR repository\nsed -i \"s/^pkgver=[[:digit:]].[[:digit:]].[[:digit:]]/pkgver=$(python -m pycritty.main -v)/\" PKGBUILD\nupdpkgsums\nmakepkg --printsrcinfo \u003e .SRCINFO\n\n# Theoretically this package should be fine with only update its version and checksums\n# but you have to check if this package compiles or not\ngit add PKGBUILD .SRCINFO\n# Commits will be authored with global git name and email address\n# If you want to use different credentials change them with git config\ngit commit -m \"bump to $(python -m pycritty.main -v)\"\ngit push\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoniosarosi%2Fpycritty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantoniosarosi%2Fpycritty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoniosarosi%2Fpycritty/lists"}