1twmn
2====
3A notification system for tiling window managers. `twmn` is two things:
4
5`twmnc`: command line tool to send notifications to `twmnd`. You can also use `notify-send` for a similar purpose, but `twmnc` is more powerful. See `twmnc --help` for more information.
6
7`twmnd`: daemon listening to notification requests and showing them one after another. Configure it at `~/.config/twmn/twmn.conf`. The file is generated the first time `twmnd` is launched.
8
9Notifications are shown in a one-line bar called the notification slide. They can be navigated through and activated with shortcuts.
10
11![](https://github.com/sboli/twmn/blob/master/screencast.gif)
12
13See `twmn.conf` for more information.
14
15
16About twmn.conf
17---------------
18<pre>
19[gui]
20; Screen number to display notifications on when using a multi-head desktop.
21screen=  ; 0 indexed screen number
22
23; WARNING: Deprecated by "screen"
24; Absolute position from the top-left corner of the slide. You may need it for a multi-screen setup.
25; You still have to set position in order to choose the slide animation. If empty, twmnd will try
26; to figure out where to display the slide according to your desktop size and the slide position.
27absolute_position=  ; Supported format: WxH. Width and Height being integers.
28
29; Background color.
30background_color=black  ; RBG hex and keywords (eg. lightgray) are supported.
31
32; An icon for the layout. Useful only for a layout file.
33icon=  ; Path to image file. Optional.
34
35; Font family.
36font=Sans
37
38; Font size.
39font_size=13  ; In pixel.
40
41; Font variation.
42; accepted values are:
43; oblique, italic, ultra-light, light, medium, semi-bold, bold, ultra-bold, heavy, ultra-condensed,
44; extra-condensed, condensed, semi-condensed, semi-expanded, expanded, extra-expanded, ultra-expanded.
45font_variant=medium
46
47; Text color.
48foreground_color=white  ; RBG hex and keywords (eg. lightgray) are supported.
49
50; Height of the slide bar. Useful to match your tiling window manager's bar.
51height=18  ; In pixel.
52
53; Position of the notification slide.
54position=top_right  ; Accepted values: top_right (tr), top_left (tl), bottom_right (br),
55                    ; bottom_left (bl), top_center (tc), bottom_center (bc), center (c).
56
57; moves the position of the slide in +/- pixels on the x or y axis (e.g. "+50" or "-100")
58offset_x=+0 ; default is 0
59offset_y=+0 ; default is 0
60
61; The animation to use when the slide appear
62in_animation=38 ; see https://doc.qt.io/qt-5/qeasingcurve.html#Type-enum for types
63
64; The in animation's duration
65in_animation_duration=1000 ; in milliseconds
66
67; The animation to use whe the slide is closing
68out_animation=13
69
70; The out animation's duration
71out_animation_duration=1000 ; in milliseconds
72
73; Enable or disable notification bounce when changing notification
74bounce=true  ; true or false
75
76; Change bounce duration
77bounce_duration=500 ; in milliseconds
78
79; If the character length is more then max_length the text is cut off and "..." is appended
80max_length = -1 ; default is -1 (which means: don't cut off)
81
82[icons]
83; An icon. You can add as many as you want.
84NAME=  ; Path to image file. NAME being the icon's custom name.
85
86
87[main]
88; Program/command to be executed on notification activation.
89activate_command=  ; Path to command.
90
91; Time each notification remains visible.
92duration=3000  ; In millisecond.
93
94; Host address to listen on for notifications.
95host=127.0.0.1
96
97; UDP port used for notifications.
98port=9797
99
100; Program/command to play sound with.
101sound_command=  ;  Path to command. Leave empty for no sound.
102
103</pre>
104
105
106Installation
107------------
108
109For [Arch Linux](http://www.archlinux.org/) users, `twmn` is [on the AUR](https://aur.archlinux.org/packages/twmn-git/).
110
111Otherwise you can install `twmnd` and `twmnc` manually:
112
1131. install `boost` and `qt` if they weren't before, including the `widgets` and `x11extras` qt libraries
1142. `git clone https://github.com/sboli/twmn.git` to get `twmn`
1153. `cd twmn/`
1164. `qmake` to generate a Makefile
1175. `make` to compile
1186. `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`)
1197. for `twmnd` to be always running, add it to your `.xinitrc`, `rc.conf` or else
120
121The `storage_notifier` example requires `dbus-python` to be installed. The `mpd_notifier` example requires `python-mpd` to be installed and running.
122