[logout] update readme
This commit is contained in:
parent
41db3fae9a
commit
19f8937278
|
@ -1,10 +1,13 @@
|
||||||
# Logout widget
|
# Logout widget
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
Clone repo (if not cloned yet) under ~/.config/awesome, then
|
Clone repo (if not cloned yet) under ~/.config/awesome, then
|
||||||
|
|
||||||
|
|
||||||
- to show by shortcut:
|
- to show by shortcut:
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
|
|
|
@ -17,7 +17,6 @@ local fancybuttons = require("awesome-buttons.awesome-buttons")
|
||||||
|
|
||||||
local HOME_DIR = os.getenv("HOME")
|
local HOME_DIR = os.getenv("HOME")
|
||||||
local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/experiments/logout-widget'
|
local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/experiments/logout-widget'
|
||||||
local ICONS_DIR = WIDGET_DIR .. '/icons/'
|
|
||||||
|
|
||||||
|
|
||||||
local w = wibox {
|
local w = wibox {
|
||||||
|
@ -39,7 +38,7 @@ local action = wibox.widget {
|
||||||
|
|
||||||
local function create_button(icon_name, action_name, color, onclick)
|
local function create_button(icon_name, action_name, color, onclick)
|
||||||
|
|
||||||
local button = fancybuttons.with_icon{ type = 'basic', shape = 'rectangle', icon = icon_name, color = color, onclick = onclick }
|
local button = fancybuttons.with_icon{ type = 'basic', icon = icon_name, color = color, onclick = onclick }
|
||||||
button:connect_signal("mouse::enter", function(c) action:set_text(action_name) end)
|
button:connect_signal("mouse::enter", function(c) action:set_text(action_name) end)
|
||||||
button:connect_signal("mouse::leave", function(c) action:set_text(' ') end)
|
button:connect_signal("mouse::leave", function(c) action:set_text(' ') end)
|
||||||
return button
|
return button
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 127 KiB |
Loading…
Reference in New Issue