dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 10251e289acea88fc6777b12bae6c3a2bc44e663
parent fc9fec6c8ae797bac80fd6b14a86851b6aadfb39
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Tue, 26 Jun 2018 13:19:13 -0400

Start ssh-key daemon with tmux-utility

Diffstat:
Mlinks/.profile | 38+++++++++++++++++++-------------------
Mlinks/.tmux.conf | 4+---
Mlinks/bin/tmux-utility.sh | 6++++++
3 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/links/.profile b/links/.profile @@ -6,25 +6,25 @@ export LANG=en_US.UTF-8 [ -f ~/.secret_env_vars ] && . ~/.secret_env_vars # Start ssh-agent if not already running -SSH_ENV="$HOME/.ssh/environment" -start_agent() { - echo "Initialising new SSH agent..." - /usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}" - echo succeeded - chmod 600 "${SSH_ENV}" - . "${SSH_ENV}" > /dev/null - /usr/bin/ssh-add; -} - -# Source SSH settings, if applicable -if [ -f "${SSH_ENV}" ]; then - . "${SSH_ENV}" > /dev/null - ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || { - start_agent; - } -else - start_agent; -fi +# SSH_ENV="$HOME/.ssh/environment" +# start_agent() { +# echo "Initialising new SSH agent..." +# /usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}" +# echo succeeded +# chmod 600 "${SSH_ENV}" +# . "${SSH_ENV}" > /dev/null +# /usr/bin/ssh-add; +# } + +# # Source SSH settings, if applicable +# if [ -f "${SSH_ENV}" ]; then +# . "${SSH_ENV}" > /dev/null +# ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || { +# start_agent; +# } +# else +# start_agent; +# fi #### PATH AND MACHINE SPECIFIC CONFIGS diff --git a/links/.tmux.conf b/links/.tmux.conf @@ -171,9 +171,7 @@ bind o split-window -p 25 '$SHELL -c "offlineimap -qf INBOX"' \; select-pane -l bind O split-window -p 25 '$SHELL -c "offlineimap"' \; select-pane -l # Use nested bindings (<C-a>l) for grouping process launch bindings -bind -n C-M-m new-window -n mutt "mutt" -bind -n C-M-v new-window -n vim "vim" -bind -n C-M-r new-window -n rss "feednix" +bind -n C-M-v new-window -n vim "/usr/local/bin/vim" bind -n C-M-w new-window -n weather \ "curl 'wttr.in/?m'; echo -e '\nPress <enter> to quit'; read -n 1 -s" #bind C-M-s split-window -l 2 \; send-keys "susan " diff --git a/links/bin/tmux-utility.sh b/links/bin/tmux-utility.sh @@ -4,7 +4,13 @@ echo "starting $SESSION tmux session" if ! tmux has-session -t $SESSION then + # Start services mpd ~/.mpd/mpd.conf + if [ "$(uname)" = "Darwin" ]; then + ssh-add -K + else + ssh-add + fi # Create new session, name it, name the window, detach tmux new-session -s $SESSION -n misc -d