summaryrefslogtreecommitdiff
path: root/batteryarc-widget
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@users.noreply.github.com>2022-04-15 17:19:42 -0400
committerGitHub <noreply@github.com>2022-04-15 17:19:42 -0400
commitdc80558d9d656ddeb3c51107d9ea85ac97c08de9 (patch)
tree7dbc9b510b2b198c4769344ca863f56fc9b139f0 /batteryarc-widget
parent2043d21cb5af7070b505364b799ffbf85a9e594a (diff)
parentfbe207a0f9110dc3a686cb85d9f2bea19bc0aef3 (diff)
Merge pull request #350 from easlice/misc-customization-additions
Add customizations to batteryarc and ram widgets.
Diffstat (limited to 'batteryarc-widget')
-rw-r--r--batteryarc-widget/README.md1
-rw-r--r--batteryarc-widget/batteryarc.lua2
2 files changed, 3 insertions, 0 deletions
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 3d38af4..55a7694 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