Coder Social home page Coder Social logo

dotfiles's Introduction

Dotfiles

My dotfiles. Most important is .zshrc. Honorable mention for .tmux.conf.

Local

To ensure the dotfiles are sourced correctly, clone this repo into your home directoy and run the following command:

cd $HOME && ln -s -f dotfiles/dotfiles/.* ./

This will symlink all of the dotfiles into your home directory.

Run find -L $HOME -maxdepth 1 -type l -print to list broken sym links.

ZLE and iTerm

ZLE, the zsh line editor, is very cool, and this post explains how to get the most out of it. If you use zsh it's worth a read.

To define some keyboard input as a shortcut for invoking a ZLE widget, it helps to know what escape sequence is sent by a given keyboard input. To find out, use od -c. od is the BSD octal, decimal, hex, ASCII dump. Run it, and try pressing one of the following key combinations:

  • shift + some_key
  • ctrl + some_key
  • alt + some_key
  • super + some_key

Or:

  • shift + ctrl + arrow_key
  • shift + option + arrow_key
  • fn + arrow_key
  • fn + ctrl + arrow_key
  • fn + option + arrow_key

If one of these combinations doesn't send anything, you can always use iTerm2 to have it send any escape sequence you like. Go to Preferences > Profiles > Keys, choose a key combo, and instruct it to Send Escape Sequence.

Then you can edit your .zshrc file to catch this escape sequence, and have it invoke a widget.

To install

  • zsh
  • ripgrep
  • fzf
  • zoxide
  • tmux
  • broot
  • delta
  • node
  • yarn
  • poetry
  • pyenv
  • nvm

git

First, run cp dotfiles/.gitconfig-template dotfiles/.gitconfig to create .gitconfig, which is ignored, from the template.

Signing commits

Add the following to dotfiles/.gitconfig:

[user]
  email = ...
  name = ...
  signingkey = ...

[commit]
  gpgsign = true

Multiple SSH keys

In ~/.ssh/config:

Host github.com
  HostName github.com
  IdentityFile ~/.ssh/<work_ssh_key>
  IdentitiesOnly yes

# Personal GitHub account
Host github-personal
  HostName github.com
  IdentityFile ~/.ssh/<personal_ssh_key>
  IdentitiesOnly yes

Then run something like git remote set-url origin git@github-personal:kylebebak/dotfiles.git. This configures git to use personal SSH key when interacting with kylebebak/dotfiles.git.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.