You are not logged in.

#1 2011-08-16 20:11:08

boli
Member
Registered: 2011-08-16
Posts: 19

[twmn] Notification system for tiling window managers.

Hi,

twmn is a young KISS notification system designed to work with tiling wms in the sense that it does not create a popup like notification daemon for example, but it create a slide which just cover the bar you usually have on a tiling window manager.

Here is the git repository : https://github.com/sboli/Twmn
Don't hesitate to try/fork/submit improvements.

Here is a little video to show you what it does :
http://www.youtube.com/watch?v=Rmc_HecsfoA

Last edited by boli (2011-08-24 20:11:03)

Offline

#2 2011-08-16 20:30:25

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [twmn] Notification system for tiling window managers.

Do you plan to submit it to AUR?

Offline

#3 2011-08-16 20:33:01

boli
Member
Registered: 2011-08-16
Posts: 19

Re: [twmn] Notification system for tiling window managers.

I'll do it tonight.

Offline

#4 2011-08-16 21:53:39

boli
Member
Registered: 2011-08-16
Posts: 19

Re: [twmn] Notification system for tiling window managers.

Now available in AUR as twmn.

Offline

#5 2011-08-16 22:21:44

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [twmn] Notification system for tiling window managers.

[karol@white 111]$ tar xfz twmn.tar.gz
[karol@white 111]$ ls
twmn  twmn.tar.gz
[karol@white 111]$ cd twmn
[karol@white twmn]$ ls
PKGBUILD
[karol@white twmn]$ makepkg -si
==> Determining latest git revision...
  -> Version found: 20110817
