From 1bab36983b644e29b6b8843c90a493c2901ea32d Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Wed, 11 Sep 2013 10:54:18 -0700 Subject: [PATCH 01/16] Updated Widgets (markdown) --- Widgets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Widgets.md b/Widgets.md index 1a26b80..e812db2 100644 --- a/Widgets.md +++ b/Widgets.md @@ -10,7 +10,7 @@ To markup the textbox, call `widget:set_markup(...)` within `settings`. You can feed `set_markup` with predefined arguments, see the sections for all the details. -`widget` is a textbox, so you can also threat it like any other `wibox.widget.textbox`. +`widget` is a textbox, so you can threat it like any other `wibox.widget.textbox`. Here follows an example: -- 2.39.5 From eef2b8bd8942119a81f8eb4804536f3a62a82ae7 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Wed, 11 Sep 2013 16:17:09 -0700 Subject: [PATCH 02/16] Updated imap (markdown) --- imap.md | 39 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/imap.md b/imap.md index 3063bec..af29cb3 100644 --- a/imap.md +++ b/imap.md @@ -1,28 +1,16 @@ [<- widgets](https://github.com/copycat-killer/lain/wiki/Widgets) -**Please be warned**: this is a temporary solution, I am working on something much more solid. - ---- - Shows mail status in a textbox over IMAP protocol. -New mails are notified through a notification like this: - - +---------------------------------------------------+ - | +---+ | - | |\ /| donald@disney.org has 3 new messages | - | +---+ | - | Latest From: Mickey Mouse | - | Subject: Re: pay raise | - | | - | Not after what you did yesterday. | - | Daisy told me everything [...] | - | | - +---------------------------------------------------+ + myimapcheck = lain.widgets.imap(args) -Text will be cut if the mail is too long. +New mails are notified through a notification like this: - myimapcheck = lain.widgets.imap(args) + +--------------------------------------------+ + | +---+ | + | |\ /| donald@disney.org has 3 new messages | + | +---+ | + +--------------------------------------------+ The function takes a table as argument. Required table parameters are: @@ -38,8 +26,6 @@ Variable | Meaning | Type | Default --- | --- | --- | --- `port` | IMAP port | int | 993 `timeout` | Refresh timeout seconds | int | 60 -`encoding` | Mail character encoding | string | autodetected -`maxlen` | Maximum chars to display in notification | int | 200 `is_plain` | Define whether `password` is a plain password (true) or a function that retrieves it (false) | boolean | false `settings` | User settings | function @@ -58,20 +44,17 @@ and you'll have the same security provided by `~/.netrc`. When `is_plain == false`, it *executes* `password` before using it, so you can also use whatever password fetching solution you want. -`settings` can use the string `mailcount`, whose possible values are: +`settings` can use the value `mailcount`, an integer greater or equal to zero, and can modify `notification_preset` table, which will be the preset for the naughty notifications. Check [here](http://awesome.naquadah.org/doc/api/modules/naughty.html#notify) for the list of variables it can contain. -- "0" -- "invalid credentials" -- string number - -and can modify `notification_preset` table, which will be the preset for the naughty notifications. Check [here](http://awesome.naquadah.org/doc/api/modules/naughty.html#notify) for the list of variables it can contain. Default definition: +Default definition: notification _preset = { icon = lain/icons/mail.png, - timeout = 8, position = "top_left" } +Note that `mailcount` is 0 either if there are no new mails or credentials are invalid, so make sure you get the right settings. + ### output A textbox. \ No newline at end of file -- 2.39.5 From 1bb4d3a124912805bc3a2e7ef3b1b22e2544764c Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Wed, 11 Sep 2013 17:25:35 -0700 Subject: [PATCH 03/16] Updated imap (markdown) --- imap.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imap.md b/imap.md index af29cb3..7b232a1 100644 --- a/imap.md +++ b/imap.md @@ -1,10 +1,10 @@ [<- widgets](https://github.com/copycat-killer/lain/wiki/Widgets) -Shows mail status in a textbox over IMAP protocol. +Shows mail count in a textbox fetching over IMAP. myimapcheck = lain.widgets.imap(args) -New mails are notified through a notification like this: +New mails are notified like this: +--------------------------------------------+ | +---+ | -- 2.39.5 From a8865ef1879ce892177029bf4cbdd02b863b5278 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Wed, 11 Sep 2013 17:26:08 -0700 Subject: [PATCH 04/16] Updated Home (markdown) --- Home.md | 1 - 1 file changed, 1 deletion(-) diff --git a/Home.md b/Home.md index 74f336f..6b7b58d 100644 --- a/Home.md +++ b/Home.md @@ -7,7 +7,6 @@ Package | Requested by alsa-utils | [alsa](https://github.com/copycat-killer/lain/wiki/alsa), [alsabar](https://github.com/copycat-killer/lain/wiki/alsabar) curl | widget types accessing network resources imagemagick | [mpd](https://github.com/copycat-killer/lain/wiki/mpd) -python3 | [imap](https://github.com/copycat-killer/lain/wiki/imap) ### Installation -- 2.39.5 From 09d7ce58c1f1a335490d5aadf1a105fd12394a5e Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Thu, 12 Sep 2013 08:04:28 -0700 Subject: [PATCH 05/16] Updated alsabar (markdown) --- alsabar.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alsabar.md b/alsabar.md index 7763fe4..ad5b1bf 100644 --- a/alsabar.md +++ b/alsabar.md @@ -1,6 +1,6 @@ [<- widgets](https://github.com/copycat-killer/lain/wiki/Widgets) -Shows and controls alsa volume with a progressbar and provides tooltips, notifications, and color changes at mute/unmute switch. +Shows and controls alsa volume with a progressbar; provides tooltips, notifications, and color changes at mute/unmute switch. myvolumebar = lain.widgets.alsabar() @@ -12,6 +12,7 @@ The function takes a table as optional argument, which can contain: Variable | Meaning | Type | Default --- | --- | --- | --- +`timeout` | Refresh timeout seconds | int | 4 `width` | Bar width | int | 63 `height` | Bar height | int | 1 `ticks` | Set bar ticks on | boolean | true -- 2.39.5 From e9bd8803d85049b18833c7ec9e07b4e58953a5df Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Thu, 12 Sep 2013 08:43:38 -0700 Subject: [PATCH 06/16] Updated fs (markdown) --- fs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs.md b/fs.md index 44be2b2..5588ca7 100644 --- a/fs.md +++ b/fs.md @@ -27,9 +27,9 @@ where `p` is the last column of `df` command ("/", "/home", "/boot", ...). This means you can set the widget for a certain partition, but you can look up at others too. -Finally, `settings` can modify `notification_preset` table too. This table will be the preset for the naughty notifications. Check [here](http://awesome.naquadah.org/doc/api/modules/naughty.html#notify) for the list of variables it can contain. Default definition: +Finally, `settings` can modify `fs_notification_preset` table too. This table will be the preset for the naughty notifications. Check [here](http://awesome.naquadah.org/doc/api/modules/naughty.html#notify) for the list of variables it can contain. Default definition: - notification_preset = { fg = beautiful.fg_normal } + fs_notification_preset = { fg = beautiful.fg_normal } ### output table -- 2.39.5 From 82192b3889feaeca7f1ab3ad52c49ec3d5352ea1 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Thu, 12 Sep 2013 08:44:22 -0700 Subject: [PATCH 07/16] Updated imap (markdown) --- imap.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imap.md b/imap.md index 7b232a1..ba92d0f 100644 --- a/imap.md +++ b/imap.md @@ -44,11 +44,11 @@ and you'll have the same security provided by `~/.netrc`. When `is_plain == false`, it *executes* `password` before using it, so you can also use whatever password fetching solution you want. -`settings` can use the value `mailcount`, an integer greater or equal to zero, and can modify `notification_preset` table, which will be the preset for the naughty notifications. Check [here](http://awesome.naquadah.org/doc/api/modules/naughty.html#notify) for the list of variables it can contain. +`settings` can use the value `mailcount`, an integer greater or equal to zero, and can modify `mail_notification_preset` table, which will be the preset for the naughty notifications. Check [here](http://awesome.naquadah.org/doc/api/modules/naughty.html#notify) for the list of variables it can contain. Default definition: - notification _preset = { + mail_notification _preset = { icon = lain/icons/mail.png, position = "top_left" } -- 2.39.5 From 12c1acb5371753195cb7ef30a13d3f493ea343bf Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Thu, 12 Sep 2013 08:47:10 -0700 Subject: [PATCH 08/16] Updated mpd (markdown) --- mpd.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mpd.md b/mpd.md index 2f7a24c..51467e1 100644 --- a/mpd.md +++ b/mpd.md @@ -34,9 +34,9 @@ Variable | Meaning | Type | Default - album - date -and can modify `notification_preset` table, which will be the preset for the naughty notifications. Check [here](http://awesome.naquadah.org/doc/api/modules/naughty.html#notify) for the list of variables it can contain. Default definition: +and can modify `mpd_notification_preset` table, which will be the preset for the naughty notifications. Check [here](http://awesome.naquadah.org/doc/api/modules/naughty.html#notify) for the list of variables it can contain. Default definition: - notification _preset = { + mpd_notification _preset = { title = "Now playing", timeout = 6, text = string.format("%s (%s) - %s\n%s", mpd_now.artist, -- 2.39.5 From 1ae2152188f00b97600ffd8f3f165fb85ff1228c Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Thu, 12 Sep 2013 08:52:53 -0700 Subject: [PATCH 09/16] Updated yawn (markdown) --- yawn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yawn.md b/yawn.md index a9a1a7b..30d160c 100644 --- a/yawn.md +++ b/yawn.md @@ -34,7 +34,7 @@ an existent widget. `timeout` | Refresh timeout seconds | int | integers | 600 `settings` | User settings | function | function | empty function - `settings` can use strings `forecast`, `units`, and can modify `notification_preset` table, which + `settings` can use strings `forecast`, `units`, and can modify `yawn_notification_preset` table, which will be the preset for the naughty notifications. Check [here](http://awesome.naquadah.org/doc/api/modules/naughty.html#notify) for the list of variables it can contain. The function `register` creates an imagebox icon and a textbox widget. Add them to you wibox like this: -- 2.39.5 From 567b48f8a1ff91eb859997378ea9f1355c21c409 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Thu, 12 Sep 2013 09:07:46 -0700 Subject: [PATCH 10/16] Updated alsabar (markdown) --- alsabar.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alsabar.md b/alsabar.md index ad5b1bf..7a90478 100644 --- a/alsabar.md +++ b/alsabar.md @@ -67,12 +67,12 @@ You can control the widget with key bindings like these: end), awful.key({ altkey }, "m", function () - awful.util.spawn("amixer set Master playback toggle") + awful.util.spawn("amixer set " .. volume.channel .. " playback toggle") volume.notify() end), awful.key({ altkey, "Control" }, "m", function () - awful.util.spawn("amixer set Master playback 100%", false ) + awful.util.spawn("amixer set " .. volume.channel .. " playback 100%", false ) volume.notify() end), -- 2.39.5 From da846b94e7c30151c5ebbd1bdb746e02994c7dfc Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Thu, 12 Sep 2013 09:15:04 -0700 Subject: [PATCH 11/16] Updated mpd (markdown) --- mpd.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mpd.md b/mpd.md index 51467e1..de945b4 100644 --- a/mpd.md +++ b/mpd.md @@ -56,22 +56,22 @@ You can control the widget with key bindings like these: awful.key({ altkey, "Control" }, "Up", function () awful.util.spawn_with_shell("mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle") - mpdwidget.notify() + mpdwidget.update() end), awful.key({ altkey, "Control" }, "Down", function () awful.util.spawn_with_shell("mpc stop || ncmpcpp stop || ncmpc stop || pms stop") - mpdwidget.notify() + mpdwidget.update() end), awful.key({ altkey, "Control" }, "Left", function () awful.util.spawn_with_shell("mpc prev || ncmpcpp prev || ncmpc prev || pms prev") - mpdwidget.notify() + mpdwidget.update() end), awful.key({ altkey, "Control" }, "Right", function () awful.util.spawn_with_shell("mpc next || ncmpcpp next || ncmpc next || pms next") - mpdwidget.notify() + mpdwidget.update() end), where `altkey = "Mod1"`. \ No newline at end of file -- 2.39.5 From e241095ee6e5f705d05a65c88240163e4f5d5ebe Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Thu, 12 Sep 2013 09:37:19 -0700 Subject: [PATCH 12/16] Updated alsa (markdown) --- alsa.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/alsa.md b/alsa.md index 65314d2..6cc8b59 100644 --- a/alsa.md +++ b/alsa.md @@ -16,8 +16,8 @@ Variable | Meaning | Type | Default Variable | Meaning | Type | Values --- | --- | --- | --- -volume.level | Self explained | int | 0-100 -volume.status | Device status | string | "on", "off" +volume_now.level | Self explained | int | 0-100 +volume_now.status | Device status | string | "on", "off" ### output table @@ -32,22 +32,22 @@ You can control the widget with key bindings like these: awful.key({ altkey }, "Up", function () awful.util.spawn("amixer set Master 1%+") - volume.update() + volumewidget.update() end), awful.key({ altkey }, "Down", function () awful.util.spawn("amixer set Master 1%-") - volume.update() + volumewidget.update() end), awful.key({ altkey }, "m", function () awful.util.spawn("amixer set Master playback toggle") - volume.update() + volumewidget.update() end), awful.key({ altkey, "Control" }, "m", function () awful.util.spawn("amixer set Master playback 100%", false ) - volume.update() + volumewidget.update() end), where `altkey = "Mod1"`. \ No newline at end of file -- 2.39.5 From 7820874500305941464f69a116bd603180e26284 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Thu, 12 Sep 2013 09:37:35 -0700 Subject: [PATCH 13/16] Updated alsa (markdown) --- alsa.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alsa.md b/alsa.md index 6cc8b59..abe82b8 100644 --- a/alsa.md +++ b/alsa.md @@ -2,7 +2,7 @@ Shows and controls alsa volume with a textbox. - volume = lain.widgets.alsa() + volumewidget = lain.widgets.alsa() ### input table -- 2.39.5 From 88e64639d11859621848ca2ebe21acfa6adfc4d2 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Thu, 12 Sep 2013 09:37:54 -0700 Subject: [PATCH 14/16] Updated alsa (markdown) --- alsa.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alsa.md b/alsa.md index abe82b8..daf4016 100644 --- a/alsa.md +++ b/alsa.md @@ -16,8 +16,8 @@ Variable | Meaning | Type | Default Variable | Meaning | Type | Values --- | --- | --- | --- -volume_now.level | Self explained | int | 0-100 -volume_now.status | Device status | string | "on", "off" +`volume_now.level` | Self explained | int | 0-100 +`volume_now.status` | Device status | string | "on", "off" ### output table -- 2.39.5 From 979986f42a895ba93231d888aa53ccbd8934559e Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Thu, 12 Sep 2013 09:57:10 -0700 Subject: [PATCH 15/16] Updated alsabar (markdown) --- alsabar.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/alsabar.md b/alsabar.md index 7a90478..711c8ce 100644 --- a/alsabar.md +++ b/alsabar.md @@ -58,22 +58,22 @@ You can control the widget with key bindings like these: awful.key({ altkey }, "Up", function () awful.util.spawn("amixer set " .. volume.channel .. " " .. volume.step .. "+") - volume.notify() + myvolumebar.notify() end), awful.key({ altkey }, "Down", function () awful.util.spawn("amixer set " .. volume.channel .. " " .. volume.step .. "-") - volume.notify() + myvolumeba.notify() end), awful.key({ altkey }, "m", function () awful.util.spawn("amixer set " .. volume.channel .. " playback toggle") - volume.notify() + myvolumebar.notify() end), awful.key({ altkey, "Control" }, "m", function () awful.util.spawn("amixer set " .. volume.channel .. " playback 100%", false ) - volume.notify() + myvolumebar.notify() end), where `altkey = "Mod1"`. \ No newline at end of file -- 2.39.5 From a773b5b8b6b333774b1d13ea332e82bd9b6f226c Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Thu, 12 Sep 2013 12:32:27 -0700 Subject: [PATCH 16/16] Updated net (markdown) --- net.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net.md b/net.md index bace937..a1b6d35 100644 --- a/net.md +++ b/net.md @@ -13,9 +13,9 @@ Variable | Meaning | Type | Default `units` | Units | int | 1024 (kilobytes) `settings` | User settings | function | empty function -Possible other values for `units` are 1 (byte) or multiple of 1024: 1024^2 (mb), 1024^3 (gb), ... . +Possible other values for `units` are 1 (byte) or multiple of 1024: 1024^2 (mb), 1024^3 (gb), and so on. -`settings` can use the following `iface` strings: `carrier`, `state`, `sent`, `received`. +`settings` can use the following `iface` strings: `carrier` ("0", "1"), `state` ("up", "down"), `sent`, `received` (numbers). ### output -- 2.39.5