mirror of
https://github.com/Lissy93/dotfiles.git
synced 2024-11-24 16:33:14 +01:00
Merge branch 'master' of github.com:Lissy93/dotfiles
This commit is contained in:
commit
9fb1a3a84c
586
.github/README.md
vendored
586
.github/README.md
vendored
@ -7,18 +7,17 @@
|
||||
## Contents
|
||||
- [Introduction to Dotfiles](#intro)
|
||||
- [What are dotfiles?](#what-are-dotfiles)
|
||||
- [Dotfile Management Systems](#dotfile-management-systems)
|
||||
- [So copy paste, right?](#so-copy-paste-right)
|
||||
- [XDG Directories](#xdg-directories)
|
||||
- [Applying Dotfiles](#applying-dotfiles)
|
||||
- [Containerized Userspace](#containerized-userspace)
|
||||
- [Security](#security)
|
||||
- [My Dots](#my-dots)
|
||||
- [Dotfile Management Systems](#dotfile-management-systems)
|
||||
- [So copy paste, right?](#so-copy-paste-right)
|
||||
- [My Dots](#my-dotfiles)
|
||||
- [Setup](#setup)
|
||||
- [Directory Structure](#directory-structure)
|
||||
- [Install Script](#install-script)
|
||||
- [Configuring](#configuring)
|
||||
- [Aliases](#aliases)
|
||||
- [Utilities](#utilities)
|
||||
- [Packages](#packages)
|
||||
- [System Preferences](#system-preferences)
|
||||
- [ZSH](#zsh)
|
||||
@ -26,6 +25,7 @@
|
||||
- [Tmux](#tmux)
|
||||
- [Git](#git)
|
||||
- [Dependencies](#dependencies)
|
||||
- [Utilities](#utilities)
|
||||
|
||||
---
|
||||
|
||||
@ -41,36 +41,11 @@ Once everything's setup, you'll be able to SSH into a fresh system or reinstall
|
||||
|
||||
It's not hard to create your own dotfile repo, it's great fun and you'll learn a ton along the way!
|
||||
|
||||
|
||||
---
|
||||
|
||||
### Dotfile Management Systems
|
||||
|
||||
You can make things simple, or complex as you like.
|
||||
|
||||
The two most common methods are either symlinking, or using a git bare repo, these are explained in more detail in the [Applying Dotfiles](#applying-dotfiles) section. You can either do things manually, write a simple script, or use a pre-build dotfile management system (like [dotbot](https://github.com/anishathalye/dotbot), [chezmoi](https://github.com/twpayne/chezmoi), [yadm](https://github.com/TheLocehiliosan/yadm) or [GNU Stow](https://www.gnu.org/software/stow/)).
|
||||
|
||||
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.
|
||||
|
||||
---
|
||||
|
||||
### So copy paste, right?
|
||||
|
||||
Zach Holman wrote a great article titled [Dotfiles Are Meant to Be Forked](https://zachholman.com/2010/08/dotfiles-are-meant-to-be-forked/). I personally disagree with this, since your dotfiles are ususally highly personalized, so what's right for one developer, likely won't be what someone else is looking for. They're also usually something you build up over time, and althgouh some repos may provide a great starting point, it's really important to know what everything does, and how it works.
|
||||
|
||||
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 recomend taking a look at: [holman](https://github.com/holman/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/).
|
||||
|
||||
---
|
||||
|
||||
### 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:
|
||||
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
|
||||
--- | ---
|
||||
@ -82,10 +57,32 @@ Variable | Location
|
||||
|
||||
---
|
||||
|
||||
### Containerized Userspace
|
||||
|
||||
### Applying Dotfiles
|
||||
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.
|
||||
|
||||
There are several different approaches to managing dotfiles. The two most common would be either symlinking, or git bare repo.
|
||||
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](#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
|
||||
|
||||
@ -130,35 +127,27 @@ Both [Chezmoi](https://github.com/twpayne/chezmoi/) and [YADM](https://github.co
|
||||
|
||||
To learn more, DistroTube made an excellent [video about bare git repos](https://www.youtube.com/watch?v=tBoLDpTWVOM), and Marcel Krčah has written [a post](https://marcel.is/managing-dotfiles-with-git-bare-repo/) outlining the benefits.
|
||||
|
||||
#### Dotfile Dependencies
|
||||
|
||||
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.
|
||||
|
||||
|
||||
---
|
||||
|
||||
### Containerized Userspace
|
||||
### So copy paste, right?
|
||||
|
||||
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.
|
||||
Zach Holman wrote a great article titled [Dotfiles Are Meant to Be Forked](https://zachholman.com/2010/08/dotfiles-are-meant-to-be-forked/). I personally disagree with this, since your dotfiles are usually highly personalized, so what's right for one developer, likely won't be what someone else is looking for. They're also typically something you build up over time, and although some repos may provide a great starting point, it's really important to know what everything does, and how it works.
|
||||
|
||||
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
|
||||
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.
|
||||
|
||||
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/)).
|
||||
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), [@drduh/config](https://github.com/drduh/config).
|
||||
|
||||
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/).
|
||||
|
||||
---
|
||||
|
||||
## My Dotfiles
|
||||
|
||||
> **Note**
|
||||
> This repo is still a work in progress
|
||||
|
||||
### Setup
|
||||
|
||||
> **Warning**
|
||||
@ -172,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._
|
||||
|
||||
@ -186,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.
|
||||
|
||||
@ -199,18 +188,73 @@ Once the repo is cloned, you can modify whatever files you like before running t
|
||||
|
||||
<pre>
|
||||
~
|
||||
└── <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/tmux" title="Tmux Configs">tmux/</a>
|
||||
├── <a href="https://github.com/Lissy93/dotfiles/tree/master/vim" title="Vim Configs">vim/</a>
|
||||
├── <a href="https://github.com/Lissy93/dotfiles/tree/master/zsh" title="ZSH Configs">zsh/</a>
|
||||
├── <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/.github" title="Repo Meta">.github/</a>
|
||||
├── <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/install.sh" title="Setup Script">install.sh</a>
|
||||
└── <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/tree/master/bash">bash/</a> # Bash (shell) config
|
||||
├── <a href="https://github.com/Lissy93/dotfiles/tree/master/tmux">tmux/</a> # Tmux (multiplexer) config
|
||||
├── <a href="https://github.com/Lissy93/dotfiles/tree/master/vim">vim/</a> # Vim (text editor) config
|
||||
├── <a href="https://github.com/Lissy93/dotfiles/tree/master/zsh">zsh/</a> # ZSH (shell) config
|
||||
├── <a href="https://github.com/Lissy93/dotfiles/tree/master/config">config/</a> # All other config files
|
||||
├── <a href="https://github.com/Lissy93/dotfiles/tree/master/scripts">scripts/</a> # Bash scripts for automating tasks
|
||||
│ ├── <a href="https://github.com/Lissy93/dotfiles/tree/master/scripts/installs">installs/</a> # Scripts for software installation
|
||||
│ │ ├── <a href="https://github.com/Lissy93/dotfiles/blob/master/scripts/installs/Brewfile">Brewfile</a> # Package installs for MacOS via Homebrew
|
||||
│ │ ├── <a href="https://github.com/Lissy93/dotfiles/blob/master/scripts/installs/arch-pacman.sh">arch-pacman.sh</a> # Package installs for Arch via Pacman
|
||||
│ │ └── <a href="https://github.com/Lissy93/dotfiles/blob/master/scripts/installs/flatpak.sh">flatpak.sh</a> # Package installs for Linux desktops via Flatpak
|
||||
│ └── <a href="https://github.com/Lissy93/dotfiles/tree/master/scripts/macos-setup">macos-setup/</a> # Scripts for setting up Mac OS machines
|
||||
│ ├── <a href="https://github.com/Lissy93/dotfiles/blob/master/scripts/macos-setup/macos-apps.sh">macos-apps.sh</a> # Sets app preferences
|
||||
│ ├── <a href="https://github.com/Lissy93/dotfiles/blob/master/scripts/macos-setup/macos-preferences.sh">macos-prefs.sh</a> # Sets MacOS system preferences
|
||||
│ └── <a href="https://github.com/Lissy93/dotfiles/blob/master/scripts/macos-setup/macos-security.sh">macos-security.sh</a> # Applies MacOS security and privacy settings
|
||||
├── <a href="https://github.com/Lissy93/dotfiles/tree/master/utils">utils/</a> # Handy Shell utilitis for various day-to-day tasks
|
||||
├── <a href="https://github.com/Lissy93/dotfiles/tree/master/.github">.github/</a> # Meta files for GitHub repo
|
||||
├── <a href="https://github.com/Lissy93/dotfiles/tree/master/lib">lib/</a> # External dependencies, as git sub-modules
|
||||
├── <a href="https://github.com/Lissy93/dotfiles/blob/master/lets-go.sh">lets-go.sh</a> # One-line remote installation entry point
|
||||
├── <a href="https://github.com/Lissy93/dotfiles/blob/master/install.sh">install.sh</a> # All-in-one install and setup script
|
||||
└── <a href="https://github.com/Lissy93/dotfiles/blob/master/symlinks.yaml">symlinks.yml</a> # List of symlink locations
|
||||
</pre>
|
||||
|
||||
|
||||
---
|
||||
|
||||
### Install Script
|
||||
|
||||
The setup script ([`install.sh`](https://github.com/Lissy93/dotfiles/blob/master/install.sh)) will do the following:
|
||||
|
||||
- **Setup**
|
||||
- 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
|
||||
- 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
|
||||
- Installs Tmux plugins via TPM
|
||||
- Installs ZSH plugins via Antigen
|
||||
- Prompts to apply system preferences (for compatible OS / DE)
|
||||
- On MacOS arranges apps into folders within the Launchpad view
|
||||
- On MacOS prompts to set essential privacy + security settings
|
||||
- On MacOS prompts to set system preferences and app settings
|
||||
- **App Installations**
|
||||
- On MacOS if Homebrew is not yet installed, will prompt to install it
|
||||
- On MacOS will prompt to install user apps listed in Brewfile, via Homebrew
|
||||
- On Linux will prompt to install listed CLI apps via native package manager (pacman or apt)
|
||||
- On Linux desktop systems, will prompt to istall desktop apps via Flatpak
|
||||
- Checks OS is up-to-date, prompts to install updates if available
|
||||
- **Finishing up**
|
||||
- Outputs time taken and a summary of changes applied
|
||||
- Re-sources ZSH and refreshes current session
|
||||
- Prints a pretty Tux ASCII picture
|
||||
- Exits
|
||||
|
||||
The install script can accept several flags and environmental variables to configure installation:
|
||||
- **Flags**
|
||||
- `--help` - Prints help menu / shows info, without making any changes
|
||||
- `--auto-yes` - Doesn't prompt for any user input, always assumes Yes (use with care!)
|
||||
- `--no-clear` - Doesn't clear the screen before starting (useful if being run by another app)
|
||||
- **Env Vars**
|
||||
- `REPO_NAME` - The repository name to pull, e.g. `Lissy93/Dotfiles`
|
||||
- `DOTFILES_DIR` - The directory to clone source dotfiles into
|
||||
|
||||
---
|
||||
|
||||
### Configuring
|
||||
@ -541,104 +585,21 @@ Alias | Description
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
### Utilities
|
||||
|
||||
|
||||
The dotfiles also contains several handy bash scripts to carry out useful tasks with slightly more ease.
|
||||
|
||||
Each of these scripts is standalone, without any dependencies, and can be executed directly to use.
|
||||
Alternatively, they can be sourced from within a .zshrc / .bashrc, for use anywhere via their alias.
|
||||
|
||||
For usage instructions about any of them, just append the `--help` flag.
|
||||
|
||||
- [Transfer]() - Quickly transfer files or folders to the internet
|
||||
- [Web Search]() - Open a specific search engine with a given query
|
||||
- [QR Code]() - Generates a QR code for a given string, to transfer data to mobile device
|
||||
- [Weather]() - Shows current and forecasted weather for your location
|
||||
- [Color Map]() - Just outputs your terminal emulators supported color pallete
|
||||
- [Welcome]() - Used for first login, prints personalised greeting, system info, and other handy info
|
||||
- [Online]() - Checks if you are connected to the internet
|
||||
|
||||
|
||||
|
||||
#### Transfer
|
||||
|
||||
Quickly transfer a file, group of files or directory via the transfer.sh service.<br>
|
||||
To get started, run `transfer <file(s) / folder>`, for more info, run `transfer --help`
|
||||
|
||||
If multiple files are passed in, they will automatically be compressed into an archive.
|
||||
You can change the file transfer service, or use a self-hosted instance by setting the URL in `FILE_TRANSFER_SERVICE`
|
||||
The file can be either run directly, or sourced in your `.zshrc` and used via the `transfer` alias.
|
||||
|
||||
> For info, run `transfer --help`<br>
|
||||
> Source: [`utils/transfer.sh`](https://github.com/Lissy93/dotfiles/blob/master/utils/transfer.sh)
|
||||
|
||||
#### Web Search
|
||||
|
||||
Quickly open web search results for a given query using a selected search engine. To get started, run `web-search`, or `web-search --help` for more info.
|
||||
|
||||
Usage:
|
||||
|
||||
All parameters are optional, to get started just run `web-search` or `web-search <search provider (optional)> <query (optional)>`, the `ws` alias can also be used. If a search engine isn't specified, you'll be prompted to select one from the list. Similarly, if a query hasn't been included you'll be asked for that too.
|
||||
|
||||
- `web-search` - Opens interactive menu, you'll be prompted to select a search engine from the list then enter your query
|
||||
- `web-search <search term>` - Specify a search term, and you'll be prompted to select the search engine
|
||||
- For example, `web-search Hello World!`
|
||||
- `web-search <search engine>` - Specify a search engine, and you'll be prompted for your search term
|
||||
- For example, `web-search duckduckgo`
|
||||
- `web-search <search engine> <search engine>` - Specify both a search engine and query, and results will open immediately
|
||||
- For example, `web-search wikipedia Matrix Defense`
|
||||
|
||||
<details>
|
||||
|
||||
<summary><b>Supported Search Providers</b></summary>
|
||||
|
||||
The following search engines are supported by default:
|
||||
- DuckDuckGo: `ws duckduckgo` (or `wsddg`)
|
||||
- Wikipedia: `ws wikipedia` or (`wswiki`)
|
||||
- GitHub: `ws github` (or `wsgh`)
|
||||
- StackOverflow: `ws stackoverflow` (or `wsso`)
|
||||
- Wolframalpha: `ws wolframalpha` (or `wswa`)
|
||||
- Reddit: `ws reddit` (or `wsrdt`)
|
||||
- Maps: `ws maps` (or `wsmap`)
|
||||
- Google: `ws google` (or `wsggl`)
|
||||
- Grep App: `ws grepapp` (or `wsgra`)
|
||||
|
||||
</details>
|
||||
|
||||
The alias `ws` will also resolve to `web-search`, if it's not already in use. You can either run the script directly, e.g.`~/.config/utils/web-search.sh` (don't forget to `chmod +x` the file first, to make it executable), or use the `web-search` / `ws` alias anywhere, once it has been source'd from your .zshrc.
|
||||
|
||||
> For info, run `web-search --help`<br>
|
||||
> Source: [`utils/web-search.sh`](https://github.com/Lissy93/dotfiles/blob/master/utils/web-search.sh)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Try now!</summary>
|
||||
|
||||
```bash
|
||||
bash <(curl -s https://raw.githubusercontent.com/Lissy93/dotfiles/master/utils/web-search.sh)
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
---
|
||||
|
||||
### Packages
|
||||
|
||||
The dotfile installation script can also, detect which system and environemnt you're running, and optionally prompt to install packages and applications.
|
||||
|
||||
Package lists are stored in [`installs/`](https://github.com/Lissy93/dotfiles/tree/master/installs) directory, with separate files for different OSs. The install script will [pick the appropriate file](https://github.com/Lissy93/dotfiles/blob/22c6a04fdb22c140448b7d15ef8187c3a424ab47/install.sh#L243-L260) based on your distro.
|
||||
Package lists are stored in [`scripts/installs/`](https://github.com/Lissy93/dotfiles/tree/master/installs) directory, with separate files for different OSs. The install script will [pick the appropriate file](https://github.com/Lissy93/dotfiles/blob/22c6a04fdb22c140448b7d15ef8187c3a424ab47/install.sh#L243-L260) based on your distro.
|
||||
|
||||
You will be prompted before anything is installed. Be sure to remove / comment out anything you do not need before proceeding.
|
||||
|
||||
- Linux (desktop): [`flatpak.sh`](https://github.com/Lissy93/dotfiles/blob/master/installs/flatpak.sh) - Desktop apps can be installed on Linux systems via [Flatpack](https://flatpak.org/)
|
||||
- Mac OS: [`.Brewfile`](https://github.com/Lissy93/dotfiles/blob/master/installs/Brewfile) - Mac apps installed via [Homebrew](https://brew.sh/)
|
||||
- Arch (and Arch-based systems, like Manjaro): [`pacman.sh`](https://github.com/Lissy93/dotfiles/blob/master/installs/pacman.sh) - Arch CLI apps installed via [pacman](https://wiki.archlinux.org/title/Pacman)
|
||||
- Debian (and Debian-based systems, like Ubuntu): [`apt.sh`](https://github.com/Lissy93/dotfiles/blob/master/installs/apt.sh) - Debian CLI apps installed via [apt](https://wiki.debian.org/Apt)
|
||||
- Alpine: [`apk.sh`](https://github.com/Lissy93/dotfiles/blob/master/installs/apk.sh) - Alpine CLI apps installed via [apk](https://docs.alpinelinux.org/user-handbook/0.1a/Working/apk.html)
|
||||
- Linux (desktop): [`flatpak.sh`](https://github.com/Lissy93/dotfiles/blob/master/scripts/installs/flatpak.sh) - Desktop apps can be installed on Linux systems via [Flatpack](https://flatpak.org/)
|
||||
- Mac OS: [`.Brewfile`](https://github.com/Lissy93/dotfiles/blob/master/scripts/installs/Brewfile) - Mac apps installed via [Homebrew](https://brew.sh/)
|
||||
- Arch (and Arch-based systems, like Manjaro): [`arch-pacman.sh`](https://github.com/Lissy93/dotfiles/blob/master/scripts/installs/arch-pacman.sh) - Arch CLI apps installed via [pacman](https://wiki.archlinux.org/title/Pacman)
|
||||
- Debian (and Debian-based systems, like Ubuntu): [`apt.sh`](https://github.com/Lissy93/dotfiles/blob/master/scripts/installs/apt.sh) - Debian CLI apps installed via [apt](https://wiki.debian.org/Apt)
|
||||
- Alpine: [`apk.sh`](https://github.com/Lissy93/dotfiles/blob/master/scripts/installs/apk.sh) - Alpine CLI apps installed via [apk](https://docs.alpinelinux.org/user-handbook/0.1a/Working/apk.html)
|
||||
|
||||
The following section lists different apps that may be installed for each category:
|
||||
|
||||
@ -647,96 +608,97 @@ The following section lists different apps that may be installed for each catego
|
||||
<details>
|
||||
<summary>CLI Essentials</summary>
|
||||
|
||||
- `git` - Version controll
|
||||
- `neovim` - Text editor
|
||||
- `ranger` - Directory browser
|
||||
- `tmux` - Term multiplexer
|
||||
- [`git`](https://git-scm.com/) - Version controll
|
||||
- [`neovim`](https://neovim.io/) - Text editor
|
||||
- [`ranger`](https://ranger.github.io/) - Directory browser
|
||||
- [`tmux`](https://github.com/tmux/tmux/wiki) - Term multiplexer
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>CLI Basics</summary>
|
||||
|
||||
- `aria2` - Resuming download util _(better wget)_
|
||||
- `bat` - Output highlighting _(better cat)_
|
||||
- `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
|
||||
- `jq` - JSON parser
|
||||
- `lfs` - 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
|
||||
- `trash-cli` - Record + restore removed files
|
||||
- `xsel` - Copy paste access to X clipboard
|
||||
- `zoxide` - Easy navigation _(better cd)_
|
||||
- [`aria2`](https://github.com/aria2/aria2) - Resuming download util _(better wget)_
|
||||
- [`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)_
|
||||
- [`exiftool`](https://exiftool.org/) - Reading and writing exif metadata
|
||||
- [`fdupes`](https://github.com/jbruchon/jdupes) - Duplicate file finder
|
||||
- [`fzf`](https://github.com/junegunn/fzf) - Fuzzy file finder and filtering
|
||||
- [`hyperfine`](https://github.com/sharkdp/hyperfine) - Benchmarking for arbitrary commands
|
||||
- [`jq`](https://github.com/stedolan/jq) - JSON parser
|
||||
- [`most`](https://www.jedsoft.org/most/) - Multi-window scroll pager _(better less)_
|
||||
- [`procs`](https://github.com/dalance/procs) - Advanced process viewer _(better ps)_
|
||||
- [`ripgrep`](https://github.com/BurntSushi/ripgrep) - Searching within files _(better grep)_
|
||||
- [`rsync`](https://rsync.samba.org/) - Fast, incremental file transfer
|
||||
- [`scc`](https://github.com/boyter/scc) - Count lines of code _(better cloc)_
|
||||
- [`sd`](https://github.com/chmln/sd) - RegEx find and replace _(better sed)_
|
||||
- [`thefuck`](https://github.com/nvbn/thefuck) - Auto-correct miss-typed commands
|
||||
- [`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)_
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>CLI Monitoring and Performance Apps</summary>
|
||||
|
||||
- `bandwhich` - Bandwidth utilization monitor
|
||||
- `ctop` - Container metrics and monitoring
|
||||
- `bpytop` - Resource monitoring _(like htop)_
|
||||
- `glances` - Resource monitor + web and API
|
||||
- `gping` - Interactive ping tool, with graph
|
||||
- `ncdu` - Disk usage analyzer and monitor _(better du)_
|
||||
- `speedtest-cli` -# Command line speed test utility
|
||||
- [`bandwhich`](https://github.com/imsnif/bandwhich) - Bandwidth utilization monitor
|
||||
- [`ctop`](https://github.com/bcicen/ctop) - Container metrics and monitoring
|
||||
- [`bpytop`](https://github.com/aristocratos/bpytop) - Resource monitoring _(like htop)_
|
||||
- [`glances`](https://github.com/nicolargo/glances) - Resource monitor + web and API
|
||||
- [`gping`](https://github.com/orf/gping) - Interactive ping tool, with graph
|
||||
- [`ncdu`](https://dev.yorhel.nl/ncdu) - Disk usage analyzer and monitor _(better du)_
|
||||
- [`speedtest-cli`](https://github.com/sivel/speedtest-cli) - Command line speed test utility
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>CLI Productivity Apps</summary>
|
||||
|
||||
- `browsh` - CLI web browser
|
||||
- `buku` - Bookmark manager
|
||||
- `cmus` - Music browser / player
|
||||
- `khal` - Calendar client
|
||||
- `mutt` - Email client
|
||||
- `newsboat` - RSS / ATOM news reader
|
||||
- `rclone` - Manage cloud storage
|
||||
- `task` - Todo + task management
|
||||
- [`browsh`](https://github.com/browsh-org/browsh) - CLI web browser
|
||||
- [`buku`](https://github.com/jarun/buku) - Bookmark manager
|
||||
- [`cmus`](https://github.com/cmus/cmus) - Music browser / player
|
||||
- [`khal`](https://github.com/pimutils/khal) - Calendar client
|
||||
- [`mutt`](https://gitlab.com/muttmua/mutt) - Email client
|
||||
- [`newsboat`](https://github.com/newsboat/newsboat) - RSS / ATOM news reader
|
||||
- [`rclone`](https://github.com/rclone/rclone) - Manage cloud storage
|
||||
- [`task`](https://github.com/GothenburgBitFactory/taskwarrior) - Todo + task management
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>CLI Dev Suits</summary>
|
||||
|
||||
- `httpie` - HTTP / API testing testing client
|
||||
- `lazydocker` - Full Docker management app
|
||||
- `lazygit` - Full Git managemtne app
|
||||
- [`httpie`](https://httpie.io/) - HTTP / API testing testing client
|
||||
- [`lazydocker`](https://github.com/jesseduffield/lazydocker) - Full Docker management app
|
||||
- [`lazygit`](https://github.com/jesseduffield/lazygit) - Full Git managemtne app
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>CLI External Sercvices</summary>
|
||||
|
||||
- `ngrok` - Reverse proxy for sharing localhost
|
||||
- `tmate` - Share a terminal session via internet
|
||||
- `pbgopy` - Cross-device copy and paste service
|
||||
- `asciinema` - Recording + sharing terminal sessions
|
||||
- `googler` - Fetch search results from Google
|
||||
- `gotty` - Expose terminal sessaion via browser
|
||||
- `navi` - Browse, search, read cheat sheets
|
||||
- [`ngrok`](https://ngrok.com/) - Reverse proxy for sharing localhost
|
||||
- [`tmate`](https://github.com/tmate-io/tmate) - Share a terminal session via internet
|
||||
- [`asciinema`](https://asciinema.org/) - Recording + sharing terminal sessions
|
||||
- [`navi`](https://github.com/denisidoro/navi) - Browse, search, read cheat sheets
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>CLI Fun</summary>
|
||||
|
||||
- `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
|
||||
- [`cowsay`](https://github.com/piuccio/cowsay) - Have an ASCII cow say your message
|
||||
- [`figlet`](http://www.figlet.org/) - Output text as big ASCII art text
|
||||
- [`lolcat`](https://github.com/busyloop/lolcat) - Make console output raibow colored
|
||||
- [`neofetch`](https://github.com/dylanaraps/neofetch) - Show system data and ditstro info
|
||||
|
||||
</details>
|
||||
|
||||
@ -745,14 +707,13 @@ The following section lists different apps that may be installed for each catego
|
||||
<details>
|
||||
<summary>Development Apps</summary>
|
||||
|
||||
- `android-studio` - IDE for Android development
|
||||
- `boop` - Test transformation tool
|
||||
- `gradle` - Build automation for Java
|
||||
- `iterm2` - Better terminal emulator
|
||||
- `postman` - HTTP API testing app
|
||||
- `sourcetree` - Git visual client
|
||||
- `utm` - VM management console
|
||||
- `visual-studio-code` - Code editor
|
||||
- [Android Studio](https://developer.android.com/studio/) - IDE for Android development
|
||||
- [Boop](https://github.com/IvanMathy/Boop) - Test transformation tool _(MacOS Only)_
|
||||
- [iterm2](https://iterm2.com/) - Better terminal emulator _(MacOS Only)_
|
||||
- [Postman](https://www.postman.com/) - HTTP API testing app
|
||||
- [Sourcetree](https://www.sourcetreeapp.com/) - Git visual client _(MacOS Only)_
|
||||
- [Virtual Box](https://www.virtualbox.org/) - VM management console
|
||||
- [VS Code](https://code.visualstudio.com/) - Code editor
|
||||
|
||||
</details>
|
||||
|
||||
@ -762,6 +723,7 @@ The following section lists different apps that may be installed for each catego
|
||||
- `docker` - Containers
|
||||
- `gcc` - GNU C++ compilers
|
||||
- `go` - Compiler for Go Lang
|
||||
- `gradle` - Build tool for Java
|
||||
- `lua` - Lua interpreter
|
||||
- `luarocks` - Package manager for Lua
|
||||
- `node` - Node.js
|
||||
@ -776,38 +738,37 @@ The following section lists different apps that may be installed for each catego
|
||||
<details>
|
||||
<summary>Development Utils</summary>
|
||||
|
||||
- `gh` - Interact with GitHub PRs, issues, repos
|
||||
- `scrcpy` - Display and control Andrdroid devices
|
||||
- `terminal-notifier` - Trigger Mac notifications from terminal
|
||||
- `tig` - Text-mode interface for git
|
||||
- `ttygif` - Generate GIF from terminal commands + output
|
||||
- [`gh`](https://cli.github.com/) - Interact with GitHub PRs, issues, repos
|
||||
- [`scrcpy`](https://github.com/Genymobile/scrcpy) - Display and control Andrdroid devices
|
||||
- [`terminal-notifier`](https://github.com/julienXX/terminal-notifier) - Trigger Mac notifications from terminal _(MacOS Only)_
|
||||
- [`tig`](https://jonas.github.io/tig/) - Text-mode interface for git
|
||||
- [`ttygif`](https://github.com/icholy/ttygif) - Generate GIF from terminal commands + output
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Network and Security Testing</summary>
|
||||
|
||||
- `bettercap` - Network, scanning and moniroting
|
||||
- `nmap` - Port scanning
|
||||
- `wrk` - HTTP benchmarking
|
||||
- `burp-suite` - Web security testing
|
||||
- `metasploit` - Pen testing framework
|
||||
- `owasp-zap` - Web app security scanner
|
||||
- `wireshark` - Network analyzer + packet capture
|
||||
- [`bettercap`](https://www.bettercap.org/) - Network, scanning and moniroting
|
||||
- [`nmap`](https://nmap.org/) - Port scanning
|
||||
- [`wrk`](https://github.com/giltene/wrk2) - HTTP benchmarking
|
||||
- [`burp-suite`](https://portswigger.net/burp) - Web security testing
|
||||
- [`metasploit`](https://www.metasploit.com/) - Pen testing framework
|
||||
- [`owasp-zap`](https://owasp.org/www-project-zap/) - Web app security scanner
|
||||
- [`wireshark`](https://www.wireshark.org/) - Network analyzer + packet capture
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Security Utilities</summary>
|
||||
|
||||
- `bcrypt` - Encryption utility, using blowfish
|
||||
- `clamav` - Open source virus scanning suite
|
||||
- `gpg-suite` - PGP encryption for emails and files
|
||||
- `git-crypt` - Transparent encryption for git repos
|
||||
- `lynis` - Scan system for common security issues
|
||||
- `openssl` - Cryptography and SSL/TLS Toolkit
|
||||
- `rkhunter` - Search / detect potential root kits
|
||||
- `veracrypt` - File and volume encryption
|
||||
- [`bcrypt`](https://bcrypt.sourceforge.net/) - Encryption utility, using blowfish
|
||||
- [`clamav`](https://www.clamav.net/) - Open source virus scanning suite
|
||||
- [`git-crypt`](https://www.agwa.name/projects/git-crypt/) - Transparent encryption for git repos
|
||||
- [`lynis`](https://cisofy.com/lynis/) - Scan system for common security issues
|
||||
- [`openssl`](https://www.openssl.org/) - Cryptography and SSL/TLS Toolkit
|
||||
- [`rkhunter`](https://rkhunter.sourceforge.net/) - Search / detect potential root kits
|
||||
- [`veracrypt`](https://www.veracrypt.fr/code/VeraCrypt/) - File and volume encryption
|
||||
|
||||
</details>
|
||||
|
||||
@ -816,47 +777,51 @@ The following section lists different apps that may be installed for each catego
|
||||
<details>
|
||||
<summary>Creativity</summary>
|
||||
|
||||
- audacity - Audio editor / recorder
|
||||
- gimp - Photo editor
|
||||
- handbrake - Video transcoder
|
||||
- inkscape - Vector editor
|
||||
- obs - Screencasting / recording
|
||||
- shotcut - Video editor
|
||||
- [Audacity](https://www.audacityteam.org/) - Multi-track audio editor and recording
|
||||
- [Blender](https://www.blender.org/) - 3D modelling, rendering and sculpting
|
||||
- [Cura](https://ultimaker.com/software/ultimaker-cura) - 3D Printing software, for slicing models
|
||||
- [DarkTable](https://www.darktable.org/) - Organize and bulk edit photos (similar to Lightroom)
|
||||
- [Dia](https://wiki.gnome.org/Apps/Dia) - Versatile diagramming tool, useful for UML
|
||||
- [Gimp](https://www.gimp.org/) - Image and photo editing application
|
||||
- [HandBrake](https://handbrake.fr/) - For converting video from any format to a selection of modern codecs
|
||||
- [InkScape](https://inkscape.org/) - Digital drawing/ illustration
|
||||
- [OBS Studio](https://obsproject.com/) - Streaming and screencasting
|
||||
- [Shotcut](https://www.shotcut.org/) - Video editor
|
||||
- [Synfig Studio](https://www.synfig.org/) - 2D animation
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Media</summary>
|
||||
|
||||
- calibre - E-Book reader
|
||||
- spotify - Propietary music streaming
|
||||
- transmission - Torrent client
|
||||
- vlc - Media player
|
||||
- pandoc - Universal file converter
|
||||
- youtube-dl - YouTube video downloader
|
||||
- [Calibre](https://calibre-ebook.com/) - E-Book reader
|
||||
- [Spotify](https://spotify.com) - Propietary music streaming
|
||||
- [Transmission](https://transmissionbt.com/) - Torrent client
|
||||
- [VLC](https://www.videolan.org/vlc/) - Media player
|
||||
- [Pandoc](https://pandoc.org/) - Universal file converter
|
||||
- [Youtube-dl](https://youtube-dl.org/) - YouTube video downloader
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Personal Applications</summary>
|
||||
|
||||
- 1password - Password manager _(proprietary)_
|
||||
- tresorit - Encrypted file backup _(proprietary)_
|
||||
- standard-notes - Encrypted synced notes
|
||||
- signal - Link to encrypted mobile messenger
|
||||
- ledger-live - Crypto hardware wallet manager
|
||||
- mountain-duck - Mount remote storage locations
|
||||
- protonmail-bridge - Decrypt ProtonMail emails
|
||||
- protonvpn - Client app for ProtonVPN
|
||||
- [1Password](https://1password.com/) - Password manager _(proprietary)_
|
||||
- [Tresorit](https://tresorit.com/) - Encrypted file backup _(proprietary)_
|
||||
- [Standard Notes](https://standardnotes.com/) - Encrypted synced notes
|
||||
- [Signal](https://www.signal.org) - Link to encrypted mobile messenger
|
||||
- [Ledger Live](https://www.ledger.com/ledger-live) - Crypto hardware wallet manager
|
||||
- [ProtonMail-Bridge](https://proton.me/mail/bridge) - Decrypt ProtonMail emails
|
||||
- [ProtonVPN](https://protonvpn.com/) - Client app for ProtonVPN
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Browsers</summary>
|
||||
|
||||
- firefox
|
||||
- chromium
|
||||
- tor
|
||||
- [Firefox](https://www.mozilla.org/en-GB/firefox/)
|
||||
- [Chromium](https://github.com/ungoogled-software/ungoogled-chromium)
|
||||
- [Tor](https://www.torproject.org/)
|
||||
|
||||
</details>
|
||||
|
||||
@ -885,17 +850,6 @@ The following section lists different apps that may be installed for each catego
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>MacOS Utility Apps</summary>
|
||||
|
||||
- coteditor - Just a simple plain-text editor
|
||||
- little-snitch - Firewall app viewing / blocking traffic
|
||||
- keka - File archiver and extractor
|
||||
- onyx - Repair util for verifying system files
|
||||
- daisydisk - Disk space analyzer and cleaner
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
### System Preferences
|
||||
@ -904,15 +858,16 @@ The installation script can also prompt you to confiture system settings and use
|
||||
|
||||
#### MacOS
|
||||
|
||||
MacOS includes a utility named [`defaults`](https://real-world-systems.com/docs/defaults.1.html), which lets you configure all system and app preferences programatically through the command line. This is very powerful, as you can write a script that configures every aspect of your system enabling you to setup a brand new machine in seconds.
|
||||
MacOS includes a built-in utility named [`defaults`](https://real-world-systems.com/docs/defaults.1.html), which lets you configure all system and app preferences programatically through the command line. This is very powerful, as you can write a script that configures every aspect of your system enabling you to setup a brand new machine in seconds.
|
||||
|
||||
All settings are then updated in the `.plist` files stored in `~/Library/Preferences`. This can also be used to configure preferences for any installed app on your system, where the application is specified by its domain identifier - you can view a full list of your configurable apps by running `defaults domains`.
|
||||
|
||||
|
||||
In my dotfiles, the MacOS preferences will configure everything from system security to launchpad layout. The Mac settings are located in [`system-specific/macos/system-settings/`](https://github.com/Lissy93/dotfiles/tree/master/system-specific/macos/system-settings), and are split into three files:
|
||||
- [`macos-security.sh`](https://github.com/Lissy93/dotfiles/blob/master/system-specific/macos/system-settings/macos-security.sh) - Sets essential security settings, disables telementry, disconnects unused ports, enforces signing, sets logout timeouts, and much more
|
||||
- [`macos-preferences.sh`](https://github.com/Lissy93/dotfiles/blob/master/system-specific/macos/system-settings/macos-preferences.sh) - Configures all user preferences, including computer name, highlight color, finder options, spotlight settings, hardware preferences and more
|
||||
- [`macos-apps.sh`](https://github.com/Lissy93/dotfiles/blob/master/system-specific/macos/system-settings/macos-apps.sh) - Applies preferences to any installed desktop apps, such as Terminal, Time Machine, Photos, Spotify, and many others
|
||||
In my dotfiles, the MacOS preferences will configure everything from system security to launchpad layout.
|
||||
The Mac settings are located in [`scripts/macos-setup/`](https://github.com/Lissy93/dotfiles/tree/master/scripts/macos-setup), and are split into three files:
|
||||
- [`macos-security.sh`](https://github.com/Lissy93/dotfiles/blob/master/scripts/macos-setup/macos-security.sh) - Sets essential security settings, disables telementry, disconnects unused ports, enforces signing, sets logout timeouts, and much more
|
||||
- [`macos-preferences.sh`](https://github.com/Lissy93/dotfiles/blob/master/scripts/macos-setup/macos-preferences.sh) - Configures all user preferences, including computer name, highlight color, finder options, spotlight settings, hardware preferences and more
|
||||
- [`macos-apps.sh`](https://github.com/Lissy93/dotfiles/blob/master/scripts/macos-setup/macos-apps.sh) - Applies preferences to any installed desktop apps, such as Terminal, Time Machine, Photos, Spotify, and many others
|
||||
|
||||
Upon running each script, a summary of what will be changed will be shown, and you'll be prompted as to weather you'd like to continue. Each script also handles permissions, compatibility checking, and graceful fallbacks. Backup of original settings will be made, and a summary of all changes made will be logged as output when the script is complete.
|
||||
|
||||
@ -1039,12 +994,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
|
||||
@ -1058,5 +1014,87 @@ 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
|
||||
|
||||
|
||||
The dotfiles also contains several handy bash scripts to carry out useful tasks with slightly more ease.
|
||||
|
||||
Each of these scripts is standalone, without any dependencies, and can be executed directly to use.
|
||||
Alternatively, they can be sourced from within a .zshrc / .bashrc, for use anywhere via their alias.
|
||||
|
||||
For usage instructions about any of them, just append the `--help` flag.
|
||||
|
||||
- [Transfer]() - Quickly transfer files or folders to the internet
|
||||
- [Web Search]() - Open a specific search engine with a given query
|
||||
- [QR Code]() - Generates a QR code for a given string, to transfer data to mobile device
|
||||
- [Weather]() - Shows current and forecasted weather for your location
|
||||
- [Color Map]() - Just outputs your terminal emulators supported color pallete
|
||||
- [Welcome]() - Used for first login, prints personalised greeting, system info, and other handy info
|
||||
- [Online]() - Checks if you are connected to the internet
|
||||
|
||||
|
||||
|
||||
#### Transfer
|
||||
|
||||
Quickly transfer a file, group of files or directory via the transfer.sh service.<br>
|
||||
To get started, run `transfer <file(s) / folder>`, for more info, run `transfer --help`
|
||||
|
||||
If multiple files are passed in, they will automatically be compressed into an archive.
|
||||
You can change the file transfer service, or use a self-hosted instance by setting the URL in `FILE_TRANSFER_SERVICE`
|
||||
The file can be either run directly, or sourced in your `.zshrc` and used via the `transfer` alias.
|
||||
|
||||
> For info, run `transfer --help`<br>
|
||||
> Source: [`utils/transfer.sh`](https://github.com/Lissy93/dotfiles/blob/master/utils/transfer.sh)
|
||||
|
||||
#### Web Search
|
||||
|
||||
Quickly open web search results for a given query using a selected search engine. To get started, run `web-search`, or `web-search --help` for more info.
|
||||
|
||||
Usage:
|
||||
|
||||
All parameters are optional, to get started just run `web-search` or `web-search <search provider (optional)> <query (optional)>`, the `ws` alias can also be used. If a search engine isn't specified, you'll be prompted to select one from the list. Similarly, if a query hasn't been included you'll be asked for that too.
|
||||
|
||||
- `web-search` - Opens interactive menu, you'll be prompted to select a search engine from the list then enter your query
|
||||
- `web-search <search term>` - Specify a search term, and you'll be prompted to select the search engine
|
||||
- For example, `web-search Hello World!`
|
||||
- `web-search <search engine>` - Specify a search engine, and you'll be prompted for your search term
|
||||
- For example, `web-search duckduckgo`
|
||||
- `web-search <search engine> <search engine>` - Specify both a search engine and query, and results will open immediately
|
||||
- For example, `web-search wikipedia Matrix Defense`
|
||||
|
||||
<details>
|
||||
|
||||
<summary><b>Supported Search Providers</b></summary>
|
||||
|
||||
The following search engines are supported by default:
|
||||
- DuckDuckGo: `ws duckduckgo` (or `wsddg`)
|
||||
- Wikipedia: `ws wikipedia` or (`wswiki`)
|
||||
- GitHub: `ws github` (or `wsgh`)
|
||||
- StackOverflow: `ws stackoverflow` (or `wsso`)
|
||||
- Wolframalpha: `ws wolframalpha` (or `wswa`)
|
||||
- Reddit: `ws reddit` (or `wsrdt`)
|
||||
- Maps: `ws maps` (or `wsmap`)
|
||||
- Google: `ws google` (or `wsggl`)
|
||||
- Grep App: `ws grepapp` (or `wsgra`)
|
||||
|
||||
</details>
|
||||
|
||||
The alias `ws` will also resolve to `web-search`, if it's not already in use. You can either run the script directly, e.g.`~/.config/utils/web-search.sh` (don't forget to `chmod +x` the file first, to make it executable), or use the `web-search` / `ws` alias anywhere, once it has been source'd from your .zshrc.
|
||||
|
||||
> For info, run `web-search --help`<br>
|
||||
> Source: [`utils/web-search.sh`](https://github.com/Lissy93/dotfiles/blob/master/utils/web-search.sh)
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Try now!</summary>
|
||||
|
||||
```bash
|
||||
bash <(curl -s https://raw.githubusercontent.com/Lissy93/dotfiles/master/utils/web-search.sh)
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
---
|
||||
|
4
.github/sync.yml
vendored
Normal file
4
.github/sync.yml
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
lissy93/Brewfile:
|
||||
- source: scripts/installs/Brewfile
|
||||
dest: Brewfile
|
||||
|
26
.github/workflows/sync-files.yml
vendored
Normal file
26
.github/workflows/sync-files.yml
vendored
Normal 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).
|
8
.gitmodules
vendored
8
.gitmodules
vendored
@ -1,6 +1,6 @@
|
||||
[submodule "dotbot"]
|
||||
path = dotbot
|
||||
[submodule "lib/dotbot"]
|
||||
path = lib/dotbot
|
||||
url = https://github.com/anishathalye/dotbot
|
||||
[submodule "tpm"]
|
||||
path = tpm
|
||||
[submodule "lib/tpm"]
|
||||
path = lib/tpm
|
||||
url = https://github.com/tmux-plugins/tpm.git
|
||||
|
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -1,3 +0,0 @@
|
||||
{
|
||||
"makefile.extensionOutputFolder": "./.vscode"
|
||||
}
|
12
Dockerfile
12
Dockerfile
@ -3,6 +3,7 @@ FROM alpine:latest
|
||||
LABEL maintainer "Alicia Sykes <https://aliciasykes.com>"
|
||||
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
|
||||
|
||||
|
@ -1,6 +1,13 @@
|
||||
# A simple Bash PS1 prompt, that displays directory, git status and arrow
|
||||
# Availible on GitHub: https://github.com/Lissy93/minimal-terminal-prompt
|
||||
# Licensed under MIT - (C) Alicia Sykes, 2022 <https://aliciasykes.com>
|
||||
|
||||
#######################################################################
|
||||
# ~/.bashrc - Custom PS1 Prompt for Bash Shell #
|
||||
#######################################################################
|
||||
# I don't much use Bash me, prefer ZSH of Fish... #
|
||||
# When that's not availible, let's at least make things look half ok #
|
||||
#######################################################################
|
||||
# Originated from: https://github.com/Lissy93/minimal-terminal-prompt #
|
||||
# Licensed under MIT (C) Alicia Sykes 2022 <https://aliciasykes.com> #
|
||||
#######################################################################
|
||||
|
||||
## Define all the colors
|
||||
COL_USER_HOST='\e[35m' # The color of 'user@host.ext'
|
11
config/.gemrc
Normal file
11
config/.gemrc
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
---
|
||||
:benchmark: false
|
||||
:update_sources: true
|
||||
:backtrace: false
|
||||
:bulk_threshold: 1000
|
||||
:verbose: true
|
||||
:sources:
|
||||
- http://gemcutter.org
|
||||
- http://gems.rubyforge.org/
|
||||
- http://gems.github.com/
|
@ -13,6 +13,8 @@
|
||||
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
|
||||
pager = delta
|
||||
excludesfile = /Users/alicia/.config/.gitignore_global
|
||||
autocrlf = false
|
||||
symlinks = true
|
||||
[web]
|
||||
browser = firefox
|
||||
[instaweb]
|
||||
@ -268,3 +270,15 @@
|
||||
smudge = git-lfs smudge -- %f
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
[difftool "sourcetree"]
|
||||
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
|
||||
path =
|
||||
[mergetool "sourcetree"]
|
||||
cmd = /Users/alicia/Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
|
||||
trustExitCode = true
|
||||
[remote "origin"]
|
||||
url = https://github.com/Homebrew/brew
|
||||
fetch = +refs/heads/*:refs/remotes/origin/*
|
||||
[homebrew]
|
||||
analyticsmessage = true
|
||||
caskanalyticsmessage = true
|
6
config/README.txt
Normal file
6
config/README.txt
Normal file
@ -0,0 +1,6 @@
|
||||
The config directory stores configuration files for various apps, utils and systems.
|
||||
|
||||
Generic configs which are used across all systems (e.g. .gitconfig, .bashrc, .wgetrc)
|
||||
are stored in the root of the config directory, whereas files which are only used on
|
||||
certain systems (like MacOS) or by certain applications (like Firefox's user.js) are
|
||||
kept in category-specific directories (e.g. macos, desktop-apps, etc).
|
0
config/desktop-apps/firefox.user.js
Normal file
0
config/desktop-apps/firefox.user.js
Normal file
71
config/dnscrypt-proxy.toml
Normal file
71
config/dnscrypt-proxy.toml
Normal file
@ -0,0 +1,71 @@
|
||||
# https://github.com/drduh/config/blob/master/dnscrypt-proxy.toml
|
||||
# https://github.com/jedisct1/dnscrypt-proxy/blob/master/dnscrypt-proxy/example-dnscrypt-proxy.toml
|
||||
#user_name = '_dnscrypt-proxy'
|
||||
#server_names = ['quad9']
|
||||
#server_names = ['abc']
|
||||
listen_addresses = ['127.0.0.1:4200']
|
||||
max_clients = 250
|
||||
ipv4_servers = true
|
||||
ipv6_servers = false
|
||||
block_ipv6 = true
|
||||
block_unqualified = true
|
||||
block_undelegated = true
|
||||
reject_ttl = 3600
|
||||
force_tcp = false
|
||||
timeout = 4000
|
||||
keepalive = 60
|
||||
cert_refresh_delay = 240
|
||||
dnscrypt_ephemeral_keys = true
|
||||
tls_disable_session_tickets = true
|
||||
tls_cipher_suite = [52393] # TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
|
||||
fallback_resolvers = ['9.9.9.9:53', '8.8.8.8:53']
|
||||
ignore_system_dns = false
|
||||
netprobe_timeout = 30
|
||||
cache = true
|
||||
cache_size = 4096
|
||||
cache_min_ttl = 600
|
||||
cache_max_ttl = 86400
|
||||
cache_neg_min_ttl = 60
|
||||
cache_neg_max_ttl = 600
|
||||
forwarding_rules = 'forwarding-rules.txt'
|
||||
log_level = 2
|
||||
log_file = 'dnscrypt.log'
|
||||
log_files_max_size = 10
|
||||
log_files_max_age = 7
|
||||
log_files_max_backups = 1
|
||||
[query_log]
|
||||
file = 'query.log'
|
||||
[nx_log]
|
||||
file = 'nx.log'
|
||||
[blocked_names]
|
||||
blocked_names_file = 'blocklist.txt'
|
||||
log_file = 'blocked.log'
|
||||
[blocked_ips]
|
||||
blocked_ips_file = 'ip-blocklist.txt'
|
||||
log_file = 'ip-blocked.log'
|
||||
#[allowed_names]
|
||||
# allowed_names_file = 'allowed.txt'
|
||||
# log_file = 'allowed-names.log'
|
||||
#[sources]
|
||||
# [sources.'public-resolvers']
|
||||
# urls = ['https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v2/public-resolvers.md', 'https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md']
|
||||
# cache_file = 'public-resolvers.md'
|
||||
# minisign_key = 'RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3'
|
||||
# prefix = ''
|
||||
# [sources.'relays']
|
||||
# urls = ['https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v2/relays.md',
|
||||
# 'https://download.dnscrypt.info/resolvers-list/v2/relays.md']
|
||||
# cache_file = 'relays.md'
|
||||
# minisign_key = 'RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3'
|
||||
# refresh_delay = 72
|
||||
# prefix = ''
|
||||
# [sources.quad9-resolvers]
|
||||
# urls = ['https://www.quad9.net/quad9-resolvers.md']
|
||||
# minisign_key = 'RWQBphd2+f6eiAqBsvDZEBXBGHQBJfeG6G+wJPPKxCZMoEQYpmoysKUN'
|
||||
# cache_file = 'quad9-resolvers.md'
|
||||
# prefix = 'quad9-'
|
||||
#[static]
|
||||
# [static.'quad9']
|
||||
# stamp = 'sdns://AQMAAAAAAAAAEjE0OS4xMTIuMTEyLjk6ODQ0MyBnyEe4yHWM0SAkVUO-dWdG3zTfHYTAC4xHA2jfgh2GPhkyLmRuc2NyeXB0LWNlcnQucXVhZDkubmV0'
|
||||
# [static.'abc']
|
||||
# stamp = 'sdns://AAAAA...'
|
86
config/gpg.conf
Normal file
86
config/gpg.conf
Normal file
@ -0,0 +1,86 @@
|
||||
|
||||
|
||||
# https://www.gnupg.org/documentation/manuals/gnupg/GPG-Configuration-Options.html
|
||||
# https://www.gnupg.org/documentation/manuals/gnupg/GPG-Esoteric-Options.html
|
||||
|
||||
# Use AES256, 192, or 128 as cipher
|
||||
personal-cipher-preferences AES256 AES192 AES
|
||||
|
||||
# Use SHA512, 384, or 256 as digest
|
||||
personal-digest-preferences SHA512 SHA384 SHA256
|
||||
|
||||
# Use ZLIB, BZIP2, ZIP, or no compression
|
||||
personal-compress-preferences ZLIB BZIP2 ZIP Uncompressed
|
||||
|
||||
# Default preferences for new keys
|
||||
default-preference-list SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed
|
||||
|
||||
# SHA512 as digest to sign keys
|
||||
cert-digest-algo SHA512
|
||||
|
||||
# SHA512 as digest for symmetric ops
|
||||
s2k-digest-algo SHA512
|
||||
|
||||
# AES256 as cipher for symmetric ops
|
||||
s2k-cipher-algo AES256
|
||||
|
||||
# UTF-8 support for compatibility
|
||||
charset utf-8
|
||||
|
||||
# Show Unix timestamps
|
||||
fixed-list-mode
|
||||
|
||||
# No comments in signature
|
||||
no-comments
|
||||
|
||||
# No version in output
|
||||
no-emit-version
|
||||
|
||||
# Disable banner
|
||||
no-greeting
|
||||
|
||||
# Long hexidecimal key format
|
||||
keyid-format 0xlong
|
||||
|
||||
# Display UID validity
|
||||
list-options show-uid-validity
|
||||
verify-options show-uid-validity
|
||||
|
||||
# Display all keys and their fingerprints
|
||||
with-fingerprint
|
||||
|
||||
# Display key origins and updates
|
||||
#with-key-origin
|
||||
# Cross-certify subkeys are present and valid
|
||||
require-cross-certification
|
||||
|
||||
# Disable caching of passphrase for symmetrical ops
|
||||
no-symkey-cache
|
||||
|
||||
# Enable smartcard
|
||||
use-agent
|
||||
|
||||
# Disable recipient key ID in messages
|
||||
throw-keyids
|
||||
|
||||
# Default/trusted key ID to use (helpful with throw-keyids)
|
||||
#default-key 0xFF3E7D88647EBCDB
|
||||
#trusted-key 0xFF3E7D88647EBCDB
|
||||
|
||||
# Group recipient keys (preferred ID last)
|
||||
#group keygroup = 0xFF00000000000001 0xFF00000000000002 0xFF3E7D88647EBCDB
|
||||
|
||||
# Keyserver URL
|
||||
#keyserver hkps://keys.openpgp.org
|
||||
#keyserver hkps://keyserver.ubuntu.com:443
|
||||
#keyserver hkps://hkps.pool.sks-keyservers.net
|
||||
#keyserver hkps://pgp.ocf.berkeley.edu
|
||||
|
||||
# Proxy to use for keyservers
|
||||
#keyserver-options http-proxy=http://127.0.0.1:8118
|
||||
#keyserver-options http-proxy=socks5-hostname://127.0.0.1:9050
|
||||
|
||||
# Verbose output
|
||||
#verbose
|
||||
# Show expired subkeys
|
||||
#list-options show-unusable-subkeys
|
@ -1,7 +1,3 @@
|
||||
# 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.
|
||||
|
||||
apps:
|
||||
pages:
|
||||
- number: 1
|
||||
@ -18,6 +14,7 @@ apps:
|
||||
- Sourcetree
|
||||
- UTM
|
||||
- Visual Studio
|
||||
- MacDown
|
||||
- folder: Work Coms
|
||||
pages:
|
||||
- number: 1
|
||||
@ -67,23 +64,25 @@ 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
|
||||
- QLMarkdown
|
||||
- folder: Other
|
||||
pages:
|
||||
- number: 1
|
||||
@ -113,16 +112,15 @@ apps:
|
||||
- Screenshot
|
||||
- Bluetooth File Exchange
|
||||
- Audio MIDI Setup
|
||||
- Developer
|
||||
- Jabra Firmware Update
|
||||
- Jabra Direct
|
||||
- System Preferences
|
||||
- Calculator
|
||||
- Dictionary
|
||||
- CotEditor
|
||||
- VMware Fusion Tech Preview
|
||||
- TestFlight
|
||||
- System Preferences
|
||||
- Simulator
|
||||
- TestFlight
|
||||
- Developer
|
||||
- Dictionary
|
||||
- VMware Fusion Tech Preview
|
||||
- Jabra Direct
|
||||
- CotEditor
|
||||
- number: 2
|
||||
items:
|
||||
- Orion
|
||||
@ -135,29 +133,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 +163,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 +182,3 @@ apps:
|
||||
- Chromium
|
||||
- Visual Studio Code
|
||||
- iTerm
|
||||
# widgets:
|
||||
# pages: []
|
||||
# dock_items:
|
||||
# - ============
|
||||
# desktop: {}
|
0
config/macos/skhdrc
Normal file
0
config/macos/skhdrc
Normal file
1
dotbot
1
dotbot
@ -1 +0,0 @@
|
||||
Subproject commit 4ec846cdad4c5f6996523e7015f0b36a6b40e9f6
|
183
install.sh
183
install.sh
@ -12,15 +12,24 @@
|
||||
# Licensed under MIT (C) Alicia Sykes 2022 <https://aliciasykes.com> #
|
||||
######################################################################
|
||||
|
||||
# Configuration Params
|
||||
REPO_NAME="${REPO_NAME:-Lissy93/Dotfiles}"
|
||||
REPO_PATH="https://github.com/${REPO_NAME}.git"
|
||||
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}"
|
||||
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
|
||||
SRC_DIR=$(dirname ${0})
|
||||
|
||||
# Dotfiles Source Repo and Destination Directory
|
||||
REPO_NAME="${REPO_NAME:-Lissy93/Dotfiles}"
|
||||
DOTFILES_DIR="${DOTFILES_DIR:-${SRC_DIR:-$HOME/.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="lib/dotbot"
|
||||
DOTBOT_BIN="bin/dotbot"
|
||||
|
||||
# Color Variables
|
||||
CYAN_B='\033[1;96m'
|
||||
@ -32,21 +41,15 @@ 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"* ]] && [[ ! $PARAMS == *"--help"* ]] ; 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'
|
||||
AUTO_YES=true
|
||||
fi
|
||||
|
||||
# Function that prints important text in a banner with colored border
|
||||
@ -69,14 +72,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: \033[4;35mhttps://github.com/lissy93/dotfiles${RESET}"
|
||||
}
|
||||
|
||||
# Checks if a given package is installed
|
||||
@ -105,17 +123,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
|
||||
read -t $PROMPT_TIMEOUT -n 1 -r ans_start
|
||||
if [[ ! $ans_start =~ ^[Yy]$ ]] && [[ $AUTO_YES != true ]] ; 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 +155,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
|
||||
@ -164,9 +183,9 @@ function apply_preferences () {
|
||||
|
||||
# If ZSH not the default shell, ask user if they'd like to set it
|
||||
if [[ $SHELL != *"zsh"* ]] && command_exists zsh; then
|
||||
read -t $PROMPT_TIMEOUT -p "$(echo -e $CYAN_B)Would you like to set ZSH as your default shell? (y/N)" -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "\n${CYAN_B}Would you like to set ZSH as your default shell? (y/N)${RESET}"
|
||||
read -t $PROMPT_TIMEOUT -n 1 -r ans_zsh
|
||||
if [[ $ans_zsh =~ ^[Yy]$ ]] || [[ $AUTO_YES = true ]] ; then
|
||||
echo -e "${PURPLE}Setting ZSH as default shell${RESET}"
|
||||
chsh -s $(which zsh) $USER
|
||||
fi
|
||||
@ -187,11 +206,12 @@ function apply_preferences () {
|
||||
/bin/zsh -i -c "antigen update && antigen-apply"
|
||||
|
||||
# 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
|
||||
echo -e "${CYAN_B}Would you like to apply system preferences? (y/N)${RESET}"
|
||||
read -t $PROMPT_TIMEOUT -n 1 -r ans_syspref
|
||||
if [[ $ans_syspref =~ ^[Yy]$ ]] || [[ $AUTO_YES = true ]]; 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"
|
||||
macos_settings_dir="$DOTFILES_DIR/scripts/macos-setup"
|
||||
for macScript in "macos-security.sh" "macos-preferences.sh" "macos-apps.sh"; do
|
||||
chmod +x $macos_settings_dir/$macScript && $macos_settings_dir/$macScript --quick-exit
|
||||
done
|
||||
@ -203,61 +223,75 @@ function apply_preferences () {
|
||||
function intall_macos_packages () {
|
||||
# Homebrew not installed, ask user if they'd like to download it now
|
||||
if ! command_exists brew; then
|
||||
read -t $PROMPT_TIMEOUT -p "$(echo -e $CYAN_B)Would you like to install Homebrew? (y/N)" -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo -e "\n${CYAN_B}Would you like to install Homebrew? (y/N)${RESET}"
|
||||
read -t $PROMPT_TIMEOUT -n 1 -r ans_homebrewins
|
||||
if [[ $ans_homebrewins =~ ^[Yy]$ ]] || [[ $AUTO_YES = true ]] ; then
|
||||
echo -en "🍺 ${PURPLE}Installing Homebrew...${RESET}\n"
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
export PATH=/opt/homebrew/bin:$PATH
|
||||
fi
|
||||
fi
|
||||
# Update / Install the Homebrew packages in ~/.Brewfile
|
||||
if command_exists brew && [ -f "$DOTFILES_DIR/installs/Brewfile" ]; then
|
||||
if command_exists brew && [ -f "$DOTFILES_DIR/scripts/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 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
|
||||
# Restore launchpad structure with lporg
|
||||
launchpad_layout="${DOTFILES_DIR}/system-specific/macos/app-configs/launchpad.yml"
|
||||
launchpad_layout="${DOTFILES_DIR}/config/macos/launchpad.yml"
|
||||
if command_exists lporg && [ -f $launchpad_layout ]; then
|
||||
echo -e "${PURPLE}Restoring Launchpad Layout...${RESET}"
|
||||
yes "" | lporg load $launchpad_layout
|
||||
echo -e "\n${CYAN_B}Would you like to restore launchpad layout? (y/N)${RESET}"
|
||||
read -t $PROMPT_TIMEOUT -n 1 -r ans_restorelayout
|
||||
if [[ $ans_restorelayout =~ ^[Yy]$ ]] || [[ $AUTO_YES = true ]] ; then
|
||||
echo -e "${PURPLE}Restoring Launchpad Layout...${RESET}"
|
||||
yes "" | lporg load $launchpad_layout
|
||||
fi
|
||||
fi
|
||||
# Check for MacOS software updates, and ask user if they'd like to install
|
||||
echo -e "${PURPLE}Checking for software updates...${RESET}"
|
||||
pending_updates=$(softwareupdate -l 2>&1)
|
||||
if [[ ! $pending_updates == *"No new software available."* ]]; then
|
||||
echo -e "${PURPLE}A new version of Mac OS is availbile${RESET}"
|
||||
read -t $PROMPT_TIMEOUT -p "$(echo -e $CYAN_B)Would you like to update to the latest version of MacOS? (y/N)" -n 1 -r
|
||||
echo -e "${RESET}"
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "${PURPLE}Updating MacOS${RESET}"
|
||||
softwareupdate -i -a
|
||||
echo -e "\n${CYAN_B}Would you like to check for OX X system updates? (y/N)${RESET}"
|
||||
read -t $PROMPT_TIMEOUT -n 1 -r ans_macoscheck
|
||||
if [[ $ans_macoscheck =~ ^[Yy]$ ]] || [[ $AUTO_YES = true ]] ; then
|
||||
echo -e "${PURPLE}Checking for software updates...${RESET}"
|
||||
pending_updates=$(softwareupdate -l 2>&1)
|
||||
if [[ ! $pending_updates == *"No new software available."* ]]; then
|
||||
echo -e "${PURPLE}A new version of Mac OS is availbile${RESET}"
|
||||
echo -e "${CYAN_B}Would you like to update to the latest version of MacOS? (y/N)${RESET}"
|
||||
read -t $PROMPT_TIMEOUT -n 1 -r ans_macosupdate
|
||||
if [[ $ans_macosupdate =~ ^[Yy]$ ]] || [[ $AUTO_YES = true ]]; then
|
||||
echo -e "${PURPLE}Updating MacOS${RESET}"
|
||||
softwareupdate -i -a
|
||||
fi
|
||||
else
|
||||
echo -e "${GREEN}System is up-to-date."\
|
||||
"Running $(sw_vers -productName) version $(sw_vers -productVersion)${RESET}"
|
||||
fi
|
||||
else
|
||||
echo -e "${GREEN}System is up-to-date."\
|
||||
"Running $(sw_vers -productName) version $(sw_vers -productVersion)${RESET}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Based on system type, uses appropriate package manager to install / updates apps
|
||||
function install_packages () {
|
||||
read -t $PROMPT_TIMEOUT -p "$(echo -e $CYAN_B)Would you like to install / update system packages? (y/N) " -n 1 -r
|
||||
echo
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo -e "\n${CYAN_B}Would you like to install / update system packages? (y/N)${RESET}"
|
||||
read -t $PROMPT_TIMEOUT -n 1 -r ans_syspackages
|
||||
if [[ ! $ans_syspackages =~ ^[Yy]$ ]] && [[ $AUTO_YES != true ]] ; then
|
||||
echo -e "${PURPLE}Skipping package installs${RESET}"
|
||||
return
|
||||
fi
|
||||
# Mac OS
|
||||
if [ "$system_type" = "Darwin" ]; then
|
||||
if [ "$SYSTEM_TYPE" = "Darwin" ]; then
|
||||
# Mac OS
|
||||
intall_macos_packages
|
||||
elif [ -f "/etc/arch-release" ]; then
|
||||
# Arch Linux
|
||||
arch_pkg_install_script="${DOTFILES_DIR}/scripts/installs/arch-pacman.sh"
|
||||
chmod +x $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"
|
||||
flatpak_script="${DOTFILES_DIR}/scripts/installs/flatpak.sh"
|
||||
if [[ $(uname -s) == "Linux" ]] && [ ! -z $XDG_CURRENT_DESKTOP ] && [ -f $flatpak_script ]; then
|
||||
chmod +x $flatpak_script
|
||||
$flatpak_script
|
||||
@ -269,23 +303,36 @@ function finishing_up () {
|
||||
# Update source to ZSH entry point
|
||||
source "${HOME}/.zshenv"
|
||||
|
||||
# Print success message, and time taken
|
||||
total_time=$((`date +%s`-start_time))
|
||||
make_banner "✨ Dotfiles configured succesfully in $total_time seconds" ${GREEN_B} 1
|
||||
# Calculate time taken
|
||||
total_time=$((`date +%s`-START_TIME))
|
||||
if [[ $total_time -gt 60 ]]; then
|
||||
total_time="$(($total_time/60)) minutes"
|
||||
else
|
||||
total_time="${total_time} seconds"
|
||||
fi
|
||||
|
||||
# Print success msg and pretty picture
|
||||
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"
|
||||
|
||||
|
||||
# Refresh ZSH sesssion
|
||||
SKIP_WELCOME=true || exec zsh
|
||||
|
||||
# Exit script with success code
|
||||
# Show press any key to exit
|
||||
echo -e "${CYAN_B}Press any key to exit.${RESET}\n"
|
||||
read -t $PROMPT_TIMEOUT -n 1 -s
|
||||
|
||||
# Unset re-used variables
|
||||
unset PROMPT_TIMEOUT
|
||||
unset AUTO_YES
|
||||
|
||||
# Bye
|
||||
exit 0
|
||||
}
|
||||
|
||||
# If --help flag passed in, just show the help menu
|
||||
if [[ $params == *"--help"* ]]; then
|
||||
if [[ $PARAMS == *"--help"* ]]; then
|
||||
make_intro
|
||||
exit 0
|
||||
fi
|
||||
|
@ -1,99 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
###############################################################
|
||||
# Installs listed packages on Arch-based systems via Pacman #
|
||||
# Doesn't include desktop apps, that're managed via Flatpak #
|
||||
# Apps are sorted by category, and arranged alphabetically #
|
||||
# Be sure to delete / comment out anything you do not need #
|
||||
# For more info, see: https://wiki.archlinux.org/title/Pacman #
|
||||
###############################################################
|
||||
# MIT Licensed (C) Alicia Sykes 2022 <https://aliciasykes.com>#
|
||||
###############################################################
|
||||
|
||||
# Apps to be installed via Pacman
|
||||
pacman_apps=(
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
# Colors
|
||||
CYAN_B='\033[1;96m'
|
||||
YELLOW='\033[0;93m'
|
||||
RESET='\033[0m'
|
||||
GREEN='\033[0;32m'
|
||||
PURPLE='\033[0;35m'
|
||||
LIGHT='\x1b[2m'
|
||||
|
||||
PROMPT_TIMEOUT=15 # When user is prompted for input, skip after x seconds
|
||||
|
||||
# Print intro message
|
||||
echo -e "${PURPLE}Starting Arch app install / update script"
|
||||
echo -e "${LIGHT}The following script is for Arch / Arch-based headless systems, and will"
|
||||
echo -e "update database, upgrade packages, clear cache then install all listed CLI apps."
|
||||
echo -e "${YELLOW}Before proceeding, ensure your happy with all the packages listed in \e[4m${0##*/}"
|
||||
echo -e "${RESET}"
|
||||
|
||||
# Check if running as root, and prompt for password if not
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo -e "${PURPLE}Elevated permissions are required to adjust system settings."
|
||||
echo -e "${CYAN_B}Please enter your password...${RESET}"
|
||||
sudo -v
|
||||
if [ $? -eq 1 ]; then
|
||||
echo -e "${YELLOW}Exiting, as not being run as sudo${RESET}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check pacman actually installed
|
||||
if ! hash pacman 2> /dev/null; then
|
||||
echo "${YELLOW_B}Pacman doesn't seem to be present on your system. Exiting...${RESET}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Prompt user to update package database
|
||||
echo -e "${CYAN_B}Would you like to update package database? (y/N)${RESET}\n"
|
||||
read -t $PROMPT_TIMEOUT -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo -e "${PURPLE}Updating dadatbase...${RESET}"
|
||||
sudo pacman -Syy --noconfirm
|
||||
fi
|
||||
|
||||
# Prompt user to upgrade currently installed packages
|
||||
echo -e "${CYAN_B}Would you like to upgrade currently installed packages? (y/N)${RESET}\n"
|
||||
read -t $PROMPT_TIMEOUT -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo -e "${PURPLE}Upgrading installed packages...${RESET}"
|
||||
sudo pacman -Syu --noconfirm
|
||||
fi
|
||||
|
||||
# Prompt user to clear old package caches
|
||||
echo -e "${CYAN_B}Would you like to clear unused package caches? (y/N)${RESET}\n"
|
||||
read -t $PROMPT_TIMEOUT -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo -e "${PURPLE}Freeing up disk space...${RESET}"
|
||||
sudo pacman -Sc --noconfirm
|
||||
fi
|
||||
|
||||
# Prompt user to install all listed apps
|
||||
echo -e "${CYAN_B}Would you like to install listed apps? (y/N)${RESET}\n"
|
||||
read -t $PROMPT_TIMEOUT -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo -e "${PURPLE}Starting install...${RESET}"
|
||||
for app in ${pacman_apps[@]}; do
|
||||
if hash "${app}" 2> /dev/null; then
|
||||
echo -e "${YELLOW}[Skipping]${LIGHT} ${app} is already installed${RESET}"
|
||||
elif hash flatpak 2> /dev/null && [[ ! -z $(echo $(flatpak list --columns=ref | grep $app)) ]]; then
|
||||
echo -e "${YELLOW}[Skipping]${LIGHT} ${app} is already installed via Flatpak${RESET}"
|
||||
else
|
||||
echo -e "${PURPLE}[Installing]${LIGHT} Downloading ${app}...${RESET}"
|
||||
# pacman -S ${app} --noconfirm
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
echo -e "${PURPLE}Finished installing / updating Arch packages.${RESET}"
|
15
lets-go.sh
15
lets-go.sh
@ -2,8 +2,7 @@
|
||||
|
||||
######################################################################
|
||||
# Lissy93/dotfiles - Remote Runnable Dotfile Setup and Update Script #
|
||||
# Licensed under MIT (C) Alicia Sykes 2022 <https://aliciasykes.com> #
|
||||
# #
|
||||
######################################################################
|
||||
# This script will clone + install, or update dotfiles from git #
|
||||
# Be sure to read through the repo before running anything here #
|
||||
# For more info, read docs: https://github.com/Lissy93/dotfiles #
|
||||
@ -12,6 +11,8 @@
|
||||
# - DOTFILES_REPO - Optionally sets the source repo to be cloned #
|
||||
# - DOTFILES_DIR - Optionally sets the local destination directory #
|
||||
######################################################################
|
||||
# Licensed under MIT (C) Alicia Sykes 2022 <https://aliciasykes.com> #
|
||||
######################################################################
|
||||
|
||||
# If not already set, specify dotfiles destination directory and source repo
|
||||
DOTFILES_DIR="${DOTFILES_DIR:-$HOME/Documents/config/dotfiles}"
|
||||
@ -19,10 +20,10 @@ DOTFILES_REPO="${DOTFILES_REPO:-https://github.com/lissy93/dotfiles.git}"
|
||||
|
||||
# Print starting message
|
||||
echo -e "\033[1;35m""Lissy93/Dotfiles Installation Script 🧰
|
||||
\033[0;35mThis script will install or update dotfiles from \033[4;35m\
|
||||
${DOTFILES_REPO}\033[0;35m into \033[4;35m${DOTFILES_DIR}\033[0;35m\n\
|
||||
Be sure that you have read and understood config which will be applied.
|
||||
If you don't want to proceed, press Ctrl+C to cancel now...\033[0m\n"
|
||||
\033[0;35mThis script will install or update specified dotfiles:
|
||||
- From \033[4;35m${DOTFILES_REPO}\033[0;35m
|
||||
- Into \033[4;35m${DOTFILES_DIR}\033[0;35m
|
||||
Be sure you've read and understood the what will be applied.\033[0m\n"
|
||||
|
||||
# If dotfiles not yet present then clone
|
||||
if [[ ! -d "$DOTFILES_DIR" ]]; then
|
||||
@ -33,6 +34,6 @@ fi
|
||||
# Execute setup or update script
|
||||
cd "${DOTFILES_DIR}" && \
|
||||
chmod +x ./install.sh && \
|
||||
./install.sh
|
||||
./install.sh --no-clear
|
||||
|
||||
# EOF
|
||||
|
14
lib/README.txt
Normal file
14
lib/README.txt
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
Lissy93/Dotfiles - Lib
|
||||
----------------------
|
||||
|
||||
This directory contains dependencies which are managed as git sub-modules.
|
||||
|
||||
The repository must be cloned recursively in order to download modules.
|
||||
If no files are present, run: git submodule update --recursive --remote
|
||||
|
||||
Sub-modules:
|
||||
* dotbot A dotfile management system, for symlinking
|
||||
* tpm Tmux plugin manager
|
||||
|
||||
Source: https://github.com/Lissy93/dotfiles/tree/master/lib
|
1
lib/dotbot
Submodule
1
lib/dotbot
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit d2f76a25933f97cd37ef94e3bf9c134b9c55a02a
|
18
scripts/README.txt
Normal file
18
scripts/README.txt
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
Lissy93/Dotfiles - Scripts 📜
|
||||
----------------------------
|
||||
|
||||
A set of Bash scripts for automating the setup and management of various systems.
|
||||
|
||||
* scripts/installs/ OS / distro specific package installation / update scripts
|
||||
* Brewfile Packages to be installed via Homebrew on MacOS
|
||||
* flatpak.sh Desktop apps to be installed on Linux GUI systems via Flatpak
|
||||
* arch-pacman.sh Package installations using Pacman for Arch-based systems
|
||||
* debian-apt.sh Package installations using apt for Debian-based systems
|
||||
* alpine-pkg.sh Package installations using pkg for Alpine-based systems
|
||||
* scripts/macos-setup/ Scripts to automate the configuration of MacOS systems
|
||||
* macos-security.sh Apply essential MacOS security settings
|
||||
* macos-preferences.sh Apply user MacOS preferences (spotlight, colors, behaviour, etc)
|
||||
* macos-apps.sh Apply preferences to user applications (Finder, Mail, Terminal, etc)
|
||||
|
||||
Source: https://github.com/Lissy93/dotfiles/tree/master/scripts
|
@ -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)
|
||||
@ -39,20 +39,26 @@ brew 'bat' # Output highlighting (better cat)
|
||||
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 'exiftool' # Read, write and modify exif data
|
||||
brew 'fzf' # Fuzzy file finder and filtering
|
||||
brew 'hyperfine' # Benchmarking for arbitrary commands
|
||||
brew 'jdupes' # Duplicate file finder
|
||||
brew 'just' # Powerful command runner (better make)
|
||||
brew 'jq' # JSON parser, output and query files
|
||||
brew 'duf' # Get info on mounted disks (better df)
|
||||
brew 'most' # Multi-window scroll pager (better less)
|
||||
brew 'procs' # Advanced process viewer (better ps)
|
||||
brew 'ripgrep' # Searching within files (better grep)
|
||||
brew 'rsync' # Fast incremental file transfer
|
||||
brew 'scc' # Count lines of code (better cloc)
|
||||
brew 'sd' # RegEx find and replace (better sed)
|
||||
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)
|
||||
|
||||
@ -67,6 +73,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
|
||||
@ -102,16 +109,14 @@ 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
|
||||
cask 'sourcetree' # Git visual client
|
||||
cask 'utm' # VM management console
|
||||
cask 'visual-studio-code' # Code editor
|
||||
|
||||
# Development Langs, Compilers, Package Managers and SDKs
|
||||
brew 'docker' # Containers
|
||||
brew 'gcc' # GNU C++ compilers
|
||||
brew 'go' # Compiler for Go Lang
|
||||
brew 'lua' # Lua interpreter
|
||||
@ -123,6 +128,10 @@ brew 'python' # Python interpriter
|
||||
brew 'rust' # Rust language
|
||||
cask 'android-sdk' # Android software dev kit
|
||||
|
||||
# DevOps
|
||||
brew 'ansible' # Automation
|
||||
brew 'docker' # Containers
|
||||
|
||||
# Development Utils
|
||||
brew 'gh' # Interact with GitHub PRs, issues, repos
|
||||
brew 'git-extras' # Extra git commands for common tasks
|
||||
@ -133,69 +142,44 @@ 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
|
||||
brew 'dnscrypt-proxy' # Proxy for using encrypted DNS
|
||||
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 #
|
||||
#############################################################
|
||||
|
||||
# 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
|
||||
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)
|
||||
@ -212,6 +196,10 @@ cask 'firefox'
|
||||
cask 'chromium'
|
||||
cask 'orion'
|
||||
|
||||
#############################################################
|
||||
# MacOS-Specific Stuff #
|
||||
#############################################################
|
||||
|
||||
# Fonts
|
||||
tap 'homebrew/cask-fonts'
|
||||
cask 'font-fira-code'
|
||||
@ -219,4 +207,41 @@ cask 'font-hack'
|
||||
cask 'font-inconsolata'
|
||||
cask 'font-meslo-lg-nerd-font'
|
||||
|
||||
# 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 '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 'santa' # Binary authorization for security
|
||||
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
|
165
scripts/installs/arch-pacman.sh
Normal file
165
scripts/installs/arch-pacman.sh
Normal file
@ -0,0 +1,165 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
################################################################
|
||||
# 📜 Arch Linux, Pacman Package Install / Update Script #
|
||||
################################################################
|
||||
# Installs listed packages on Arch-based systems via Pacman #
|
||||
# Also updates the cache database and existing applications #
|
||||
# Confirms apps arn't installed via different package manager #
|
||||
# Doesn't include desktop apps, that're managed via Flatpak #
|
||||
# Apps are sorted by category, and arranged alphabetically #
|
||||
# Be sure to delete / comment out anything you do not need #
|
||||
# For more info, see: https://wiki.archlinux.org/title/Pacman #
|
||||
################################################################
|
||||
# MIT Licensed (C) Alicia Sykes 2022 <https://aliciasykes.com> #
|
||||
################################################################
|
||||
|
||||
# Apps to be installed via Pacman
|
||||
pacman_apps=(
|
||||
# Essentials
|
||||
'git' # Version controll
|
||||
'neovim' # Text editor
|
||||
'ranger' # Directory browser
|
||||
'tmux' # Term multiplexer
|
||||
'wget' # Download files
|
||||
|
||||
# CLI Power Basics
|
||||
'aria2' # Resuming download util (better wget)
|
||||
'bat' # Output highlighting (better cat)
|
||||
'broot' # Interactive directory navigation
|
||||
'cloc' # Count lines of code in file / dir
|
||||
'ctags' # Indexing of file info + headers
|
||||
'diff-so-fancy' # Readable file compares (better diff)
|
||||
'duf' # Get info on mounted disks (better df)
|
||||
'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
|
||||
'most' # Multi-window scroll pager (better less)
|
||||
'procs' # Advanced process viewer (better ps)
|
||||
'ripgrep' # Searching within files (better grep)
|
||||
'scrot' # Screenshots programmatically via CLI
|
||||
'sd' # RegEx find and replace (better sed)
|
||||
'thefuck' # Auto-correct miss-typed commands
|
||||
'tealdeer' # Reader for command 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)
|
||||
|
||||
# Security Utilities
|
||||
'clamav' # Open source virus scanning suite
|
||||
'cryptsetup' # Reading / writing encrypted volumes
|
||||
'gnupg' # PGP encryption, signing and verifying
|
||||
'git-crypt' # Transparent encryption for git repos
|
||||
'lynis' # Scan system for common security issues
|
||||
'openssl' # Cryptography and SSL/TLS Toolkit
|
||||
'rkhunter' # Search / detect potential root kits
|
||||
|
||||
# Monitoring, management and stats
|
||||
'btop' # Live system resource monitoring
|
||||
'bmon' # Bandwidth utilization monitor
|
||||
'ctop' # Container metrics and monitoring
|
||||
'gping' # Interactive ping tool, with graph
|
||||
'glances' # Resource monitor + web and API
|
||||
'goaccess' # Web log analyzer and viewer
|
||||
'speedtest-cli' # Command line speed test utility
|
||||
|
||||
# CLI Fun
|
||||
'cowsay' # Outputs message with ASCII art cow
|
||||
'figlet' # Outputs text as 3D ASCII word art
|
||||
'lolcat' # Rainbow coloured terminal output
|
||||
'neofetch' # Show off distro and system info
|
||||
)
|
||||
|
||||
# Colors
|
||||
PURPLE='\033[0;35m'
|
||||
YELLOW='\033[0;93m'
|
||||
CYAN_B='\033[1;96m'
|
||||
LIGHT='\x1b[2m'
|
||||
RESET='\033[0m'
|
||||
|
||||
PROMPT_TIMEOUT=15 # When user is prompted for input, skip after x seconds
|
||||
|
||||
# If set to auto-yes - then don't wait for user reply
|
||||
if [[ $* == *"--auto-yes"* ]]; then
|
||||
PROMPT_TIMEOUT=0
|
||||
REPLY='Y'
|
||||
fi
|
||||
|
||||
# Print intro message
|
||||
echo -e "${PURPLE}Starting Arch package install / update script"
|
||||
echo -e "${LIGHT}The following script is for Arch / Arch-based headless systems, and will"
|
||||
echo -e "update database, upgrade packages, clear cache then install all listed CLI apps."
|
||||
echo -e "${YELLOW}Before proceeding, ensure your happy with all the packages listed in \e[4m${0##*/}"
|
||||
echo -e "${RESET}"
|
||||
|
||||
# Check if running as root, and prompt for password if not
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo -e "${PURPLE}Elevated permissions are required to adjust system settings."
|
||||
echo -e "${CYAN_B}Please enter your password...${RESET}"
|
||||
sudo -v
|
||||
if [ $? -eq 1 ]; then
|
||||
echo -e "${YELLOW}Exiting, as not being run as sudo${RESET}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check pacman actually installed
|
||||
if ! hash pacman 2> /dev/null; then
|
||||
echo "${YELLOW_B}Pacman doesn't seem to be present on your system. Exiting...${RESET}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Prompt user to update package database
|
||||
echo -e "${CYAN_B}Would you like to update package database? (y/N)${RESET}\n"
|
||||
read -t $PROMPT_TIMEOUT -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo -e "${PURPLE}Updating dadatbase...${RESET}"
|
||||
sudo pacman -Syy --noconfirm
|
||||
fi
|
||||
|
||||
# Prompt user to upgrade currently installed packages
|
||||
echo -e "${CYAN_B}Would you like to upgrade currently installed packages? (y/N)${RESET}\n"
|
||||
read -t $PROMPT_TIMEOUT -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo -e "${PURPLE}Upgrading installed packages...${RESET}"
|
||||
sudo pacman -Syu --noconfirm
|
||||
fi
|
||||
|
||||
# Prompt user to clear old package caches
|
||||
echo -e "${CYAN_B}Would you like to clear unused package caches? (y/N)${RESET}\n"
|
||||
read -t $PROMPT_TIMEOUT -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo -e "${PURPLE}Freeing up disk space...${RESET}"
|
||||
sudo pacman -Sc --noconfirm
|
||||
paccache -r
|
||||
fi
|
||||
|
||||
# Prompt user to install all listed apps
|
||||
echo -e "${CYAN_B}Would you like to install listed apps? (y/N)${RESET}\n"
|
||||
read -t $PROMPT_TIMEOUT -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo -e "${PURPLE}Starting install...${RESET}"
|
||||
for app in ${pacman_apps[@]}; do
|
||||
if hash "${app}" 2> /dev/null; then
|
||||
echo -e "${YELLOW}[Skipping]${LIGHT} ${app} is already installed${RESET}"
|
||||
elif [[ $(echo $(pacman -Qk $(echo $app | tr 'A-Z' 'a-z') 2> /dev/null )) == *"total files"* ]]; then
|
||||
echo -e "${YELLOW}[Skipping]${LIGHT} ${app} is already installed via Pacman${RESET}"
|
||||
elif hash flatpak 2> /dev/null && [[ ! -z $(echo $(flatpak list --columns=ref | grep $app)) ]]; then
|
||||
echo -e "${YELLOW}[Skipping]${LIGHT} ${app} is already installed via Flatpak${RESET}"
|
||||
else
|
||||
echo -e "${PURPLE}[Installing]${LIGHT} Downloading ${app}...${RESET}"
|
||||
sudo pacman -S ${app} --needed --noconfirm
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
echo -e "${PURPLE}Finished installing / updating Arch packages.${RESET}"
|
||||
|
||||
# EOF
|
@ -42,6 +42,7 @@ flatpak_apps=(
|
||||
'com.obsproject.Studio' # Video streaming
|
||||
'fr.handbrake.ghb' # Video transcoder
|
||||
'io.github.seadve.Kooha' # Screen recorder
|
||||
'nl.hjdskes.gcolor3' # Color picker
|
||||
'org.audacityteam.Audacity' # Sound editor
|
||||
'org.blender.Blender' # 3D modeling
|
||||
'org.darktable.Darktable' # Video editor
|
28
scripts/macos-setup/.macos
Executable file
28
scripts/macos-setup/.macos
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
########################################################################
|
||||
# Initiates the applying of MacOS-specific settings and preferences #
|
||||
# Will use local files if available, otherwise run directly from git #
|
||||
# IMPORTANT: Be sure to read files through thoughouly before executing #
|
||||
########################################################################
|
||||
# Licensed under MIT (C) Alicia Sykes 2022 <https://aliciasykes.com> #
|
||||
########################################################################
|
||||
|
||||
macos_scripts=(
|
||||
"macos-security.sh" # Applies security settings
|
||||
"macos-preferences.sh" # Sets user preferences
|
||||
"macos-apps.sh" # Configures app options
|
||||
)
|
||||
|
||||
if [ ! -z $0 ]; then # Use local files
|
||||
DIR="$(cd "$(dirname "$0")" && pwd)/system-settings"
|
||||
for mac_script in ${macos_scripts[@]}; do
|
||||
$DIR/$mac_script
|
||||
done
|
||||
else # Run from remote origin
|
||||
REMOTE_DIR="https://raw.githubusercontent.com/Lissy93/dotfiles"
|
||||
REMOTE_DIR+="/master/scripts/macos-setup"
|
||||
for mac_script in ${macos_scripts[@]}; do
|
||||
bash <(curl -s "${REMOTE_DIR}/${mac_script}")
|
||||
done
|
||||
fi
|
@ -37,7 +37,7 @@ RESET_COLOR='\033[0m'
|
||||
|
||||
# Current and total taslks, used for progress updates
|
||||
current_event=0
|
||||
total_events=25
|
||||
total_events=34
|
||||
|
||||
if [ ! "$(uname -s)" = "Darwin" ]; then
|
||||
echo -e "${PRIMARY_COLOR}Incompatible System${RESET_COLOR}"
|
||||
@ -114,7 +114,7 @@ osascript -e 'tell application "System Preferences" to quit'
|
||||
# ######################################
|
||||
# Disabling Siri and related features #
|
||||
# ######################################
|
||||
log_section "Disable Assistant Features"
|
||||
log_section "Disable Telemetry and Assistant Features"
|
||||
|
||||
# Disable Ask Siri
|
||||
log_msg "Disable 'Ask Siri'"
|
||||
@ -154,6 +154,9 @@ defaults write com.apple.Siri 'UserHasDeclinedEnable' -bool true
|
||||
log_msg "Opt-out from Siri data collection"
|
||||
defaults write com.apple.assistant.support 'Siri Data Sharing Opt-In Status' -int 2
|
||||
|
||||
# Don't prompt user to report crashes, may leak sensitive info
|
||||
log_msg "Disable crash reporter"
|
||||
defaults write com.apple.CrashReporter DialogType none
|
||||
|
||||
############################
|
||||
# MacOS Firefwall Security #
|
||||
@ -185,12 +188,42 @@ log_msg "Turn on stealth mode"
|
||||
sudo defaults write /Library/Preferences/com.apple.alf stealthenabled -bool true
|
||||
defaults write com.apple.security.firewall EnableStealthMode -bool true
|
||||
|
||||
# Will prompt user to allow network access even for signed apps
|
||||
log_msg "Prevent signed apps from being automatically whitelisted"
|
||||
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setallowsigned off
|
||||
|
||||
# Will prompt user to allow network access for downloaded apps
|
||||
log_msg "Prevent downloaded apps from being automatically whitelisted"
|
||||
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setallowsignedapp off
|
||||
|
||||
# Sending hangup command to socketfilterfw is required for changes to take effect
|
||||
log_msg "Restarting socket filter firewall"
|
||||
sudo pkill -HUP socketfilterfw
|
||||
|
||||
# Prevents quarantine from storing info about downloaded files as privacy risk
|
||||
log_msg "Disabling GateKeeper"
|
||||
sudo spctl --master-disable
|
||||
|
||||
####################################
|
||||
# Log In and User Account Security #
|
||||
####################################
|
||||
log_section "Account Security"
|
||||
|
||||
# Enforce system hibernation
|
||||
log_msg "Enforce hibernation instead of sleep"
|
||||
sudo pmset -a destroyfvkeyonstandby 1
|
||||
|
||||
# Evict FileVault keys from memory
|
||||
log_msg "Evict FileVault keys from memory on hibernate"
|
||||
sudo pmset -a hibernatemode 25
|
||||
|
||||
# Set power settings (required when evicting FV keys)
|
||||
log_msg "Disable power nap and other auto-power settings"
|
||||
sudo pmset -a powernap 0
|
||||
sudo pmset -a standby 0
|
||||
sudo pmset -a standbydelay 0
|
||||
sudo pmset -a autopoweroff 0
|
||||
|
||||
# Require a password to wake the computer from sleep or screen saver
|
||||
log_msg "Require a password to wake the computer from sleep or screen saver"
|
||||
sudo defaults write /Library/Preferences/com.apple.screensaver askForPassword -bool true
|
||||
@ -200,7 +233,6 @@ log_msg "Initiate session lock five seconds after screen saver is started"
|
||||
sudo defaults write /Library/Preferences/com.apple.screensaver 'askForPasswordDelay' -int 5
|
||||
|
||||
# Disables signing in as Guest from the login screen
|
||||
|
||||
log_msg "Disables signing in as Guest from the login screen"
|
||||
sudo defaults write /Library/Preferences/com.apple.loginwindow GuestEnabled -bool NO
|
||||
|
||||
@ -234,6 +266,8 @@ sudo defaults write /Library/Preferences/com.apple.mDNSResponder.plist NoMultica
|
||||
log_msg "Disable insecure telnet protocol"
|
||||
sudo launchctl disable system/com.apple.telnetd
|
||||
|
||||
log_msg "Prevent auto-launching captive portal webpages"
|
||||
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.captive.control.plist Active -bool false
|
||||
|
||||
#########################################
|
||||
# Disable Printers and Sharing Protocols #
|
@ -6,37 +6,64 @@
|
||||
- clean: ['~', '${XDG_CONFIG_HOME}']
|
||||
|
||||
- shell:
|
||||
# Before symlinking, source .zshenv in order to set XDG variables
|
||||
- description: Set XDG environmental variables
|
||||
command: source ./zsh/.zshenv
|
||||
- description: Check that $XDG_CONFIG_HOME is set
|
||||
command: >
|
||||
if [ -z ${XDG_CONFIG_HOME+x} ]; then; \
|
||||
echo "XDG_CONFIG_HOME is not yet set. Will use ~/.config"; \
|
||||
XDG_CONFIG_HOME="${HOME}/.config"; \
|
||||
fi
|
||||
stdin: false
|
||||
stdout: true
|
||||
stderr: true
|
||||
quiet: true
|
||||
- description: Check that $XDG_DATA_HOME is set
|
||||
command: >
|
||||
if [ -z ${XDG_DATA_HOME+x} ]; then; \
|
||||
echo "XDG_DATA_HOME is not yet set. Will use ~/.local/share"; \
|
||||
XDG_DATA_HOME="${HOME}/.local/share"; \
|
||||
fi
|
||||
stdin: false
|
||||
stdout: true
|
||||
stderr: true
|
||||
quiet: true
|
||||
|
||||
# Symlink locations for files / directories
|
||||
- link:
|
||||
~/.zshenv:
|
||||
path: zsh/.zshenv
|
||||
force: true
|
||||
# Essential configs (ZSH, Vim, Tmux)
|
||||
~/.zshenv: { path: zsh/.zshenv, force: true }
|
||||
${XDG_CONFIG_HOME}/zsh: zsh
|
||||
${XDG_CONFIG_HOME}/vim: vim
|
||||
${XDG_CONFIG_HOME}/nvim: vim
|
||||
${XDG_CONFIG_HOME}/bash: bash
|
||||
${XDG_DATA_HOME}/tmux/plugins/tpm: tpm
|
||||
${XDG_CONFIG_HOME}/tmux/tmux.conf: tmux/tmux.conf
|
||||
${XDG_CONFIG_HOME}/tmux: tmux
|
||||
${XDG_DATA_HOME}/tmux/tpm: lib/tpm
|
||||
${XDG_DATA_HOME}/tmux/plugins/tpm: lib/tpm
|
||||
|
||||
# Utility config files
|
||||
${XDG_CONFIG_HOME}/bash/.bashrc: config/.bashrc
|
||||
${XDG_CONFIG_HOME}/git/.gitconfig: config/.gitconfig
|
||||
${XDG_CONFIG_HOME}/.gitignore_global: config/.gitignore_global
|
||||
${XDG_CONFIG_HOME}/.wgetrc: config/.wgetrc
|
||||
|
||||
# Bash utils
|
||||
${XDG_CONFIG_HOME}/utils: utils
|
||||
${XDG_CONFIG_HOME}/git/.gitconfig: configs/.gitconfig
|
||||
# ~/.gitconfig: configs/.gitconfig
|
||||
${XDG_CONFIG_HOME}/.gitignore_global: configs/.gitignore_global
|
||||
# ${XDG_CONFIG_HOME}/curl/.curlrc: configs/.curlrc
|
||||
$XDG_CONFIG_HOME/yabai/yabairc:
|
||||
|
||||
# MacOS-Only
|
||||
${XDG_CONFIG_HOME}/yabai/yabairc:
|
||||
if: '[ `uname` = Darwin ]'
|
||||
path: system-specific/macos/app-configs/yabairc
|
||||
$XDG_CONFIG_HOME/skhd/skhdrc:
|
||||
path: config/macos/yabairc
|
||||
${XDG_CONFIG_HOME}/skhd/skhdrc:
|
||||
if: '[ `uname` = Darwin ]'
|
||||
path: system-specific/macos/app-configs/skhdrc
|
||||
path: config/macos/skhdrc
|
||||
~/.Brewfile:
|
||||
if: '[ `uname` = Darwin ]'
|
||||
path: installs/Brewfile
|
||||
path: scripts/installs/Brewfile
|
||||
~/.finicky.js:
|
||||
if: '[ `uname` = Darwin ]'
|
||||
path: system-specific/macos/app-configs/.finicky.js
|
||||
path: config/macos/.finicky.js
|
||||
|
||||
# If not already present, create home directories
|
||||
- create:
|
||||
- ~/Downloads
|
||||
- ~/Documents
|
||||
|
@ -1,11 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# ~/.macos
|
||||
|
||||
DIR="$(cd "$(dirname "$0")" && pwd)/system-settings"
|
||||
|
||||
$DIR/macos-security.sh
|
||||
$DIR/macos-preferences.sh
|
||||
$DIR/macos-apps.sh
|
||||
|
||||
|
111
tmux/tmux.conf
111
tmux/tmux.conf
@ -1,30 +1,93 @@
|
||||
|
||||
# To copy, left click and drag to highlight text in yellow,
|
||||
# once you release left click yellow text will disappear and will automatically be available in clibboard
|
||||
|
||||
######################################################################
|
||||
# Tmux Configuration File (~/.tmux.conf) #
|
||||
######################################################################
|
||||
# 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 <https://aliciasykes.com> #
|
||||
######################################################################
|
||||
|
||||
|
||||
######################################################################
|
||||
# Basics #
|
||||
######################################################################
|
||||
|
||||
# Set Tmux prefix keys (Ctrl+B or `)
|
||||
set-option -g prefix C-b
|
||||
set-option -g prefix2 `
|
||||
|
||||
# Use vim keybindings in copy mode
|
||||
setw -g mode-keys vi
|
||||
|
||||
# Allow mouse support
|
||||
set -g mouse on
|
||||
|
||||
# Use wider color pallete
|
||||
set -g default-terminal screen-256color
|
||||
|
||||
# Set bigger history limit
|
||||
set -g history-limit 20000
|
||||
|
||||
# Set Esc delay after prefix
|
||||
set -sg escape-time 20
|
||||
|
||||
# Keep Tmux alive when the initial command is finished
|
||||
set -g remain-on-exit off
|
||||
|
||||
# Sets parent terminal title, same as current Tmux window
|
||||
set -g set-titles on
|
||||
set -g set-titles-string "#I:#W"
|
||||
|
||||
# Update default binding of `Enter` to also use copy-pipe
|
||||
unbind -T copy-mode-vi Enter
|
||||
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -selection c"
|
||||
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
|
||||
|
||||
|
||||
######################################################################
|
||||
# Navigation #
|
||||
######################################################################
|
||||
|
||||
# Allow Alt+Arrow to switch pains
|
||||
bind -n M-Left select-pane -L
|
||||
bind -n M-Right select-pane -R
|
||||
bind -n M-Up select-pane -U
|
||||
bind -n M-Down select-pane -D
|
||||
|
||||
# Allow mouse support
|
||||
set -g mouse on
|
||||
# Split window horizontally (h) / veritcally (v)
|
||||
bind v split-window -v
|
||||
bind h split-window -h
|
||||
|
||||
# Activity Monitoring (for when something happens in another pain)
|
||||
set -g monitor-activity on
|
||||
set -g visual-activity on
|
||||
|
||||
# Use wider color pallete
|
||||
set -g default-terminal screen-256color
|
||||
######################################################################
|
||||
# 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"
|
||||
|
||||
|
||||
|
||||
######################################################################
|
||||
# Status Bar #
|
||||
######################################################################
|
||||
|
||||
set -g status-bg colour0
|
||||
set -g status-fg colour7
|
||||
|
||||
######################################################################
|
||||
# Plugin Imports and Configurations #
|
||||
######################################################################
|
||||
|
||||
# Set install location for plugins
|
||||
set-environment -g TMUX_PLUGIN_MANAGER_PATH "${XDG_DATA_HOME}/tmux/plugins"
|
||||
@ -52,29 +115,35 @@ set -g status-interval 2
|
||||
set -g status-right-length 180
|
||||
set -g status-right '#{tmux_mode_indicator} Online: #{online_status} | #{weather} | %a %d/%m/%Y %H:%M | #{battery_icon_status} #{battery_percentage}'
|
||||
set -g status-left-length 180
|
||||
set -g status-left "#{cpu_bg_color} CPU: #{cpu_percentage} #{cpu_temp_bg_color} #{cpu_temp_icon} #{cpu_temp}#{cpu_temp_format} |#{cpu_bg_color} MEM: #{ram_percentage} #[default]| #{simple_git_status}"
|
||||
set -g status-left "CPU: #{cpu_fg_color}#{cpu_percentage} #{cpu_temp_icon} #{cpu_temp}#{cpu_temp_format}#[default] | MEM: #{ram_fg_color}#{ram_percentage} #[default]| #{simple_git_status}"
|
||||
|
||||
# More plugin options
|
||||
set -g @menus_trigger '#'
|
||||
|
||||
set -g @cpu_low_bg_color "#[bg=#88ff88]"
|
||||
set -g @cpu_medium_bg_color "#[bg=3]"
|
||||
set -g @cpu_high_bg_color "#[bg=1]"
|
||||
set -g @cpu_high_fg_color "#[bg=white]"
|
||||
set-option -g @tmux-weather-location "London"
|
||||
|
||||
set -g @cpu_low_bg_color "#[bg=0]"
|
||||
set -g @cpu_low_fg_color "#[fg=3]"
|
||||
set -g @cpu_medium_bg_color "#[bg=0]"
|
||||
set -g @cpu_medium_fg_color "#[fg=3]"
|
||||
set -g @cpu_high_bg_color "#[bg=0]"
|
||||
set -g @cpu_high_fg_color "#[fg=1]"
|
||||
set -g @cpu_temp_format "%0.1f°"
|
||||
set -g @cpu_temp_low_icon "❄️"
|
||||
set -g @cpu_temp_medium_icon "🌡️"
|
||||
set -g @cpu_temp_high_icon "🔥"
|
||||
|
||||
set -g @cpu_temp_low_bg_color "#[bg=#88ff88]"
|
||||
set -g @cpu_temp_medium_bg_color "#[bg=3]"
|
||||
set -g @cpu_temp_high_bg_color "#[bg=1]"
|
||||
set -g @cpu_temp_high_fg_color "#[bg=white]"
|
||||
|
||||
set -g @ram_low_bg_color "#[bg=#88ff88]"
|
||||
set -g @ram_medium_bg_color "#[bg=3]"
|
||||
set -g @ram_high_bg_color "#[bg=1]"
|
||||
set -g @ram_high_fg_color "#[bg=white]"
|
||||
set -g @cpu_temp_low_bg_color "#[bg=0]"
|
||||
set -g @cpu_temp_low_fg_color "#[fg=20]"
|
||||
set -g @cpu_temp_medium_bg_color "#[bg=0]"
|
||||
set -g @cpu_temp_medium_fg_color "#[fg=11]"
|
||||
set -g @cpu_temp_high_bg_color "#[bg=0]"
|
||||
set -g @cpu_temp_high_fg_color "#[fg=9]"
|
||||
set -g @ram_low_bg_color "#[bg=0]"
|
||||
set -g @ram_low_fg_color "#[fg=2]"
|
||||
set -g @ram_medium_bg_color "#[bg=0]"
|
||||
set -g @ram_medium_fg_color "#[fg=3]"
|
||||
set -g @ram_high_bg_color "#[bg=0]"
|
||||
set -g @ram_high_fg_color "#[fg=2]"
|
||||
|
||||
# Import TPM
|
||||
run "${XDG_DATA_HOME}/tmux/plugins/tpm/tpm"
|
||||
|
68
utils/welcome-banner.sh
Normal file → Executable file
68
utils/welcome-banner.sh
Normal file → Executable file
@ -1,32 +1,44 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Welcome script, prints personalised, time-based greeting and system info
|
||||
# Licensed under MIT, (C) Alicia Sykes 2021: https://aliciasykes.com
|
||||
######################################################################
|
||||
# 🌞 Welcome Banner #
|
||||
######################################################################
|
||||
# Prints personal greeting, system info and data about today #
|
||||
# Intended for use as a MOTD, for when using multiple systems #
|
||||
# For docs and more info, see: https://github.com/lissy93/dotfiles #
|
||||
# #
|
||||
# Licensed under MIT (C) Alicia Sykes 2022 <https://aliciasykes.com> #
|
||||
######################################################################
|
||||
|
||||
function welcome() {
|
||||
# Determine greeting based on the time of day
|
||||
# Formatting variables
|
||||
COLOR_P='\033[1;36m'
|
||||
COLOR_S='\033[0;36m'
|
||||
RESET='\033[0m'
|
||||
|
||||
# Print time-based personalized message, using figlet & lolcat if availible
|
||||
function welcome_greeting () {
|
||||
h=`date +%H`
|
||||
if [ $h -lt 04 ] || [[ $h -gt 22 ]]; then greeting="Good Night"
|
||||
elif [ $h -lt 12 ]; then greeting="Good morning"
|
||||
elif [ $h -lt 18 ]; then greeting="Good afternoon"
|
||||
elif [ $h -lt 22 ]; then greeting="Good evening"
|
||||
else greeting="Hello"
|
||||
if [ $h -lt 04 ] || [[ $h -gt 22 ]];
|
||||
then greeting="Good Night"
|
||||
elif [ $h -lt 12 ];
|
||||
then greeting="Good morning"
|
||||
elif [ $h -lt 18 ];
|
||||
then greeting="Good afternoon"
|
||||
elif [ $h -lt 22 ];
|
||||
then greeting="Good evening"
|
||||
else
|
||||
greeting="Hello"
|
||||
fi
|
||||
|
||||
COLOR_P="\033[1;36m"
|
||||
COLOR_S="\033[0;36m"
|
||||
|
||||
# Make welcome message
|
||||
WELCOME_MSG="$greeting $USER!"
|
||||
|
||||
# Print welcome message, using figlet & lolcat if availible
|
||||
if hash lolcat 2>/dev/null && hash figlet 2>/dev/null; then
|
||||
echo "${WELCOME_MSG}" | figlet | lolcat
|
||||
else
|
||||
echo -e "$COLOR_P${WELCOME_MSG}\033[0m\n"
|
||||
echo -e "$COLOR_P${WELCOME_MSG}${RESET}\n"
|
||||
fi
|
||||
}
|
||||
|
||||
# Print system information with neofetch, if it's installed
|
||||
# Print system information with neofetch, if it's installed
|
||||
function welcome_sysinfo () {
|
||||
if hash neofetch 2>/dev/null; then
|
||||
neofetch --shell_version off \
|
||||
--disable shell resolution de wm wm_theme theme icons terminal \
|
||||
@ -35,26 +47,36 @@ function welcome() {
|
||||
--color_blocks off \
|
||||
--memory_display info
|
||||
fi
|
||||
}
|
||||
|
||||
# Print todays info: Date, IP, weather, etc
|
||||
function welcome_today () {
|
||||
timeout=0.5
|
||||
|
||||
echo "\033[1;34mToday\n------"
|
||||
echo -e "\033[1;34mToday\n------"
|
||||
|
||||
# Print date time
|
||||
echo "$COLOR_S$(date '+🗓️ Date: %A, %B %d, %Y at %H:%M')"
|
||||
echo -e "$COLOR_S$(date '+🗓️ Date: %A, %B %d, %Y at %H:%M')"
|
||||
|
||||
# Print local weather
|
||||
curl -s -m $timeout "wttr.in?format=%cWeather:+%C+%t,+%p+%w"
|
||||
echo -e "\033[0m"
|
||||
echo -e "${RESET}"
|
||||
|
||||
# Print IP address
|
||||
if hash ip 2>/dev/null; then
|
||||
ip_address=$(ip route get 8.8.8.8 | awk -F"src " 'NR==1{split($2,a," ");print a[1]}')
|
||||
ip_interface=$(ip route get 8.8.8.8 | awk -F"dev " 'NR==1{split($2,a," ");print a[1]}')
|
||||
echo "${COLOR_S}🌐 IP: $(curl -s -m $timeout 'https://ipinfo.io/ip') (${ip_address} on ${ip_interface})\033[0m\n"
|
||||
echo -e "${COLOR_S}🌐 IP: $(curl -s -m $timeout 'https://ipinfo.io/ip') (${ip_address} on ${ip_interface})"
|
||||
echo -e "${RESET}\n"
|
||||
fi
|
||||
}
|
||||
|
||||
# Putting it all together
|
||||
function welcome() {
|
||||
welcome_greeting
|
||||
welcome_sysinfo
|
||||
welcome_today
|
||||
}
|
||||
|
||||
# Determine if file is being run directly or sourced
|
||||
([[ -n $ZSH_EVAL_CONTEXT && $ZSH_EVAL_CONTEXT =~ :file$ ]] ||
|
||||
[[ -n $KSH_VERSION && $(cd "$(dirname -- "$0")" &&
|
||||
|
@ -11,7 +11,7 @@ source ${zsh_dir}/aliases/general.zsh
|
||||
source ${zsh_dir}/aliases/git.zsh
|
||||
source ${zsh_dir}/aliases/node-js.zsh
|
||||
source ${zsh_dir}/aliases/flutter.zsh
|
||||
# source ${zsh_dir}/aliases/alias-tips.zsh
|
||||
source ${zsh_dir}/aliases/alias-tips.zsh
|
||||
|
||||
# Setup Antigen, and import plugins
|
||||
source ${zsh_dir}/helpers/setup-antigen.zsh
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
# If an alias for the command just run exists, then show tip
|
||||
preexec_alias-finder() {
|
||||
tip=$(alias | grep -E "=$1$")
|
||||
tip=$(alias | grep -E "=$1$" | head -1)
|
||||
if [ ! -z "$tip" ]; then
|
||||
echo -e "\033[0;90m\e[3mTip: \e[4m$tip\033[0m"
|
||||
echo -e "\033[0;90m\e[3mAlias Tip: \e[4m$tip\033[0m"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -11,4 +11,4 @@ preexec_alias-finder() {
|
||||
autoload -U add-zsh-hook
|
||||
|
||||
# Call function after command
|
||||
add-zsh-hook preexec preexec_alias-finder
|
||||
add-zsh-hook preexec preexec_alias-finder
|
||||
|
@ -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
|
||||
alias fl="flutter"
|
||||
|
@ -180,3 +180,4 @@ alias gtfo='exit'
|
||||
|
||||
# Alias for install script
|
||||
alias dotfiles="${DOTFILES_DIR:-$HOME/Documents/config/dotfiles}/install.sh"
|
||||
alias dots="dotfiles"
|
||||
|
@ -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
|
||||
alias g="git"
|
||||
@ -26,7 +30,7 @@ alias gcl="git clone" # Downloads repo from <url>
|
||||
alias gch="git checkout" # Switch the HEAD to <branch>
|
||||
alias gb="git branch" # Create a new <branch> from HEAD
|
||||
alias gd="git diff" # Show all changes to untracked files
|
||||
alias gtree="git log --graph --oneline --decorate" # Show branch tree
|
||||
alias gtree="git log --graph --oneline --decorate --abbrev-commit" # Show branch tree
|
||||
alias gl='git log'
|
||||
|
||||
# Tags
|
||||
|
@ -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
|
||||
alias ys='yarn start'
|
||||
|
Loading…
Reference in New Issue
Block a user