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 f9d6f1363114a524042fd52ed1b4612501d4d1de
parent f70535022d92f603fdefe0ae99d2d6522ba668e0
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Mon, 17 Dec 2018 10:21:55 +0100

Add tmux-newsboat.sh

Diffstat:
Alinks/bin/tmux-newsboat.sh | 25+++++++++++++++++++++++++
1 file changed, 25 insertions(+), 0 deletions(-)

diff --git a/links/bin/tmux-newsboat.sh b/links/bin/tmux-newsboat.sh @@ -0,0 +1,25 @@ +##!/bin/bash +SESSION=rss +echo "starting $SESSION tmux session" + +if ! tmux has-session -t "$SESSION" +then + # Start services + eval "$(gpg-agent)" + GPG_TTY=$(tty) + export GPG_TTY + eval "$(ssh-agent)" + # Add ssh key if not already added + if [ "$(uname)" = "Darwin" ]; then + ssh-add -l | grep -q '\.ssh/id_rsa' || ssh-add -K + else + ssh-add -l | grep -q '\.ssh/id_rsa' || ssh-add + fi + + # Create new session, name it, name the window, detach + tmux new-session -s "$SESSION" -d + tmux send-keys -t "$SESSION" "newsboat" C-m + tmux select-pane -t "$SESSION":1.1 + +fi +tmux attach -t "$SESSION"