CLI program that allows you to change your Alacritty config with one command without editing the config file.

Overview

Pycritty

Change your alacritty config on the fly!

Preview Image

Installation:

pip install pycritty

By default, only the program itself will be installed, but you can install default themes from config/themes:

pip install --install-option="--themes=onedark,dracula,nord" pycritty

Or if you want them all:

pip install --install-option="--themes=all" pycritty

Make sure to have ~/.local/bin directory in your $PATH, otherwise your shell won't find the pycritty command. Add this line to your ~/.xprofile if you haven't already:

export PATH=$HOME/.local/bin:$PATH

Usage:

Change your current config:

pycritty --font UbuntuMono --size 14 --opacity 0.95

Save multiple configs and reuse them later:

pycritty save ThisConfig
pycritty load AnotherConfig

Install themes and configs from URLs:

pycritty install -t https://raw.githubusercontent.com/antoniosarosi/pycritty/master/config/themes/breeze.yaml
pycritty -t breeze
pycritty install -c -n SomeCoolConfig https://raw.githubusercontent.com/antoniosarosi/dotfiles/master/.config/alacritty/config.yaml
pycritty load SomeCoolConfig

Check help for all available options:

pycritty -h
# pycritty subcomand -h
pycritty save -h

Fonts Config

Fonts are configured in ~/.config/alacritty/fonts.yaml with this format:

fonts:
    Alias: Font Name

When applied using pycritty -f Alias, the previous format will be converted into the alacritty equivalent:

font:
    normal:
        family: Font Name
    italic:
        family: Font Name
    bold:
        family: Font Name

You can also specify a different font for each font type:

fonts:
    Alias:
        normal: Normal Font Name
        bold: Bold Font Name
        italic: Italic Font Name

Note that the fonts must be installed on your system.

Theme Config

You can make your own custom themes by creating new theme files with the correct format, ~/.config/alacritty/themes/custom.yaml should look like this:

colors:
    # Default colors
    primary:
        background: '0x292d3e'
        foreground: '0xbbc5ff'
    # Normal colors
    normal:
        black:   '0x101010'
        red:     '0xf07178'
        green:   '0xc3e88d'
        yellow:  '0xffcb6b'
        blue:    '0x82aaff'
        magenta: '0xc792ea'
        cyan:    '0x89ddff'
        white:   '0xd0d0d0'
    # Bright colors
    bright:
        black:   '0x434758'
        red:     '0xff8b92'
        green:   '0xddffa7'
        yellow:  '0xffe585'
        blue:    '0x9cc4ff'
        magenta: '0xe1acff'
        cyan:    '0xa3f7ff'
        white:   '0xffffff'

Then you can apply it using the name of the file:

pycritty -t custom

Custom scripts

If you want to apply different configs programmatically, you can either use the CLI in a shell script or use pycritty as a python module:

#!/bin/python3

# Dummy script that changes the theme every 5 minutes

from time import sleep
from pycritty.commands import Pycritty, ListResource


def main():
    ls = ListResource()
    conf = Pycritty()
    while True:
        for theme in ls.list_themes():
            conf.change_theme(theme)  # or conf.set(theme=theme)
            conf.apply()
            sleep(300)


if __name__ == '__main__':
    main()

Shell equivalent:

#!/bin/bash

while :; do
    # Same as pycritty ls --themes --iterable
    for theme in $(pycritty ls -ti); do
        pycritty -t $theme
        sleep 300
    done
done
You might also like...
Spotify Offline is a command line tool that allows one to download Spotify playlists in MP3 format.

Spotify Offline v0.0.2 listen to your favorite spotify songs, offline Overview Spotify Offline (spotifyoffline) is a command line tool that allows one

This is a CLI program which can help you generate your own QR Code.

Python-QR-code-generator This is a CLI program which can help you generate your own QR Code. Single.py This will allow you only to input a single mess

Command line tool to automate transforming the effects of one color profile to another, possibly more standard one.
Command line tool to automate transforming the effects of one color profile to another, possibly more standard one.

