Skip to content

Commit

Permalink
refactors Makefile and reorganizes config into dirs for easier mainte…
Browse files Browse the repository at this point in the history
…nance.
  • Loading branch information
gzagatti committed Feb 14, 2022
1 parent ddf42ba commit 5ae52f1
Show file tree
Hide file tree
Showing 30 changed files with 219 additions and 225 deletions.
114 changes: 65 additions & 49 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,77 +3,93 @@ workspace := $(HOME)

.PHONY: all

vim:
ln -fs $(dotfiles)/vimrc $(workspace)/.vimrc

nvim:
mkdir -p $(workspace)/.config/nvim/
ln -fs $(dotfiles)/init.lua $(workspace)/.config/nvim
# SHELLS
shells/inputrc:
ln -fs $(dotfiles)/shells/inputrc $(workspace)/.inputrc

bash: shells/inputrc
ln -fs $(dotfiles)/shells/bash_profile $(workspace)/.bash_profile
ln -fs $(dotfiles)/shells/bashrc $(workspace)/.bashrc

emacs:
mkdir -p $(workspace)/.emacs.d/
ln -fs $(dotfiles)/init.el $(workspace)/.emacs.d/init.el
ln -fs $(dotfiles)/emacs-config.org $(workspace)/.emacs.d/emacs-config.org
zsh: shells/inputrc
ln -fs $(dotfiles)/shells/zshrc $(workspace)/.zshrc

tmux:
ln -fs $(dotfiles)/tmux.conf $(workspace)/.tmux.conf
ln -fs $(dotfiles)/shells/tmux.conf $(workspace)/.tmux.conf

bash:
ln -fs $(dotfiles)/inputrc $(workspace)/.inputrc
ln -fs $(dotfiles)/bash_profile $(workspace)/.bash_profile
ln -fs $(dotfiles)/bashrc $(workspace)/.bashrc
shells: bash zsh tmux

zsh:
ln -fs $(dotfiles)/zshrc $(workspace)/.zshrc
# NVIM
$(workspace)/.config/nvim:
mkdir -p $@

jupyter:
mkdir -p $(workspace)/.jupyter/kernels
mkdir -p $(workspace)/.local/share/jupyter/kernels
ln -fs $(dotfiles)/jupyter_console_config.py $(workspace)/.jupyter/jupyter_console_config.py
ln -fs $(dotfiles)/jupyter_notebook_config.py $(workspace)/.jupyter/jupyter_notebook_config.py
nvim/%: $(workspace)/.config/nvim
ln -fs $(dotfiles)/$@ $</$*

python:
mkdir -p $(workspace)/.config/matplotlib
ln -fs $(dotfiles)/matplotlibrc $(workspace)/.config/matplotlib/matplotlibrc
nvim: $(shell find nvim -type f)

eclim:
ln -fs $(dotfiles)/eclimrc $(workspace)/.eclimrc

git:
ln -fs $(dotfiles)/gitconfig $(workspace)/.gitconfig
# EMACS
$(workspace)/.emacs.d:
mkdir -p $@

r:
ln -fs $(dotfiles)/Rprofile $(workspace)/.Rprofile
emacs/%: $(workspace)/.emacs.d
ln -fs $(dotfiles)/$@ $</$*

ctags:
ln -fs $(dotfiles)/ctags $(workspace)/.ctags
emacs: $(shell find emacs -type f)

zathura:
mkdir -p $(workspace)/.config/zathura
ln -fs $(dotfiles)/zathurarc $(workspace)/.config/zathura/zathurarc

# KITTY
$(workspace)/.config/kitty/themes:
mkdir -p $@

kitty/%: $(workspace)/.config/kitty/themes
ln -fs $(dotfiles)/$@ $(workspace)/.config/$@

kitty: $(shell find kitty -type f)


# ROFI
$(workspace)/.config/rofi:
mkdir -p $@

rofi/%: $(workspace)/.config/rofi
ln -fs $(dotfiles)/$@ $</$*

rofi: $(shell find rofi -type f)


# SINGLE FILE CONFIGS
alacritty:
mkdir -p $(workspace)/.config/alacritty/
ln -fs $(dotfiles)/alacritty.yml $(workspace)/.config/alacritty/alacritty.yml
ln -fs $(dotfiles)/singles/alacritty.yml $(workspace)/.config/alacritty/alacritty.yml

rofi:
mkdir -p $(workspace)/.config/rofi
ln -fs $(dotfiles)/rofi.rasi $(workspace)/.config/rofi/config.rasi
ln -fs $(dotfiles)/rofi-unicodeit $(workspace)/.config/rofi/unicodeit
ctags:
ln -fs $(dotfiles)/singles/ctags $(workspace)/.ctags

texlive:
mkdir -p $(workspace)/.config/latexmk
ln -fs $(dotfiles)/latexmkrc $(workspace)/.config/latexmk/latexmkrc
git:
ln -fs $(dotfiles)/singles/gitconfig $(workspace)/.gitconfig

julia:
mkdir -p $(workspace)/.julia/config/
ln -fs $(dotfiles)/startup.jl $(workspace)/.julia/config
ln -fs $(dotfiles)/singles/startup.jl $(workspace)/.julia/config

jupyter:
mkdir -p $(workspace)/.local/share/jupyter/kernels
ln -fs $(dotfiles)/singles/jupyter_console_config.py $(workspace)/.jupyter/jupyter_console_config.py

$(workspace)/.config/kitty/themes:
mkdir -p $(workspace)/.config/kitty/themes/
r:
ln -fs $(dotfiles)/singles/Rprofile $(workspace)/.Rprofile

kitty/%: $(workspace)/.config/kitty/themes
ln -fs $(dotfiles)/$@ $(workspace)/.config/$@
texlive:
mkdir -p $(workspace)/.config/latexmk
ln -fs $(dotfiles)/singles/latexmkrc $(workspace)/.config/latexmk/latexmkrc

kitty: $(shell find kitty -type f)
vim:
ln -fs $(dotfiles)/singles/vimrc $(workspace)/.vimrc


zathura:
mkdir -p $(workspace)/.config/zathura
ln -fs $(dotfiles)/singles/zathurarc $(workspace)/.config/zathura/zathurarc
17 changes: 0 additions & 17 deletions eclimrc

This file was deleted.

File renamed without changes.
File renamed without changes.
25 changes: 0 additions & 25 deletions essentials/R

This file was deleted.

27 changes: 0 additions & 27 deletions essentials/julia

This file was deleted.

12 changes: 0 additions & 12 deletions essentials/linuxbrew

This file was deleted.

33 changes: 0 additions & 33 deletions essentials/texlive

This file was deleted.

File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion matplotlibrc

This file was deleted.

Loading

0 comments on commit 5ae52f1

Please sign in to comment.