-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtaskfile.yaml
More file actions
101 lines (92 loc) · 2.96 KB
/
Copy pathtaskfile.yaml
File metadata and controls
101 lines (92 loc) · 2.96 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
---
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
tasks:
zsh:cli-themes:
desc: Tell utils to use a particular theme.
cmds:
- bat cache --build
- fast-theme XDG:catppuccin-frappe
zsh:gen-completions:
desc: Generate extra completions for listed binaries
vars:
COMPLETIONS_DIR:
sh: echo "$XDG_DATA_HOME/zsh/site-functions"
cmds:
- cmd: if [ ! -d {{.COMPLETIONS_DIR}} ]; then mkdir -p {{.COMPLETIONS_DIR}}; fi
- task: gen-completion
vars:
BIN: uv
CMD: uv generate-shell-completion zsh
- task: gen-completion
vars:
BIN: op
CMD: op completion zsh
OUTPUT: "{{.COMPLETIONS_DIR}}/_op"
- task: gen-completion
vars:
BIN: kaf
CMD: kaf completion zsh
OUTPUT: "{{.COMPLETIONS_DIR}}/_kaf"
- task: gen-completion
vars:
BIN: doctl
CMD: doctl completion zsh
OUTPUT: "{{.COMPLETIONS_DIR}}/_doctl"
gen-completion:
internal: true
vars:
COMPLETIONS_DIR:
sh: echo "$XDG_DATA_HOME/zsh/site-functions"
requires:
vars: [BIN, CMD]
cmd: if command -v {{.BIN}} >/dev/null; then {{.CMD}} > {{.COMPLETIONS_DIR}}/_{{.BIN}} ; fi
stow:essentials:
desc: Run stow with essential entities
cmds:
- cmd: stow stow
- cmd: cat ./stow/darwin-essential | xargs -I {} stow {}
platforms: [darwin]
- cmd: cat ./stow/linux-essential | xargs -I {} stow {}
platforms: [linux]
zsh:install-plugins:
desc: Install or update picked zsh plugins
vars:
PLUGINS_DIR:
sh: echo "$XDG_DATA_HOME"
PLUGINS:
sh: echo "zsh-vi-mode fast-syntax-highlighting zsh-autosuggestions zsh-completions"
cmds:
- for: { var: PLUGINS, as: REPO }
task: install-zsh-plugin
vars:
REPO_URL: "https://github.com/leonidgrishenkov/{{base .REPO}}.git"
PLUGIN_NAME: '{{base .REPO}}'
DEST_DIR: '{{.PLUGINS_DIR}}/{{base .REPO}}'
install-zsh-plugin:
internal: true
requires:
vars: [REPO_URL, PLUGIN_NAME, DEST_DIR]
cmds:
- cmd: mkdir -p {{.DEST_DIR}}
- cmd: |
if [ -d "{{.DEST_DIR}}/.git" ]; then
git -C "{{.DEST_DIR}}" fetch origin HEAD --depth 1 --quiet
git -C "{{.DEST_DIR}}" reset --hard origin/HEAD --quiet
else
rm -rf "{{.DEST_DIR}}"
git clone --depth 1 --quiet "{{.REPO_URL}}" "{{.DEST_DIR}}"
fi
pi:install:
desc: Install Pi extensions
cmds:
- pi install git:github.com/leonidgrishenkov/pi-extensions
- pi install git:github.com/leonidgrishenkov/agent-skills
pi:update:
desc: Update Pi extensions
cmds:
- pi update git:github.com/leonidgrishenkov/pi-extensions
- pi update git:github.com/leonidgrishenkov/agent-skills
nvim:install:
desc: Install locked lazyvim plugins
cmd: nvim --headless "+Lazy! restore" +qa