From 5bb1acd467582d5304a29527a849b3ee460b0cd6 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Sat, 7 Sep 2013 11:33:45 -0700 Subject: [PATCH 01/16] Updated Utilities (markdown) --- Utilities.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/Utilities.md b/Utilities.md index 8bb7597..3cf188e 100644 --- a/Utilities.md +++ b/Utilities.md @@ -1,5 +1,3 @@ -[<- home](https://github.com/copycat-killer/lain/wiki) - markup ------ -- 2.39.5 From a6bb0ef8d5c570023e1b9819d6b289db7f3e7155 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Sat, 7 Sep 2013 11:35:11 -0700 Subject: [PATCH 02/16] Updated Utilities (markdown) --- Utilities.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Utilities.md b/Utilities.md index 3cf188e..cbf8c0f 100644 --- a/Utilities.md +++ b/Utilities.md @@ -49,7 +49,8 @@ menu\_clients\_current\_tags Similar to `awful.menu.clients()`, but this menu only shows the clients of currently visible tags. Use it with a key binding like this: - awful.key({ "Mod1" }, "Tab", function() + awful.key({ "Mod1" }, "Tab", + function() awful.menu.menu_keys.down = { "Down", "Alt_L", "Tab", "j" } awful.menu.menu_keys.up = { "Up", "k" } lain.util.menu_clients_current_tags({ width = 350 }, { keygrabber = true }) -- 2.39.5 From 540a1af279deefcb17891801835c7d9d84e90b2a Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Sat, 7 Sep 2013 11:36:21 -0700 Subject: [PATCH 03/16] Updated Widgets (markdown) --- Widgets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Widgets.md b/Widgets.md index cdcac1b..6e6d361 100644 --- a/Widgets.md +++ b/Widgets.md @@ -8,7 +8,7 @@ We say this because, for some widget, `function` return a table to be used for n - [alsabar](https://github.com/copycat-killer/lain/wiki/alsabar) - [bat](https://github.com/copycat-killer/lain/wiki/bat) - [borderbox](https://github.com/copycat-killer/lain/wiki/borderbox) -- [calendar](https://github.com/copycat-killer/lain/wiki/caldendar) +- [calendar](https://github.com/copycat-killer/lain/wiki/calendar) - [cpu](https://github.com/copycat-killer/lain/wiki/cpu) - [fs](https://github.com/copycat-killer/lain/wiki/fs) - [imap](https://github.com/copycat-killer/lain/wiki/imap) -- 2.39.5 From 7a6e392d098631a79d14eb1735e0b91829e33de3 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Sat, 7 Sep 2013 16:20:57 -0700 Subject: [PATCH 04/16] Updated calendar (markdown) --- calendar.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/calendar.md b/calendar.md index 182c805..1d63a65 100644 --- a/calendar.md +++ b/calendar.md @@ -1,11 +1,11 @@ Attaches a calendar notification to a widget. - lain.widgets.calendar:attach(mywidget) + lain.widgets.calendar:attach(widget) - Left click: switch to previous month. - Right click: switch to next month. -Optionally you can call the function with background and foreground colors arguments, both or just one: +Optionally you can call the function with bg and fg colors arguments, both or just one: lain.widgets.calendar:attach(mytextclock, "#FFFFFF", "#000000") -- or @@ -13,6 +13,8 @@ Optionally you can call the function with background and foreground colors argum -- or lain.widgets.calendar:attach(mytextclock, nil, "#000000") +default bg and fg colors are `beautiful.bg_normal` and `beautiful.fg_focus`. + Notification will show an icon displaying current day, and formatted output from ``cal`` with current day highlighted. -- 2.39.5 From 64f6fe9d609557f3386d7525b048a9410866abd3 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Sat, 7 Sep 2013 16:35:54 -0700 Subject: [PATCH 05/16] Updated calendar (markdown) --- calendar.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/calendar.md b/calendar.md index 1d63a65..2b75840 100644 --- a/calendar.md +++ b/calendar.md @@ -1,3 +1,5 @@ +[<- widgets](https://github.com/copycat-killer/lain/wiki/Widgets) + Attaches a calendar notification to a widget. lain.widgets.calendar:attach(widget) -- 2.39.5 From 0530fc4fd38e073263af06fbee7ccd2010eea238 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Sat, 7 Sep 2013 16:37:33 -0700 Subject: [PATCH 06/16] Updated mpd (markdown) --- mpd.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/mpd.md b/mpd.md index 27f3faf..33a0dd6 100644 --- a/mpd.md +++ b/mpd.md @@ -46,24 +46,24 @@ Finally, you can control the widget with key bindings like these: -- MPD control awful.key({ altkey, "Control" }, "Up", - function () - awful.util.spawn_with_shell( "mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle", false ) - mympd.notify() - end), + function () + awful.util.spawn_with_shell("mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle") + mpdwidget.notify() + end), awful.key({ altkey, "Control" }, "Down", - function () - awful.util.spawn_with_shell( "mpc stop || ncmpcpp stop || ncmpc stop || pms stop", false ) - mympd.notify() - end), + function () + awful.util.spawn_with_shell("mpc stop || ncmpcpp stop || ncmpc stop || pms stop") + mpdwidget.notify() + end), awful.key({ altkey, "Control" }, "Left", - function () - awful.util.spawn_with_shell( "mpc prev || ncmpcpp prev || ncmpc prev || pms prev", false ) - mympd.notify() - end), + function () + awful.util.spawn_with_shell("mpc prev || ncmpcpp prev || ncmpc prev || pms prev") + mpdwidget.notify() + end), awful.key({ altkey, "Control" }, "Right", - function () - awful.util.spawn_with_shell( "mpc next || ncmpcpp next || ncmpc next || pms next", false ) - mympd.notify() - end), + function () + awful.util.spawn_with_shell("mpc next || ncmpcpp next || ncmpc next || pms next") + mpdwidget.notify() + end), where `altkey = "Mod1"`. \ No newline at end of file -- 2.39.5 From 279c5e9fe373a0b5b36cb3a1efa15cd46229c627 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Sun, 8 Sep 2013 05:01:10 -0700 Subject: [PATCH 07/16] Updated Home (markdown) --- Home.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Home.md b/Home.md index b98a1dd..9342879 100644 --- a/Home.md +++ b/Home.md @@ -2,7 +2,9 @@ Welcome to the Lain wiki! ### Installation -Simply clone this repository into your Awesome directory. +Simply clone this repository into your Awesome directory: + + git clone https://github.com/copycat-killer/lain.git ~/.config/awesome/lain ### Index -- 2.39.5 From ae528aac430fd36e138bdadde303d50b8cc89f07 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Sun, 8 Sep 2013 05:15:50 -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 33a0dd6..4b97f05 100644 --- a/mpd.md +++ b/mpd.md @@ -27,8 +27,8 @@ Variable | Meaning | Type | Default `port` | MPD port | string | "6600" `music_dir` | Music directory | string | "~/Music" `refresh_timeout` | Refresh timeout seconds | int | 1 -`color_artist` | Artist value color | string | `beautiful.fg_normal` or "#FFFFFF" -`color_song` | Song value color | string | `beautiful.fg_focus` or "#FFFFFF" +`header_color` | Artist value color | string | `beautiful.fg_normal` or "#FFFFFF" +`color` | Song value color | string | `beautiful.fg_focus` or "#FFFFFF" `spr` | Separator text between artist and song values | string | " " `app` | Music program to spawn on click | string | "ncmpcpp" `shadow` | Hide widget when there are no songs playing | boolean | false -- 2.39.5 From b2982375bbb9e99e8830d8428523cfdeda573afc Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Sun, 8 Sep 2013 05:20:21 -0700 Subject: [PATCH 09/16] Updated imap (markdown) --- imap.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/imap.md b/imap.md index d7e68b4..47e7b51 100644 --- a/imap.md +++ b/imap.md @@ -40,8 +40,7 @@ Variable | Meaning | Type | Default `refresh_timeout` | Refresh timeout seconds | int | 60 `header` | Text to show before value | string | " Mail " `header_color` | Header color | string | `beautiful.fg_normal` or "#FFFFFF" -`color_newmail` | New mail value color | string | `beautiful.fg_focus` or "#FFFFFF" -`color_nomail` | No mail value color | string | `beautiful.fg_normal` or "#FFFFFF" +`color` | Mail value color | string | `beautiful.fg_focus` or "#FFFFFF" `mail_encoding` | Mail character encoding | string | autodetected `maxlen` | Maximum chars to display in notification | int | 200 `app` | Mail program to spawn on click | string | "mutt" -- 2.39.5 From ed79b2f287993e547a91939be04075e601de4ada Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Sun, 8 Sep 2013 06:14:11 -0700 Subject: [PATCH 10/16] Updated yawn (rest => markdown) --- yawn.md | 89 +++++++++++++++++++++++++++++++++++++ yawn.rest | 128 ------------------------------------------------------ 2 files changed, 89 insertions(+), 128 deletions(-) create mode 100644 yawn.md delete mode 100644 yawn.rest diff --git a/yawn.md b/yawn.md new file mode 100644 index 0000000..fa6e91c --- /dev/null +++ b/yawn.md @@ -0,0 +1,89 @@ +Yahoo's Awesome Weather notification +----------- + +Yawn provides brief and compact weather notification via Naughty and Yahoo! Weather API. + +Usage +----- + +You can ``register`` Yawn to get a set of widgets, or ``attach`` it to +an existent widget. + +### register + + yawn = lain.widgets.yawn(id, args) + +- ``id`` + + An integer that defines the WOEID code of your city. + To obtain it you can google 'yahoo weather %CITYNAME%' and follow the first link. + It will look like: + + http://weather.yahoo.com/united-states/california/san-diego-2487889/ + + and the last number in that link will be the ID you need. + +- ``args`` + + An optional table which can contain the following settings: + + Variables | Meaning | Type | Possible values | Default value + --- | --- | --- | --- | --- + `u` | Units | string | "c" (Celsius), "f" (Fahrenheit) | "c" + `toshow` | What to show | string | "forecast", "units", "both" | "forecast" + `color` | ``yawn.widget`` color | string | hexadecimal colors | + +The function creates an imagebox icon and a textbox widget. Add them to you wibox like this: + + right_layout:add(yawn.icon) + right_layout:add(yawn.widget) + +Hovering over ``yawn.icon`` will display the notification. + +### attach + + lain.widgets.yawn.attach(widget, id, args) + +Arguments: + +- ``widget`` + + The widget which you want to attach yawn to. + +- ``id`` + + Same as in ``register``. + +- ``args`` + + Same as in ``register``. + +Hovering over ``widget`` will display the notification. + +Popup shortcut +-------------- + +You can also create a keybinding for the weather popup like this: :: + + awful.key( { "Mod1" }, "w", function () yawn.show(5) end ) + +where ``show`` argument is an integer defining timeout seconds. + +Localization +------------ + +Default language is English, but Yawn can be localized. + +Move to `localizations` subdirectory and fill `localization_template`. + +Once you're done, rename it like your locale id. In my case: + + $ lua + Lua 5.2.2 Copyright (C) 1994-2013 Lua.org, PUC-Rio + > print(os.getenv("LANG"):match("(%S*$*)[.]")) + it_IT + > + +hence I named my file "it_IT" (Italian localization). + +**NOTE:** If you create a localization, feel free to send me! I will add it. \ No newline at end of file diff --git a/yawn.rest b/yawn.rest deleted file mode 100644 index 4551597..0000000 --- a/yawn.rest +++ /dev/null @@ -1,128 +0,0 @@ -(*Integration of this* module_) - -:Author: Luke Bonham -:License: WTFPLv2_ -:Version: 2.0-git - -Description ------------ - -Yawn is a module for Awesome WM providing brief and compact -weather notification via Naughty and Yahoo! Weather API. - -Originally a port of perceptive_, it became a completely new module after various improvements and style changes. - ------ -Usage ------ - -You can ``register`` Yawn to get a set of widgets, or ``attach`` it to -an existent widget. - -register -^^^^^^^^ - -Call: :: - - lain.widgets.yawn(id, args) - -Arguments: - -``id`` - An integer that defines the WOEID code of your city. - To obtain it you can google 'yahoo weather %CITYNAME%' and follow the first link. - It will look like:: - - http://weather.yahoo.com/united-states/california/san-diego-2487889/ - - and the last number in that link will be the ID you need. -``args`` - An optional table which can contain the following settings: - ``u`` - Units. Type: string. Possible values: "c" (Celsius), "f" (Fahrenheit). Default: "c". - - ``toshow`` - What to show. Type: string. Possible values: "units", "forecast", "both". - Default: "forecast". - - ``units_color`` - Color of units text. Type: string. Possible values: hexadecimal color - codes. - - ``forecast_color`` - Color of forecast text. Type: string. Possible values: hexadecimal color - codes. - - ``notification_color`` - Color of notification text. Type: string. Possible values: hexadecimal color - codes. - - ``spr`` - A separator. Type: string. You can define it when ``toshow`` is set to "both". - - ``footer`` - A footer. Type: string. You can define it when ``toshow`` is set to - "both". - -The function creates an imagebox icon and a textbox widget. Add them to you wibox like this: :: - - right_layout:add(lain.widgets.yawn.icon) - right_layout:add(lain.widgets.yawn.widget) - -Hovering over ``yawn.icon`` will display the notification. - -attach -^^^^^^ - -Call: :: - - lain.widgets.yawn.attach(widget, id, args) - -Arguments: - -``widget`` - The widget which you want to attach yawn to. -``id`` - same as in ``register`` -``args`` - same as in ``register`` - -Hovering over ``widget`` will display the notification. - --------------- -Popup shortcut --------------- - -You can also create a keybinding for the weather popup like this: :: - - globalkeys = awful.util.table.join( - ... - awful.key( { "Mod1" }, "w", function () lain.widgets.yawn.show(5) end ) - ... - -where ``show`` argument is an integer defining timeout seconds. - ------------- -Localization ------------- - -Default language is English, but Yawn can be localized. -Move to ``localizations`` subdirectory and fill ``localization_template``. - -Once you're done, rename it like your locale id. In my case: :: - - $ lua - Lua 5.2.2 Copyright (C) 1994-2013 Lua.org, PUC-Rio - > print(os.getenv("LANG"):match("(%S*$*)[.]")) - it_IT - > - -hence I named my file "it_IT" (Italian localization). - -**NOTE:** If you create a localization, feel free to send me! I will add it. - -.. _module: https://github.com/copycat-killer/yawn -.. _WTFPLv2: http://www.wtfpl.net -.. _perceptive: https://github.com/ioga/perceptive -.. _Tamsyn: http://www.fial.com/~scott/tamsyn-font/ -.. _Rainbow: https://github.com/copycat-killer/awesome-copycats> \ No newline at end of file -- 2.39.5 From a905a653c051f6fac91673ecc0f0262279ecc541 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Sun, 8 Sep 2013 06:15:08 -0700 Subject: [PATCH 11/16] Updated yawn (markdown) --- yawn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yawn.md b/yawn.md index fa6e91c..b58846c 100644 --- a/yawn.md +++ b/yawn.md @@ -48,7 +48,7 @@ Arguments: - ``widget`` - The widget which you want to attach yawn to. + The widget which you want to attach Yawn to. - ``id`` -- 2.39.5 From b9df9d975094f7a13a59397de772e4eef8c739e5 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Sun, 8 Sep 2013 06:19:10 -0700 Subject: [PATCH 12/16] Updated yawn (markdown) --- yawn.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/yawn.md b/yawn.md index b58846c..070bf2e 100644 --- a/yawn.md +++ b/yawn.md @@ -1,7 +1,6 @@ -Yahoo's Awesome Weather notification ------------ +(YAhoo! Weather Notification) -Yawn provides brief and compact weather notification via Naughty and Yahoo! Weather API. +Yawn provides brief and compact Yahoo! Weather notification. Usage ----- @@ -63,7 +62,7 @@ Hovering over ``widget`` will display the notification. Popup shortcut -------------- -You can also create a keybinding for the weather popup like this: :: +You can also create a keybinding for the weather popup like this: awful.key( { "Mod1" }, "w", function () yawn.show(5) end ) -- 2.39.5 From f55accf8ad7585a3f070c77253a339fdb8c284e8 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Sun, 8 Sep 2013 09:12:28 -0700 Subject: [PATCH 13/16] Updated calendar (markdown) --- calendar.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/calendar.md b/calendar.md index 2b75840..5b4587d 100644 --- a/calendar.md +++ b/calendar.md @@ -7,7 +7,7 @@ Attaches a calendar notification to a widget. - Left click: switch to previous month. - Right click: switch to next month. -Optionally you can call the function with bg and fg colors arguments, both or just one: +Optionally you can call the function with fg and bg colors arguments, both or just one: lain.widgets.calendar:attach(mytextclock, "#FFFFFF", "#000000") -- or @@ -15,7 +15,7 @@ Optionally you can call the function with bg and fg colors arguments, both or ju -- or lain.widgets.calendar:attach(mytextclock, nil, "#000000") -default bg and fg colors are `beautiful.bg_normal` and `beautiful.fg_focus`. +default fg and fb colors are `beautiful.fg_focus` and `beautiful.bg_normal`. Notification will show an icon displaying current day, and formatted output from ``cal`` with current day highlighted. -- 2.39.5 From a58f0719f37380a53679223a15772ecc7387bd70 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Sun, 8 Sep 2013 09:29:56 -0700 Subject: [PATCH 14/16] Updated cpu (markdown) --- cpu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu.md b/cpu.md index 9dcc894..7f7cd82 100644 --- a/cpu.md +++ b/cpu.md @@ -9,7 +9,7 @@ The function takes a table as optional argument, which can contain: Variable | Meaning | Type | Default --- | --- | --- | --- `refresh_timeout` | Refresh timeout seconds | int | 10 -`header` | Text to show before value | string | " Cpu " +`header` | Text to show before value | string | "Cpu" `header_color` | Header color | string | `beautiful.fg_normal` or "#FFFFFF" `color` | Value color | string | `beautiful.fg_focus` or "#FFFFFF" `footer` | Text to add after value | string | "%" -- 2.39.5 From 6d21ffc4f64a3a9ccf5c3537c7199476b94c5efc Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Sun, 8 Sep 2013 09:30:21 -0700 Subject: [PATCH 15/16] Updated cpu (markdown) --- cpu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu.md b/cpu.md index 7f7cd82..8a3d5d8 100644 --- a/cpu.md +++ b/cpu.md @@ -9,7 +9,7 @@ The function takes a table as optional argument, which can contain: Variable | Meaning | Type | Default --- | --- | --- | --- `refresh_timeout` | Refresh timeout seconds | int | 10 -`header` | Text to show before value | string | "Cpu" +`header` | Text to show before value | string | "Cpu " `header_color` | Header color | string | `beautiful.fg_normal` or "#FFFFFF" `color` | Value color | string | `beautiful.fg_focus` or "#FFFFFF" `footer` | Text to add after value | string | "%" -- 2.39.5 From 408a2c94dcf30e7d318947039e7f8cd97c68ed3a Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Sun, 8 Sep 2013 09:30:32 -0700 Subject: [PATCH 16/16] Updated bat (markdown) --- bat.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bat.md b/bat.md index 79c17da..2d80786 100644 --- a/bat.md +++ b/bat.md @@ -14,7 +14,7 @@ Variable | Meaning | Type | Default `battery` | Identifier of the battery | string | "BAT0" `show_all` | Show all values (true), or only remaining capacity (false) | boolean | false `refresh_timeout` | Refresh timeout seconds | int | 30 -`header` | Text to show before value | string | " Bat " +`header` | Text to show before value | string | "Bat " `header_color` | Header color | string | `beautiful.fg_normal` or "#FFFFFF" `color` | Value color | string | `beautiful.fg_focus` or "#FFFFFF" `shadow` | Hide the widget when battery is not present | boolean | false \ No newline at end of file -- 2.39.5