From f5e55a09d6d019f826c1a0bf69b879bbc3de5efb Mon Sep 17 00:00:00 2001 From: mitchell Date: Sat, 20 Jun 2026 14:50:38 -0400 Subject: [PATCH] refactor: further cleanup/modularization --- cachyos_repo => archiso/cachyos_repo | 0 format_btrfs => archiso/format_btrfs | 0 install_arch => archiso/install_arch | 0 pacstrap => archiso/pacstrap | 0 greetd_niri.kdl => misc/greetd_niri.kdl | 0 gtkgreet.css => misc/gtkgreet.css | 0 sync | 116 ------------------------ 7 files changed, 116 deletions(-) rename cachyos_repo => archiso/cachyos_repo (100%) rename format_btrfs => archiso/format_btrfs (100%) rename install_arch => archiso/install_arch (100%) rename pacstrap => archiso/pacstrap (100%) rename greetd_niri.kdl => misc/greetd_niri.kdl (100%) rename gtkgreet.css => misc/gtkgreet.css (100%) delete mode 100755 sync diff --git a/cachyos_repo b/archiso/cachyos_repo similarity index 100% rename from cachyos_repo rename to archiso/cachyos_repo diff --git a/format_btrfs b/archiso/format_btrfs similarity index 100% rename from format_btrfs rename to archiso/format_btrfs diff --git a/install_arch b/archiso/install_arch similarity index 100% rename from install_arch rename to archiso/install_arch diff --git a/pacstrap b/archiso/pacstrap similarity index 100% rename from pacstrap rename to archiso/pacstrap diff --git a/greetd_niri.kdl b/misc/greetd_niri.kdl similarity index 100% rename from greetd_niri.kdl rename to misc/greetd_niri.kdl diff --git a/gtkgreet.css b/misc/gtkgreet.css similarity index 100% rename from gtkgreet.css rename to misc/gtkgreet.css diff --git a/sync b/sync deleted file mode 100755 index be348b1..0000000 --- a/sync +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/env fish - -function main - argparse d/desktop g/git i/install -- $argv - set -l start_dir (pwd) - and set -l tmp_dir (mktemp --directory 2>/dev/null; or mktemp -d -t 'dotfiles') - and set -l cwd (string match -r '\w+$' $start_dir) - and set -l uname (uname) - or return $status - - log 'Syncing shell environment configurations' - set_color grey - - setup_tmp_space $cwd $tmp_dir - - and sync_terminal_env - - and if test -n "$_flag_i" - set_color normal - log 'Installing Neovim plugins' - set_color grey - - install_nvim_plugins - end - - and if test -n "$_flag_d" - set_color normal - log 'Syncing desktop environment configurations' - set_color grey - - sync_desktop_env $uname - end - - and if test -n "$_flag_g" - set_color normal - log 'Sync git config' - sync_git_config - set_color grey - end - - clean_up_tmp_space $cwd $start_dir $tmp_dir - or return $status - - set_color normal - echo -s \n 'Done syncing.' -end - -function setup_tmp_space -a cwd tmp_dir - if test ! "$cwd" = dotfiles - git clone --recurse-submodules https://github.com/mitchell/dotfiles.git $tmp_dir - and cd $tmp_dir - end -end - -function sync_terminal_env - if ! test -e ~/.config - mkdir ~/.config - end - - if ! test -e ~/code/scripts - mkdir -p ~/code/scripts - end - - rsync -aP ./.config/fish ~/.config/ - and rsync -aP ./.config/nvim ~/.config/ - and rsync -aP ./.tmux-line.conf ~/ - and rsync -aP ./.tmux.conf ~/ - and rsync -aP ./scripts/ ~/code/scripts/ - and rsync -aP ./.config/starship.toml ~/.config/ -end - -function sync_desktop_env -a uname - rsync -aP ./.wezterm.lua ~/ - rsync -aP ./.config/ghostty ~/.config/ - or return 1 - - switch $uname - case Darwin - rsync -aP ./.yabairc ~/ - and rsync -aP ./.skhdrc ~/ - - case Linux - rsync -aP ./.config/bspwm ~/.config/ - and rsync -aP ./.config/sxhkd ~/.config/ - and rsync -aP ./.config/picom ~/.config/ - and rsync -aP ./.config/polybar ~/.config/ - and rsync -aP ./.config/rofi ~/.config/ - and rsync -aP ./.config/niri ~/.config/ - end -end - -function install_nvim_plugins - command -q nvim - and nvim +PlugUpgrade +PlugUpdate +UpdateRemotePlugins +qa - and nvim +COQdeps +bnext +bdelete -end - -function sync_git_config - rsync -aP ./.gitconfig ~/ - - git config --global user.name mitchell - git config --global user.email m@mjfs.us -end - -function clean_up_tmp_space -a cwd start_dir tmp_dir - if test ! "$cwd" = dotfiles - cd $start_dir - and rm -r $tmp_dir - end -end - -function log -a message - echo \n"--- $message ---"\n -end - -main $argv