Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stow #31

Closed
wants to merge 78 commits into from
Closed

stow #31

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
3a65dcb
removes stats and updates comments
edheltzel Jan 29, 2024
d7f1961
Add zsh configuration files for stow
edheltzel Jan 29, 2024
9158b19
setting fish for stow
edheltzel Jan 29, 2024
2e0cd36
setting up fish for stow
edheltzel Jan 29, 2024
8025212
Remove deprecated nvim setup script
edheltzel Jan 29, 2024
9a16832
adds nvim stow package and copies lazyvim to nvim dir
edheltzel Jan 29, 2024
2cba758
stow controls `dots/dot-*` now
edheltzel Jan 29, 2024
b0ab872
todos for next steps
edheltzel Jan 30, 2024
f739ffb
adds warp to dotfiles
edheltzel Jan 30, 2024
93fbe7c
Update font settings in .gitconfig
edheltzel Jan 30, 2024
2ffaa6f
Add Keychron Q11 ANSI Knob layout configuration to misc/
edheltzel Jan 30, 2024
0e4f450
setup config with stow
edheltzel Jan 30, 2024
d5bd371
add stow ignore to config
edheltzel Jan 30, 2024
6d535dc
moves custom utils into fish/ dir - since these are used with a custo…
edheltzel Jan 30, 2024
04e266a
moved fish into config/ and renamed all dots/ using the . prefix to k…
edheltzel Jan 30, 2024
0447edc
moves nvim into config/
edheltzel Jan 30, 2024
ef03441
removes raycast from config/
edheltzel Jan 30, 2024
336af01
raycast export
edheltzel Jan 30, 2024
af00610
move zsh files to dots/
edheltzel Jan 30, 2024
ee87255
remove bun from packages/setup.sh
edheltzel Jan 30, 2024
f1cadb6
adds stow ignores
edheltzel Jan 30, 2024
acd914b
moved config/vscode to misc/vscode
edheltzel Jan 30, 2024
11ab5ab
removes the config/vscode
edheltzel Jan 30, 2024
80bffca
if I'm not using it then im removing it.
edheltzel Jan 30, 2024
86181cd
making fish a stow package.... again
edheltzel Jan 30, 2024
0f6cfc8
making nvim a stow package again
edheltzel Jan 30, 2024
af89e5f
Add .stow-local-ignore file to ignore setup.sh and .DS_Store
edheltzel Jan 30, 2024
b9d2eed
WIP: adds stow to the install script
edheltzel Jan 30, 2024
5dd67c0
includes a stow global ignore and removes redundant local ignores
edheltzel Jan 30, 2024
cad78f1
adding custom raycast script command
edheltzel Jan 31, 2024
b20236b
comments
edheltzel Jan 31, 2024
02f2584
iterm2 udpate pref
edheltzel Jan 31, 2024
214ce33
local an global ignores for stow
edheltzel Jan 31, 2024
7fe736c
updates makefile support - should include in all projects
edheltzel Jan 31, 2024
fd3c9a0
adds makefile for stowing
edheltzel Jan 31, 2024
4d7baab
moves additional scripts back to package directories
edheltzel Jan 31, 2024
ffd3d78
update duti for vscode insiders
edheltzel Jan 31, 2024
2eb6a0c
press and hold disable options for vscode and insiders
edheltzel Jan 31, 2024
69ef563
custom keys for warp & global dictionary update
edheltzel Jan 31, 2024
64497aa
WIP: bootstrap and install scripts
edheltzel Jan 31, 2024
a866531
WIP readme needs updated
edheltzel Jan 31, 2024
4538f2d
adding bigmac to gitconfig.local.
edheltzel Jan 31, 2024
297ffe6
update echo for make
edheltzel Jan 31, 2024
954430e
update keyboard
edheltzel Jan 31, 2024
0d0906b
fixes eza error when using the -F flag, its no longer needed with eza…
edheltzel Feb 1, 2024
c176545
removes symlink to old dotfiles locations
edheltzel Feb 1, 2024
2f3d257
lazyvim customization - nothing really yet
edheltzel Feb 1, 2024
664a7ad
includes all linked to help
edheltzel Feb 1, 2024
ff91e98
update todos
edheltzel Feb 1, 2024
8680012
Add git-undo function to fish shell
edheltzel Feb 1, 2024
a09eb0c
Update unset function description
edheltzel Feb 1, 2024
64fef92
includes typescript support for lazyvim
edheltzel Feb 1, 2024
5c82a31
adds git-cbr command to checkout branches with changes .
edheltzel Feb 1, 2024
347908f
updates git functions and aliases
edheltzel Feb 1, 2024
63a21e4
adds tldrf to search through all the tldr pages with fzf
edheltzel Feb 1, 2024
7a867a6
readme update: moved todos to readme and started update the readme docs
edheltzel Feb 1, 2024
99fc392
lazyvim keymaps to match vspacecode which key
edheltzel Feb 1, 2024
29dd847
readme update with todos
edheltzel Feb 1, 2024
610c3a4
readme update with todos
edheltzel Feb 2, 2024
d340dec
lazyvim lock
edheltzel Feb 2, 2024
3243cad
warp key bindings
edheltzel Feb 2, 2024
3003ddc
minor changes to fish
edheltzel Feb 2, 2024
838fcaa
like warp but iterm is just better
edheltzel Feb 2, 2024
f54e46a
saves window arrangement
edheltzel Feb 2, 2024
9910258
giving iterm some love and configuring windows and setting up hotkeys
edheltzel Feb 2, 2024
8dced3a
adds vscode setting and keymaps
edheltzel Feb 3, 2024
82163a0
comment
edheltzel Feb 3, 2024
6c9249d
iterm2 settings
edheltzel Feb 3, 2024
e5c9fd3
todo tree update
edheltzel Feb 3, 2024
92e6dda
Update README
edheltzel Feb 3, 2024
187b648
fixed typo
edheltzel Feb 3, 2024
63c3b17
adding vscode to stow packages in makefile
edheltzel Feb 3, 2024
eb98dcb
Update README.md with new customizations and settings
edheltzel Feb 3, 2024
21b7b2b
Add GNU Stow and makefile for managing dotfiles
edheltzel Feb 3, 2024
4cea94b
stow ignore update
edheltzel Feb 3, 2024
48821a4
updating readme
edheltzel Feb 3, 2024
8deca20
lazyvim update and iterm2 settings
edheltzel Feb 3, 2024
06bf8b0
Update Brewfile with new dependencies
edheltzel Feb 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
readme update: moved todos to readme and started update the readme docs
  • Loading branch information
