Merge branch 'master' of github.com:streetturtle/awesome-wm-widgets
This commit is contained in:
commit
cf1e36d4d5
|
@ -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_text` | _Battery is dying_ | Text of the warning popup |
|
||||||
| `warning_msg_position` | `bottom_right` | Position 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 |
|
| `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:
|
*Note: the widget expects following icons be present in the folder:
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,10 @@ local function worker(args)
|
||||||
local warning_msg_text = args.warning_msg_text or 'Battery is dying'
|
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_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 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
|
if not gfs.dir_readable(path_to_icons) then
|
||||||
naughty.notify{
|
naughty.notify{
|
||||||
|
@ -147,7 +151,7 @@ local function worker(args)
|
||||||
|
|
||||||
if (charge >= 0 and charge < 15) then
|
if (charge >= 0 and charge < 15) then
|
||||||
batteryType = "battery-empty%s-symbolic"
|
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
|
-- if 5 minutes have elapsed since the last warning
|
||||||
last_battery_check = os.time()
|
last_battery_check = os.time()
|
||||||
|
|
||||||
|
|
|
@ -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_text` | _Battery is dying_ | Text of the warning popup |
|
||||||
| `warning_msg_position` | `bottom_right` | Position 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 |
|
| `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
|
## Requirements
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,10 @@ local function worker(args)
|
||||||
local warning_msg_text = args.warning_msg_text or 'Battery is dying'
|
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_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 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 {
|
local text = wibox.widget {
|
||||||
id = "txt",
|
id = "txt",
|
||||||
|
@ -124,7 +128,7 @@ local function worker(args)
|
||||||
|
|
||||||
if charge < 15 then
|
if charge < 15 then
|
||||||
widget.colors = { low_level_color }
|
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
|
-- if 5 minutes have elapsed since the last warning
|
||||||
last_battery_check = os.time()
|
last_battery_check = os.time()
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
# ToDo Widget (in progress)
|
# 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)
|
![screenshot](./todo.gif)
|
||||||
|
|
||||||
# Installation
|
# 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
|
```lua
|
||||||
local todo_widget = require("awesome-wm-widgets.todo-widget.todo")
|
local todo_widget = require("awesome-wm-widgets.todo-widget.todo")
|
||||||
|
|
|
@ -92,7 +92,7 @@ local function worker(args)
|
||||||
local args = args or {}
|
local args = args or {}
|
||||||
|
|
||||||
local volume_audio_controller = args.volume_audio_controller or 'pulse'
|
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"
|
volume.position = args.notification_position or "top_right"
|
||||||
if volume_audio_controller == 'pulse' then
|
if volume_audio_controller == 'pulse' then
|
||||||
volume.device = '-D pulse'
|
volume.device = '-D pulse'
|
||||||
|
|
Loading…
Reference in New Issue