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(+) (limited to 'cmus-widget') 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(-) (limited to 'cmus-widget') 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(-) (limited to 'cmus-widget') 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(-) (limited to 'cmus-widget') 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(-) (limited to 'cmus-widget') 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