edheltzel committed Feb 1, 2024
commit 7a867a6080d7037671d7c30d8c56b78630576943
241 changes: 45 additions & 196 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,18 @@
<img src="_images/dotfiles-logo.png" alt="dotfiles logo" width="350">

### [Ed Heltzel's](https://github.com/edheltzel) personal configuration for MacOS and Fish shell.

My playground revolves around DevOps and Full stack web development.

## 🧰 Terminal toolkit with replacements for [Unix commands](https://en.wikipedia.org/wiki/List_of_Unix_commands)

I find tools that are built with Rust or Go to be performant and cover 90% of my use cases.

- [bat](https://github.com/sharkdp/bat) Rust replacement for `cat`
- [bottom](https://clementtsang.github.io/bottom/0.8.0/) Rust replacement for `top`
- [Bun](https://bun.sh/) - A drop-in-replacement for NPM/PNPM/Yarn - written in Zig
- [eza](https://github.com/eza-community/eza) Rust replacement for `ls`
- ~~[exa](https://the.exa.website/) Rust replacement for `ls`~~ - replaced with `eza`
- [exa site](https://the.exa.website/) is still valid for **EZA** configurations
- [fd](https://github.com/sharkdp/fd) Rust replacement for `find`
- [fzf](https://github.com/junegunn/fzf) a mostly Go fuzzy finder
- [procs](https://github.com/dalance/procs) Rust replacement for `ps`
- [ripgrep](https://github.com/BurntSushi/ripgrep) Rust replacement for `grep`
- [sd](https://github.com/chmln/sd) Rust replacement for `sed`
- [starship](https://starship.rs/) Rust prompt
- [tealdeer](https://github.com/dbrgn/tealdeer) Rust replacement for `man`
- [topgrade](https://github.com/topgrade-rs/topgrade) Rust replacement for package manager updates
- [zoxide](https://github.com/ajeetdsouza/zoxide) Rust companion for `cd` and replacement for z and auto jump
- [zoxide fish](https://github.com/kidonng/zoxide.fish) - Fish plugin for zoxide
### [Ed Heltzel's](https://github.com/edheltzel) personal configuration (.dotfiles) for MacOS using Fish shell.

This is my personal configuration (.dotfiles) for macOS that involves web development and devops which are deployed using [GNU Stow](https://www.gnu.org/software/stow/). There are also files for provisioning a new machine and setting up my environment.


## So what's next?

Zach Holman wrote a great article on [dotfiles](https://zachholman.com/2010/08/dotfiles-are-meant-to-be-forked/) and how they are meant to be forked. I agree with this to a point... I'm more of a fan of the idea that you should take what you like and leave the rest, since dotfiles are highly personalized, and built over time so what works for me probably wont't work for you, but take inspiration all you want and make it your own. Again, this is **my personal setup** so use at your own risk if you choose to use it.

## ⚙️ Usage and the Install

**Caveats**
<details>
<summary><strong>Caveats for non-Apple Silicon (Intel)</strong></summary>
If you are on any version of macOS that uses AFPS, you'll need to disable the SIP.
First check to see if SIP is enabled or not.

Expand All @@ -51,16 +36,17 @@ If your SIP is enabled, then follow the next steps to disable it – Assuming th
6. Enter reboot.
7. `csrutil status` -> should read `System Integrity Protection status: disabled.`

</details>



### SSH Keys
I use [ssh keys](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/) to authenticate with GitHub and other services. You generally want to create new keys for each device you use, but you can also use the same key on multiple devices. **I have started using two different keys for my multi-machine work flow.** One key is for my personal devices and the other is for my work devices. This allows me to easily revoke access to my work devices if I discontinue a relationship with a company or customer, and not have to worry about my personal keys being compromised or having to change them.

If you look at the `.gitconfig` you'll see the use of two different keys.

1. Restore your safely backed up ssh keys to `~/.ssh/`
If you look at the `.gitconfig` you'll see the use of an include `path = ~/.gitconfig.local` this file is created during the provisioning process and is populated with the correct configuration based on the hostname.

- I personally use Dropbox to keep these keys and configuration in sync with my devices, it's not ideal but works for me:
- `touch ~/Dropbox/.ssh-config && ln -s ~/Dropbox/.ssh-config ~/.ssh/config`
- Again you can alternatively, [generate new ssh keys](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/), and add these to your GitHub account.
1. [Generate a new ssh keys](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/) and add to your GitHub account. - _Optional_
- If you want to restore your key I'd do that before moving on.

2. Clone this repository

Expand All @@ -77,176 +63,31 @@ curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
fisher
```

## 🏗️ Customization

I would encourage you to play around with the configurations so you can add or remove features.
If you would like to use these dotfiles for yourself, I'd recommend changing following:
- #### Git

- The `.gitconfig` file includes my `[user]` config, replace these with your own user name and email as well as the `[include]` path for your local gitconfig.
- Almost all of git aliases are located in `.gitconfig` versus `_aliases.fish` or `fish/functions/setup.fish` - I've found this to work best for me.
- Also check the `.gitignore_global` for anything you might want to add or remove.
- I would also change the name of the local gitconfig file to match your setup.
- `gitconfig-bigmac.local` and `gitconfig-macdaddy.local` are my two local gitconfig files.

- #### OSX

- At the top of the setup.sh file, my computer name is set as `MacDaddy` - might want to change it.

- #### Packages

This folder is a collection of the programs and utilities I use. The lists can easily be amended for your workflow.

- `Brewfile`
- `python_packages.txt`
- `ruby_packages.txt`
- `rust_packages.txt`
- `pnpm_packages.txt`

> If you would rather run each text file individually, you can run the following command as an example:

> Fish 👉 `pnpm add --global (cat pnpm_packages.txt)`<br>
> Bash 👉 `pnpm add --global $(cat pnpm_packages.txt)`

- #### Repos

This folder is a collection of repos I like to sync between my machines. The lists can easily be amended for your workflow. Just add the repo name to the `txt` file and it will be cloned. To customize, just update the name of the `oss.txt` file to match the name of the directory you want these repos to be cloned to.

- `oss.txt` - My personal OSS projects that I like to keep in sync

## 📝 Contents

### Root (/)

- bootstrap.sh - Calls all setup.sh scripts and executes.

### Config (config/)

setup.sh - Symlinks all `.files` to their corresponding location in `~/.config/`

- bat/
- iterm/
- raycast/
- utils/
- vscode/
- .ackrc
- .gemrc
- .gitnow
- .hushlogin
- .nirc
- .npmrc
- .profile
- .tigrc
- .tmux.conf
- .vsce
- .wgetrc
- .zhsenv
- .zshrc
<details>
<summary>text settings iTerm</summary>
<img src="_images/iterm2_dankmono_font_settings.png" alt="iterm text settings">
</details>


### Duti (duti/)

- setup.sh - Sets the default app for the different file extensions.
- `app.package.id` - Contains all extensions for the specified program _(run `tldr duti` OR `man duti` to learn more)_

### Fish (fish/)

- setup.sh - Symlinks all fish files to their corresponding location in `~/.config/fish/`
- config.fish - Global fish configuration _(.fishrc)_
- `fish_plugins` - list of [Fisher](https://github.com/jorgebucaran/fisher) plugins to install
- `completions/`
- alacritty.fish - Contains all completions for the `alacritty` command
- tmuxinator.fish - Contains all completions for the `mux` command
- `conf.d/`
- abbr.fish - Contains all abbreviations
- colors.fish - Contains all color definitions
- exports.fish - Contains all exports
- fnm.fish - Contains all fnm completions
- paths.fish - Contains all paths
- tmux.fish - Contains all tmux completions
- variables.fish - Contains all variables ie: `$EDITOR`

- `functions/`
- _aliases.fish - Contains all aliases
- _utils.fish - Contains special scripts
- abbrex.fish - Utility for expanding abbreviations in fish-scripts
- btm.fish - Runs [btm]
- cd.fish - Changes directory and lists contents
- cp.fish - Copies files and directories
- cpwd.fish - Copies the current working directory to the clipboard
- fish_greeting.fish - My personal fish greeting using the full-color fish logo
- git-undo.fish - Undo a the last commit message and reset the HEAD
- imgcon.fish - Converts images to different formats
- mkbak.fish - Creates a backup of a file
- mkd.fish - Creates a directory and changes into it
- pubkey.fish - Copies the public key to the clipboard
- reload.fish - Reloads fish
- restore.fish - Restores a file from a backup
- ~~setup.fish - reloads and sets fish abbreviations~~ - **DEPRECATED** - use `abbr -a` inside of `conf.d/abbr.fish` instead
- upp.fish - **macOS ONLY** checks current global node version and runs `topgrade` command
- weather.fish - using wttr.in to check the local weather
- wget.fish - alias for `wget -c`
- speed.fish - **macOS ONLY** leverages the built-in `networkQuality` cli tool - just a glorified alias but works with all the flag options

<details>
<summary><code>speed summary</code></summary>
<pre>
> speed
==== SUMMARY ====
Uplink capacity: 232.603 Mbps (Accuracy: High)
Downlink capacity: 887.549 Mbps (Accuracy: High)
Responsiveness: Medium (570 RPM) (Accuracy: High)
Idle Latency: 32.708 milliseconds (Accuracy: High)
Interface: en0
Uplink bytes transferred: 363.870 MB
Downlink bytes transferred: 1.987 GB
Uplink Flow count: 20
Downlink Flow count: 16
Start: 8/27/23, 5:32:12 PM
End: 8/27/23, 5:32:32 PM
OS Version: Version 13.5.1 (Build 22G90)
</pre>
</details>

#### Update All The Things

- using [Topgrade by r-darwish](https://github.com/r-darwish/topgrade) -- see `prompt > topgrade.tmol` for config options.
- a fish function exist `upp` to check current global node version and to run the `topgrade` command

### Git (git/)

- setup.sh - Symlinks all git files to `~/`
- .gitignore_global - Contains global gitignores, such as OS-specific files and
several compiled files
- .gitconfig - Sets several global Git variables - also include GPG signing

#### Commit and Tag Signing

##### SSH Commit Signing

> This is the my preferred way setup for Git Commit/Tag Signing. Using your SSH key "simplifies signing Git commits and tags" on both Github and Gitlab. This is a great way to secure your commits and verify that you are the one making the commits, without all the setup and maintaining hassle GPG can come with. IDK why but sometimes it just stops working ¯\_(ツ)_/¯
I use SSH commit signing over GPG. GPG is there if I need it, but I prefer SSH. For a few resources to help get this setup:

- [Git Merge Workshop - Simplify Signing with SSH](https://github.com/git-merge-workshops/simplify-signing-with-ssh/tree/main)
- [Gitlab SSH Commit Signing Doc](https://docs.gitlab.com/ee/user/project/repository/ssh_signed_commits/)

The `.gitconfig` includes a line that adds support for an additional gitconfig file `.gitconfig.local` - my personal setup uses two different Macs and this is how I achieve commit signing with each machine.
```shell
[meta]
isLocalConfig = true
[user]
signingkey = PATH_TO_YOUR_KEY
[gpg "ssh"]
allowedSignersFile = PATH_TO_YOUR_ALLOWED_SIGNERS_FILE
```
- **PLEASE REVIEW** `./git/setup.sh`, this script checks what the computer name is and sets the `.gitconfig.local`, you'll want to update this to your computer name.
The `.gitconfig` includes `.gitconfig.local`

```shell
[meta]
isLocalConfig = true
[user]
signingkey = PATH_TO_YOUR_KEY
[gpg "ssh"]
allowedSignersFile = PATH_TO_YOUR_ALLOWED_SIGNERS_FILE
```
If you choose to use this make sure you look at that `./git/git.sh`, this script is where the provisioning of `.gitconfig.local` happens.

##### GPG Commit Signing
<details>
<summary>GPG Commit Signing - <em>optional</em></summary>

_(optional)_: GPG signing is set to `TRUE` by default 👉 If you **DO NOT** want to enable GPG run `git config --global commit.gpgsign false` and remove the GPG packages from the [Brewfile](https://github.com/edheltzel/dotfiles/blob/master/packages/Brewfile).
GPG signing is set to `TRUE` by default. If you rather not enable GPG then execute: `git config --global commit.gpgsign false` and remove the GPG packages from the [Brewfile](https://github.com/edheltzel/dotfiles/blob/master/packages/Brewfile).

[renew expired gpg](https://gist.github.com/krisleech/760213ed287ea9da85521c7c9aac1df0)

Expand All @@ -258,16 +99,14 @@ The `.gitconfig` includes a line that adds support for an additional gitconfig f
- Copy key
- set key for your git user
- `git config --global user.signingkey <your key>`

git config --global user.signingkey <your key>

- <img alt="look ma' verified" src="https://rdmcrew.d.pr/f11jZt+" width="500"/>
- If you need help setting this up GPG:
- follow the Github article for [Signing Commits](https://help.github.com/en/articles/signing-commits) to set up you GPG key(s).
- I found this [GIST helpful](https://gist.github.com/cezaraugusto/2c91d141ddec026753051ffcace3f1f2)
- To get VSCode setup follow this [article](https://dev.to/devmount/signed-git-commits-in-vs-code-36do)
- **Please Note** if you used the [Brewfile](https://github.com/edheltzel/dotfiles/blob/master/packages/Brewfile), Cask installed the macOS [GPG Suite](https://gpgtools.org/) via `cask 'gpg-suite-no-mail'` -- _(alternatively)_ update the [Brewfile](https://github.com/edheltzel/dotfiles/blob/master/packages/Brewfile) with `cask 'gpg-suite' to include GPGMail.

</details>

### macOS Preferences (macos/)

- setup.sh - Executes a long list of commands pertaining to macOS Preferences
Expand Down Expand Up @@ -339,9 +178,19 @@ fnm env --use-on-cd | source

Gotta thanks to [kalis.me blog post](https://kalis.me/dotfiles-automating-macos-system-configuration/) for the simple setup, and inspiration.

===

-[ ] create a single line install script to execute bootstrap.sh
-[ ] update install.sh to include duti, packages, repos, and set local git config
-[ ] use makefile to execute bootstrap.sh and install.sh
-[ ] update README
-[ ] include Stow info in README manage using makefile
-[ ] include Make info in README
-[ ] include New bootstrap process
-[ ] include New install process (makefile)
-[ ] add customizations to lazyvim
-[ ] add vscode settings and symlink to dotfiles - stow does support absolute paths :(

===

## Makefile

Expand Down
14 changes: 0 additions & 14 deletions bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/bin/bash
#TODO: create a single line install script to execute bootstrap.sh
#TODO: update install.sh to include duti, packages, repos, and set local git config
#TODO: use makefile to excute bootstrap.sh and install.sh
#TODO: update README
###### TODO: include Stow info in README manage using makefile
###### TODO: include Make info in README
###### TODO: include New boothstrap process
###### TODO: include New install process (makefile)
#TODO: add customizations to lazyvim
#TODO: add vscode settings and symlink to dotfiles - stow does support absolute paths :(





# Define variables
DOTFILES_REPO="https://github.com/edheltzel/dotfiles.git"
Expand Down
1 change: 1 addition & 0 deletions misc/vscode/global-dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ ITCSS
iterm
jampack
Jamstack
lazyvim
lightningcss
linkify
lockb
Expand Down