Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ ENV DEBIAN_FRONTEND=noninteractive
# Locales
ENV LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" LANGUAGE="en_US.UTF-8"
RUN apt-get update && apt-get install -y \
bat \
curl \
fd-find \
fontconfig \
git \
gpg \
locales \
make \
python3 \
Expand All @@ -23,6 +23,12 @@ RUN apt-get update && apt-get install -y \
&& locale-gen en_US.UTF-8 \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://repo.charm.sh/apt/gpg.key | gpg --dearmor -o /etc/apt/keyrings/charm.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" > /etc/apt/sources.list.d/charm.list \
&& apt-get update && apt-get install -y glow \
&& rm -rf /var/lib/apt/lists/*

RUN sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --yes
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

Expand All @@ -37,8 +43,7 @@ RUN wget -P /home/jan/.local/share/fonts https://github.com/ryanoasis/nerd-fonts
&& fc-cache -fv

RUN mkdir -p ~/.local/bin \
&& ln -s $(which fdfind) ~/.local/bin/fd \
&& ln -s $(which batcat) ~/.local/bin/bat
&& ln -s $(which fdfind) ~/.local/bin/fd

RUN touch /home/jan/.zshrc

Expand Down
33 changes: 33 additions & 0 deletions files/glow/style.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"document": {"block_prefix": "\n", "block_suffix": "\n", "color": "252", "margin": 2},
"block_quote": {"indent": 1, "indent_token": "│ "},
"paragraph": {},
"list": {"level_indent": 2},
"heading": {"block_suffix": "\n", "color": "39", "bold": true},
"h1": {"prefix": " ", "suffix": " ", "color": "228", "background_color": "63", "bold": true},
"h2": {"prefix": "## "},
"h3": {"prefix": "### "},
"h4": {"prefix": "#### "},
"h5": {"prefix": "##### "},
"h6": {"prefix": "###### ", "color": "35", "bold": false},
"text": {},
"strikethrough": {"crossed_out": true},
"emph": {"italic": true},
"strong": {"bold": true},
"hr": {"color": "240", "format": "\n--------\n"},
"item": {"block_prefix": "• "},
"enumeration": {"block_prefix": ". "},
"task": {"ticked": "[✓] ", "unticked": "[ ] "},
"link": {"color": "30", "underline": true},
"link_text": {"color": "35", "bold": true},
"image": {"color": "212", "underline": true},
"image_text": {"color": "243", "format": "Image: {{.text}} →"},
"code": {"prefix": " ", "suffix": " ", "color": "203", "background_color": "236"},
"code_block": {"color": "244", "margin": 2},
"table": {"color": "253"},
"definition_list": {},
"definition_term": {},
"definition_description": {"block_prefix": "\n🠶 "},
"html_block": {},
"html_span": {}
}
9 changes: 7 additions & 2 deletions files/shell/functions/dfh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ dfh() {
return 1
fi

if command -v bat &>/dev/null; then
bat --language=md --style=header,grid --color=always "$page"
if command -v glow &>/dev/null; then
local style="$HOME/.config/glow/style.json"
if [[ -f "$style" ]]; then
CLICOLOR_FORCE=1 glow --style "$style" "$page" | LESSCHARSET=utf-8 less -R
else
glow "$page" | LESSCHARSET=utf-8 less -R
fi
else
cat "$page"
fi
Expand Down
2 changes: 2 additions & 0 deletions scripts/10_setup_zsh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ cp -f "$DOT_ROOT/files/zsh/completions/"* "$HOME/.zsh/completions/"
cp -f "$DOT_ROOT/files/shell/functions/"* "$HOME/.zsh/functions/"
cp -f "$DOT_ROOT/files/shell/aliases" "$HOME/.zsh/aliases"
cp -f "$DOT_ROOT/files/help/"* "$HOME/.dotfiles-help/"
mkdir -p "$HOME/.config/glow"
cp -f "$DOT_ROOT/files/glow/style.json" "$HOME/.config/glow/style.json"
git -C "$DOT_ROOT" log -1 --format="%h %ad" --date=short >"$HOME/.dotfiles-version"

# update remote dependencies
Expand Down
Loading