• Stars
    star
    147
  • Rank 250,049 (Top 5 %)
  • Language
    Go
  • License
    MIT License
  • Created about 4 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Alacritty is a cross-platform GPU-accelerated terminal emulator. Make it pretty without having to edit your yaml file 🌈

Alacpretty ‎️‍🌈

Alacritty is a GPU-enhanced terminal emulator; Alacpretty is a Go program that leverages termui to provide Alacritty users the ability to edit their Alacritty configurations via a terminal user-interface.

How it works

Alacpretty components are ready to plug into your Alacritty configurations. Assuming your alacritty.yml file is in the appropriate location as specified in the Alacritty documentation, all you'll need to do is grab the components you need from internal/ui, and drop them into WidgetsController like it is done in cmd/alacpretty/main.go.

package main

import (
	aui "github.com/solidiquis/alacpretty/internal/ui"
	"github.com/solidiquis/alacpretty/internal/yamlconf"
)

func main() {
  // Reads the contents of alacritty.yml to a string
  content := yamlconf.ReadFileToString()
  
  // Set the position of each widget, and arrange in however
  // many rows you need.
  row1 := []aui.UIWidget{
    aui.NewThemeShuffler(0, 0, 25, 10),
    aui.NewFontsizeAdjuster(26, 0, 51, 10),
  }
  row2 := []aui.UIWidget{
    aui.NewOpacityGauge(0, 11, 51, 14),
  }

  // Controller handles rendering and navigating between widgets.
  aui.WidgetsController(
    &content,
    row1,
    row2,
  )
}

Here is how you navigate the UI:

  • h, j, k, l and , , , are equivalent and are used to navigate inside the widget or change its appearance.
  • H, J, K, L are used to navigate across widgets, as only one can be focused on at a time.

They way in which the focus shifts between widgets is dependent upon the way you arrange your widgets in rows.

How to use

There are a couple ways in which you can use Alacpretty: The simplest way would be to have Go installed, clone this repo, and run go run cmd/alacpretty/main.go - or you can clone this repo, compile the code into binary, and stick it somewhere in your path.

Stable widgets

  1. ThemeShuffler
  2. OpacityGauge
  3. FontsizeAdjuster

Work-in-progress widgets

  1. FontShuffler
  2. FontSearchbar
  3. ThemeSearchbar
  4. HelpBox
  5. YamlDisplay

Licence

MIT

Note from author

Thank you to everyone who has taken an interest in this little pet project of mine — I honestly didn't expect it to get so many stars! And with that said, I also apologize for how slowly I am moving as work has been keeping me extraordinarily busy. If you have any questions, concerns, or would like to contribute, don't hesitate to write up an issue or submit a PR!

More Repositories

1

erdtree

A modern, cross-platform, multi-threaded, and general purpose filesystem and disk-usage utility that is aware of .gitignore and hidden file rules.
Rust
2,350
star
2

dotfiles

Me confeegs.. me precious confeegs.
Lua
234
star
3

parametric_surfaces

Parametric surfaces drawn using the Rust + WASM toolchain with WebGL, React, and TypeScript.
Rust
48
star
4

novavim_go

Vim made in Go that you shouldn't use.
Go
17
star
5

Scribnotes

Scribnotes is a note-taking web application that makes it easy to organize your class notes.
Python
17
star
6

alac-pretty

Terminal UI that allows Alacritty users to quickly and easily shuffle through provided themes 🦄
Rust
16
star
7

ez_encrypt

A small message encryption + decryption web application powered by Rust + WASM.
TypeScript
9
star
8

mac_wallpaper_shuffler

Shuffle your wallpapers via the terminal on MacOS 💻
Go
9
star
9

alacpretty_v2

Work-in-progress redo of Alacpretty
Go
8
star
10

ansigo

Ansigo offers a convenient way to detect key-presses and control the terminal's font, color, and cursor with ease 🦄
Go
5
star
11

knodis

Not sure what this will be yet
Rust
3
star
12

fsac

⚡ fast fuzzy search terminal application that queries what you're looking for and provides the result to a custom command.
Go
2
star
13

sarnath

Kill and re-spawn child processes and optionally hook in a custom command to execute whenever changes are made in a specified directory.
Rust
2
star
14

blog

Just a place for me to share random program-y thingies.
Ruby
2
star
15

vt100

A little tool to make pretty CLIs
Ruby
2
star
16

termscroll

Simple terminal utility to render, scroll, and select through a list of items 💻 ⌨️
Go
2
star
17

bookmark

Bookmark frequently visited directories without bloating your shell config with a bunch of cd aliases.
Shell
2
star
18

hello_opengl

My "Hello World" for OpenGL.
Rust
1
star
19

wf_email_microservice_public

Go micro-service for rapid email sending via SendWithUs and web-hook management.
Go
1
star
20

100-Days-of-New-Programming-Languages

Trying to rewrite the same program in as many languages as I can in 100 days (whilst being employed and having a life).
JavaScript
1
star
21

hello_web_gl

Rust, WASM, and WebGL fun.
Rust
1
star
22

homebrew-tap

Muh tap.
Ruby
1
star
23

eldritch_cube

Currently learning OpenGL. I made a cube.
Rust
1
star
24

termichat

Termichat server
Go
1
star
25

webgl_learning

Web/OpenGL practice using Rust/WASM
Rust
1
star
26

solidiquis

1
star
27

novavim_old

Vim but in Rust (Work-in-progress).
Rust
1
star
28

not_a_blog

The work-in-progress not-a-blog blog
Rust
1
star
29

termichat_client

Client for Termui
Go
1
star
30

djangolang

Go + GORM + React/TypeScript + Postgres + Docker web project skeleton.
Go
1
star
31

uwuby

Quick demo demonstrating how to call Rust from Ruby
Rust
1
star
32

advent_of_code_2022

Solutions to Advent of Code 2022
Rust
1
star
33

ether

Symmetric key encryption command-line utility.
Rust
1
star
34

my_first_rust_program

Looking for constructive criticism for my first Rust program, which is basically the unix command "grep" written in Rust.
Rust
1
star
35

Call-of-Cthoder

Personal website and blog
HTML
1
star