Skip to content

Instantly share code, notes, and snippets.

@MrFinchMkV
MrFinchMkV / alacritty-colors-from-xresources
Last active September 15, 2023 06:39 — forked from zacharied/alacritty-colors-from-xresources
Create an alacritty color config from the current X resources
#!/usr/bin/env bash
# Generates an alacritty color config from currently loaded X resources.
xrdb_grep() {
xrdb -query | grep -E '^\*'"$1"':'
}
color_from_line() {
read -r line && readonly line
echo "${line/\#/0x}" | tr -d '[:space:]' | cut -d ':' -f 2