diff --git a/Makefile b/Makefile index 9e5c39d..da9d31e 100644 --- a/Makefile +++ b/Makefile @@ -3,121 +3,84 @@ workspace := $(HOME) .PHONY: all -# SHELLS -inputrc: - ln -fs $(dotfiles)/shells/inputrc $(workspace)/.inputrc - -bash: inputrc - ln -fs $(dotfiles)/shells/bash_profile $(workspace)/.bash_profile - ln -fs $(dotfiles)/shells/bashrc $(workspace)/.bashrc - -zsh: inputrc - ln -fs $(dotfiles)/shells/zshrc $(workspace)/.zshrc - -tmux: - ln -fs $(dotfiles)/shells/tmux.conf $(workspace)/.tmux.conf - shells: bash zsh tmux -# NIX -nixfiles := $(shell find nix -type f -printf "$(workspace)/.config/%P\n") - -nix: $(nixfiles) - -$(nixfiles): $(workspace)/.config/%: nix/% - mkdir -p $(dir $@) - ln -fs $(dotfiles)/$^ $@ - -# NVIM -nvimfiles := $(shell find nvim -type f -printf "$(workspace)/.config/%p\n") - -nvim: $(nvimfiles) - -$(nvimfiles): $(workspace)/.config/%: % - mkdir -p $(dir $@) - ln -fs $(dotfiles)/$^ $@ - -# EMACS -emacsfiles := $(shell find emacs -type f -printf "$(workspace)/.emacs.d/%p\n") - -emacs: $(emacsfiles) - -$(emacsfiles): $(workspace)/.emacs.d/%: % - mkdir -p $(dir $@) - ln -fs $(dotfiles)/$^ $@ - -# KITTY -kittyfiles := $(shell find kitty -type f -printf "$(workspace)/.config/%p\n") - -kitty: $(kittyfiles) +# SYMLINK CREATION +bin/%: + mkdir -p $(workspace)/.local/$(@D) + ln -fs $(dotfiles)/$@ $(workspace)/.local/$@ -$(kittyfiles): $(workspace)/.config/%: % - mkdir -p $(dir $@) - ln -fs $(dotfiles)/$^ $@ +emacs/%: + mkdir -p $(workspace)/.emacs.d + ln -fs $(dotfiles)/$@ $(workspace)/.emacs.d/$(@F) -# ROFI -rofifiles := $(shell find rofi -type f -printf "$(workspace)/.config/%p\n") - -rofi: $(rofifiles) - -$(rofifiles): $(workspace)/.config/%: % - mkdir -p $(dir $@) - ln -fs $(dotfiles)/$^ $@ - -# NNN -nnnfiles := $(shell find nnn -type f -printf "$(workspace)/.config/%p\n") +gtk/%: + mkdir -p $(workspace)/.config/gtk-3.0 + mkdir -p $(workspace)/.config/gtk-4.0 + ln -fs $(dotfiles)/$@ $(workspace)/.config/gtk-3.0/$(@F) + ln -fs $(dotfiles)/$@ $(workspace)/.config/gtk-4.0/$(@F) -nnn: $(nnnfiles) +julia/%: + mkdir -p $(workspace)/.julia/config + ln -fs $(dotfiles)/$@ $(workspace)/.julia/config/$(@F) -$(nnnfiles): $(workspace)/.config/%: % - mkdir -p $(dir $@) - ln -fs $(dotfiles)/$^ $@ +jupyter/%: + mkdir -p $(workspace)/.jupyter + ln -fs $(dotfiles)/$@ $(workspace)/.jupyter/$(@F) -# BINARIES -binfiles := $(shell find bin -type f -printf "$(workspace)/.local/%p\n") +nix/%: + mkdir -p $(workspace)/$(@D:nix/%=%) + ln -fs $(dotfiles)/$@ $(workspace)/.config/$(@:nix/%=%) -bin: $(binfiles) +texlive/%: + mkdir -p $(workspace)/.config/latexmk + ln -fs $(dotfiles)/$@ $(workspace)/.config/latexmk/$(@F) -$(binfiles): $(workspace)/.local/%: % - mkdir -p $(dir $@) - ln -fs $(dotfiles)/$^ $@ +ctags/% \ +git/% \ +r/% \ +shells/% \ +vim/% \ +: + ln -fs $(dotfiles)/$@ $(workspace)/.$(@F) +alacritty/% \ +kitty/% \ +nnn/% \ +nvim/% \ +rofi/% \ +zathura/% \ +: + mkdir -p $(workspace)/.config/$(@D) + ln -fs $(dotfiles)/$@ $(workspace)/.config/$@ -# SINGLE FILE CONFIGS -alacritty: - mkdir -p $(workspace)/.config/alacritty/ - ln -fs $(dotfiles)/singles/alacritty.yml $(workspace)/.config/alacritty/alacritty.yml +# CONFIGS +inputrc: shells/inputrc -ctags: - ln -fs $(dotfiles)/singles/ctags $(workspace)/.ctags +bash: inputrc $(wildcard shells/bash*) -git: - ln -fs $(dotfiles)/singles/gitconfig $(workspace)/.gitconfig +zsh: inputrc $(wildcard shells/zsh*) -julia: - mkdir -p $(workspace)/.julia/config/ - ln -fs $(dotfiles)/singles/startup.jl $(workspace)/.julia/config +tmux: inputrc $(wildcard shells/tmux*) -jupyter: +jupyter: $(wildcard jupyter/*) mkdir -p $(workspace)/.local/share/jupyter/kernels - ln -fs $(dotfiles)/singles/jupyter_console_config.py $(workspace)/.jupyter/jupyter_console_config.py - -r: - ln -fs $(dotfiles)/singles/Rprofile $(workspace)/.Rprofile -texlive: - mkdir -p $(workspace)/.config/latexmk - ln -fs $(dotfiles)/singles/latexmkrc $(workspace)/.config/latexmk/latexmkrc - -vim: - ln -fs $(dotfiles)/singles/vimrc $(workspace)/.vimrc - -zathura: - mkdir -p $(workspace)/.config/zathura - ln -fs $(dotfiles)/singles/zathurarc $(workspace)/.config/zathura/zathurarc - -gtk: - mkdir -p $(workspace)/.config/gtk-3.0 - mkdir -p $(workspace)/.config/gtk-4.0 - ln -fs $(dotfiles)/singles/gtk.css $(workspace)/.config/gtk-3.0/gtk.css - ln -fs $(dotfiles)/singles/gtk.css $(workspace)/.config/gtk-4.0/gtk.css +.SECONDEXPANSION: +alacritty \ +bin \ +ctags \ +emacs \ +git \ +gtk \ +julia \ +kitty \ +nix \ +nnn \ +nvim \ +r \ +rofi \ +texlive \ +vim \ +zathura \ +: %: $$(shell find % -type f) diff --git a/singles/ctags b/ctags/ctags similarity index 100% rename from singles/ctags rename to ctags/ctags diff --git a/singles/gitconfig b/git/gitconfig similarity index 100% rename from singles/gitconfig rename to git/gitconfig diff --git a/singles/startup.jl b/julia/startup.jl similarity index 100% rename from singles/startup.jl rename to julia/startup.jl diff --git a/singles/jupyter_console_config.py b/jupyter/jupyter_console_config.py similarity index 100% rename from singles/jupyter_console_config.py rename to jupyter/jupyter_console_config.py diff --git a/patches/conda_activate.patch b/patches/conda_activate.patch deleted file mode 100644 index 3dc4eb4..0000000 --- a/patches/conda_activate.patch +++ /dev/null @@ -1,12 +0,0 @@ -# patch -d $(conda info --root)/bin -N < conda_activate.patch ---- activate 2017-07-11 18:11:55.000000000 -0400 -+++ activate_new 2017-07-11 18:14:24.000000000 -0400 -@@ -97,7 +97,7 @@ - if [ $("$_CONDA_DIR/conda" ..changeps1) = "1" ]; then - if ! $(grep -q CONDA_DEFAULT_ENV <<<$PS1); then - if ! $(grep -q "POWERLINE" <<<$PS1); then -- export PS1="(${CONDA_DEFAULT_ENV}) $PS1" -+ export PS1="\$(if [[ \$? == 0 ]]; then echo \"\[\e[00;30m\]\"; else echo \"\[\e[00;31m\]\"; fi)(${CONDA_DEFAULT_ENV}) [\A] [\h \u]:\W \#\$\[\e[0m\] \[\e[33m\]" - fi - fi - fi diff --git a/singles/Rprofile b/r/Rprofile similarity index 100% rename from singles/Rprofile rename to r/Rprofile diff --git a/singles/latexmkrc b/texlive/latexmkrc similarity index 100% rename from singles/latexmkrc rename to texlive/latexmkrc diff --git a/singles/vimrc b/vim/vimrc similarity index 100% rename from singles/vimrc rename to vim/vimrc diff --git a/singles/zathurarc b/zathura/zathurarc similarity index 100% rename from singles/zathurarc rename to zathura/zathurarc