Merge branch 'master' of github.com:Lissy93/dotfiles

This commit is contained in:
Alicia Sykes 2022-10-23 10:11:53 +01:00
commit 54a7d49b7f
8 changed files with 97 additions and 28 deletions

30
.github/README.md vendored
View File

@ -12,7 +12,7 @@
- [Security](#security) - [Security](#security)
- [Dotfile Management Systems](#dotfile-management-systems) - [Dotfile Management Systems](#dotfile-management-systems)
- [So copy paste, right?](#so-copy-paste-right) - [So copy paste, right?](#so-copy-paste-right)
- [My Dots](#my-dots) - [My Dots](#my-dotfiles)
- [Setup](#setup) - [Setup](#setup)
- [Directory Structure](#directory-structure) - [Directory Structure](#directory-structure)
- [Install Script](#install-script) - [Install Script](#install-script)
@ -189,18 +189,18 @@ Once the repo is cloned, you can modify whatever files you like before running t
<pre> <pre>
~ ~
└── <a href="https://github.com/Lissy93/dotfiles" title="Root">.</a> └── <a href="https://github.com/Lissy93/dotfiles" title="Root">.</a>
├── <a href="https://github.com/Lissy93/dotfiles/tree/master/bash" title="Bash Config">bash/</a> ├── <a href="https://github.com/Lissy93/dotfiles/tree/master/bash" title="Bash Config">bash/</a> # Bash (shell) config
├── <a href="https://github.com/Lissy93/dotfiles/tree/master/tmux" title="Tmux Configs">tmux/</a> ├── <a href="https://github.com/Lissy93/dotfiles/tree/master/tmux" title="Tmux Configs">tmux/</a> # Tmux (multiplexer) config
├── <a href="https://github.com/Lissy93/dotfiles/tree/master/vim" title="Vim Configs">vim/</a> ├── <a href="https://github.com/Lissy93/dotfiles/tree/master/vim" title="Vim Configs">vim/</a> # Vim (text editor) config
├── <a href="https://github.com/Lissy93/dotfiles/tree/master/zsh" title="ZSH Configs">zsh/</a> ├── <a href="https://github.com/Lissy93/dotfiles/tree/master/zsh" title="ZSH Configs">zsh/</a> # ZSH (shell) config
└── <a href="https://github.com/Lissy93/dotfiles/tree/master/installs" title="List of packages to install">installs/</a> └── <a href="https://github.com/Lissy93/dotfiles/tree/master/installs" title="List of packages to install">installs/</a> # Scripts for software installation
├── <a href="https://github.com/Lissy93/dotfiles/blob/master/installs/Brewfile" title="Packages for MacOS via Homebrew">Brewfile</a> ├── <a href="https://github.com/Lissy93/dotfiles/blob/master/installs/Brewfile" title="Packages for MacOS via Homebrew">Brewfile</a> # Package installs for MacOS via Homebrew
├── <a href="https://github.com/Lissy93/dotfiles/blob/master/installs/arch-pacman.sh" title="Packages for Arch Linux via Pacman">arch-pacman.sh</a> ├── <a href="https://github.com/Lissy93/dotfiles/blob/master/installs/arch-pacman.sh" title="Packages for Arch Linux via Pacman">arch-pacman.sh</a> # Package installs for Arch via Pacman
└── <a href="https://github.com/Lissy93/dotfiles/blob/master/installs/flatpak.sh" title="Packages for Linux Desktops via Flatpak">flatpak.sh</a> └── <a href="https://github.com/Lissy93/dotfiles/blob/master/installs/flatpak.sh" title="Packages for Linux Desktops via Flatpak">flatpak.sh</a> # Package installs for Linux desktops via Flatpak
├── <a href="https://github.com/Lissy93/dotfiles/tree/master/.github" title="Repo Meta">.github/</a> ├── <a href="https://github.com/Lissy93/dotfiles/tree/master/.github" title="Repo Meta">.github/</a> # Meta files for GitHub repo
├── <a href="https://github.com/Lissy93/dotfiles/blob/master/lets-go.sh" title="Remote Setup Initiator">lets-go.sh</a> ├── <a href="https://github.com/Lissy93/dotfiles/blob/master/lets-go.sh" title="Remote Setup Initiator">lets-go.sh</a> # One-line remote installation entry point
├── <a href="https://github.com/Lissy93/dotfiles/blob/master/install.sh" title="Setup Script">install.sh</a> ├── <a href="https://github.com/Lissy93/dotfiles/blob/master/install.sh" title="Setup Script">install.sh</a> # All-in-one install and setup script
└── <a href="https://github.com/Lissy93/dotfiles/blob/master/symlinks.yml" title="Symlink location list">symlinks.yml</a> └── <a href="https://github.com/Lissy93/dotfiles/blob/master/symlinks.yml" title="Symlink location list">symlinks.yml</a> # List of symlink locations
</pre> </pre>
--- ---
@ -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: The setup script ([`install.sh`](https://github.com/Lissy93/dotfiles/blob/master/install.sh)) will do the following:
- **Setup** - **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 - Print welcome message, and a summary of proposed changes, and prompt user to continue
- Ensure that core dependencies are met (git, zsh, vim) - 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** - **Dotfiles**
- If dotfiles not yet present, will clone from git, otherwise pulls latest changes - 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** - **System Config**
- Checks default shell, if not yet set, will prompt to set to zsh - Checks default shell, if not yet set, will prompt to set to zsh
- Installs Vim plugins via Plug - Installs Vim plugins via Plug

4
.github/sync.yml vendored Normal file
View File

@ -0,0 +1,4 @@
lissy93/Brewfile:
- source: installs/Brewfile
dest: Brewfile

26
.github/workflows/sync-files.yml vendored Normal file
View File

@ -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).

View File

@ -41,7 +41,7 @@ GREEN='\033[0;32m'
PURPLE='\033[0;35m' PURPLE='\033[0;35m'
# Clear the screen # Clear the screen
if [[ ! $PARAMS == *"--no-clear"* ]]; then if [[ ! $PARAMS == *"--no-clear"* ]] && [[ ! $PARAMS == *"--help"* ]] ; then
clear clear
fi fi
@ -71,14 +71,29 @@ make_intro () {
echo -e "${CYAN_B}The seup script will do the following:${RESET}" echo -e "${CYAN_B}The seup script will do the following:${RESET}"
echo -e "${C2}(1) Pre-Setup Tasls" echo -e "${C2}(1) Pre-Setup Tasls"
echo -e " ${C3}- Check that all requirements are met, and system is compatible" 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 "${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 "${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 "${C2}(4) Configure sytstem"
echo -e " ${C3}- Setup Vim, Tmux and ZSH plugins" echo -e " ${C3}- Setup Vim, and install Vim plugins via Plug"
echo -e " ${C3}- Configure OS and apply app user preferences" 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 "\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 # Checks if a given package is installed
@ -264,7 +279,7 @@ function install_packages () {
# Arch Linux # Arch Linux
arch_pkg_install_script="${DOTFILES_DIR}/installs/arch-pacman.sh" arch_pkg_install_script="${DOTFILES_DIR}/installs/arch-pacman.sh"
chmod +x $arch_pkg_install_script chmod +x $arch_pkg_install_script
$arch_pkg_install_script $arch_pkg_install_script $params
fi fi
# If running in Linux desktop mode, prompt to install desktop apps via Flatpak # If running in Linux desktop mode, prompt to install desktop apps via Flatpak
flatpak_script="${DOTFILES_DIR}/installs/flatpak.sh" flatpak_script="${DOTFILES_DIR}/installs/flatpak.sh"

View File

@ -5,6 +5,7 @@
###################################################################### ######################################################################
# Config for Tmux multiplexer (requires version >= v2.4) # # Config for Tmux multiplexer (requires version >= v2.4) #
# Sets preferences, keybindings and configures plugins # # 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 # # For docs and more info, see: https://github.com/lissy93/dotfiles #
# # # #
# Licensed under MIT (C) Alicia Sykes 2022 <https://aliciasykes.com> # # Licensed under MIT (C) Alicia Sykes 2022 <https://aliciasykes.com> #
@ -15,8 +16,6 @@
# Basics # # Basics #
###################################################################### ######################################################################
# Add a secondary prefix key (Ctrl+A as well as Ctrl+B)
# Set Tmux prefix keys (Ctrl+B or `) # Set Tmux prefix keys (Ctrl+B or `)
set-option -g prefix C-b set-option -g prefix C-b
set-option -g prefix2 ` set-option -g prefix2 `
@ -67,6 +66,16 @@ bind h split-window -h
set -g monitor-activity on set -g monitor-activity on
set -g visual-activity on set -g visual-activity on
######################################################################
# Pop-Up Menus #
######################################################################
# Prefix + Ctrl J shows a session list popup selector with fzf
bind C-j display-popup -E "tmux list-sessions | sed -E 's/:.*$//' | grep -v \"^$(tmux display-message -p '#S')\$\" | fzf --reverse | xargs tmux switch-client -t"
# Show htop on Prefix + Ctrl H
bind C-h display-popup -E "htop"
###################################################################### ######################################################################
# Plugin Imports and Configurations # # Plugin Imports and Configurations #

View File

@ -1,5 +1,10 @@
# ZSH aliases for common Flutter + Dart dev commands
# Inspired by ohmyzsh/flutter and hadenlabs/zsh-flutter ######################################################################
# ZSH aliases for common Flutter + Dart dev commands #
# Inspired by ohmyzsh/flutter and hadenlabs/zsh-flutter #
# #
# Licensed under MIT (C) Alicia Sykes 2022 <https://aliciasykes.com> #
######################################################################
# Main fultter command # Main fultter command
alias fl="flutter" alias fl="flutter"

View File

@ -1,5 +1,9 @@
# List of ZSH aliases for common git commands
# Licensed under MIT - (C) Alicia Sykes, 2022 <https://aliciasykes.com> ######################################################################
# ZSH aliases and helper functions for working with Git #
# #
# Licensed under MIT (C) Alicia Sykes 2022 <https://aliciasykes.com> #
######################################################################
# Basics # Basics
alias g="git" alias g="git"

View File

@ -1,5 +1,11 @@
# ZSH helper utils, and aliases for Node.js development (yarn, npn, nvm, node)
######################################################################
# ZSH aliases and helper functions for Node.js / web development #
# Includes aliases for yarn, npn, nvm, npx, node, react, etc #
# #
# Licensed under MIT (C) Alicia Sykes 2022 <https://aliciasykes.com> #
######################################################################
# Yarn - Project commands # Yarn - Project commands
alias ys='yarn start' alias ys='yarn start'