-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Justfile
31 lines (26 loc) · 1.39 KB
/
Justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
set quiet := true
personal_settings := "true"
#───────────────────────────────────────────────────────────────────────────────
# INFO uses personal vaults saved in `~/.config/perma-repos.csv`
build_and_push_to_local_vaults:
#!/usr/bin/env zsh
# BUILD
# Due to globbing, the source files are inserted in alphabetical order.
# To keep things predictable, they are simply number in the order they
# should be included in.
cat ./source/*.css <(echo ; echo "/* @settings") ./source/style-settings.yaml <(echo "*/") \
> /tmp/theme.css
# PUSH TO LOCAL VAULTS
if [[ "{{ personal_settings }}" == "true" ]]; then
cut -d, -f2 "$HOME/.config/perma-repos.csv" |
sed "s|^~|$HOME|" |
xargs -I {} find {} -maxdepth 1 -name ".obsidian" | # only vaults
xargs dirname | # vault root
xargs -I {} cp -f "/tmp/theme.css" "{}/.obsidian/themes/Shimmering Focus/theme.css"
rm -f /tmp/theme.css
open -a "Obsidian" # macOS specific opener
fi
format_and_check:
#!/usr/bin/env zsh
[[ "{{ personal_settings }}" != "true" ]] && return 0
$HOME/.local/share/nvim/mason/bin/biome check --write --error-on-warnings --log-kind="compact"