mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 00:33:00 +00:00
Use just to manage specific configs
This commit is contained in:
parent
b817007986
commit
ee793c54af
15 changed files with 471 additions and 288 deletions
98
Justfile
98
Justfile
|
|
@ -1,27 +1,56 @@
|
|||
set shell := ["fish", "-c"]
|
||||
set windows-shell := ["pwsh", "-c"]
|
||||
|
||||
|
||||
PLATFORM := \
|
||||
if os() == "linux" {
|
||||
if env("WSL_DISTRO_NAME","") != "" {
|
||||
"wsl"
|
||||
} else {
|
||||
"linux"
|
||||
}
|
||||
} else if os() == "windows" {
|
||||
"win"
|
||||
} else if os() == "macos" {
|
||||
"mac"
|
||||
} else { "" }
|
||||
DOTFILES := join(home_directory(), ".dotfiles")
|
||||
XDG_CONFIG_HOME := \
|
||||
if env_var("XDG_CONFIG_HOME") != "" {env_var("XDG_CONFIG_HOME")} \
|
||||
if env("XDG_CONFIG_HOME") != "" {env("XDG_CONFIG_HOME")} \
|
||||
else {
|
||||
if os_family() == "windows" {
|
||||
env_var("APPDATA")
|
||||
env("APPDATA")
|
||||
} else {
|
||||
join(home_directory(), ".config")
|
||||
}
|
||||
}
|
||||
|
||||
XDG_DATA_HOME := \
|
||||
if env_var("XDG_DATA_HOME") != "" {env_var("XDG_DATA_HOME")} \
|
||||
if env("XDG_DATA_HOME") != "" {env("XDG_DATA_HOME")} \
|
||||
else {
|
||||
if os_family() == "windows" {
|
||||
env_var("LOCALAPPDATA")
|
||||
env("LOCALAPPDATA")
|
||||
} else {
|
||||
join(home_directory(), ".local/share")
|
||||
}
|
||||
}
|
||||
|
||||
XDG_STATE_HOME := \
|
||||
if env("XDG_STATE_HOME") != "" {env("XDG_STATE_HOME")} \
|
||||
else {
|
||||
if os_family() == "windows" {
|
||||
join(env("LOCALAPPDATA"), "state")
|
||||
} else {
|
||||
join(home_directory(), ".local/state")
|
||||
}
|
||||
}
|
||||
|
||||
LN := \
|
||||
if os_family() == "windows" { # Sudo and coreutils are required
|
||||
"sudo ln -sf"
|
||||
} else {
|
||||
"ln -sf"
|
||||
}
|
||||
|
||||
test:
|
||||
echo {{DOTFILES}}
|
||||
|
|
@ -37,18 +66,69 @@ check:
|
|||
@just check_shell
|
||||
format:
|
||||
@just format_shell
|
||||
|
||||
|
||||
push:
|
||||
git push github master
|
||||
git push codeberg master
|
||||
|
||||
setup:
|
||||
@just ideavim
|
||||
@just vivaldi
|
||||
|
||||
ideavim:
|
||||
ln -sf {{DOTFILES}}/common/ideavimrc $XDG_CONFIG_HOME/ideavim/ideavimrc
|
||||
git clone https://github.com/MarcoIeni/intellimacs {{join(home_directory(), ".local/share/intellimacs")}}
|
||||
ln -sf {{DOTFILES}}/common/ideavimrc {{XDG_CONFIG_HOME}}/ideavim/ideavimrc
|
||||
git clone https://github.com/MarcoIeni/intellimacs {{join(home_directory(), ".local/share/intellimacs")}} --depth 1
|
||||
|
||||
vivaldi:
|
||||
curl https://github.com/SocietasEvanescentes/Vivaldi/files/12446831/Rose.Pine.Dawn.zip > $HOME/Downloads/vivaldi-light.zip # Rose Pine Dawn
|
||||
curl https://github.com/catppuccin/vivaldi/releases/download/1.0.0-ctpv2/Catppuccin.Mocha.Lavender.zip > $HOME/Downloads/vivaldi-dark.zip # Catppuccino Mocha Lavender
|
||||
|
||||
[linux]
|
||||
systemd:
|
||||
ln -sf {{DOTFILES}}/platforms/{{PLATFORM}}/systemd {{XDG_CONFIG_HOME}}/systemd/
|
||||
|
||||
|
||||
uv:
|
||||
uv init {{XDG_DATA_HOME}}/uvenv
|
||||
cd {{XDG_DATA_HOME}}/uvenv
|
||||
uv venv
|
||||
uv add -r {{DOTFILES}}/bootstrap/components/requirements.txt
|
||||
|
||||
[unix]
|
||||
vim:
|
||||
mkdir -p {{XDG_DATA_HOME}}/vim/after
|
||||
mkdir -p {{XDG_STATE_HOME}}/vim/{backup,swap,undo,view}
|
||||
mkdir -p {{XDG_CONFIG_HOME}}/vim/
|
||||
ln -sf {{DOTFILES}}/common/vimrc {{XDG_CONFIG_HOME}}/vim/vimrc
|
||||
|
||||
|
||||
[windows]
|
||||
vim:
|
||||
New-Item -ItemType SymbolicLink -Path $HOME/_vimrc -Value {{DOTFILES}}/common/vim.noxdg.vimrc
|
||||
|
||||
yazi:
|
||||
which yazi || cargo install --locked yazi-fm yazi-cli
|
||||
-ya pack -a llanosrocas/yaziline
|
||||
-ya pack -a yazi-rs/plugins:git
|
||||
-ya pack -a Rolv-Apneseth/starship
|
||||
|
||||
wezterm:
|
||||
which wezterm
|
||||
{{LN}} {{DOTFILES}}/tools/wezterm {{XDG_CONFIG_HOME}}/wezterm/wezterm.lua
|
||||
|
||||
neovim:
|
||||
which nvim
|
||||
{{LN}} {{DOTFILES}}/tools/nvim {{XDG_CONFIG_HOME}}/nvim
|
||||
nvim --headless +checkhealth +"w nvim-healthcheck.txt" +qall
|
||||
|
||||
|
||||
[linux]
|
||||
bash:
|
||||
{{LN}} {{DOTFILES}}/tools/bash {{XDG_CONFIG_HOME}}/bash
|
||||
sudo cp $DOTFILES/tools/bash/xdg-compat.sh /etc/profile.d/xdg-compat.sh
|
||||
|
||||
[linux]
|
||||
flatpak:
|
||||
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
|
||||
[private]
|
||||
pull:
|
||||
|
|
@ -73,4 +153,4 @@ format_shell:
|
|||
[private]
|
||||
check_info:
|
||||
shellcheck -x -s sh **/*.sh platforms/mac/yabairc
|
||||
shellcheck -x -s bash **/*.bash tools/bash/* scripts/*.{sh,zsh,bash} **/*.bashrc
|
||||
shellcheck -x -s bash **/*.bash tools/bash/* scripts/*.{sh,zsh,bash} **/*.bashrc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue