-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Justfile
25 lines (20 loc) · 1.1 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
set quiet := true
vault_to_open := "main-vault"
#───────────────────────────────────────────────────────────────────────────────
# 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 "/* @settings") ./source/style-settings.yaml <(echo "*/") \
> /tmp/theme.css
# PUSH TO LOCAL VAULTS
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"
# OPEN OBSIDIAN
open "obsidian://open?vault={{ vault_to_open }}"