From b31152ab6e56233a9c8589c53a08068d065a3480 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Wed, 11 Sep 2013 09:36:42 -0700 Subject: [PATCH 01/16] Updated imap (markdown) --- imap.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/imap.md b/imap.md index e583410..6590ee7 100644 --- a/imap.md +++ b/imap.md @@ -1,8 +1,6 @@ [<- widgets](https://github.com/copycat-killer/lain/wiki/Widgets) -**Please be warned**: as for now, this works fine in normal link situations, but is discouraged to use it if your connection is sobbing, since it may cause some short freezes due to timeout issues. I am working on socket libraries to solve this. - -If you're a Python programmer, feel free to lend a hand. +**Please be warned**: this is a temporary solution, since it works fine in normal situations but causes little freezes if connection is sobbing. I am working on something much more solid. --- -- 2.39.5 From c5ddfd66999bdaf0fa48a60f4ad4f2f1afa52c0c Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Wed, 11 Sep 2013 09:39:38 -0700 Subject: [PATCH 02/16] Updated alsa (markdown) --- alsa.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/alsa.md b/alsa.md index f632717..af1139a 100644 --- a/alsa.md +++ b/alsa.md @@ -24,7 +24,7 @@ volume.status | Device status | string | "on", "off" Variable | Meaning | Type --- | --- | --- `widget` | The widget | `wibox.widget.textbox` -`notify` | Force update `widget` | function +`update` | Update `widget` | function You can control the widget with key bindings like these: @@ -32,22 +32,22 @@ You can control the widget with key bindings like these: awful.key({ altkey }, "Up", function () awful.util.spawn("amixer sset Master 1%+") - volume.notify() + volume.update() end), awful.key({ altkey }, "Down", function () awful.util.spawn("amixer sset Master 1%-") - volume.notify() + volume.update() end), awful.key({ altkey }, "m", function () awful.util.spawn("amixer set Master playback toggle") - volume.notify() + volume.update() end), awful.key({ altkey, "Control" }, "m", function () awful.util.spawn("amixer set Master playback 100%", false ) - volume.notify() + volume.update() end), where `altkey = "Mod1"`. \ No newline at end of file -- 2.39.5 From a5fea2962eb61b0c26000cf07e30148f2e95becc Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Wed, 11 Sep 2013 09:40:33 -0700 Subject: [PATCH 03/16] Updated alsa (markdown) --- alsa.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alsa.md b/alsa.md index af1139a..65314d2 100644 --- a/alsa.md +++ b/alsa.md @@ -31,12 +31,12 @@ You can control the widget with key bindings like these: -- Volume control awful.key({ altkey }, "Up", function () - awful.util.spawn("amixer sset Master 1%+") + awful.util.spawn("amixer set Master 1%+") volume.update() end), awful.key({ altkey }, "Down", function () - awful.util.spawn("amixer sset Master 1%-") + awful.util.spawn("amixer set Master 1%-") volume.update() end), awful.key({ altkey }, "m", -- 2.39.5 From 274515ca18170fbe39613c600de2e21f842b71ea Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Wed, 11 Sep 2013 09:41:14 -0700 Subject: [PATCH 04/16] Updated alsabar (markdown) --- alsabar.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alsabar.md b/alsabar.md index 549b28a..7763fe4 100644 --- a/alsabar.md +++ b/alsabar.md @@ -56,12 +56,12 @@ You can control the widget with key bindings like these: -- Volume control awful.key({ altkey }, "Up", function () - awful.util.spawn("amixer sset " .. volume.channel .. " " .. volume.step .. "+") + awful.util.spawn("amixer set " .. volume.channel .. " " .. volume.step .. "+") volume.notify() end), awful.key({ altkey }, "Down", function () - awful.util.spawn("amixer sset " .. volume.channel .. " " .. volume.step .. "-") + awful.util.spawn("amixer set " .. volume.channel .. " " .. volume.step .. "-") volume.notify() end), awful.key({ altkey }, "m", -- 2.39.5 From 45187b81f5c1e87d0a45150e9d7e2783dc26a74a Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Wed, 11 Sep 2013 10:06:31 -0700 Subject: [PATCH 05/16] Updated mpd (markdown) --- mpd.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/mpd.md b/mpd.md index bd7232e..2f7a24c 100644 --- a/mpd.md +++ b/mpd.md @@ -38,13 +38,9 @@ and can modify `notification_preset` table, which will be the preset for the nau notification _preset = { title = "Now playing", - text = mpd_now.artist .. " (" .. - mpd_now.album .. ") - " .. - mpd_now.date .. "\n" .. - mpd_now.title, - fg = beautiful.fg_normal or "#FFFFFF", - bg = beautiful.bg_normal or "#000000", - timeout = 6 + timeout = 6, + text = string.format("%s (%s) - %s\n%s", mpd_now.artist, + mpd_now.album, mpd_now.date, mpd_now.title) } ### output table -- 2.39.5 From 5694a737cba6bc0eba866ceff01ae05f28241bf8 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Wed, 11 Sep 2013 10:10:07 -0700 Subject: [PATCH 06/16] Updated yawn (markdown) --- yawn.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yawn.md b/yawn.md index 5b111bd..a9a1a7b 100644 --- a/yawn.md +++ b/yawn.md @@ -1,3 +1,5 @@ +[<- widgets](https://github.com/copycat-killer/lain/wiki/Widgets) + (YAhoo! Weather Notification) Yawn provides brief and compact Yahoo! Weather notification. -- 2.39.5 From bf7ba2df9868eea04447aa27b8e938a0dbbee5cb Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Wed, 11 Sep 2013 10:40:47 -0700 Subject: [PATCH 09/16] Updated imap (markdown) --- imap.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imap.md b/imap.md index 6590ee7..491bc31 100644 --- a/imap.md +++ b/imap.md @@ -1,6 +1,6 @@ [<- widgets](https://github.com/copycat-killer/lain/wiki/Widgets) -**Please be warned**: this is a temporary solution, since it works fine in normal situations but causes little freezes if connection is sobbing. I am working on something much more solid. +**Please be warned**: this is a temporary solution, since it works fine in normal situations but may causes little freezes if connection is sobbing. I am working on something much more solid. --- -- 2.39.5 From c3710289e82623e3f6cb659f050ccb099f43d13d Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Wed, 11 Sep 2013 10:51:45 -0700 Subject: [PATCH 10/16] Updated imap (markdown) --- imap.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imap.md b/imap.md index 491bc31..3063bec 100644 --- a/imap.md +++ b/imap.md @@ -1,6 +1,6 @@ [<- widgets](https://github.com/copycat-killer/lain/wiki/Widgets) -**Please be warned**: this is a temporary solution, since it works fine in normal situations but may causes little freezes if connection is sobbing. I am working on something much more solid. +**Please be warned**: this is a temporary solution, I am working on something much more solid. --- -- 2.39.5 From 5dcb340bc32738d7a9cc9df08a3465380fa3f063 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Wed, 11 Sep 2013 10:54:18 -0700 Subject: [PATCH 11/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 e475ad70ef8504d795e6966343d59c93589673bd Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Wed, 11 Sep 2013 16:17:09 -0700 Subject: [PATCH 12/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 ab90053aabc49930e1e6f599a4521a12ef1ccf2a Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Wed, 11 Sep 2013 17:25:35 -0700 Subject: [PATCH 13/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 70023036714a2485bfd1c7e44869ea06ebe6b037 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Wed, 11 Sep 2013 17:26:08 -0700 Subject: [PATCH 14/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 b339c79167c772f40d57c0dcd8864ae52c53431a Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Thu, 12 Sep 2013 08:04:28 -0700 Subject: [PATCH 15/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