Compare commits
3 commits
a95c5d7354
...
e5954131fb
Author | SHA1 | Date | |
---|---|---|---|
e5954131fb | |||
d343002dde | |||
b449a96b8e |
11 changed files with 83 additions and 20 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -159,3 +159,4 @@ cython_debug/
|
||||||
# End of https://www.toptal.com/developers/gitignore/api/python
|
# End of https://www.toptal.com/developers/gitignore/api/python
|
||||||
|
|
||||||
.task.mk
|
.task.mk
|
||||||
|
lib/plugins/
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
GOAL_STYLE = b_magenta
|
GOAL_STYLE = b_magenta
|
||||||
HELP_SEP = {a.b_green}->>{a.end}
|
HELP_SEP = {a.b_green}->>{a.end}
|
||||||
USAGE = {a.italic}{a.b_cyan}Best Dots Around{a.end}\n
|
USAGE = {a.italic}{a.b_cyan}Best Dots Around{a.end}\n
|
||||||
|
PHONIFY = 1
|
||||||
|
|
||||||
|
|
13
Makefile
13
Makefile
|
@ -1,21 +1,13 @@
|
||||||
lint: lint.py lint.sh ## lint.*
|
|
||||||
|
|
||||||
msg = $(if tprint,$(call tprint,{a.b_magenta}==>{a.end}{a.bold} $(1){a.end}),@echo '==> $(1)')
|
msg = $(if tprint,$(call tprint,{a.b_magenta}==>{a.end}{a.bold} $(1){a.end}),@echo '==> $(1)')
|
||||||
|
|
||||||
lint.py: info ## lint python files
|
lint: ## lint python files
|
||||||
$(call msg,Linting Python Files)
|
$(call msg,Linting Python Files)
|
||||||
@black $(shell find -type f -name "*.py")
|
@black $(shell find -type f -name "*.py")
|
||||||
|
|
||||||
.PHONY: lint.sh
|
|
||||||
lint.sh: ## lint shell files
|
|
||||||
$(call msg,Linting Shell Files)
|
|
||||||
@shfmt -s -w $(shell shfmt -f .)
|
|
||||||
|
|
||||||
completions: ## generate completion scripts
|
completions: ## generate completion scripts
|
||||||
$(call msg,Generating Completions)
|
$(call msg,Generating Completions)
|
||||||
@./lib/completions/update.sh
|
@./lib/completions/update.sh
|
||||||
|
|
||||||
.PHONY: fzf
|
|
||||||
fzf: lib/.fzf/completion.zsh lib/.fzf/key-bindings.zsh ## update fzf shell scripts
|
fzf: lib/.fzf/completion.zsh lib/.fzf/key-bindings.zsh ## update fzf shell scripts
|
||||||
|
|
||||||
# update fzf shell scripts
|
# update fzf shell scripts
|
||||||
|
@ -23,7 +15,6 @@ lib/.fzf/%.zsh: FORCE
|
||||||
wget -O $@ \
|
wget -O $@ \
|
||||||
https://raw.githubusercontent.com/junegunn/fzf/master/shell/$*.zsh
|
https://raw.githubusercontent.com/junegunn/fzf/master/shell/$*.zsh
|
||||||
|
|
||||||
.PHONY: db d-build
|
|
||||||
db d-build: ## build docker image
|
db d-build: ## build docker image
|
||||||
$(call msg,Building Docker Image)
|
$(call msg,Building Docker Image)
|
||||||
@DOCKER_BUILDKIT=1 docker build \
|
@DOCKER_BUILDKIT=1 docker build \
|
||||||
|
@ -32,12 +23,10 @@ db d-build: ## build docker image
|
||||||
-f docker/Dockerfile \
|
-f docker/Dockerfile \
|
||||||
-t dots .
|
-t dots .
|
||||||
|
|
||||||
.PHONY: dr d-run
|
|
||||||
dr d-run: ## run docker image
|
dr d-run: ## run docker image
|
||||||
$(call msg,Running Docker Image)
|
$(call msg,Running Docker Image)
|
||||||
docker run --rm -it dots
|
docker run --rm -it dots
|
||||||
|
|
||||||
.PHONY: dr-keep
|
|
||||||
dr-keep:
|
dr-keep:
|
||||||
docker run -it dots
|
docker run -it dots
|
||||||
|
|
||||||
|
|
52
home/.chezmoiexternal.yaml
Normal file
52
home/.chezmoiexternal.yaml
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
.dotfiles/lib/plugins/base16:
|
||||||
|
rereshPeriod: 168h
|
||||||
|
type: git-repo
|
||||||
|
url: https://github.com/chriskempson/base16-shell.git
|
||||||
|
|
||||||
|
.dotfiles/lib/plugins/zsh-defer:
|
||||||
|
rereshPeriod: 168h
|
||||||
|
type: git-repo
|
||||||
|
url: https://github.com/romkatv/zsh-defer.git
|
||||||
|
|
||||||
|
.dotfiles/lib/plugins/zsh-syntax-highlighting:
|
||||||
|
rereshPeriod: 168h
|
||||||
|
type: git-repo
|
||||||
|
url: https://github.com/zsh-users/zsh-syntax-highlighting.git
|
||||||
|
|
||||||
|
.dotfiles/lib/plugins/fzf-tab:
|
||||||
|
rereshPeriod: 168h
|
||||||
|
type: git-repo
|
||||||
|
url: https://github.com/Aloxaf/fzf-tab.git
|
||||||
|
.dotfiles/lib/plugins/oh-my-zsh:
|
||||||
|
type: "archive"
|
||||||
|
url: https://github.com/ohmyzsh/ohmyzsh/archive/master.tar.gz
|
||||||
|
# exact: true
|
||||||
|
# chezmoi refuses to mkdir with nested directories
|
||||||
|
stripComponents: 2
|
||||||
|
refreshPeriod: "168h"
|
||||||
|
include:
|
||||||
|
- "*/lib/{clipboard,completion}.zsh"
|
||||||
|
- "*/plugins/{dotenv,extract}/**"
|
||||||
|
#
|
||||||
|
# include:
|
||||||
|
#
|
||||||
|
# - "*/plugins/{dotenv,extract}/**/*"
|
||||||
|
# include: ["plugins/dotenv/**", "plugins/extract/**"]
|
||||||
|
|
||||||
|
# .oh-my-zsh:
|
||||||
|
# exact: true
|
||||||
|
# refreshPeriod: 168h
|
||||||
|
# stripComponents: 1
|
||||||
|
# type: archive
|
||||||
|
# url: https://github.com/ohmyzsh/ohmyzsh/archive/master.tar.gz
|
||||||
|
# .oh-my-zsh/custom/plugins/zsh-syntax-highlighting:
|
||||||
|
# exact: true
|
||||||
|
# refreshPeriod: 168h
|
||||||
|
# stripComponents: 1
|
||||||
|
# type: archive
|
||||||
|
# url: https://github.com/zsh-users/zsh-syntax-highlighting/archive/master.tar.gz
|
||||||
|
# .oh-my-zsh/custom/themes/powerlevel10k:
|
||||||
|
# exact: true
|
||||||
|
# stripComponents: 1
|
||||||
|
# type: archive
|
||||||
|
# url: https://github.com/romkatv/powerlevel10k/archive/v1.15.0.tar.gz
|
|
@ -12,7 +12,7 @@ fi
|
||||||
PATH="$DOTFILES_DIR/bin:$PATH"
|
PATH="$DOTFILES_DIR/bin:$PATH"
|
||||||
. $DOTFILES_DIR/lib/function.zsh
|
. $DOTFILES_DIR/lib/function.zsh
|
||||||
|
|
||||||
for DOTFILE in "$DOTFILES_DIR"/lib/{path,env,prompt,alias,conda,custom}.zsh; do
|
for DOTFILE in "$DOTFILES_DIR"/lib/{path,env,prompt,alias,conda,plugins,custom}.zsh; do
|
||||||
[ -f "$DOTFILE" ] && . "$DOTFILE"
|
[ -f "$DOTFILE" ] && . "$DOTFILE"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ return {
|
||||||
ignore_filetypes = { -- disable format on save for specified filetypes
|
ignore_filetypes = { -- disable format on save for specified filetypes
|
||||||
"markdown",
|
"markdown",
|
||||||
"python",
|
"python",
|
||||||
|
"html",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
- .git/**
|
- .git/**
|
||||||
- .vscode/**
|
- .vscode/**
|
||||||
- ~$*
|
- ~$*
|
||||||
|
# libre office files
|
||||||
|
- .~*#
|
||||||
- node_modules/**
|
- node_modules/**
|
||||||
+ **
|
+ **
|
||||||
|
|
|
@ -34,6 +34,7 @@ export FZF_DEFAULT_OPTS=${FZF_COLORS}${FZF_LAYOUT}
|
||||||
export FZF_CTRL_GENERAL="--height=100% --margin=0,0,0"
|
export FZF_CTRL_GENERAL="--height=100% --margin=0,0,0"
|
||||||
|
|
||||||
#adapted from https://github.com/zimfw/fzf/blob/master/init.zsh
|
#adapted from https://github.com/zimfw/fzf/blob/master/init.zsh
|
||||||
|
# TODO: fix this so it works with $ **<tab>
|
||||||
if [ -x "$(command -v fd)" ]; then
|
if [ -x "$(command -v fd)" ]; then
|
||||||
export FZF_DEFAULT_COMMAND="command fd --type file --exclude ".git/" --hidden --no-ignore"
|
export FZF_DEFAULT_COMMAND="command fd --type file --exclude ".git/" --hidden --no-ignore"
|
||||||
_fzf_compgen_path() {
|
_fzf_compgen_path() {
|
||||||
|
|
22
lib/plugins.zsh
Executable file
22
lib/plugins.zsh
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
PLUGINS_DIR=$DOTFILES_DIR/lib/plugins
|
||||||
|
|
||||||
|
source $PLUGINS_DIR/zsh-defer/zsh-defer.plugin.zsh
|
||||||
|
|
||||||
|
# TODO: automate collection of plugin files
|
||||||
|
plugins=(
|
||||||
|
base16/base16-shell.plugin.zsh
|
||||||
|
fzf-tab/fzf-tab.plugin.zsh
|
||||||
|
zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh
|
||||||
|
oh-my-zsh/clipboard.zsh
|
||||||
|
oh-my-zsh/completion.zsh
|
||||||
|
oh-my-zsh/dotenv/dotenv.plugin.zsh
|
||||||
|
oh-my-zsh/extract/extract.plugin.zsh
|
||||||
|
)
|
||||||
|
|
||||||
|
for plugin in $plugins; do
|
||||||
|
zsh-defer source $PLUGINS_DIR/$plugin
|
||||||
|
done
|
||||||
|
|
||||||
|
unset PLUGINS_DIR plugins
|
|
@ -3,12 +3,6 @@
|
||||||
autoload -Uz compinit
|
autoload -Uz compinit
|
||||||
compinit
|
compinit
|
||||||
|
|
||||||
if is-executable sheldon; then
|
|
||||||
eval "$(sheldon -q --config-file ~/.config/sheldon/plugins.toml source)"
|
|
||||||
else
|
|
||||||
echo "no sheldon = no shell extensions loaded"
|
|
||||||
fi
|
|
||||||
|
|
||||||
is-executable zoxide && eval eval "$(zoxide init zsh --cmd cd)"
|
is-executable zoxide && eval eval "$(zoxide init zsh --cmd cd)"
|
||||||
|
|
||||||
if is-executable starship; then
|
if is-executable starship; then
|
||||||
|
|
Loading…
Reference in a new issue