You are not logged in.
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
Do you plan to submit it to AUR?
Offline
I'll do it tonight.
Offline
Now available in AUR as twmn.
Offline
[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
AUR updated. boost and asio was missing from the dependencies.
It should compile now.
Offline
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
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.
Offline
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
@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
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
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
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
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.
Offline
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
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
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.
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
@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
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.
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
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
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
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
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.
Offline
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
Offline