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
Personal and work vim 8 configuration with submodules

vimfiles Windows Vim 8 configuration files based on the recommendations of Ruslan Osipov, Keep Your vimrc file clean and The musings of bluz71. :help

1 Aug 27, 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
A cd command that learns - easily navigate directories from the command line

NAME autojump - a faster way to navigate your filesystem DESCRIPTION autojump is a faster way to navigate your filesystem. It works by maintaining a d

William Ting 14.5k Jan 03, 2023
Python3 library for multimedia functions at the command terminal

TERMINEDIA This is a Python library allowing using a text-terminal as a low-resolution graphics output, along with keyboard realtime reading, and a co

Joao S. O. Bueno 89 Dec 17, 2022
Simple tool, to update linux kernel on ubuntu

Kerbswap Simple tool, to update linux kernel on ubuntu Information At the moment, this tool only supports "Ubuntu" distributions, but will be expanded

dword 1 Oct 31, 2021
A CLI tool for searching and watching videos on youtube with no spyware and MPV and yt-dlp

A CLI tool for searching and watching videos on youtube with no spyware and MPV and yt-dlp

TruncatedDinosour 3 Feb 22, 2022
Logic-Sim - A clone of 'Digital Logic Sim' from Sebastian Lague

Logic Simulator This is a clone of 'Digital Logic Sim' from Sebastian Lague. But

Ethan 1 Feb 01, 2022
A Simple Python CLI Lockpicking Tool

Cryptex a simple CLI lockpicking tool What can it do: Encode / Decode Hex Encode / Decode Base64 Break Randomly :D Requirements: Python3 Linux as your

Alex Kollar 23 Jul 04, 2022
A web shell client written in python.

Webshell client A webshell client written in python. Only works well for linux for the time being. Why? Because there are too many heavy webshells. So

tchar 1 Dec 07, 2021
Conditional Transformer Language Model for Controllable Generation

CTRL - A Conditional Transformer Language Model for Controllable Generation Authors: Nitish Shirish Keskar, Bryan McCann, Lav Varshney, Caiming Xiong,

Salesforce 1.7k Jan 05, 2023
Get COVID-19 vaccination schedules from booking.moh.gov.ge in the CLI

vaccination.py Get COVID-19 vaccination schedules from booking.moh.gov.ge in the CLI. Installation $ pip install vaccination Usage Make sure the Pytho

Temuri Takalandze 11 Dec 08, 2021
A CLI messenger for the Signum community.

A CLI messenger for the Signum community. Built for people who like using terminal for their work and want to communicate with other users in the Signum community.

Jush 5 Mar 18, 2022
A python package to display progress of loops to the user

ProgressBars A python package to display progress of loops to the user. Installation This package can be installed using pip. pip install progressbars

Matthias 3 Jan 16, 2022
🐾 Get the nftables counters easier to read

nft-stats Get the nftables counters easier to read It kind of hard to read the output of nft list ruleset so there is a small program parcising the ou

7 Oct 08, 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
PyDropper - pick colors everywhere

PyDropper - pick colors everywhere Downloads Settings PyDropper is an eyedropper

Herman Brunberg 2 Jan 04, 2022
Simple command line tool for text to image generation using OpenAI's CLIP and Siren (Implicit neural representation network)

Simple command line tool for text to image generation using OpenAI's CLIP and Siren (Implicit neural representation network)

Phil Wang 4.4k Jan 09, 2023
A selfbot made with DPY, doesn't have much commands but there's some useful commands to use.

Phantom Selfbot A selfbot made in DPY, made by Zenith. How to use Add your token in token = 'YOUR-MOMS-TOKEN-HERE' Change the prefix in prefix = If

[Ͼ⁴] Ƶephyr 2 Dec 02, 2021
Proman is a simple tool for managing projects through cli.

proman proman is a project manager. It helps you manage your projects from a terminal. The features are listed below. Installation Step 1: Download or

Arjun Somvanshi 2 Dec 06, 2021
Convert shellcode into :sparkles: different :sparkles: formats!

Bluffy Convert shellcode into ✨ different ✨ formats! Bluffy is a utility which was used in experiments to bypass Anti-Virus products (statically) by f

pre.empt.dev 305 Dec 17, 2022