You are not logged in.

#1 2010-09-15 00:54:12

kismet010
Member
Registered: 2009-09-02
Posts: 137

[solved] urxvt + tmux

Hi,
I'm trying to get notifications with tmux on urxvt when compilations ends in vim, a contact send new mail on mutt or someone say my name in a chat in finch.
I'm on dwm, the tag's color change for the urgent hint when a terminal bell runs if i'm on other tag, with urxvt works fine and with tmux, but only if i left it on another window that's not where the bell "sounds".
So, the question is how can I get a notification (tag's color changed on dwm) for example when a buddy talk to me in finch and I left it focused on tmux and I switch to another tag on dwm.
Thanks.

Last edited by kismet010 (2010-09-15 13:19:49)

Offline

#2 2010-09-15 09:28:55

pyknite
Member
Registered: 2010-03-03
Posts: 166

Re: [solved] urxvt + tmux

Hum... I think that's a job for finch, not for tmux...

Finch must have a notification system with an handler... Like, for example, it call a script when he got a notification and you can put anything you want in this script (like mcabber)

edit: you can read this thread -> http://ubuntuforums.org/showthread.php?t=925298

Last edited by pyknite (2010-09-15 09:35:07)

Offline

#3 2010-09-15 11:42:17

kismet010
Member
Registered: 2009-09-02
Posts: 137

Re: [solved] urxvt + tmux

It's not a finch problem, it's do the job when I configured it to run a terminal bell. I take finch only for example.
Same with vim or a simply 'sleep 3; echo -e "\a"'.. if I left tmux in another windows, it's change the dwm tags color but dunno if i left focused

Offline

#4 2010-09-15 12:41:41

ber_t
Member
From: Berlin, Germany
Registered: 2010-03-10
Posts: 214
Website

Re: [solved] urxvt + tmux

I've once asked the same question in the official tmux irc channel. They said, that one has to change the source to make this happen.

The following PKGBUILD and patch should do the trick; you can also get the source tarball of my pkg dir: http://www2.informatik.hu-berlin.de/~mu … src.tar.gz

# $Id: PKGBUILD 21908 2010-07-18 20:11:48Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer:  TDY <tdy@gmx.com>
# Contributor: Grigorios Bouzakis <grbzks[at]gmail[dot]com>

pkgname=tmux
pkgver=1.3
pkgrel=1
pkgdesc="A terminal multiplexer"
url="http://tmux.sourceforge.net/"
arch=('i686' 'x86_64')
license=('BSD')
depends=('ncurses' 'libevent')
source=(http://downloads.sourceforge.net/tmux/tmux-$pkgver.tar.gz
        LICENSE
        tmux-1.3-bell_curw.diff)
md5sums=('96e60cb206de2db0610b9fb6a64c2251'
         '71601bc37fa44e4395580b321963018e'
         'a9d1913f5c40f44f6b7ff0a6f4dfa085')

build() {
  cd "$srcdir/tmux-$pkgver"

    patch -u -p1 -i "$srcdir/tmux-1.3-bell_curw.diff"

  ./configure
  make || return 1

  install -Dm755 tmux "$pkgdir/usr/bin/tmux" && \
  install -Dm644 tmux.1 "$pkgdir/usr/share/man/man1/tmux.1" && \
  install -Dm644 examples/tmux.vim "$pkgdir/usr/share/vim/vimfiles/syntax/tmux.vim" && \
  install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/tmux/LICENSE" && \
  install -dm755 "$pkgdir/usr/share/tmux/" && \
  install -m644 examples/* "$pkgdir/usr/share/tmux/"
}
--- tmux-1.3-orig/server-window.c    2010-06-23 01:26:18.000000000 +0200
+++ tmux-1.3/server-window.c    2010-08-06 17:23:31.000000000 +0200
@@ -109,10 +109,8 @@
 
     if (!(w->flags & WINDOW_BELL) || wl->flags & WINLINK_BELL)
         return (0);
-    if (s->curw == wl)
-        return (0);
-
-    wl->flags |= WINLINK_BELL;
+    if (s->curw != wl)
+        wl->flags |= WINLINK_BELL;
 
     action = options_get_number(&s->options, "bell-action");
     switch (action) {

Offline

#5 2010-09-15 13:15:58

kismet010
Member
Registered: 2009-09-02
Posts: 137

Re: [solved] urxvt + tmux

WOW!! That's work nicely
Thank you very much

Offline

Board footer

Powered by FluxBB