dotfiles/just/.justfile
2025-01-10 12:05:49 -06:00

105 lines
3.9 KiB
Makefile

# justfile for common household tasks
dotfiles_repo := "/home/jas/repos/codeberg.org/hyperreal/dotfiles"
homedir := "/home/jas"
configdir := "/home/jas/.config"
to-laptop:
rsync -aAXP {{homedir}}/sync/ jas@laptop.lyrebird-marlin.ts.net:/home/jas/sync
to-desktop:
rsync -aAXP {{homedir}}/sync/ jas@desktop.lyrebird-marlin.ts.net:/home/jas/sync
refresh-doom-emacs:
rm -rf {{configdir}}/emacs
git clone --depth 1 https://github.com/doomemacs/doomemacs {{configdir}}/emacs
{{configdir}}/emacs/bin/doom install --force --verbose
deploy-dotfiles:
cp -rfv {{dotfiles_repo}}/just/.justfile {{homedir}}
cp -rfv {{dotfiles_repo}}/doom/.doom.d {{homedir}}
cp -fv {{dotfiles_repo}}/zsh/.zshrc {{homedir}}
cp -rfv {{dotfiles_repo}}/zsh/.zshrc.d {{homedir}}
cp -fv {{dotfiles_repo}}/zsh/.zshenv {{homedir}}
cp -rfv {{dotfiles_repo}}/config/.config/bat {{configdir}}
cp -rfv {{dotfiles_repo}}/config/.config/devilspie2 {{configdir}}
cp -rfv {{dotfiles_repo}}/config/.config/git {{configdir}}
cp -rfv {{dotfiles_repo}}/config/.config/rofi {{configdir}}
cp -fv {{dotfiles_repo}}/config/.config/starship.toml {{configdir}}
cp -rfv {{dotfiles_repo}}/config/.config/zellij {{configdir}}
save-dotfiles:
cp -fv {{homedir}}/.justfile {{dotfiles_repo}}/just/
cp -rfv {{homedir}}/.doom.d {{dotfiles_repo}}/doom/
cp -fv {{homedir}}/.zshrc {{dotfiles_repo}}/zsh/
cp -rfv {{homedir}}/.zshrc.d {{dotfiles_repo}}/zsh/
cp -fv {{homedir}}/.zshenv {{dotfiles_repo}}/zsh/
cp -rfv {{configdir}}/bat {{dotfiles_repo}}/config/.config/
cp -rfv {{configdir}}/devilspie2 {{dotfiles_repo}}/config/.config/
cp -rfv {{configdir}}/git {{dotfiles_repo}}/config/.config/
cp -rfv {{configdir}}/rofi {{dotfiles_repo}}/config/.config/
cp -fv {{configdir}}/starship.toml {{dotfiles_repo}}/config/.config/
cp -rfv {{configdir}}/zellij {{dotfiles_repo}}/config/.config/
clean-dotfiles:
rm -fv {{homedir}}/.justfile
rm -rfv {{homedir}}/.doom.d
rm -fv {{homedir}}/.zshrc
rm -rfv {{homedir}}/.zshrc.d
rm -fv {{homedir}}/.zshenv
rm -rfv {{configdir}}/bat
rm -rfv {{configdir}}/devilspie2
rm -rfv {{configdir}}/git
rm -rfv {{configdir}}/rofi
rm -fv {{configdir}}/starship.toml
rm -rfv {{configdir}}/zellij
dust:
#!/usr/bin/env bash
set -euo pipefail
dl_url=$(curl -s "https://api.github.com/repos/bootandy/dust/releases/latest" | jq '.assets.[].browser_download_url' | grep "x86_64-unknown-linux-gnu.tar.gz" | tr -d '"')
wget "$dl_url"
filename=$(basename -s .tar.gz dust*)
tar xvf "${filename}.tar.gz"
sudo cp -v "${filename}/dust" /usr/local/bin/
sudo chown root:root /usr/local/bin/dust
rm -rf "$filename" "${filename}.tar.gz"
go-tools:
go install golang.org/x/tools/gopls@latest
go install github.com/fatih/gomodifytags@latest
go install github.com/cweill/gotests/...@latest
go install github.com/x-motemen/gore/cmd/gore@latest
go install golang.org/x/tools/cmd/guru@latest
python-tools:
pipx install --include-deps ansible
pipx install black
pipx install pyflakes
pipx install isort
pipx install pipenv
pipx install nose
pipx install pytest
webdev-tools:
sudo npm install -g @catppuccin/inkcat
sudo npm install -g prettier
sudo npm install -g js-beautify
sudo npm install -g stylelint
sudo dnf install -y tidy
rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
devilspie2:
#!/usr/bin/env bash
set -euo pipefail
dl_url=$(curl --silent "https://api.github.com/repos/dsalt/devilspie2/releases/latest" | grep "tarball_url" | cut -d : -f 2,3 | tr -d '", ')
wget "$dl_url" -O "$(basename $dl_url).tar.gz"
filename="$(basename $dl_url).tar.gz"
tar xvf "$filename"
sudo dnf install -y glib2-devel lua-devel libwnck3-devel '@c-development' '@development-tools'
cd dsalt-devilspie2*
make
sudo make install