Skip to content

mgaut72/config

Repository files navigation

Config

Dotfiles and Other Configuration

Clone / Init on New Machine

Init Script Gist

curl -Lks https://git.io/mgaut72-config-clone | /bin/sh

Run .cfg.bootstrap.sh to install and instantiate templates

.local files

Have non-generic stuff? don't put it in here. Instead, source/reference a .local file from a file included here. Ex: .zshrc

# other zshrc stuff
# ...
[ -f ~/.zshrc.local ] && source ~/.zshrc.local

Auto-TMUX when SSHing onto a remote desktop

  • My .zshrc is setup such that when I ssh onto a host with that zshrc, it starts up or resumes and existing tmux session:

    config/.zshrc

    Lines 149 to 152 in c974d39

    # when sshing onto this host, auto-start tmux if we have it
    if [ -x "$(command -v tmux)" ] && [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [ "$SSH_CONNECTION" != "" ]; then
    tmux attach-session -t ssh_tmux || tmux new-session -s ssh_tmux
    fi
  • I followed this blog: https://werat.dev/blog/happy-ssh-agent-forwarding/ to ensure that when I ssh and resume a tmux session, my ssh agent gets refreshed
  • I personally use oh-my-tmux, which has some niceties built in, but this is not strictly necessary.

Now when I ssh onto my remote desktop, I resume any previous ssh session. To sign off of my remote desktop for the day, I first DETACH FROM TMUX, then logout of the remote desktop.

Env Config Inspiration

Check means implemented, unchecked is potential stuff to try

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors