Skip to content

Commit 5cad096

Browse files
committed
feat: added new themes and changed default theme to uni
new themes: * uni * hl-dark * hl-light * one-dark-24 * one-light-24 * ayu-dark-24 * ayu-light-24 * ayu-mirage
1 parent 7ba2b13 commit 5cad096

23 files changed

+2190
-163
lines changed

Cargo.lock

Lines changed: 16 additions & 82 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ members = [".", "crate/encstr", "crate/heapopt"]
44
[workspace.package]
55
repository = "https://github.com/pamburus/hl"
66
authors = ["Pavel Ivanov <mr.pavel.ivanov@gmail.com>"]
7-
version = "0.31.0-alpha.12"
7+
version = "0.31.0-alpha.13"
88
edition = "2021"
99
license = "MIT"
1010

Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SHELL = /bin/bash
66

77
# Local variables
88
THEMES = $(notdir $(basename $(wildcard etc/defaults/themes/*.yaml)))
9-
SCREENSHOT_SAMPLE = prometheus.log
9+
SCREENSHOT_SAMPLE = cafe.log
1010

1111
# Exported variables
1212
export RUST_BACKTRACE=1
@@ -91,11 +91,8 @@ clean: contrib-build
9191
screenshots: build $(THEMES:%=screenshot-%)
9292

9393
screenshot-%: build contrib-screenshots
94-
@defaults write org.alacritty NSRequiresAquaSystemAppearance -bool yes
9594
@$(SHELL) contrib/bin/screenshot.sh light $(SCREENSHOT_SAMPLE) $*
96-
@defaults write org.alacritty NSRequiresAquaSystemAppearance -bool no
9795
@$(SHELL) contrib/bin/screenshot.sh dark $(SCREENSHOT_SAMPLE) $*
98-
@defaults delete org.alacritty NSRequiresAquaSystemAppearance
9996
.PHONY: screenshot-%
10097

10198
## Collect coverage

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# hl [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov] [![Release][release-img]][release]
22

3+
[![banner](doc/banner.svg)](#screenshot)
4+
35
High-performance log viewer and processor that transforms logs in JSON and logfmt formats into a human-readable output. Built with efficiency in mind, it enables quick parsing and analysis of large log files with minimal overhead.
46

57
## Features overview
@@ -179,10 +181,15 @@ High-performance log viewer and processor that transforms logs in JSON and logfm
179181

180182
### Screenshot
181183

182-
![screenshot-light](https://github.com/pamburus/hl-extra/raw/90be58af2fb91d5b5e7ce3b74c3b567611379c40/screenshot/universal/light.png#gh-light-mode-only)
183-
![screenshot-dark](https://github.com/pamburus/hl-extra/raw/90be58af2fb91d5b5e7ce3b74c3b567611379c40/screenshot/universal/dark.png#gh-dark-mode-only)
184+
<p align="center">
185+
<picture>
186+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/pamburus/hl-extra/bdc78073a46e62568c8fc4d9dbc0e908345d581c/screenshot/uni/dark.svg" />
187+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/pamburus/hl-extra/bdc78073a46e62568c8fc4d9dbc0e908345d581c/screenshot/uni/light.svg" />
188+
<img alt="screenshot" src="https://hl-uni.tiiny.site/dark.svg" />
189+
</picture>
190+
</p>
184191

185-
See other [screenshots](https://github.com/pamburus/hl-extra/tree/90be58af2fb91d5b5e7ce3b74c3b567611379c40/screenshot#readme)
192+
See other [screenshots](https://github.com/pamburus/hl-extra/tree/refs/heads/main/screenshot#readme)
186193

187194
## Features and usage
188195

contrib/bin/screenshot.sh

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22

33
set -e
44

5-
ALACRITTY=/Applications/Alacritty.app/Contents/MacOS/alacritty
65
HL_SRC=$(cd $(dirname ${0:?})/../.. && pwd)
76
MODE=${1:?}
87
SAMPLE=${2:?}
98
THEME=${3:?}
10-
TITLE="hl ${SAMPLE:?}"
9+
TITLE="hl sample/${SAMPLE:?}"
1110

12-
"${ALACRITTY:?}" \
13-
--config-file "${HL_SRC:?}"/contrib/etc/alacritty/${MODE:?}.toml \
14-
-T "${TITLE:?}" \
15-
--hold \
16-
-e \
17-
"${HL_SRC:?}"/target/debug/hl \
11+
mkdir -p "${HL_SRC:?}"/extra/screenshot/${THEME:?}
12+
13+
"${HL_SRC:?}"/contrib/bin/termframe.sh \
14+
--title "${TITLE:?}" \
15+
--mode ${MODE:?} \
16+
--embed-fonts true \
17+
-W 120 \
18+
-H 23 \
19+
--font-family "JetBrains Mono, Fira Code, Cascadia Code, Source Code Pro, Consolas, Menlo, Monaco, DejaVu Sans Mono, monospace" \
20+
--font-size 12 \
21+
-o "${HL_SRC:?}"/extra/screenshot/${THEME:?}/${MODE:?}.svg \
22+
-- \
23+
"${HL_SRC:?}"/target/debug/hl \
1824
--config - \
1925
--theme ${THEME:?} \
26+
--time-format '%T' \
2027
-P \
21-
"${HL_SRC:?}"/sample/${SAMPLE:?} &
22-
23-
sleep 0.5
24-
25-
mkdir -p "${HL_SRC:?}"/extra/screenshot/${THEME:?}
26-
screencapture -l$(GetWindowID Alacritty "${TITLE:?}") "${HL_SRC:?}"/extra/screenshot/${THEME:?}/${MODE:?}.png
27-
28-
kill $!
28+
"${HL_SRC:?}"/sample/${SAMPLE:?}

contrib/bin/setup.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ setup_get_window_id() {
5959
fi
6060
}
6161

62+
setup_termframe() {
63+
if [ ! -x "$(command -v termframe)" ]; then
64+
brew tap pamburus/homebrew-tap
65+
brew install termframe
66+
fi
67+
}
68+
6269
rust_is_required() {
6370
echo "Please install rust"
6471
echo "See https://doc.rust-lang.org/cargo/getting-started/installation.html"
@@ -125,8 +132,7 @@ setup_coverage_tools() {
125132
}
126133

127134
setup_screenshot_tools() {
128-
setup_get_window_id
129-
setup_alacritty
135+
setup_termframe
130136
}
131137

132138
setup_taplo() {

contrib/bin/termframe.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
if command -v termframe &> /dev/null; then
4+
TERMFRAME=$(command -v termframe)
5+
else
6+
TERMFRAME=cargo run --lcoked --release --git github.com/pamburus/termframe --
7+
fi
8+
9+
${TERMFRAME:?} "$@"

0 commit comments

Comments
 (0)