Finished rendering the frames of that animation, and now the colors look washed out and ugly? This terminal program will solve exactly that.

Limit your docker image size with a simple CLI command. Perfect to be used inside your CI process.

docker-image-size-limit Limit your docker image size with a simple CLI command. Perfect to be used inside your CI process. Read the announcing post. I

Zero-config CLI for TypeScript package development
Zero-config CLI for TypeScript package development

Despite all the recent hype, setting up a new TypeScript (x React) library can be tough. Between Rollup, Jest, tsconfig, Yarn resolutions, ESLint, and

Program Command Line Interface (CLI) Sederhana: Pemesanan Nasi Goreng Hekel

Program ini merupakan aplikasi yang berjalan di dalam command line (terminal). Program ini menggunakan built-in library python yaitu argparse yang dapat menerima parameter saat program ini dijalankan melalui terminal atau CLI.

A simple automation script that logs into your kra account and files your taxes with one command

EASY_TAX A simple automation script that logs into your kra account and files your taxes with one command Currently works for Chrome users. Will creat

inklayers is a command line program that exports layers from an SVG file.
inklayers is a command line program that exports layers from an SVG file.

inklayers is a command line program that exports layers from an SVG file. It can be used to create slide shows by editing a single SVG file.

A command-line tool to upload local files and pastebin pastes to your mega account, without signing in anywhere
A command-line tool to upload local files and pastebin pastes to your mega account, without signing in anywhere

A command-line tool to upload local files and pastebin pastes to your mega account, without signing in anywhere

Comments
  • I'm not able to run pycritty, relative imports error and not set pycritty as env variable

    I'm not able to run pycritty, relative imports error and not set pycritty as env variable

    First of all, when I run the command for install everything (pip install --install-option="--themes=all" pycritty) I have no errors but pycritty is not defined as an env variable. I go to the installation path in my case .local/lib/python3.9/site-packages/pycritty and try to run it as a normal python program (python main.py --font UbuntuMono --size 14 --opacity 0.95) And this is the error that shows me, it's like can't do relative imports: Screenshot_17

    I tried to add Pycritty Error on main class for removing the import, but shows the same error with other relative import.

    Any idea about why this is not working well?

    OS: Garuda (based on Arch) Desktop: Qtile

    opened by JarssS8 4
  • [PATCH] Add integration pipeline

    [PATCH] Add integration pipeline

    Add integration pipeline for pull request, this pipeline will run mypy, flake8 and unit tests. I also fixed some files to make the pipeline succeed. Pipeline tested in fork: Screenshot_2022-03-03_00-19-38

    opened by niconunez96 0
  • [PATCH] Add unit testing proposal

    [PATCH] Add unit testing proposal

    Adding a starting test suite only for Cli class and ls functions The idea is to have a test suite that will be triggered on an integration pipeline on every pull request along with mypy checks.

    opened by niconunez96 0
  • Changed deprecated option background_opacity to window.opacity

    Changed deprecated option background_opacity to window.opacity

    In Alacritty Version 0.10.0, the option "background_opacity" in the "alacritty.yml" customization config file is deprecated. This commit fixes the warning raised by this update and updates it to the recommended.

    opened by T1erno 0
Releases(v0.4.0)
Owner
Antonio Sarosi
Average Hacker
Antonio Sarosi
Konsave lets use save your KDE Plasma customizatios and restore them very easily!

Konsave (Save Plasma Customization) A CLI program that will let you save and apply your KDE Plasma customizations with just one command! Als

439 Jan 02, 2023
ddgr is a cmdline utility to search DuckDuckGo (html version) from the terminal

ddgr is a cmdline utility to search DuckDuckGo (html version) from the terminal. While googler is extremely popular among cmdline users, in many forums the need of a similar utility for privacy-aware

Piña Colada 2.5k Dec 25, 2022
A Python command-line utility for validating that the outputs of a given Declarative Form Azure Portal UI JSON template map to the input parameters of a given ARM Deployment Template JSON template

A Python command-line utility for validating that the outputs of a given Declarative Form Azure Portal UI JSON template map to the input parameters of a given ARM Deployment Template JSON template

