diff --git a/.github/README.md b/.github/README.md index 5d682b5..85c1ad8 100644 --- a/.github/README.md +++ b/.github/README.md @@ -12,7 +12,7 @@ - [Security](#security) - [Dotfile Management Systems](#dotfile-management-systems) - [So copy paste, right?](#so-copy-paste-right) -- [My Dots](#my-dots) +- [My Dots](#my-dotfiles) - [Setup](#setup) - [Directory Structure](#directory-structure) - [Install Script](#install-script) @@ -189,18 +189,18 @@ Once the repo is cloned, you can modify whatever files you like before running t
~ └── . - ├── bash/ - ├── tmux/ - ├── vim/ - ├── zsh/ - └── installs/ - ├── Brewfile - ├── arch-pacman.sh - └── flatpak.sh - ├── .github/ - ├── lets-go.sh - ├── install.sh - └── symlinks.yml + ├── bash/ # Bash (shell) config + ├── tmux/ # Tmux (multiplexer) config + ├── vim/ # Vim (text editor) config + ├── zsh/ # ZSH (shell) config + └── installs/ # Scripts for software installation + ├── Brewfile # Package installs for MacOS via Homebrew + ├── arch-pacman.sh # Package installs for Arch via Pacman + └── flatpak.sh # Package installs for Linux desktops via Flatpak + ├── .github/ # Meta files for GitHub repo + ├── lets-go.sh # One-line remote installation entry point + ├── install.sh # All-in-one install and setup script + └── symlinks.yml # List of symlink locations--- @@ -210,12 +210,12 @@ Once the repo is cloned, you can modify whatever files you like before running t The setup script ([`install.sh`](https://github.com/Lissy93/dotfiles/blob/master/install.sh)) will do the following: - **Setup** - - Set variables by reading any passed parameters, or fallback to sensible defaults - Print welcome message, and a summary of proposed changes, and prompt user to continue - Ensure that core dependencies are met (git, zsh, vim) + - Set variables by reading any passed parameters, or fallback to sensible defaults (see [`.zshenv`](https://github.com/Lissy93/dotfiles/blob/master/zsh/.zshenv)) - **Dotfiles** - If dotfiles not yet present, will clone from git, otherwise pulls latest changes - - Symlinks each file to it's correct location on disk + - Setup / update symlinks each file to it's correct location on disk - **System Config** - Checks default shell, if not yet set, will prompt to set to zsh - Installs Vim plugins via Plug diff --git a/.github/sync.yml b/.github/sync.yml new file mode 100644 index 0000000..af39a11 --- /dev/null +++ b/.github/sync.yml @@ -0,0 +1,4 @@ +lissy93/Brewfile: + - source: installs/Brewfile + dest: Brewfile + diff --git a/.github/workflows/sync-files.yml b/.github/workflows/sync-files.yml new file mode 100644 index 0000000..5fe372a --- /dev/null +++ b/.github/workflows/sync-files.yml @@ -0,0 +1,26 @@ +name: 🔄 Sync to other Repos +on: + workflow_dispatch: # Manual dispatch + schedule: + - cron: '0 1 * * 0' # At 01:00 on Sunday. + push: + branches: + - master +jobs: + sync: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@master + - name: Run GitHub File Sync + uses: BetaHuhn/repo-file-sync-action@v1 + with: + GH_PAT: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + GH_INSTALLATION_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + CONFIG_PATH: .github/sync.yml + GIT_USERNAME: liss-bot + GIT_EMAIL: alicia-gh-bot@mail.as93.net + ASSIGNEES: Lissy93 + REVIEWERS: Lissy93 + PR_BODY: | + This PR pulls the latest changes to the `Brewfile` from [Lissy93/Dotfiles](https://github.com/lissy93/dotfiles). diff --git a/install.sh b/install.sh index d294937..388052b 100755 --- a/install.sh +++ b/install.sh @@ -41,7 +41,7 @@ GREEN='\033[0;32m' PURPLE='\033[0;35m' # Clear the screen -if [[ ! $PARAMS == *"--no-clear"* ]]; then +if [[ ! $PARAMS == *"--no-clear"* ]] && [[ ! $PARAMS == *"--help"* ]] ; then clear fi @@ -71,14 +71,29 @@ make_intro () { echo -e "${CYAN_B}The seup script will do the following:${RESET}" echo -e "${C2}(1) Pre-Setup Tasls" echo -e " ${C3}- Check that all requirements are met, and system is compatible" + echo -e " ${C3}- Sets environmental variables from params, or uses sensible defaults" + echo -e " ${C3}- Output welcome message" echo -e "${C2}(2) Setup Dotfiles" - echo -e " ${C3}- Clone or update dotfiles from git, and apply symlinks" + echo -e " ${C3}- Clone or update dotfiles from git" + echo -e " ${C3}- Symlinks dotfiles to correct locations" echo -e "${C2}(3) Install packages" - echo -e " ${C3}- Update packeges, and prompt to install apps" + echo -e " ${C3}- On MacOS, prompt to install Homebrew if not present" + echo -e " ${C3}- On MacOS, updates and installs apps liseted in Brewfile" + echo -e " ${C3}- On Arch Linux, updates and installs packages via Pacman" + echo -e " ${C3}- On Debian Linux, updates and installs packages via apt get" + echo -e " ${C3}- On Linux desktop systems, prompt to install desktop apps via Flatpak" + echo -e " ${C3}- Checks that OS is up-to-date and criticial patches are installed" echo -e "${C2}(4) Configure sytstem" - echo -e " ${C3}- Setup Vim, Tmux and ZSH plugins" - echo -e " ${C3}- Configure OS and apply app user preferences" + echo -e " ${C3}- Setup Vim, and install Vim plugins via Plug" + echo -e " ${C3}- Setup Tmux, and install Tmux plugins via TPM" + echo -e " ${C3}- Setup ZSH, and install ZSH plugins via Antigen" + echo -e " ${C3}- Prompt to configure OS user preferences" + echo -e "${C2}(5) Finishing Up" + echo -e " ${C3}- Refresh current terminal session" + echo -e " ${C3}- Print summary of applied changes and time taken" + echo -e " ${C3}- Exit with appropriate status code" echo -e "\n${PURPLE}You will be prompted at each stage, before any changes are made.${RESET}" + echo -e "${PURPLE}For more info, see GitHub: \e[4mhttps://github.com/lissy93/dotfiles${RESET}" } # Checks if a given package is installed @@ -264,7 +279,7 @@ function install_packages () { # Arch Linux arch_pkg_install_script="${DOTFILES_DIR}/installs/arch-pacman.sh" chmod +x $arch_pkg_install_script - $arch_pkg_install_script + $arch_pkg_install_script $params fi # If running in Linux desktop mode, prompt to install desktop apps via Flatpak flatpak_script="${DOTFILES_DIR}/installs/flatpak.sh" diff --git a/tmux/tmux.conf b/tmux/tmux.conf index 92d77b5..752b28a 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -5,6 +5,7 @@ ###################################################################### # Config for Tmux multiplexer (requires version >= v2.4) # # Sets preferences, keybindings and configures plugins # +# Tmux needs to be re-sourced or killed for changes to work # # For docs and more info, see: https://github.com/lissy93/dotfiles # # # # Licensed under MIT (C) Alicia Sykes 2022