Compare commits

...

3 commits

5 changed files with 27 additions and 14 deletions

View file

@ -2,24 +2,30 @@
.PHONY: lint .PHONY: lint
lint: lint.py lint.sh lint: lint.py lint.sh
msg = $(call tprint,{a.b_magenta}==>{a.end}{a.bold} $(1){a.end})
## lint.py | lint python files ## lint.py | lint python files
.PHONY: lint.py .PHONY: lint.py
lint.py: lint.py: info
black $(shell find -type f -name "*.py") $(call msg,Linting Python Files)
@black $(shell find -type f -name "*.py")
## lint.sh | lint shell files ## lint.sh | lint shell files
.PHONY: lint.sh .PHONY: lint.sh
lint.sh: lint.sh:
shfmt -s -w $(shell shfmt -f .) $(call msg,Linting Shell Files)
@shfmt -s -w $(shell shfmt -f .)
## db, d-build | build docker image ## db, d-build | build docker image
.PHONY: db d-build .PHONY: db d-build
db d-build: db d-build:
docker build -f docker/Dockerfile -t dots . $(call msg,Building Docker Image)
@docker build -f docker/Dockerfile -t dots .
## dr, d-run | run docker image ## dr, d-run | run docker image
.PHONY: dr d-run .PHONY: dr d-run
dr d-run: dr d-run:
$(call msg,Running Docker Image)
docker run --rm -it dots docker run --rm -it dots
.PHONY: dr-keep .PHONY: dr-keep
@ -29,5 +35,6 @@ dr-keep:
.DEFAULT_GOAL = help .DEFAULT_GOAL = help
GOAL_COLOR = b_magenta GOAL_COLOR = b_magenta
HELP_SEP = ->> HELP_SEP = ->>
USAGE = {a.italic}{a.b_cyan}Best Dots Around{a.end}\n
-include .task.mk -include .task.mk
$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/main/task.mk -o .task.mk) $(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/main/task.mk -o .task.mk)

View file

@ -89,9 +89,9 @@ get_days() {
now=$(date +'%s') now=$(date +'%s')
days=$(((now - install_date) / 86400)) days=$(((now - install_date) / 86400))
if ((days > 60)); then if ((days > 60)); then
echo "${RED}$date_out${NORMAL}" echo -e "${RED}$date_out${NORMAL}"
elif ((days > 30)); then elif ((days > 30)); then
echo "${YELLOW}$date_out${NORMAL}" echo -e "${YELLOW}$date_out${NORMAL}"
else else
echo "$date_out" echo "$date_out"
fi fi
@ -165,7 +165,7 @@ download() {
download_all() { download_all() {
echo "Downloading binaries to ${GREEN}$BIN_DIR${NORMAL}" echo -e "Downloading binaries to ${GREEN}$BIN_DIR${NORMAL}"
deps_check deps_check
@ -222,11 +222,11 @@ done
# if no args, show help # if no args, show help
if [ -z "$args" ]; then if [ -z "$args" ]; then
echo "${RED}No arguments supplied${NORMAL}" echo -e "${RED}No arguments supplied${NORMAL}"
help help
exit 0 exit 0
else else
echo "Downloading binaries to ${GREEN}$BIN_DIR${NORMAL}" echo -e "Downloading binaries to ${GREEN}$BIN_DIR${NORMAL}"
deps_check deps_check
for tool in "${args[@]}"; do for tool in "${args[@]}"; do
download "$tool" download "$tool"

View file

@ -61,6 +61,11 @@ sh:
user: mvdan user: mvdan
to: shfmt to: shfmt
atuin:
user: ellie
lazydocker:
user: jesseduffield
# file management # file management
gdu: gdu:

View file

@ -43,10 +43,6 @@ fi
if [[ $PATH != *$HOME/.fzf/bin* ]]; then if [[ $PATH != *$HOME/.fzf/bin* ]]; then
export PATH="${PATH:+${PATH}:}$HOME/.fzf/bin" export PATH="${PATH:+${PATH}:}$HOME/.fzf/bin"
fi fi
if is-executable fzf; then
source $DOTFILES_DIR/lib/fzf.zsh
fi
# --------- # ---------
# Add lfcd command # Add lfcd command

View file

@ -28,3 +28,8 @@ else
fi fi
zstyle ':completion::complete:make:*:targets' call-command true zstyle ':completion::complete:make:*:targets' call-command true
is-executable fzf && source $DOTFILES_DIR/lib/fzf.zsh
# atuin must be loaded after to override zsh's ctrl+R completion
is-executable atuin && eval "$(atuin init zsh)"