From 55a13022894f5aadb495f6eb255d3df81d5a1440 Mon Sep 17 00:00:00 2001 From: streetturtle Date: Wed, 2 Sep 2020 22:02:58 -0400 Subject: [logout] update --- experiments/logout-widget/README.md | 19 ++++++++++++++++--- experiments/logout-widget/screenshot.gif | Bin 0 -> 172152 bytes 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 experiments/logout-widget/screenshot.gif (limited to 'experiments') diff --git a/experiments/logout-widget/README.md b/experiments/logout-widget/README.md index 3d3565d..96dde68 100644 --- a/experiments/logout-widget/README.md +++ b/experiments/logout-widget/README.md @@ -2,7 +2,7 @@ Widget which allows to perform lock, reboot, log out, power off and sleep actions. If can be called either by a shortcut, or by clicking on a widget in wibar. -![screenshot](./screenshot.png) +![screenshot](./screenshot.gif) # Installation @@ -12,7 +12,9 @@ Clone repo (if not cloned yet) under ~/.config/awesome, then ```lua local logout = require("awesome-wm-widgets.experiments.logout-widget.logout") - + ... + globalkeys = gears.table.join( + ... -- define a shorcut in globalkey awful.key({ modkey }, "l", function() logout.launch() end, {description = "Show logout screen", group = "custom"}), ``` @@ -41,4 +43,15 @@ Clone repo (if not cloned yet) under ~/.config/awesome, then ## Phrase -You can provide a phrase which appears on the widget. + + + bg_color = args.bg_color or beautiful.bg_normal + accent_color = args.accent_color or beautiful.bg_focus + text_color = args.text_color or beautiful.fg_normal + phrases = args.phrases or {'Goodbye!'} + + onlogout = args.onlogout or function () awesome.quit() end + onlock = args.onlock + onreboot = args.onreboot + onsuspend = args.onsuspend or function () awful.spawn.with_shell("systemctl suspend") end + onpoweroff = args.onpoweroff or function () awful.spawn.with_shell("shutdown now") end \ No newline at end of file diff --git a/experiments/logout-widget/screenshot.gif b/experiments/logout-widget/screenshot.gif new file mode 100644 index 0000000..8fcf9ab Binary files /dev/null and b/experiments/logout-widget/screenshot.gif differ -- cgit v1.2.3