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.
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.
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.
- FontShuffler
- FontSearchbar
- ThemeSearchbar
- HelpBox
- YamlDisplay
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!