From 69aac8cae63e59ad130ad4b14f25fcd4e45fef3c Mon Sep 17 00:00:00 2001 From: Augusto Gunsch Date: Sun, 23 Jan 2022 21:45:48 -0300 Subject: Fix missing spacing --- cmus-widget/cmus.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/cmus-widget/cmus.lua b/cmus-widget/cmus.lua index 51daa89..2cb692d 100644 --- a/cmus-widget/cmus.lua +++ b/cmus-widget/cmus.lua @@ -44,6 +44,7 @@ local function worker(user_args) font = font, widget = wibox.widget.textbox }, + spacing = space, layout = wibox.layout.fixed.horizontal, update_icon = function(self, name) self:get_children_by_id("playback_icon")[1]:set_image(path_to_icons .. name) -- cgit v1.2.3 From c7250a0a3d796aaa15eb0076af6ea2379fb253e8 Mon Sep 17 00:00:00 2001 From: Augusto Gunsch Date: Sun, 23 Jan 2022 22:05:53 -0300 Subject: Fix warnings --- cmus-widget/cmus.lua | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/cmus-widget/cmus.lua b/cmus-widget/cmus.lua index 2cb692d..1936827 100644 --- a/cmus-widget/cmus.lua +++ b/cmus-widget/cmus.lua @@ -14,13 +14,6 @@ local naughty = require("naughty") local cmus_widget = {} -local function show_warning(message) - naughty.notify{ - preset = naughty.config.presets.critical, - title = "Cmus Widget", - text = message} -end - local function worker(user_args) local args = user_args or {} @@ -54,7 +47,7 @@ local function worker(user_args) end } - function update_widget(widget, stdout, _, _, code) + local function update_widget(widget, stdout, _, _, code) if code == 0 then local cmus_info = {} @@ -64,12 +57,12 @@ local function worker(user_args) if key and val then cmus_info[key] = val else - local key, val = string.match(s, "^set (%a+) (.+)$") + key, val = string.match(s, "^set (%a+) (.+)$") if key and val then cmus_info[key] = val else - local key, val = string.match(s, "^(%a+) (.+)$") + key, val = string.match(s, "^(%a+) (.+)$") if key and val then cmus_info[key] = val end -- cgit v1.2.3 From 2206567cc405f1250889f982ab81788f0a8fe156 Mon Sep 17 00:00:00 2001 From: Augusto Gunsch Date: Sun, 23 Jan 2022 22:07:01 -0300 Subject: Remove unused import --- cmus-widget/cmus.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/cmus-widget/cmus.lua b/cmus-widget/cmus.lua index 1936827..42b84fd 100644 --- a/cmus-widget/cmus.lua +++ b/cmus-widget/cmus.lua @@ -10,7 +10,6 @@ local awful = require("awful") local wibox = require("wibox") local watch = require("awful.widget.watch") local spawn = require("awful.spawn") -local naughty = require("naughty") local cmus_widget = {} -- cgit v1.2.3 From 4fbc8a85dfbdc23ffab92698eee2c2dca80423d3 Mon Sep 17 00:00:00 2001 From: Augusto Gunsch Date: Mon, 24 Jan 2022 10:46:29 -0300 Subject: Remove widget.width = 0 --- cmus-widget/cmus.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/cmus-widget/cmus.lua b/cmus-widget/cmus.lua index 42b84fd..102655b 100644 --- a/cmus-widget/cmus.lua +++ b/cmus-widget/cmus.lua @@ -89,7 +89,6 @@ local function worker(user_args) widget.visible = true else widget.visible = false - widget.width = 0 end else widget.visible = false -- cgit v1.2.3 From 14a91eb44e8f93a01d8e70b48b56463956967ea9 Mon Sep 17 00:00:00 2001 From: Augusto Gunsch Date: Mon, 24 Jan 2022 12:02:55 -0300 Subject: Use default theme font instead --- cmus-widget/README.md | 2 +- cmus-widget/cmus.lua | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmus-widget/README.md b/cmus-widget/README.md index c24d975..b1fecb9 100644 --- a/cmus-widget/README.md +++ b/cmus-widget/README.md @@ -42,7 +42,7 @@ It is possible to customize the widget by providing a table with all or some of | Name | Default | Description | |---|---|---| -| `font` | `Play 9` | Font used for the track title | +| `font` | `beautiful.font` | Font name and size, like `Play 12` | | `path_to_icons` | `/usr/share/icons/Arc/actions/symbolic/` | Alternative path for the icons | | `timeout`| `10` | Refresh cooldown | | `space` | `3` | Space between icon and track title | diff --git a/cmus-widget/cmus.lua b/cmus-widget/cmus.lua index 102655b..2ffa872 100644 --- a/cmus-widget/cmus.lua +++ b/cmus-widget/cmus.lua @@ -10,13 +10,14 @@ local awful = require("awful") local wibox = require("wibox") local watch = require("awful.widget.watch") local spawn = require("awful.spawn") +local beautiful = require('beautiful') local cmus_widget = {} local function worker(user_args) local args = user_args or {} - local font = args.font or "Play 9" + local font = args.font or beautiful.font local path_to_icons = args.path_to_icons or "/usr/share/icons/Arc/actions/symbolic/" local timeout = args.timeout or 10 -- cgit v1.2.3 From 779485872c9f683de9abb42f9b32b0acf9d1483b Mon Sep 17 00:00:00 2001 From: Augusto Gunsch Date: Mon, 24 Jan 2022 12:20:36 -0300 Subject: Brightness widget - Use by default theme font --- brightness-widget/README.md | 2 +- brightness-widget/brightness.lua | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/brightness-widget/README.md b/brightness-widget/README.md index cbf5b7e..936c881 100644 --- a/brightness-widget/README.md +++ b/brightness-widget/README.md @@ -13,7 +13,7 @@ It is possible to customize widget by providing a table with all or some of the | `step` | 5 | Step | | `base` | 20 | Base level to set brightness to on left click. | | `path_to_icon` | `/usr/share/icons/Arc/status/symbolic/display-brightness-symbolic.svg` | Path to the icon | -| `font` | `Play 9` | Font | +| `font` | `beautiful.font` | Font name and size, like `Play 12` | | `timeout` | 1 | How often in seconds the widget refreshes. Check the note below | | `tooltip` | false | Display brightness level in a tooltip when the mouse cursor hovers the widget | diff --git a/brightness-widget/brightness.lua b/brightness-widget/brightness.lua index 306cc2b..b9f07c9 100644 --- a/brightness-widget/brightness.lua +++ b/brightness-widget/brightness.lua @@ -13,6 +13,7 @@ local wibox = require("wibox") local watch = require("awful.widget.watch") local spawn = require("awful.spawn") local naughty = require("naughty") +local beautiful = require("beautiful") local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/brightness-widget/' local get_brightness_cmd @@ -35,7 +36,7 @@ local function worker(user_args) local type = args.type or 'arc' -- arc or icon_and_text local path_to_icon = args.path_to_icon or ICON_DIR .. 'brightness.svg' - local font = args.font or 'Play 9' + local font = args.font or beautiful.font local timeout = args.timeout or 100 local program = args.program or 'light' -- cgit v1.2.3 From 51ddb1efba57b4c41addd3a00b87bce2c2443741 Mon Sep 17 00:00:00 2001 From: Andreas Longo Date: Tue, 15 Feb 2022 18:03:08 +0100 Subject: Fix #209: Match space characters in battery status string --- battery-widget/battery.lua | 2 +- batteryarc-widget/batteryarc.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/battery-widget/battery.lua b/battery-widget/battery.lua index fc8c56f..ed44d5c 100644 --- a/battery-widget/battery.lua +++ b/battery-widget/battery.lua @@ -125,7 +125,7 @@ local function worker(user_args) local battery_info = {} local capacities = {} for s in stdout:gmatch("[^\r\n]+") do - local status, charge_str, _ = string.match(s, '.+: (%a+), (%d?%d?%d)%%,?(.*)') + local status, charge_str, _ = string.match(s, '.+: ([%a%s]+), (%d?%d?%d)%%,?(.*)') if status ~= nil then table.insert(battery_info, {status = status, charge = tonumber(charge_str)}) else diff --git a/batteryarc-widget/batteryarc.lua b/batteryarc-widget/batteryarc.lua index 1b6752a..3d38af4 100644 --- a/batteryarc-widget/batteryarc.lua +++ b/batteryarc-widget/batteryarc.lua @@ -89,7 +89,7 @@ local function worker(user_args) local charge = 0 local status for s in stdout:gmatch("[^\r\n]+") do - local cur_status, charge_str, _ = string.match(s, '.+: (%a+), (%d?%d?%d)%%,?(.*)') + local cur_status, charge_str, _ = string.match(s, '.+: ([%a%s]+), (%d?%d?%d)%%,?(.*)') if cur_status ~= nil and charge_str ~=nil then local cur_charge = tonumber(charge_str) if cur_charge > charge then -- cgit v1.2.3 From 12bc2ab3605745304110c3849826d5e9c74195b3 Mon Sep 17 00:00:00 2001 From: Aurelien LAJOIE Date: Thu, 17 Mar 2022 23:53:38 +0100 Subject: Add missing screen shot --- calendar-widget/calendar_start_sunday.png | Bin 0 -> 8410 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 calendar-widget/calendar_start_sunday.png diff --git a/calendar-widget/calendar_start_sunday.png b/calendar-widget/calendar_start_sunday.png new file mode 100644 index 0000000..126a218 Binary files /dev/null and b/calendar-widget/calendar_start_sunday.png differ -- cgit v1.2.3 From fbe207a0f9110dc3a686cb85d9f2bea19bc0aef3 Mon Sep 17 00:00:00 2001 From: Andrew Slice Date: Mon, 11 Apr 2022 17:26:01 -0400 Subject: Add notification_position parameters to batteryarc-widget. Add widget_height and widget_width parameters to ram-widget. --- batteryarc-widget/README.md | 1 + batteryarc-widget/batteryarc.lua | 2 ++ ram-widget/README.md | 2 ++ ram-widget/ram-widget.lua | 5 ++++- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/batteryarc-widget/README.md b/batteryarc-widget/README.md index a257b2f..98a2956 100644 --- a/batteryarc-widget/README.md +++ b/batteryarc-widget/README.md @@ -39,6 +39,7 @@ It is possible to customize widget by providing a table with all or some of the | `warning_msg_icon` | ~/.config/awesome/awesome-wm-widgets/batteryarc-widget/spaceman.jpg | Icon of the warning popup | | `enable_battery_warning` | `true` | Display low battery warning | | `show_notification_mode` | `on_hover` | How to trigger a notification with the battery status: `on_hover`, `on_click` or `off` | +| `notification_position` | `top_left` | Where to show she notification when triggered. Values: `top_right`, `top_left`, `bottom_left`, `bottom_right`, `top_middle`, `bottom_middle`. (default `top_right`) | ## Requirements diff --git a/batteryarc-widget/batteryarc.lua b/batteryarc-widget/batteryarc.lua index 1b6752a..161e114 100644 --- a/batteryarc-widget/batteryarc.lua +++ b/batteryarc-widget/batteryarc.lua @@ -29,6 +29,7 @@ local function worker(user_args) local size = args.size or 18 local timeout = args.timeout or 10 local show_notification_mode = args.show_notification_mode or 'on_hover' -- on_hover / on_click + local notification_position = args.notification_position or 'top_right' -- see naughty.notify position argument local main_color = args.main_color or beautiful.fg_color local bg_color = args.bg_color or '#ffffff11' @@ -146,6 +147,7 @@ local function worker(user_args) title = "Battery status", timeout = 5, width = 200, + position = notification_position, } end) end diff --git a/ram-widget/README.md b/ram-widget/README.md index 6e80976..568245b 100644 --- a/ram-widget/README.md +++ b/ram-widget/README.md @@ -15,6 +15,8 @@ It is possible to customize widget by providing a table with all or some of the | `color_used` | `beautiful.bg_urgent` | Color for used RAM | | `color_free` | `beautiful.fg_normal` | Color for free RAM | | `color_buf` | `beautiful.border_color_active` | Color for buffers/cache | +| `widget_height` | `25` | Height of the widget | +| `widget_width` | `25` | Width of the widget | | `widget_show_buf` | `false` | Whether to display buffers/cache separately in the tray widget. If `false`, buffers/cache are considered free RAM. | | `timeout` | 1 | How often (in seconds) the widget refreshes | diff --git a/ram-widget/ram-widget.lua b/ram-widget/ram-widget.lua index 1b5cdcf..867d28e 100644 --- a/ram-widget/ram-widget.lua +++ b/ram-widget/ram-widget.lua @@ -15,6 +15,8 @@ local function worker(user_args) local color_free = args.color_free or beautiful.fg_normal local color_buf = args.color_buf or beautiful.border_color_active local widget_show_buf = args.widget_show_buf or false + local widget_height = args.widget_height or 25 + local widget_width = args.widget_width or 25 --- Main ram widget shown on wibar ramgraph_widget = wibox.widget { @@ -25,7 +27,8 @@ local function worker(user_args) color_buf, }, display_labels = false, - forced_width = 25, + forced_height = widget_height, + forced_width = widget_width, widget = wibox.widget.piechart } -- cgit v1.2.3