Glenn Musa 1 Feb 03, 2022
A simple CLI productivity tool to quickly display the syntax of a desired piece of code

Iforgor Iforgor is a customisable and easy to use command line tool to manage code samples. It's a good way to quickly get your hand on syntax you don

Solaris 21 Jan 03, 2023
Ipylivebash - Run shell script in Jupyter with live output

ipylivebash ipylivebash is a library to run shell script in Jupyter with live ou

Ben Lau 6 Aug 27, 2022
A simple script that outputs the current date on the user interface/terminal.

Py-Date A simple script that outputs the current date on the user interface/terminal. How to Run Open your terminal and cd into the folder containi

Arinzechukwu Okoye 1 Jan 13, 2022
Limit your docker image size with a simple CLI command. Perfect to be used inside your CI process.

docker-image-size-limit Limit your docker image size with a simple CLI command. Perfect to be used inside your CI process. Read the announcing post. I

wemake.services 102 Dec 14, 2022
Loading animation; a progress bar

Loading animation; a progress bar. When you know the remaining time or task completion percentage, then you’re able to show an animated progress bar:

Goldy 1 Jan 23, 2022
Faza - Faza terminal, Faza help to beginners for pen testing

Faza terminal simple tool for pen testers Use small letter only for commands Don't use space after command 'help' for more information Installation gi

Ag3ntQ 5 Feb 20, 2022
GanTTY - Project planning from the terminal

GanTTY - Project planning from the terminal

Timeo Sam Pochin 161 Dec 26, 2022
Linux commands Interpreter for Windows and Mac based systems using Python

DBHTermEcIbP Linux commands Interpreter for Windows and Mac based systems using Python Basic Linux commands supported viewing current working director

Vraj Patel 1 Dec 26, 2021
CLI tool to develop StarkNet projects written in Cairo

⛵ Nile Navigate your StarkNet projects written in Cairo. Installation pip install cairo-nile Usage Install Cairo Use nile to install a given version o

Martín Triay 305 Dec 30, 2022
QueraToCSV is a simple python CLI project to convert the Quera results file into CSV files.

Quera is an Iranian Learning management system (LMS) that has an online judge for programming languages. Some Iranian universities use it to automate the evaluation of programming assignments.

Amirmahdi Namjoo 16 Nov 11, 2022
🐍 Python CLI tool to get public information from a GitHub account

🐍 Gitter 🐍 Python CLI tool to get public information from a GitHub account 🤔 What's this? Gitter is a open-source project created to easily uses th

opp? 3 Oct 14, 2022
Python package with library and CLI tool for analyzing SeaFlow data

Seaflowpy A Python package for SeaFlow flow cytometer data. Table of Contents Install Read EVT/OPP/VCT Files Command-line Interface Configuration Inte

<a href=[email protected]"> 3 Nov 03, 2021
⌨ Toward a more useful keyboard

Toward a more useful keyboard Steve Losh's Modern Space Cadet is an inspiration. It opened my eyes to the fact that there's a more useful keyboard hid

Jason Rudolph 1.7k Jan 01, 2023
A Command Line Error Parser Built using Python.

"Stalk Overflow with debuggy" Error Parser Everything is done in Python so it's extremely easy to install and use. Supports Python 3. Debuggy is used

Derhnyel 22 Nov 10, 2022
CLabel is a terminal-based cluster labeling tool that allows you to explore text data interactively and label clusters based on reviewing that data.

CLabel is a terminal-based cluster labeling tool that allows you to explore text data interactively and label clusters based on reviewing that

Peter Baumgartner 29 Aug 09, 2022
Vsm - A manager for the under-utilized mksession command in vim

Vim Session Manager A manager for the under-utilized `mksession` command in vim

Matt Williams 3 Oct 12, 2022
A Python package for a basic CLI and GUI user interface

Organizer CLI Organizer CLI is a python command line tool that goes through a given directory and organizes all un-folder bound files into folders by

Caltech Library 12 Mar 25, 2022