From 744045db10c7d29e309315f43271c84463bbb846 Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Thu, 2 Apr 2020 13:20:42 +0200 Subject: Make it possible to disable the low battery warning for battery-widget and batteryarc-widget --- battery-widget/README.md | 1 + battery-widget/battery.lua | 3 ++- batteryarc-widget/README.md | 1 + batteryarc-widget/batteryarc.lua | 3 ++- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/battery-widget/README.md b/battery-widget/README.md index d58c420..823a3f7 100644 --- a/battery-widget/README.md +++ b/battery-widget/README.md @@ -32,6 +32,7 @@ It is possible to customize widget by providing a table with all or some of the | `warning_msg_text` | _Battery is dying_ | Text of the warning popup | | `warning_msg_position` | `bottom_right` | Position of the warning popup | | `warning_msg_icon` | ~/.config/awesome/awesome-wm-widgets/battery-widget/spaceman.jpg | Icon of the warning popup | +| `disable_battery_warning` | `false` | Disable low battery warning | *Note: the widget expects following icons be present in the folder: diff --git a/battery-widget/battery.lua b/battery-widget/battery.lua index b47794d..43cdaee 100644 --- a/battery-widget/battery.lua +++ b/battery-widget/battery.lua @@ -38,6 +38,7 @@ local function worker(args) local warning_msg_text = args.warning_msg_text or 'Battery is dying' local warning_msg_position = args.warning_msg_position or 'bottom_right' local warning_msg_icon = args.warning_msg_icon or HOME .. '/.config/awesome/awesome-wm-widgets/batteryarc-widget/spaceman.jpg' + local disable_battery_warning = args.disable_battery_warning or false if not gfs.dir_readable(path_to_icons) then naughty.notify{ @@ -149,7 +150,7 @@ local function worker(args) if (charge >= 0 and charge < 15) then batteryType = "battery-empty%s-symbolic" - if status ~= 'Charging' and os.difftime(os.time(), last_battery_check) > 300 then + if (not disable_battery_warning) and status ~= 'Charging' and os.difftime(os.time(), last_battery_check) > 300 then -- if 5 minutes have elapsed since the last warning last_battery_check = os.time() diff --git a/batteryarc-widget/README.md b/batteryarc-widget/README.md index 6812dfa..f537534 100644 --- a/batteryarc-widget/README.md +++ b/batteryarc-widget/README.md @@ -33,6 +33,7 @@ It is possible to customize widget by providing a table with all or some of the | `warning_msg_text` | _Battery is dying_ | Text of the warning popup | | `warning_msg_position` | `bottom_right` | Position of the warning popup | | `warning_msg_icon` | ~/.config/awesome/awesome-wm-widgets/batteryarc-widget/spaceman.jpg | Icon of the warning popup | +| `disable_battery_warning` | `false` | Disable low battery warning | ## Requirements diff --git a/batteryarc-widget/batteryarc.lua b/batteryarc-widget/batteryarc.lua index d4a67c5..1843cf1 100644 --- a/batteryarc-widget/batteryarc.lua +++ b/batteryarc-widget/batteryarc.lua @@ -36,6 +36,7 @@ local function worker(args) local warning_msg_text = args.warning_msg_text or 'Battery is dying' local warning_msg_position = args.warning_msg_position or 'bottom_right' local warning_msg_icon = args.warning_msg_icon or HOME .. '/.config/awesome/awesome-wm-widgets/batteryarc-widget/spaceman.jpg' + local disable_battery_warning = args.disable_battery_warning or false local text = wibox.widget { id = "txt", @@ -124,7 +125,7 @@ local function worker(args) if charge < 15 then widget.colors = { low_level_color } - if status ~= 'Charging' and os.difftime(os.time(), last_battery_check) > 300 then + if (not disable_battery_warning) and status ~= 'Charging' and os.difftime(os.time(), last_battery_check) > 300 then -- if 5 minutes have elapsed since the last warning last_battery_check = os.time() -- cgit v1.2.3 From cc600a9bfa8f44cea37f3f037a6448f8202a4924 Mon Sep 17 00:00:00 2001 From: Neville Li Date: Sat, 4 Apr 2020 12:44:46 -0400 Subject: Fix display_notification setting in volume-widget --- volume-widget/volume.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volume-widget/volume.lua b/volume-widget/volume.lua index 04ac84f..652c39b 100644 --- a/volume-widget/volume.lua +++ b/volume-widget/volume.lua @@ -92,7 +92,7 @@ local function worker(args) local args = args or {} local volume_audio_controller = args.volume_audio_controller or 'pulse' - volume.display_notification = args.display_notification or 'false' + volume.display_notification = args.display_notification or false volume.position = args.notification_position or "top_right" if volume_audio_controller == 'pulse' then volume.device = '-D pulse' -- cgit v1.2.3 From 3ecea9dcc23906d6804849f0eb80bc6d840b1776 Mon Sep 17 00:00:00 2001 From: streetturtle Date: Sat, 4 Apr 2020 15:11:33 -0400 Subject: Update README.md --- todo-widget/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/todo-widget/README.md b/todo-widget/README.md index 9c26eb9..979f4f2 100644 --- a/todo-widget/README.md +++ b/todo-widget/README.md @@ -1,12 +1,14 @@ # ToDo Widget (in progress) -This widgets displays a list of to do items and allows to mark item as done, delete item and create new ones: +This widget displays a list of to do items and allows to mark item as done/undone, delete an item and create a new ones: ![screenshot](./todo.gif) # Installation -Clone repo under **~/.config/awesome/** and add the widget in **rc.lua**: +Put a **json.lua** from this repository: https://github.com/rxi/json.lua under ~/.config/awesone folder. And don't forget to start a repo :) + +Then clone this repo under **~/.config/awesome/** and add the widget in **rc.lua**: ```lua local todo_widget = require("awesome-wm-widgets.todo-widget.todo") @@ -18,4 +20,4 @@ s.mytasklist, -- Middle widget -- default todo_widget(), ... -``` \ No newline at end of file +``` -- cgit v1.2.3 From 60ddaf329bae52f6bb9c82071c40c3d9e08add4f Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Sun, 5 Apr 2020 11:23:37 +0200 Subject: Make it possible to disable the low battery warning --- battery-widget/README.md | 1 + battery-widget/battery.lua | 6 +++++- batteryarc-widget/README.md | 1 + batteryarc-widget/batteryarc.lua | 6 +++++- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/battery-widget/README.md b/battery-widget/README.md index d58c420..4ea14d8 100644 --- a/battery-widget/README.md +++ b/battery-widget/README.md @@ -32,6 +32,7 @@ It is possible to customize widget by providing a table with all or some of the | `warning_msg_text` | _Battery is dying_ | Text of the warning popup | | `warning_msg_position` | `bottom_right` | Position of the warning popup | | `warning_msg_icon` | ~/.config/awesome/awesome-wm-widgets/battery-widget/spaceman.jpg | Icon of the warning popup | +| `enable_battery_warning` | `true` | Display low battery warning | *Note: the widget expects following icons be present in the folder: diff --git a/battery-widget/battery.lua b/battery-widget/battery.lua index c066fcc..d84e591 100644 --- a/battery-widget/battery.lua +++ b/battery-widget/battery.lua @@ -38,6 +38,10 @@ local function worker(args) local warning_msg_text = args.warning_msg_text or 'Battery is dying' local warning_msg_position = args.warning_msg_position or 'bottom_right' local warning_msg_icon = args.warning_msg_icon or HOME .. '/.config/awesome/awesome-wm-widgets/batteryarc-widget/spaceman.jpg' + local enable_battery_warning = args.enable_battery_warning + if enable_battery_warning == nil then + enable_battery_warning = true + end if not gfs.dir_readable(path_to_icons) then naughty.notify{ @@ -147,7 +151,7 @@ local function worker(args) if (charge >= 0 and charge < 15) then batteryType = "battery-empty%s-symbolic" - if status ~= 'Charging' and os.difftime(os.time(), last_battery_check) > 300 then + if enable_battery_warning and status ~= 'Charging' and os.difftime(os.time(), last_battery_check) > 300 then -- if 5 minutes have elapsed since the last warning last_battery_check = os.time() diff --git a/batteryarc-widget/README.md b/batteryarc-widget/README.md index 6812dfa..96e1aeb 100644 --- a/batteryarc-widget/README.md +++ b/batteryarc-widget/README.md @@ -33,6 +33,7 @@ It is possible to customize widget by providing a table with all or some of the | `warning_msg_text` | _Battery is dying_ | Text of the warning popup | | `warning_msg_position` | `bottom_right` | Position of the warning popup | | `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 | ## Requirements diff --git a/batteryarc-widget/batteryarc.lua b/batteryarc-widget/batteryarc.lua index d4a67c5..0bf6bc0 100644 --- a/batteryarc-widget/batteryarc.lua +++ b/batteryarc-widget/batteryarc.lua @@ -36,6 +36,10 @@ local function worker(args) local warning_msg_text = args.warning_msg_text or 'Battery is dying' local warning_msg_position = args.warning_msg_position or 'bottom_right' local warning_msg_icon = args.warning_msg_icon or HOME .. '/.config/awesome/awesome-wm-widgets/batteryarc-widget/spaceman.jpg' + local enable_battery_warning = args.enable_battery_warning + if enable_battery_warning == nil then + enable_battery_warning = true + end local text = wibox.widget { id = "txt", @@ -124,7 +128,7 @@ local function worker(args) if charge < 15 then widget.colors = { low_level_color } - if status ~= 'Charging' and os.difftime(os.time(), last_battery_check) > 300 then + if enable_battery_warning and status ~= 'Charging' and os.difftime(os.time(), last_battery_check) > 300 then -- if 5 minutes have elapsed since the last warning last_battery_check = os.time() -- cgit v1.2.3