pycrypyis a command-line tool written in Python for easily configuring Alacritty options from the terminal. It allows you to adjust themes, fonts, font size, opacity, padding, cursor shape, and more with simple commands.
- Theme Change: Modify the Alacritty theme using a file path or a theme name.
- Font Configuration: Change the font and font size in Alacritty.
- Opacity Adjustment: Modify the terminal's opacity.
- Padding Configuration: Adjust the terminal's padding.
- Cursor Shape: Change the cursor shape and blinking.
You can easily install pycrypy using pip:
pip install pycrypy-
Clone the Repository:
git clone https://github.com/D4nitrix13/pycrypy.git --depth=1
-
Navigate to the Project Directory:
cd pycrypy -
Install Dependencies:
pip install -r requirements.txt
-
Install the Package:
pip install .
To use
pycrypy, simply run thepycrypycommand followed by the desired options. Here is a description of the available options:
pycrypy [-h] [-t [THEME ...]] [-P [THEMEPATH]] [-f [FONT ...]] [-F [FONTSIZE]] [-s [STYLE ...]]
[-o OPACITY] [-p X Y] [-S [CURSORSHAPE]] [-B [CURSORBLINKING]] [-T [CURSORTHICKNESS]]
[-R] [-D] [-L] [-v] [-V]Displays this help message and exits.
usage: pycrypy [-h] [-t [THEME ...]] [-P [THEME_PATH]] [-f [FONT ...]] [-F [FONTSIZE]] [-s [STYLE ...]]
[-o [OPACITY ...]] [-p [X [Y ...]]] [-S [CURSORSHAPE]] [-B [CURSOR_BLINKING]]
[-T [CURSOR_THICKNESS]] [-R] [-D] [-L] [-v] [-V]
pycrypy is a command-line tool designed to easily configure Alacritty options from the terminal using Python.
options:
-h, --help show this help message and exit
-t, --theme [THEME ...]
Change the theme used by Alacritty
-P, --theme-path [THEME_PATH]
Absolute or relative path of the theme to apply in the Alacritty terminal
-f, --font [FONT ...]
Change the font used by Alacritty
-F, --font-size [FONTSIZE]
Change the font size
-s, --style [STYLE ...]
Change the font style: Normal | Bold | Italic | Underline
-o, --opacity [OPACITY ...]
Change the opacity of the Alacritty terminal
-p, --padding [X [Y ...]]
Change the padding of the Alacritty terminal
-S, --cursor-shape [CURSORSHAPE]
Defines the cursor shape: Block | Underline | Beam
-B, --cursor-blinking [CURSOR_BLINKING]
Defines if the cursor blinks: Never | Off | On | Always
-T, --cursor-thickness [CURSOR_THICKNESS]
Defines the cursor thickness
-R, --theme-recommendations
List recommended themes for Alacritty
-D, --theme-dark List dark themes for Alacritty
-L, --theme-light List light themes for Alacritty
-v, --verbose Enable verbose mode
-V, --version Show the program version and author information
Enjoy configuring your Alacritty with pycrypy!- Changes the theme used by Alacritty. You can specify one or more themes.
Example:
pycrypy -t tokyo nightThis command changes the Alacritty theme to tokyo night.
- Absolute or relative path of the theme to be applied in the Alacritty terminal.
Example:
pycrypy -P /home/user/.config/alacritty/themes/mytheme.tomlThis command applies the theme from the specified path.
- Changes the font used by Alacritty. You can specify one or more fonts.
Example:
pycrypy -f Cascadia Code NFThis command changes the Alacritty font to Cascadia Code NF.
- Changes the font size.
Example:
pycrypy -F 14This command sets the font size to 14.
- Changes the font style: Normal | Bold | Italic | Underline. You can specify one or more styles.
Example:
pycrypy -s Bold ItalicThis command applies Bold Italic styles to the font in Alacritty.
- Changes the opacity of the Alacritty terminal.
Example:
pycrypy -o 0.8This command sets the terminal opacity to 80%.
- Changes the padding of the Alacritty terminal.
Example:
pycrypy -p 10 15This command sets the padding to 10 pixels vertical and 15 pixels horizontal.
- Defines the cursor shape. It can take one of these values: Block | Underline | Beam.
Example:
pycrypy -S BeamThis command sets the cursor shape to Beam.
- Defines whether the cursor blinks. It can have one of these values: Never | Off | On | Always. Example:
pycrypy -B AlwaysThis command sets the cursor blinking to Always.
- Defines the thickness of the cursor. Example:
pycrypy -T 2This command sets the cursor thickness to 2 pixels.
- Lists recommended themes for Alacritty. Example:
pycrypy -RThis command displays a list of recommended themes for Alacritty.
- Lists dark themes for Alacritty. Example:
pycrypy -DThis command displays a list of dark themes for Alacritty.
- Lists light themes for Alacritty. Example:
pycrypy -LThis command displays a list of light themes for Alacritty.
- Enables verbose mode. Example:
pycrypy -vThis command runs pycrypy in verbose mode, showing additional information.
- Displays the program version and author information. Example:
pycrypy -VThis command shows the current version of the program and author information.
Here is an example command that combines multiple options:
pycrypy -t tokyo_night -f "Cascadia Code NF" -F 18 -s Bold Italic -o 0.3 -p 10 10 -S Beam -B Always -T 0.10 -vVThis command changes the theme to tokyo_night, sets the font to Cascadia Code NF with size 18, applies the Bold and Italic styles, adjusts the opacity to 30%, configures the padding to 10 pixels in both directions, defines the cursor shape as Beam, enables cursor blinking in Always mode, sets the cursor thickness to 0.10 pixels, and activates verbose mode along with displaying the version.
To convert the
./src/cli/main.pyscript into a standalone executable, use PyInstaller with the following options:
Here is the equivalent pyinstaller command for the configuration you provided:
pyinstaller ./pycrypy.specpyinstaller --onefile \
--noconfirm \
--clean \
--noconsole \
--name pycrypy \
--add-data "./src/light_themes:light_themes" \
--add-data "./src/dark_themes:dark_themes" \
--add-data "./src/recommended_themes:recommended_themes" \
--add-data "./src/cli:cli" \
--add-data "./src/config:config" \
--add-data "./src/lib:lib" \
./src/cli/main.py--onefile: Creates a single executable file.--noconfirm: Does not prompt for confirmation before overwriting files.--clean: Cleans up temporary build files.--noconsole: Does not open a console window when running the executable (for GUI applications).--name pycrypy: Defines the name of the executable file.--add-data "src:dest": Specifies additional data files and their destinations in the executable. The syntax is `"source_path:destination_path"../src/cli/main.py: The main script file.
Run the command in the terminal from the directory where your ./src/cli/main.py file is located. PyInstaller will package your application, including the specified directories and files.
If you need to adjust data file paths, ensure they are correct relative to the directory from which you are running the command.
-
objcopyError: If you encounter errors related toobjcopy, ensure that all input files are correct and there are no file permission issues. Verify that the file specified in--nameis not in use and that the working directory is clean. -
Missing Dependencies: If the executable fails due to missing dependencies, ensure that all required libraries are installed and accessible from the Python environment.
If you want to contribute to pycrypy, please follow these steps:
-
Fork the Repository.
-
Create a New Branch for your feature or bug fix.
-
Make Changes and commit your changes.
-
Submit a Pull Request with a clear description of the changes made.
This repository is published under the MIT License. Feel free to use, modify, and distribute the content according to the terms of this license.
- Author: Daniel Benjamin Perez Morales
- GitHub: D4nitrix13
- GitLab: D4nitrix13
- Email:
danielperezdev@proton.me