add usage info
This commit is contained in:
parent
e572e841d8
commit
786a27c7b7
38
README.md
38
README.md
@ -1,3 +1,41 @@
|
||||
# awesome-powermenu
|
||||
|
||||
Simple popup power menu for awesomewm
|
||||
|
||||
## Usage
|
||||
|
||||
`require` the library:
|
||||
|
||||
```
|
||||
local powermenu = require "awesome-powermenu"
|
||||
```
|
||||
|
||||
Initialise the menu:
|
||||
|
||||
```
|
||||
powermenu.new()
|
||||
```
|
||||
|
||||
Bind it to something:
|
||||
|
||||
```
|
||||
global_key({modkey}, "p", function() powermenuPopup:toggle() end,
|
||||
"show power menu", "launcher")
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
```
|
||||
powermenu.buttonsize = 128,
|
||||
powermenu.spacing = 5,
|
||||
powermenu.iconPath = gears.filesystem.get_configuration_dir() .. "/powermenu/",
|
||||
powermenu.lock = function()
|
||||
-- your lock function here
|
||||
end,
|
||||
powermenu.suspend = function()
|
||||
-- your suspend function here
|
||||
end
|
||||
powermenu.poweroff = function()
|
||||
-- your power off function here
|
||||
end
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user