Skip to content

ahgraber/sysconfig

Repository files navigation

System Configuration

This repo is designed to quickly implement an intelligent standard zsh configuration. In its default settings, it relies on zsh4humans.

Alternatively, alter the install script to use zshrc and zshenv which relies on zcomet for more granular control of your zsh environment. As these are not daily-driven, they are likely rough around the edges. For further reference, see minimal zcomet config

Rosetta emulation inherent in the z4hrc assumes/requires direnv is installed in both native and emulated environments! ref

Quickstart

The install script (below) will autoinstall the default configuration:

  • clone this repo to ~/_sysconfig (or configured location)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ahgraber/sysconfig/HEAD/bootstrap/install.sh)"

Next steps

Use task to complete setup:

  • brew
  • pipx
  • nix
  • mac setup/configuration

Manual Configuration

Set up git files

  1. Set up your .gitconfig. Refer to gitconfig

    git config --global user.name "Your Name"
    git config --global user.email "youremail@yourdomain.com"
    # https://leosiddle.com/posts/2020/07/git-config-pull-rebase-autostash/
    git config --global pull.rebase true
    git config --global rebase.autoStash true
    # git config --global credential.helper osxkeychain

Git configuration (~/.gitconfig and ~/.gitattributes_global) are copies (not symlinks) so they will not be synced if you update the git repository

Modifying your setup

  • .zshrc relies on zcomet for plugin management
  • Other options are set in lib/*.zsh files

References

Hints & Tips

aliases

Review ~/.aliases for an understanding of available functionality and remapping (batcat; exals)

~/.aliases is synced to the git repo. For local configuration, use ~/.aliases.local

keybinds

icon keybind description
^ + c ctrl + c break/exit
tab show available completions
➡➡ tab + tab enter completion menu
⌥ + ← opt + left move the cursor one word left (including in completions)
⌥ + → opt + right move the cursor one word right (including in completions)
^ + w ctrl + w cut/delete prior word
^ + u ctrl + u cut/delete entire line
^ + y ctrl + y paste
^ + _ ctrl + - undo

hint: run bindkey to see defaults

References

direnv

direnv allows un/loading a unique set of environmental variables depending on the current directory.

  1. Navigate to working directory where .envrc exists that you would like to load

  2. To allow access (both read and modify) to .envrc, run

    direnv allow .

"Specifying whitelist directives marks specific directory hierarchies or specific directories as "trusted" – direnv will evaluate any matching .envrc files regardless of whether they have been specifically allowed. This feature should be used with great care, as anyone with the ability to write files to that directory (including collaborators on VCS repositories) will be able to execute arbitrary code on your computer."

cat <<EOF > $HOME/.config/direnv/direnv.toml
[whitelist]
prefix = [ "$HOME/GitHub" ]) # whitelist `GitHub` dir
EOF

task

task is a task runner / build tool that provides a simple command line interface to logical tasks, defined as bash commands in taskfile.yaml.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published