SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2011-10-23 16:37:51

xeNULL
#! Pirate
From: The Internet
Registered: 2011-01-23
Posts: 811

twmn

TWMN - Tiling Window Manager Notification

Found here: https://bbs.archlinux.org/viewtopic.php?id=124647

I put it here as it is to do with tiling wm's. Not sure if any of you guys use this but it looks awesome.

Last edited by xeNULL (2011-10-23 16:51:32)


AKA xii on #crunchbang #!WMFS2
dotshare | dA | 1 1 0 1 0 1 0 0 0

Offline

Be excellent to each other!

#2 2011-10-23 18:10:37

xeNULL
#! Pirate
From: The Internet
Registered: 2011-01-23
Posts: 811

Re: twmn

I am installing it now. Here is the install instrunctions:

Installation
------------

For [Arch Linux](http://www.archlinux.org/) users, `twmn` is [on the AUR](https://aur.archlinux.org/packages.php?ID=51596).

Otherwise you can install `twmnd` and `twmnc` manually:

1. install `boost`, `qt` and `dbus` if they weren't before
2. `git clone https://github.com/sboli/twmn.git` to get `twmn`
3. `cd twmn/`
4. `qmake` to generate a Makefile
5. `make` to compile
6. `sudo make install` to install `twmnd` and `twmnc` in `/usr/local/bin`. Make sure this folder is in your `$PATH` environment variable. (`export PATH=$PATH:/usr/local/bin`)
7. for `twmnd` to be always running, add it to your `.xinitrc`, `rc.conf` or else

The `storage_notifier` example requires `dbus-python` to be installed. The `mpd_notifier` example requires `python-mpd` to be installed and running.

So far I have needed:
libboost-dev
libqt4-dev
libdbus-1-dev

though I am getting this output:

cd twmnd/ && make -f Makefile 
make[1]: Entering directory `/home/xenull/downloads/sboli-twmn-15d9458/twmnd'
make[1]: Nothing to be done for `first'.
make[1]: Leaving directory `/home/xenull/downloads/sboli-twmn-15d9458/twmnd'
cd twmnc/ && make -f Makefile 
make[1]: Entering directory `/home/xenull/downloads/sboli-twmn-15d9458/twmnc'
g++ -Wl,-O1 -o ../bin/twmnc main.o     -lboost_program_options -lboost_system -lpthread 
make[1]: Leaving directory `/home/xenull/downloads/sboli-twmn-15d9458/twmnc'

Any ideas?

EDIT: I need libboost-all-dev and it is now installed =]

Last edited by xeNULL (2011-10-23 18:23:46)


AKA xii on #crunchbang #!WMFS2
dotshare | dA | 1 1 0 1 0 1 0 0 0

Offline

#3 2011-10-24 03:18:52

xeNULL
#! Pirate
From: The Internet
Registered: 2011-01-23
Posts: 811

Re: twmn

Found a website to do with twmn here http://blog.yjl.im/2011/09/notification … n-new.html would any of this work? because I would love to be able to pipe system notifications to it.

EDIT: I appear to be answering my own question lol but its a good little archive for anyone stumbing in future. Now when I run cb-fortune or xfce4-power-manager for example it runs along my scrotwm bar it even shows statlers face =]

Last edited by xeNULL (2011-10-24 03:56:55)


AKA xii on #crunchbang #!WMFS2
dotshare | dA | 1 1 0 1 0 1 0 0 0

Offline

#4 2011-10-24 11:42:49

xeNULL
#! Pirate
From: The Internet
Registered: 2011-01-23
Posts: 811

Re: twmn

Took some preview shots:

20111024123810352x32scr.png

201110241238331023x62sc.png

Last edited by xeNULL (2011-10-24 11:44:16)


AKA xii on #crunchbang #!WMFS2
dotshare | dA | 1 1 0 1 0 1 0 0 0

Offline

#5 2011-10-24 13:05:08

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: twmn

have not used it but it looks very nice (and minimal) indeed. do you need to be using a tiling WM for this to work, or will it work in Openbox as well?
the Arch-link is not working for me btw.

Offline

#6 2011-10-24 17:47:31

xeNULL
#! Pirate
From: The Internet
Registered: 2011-01-23
Posts: 811

Re: twmn

This will work in any WM but looks better in tilers and minimal WM's like openbox so I am sure it will look nice. It is basically an alternative to the typical notifier [lib-notify or notify-send I think] it also has a really nice bounce effect and a simple text config in ~/.config/twmn

I used isitup and it says its down. I am sure it will be up again soon.

I will hopefully manage to use this as an mpd artist - song notifier and an irssi action/mention notifier.

EDIT: have just been on the archlinux freenode channel and they have had a hard disk failure which means the bbs forum and wiki is down.

Last edited by xeNULL (2011-10-24 18:16:52)


AKA xii on #crunchbang #!WMFS2
dotshare | dA | 1 1 0 1 0 1 0 0 0

Offline

#7 2011-10-25 09:05:14

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: twmn

nice, this looks loads nicer than the notify-send-stuff. i never liked those Ubuntu-like overlay-thingies.
so i'll try this out, although probably the first thing i'll kill is the 'nice bounce effect', as i think it is redundant. to each his own!

anyway thanks for posting this i'll check it out.

Offline

#8 2011-10-25 17:55:10

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: twmn

just tried it out, really nice! thanks first of all for bringing this under attention. first thing i did, as i said above, was to change the bounce-transition. the system and possibilities for this is really nice as well. check out the transition-curves you can choose from over here: http://doc.qt.nokia.com/latest/qeasingc … #Type-enum.

something i have not figured out: how to properly restart the daemon. currently using 'killall -SIGUSR1 twmnd; twmnd &' but not sure it is the right way to do this. it is working though, but when i keep the config-file open in Gedit, it will tell me it has been modified and i have to reload it. not sure what is modified by restarting the daemon exactly. as i said, it is working.

Offline

#9 2011-10-25 17:59:06

thevdude
#! Junkie
From: Pittsburgh, PA
Registered: 2011-09-01
Posts: 469

Re: twmn

I'll have to try this out when I get home. big_smile

Offline

#10 2011-10-25 19:15:02

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: twmn

the (current) final post from the arch-forums-thread posted above (direct link: https://bbs.archlinux.org/viewtopic.php … 38#p985938) has some very simple volume_up/volume_down scripts for use with twmn, which i have editted and am currently using. i did the keybindings in openbox rc.xml, and made them call these two scripts:

#!/bin/bash
# twmn > volume up
amixer -c 0 sset Master 2%+ > /dev/null
uparrow=$(echo -e "\xE2\x96\xB2")
twmnc -c "$uparrow `amixer -c 0 get Master | grep -oe '[[:digit:]]*%'`" -t 'Vol. ' --sc "" --id 99
#!/bin/bash
# twmn > volume down
amixer -c 0 sset Master 2%- > /dev/null
downarrow=$(echo -e "\xE2\x96\xBC")
twmnc -c "$downarrow `amixer -c 0 get Master | grep -oe '[[:digit:]]*%'`" -t 'Vol. ' --sc "" --id 99

if you're wondering what the echo-stuff is about: the original scripts had 'raised' and 'lowered', but those texts have different lengths so the width of the notify-bubble changes with each press of the key when going up/down/up/down. so i used the Unicode up-arrow and down-arrow, which looks a lot nicer.

Last edited by rhowaldt (2011-10-25 19:15:58)

Offline

#11 2011-10-30 12:22:54

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: twmn

some more things i learned.

you can use a layout-file for individual notifications, like so:

twmnc -l "twmn_volume.conf"

put this layout-file in the same directory as your regular twmn.conf, which is ~/.config/twmn

now, you cannot have the layout-file completely replace the regular twmn.conf. for example, when you provide different in/out-animations in your layout-file, twmn will still use those specified in the twmn.conf file. the same goes for the screen position of the notification afaik. you can of course change things like font, color and size of the notification.

nonetheless, this layout-file could be very nice to use for, for example, a warning notification displayed in red or something.

Last edited by rhowaldt (2011-10-30 12:24:10)

Offline

#12 2011-11-10 19:27:08

Doomicide
#! Junkie
From: the Nightosphere
Registered: 2011-06-24
Posts: 472
Website

Re: twmn

rhowaldt wrote:

the (current) final post from the arch-forums-thread posted above (direct link: https://bbs.archlinux.org/viewtopic.php … 38#p985938) has some very simple volume_up/volume_down scripts for use with twmn, which i have editted and am currently using. i did the keybindings in openbox rc.xml, and made them call these two scripts:

#!/bin/bash
# twmn > volume up
amixer -c 0 sset Master 2%+ > /dev/null
uparrow=$(echo -e "\xE2\x96\xB2")
twmnc -c "$uparrow `amixer -c 0 get Master | grep -oe '[[:digit:]]*%'`" -t 'Vol. ' --sc "" --id 99
#!/bin/bash
# twmn > volume down
amixer -c 0 sset Master 2%- > /dev/null
downarrow=$(echo -e "\xE2\x96\xBC")
twmnc -c "$downarrow `amixer -c 0 get Master | grep -oe '[[:digit:]]*%'`" -t 'Vol. ' --sc "" --id 99

if you're wondering what the echo-stuff is about: the original scripts had 'raised' and 'lowered', but those texts have different lengths so the width of the notify-bubble changes with each press of the key when going up/down/up/down. so i used the Unicode up-arrow and down-arrow, which looks a lot nicer.

Thank you for posting these, I used them as a base to write my own. smile


“From each according to his faculties; to each according to his needs”
Look at the code. Look at the silly code!

Offline

#13 2011-11-10 21:07:13

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: twmn

no problem man, glad you find them useful!

Offline

#14 2011-11-11 15:30:25

Doomicide
#! Junkie
From: the Nightosphere
Registered: 2011-06-24
Posts: 472
Website

Re: twmn

I wrote a script that toggles mute-status, with the above ones as a starting point:

#!/bin/bash
# twmn > volume mute

amixer set Master toggle
STAT=$(amixer -c 0 sget Master | grep -F -e "[on]" -e "[off]" | cut -d ' ' -f 8 | tr -d [:punct:] )

case $STAT in
    on)
        twmnc -c "`amixer -c 0 get Master | grep -oe '[[:digit:]]*%'`" -t 'Vol. '  --id 97 --l twmn-sound.conf
        ;;
    off)
        twmnc -c "MUTE" -t 'Vol. '  --id 97 --l twmn-sound.conf --fg "#BD9074"
        ;;
esac

“From each according to his faculties; to each according to his needs”
Look at the code. Look at the silly code!

Offline

#15 2011-11-11 16:21:22

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: twmn

^ yes, i cannot imagine i hadn't thought of doing that after implementing those vol-up+vol-down scripts! cool, thanks for that doomicide.

edit: tried it out, modified it a bit for my own situation, and it works great.

i did find something a bit strange though, not sure if it is a bug or something, see if you replicate this.
when i already have a notification onscreen, in this case the 'Vol. Mute', and i then proceed to use my 'Vol. Up', it suddenly bounces, while i've set it in the QT-codes not to bounce. - thinking while writing this: could it have to do with the 'id' codes? let's try it out! - yes it does!
so, when you set the 'id'-codes the same for all your notifications, it treats them as a single notification, so to speak. when you use different id-codes, it does 'transitions' between them. i'm checking out the config file to see if i can find anything to turn off that behavior.

Last edited by rhowaldt (2011-11-11 16:52:07)

Offline

#16 2011-11-11 16:57:53

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: twmn

^ i think the setting should be 'bounce=false', but that does not seem to work (both in the regular config file as in my twmn_volume.conf). so using the same id-codes to stop this behavior.

btw, i think this link hadn't been posted yet, but more info is in the git repo: https://github.com/sboli/twmn

Offline

#17 2011-11-12 12:40:29

Doomicide
#! Junkie
From: the Nightosphere
Registered: 2011-06-24
Posts: 472
Website

Re: twmn

I can reproduce this, but when using the same id, you'd have to modify the volup/down scripts to test if volume is muted or else it will increase/decrease volumen even though it's muted. This could be even more confusing if you allow it to change the notification.


“From each according to his faculties; to each according to his needs”
Look at the code. Look at the silly code!

Offline

#18 2011-11-12 16:19:17

Doomicide
#! Junkie
From: the Nightosphere
Registered: 2011-06-24
Posts: 472
Website

Re: twmn

Modified volup/down to fit the mute script:

#!/bin/bash
# twmn > volume up
STAT=$(amixer -c 0 sget Master | grep -F -e "[on]" -e "[off]" | cut -d ' ' -f 8 | tr -d [:punct:] )
case $STAT in
    on)
        amixer -c 0 sset Master 2%+ > /dev/null
        twmnc -c "+ `amixer -c 0 get Master | grep -oe '[[:digit:]]*%'`" -t 'Vol. '  --id 99 --l twmn-sound.conf
        ;;
    off)
        amixer -c 0 sset Master 2%+ > /dev/null
        twmnc -c "M `amixer -c 0 get Master | grep -oe '[[:digit:]]*%'`" -t 'Vol. '  --id 99 --l twmn-sound.conf --fg "#BD9074"
        ;;
esac
#!/bin/bash
# twmn > volume down
STAT=$(amixer -c 0 sget Master | grep -F -e "[on]" -e "[off]" | cut -d ' ' -f 8 | tr -d [:punct:] )
case $STAT in 
    on)
        amixer -c 0 sset Master 2%- > /dev/null
        twmnc -c "- `amixer -c 0 get Master | grep -oe '[[:digit:]]*%'`" -t 'Vol. ' --id 99 --l twmn-sound.conf
        ;;
    off)
        amixer -c 0 sset Master 2%- > /dev/null
        twmnc -c "M `amixer -c 0 get Master | grep -oe '[[:digit:]]*%'`" -t 'Vol. ' --id 99 --l twmn-sound.conf --fg "#BD9074"
        ;;
esac

“From each according to his faculties; to each according to his needs”
Look at the code. Look at the silly code!

Offline

#19 2011-11-12 19:09:02

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: twmn

Doomicide wrote:

I can reproduce this, but when using the same id, you'd have to modify the volup/down scripts to test if volume is muted or else it will increase/decrease volumen even though it's muted. This could be even more confusing if you allow it to change the notification.

yeah i noticed that. subsequently i've stared at my volume-icon for a good minute, deciding whether this behavior was a problem to me, and i figured it wasn't. it is kinda counter-intuitive to be able to change the volume while it is muted, but you can pre-decide on a certain volume before unmuting, which makes sense as well. so i left it like it is.

Offline

#20 2011-11-13 11:44:48

Doomicide
#! Junkie
From: the Nightosphere
Registered: 2011-06-24
Posts: 472
Website

Re: twmn

rhowaldt wrote:

[...]but you can pre-decide on a certain volume before unmuting, which makes sense as well[...]

That's why I modified it, so you can still change the volume, but it at least shows you that it's muted.


“From each according to his faculties; to each according to his needs”
Look at the code. Look at the silly code!

Offline

#21 2011-11-13 12:17:09

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: twmn

^ aah, i misunderstood you! yes, in that case, good thinking!

Offline

#22 2011-11-19 19:55:27

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: twmn

here's a twmn-script for use with the irssi notifier i posted here: http://crunchbanglinux.org/forums/post/163403/#p163403

#!/bin/bash
twmnc -l "twmn_volume.conf" -t "irssi: " -c "$1 says: $2" --sc "" --id 99

Offline

#23 2011-12-04 16:59:40

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: twmn

i wanted to implement this today, so i made a slight modification of Doomicide's improved volume up/down scripts, to remove code-repetition. so the 'case' only changes a variable, so the twmnc-code is only used once.

#!/bin/bash
# twmn volume up
uparrow=$(echo -e "\xE2\x96\xB2")
STAT=$(amixer -c 0 sget Master | grep -F -e "[on]" -e "[off]" | cut -d ' ' -f 8 | tr -d [:punct:] )
case $STAT in
    on)
        state="$uparrow"
        ;;
    off)
        state="(M) $uparrow"
        ;;
esac
amixer -c 0 sset Master 2%+ > /dev/null
twmnc -l "twmn_volume.conf" -c "$state `amixer -c 0 get Master | grep -oe '[[:digit:]]*%'`" -t 'Vol. ' --sc "" --id 99

(volume down omitted because, well it is almost exactly the same)

Last edited by rhowaldt (2011-12-04 17:00:02)

Offline

#24 2011-12-05 09:09:31

Doomicide
#! Junkie
From: the Nightosphere
Registered: 2011-06-24
Posts: 472
Website

Re: twmn

I've thought of that, but never really got around to it/was too lazey. So thanks! smile


“From each according to his faculties; to each according to his needs”
Look at the code. Look at the silly code!

Offline

Be excellent to each other!

#25 2011-12-05 11:51:01

jelloir
#! CrunchBanger
From: Outside the garden wall
Registered: 2009-08-21
Posts: 212

Re: twmn

This is great, thanks for posting about this.  I have been longing for a simple but elegant notification system.

Playing around with the qeasingcurve stuff is fun.

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo