From 0852147591ab8be51045b5e113e5d8727f252767 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Thu, 29 Sep 2022 22:49:56 +0100 Subject: [PATCH 1/9] Adds preliminary dep list for arch linux --- installs/arch.sh | 69 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 2 deletions(-) diff --git a/installs/arch.sh b/installs/arch.sh index 13b106d..168706d 100644 --- a/installs/arch.sh +++ b/installs/arch.sh @@ -12,11 +12,76 @@ # Apps to be installed via Pacman pacman_apps=( + # Essentials + 'git' # Version controll + 'neovim' # Text editor + 'ranger' # Directory browser + 'tmux' # Term multiplexer + # Basics + 'aria2' # Resuming download util (better wget) + 'bat' # Output highlighting (better cat) + 'broot' # Interactive directory navigation + 'ctags' # Indexing of file info + headers + 'diff-so-fancy'# Readable file compares (better diff) + 'exa' # Listing files with info (better ls) + 'fzf' # Fuzzy file finder and filtering + 'hyperfine' # Benchmarking for arbitrary commands + 'just' # Powerful command runner (better make) + 'jq' # JSON parser, output and query files + 'duf' # Get info on mounted disks (better df) + 'procs' # Advanced process viewer (better ps) + 'ripgrep' # Searching within files (better grep) + 'scc' # Count lines of code (better cloc) + 'sd' # RegEx find and replace (better sed) + 'thefuck' # Auto-correct miss-typed commands + 'tldr' # Community-maintained docs (better man) + 'tree' # Directory listings as tree structure + 'trash-cli' # Record and restore removed files + 'xsel' # Copy paste access to the X clipboard + 'zoxide' # Auto-learning navigation (better cd) + + # Monitoring + 'bmon' # Bandwidth utilization monitor + 'ctop' # Container metrics and monitoring + 'bpytop' # Resource monitoring (like htop) + 'glances' # Resource monitor + web and API + 'goaccess' # Web log analyzer and viewer + 'gping' # Interactive ping tool, with graph + 'ncdu' # Disk usage analyzer and monitor (better du) + 'speedtest-cli'# Command line speed test utility + + # Productivity Apps + 'browsh' # Web browser, in terminal + 'buku' # Bookmark manager + 'cmus' # Music player + 'khal' # Calendar client + 'mutt' # Email client + 'newsboat' # RSS / ATOM reader + 'pass' # Password store + 'rclone' # Manage cloud storage + 'task' # Todo + task management + + # Development Suits + 'httpie' # HTTP / API testing testing client + 'lazydocker' # Full Docker management app + 'lazygit' # Full Git managemtne app + + # External Sercvices + 'ngrok' # Reverse proxy for sharing localhost + 'tmate' # Share a terminal session via internet + 'asciinema' # Recording + sharing terminal sessions + 'navi' # Browse, search, read cheat sheets + + # Fun + 'cowsay' # Have an ASCII cow say your message + 'figlet' # Output text as big ASCII art text + 'lolcat' # Make console output raibow colored + 'neofetch' # Show system data and ditstro info + 'pipes-sh' # Cool terminal pipe screen saver + 'pv' # Pipe viewer, with animation options ) - - # Colors CYAN_B='\033[1;96m' YELLOW='\033[0;93m' From 88c1c2662084310b6a2c758e85455880cbb68a61 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 11 Oct 2022 18:14:27 +0100 Subject: [PATCH 2/9] Grammer and ordering updates to readme --- .github/README.md | 81 +++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 42 deletions(-) diff --git a/.github/README.md b/.github/README.md index 4dc56d1..cb61b8c 100644 --- a/.github/README.md +++ b/.github/README.md @@ -7,10 +7,10 @@ ## Contents - [Introduction to Dotfiles](#intro) - [What are dotfiles?](#what-are-dotfiles) - - [Dotfile Management Systems](#dotfile-management-systems) - [XDG Directories](#xdg-directories) - [Containerized Userspace](#containerized-userspace) - [Security](#security) + - [Dotfile Management Systems](#dotfile-management-systems) - [So copy paste, right?](#so-copy-paste-right) - [My Dots](#my-dots) - [Setup](#setup) @@ -43,11 +43,46 @@ It's not hard to create your own dotfile repo, it's great fun and you'll learn a --- +### XDG Directories + +The location of most config files can be defined using the [XDG base directory specification](https://specifications.freedesktop.org/basedir-spec), which is honored by most apps. This lets you specify where config, log, cache and data files are stored, keeping your top-level home directory free from clutter. You can do this by setting environmental variables, usually within the [`.zshenv`](https://github.com/Lissy93/dotfiles/blob/master/zsh/.zshenv) file. + +Variable | Location +--- | --- +`XDG_CONFIG_HOME` | `~/.config` +`XDG_DATA_HOME` | `~/.local/share` +`XDG_BIN_HOME` | `~/.local/bin` +`XDG_LIB_HOME` | `~/.local/lib` +`XDG_CACHE_HOME` | `~/.local/var/cache` + +--- + +### Containerized Userspace + +You can also containerize your dotfiles, meaning with a single command, you can spin up a fresh virtual environment on any system, and immediately feel right at home with all your packages and configurations. + +This is awesome for a number of reasons: 1) Super minimal dependency installation on the host 2) Blazing fast, as you can pull your built image from a registry, instead of compiling everything locally 3) Cross-platform compatibility, whatever your host OS is, you can always have a familiar Linux system in the container 4) Security, you can control which host resources are accessible within each container + +For this, I'm using an Alpine-based Docker container defined in the [`Dockerfile`](https://github.com/Lissy93/dotfiles/blob/master/Dockerfile), to try it out, just run `docker run lissy93/dotfiles`. + +Other options could include spinning up VMs with a predefined config, either using something like [Vagrant](https://www.vagrantup.com/) or a [NixOS](https://nixos.org/)-based config. + +--- + +### Security + +Something that is important to keep in mind, is security. Often you may have some personal info included in some of your dotfiles. Before storing anything on the internet, double check there's no sensitive info, SSH keys, API keys or plaintext passwords. If you're using git, then any files you wouldn't want to be commited, can just be listed in your [`.gitignore`](https://git-scm.com/docs/gitignore). If any .gitignore'd files are imported by other files, be sure to check they exist, so you don't get errors when cloning onto a fresh system. + +Another solution, is to encrypt sensitive info. A great tool for this is [`pass`](https://www.passwordstore.org/) as it makes GPG-encrypting passwords very easy ([this article](https://www.outcoldman.com/en/archive/2015/09/17/keep-sensitive-data-encrypted-in-dotfiles/) outlines how), or you could also just use plain old GPG (as outlined in [this article](https://www.abdullah.today/encrypted-dotfiles/)). + +--- + + ### Dotfile Management Systems In terms of managing and applying your dotfiles, you can make things simple, or complex as you like. -The two most common approaches are be either symlinking, or using git bare repo, but you could also do things manually by writing a simple script. +The two most common approaches are be either [symlinking](#option-1---symlinking), or using [git bare repo](#option-2---git-bare-repo), but you could also do things manually by writing a simple script. #### Option 1 - Symlinking @@ -96,41 +131,6 @@ To learn more, DistroTube made an excellent [video about bare git repos](https:/ In terms of managing dependencies, using either [git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) or [git subtree](https://github.com/git/git/blob/master/contrib/subtree/git-subtree.txt) will let you keep dependencies in your project, while also separate from your own code and easily updatable. ---- - -### XDG Directories - -One of my goals was to try and keep the top-level user home directory as clean as possible by honouring the [XDG base directory specification](https://specifications.freedesktop.org/basedir-spec), which lets you specify the locations for config, cache, data, log and other files. This is done by setting environmental variables within [`.zshenv`](https://github.com/Lissy93/dotfiles/blob/master/zsh/.zshenv). - -You can modify any of these values, but by default the following paths are used: - -Variable | Location ---- | --- -`XDG_CONFIG_HOME` | `~/.config` -`XDG_DATA_HOME` | `~/.local/share` -`XDG_BIN_HOME` | `~/.local/bin` -`XDG_LIB_HOME` | `~/.local/lib` -`XDG_CACHE_HOME` | `~/.local/var/cache` - ---- - -### Containerized Userspace - -You can also containerize your dotfiles, meaning with a single command, you can spin up a fresh virtual environment on any system, and immediately feel right at home with all your packages and configurations. - -This is awesome for a number of reasons: 1) Super minimal dependency installation on the host 2) Blazing fast, as you can pull your built image from a registry, instead of compiling everything locally 3) Cross-platform compatibility, whatever your host OS is, you can always have a familiar Linux system in the container 4) Security, you can control which host resources are accessible within each container - -For this, I'm using an Alpine-based Docker container defined in the [`Dockerfile`](https://github.com/Lissy93/dotfiles/blob/master/Dockerfile), to try it out, just run `docker run lissy93/dotfiles`. - -Other options could include spinning up VMs with a predefined config, either using something like [Vagrant](https://www.vagrantup.com/) or a [NixOS](https://nixos.org/)-based config. - ---- - -### Security - -Something that is important to keep in mind, is security. Often you may have some personal info included in some of your dotfiles. Before storing anything on the internet, double check there's no sensitive info, SSH keys, API keys or plaintext passwords. If you're using git, then any files you wouldn't want to be commited, can just be listed in your [`.gitignore`](https://git-scm.com/docs/gitignore). If any .gitignore'd files are imported by other files, be sure to check they exist, so you don't get errors when cloning onto a fresh system. - -Another solution, is to encrypt sensitive info. A great tool for this is [`pass`](https://www.passwordstore.org/) as it makes GPG-encrypting passwords very easy ([this article](https://www.outcoldman.com/en/archive/2015/09/17/keep-sensitive-data-encrypted-in-dotfiles/) outlines how), or you could also just use plain old GPG (as outlined in [this article](https://www.abdullah.today/encrypted-dotfiles/)). --- @@ -148,9 +148,6 @@ There's even more to check out at [webpro/awesome-dotfiles](https://github.com/w ## My Dotfiles -> **Note** -> This repo is still a work in progress - ### Setup > **Warning** @@ -164,7 +161,7 @@ bash <(curl -s https://raw.githubusercontent.com/Lissy93/dotfiles/master/lets-go This will execute the quick setup script (in [`lets-go.sh`](https://github.com/Lissy93/dotfiles/blob/master/lets-go.sh)), which just clones the repo (if not yet present), then executes the [`install.sh`](https://github.com/Lissy93/dotfiles/blob/master/install.sh) script. You can re-run this at anytime to update the dotfiles. You can also optionally pass in some variables to change the install location (`DOTFILES_DIR`) and source repo (`DOTFILES_REPO`) to use your fork. -The install script is idempotent, it can be run multiple times without changing the result, beyond the initial application. It will take care of checking that all dependencies are present, and will prompt the user to install missing packages, using the appropriate package manager (currently supports brew, pacman, apt and pkg). The install script takes care of installing / updating ZSH, Tmux and Vim all plugins. +The install script [does several things](#install-script), it takes care of checking dependencies are met, updating dotfiles and symlinks, configuring CLI (Vim, Tmux, ZSH, etc), and will prompt the user to install listed packages, update the OS and apply any system preferences. The script is idempotent, so it can be run multiple times without changing the result, beyond the initial application. _Alternatively, you can clone the repo yourself, cd into it, allow execution of [`install.sh`](https://github.com/Lissy93/dotfiles/blob/master/install.sh) then run it to install or update._ @@ -178,7 +175,7 @@ chmod +x ~/.dotfiles/install.sh ~/.dotfiles/install.sh ``` -You'll probably want to fork the repo, then clone your fork instead, so update the above commands with the path to your repo, and optioanlly change the clone location on your disk. +You'll probably want to fork the repo, then clone your fork instead, so update the above commands with the path to your repo, and optionally change the clone location on your disk. Once the repo is cloned, you can modify whatever files you like before running the install script. The [Directory Structure](#directory-structure) section provides an overview of where each file is located. Then see the [Configuring](#configuring) section for setting file paths and symlink locations. From 2b9b0e58546ac8550eaeb88643af172e69440317 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 11 Oct 2022 18:27:33 +0100 Subject: [PATCH 3/9] Updates env var input names for install.sh --- install.sh | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/install.sh b/install.sh index c8ba52b..a265473 100755 --- a/install.sh +++ b/install.sh @@ -12,15 +12,23 @@ # Licensed under MIT (C) Alicia Sykes 2022 # ###################################################################### -# Configuration Params +# Dotfiles Source Repo and Destination Directory REPO_NAME="${REPO_NAME:-Lissy93/Dotfiles}" -REPO_PATH="https://github.com/${REPO_NAME}.git" +DOTFILES_DIR="${DOTFILES_DIR:-$HOME/Documents/config/dotfiles}" +DOTFILES_REPO="${DOTFILES_REPO:-https://github.com/${REPO_NAME}.git}" + +# Config Names and Locations +TITLE="🧰 ${REPO_NAME} Setup" SYMLINK_FILE="${SYMLINK_FILE:-symlinks.yaml}" DOTBOT_DIR="dotbot" DOTBOT_BIN="bin/dotbot" + +# Set variables for reference +PARAMS=$* # User-specified parameters CURRENT_DIR=$(cd "$(dirname ${BASH_SOURCE[0]})" && pwd) -DOTFILES_DIR="${DOTFILES_DIR:-$HOME/Documents/config/dotfiles}" -TITLE="🧰 ${REPO_NAME} Setup" +SYSTEM_TYPE=$(uname -s) # Get system type - Linux / MacOS (Darwin) +PROMPT_TIMEOUT=15 # When user is prompted for input, skip after x seconds +START_TIME=`date +%s` # Start timer # Color Variables CYAN_B='\033[1;96m' @@ -32,19 +40,13 @@ RESET='\033[0m' GREEN='\033[0;32m' PURPLE='\033[0;35m' -# Other params -start_time=`date +%s` # Start timer -PROMPT_TIMEOUT=15 # When user is prompted for input, skip after x seconds -system_type=$(uname -s) # Get system type - Linux / MacOS (Darwin) -params=$* # Get passed in params - # Clear the screen -if [[ ! $params == *"--no-clear"* ]]; then +if [[ ! $PARAMS == *"--no-clear"* ]]; then clear fi # If set to auto-yes - then don't wait for user reply -if [[ $params == *"--auto-yes"* ]]; then +if [[ $PARAMS == *"--auto-yes"* ]]; then PROMPT_TIMEOUT=1 REPLY='Y' fi @@ -105,17 +107,18 @@ system_verify () { # Prints welcome banner, verifies that requirements are met function pre_setup_tasks () { - # Show starting banner + # Show pretty starting banner make_banner "${TITLE}" "${CYAN_B}" 1 - # Print list of what will be applied + # Print intro, listing what changes will be applied make_intro - # Confirm user would like to proceed + # Confirm that the user would like to proceed echo -e "\n${CYAN_B}Are you happy to continue? (y/N)${RESET}" read -t $PROMPT_TIMEOUT -n 1 -r if [[ ! $REPLY =~ ^[Yy]$ ]]; then echo -e "\n${PURPLE}No worries, feel free to come back another time.\nTerminating...${RESET}" + make_banner "🚧 Installation Aborted" ${YELLOW_B} 1 exit 0 fi echo @@ -136,7 +139,7 @@ function setup_dot_files () { then echo -e "${PURPLE}Dotfiles not yet present. Will download ${REPO_NAME} into ${DOTFILES_DIR}${RESET}" mkdir -p "${DOTFILES_DIR}" - git clone --recursive ${REPO_PATH} ${DOTFILES_DIR} + git clone --recursive ${DOTFILES_REPO} ${DOTFILES_DIR} else echo -e "${PURPLE}Pulling changes from ${REPO_NAME} into ${DOTFILES_DIR}${RESET}" cd "${DOTFILES_DIR}" && git pull origin master && git submodule update --recursive @@ -189,7 +192,7 @@ function apply_preferences () { # Apply general system, app and OS security preferences (prompt user first) read -t $PROMPT_TIMEOUT -p "$(echo -e $CYAN_B)Would you like to apply system preferences? (y/N)" -n 1 -r if [[ $REPLY =~ ^[Yy]$ ]]; then - if [ "$system_type" = "Darwin" ]; then + if [ "$SYSTEM_TYPE" = "Darwin" ]; then echo -e "\n${PURPLE}Applying MacOS system preferences, ensure you've understood before proceeding${RESET}\n" macos_settings_dir="$DOTFILES_DIR/system-specific/macos/system-settings" for macScript in "macos-security.sh" "macos-preferences.sh" "macos-apps.sh"; do @@ -252,7 +255,7 @@ function install_packages () { echo -e "${PURPLE}Skipping package installs${RESET}" return fi - if [ "$system_type" = "Darwin" ]; then + if [ "$SYSTEM_TYPE" = "Darwin" ]; then # Mac OS intall_macos_packages elif [ -f "/etc/arch-release" ]; then @@ -275,7 +278,7 @@ function finishing_up () { source "${HOME}/.zshenv" # Print success message, and time taken - total_time=$((`date +%s`-start_time)) + total_time=$((`date +%s`-START_TIME)) make_banner "✨ Dotfiles configured succesfully in $total_time seconds" ${GREEN_B} 1 echo -e "\033[0;92m .--.\n |o_o |\n |:_/ |\n // \ \ \\ \n (| | ) \n /'\_ _/\`\\ \n \\___)=(___/\n" @@ -290,7 +293,7 @@ function finishing_up () { } # If --help flag passed in, just show the help menu -if [[ $params == *"--help"* ]]; then +if [[ $PARAMS == *"--help"* ]]; then make_intro exit 0 fi From 280ee53e6a9a9bd118d0c6401657ff3eb6145106 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 11 Oct 2022 18:30:25 +0100 Subject: [PATCH 4/9] Updates launchpad layout --- .../macos/app-configs/launchpad.yml | 110 +++++++++--------- 1 file changed, 57 insertions(+), 53 deletions(-) diff --git a/system-specific/macos/app-configs/launchpad.yml b/system-specific/macos/app-configs/launchpad.yml index 6a07ff6..d6afc29 100644 --- a/system-specific/macos/app-configs/launchpad.yml +++ b/system-specific/macos/app-configs/launchpad.yml @@ -1,6 +1,13 @@ -# This file specifies folders for the MacOS launchpad, and which apps should be nested where. -# It's useful for setting up fresh systems quickly, after installing all required dependencies. -# Requires lporg (brew install blacktop/tap/lporg), run `lporg load [file]` to restore layout. +###################################################################### +# MacOS App Launchpad Layout # +###################################################################### +# Specifies the folder layout and app order within OSX Launchpad # +# Useful for setting up fresh systems quickly after installing apps # +# Intended for use with lporg, run: brew install blacktop/tap/lporg # +# To restore launchpad layout with lporg, run: lporg load [file] # +# # +# Licensed under MIT (C) Alicia Sykes 2022 # +###################################################################### apps: pages: @@ -18,6 +25,7 @@ apps: - Sourcetree - UTM - Visual Studio + - MacDown - folder: Work Coms pages: - number: 1 @@ -67,62 +75,62 @@ apps: - number: 1 items: - Raycast - - Scroll Reverser + - Stats - Hidden Bar - AltTab - - Finicky - - Stats - - Little Snitch - - Espanso - - CopyQ - - PopClip - OpenInTerminal + - Scroll Reverser - AnyBar - - Marta + - Shottr + - Little Snitch + - Finicky + - Espanso + - OnyX + - CopyQ + - amm + - PopClip - Mjolnir - LinearMouse - Übersicht - - Shottr - - OnyX + - MacForge - folder: Other pages: - number: 1 items: - - Shortcuts - - QuickTime Player - - TextEdit - - Grapher - - Time Machine - - Font Book - - Chess - - Stickies - - Image Capture - - VoiceOver Utility - - AirPort Utility - - Migration Assistant - Terminal - Activity Monitor - - Console - - Keychain Access - - System Information - Automator + - TextEdit + - System Information + - Keychain Access - Script Editor - Disk Utility + - Console + - Screenshot + - Calculator + - System Preferences + - Simulator + - TestFlight + - Developer + - Time Machine + - Dictionary + - Stickies + - Shortcuts + - Grapher - Digital Color Meter - ColorSync Utility - - Screenshot - - Bluetooth File Exchange + - Font Book + - Chess - Audio MIDI Setup - - Developer - - Jabra Firmware Update - - Jabra Direct - - System Preferences - - Calculator - - Dictionary - - CotEditor + - Image Capture + - VoiceOver Utility + - Bluetooth File Exchange + - AirPort Utility + - Migration Assistant + - QuickTime Player - VMware Fusion Tech Preview - - TestFlight - - Simulator + - Jabra Direct + - CotEditor - number: 2 items: - Orion @@ -135,29 +143,29 @@ apps: items: - Contacts - Reminders + - Photos + - Numbers + - Pages + - Keynote + - Photo Booth - Notes - FaceTime - Messages - Maps - Find My - - Photo Booth - - Photos - - Preview - Music - Podcasts + - Books + - Preview - TV - Voice Memos - - Numbers - - Keynote - - Pages - News - Stocks - - Books - Siri - - App Store - Mission Control - Safari - Home + - App Store - folder: Corporate Spyware pages: - number: 1 @@ -165,12 +173,13 @@ apps: - Netskope Client - Self Service - Solarwinds Discovery Agent + - Kandji Extension Manager - Sophos Endpoint - - Sophos Endpoint Self Help - Sophos Network Extension - Sophos Scan - Remove Sophos Endpoint - Remove Netskope Client + - Sophos Endpoint Self Help - folder: Voldermort pages: - number: 1 @@ -183,8 +192,3 @@ apps: - Chromium - Visual Studio Code - iTerm -# widgets: -# pages: [] -# dock_items: -# - ============ -# desktop: {} From 06778db998f0c8594075566a6c6db8a6b53f263a Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Wed, 12 Oct 2022 18:01:05 +0100 Subject: [PATCH 5/9] Docker --- Dockerfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0bcfaa2..e76a060 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ FROM alpine:latest LABEL maintainer "Alicia Sykes " LABEL org.opencontainers.image.source https://github.com/lissy93/dotfiles +# Parameters ARG user=alicia ARG group=wheel ARG uid=1000 @@ -11,8 +12,8 @@ ARG userspace=userspace.git ARG vcsprovider=github.com ARG vcsowner=lissy93 +# Install system packages, with root USER root - RUN \ echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \ apk upgrade --no-cache && \ @@ -54,12 +55,19 @@ RUN \ chown -R ${user}:${group} /home/${user}/.dotfiles && \ chown -R ${user}:${group} /home/${user}/.userspace +ENV DOTFILES_DIR="$HOME/.dotfiles" + RUN chmod u+x /home/${user}/.dotfiles/install.sh USER ${user} -RUN cd $HOME/.dotfiles && ./install.sh +RUN cd $HOME/.dotfiles && ./install.sh --auto-yes ENV HISTFILE=/home/${user}/.cache/.zsh_history CMD [] + +ENTRYPOINT [ "/bin/zsh" ] + +# docker run -it --rm -w "$HOME" -v "$HOME/.userspace":/userspace -v $PWD:/cwd -v $HOME/.config:/config:rw -v /var/run/docker.sock:/var/run/docker.sock --network host dot-test + From a5d39e43c87d8a354f1662390ebeb12729b873b5 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Thu, 13 Oct 2022 20:30:29 +0100 Subject: [PATCH 6/9] Updates directory structure --- .github/README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/README.md b/.github/README.md index cb61b8c..1266451 100644 --- a/.github/README.md +++ b/.github/README.md @@ -140,7 +140,7 @@ Zach Holman wrote a great article titled [Dotfiles Are Meant to Be Forked](https By all means feel free to take what you want from mine. I've taken care to ensure that each file is standalone, and well documented so that certain files can just be dropped into any system. But I cannot stress enough the importance of reading through files to ensure it's actually what you want. -If you're looking for some more example dotfile repos to get you started, I can highly recommend taking a look at: [holman](https://github.com/holman/dotfiles). +If you're looking for some more example dotfile repos to get you started, I can highly recommend taking a look at: [@holman/dotfiles](https://github.com/holman/dotfiles), [@nickjj/dotfiles](https://github.com/nickjj/dotfiles), [@caarlos0/dotfiles](https://github.com/caarlos0/dotfiles), [@cowboy/dotfiles](https://github.com/cowboy/dotfiles). There's even more to check out at [webpro/awesome-dotfiles](https://github.com/webpro/awesome-dotfiles), [dotfiles.github.io](https://dotfiles.github.io/) and [r/unixporn](https://www.reddit.com/r/unixporn/). @@ -193,10 +193,13 @@ Once the repo is cloned, you can modify whatever files you like before running t β”œβ”€β”€ tmux/ β”œβ”€β”€ vim/ β”œβ”€β”€ zsh/ - β”œβ”€β”€ installs/ + └── installs/ + β”œβ”€β”€ Brewfile + β”œβ”€β”€ arch-pacman.sh + └── flatpak.sh β”œβ”€β”€ .github/ β”œβ”€β”€ lets-go.sh - └── install.sh + β”œβ”€β”€ install.sh └── symlinks.yml @@ -204,7 +207,7 @@ Once the repo is cloned, you can modify whatever files you like before running t ### Install Script -The install script will do the following: +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 @@ -990,12 +993,13 @@ Tmux plugins are managed using [TMP](https://github.com/tmux-plugins/tpm) and de // TODO +Git aliases for ZSH are located in [`/zsh/aliases/git.zsh`](https://github.com/Lissy93/dotfiles/blob/master/zsh/aliases/git.zsh), and are documented under the [Aliases](https://github.com/lissy93/dotfiles#my-aliases) section, above. --- ## Dependencies -These dot files make use of the following packages, and hence they are required +It's strongly recomended to have the following packages installed on your system before proceeding: - [zsh](https://www.zsh.org/) - Interactive Shell - [nvim](http://neovim.io/) - Extensible Vim-based text editor @@ -1009,11 +1013,8 @@ They can be easily installed/ updated with your package manger, e.g: - Alpine: `apk add zsh neovim tmux ranger git` - MacOS: `brew install zsh neovim tmux ranger git` -Depending on your setup, the following utils may also be required: `make`, `ctags`, `fzf` and `python3-pip` - --- - ### Utilities From 2e60a4255bb40f8bb538a4bad29823d3004adcfb Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Mon, 17 Oct 2022 23:09:37 +0100 Subject: [PATCH 7/9] Adds quick look plugins --- installs/Brewfile | 75 ++++++++++++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 30 deletions(-) diff --git a/installs/Brewfile b/installs/Brewfile index 3d075a2..1b88942 100644 --- a/installs/Brewfile +++ b/installs/Brewfile @@ -28,10 +28,10 @@ tap 'koekeishiya/formulae' ############################################################# # CLI Essentials -brew 'git' # Version controll -brew 'neovim' # Text editor -brew 'ranger' # Directory browser -brew 'tmux' # Term multiplexer +brew 'git' # Version controll +brew 'neovim' # Text editor +brew 'ranger' # Directory browser +brew 'tmux' # Term multiplexer # CLI Basics brew 'aria2' # Resuming download util (better wget) @@ -134,23 +134,23 @@ brew 'ttygif' # Generate GIF from terminal commands + output brew 'watchman' # Watch for changes and reload dev server # Network and Security Testing -brew 'bettercap' # Network, scanning and moniroting -brew 'nmap' # Port scanning -brew 'wrk' # HTTP benchmarking -cask 'burp-suite' # Web security testing -cask 'metasploit' # Pen testing framework -cask 'owasp-zap' # Web app security scanner -cask 'wireshark' # Network analyzer + packet capture +brew 'bettercap' # Network, scanning and moniroting +brew 'nmap' # Port scanning +brew 'wrk' # HTTP benchmarking +cask 'burp-suite' # Web security testing +cask 'metasploit' # Pen testing framework +cask 'owasp-zap' # Web app security scanner +cask 'wireshark' # Network analyzer + packet capture # Security Utilities -brew 'bcrypt' # Encryption utility, using blowfish -brew 'clamav' # Open source virus scanning suite -cask 'gpg-suite' # PGP encryption for emails and files -brew 'git-crypt' # Transparent encryption for git repos -brew 'lynis' # Scan system for common security issues -brew 'openssl' # Cryptography and SSL/TLS Toolkit -brew 'rkhunter' # Search / detect potential root kits -cask 'veracrypt' # File and volume encryption +brew 'bcrypt' # Encryption utility, using blowfish +brew 'clamav' # Open source virus scanning suite +cask 'gpg-suite' # PGP encryption for emails and files +brew 'git-crypt' # Transparent encryption for git repos +brew 'lynis' # Scan system for common security issues +brew 'openssl' # Cryptography and SSL/TLS Toolkit +brew 'rkhunter' # Search / detect potential root kits +cask 'veracrypt' # File and volume encryption ############################################################# # Desktop Applications # @@ -183,20 +183,20 @@ cask 'onyx' # Repair util for verifying system files cask 'daisydisk', args: { require_sha: false } # Disk space analyzer and cleaner # Creativity -cask 'audacity' # Audio editor / recorder -cask 'gimp' # Photo editor -brew 'handbrake' # Video transcoder -cask 'inkscape' # Vector editor -cask 'obs' # Screencasting / recording -cask 'shotcut' # Video editor +cask 'audacity' # Audio editor / recorder +cask 'gimp' # Photo editor +brew 'handbrake' # Video transcoder +cask 'inkscape' # Vector editor +cask 'obs' # Screencasting / recording +cask 'shotcut' # Video editor # Media -cask 'calibre' # E-Book reader +cask 'calibre' # E-Book reader cask 'spotify', args: { require_sha: false } # Propietary music streaming -cask 'transmission' # Torrent client -cask 'vlc' # Media player -brew 'pandoc' # Universal file converter -brew 'youtube-dl' # YouTube video downloader +cask 'transmission' # Torrent client +cask 'vlc' # Media player +brew 'pandoc' # Universal file converter +brew 'youtube-dl' # YouTube video downloader # Personal Applications cask '1password' # Password manager (proprietary) @@ -213,6 +213,10 @@ cask 'firefox' cask 'chromium' cask 'orion' +############################################################# +# Misc # +############################################################# + # Fonts tap 'homebrew/cask-fonts' cask 'font-fira-code' @@ -220,4 +224,15 @@ cask 'font-hack' cask 'font-inconsolata' cask 'font-meslo-lg-nerd-font' +# Quick-Look Plugins +cask 'webpquicklook' +cask 'suspicious-package' +cask 'quicknfo' +cask 'quicklook-json' +cask 'quicklook-csv' +cask 'qlstephen' +cask 'qlprettypatch' +cask 'qlmarkdown' +cask 'qlcolorcode' + # EOF From 0a4cbc35ac4fb986f1330c252b62be7d9c337e5a Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 18 Oct 2022 20:04:56 +0100 Subject: [PATCH 8/9] Replaces seconds with minutes if greater than 60 --- install.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index a265473..d294937 100755 --- a/install.sh +++ b/install.sh @@ -217,10 +217,12 @@ function intall_macos_packages () { # Update / Install the Homebrew packages in ~/.Brewfile if command_exists brew && [ -f "$DOTFILES_DIR/installs/Brewfile" ]; then echo -e "\n${PURPLE}Updating homebrew and packages...${RESET}" - brew update - brew upgrade - brew bundle --global --file $HOME/.Brewfile - brew cleanup + brew doctor # Check for any app issues + brew update # Update Brew to latest version + brew upgrade # Upgrade all installed casks + brew bundle --global --file $HOME/.Brewfile # Install all listed Brew apps + brew cleanup # Remove stale lock files and outdated downloads + killall Finder # Restart finder (required for some apps) else echo -e "${PURPLE}Skipping Homebrew as requirements not met${RESET}" fi @@ -279,7 +281,13 @@ function finishing_up () { # Print success message, and time taken total_time=$((`date +%s`-START_TIME)) - make_banner "✨ Dotfiles configured succesfully in $total_time seconds" ${GREEN_B} 1 + if [[ $total_time -gt 60 ]]; then + total_time="$(($total_time/60)) minutes" + else + total_time="${total_time} seconds" + fi + + make_banner "✨ Dotfiles configured succesfully in $total_time" ${GREEN_B} 1 echo -e "\033[0;92m .--.\n |o_o |\n |:_/ |\n // \ \ \\ \n (| | ) \n /'\_ _/\`\\ \n \\___)=(___/\n" From b6465c6eda6d33ec9859a3337c2eb20b6ef01708 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Wed, 19 Oct 2022 16:24:01 +0100 Subject: [PATCH 9/9] Updates packages --- .github/README.md | 2 ++ installs/Brewfile | 79 ++++++++++++++++++++++++----------------------- 2 files changed, 43 insertions(+), 38 deletions(-) diff --git a/.github/README.md b/.github/README.md index 1266451..1bdcf3b 100644 --- a/.github/README.md +++ b/.github/README.md @@ -613,6 +613,7 @@ The following section lists different apps that may be installed for each catego - [`bat`](https://github.com/sharkdp/bat) - Output highlighting _(better cat)_ - [`ctags`](https://github.com/universal-ctags/ctags) - Indexing of file info + headers - [`diff-so-fancy`](https://github.com/so-fancy/diff-so-fancy) - Readable file compares _(better diff)_ +- [`entr`](https://eradman.com/entrproject/) - Run command whenever file changes - [`duf`](https://github.com/muesli/duf) - Get info on mounted disks _(better df)_ - [`exa`](https://github.com/ogham/exa) - Listing files with info _(better ls)_ - [`fzf`](https://github.com/junegunn/fzf) - Fuzzy file finder and filtering @@ -627,6 +628,7 @@ The following section lists different apps that may be installed for each catego - [`tldr`](https://github.com/tldr-pages/tldr) - Community-maintained docs _(better man)_ - [`tree`](https://gitlab.com/OldManProgrammer/unix-tree) - Directory listings as tree - [`trash-cli`](https://github.com/andreafrancia/trash-cli) - Record + restore removed files +- [`watch`](https://gitlab.com/procps-ng/procps) - Run commands periorically - [`xsel`](https://github.com/kfish/xsel) - Copy paste access to X clipboard - [`zoxide`](https://github.com/ajeetdsouza/zoxide) - Easy navigation _(better cd)_ diff --git a/installs/Brewfile b/installs/Brewfile index 1b88942..3ea5b57 100644 --- a/installs/Brewfile +++ b/installs/Brewfile @@ -40,6 +40,7 @@ brew 'broot' # Interactive directory navigation brew 'ctags' # Indexing of file info + headers brew 'diff-so-fancy'# Readable file compares (better diff) brew 'duf' # Get info on mounted disks (better df) +brew 'entr' # Run command whenever file changes brew 'exa' # Listing files with info (better ls) brew 'fzf' # Fuzzy file finder and filtering brew 'hyperfine' # Benchmarking for arbitrary commands @@ -54,6 +55,7 @@ brew 'thefuck' # Auto-correct miss-typed commands brew 'tldr' # Community-maintained docs (better man) brew 'tree' # Directory listings as tree structure brew 'trash-cli' # Record and restore removed files +brew 'watch' # Run commands periorically brew 'xsel' # Copy paste access to the X clipboard brew 'zoxide' # Auto-learning navigation (better cd) @@ -68,6 +70,7 @@ brew 'ncdu' # Disk usage analyzer and monitor (better du) brew 'speedtest-cli'# Command line speed test utility # CLI Productivity Apps +brew 'aspell' # Spell check brew 'browsh' # Web browser, in terminal brew 'buku' # Bookmark manager brew 'cmus' # Music player @@ -103,7 +106,7 @@ brew 'pv' # Pipe viewer, with animation options # Development Apps cask 'android-studio' # IDE for Android development -cask 'boop' # Test transformation tool +cask 'boop' # Text transformation tool brew 'gradle' # Build automation for Java cask 'iterm2' # Better terminal emulator cask 'postman' # HTTP API testing app @@ -156,32 +159,6 @@ cask 'veracrypt' # File and volume encryption # Desktop Applications # ############################################################# -# Mac OS Mods and Imrovments -cask 'alt-tab' # Much better alt-tab window switcher -cask 'anybar' # Custom programatic menubar icons -cask 'copyq' # Clipboard manager (cross platform) -cask 'espanso' # Live text expander (cross-platform) -cask 'finicky' # Website-specific default browser -cask 'hiddenbar' # Hide / show annoying menubar icons -brew 'iproute2mac' # MacOS port of netstat and ifconfig -brew 'lporg' # Backup and restore launchpad layout -brew 'm-cli' # All in one MacOS management CLI app -cask 'mjolnir' # Util for loading Lua automations -cask 'openinterminal' # Finder button, opens directory in terminal -cask 'popclip' # Popup options for text on highlight -cask 'raycast', args: { require_sha: false } # Spotlight alternative -cask 'shottr' # Better screenshot utility -brew 'skhd' # Hotkey daemon for macOS -cask 'stats' # System resource usage in menubar -brew 'yabai' # Tiling window manager - -# Utility apps -cask 'coteditor' # Just a simple plain-text editor -cask 'little-snitch' # Firewall app viewing / blocking traffic -cask 'keka' # File archiver and extractor -cask 'onyx' # Repair util for verifying system files -cask 'daisydisk', args: { require_sha: false } # Disk space analyzer and cleaner - # Creativity cask 'audacity' # Audio editor / recorder cask 'gimp' # Photo editor @@ -214,7 +191,7 @@ cask 'chromium' cask 'orion' ############################################################# -# Misc # +# MacOS-Specific Stuff # ############################################################# # Fonts @@ -224,15 +201,41 @@ cask 'font-hack' cask 'font-inconsolata' cask 'font-meslo-lg-nerd-font' -# Quick-Look Plugins -cask 'webpquicklook' -cask 'suspicious-package' -cask 'quicknfo' -cask 'quicklook-json' -cask 'quicklook-csv' -cask 'qlstephen' -cask 'qlprettypatch' -cask 'qlmarkdown' -cask 'qlcolorcode' +# Mac OS Quick-Look Plugins +cask 'qlcolorcode' # QL for code with highlighting +cask 'qlimagesize' # QL for size info for images +cask 'qlmarkdown' # QL for markdown files +cask 'qlprettypatch' # QL for patch / diff files +cask 'qlstephen' # QL for dev text files +cask 'qlvideo' # QL for video formats +cask 'quicklook-csv' # QL for tables in CSV format +cask 'quicklook-json', args: { require_sha: false } # QL for JSON, with trees +cask 'quicklookapk', args: { require_sha: false } # QL for Android APKs +cask 'suspicious-package', args: { require_sha: false } # QL for OSX app installers +cask 'webpquicklook', args: { require_sha: false } # QL for WebP image files + +# Mac OS Mods and Imrovments +cask 'alt-tab' # Much better alt-tab window switcher +cask 'anybar' # Custom programatic menubar icons +cask 'copyq' # Clipboard manager (cross platform) +cask 'espanso' # Live text expander (cross-platform) +cask 'finicky' # Website-specific default browser +cask 'hiddenbar' # Hide / show annoying menubar icons +brew 'iproute2mac' # MacOS port of netstat and ifconfig +brew 'lporg' # Backup and restore launchpad layout +brew 'm-cli' # All in one MacOS management CLI app +cask 'mjolnir' # Util for loading Lua automations +cask 'openinterminal' # Finder button, opens directory in terminal +cask 'popclip' # Popup options for text on highlight +cask 'raycast', args: { require_sha: false } # Spotlight alternative +cask 'shottr' # Better screenshot utility +brew 'skhd' # Hotkey daemon for macOS +cask 'stats' # System resource usage in menubar +brew 'yabai' # Tiling window manager + +# Mac OS Utility Apps +cask 'coteditor' # Just a simple plain-text editor +cask 'little-snitch' # Firewall app viewing / blocking traffic +cask 'keka' # File archiver and extractor # EOF