aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorDavid Runge <david.runge@frqrec.com>2014-09-27 05:01:56 +0200
committerDavid Runge <david.runge@frqrec.com>2014-09-27 05:01:56 +0200
commit189ae9539bdbd398df6006e196487dfc2aba7131 (patch)
treef0ce55b590960ed718a7d1300c2a63bfd5ffb905 /bin
parentd923be90db7f9dbe976c62aacaa907cc971768dd (diff)
downloaddotfiles-189ae9539bdbd398df6006e196487dfc2aba7131.tar.gz
dotfiles-189ae9539bdbd398df6006e196487dfc2aba7131.tar.bz2
dotfiles-189ae9539bdbd398df6006e196487dfc2aba7131.tar.xz
dotfiles-189ae9539bdbd398df6006e196487dfc2aba7131.zip
Made calling irssi more robust in tmux
Diffstat (limited to 'bin')
-rwxr-xr-xbin/irssi14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/irssi b/bin/irssi
index e041d11..edb0084 100755
--- a/bin/irssi
+++ b/bin/irssi
@@ -1,14 +1,14 @@
-#!/bin/bash
+#!/usr/bin/env zsh
# Script to start irssi within tmux with attached Nicklist in vertical split on right side
if [[ $(hostname) == *frqrec* ]]; then
- tmux splitw -h -p 10
- tmux send-keys "cat ~/.irssi/nicklistfifo" C-m
- tmux selectp -L
- tmux send-keys /usr/bin/irssi C-m
- sleep 1
- tmux send-keys "/NICKLIST FIFO" C-m
tmux renamew irssi
+ tmux splitw -h -p 10
+ tmux send-keys -t irssi.1 "cat ~/.irssi/nicklistfifo" C-m
+ tmux select-pane -t irssi.0
+ (sleep 3 && tmux send-keys -t irssi.0 "/nicklist fifo" C-m)&
+ /usr/bin/irssi
+ wait && tmux kill-pane -t irssi.1 && tmux rename-window $(ps -p $$|grep pts|cut -c16-|cut -d ' ' -f2)
else
/usr/bin/irssi
fi