==> Making package: twmn 20110817-1 (śro, 17 sie 2011, 00:17:45 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving Sources...
==> Extracting Sources...
==> Entering fakeroot environment...
==> Starting build()...
==> Downloading source code from git repository...
Cloning into Twmn...
remote: Counting objects: 30, done.
remote: Compressing objects: 100% (25/25), done.
remote: Total 30 (delta 5), reused 28 (delta 3)
Receiving objects: 100% (30/30), 8.60 KiB, done.
Resolving deltas: 100% (5/5), done.
==> Source code successfully downloaded.
cd twmnd/ && /usr/bin/qmake /home/karol/111/twmn/src/Twmn/twmnd/twmnd.pro -o Makefile
cd twmnd/ && make -f Makefile 
make[1]: Entering directory `/home/karol/111/twmn/src/Twmn/twmnd'
g++ -c -pipe -march=i686 -mtune=generic -O2 -pipe -fno-strict-aliasing -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include -I. -o main.o main.cpp
g++ -c -pipe -march=i686 -mtune=generic -O2 -pipe -fno-strict-aliasing -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include -I. -o widget.o widget.cpp
g++ -c -pipe -march=i686 -mtune=generic -O2 -pipe -fno-strict-aliasing -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include -I. -o settings.o settings.cpp
/usr/bin/moc -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include -I. widget.h -o moc_widget.cpp
g++ -c -pipe -march=i686 -mtune=generic -O2 -pipe -fno-strict-aliasing -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include -I. -o moc_widget.o moc_widget.cpp
g++ -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-O1 -o ../bin/twmnd main.o widget.o settings.o moc_widget.o    -L/usr/lib -lQtGui -lQtNetwork -lQtCore -lpthread 
make[1]: Leaving directory `/home/karol/111/twmn/src/Twmn/twmnd'
cd twmnc/ && /usr/bin/qmake /home/karol/111/twmn/src/Twmn/twmnc/twmnc.pro -o Makefile
cd twmnc/ && make -f Makefile 
make[1]: Entering directory `/home/karol/111/twmn/src/Twmn/twmnc'
g++ -c -pipe -march=i686 -mtune=generic -O2 -pipe -fno-strict-aliasing  -I/usr/share/qt/mkspecs/linux-g++ -I. -I. -o main.o main.cpp
main.cpp:3:37: fatal error: boost/program_options.hpp: No such file or directory
compilation terminated.
make[1]: *** [main.o] Error 1
make[1]: Leaving directory `/home/karol/111/twmn/src/Twmn/twmnc'
make: *** [sub-twmnc-make_default] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
[karol@white twmn]$ 

What did I do wrong?

Last edited by karol (2011-08-16 22:22:34)

Offline

#6 2011-08-16 22:28:30

boli
Member
Registered: 2011-08-16
Posts: 19

Re: [twmn] Notification system for tiling window managers.

AUR updated. boost and asio was missing from the dependencies.
It should compile now.

Offline

#7 2011-08-16 22:45:03

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [twmn] Notification system for tiling window managers.

Work fine now, thanks.

I'd prefer to have duration, position and size (height) setup in one place and not scrambled around in the config, same for icons:

    [General]
    duration=3000
    position=top_right
    height=18
    port=9797
    info_icon=
    warning_icon=
    critical_icon=
    sound_command=

Offline

#8 2011-08-16 22:58:00

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [twmn] Notification system for tiling window managers.

Thanks boli: this looks great. One thing that would be helpful is the ability to specify the colours (bg and fg) and font of the notifications.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2011-08-16 23:01:42

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [twmn] Notification system for tiling window managers.

Is there a way to pick fontsize etc? I can pick a height 50 notification slide, but the font doesn't auto-scale to fill it.
I think the baseline is slightly misaligned: title is placed a bit lower than the content.

Offline

#10 2011-08-16 23:03:05

boli
Member
Registered: 2011-08-16
Posts: 19

Re: [twmn] Notification system for tiling window managers.

@jasonwryan : I'm on it.
@karol : 3 configuration sections :
- [main] : For things like duration, port
- [gui] : For things like background_color, foreground_color, height ...
- [icons] : For ... icons, because you can add as many icon as you want, and just choose it with the -i option from twmnc.

Offline

#11 2011-08-17 00:18:08

examon
Member
Registered: 2011-05-07
Posts: 208

Re: [twmn] Notification system for tiling window managers.

very nice program boli! I've been using 'stock' notifications in my Awesome WM but this looks better, it's very well built for WM like Awesome and I just like it... the bad thing is that I'll need to rewrite all my scripts using 'notify-send' :-)

It would be great to be able to set up options like 'duration', 'icon', 'bg, fg' for each specific notification.


I'll test it more tomorrow... thx for sharing!

Last edited by examon (2011-08-17 00:23:03)

Offline

#12 2011-08-17 00:37:02

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [twmn] Notification system for tiling window managers.

examon wrote:

It would be great to be able to set up options like 'duration', 'icon', 'bg, fg' for each specific notification.

+1
I'm not an icons guy, so I'd like to set bg colors and duration instead - maybe using multiple .conf files?

Offline

#13 2011-08-17 00:53:35

boli
Member
Registered: 2011-08-16
Posts: 19

Re: [twmn] Notification system for tiling window managers.

You can now pick a font, font-size, background and foreground color.
I'll also add the possibility to choose these settings with the client.
Tomorrow i'll add a "layout mode". This means that you create a specific configuration file for each layout (urgent.conf, mpd.conf). This file contains colors, icon, font, sound, etc ... and when you use twmnc you just tell the profile name and you are good to go. Otherwise the general settings which are in the main configuration file, will be used.

Offline

#14 2011-08-17 04:29:44

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: [twmn] Notification system for tiling window managers.

Hey, this is a sweet idea.  Nice job, boli, and thanks.  Is this the sort of notification that takes app messages over dbus?  Or, if it's all manual, any chance of eventually creating a couple example scripts, just to give us noobish types some ideas? I've only been using a tiling WM for a few months, and still need to build my hacking skills. wink

Offline

#15 2011-08-17 11:06:48

examon
Member
Registered: 2011-05-07
Posts: 208

Re: [twmn] Notification system for tiling window managers.

boli wrote:

You can now pick a font, font-size, background and foreground color.
I'll also add the possibility to choose these settings with the client.
Tomorrow i'll add a "layout mode". This means that you create a specific configuration file for each layout (urgent.conf, mpd.conf). This file contains colors, icon, font, sound, etc ... and when you use twmnc you just tell the profile name and you are good to go. Otherwise the general settings which are in the main configuration file, will be used.

new options are working good

also is there any option how to set up where notification will pop-up? I mean on which screen (I'm using dual screen and twmnc is showing only on my #2 monitor). It would be very good to be able to set up screen.

Offline

#16 2011-08-17 11:35:31

X-dark
Member
From: France
Registered: 2009-10-25
Posts: 142
Website

Re: [twmn] Notification system for tiling window managers.

Great idea. As notification-daemon is currently not usable (cf FS#23720) I really need something to use instead.

You may change the default foreground value to something which is readable with the default background value.


Cedric Girard

Offline

#17 2011-08-17 15:08:31

laite
Member
Registered: 2011-06-05
Posts: 33

Re: [twmn] Notification system for tiling window managers.

ANOKNUSA wrote:

Hey, this is a sweet idea.  Nice job, boli, and thanks.  Is this the sort of notification that takes app messages over dbus?  Or, if it's all manual, any chance of eventually creating a couple example scripts, just to give us noobish types some ideas? I've only been using a tiling WM for a few months, and still need to build my hacking skills. wink

I don't know which WM you use, but I made a simple hack for awesome through naughty (just put this in your rc.lua):

naughty.config.notify_callback = function(args)
        awful.util.spawn("twmnc -c '" .. args.text .. "' -t '" .. args.title .. "'")
        return nil
end

If you want also to see original naughty popups replace 'return nil' with 'return args'

EDIT: Of course, you can put more settings here, like "-i warning_icon", or even parse text/title as you like before sending it to twmnc.

Last edited by laite (2011-08-17 15:10:14)

Offline

#18 2011-08-17 15:33:32

boli
Member
Registered: 2011-08-16
Posts: 19

Re: [twmn] Notification system for tiling window managers.

@ANOKNUSA : DBUS is not supported yet. I'll do it.
examon : Something like  "DISPLAY=:0.0 twmnd" can help you choose the display. And the position depends on your desktop resolution.
@X-dark : Done.

Offline

#19 2011-08-17 15:43:51

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: [twmn] Notification system for tiling window managers.

laite wrote:
ANOKNUSA wrote:

Hey, this is a sweet idea.  Nice job, boli, and thanks.  Is this the sort of notification that takes app messages over dbus?  Or, if it's all manual, any chance of eventually creating a couple example scripts, just to give us noobish types some ideas? I've only been using a tiling WM for a few months, and still need to build my hacking skills. wink

I don't know which WM you use, but I made a simple hack for awesome through naughty (just put this in your rc.lua):

naughty.config.notify_callback = function(args)
        awful.util.spawn("twmnc -c '" .. args.text .. "' -t '" .. args.title .. "'")
        return nil
end

If you want also to see original naughty popups replace 'return nil' with 'return args'

EDIT: Of course, you can put more settings here, like "-i warning_icon", or even parse text/title as you like before sending it to twmnc.

I do use Awesome, and it works great, thanks!  Nice, noticeable yet non-intrusive notifications.  And thanks again, boli.  It's interesting how little things sometimes go a long way.

Offline

#20 2011-08-17 15:56:40

X-dark
Member
From: France
Registered: 2009-10-25
Posts: 142
Website

Re: [twmn] Notification system for tiling window managers.

This may not be the easiest/smartest way to make twmnd respond to libnotify event but here is what I've done :
I've installed statnot and use it with this config file:

import subprocess
def update_text(text):
    if (text != '') : subprocess.call(['twmnc', '-c', text])

It seems to work.

Feel free to tell me I'm doing something stupid, I'm not really familiar with how notification are handled on a system level.


Cedric Girard

Offline

#21 2011-08-20 12:20:10

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: [twmn] Notification system for tiling window managers.

You could combine this with cow-notify, and all your libnotify events (notify-send too), would notify using this program.

Offline

#22 2011-08-20 17:34:09

boli
Member
Registered: 2011-08-16
Posts: 19

Re: [twmn] Notification system for tiling window managers.

I sure could use the work done with dbus, this is giving me a headache since yesterday.
So the dbus support will be here very soon i guess.

Offline

#23 2011-08-20 23:35:58

boli
Member
Registered: 2011-08-16
Posts: 19

Re: [twmn] Notification system for tiling window managers.

Ok. Dbus support is implemented, this means you can use `notify-send` like you used to do.  This now makes twmnd a full replacement for stuff like notify-osd.
This brought realtime update to.
Although i still have a lot to work on.

Don't hesitate to give me your ideas, i might implement them.

Offline

#24 2011-08-20 23:50:48

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [twmn] Notification system for tiling window managers.

boli wrote:

Ok. Dbus support is implemented, this means you can use `notify-send` like you used to do.  This now makes twmnd a full replacement for stuff like notify-osd.

Thanks boli: that is very cool.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#25 2011-08-21 08:51:51

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [twmn] Notification system for tiling window managers.

Mmm. Could be just me, but trying to use twmn as a replacement for notify-send gives this error:

process 5112: arguments to dbus_message_iter_open_container() were incorrect, assertion "(type == DBUS_TYPE_STRUCT && contained_signature == NULL) || (type == DBUS_TYPE_DICT_ENTRY && contained_signature == NULL) || (type == DBUS_TYPE_VARIANT && contained_signature != NULL) || (type == DBUS_TYPE_ARRAY && contained_signature != NULL)" failed in file dbus-message.c line 2727.
This is normally a bug in some application using the D-Bus library.
  D-Bus not built with -rdynamic so unable to print a backtrace

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB