Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zinovyev/plain
Plain widgets pack for AwesomeWM 4
https://github.com/zinovyev/plain
Last synced: 1 day ago
JSON representation
Plain widgets pack for AwesomeWM 4
- Host: GitHub
- URL: https://github.com/zinovyev/plain
- Owner: zinovyev
- License: mit
- Created: 2017-02-18T12:46:52.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-24T14:51:14.000Z (almost 8 years ago)
- Last Synced: 2024-11-08T21:12:34.742Z (about 2 months ago)
- Language: Lua
- Size: 22.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# plain
Plain widgets pack for AwesomeWM 4## About
![awesome panel with plain widgets](/docs/images/panel.png "plain widgets")
Simple plain text widgets set for AwesomeWM and a framework for building them.
You'll love it if you like simple user interfaces as me.Ccontains thouse widgets:
* _Battery_ widget: `plain.widget.battery()`;
* _Backlight controll_ widget: `plain.widget.backlight()`;
* _Volume controll_ widget: `plain.widget.volume()`;
* _Seprator_ (text widget): `plain.widget.separator()`;## Install
Install with luarocks:
```bash
sudo luarocks install plain
```Nessesary packages are:
* `xbacklight` is needed for backlight widget to work;
* `alsa-utils` for volume widget to work;## Set Up
In your `rc.lua`:
```lua
local plain = require('plain')-- ...
-- {{{ MyWidgets
local mybattery = plain.widget.battery()
-- }}}-- ...
awful.screen.connect_for_each_screen(function(s)
-- ...
-- Add widgets to the wibox
s.mywibox:setup {
layout = wibox.layout.align.horizontal,
{ -- Left widgets
layout = wibox.layout.fixed.horizontal,
s.mytaglist,
s.mypromptbox,
},
s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
mykeyboardlayout,
wibox.widget.systray(),
mybattery(), -- <-- This line here!
mytextclock,
s.mylayoutbox,
},
}
end)
```## Call manually
You can try any widget calling it manually:
```bash
$ lua
Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio
> plain = require('plain')
> battery = plain.widget:battery()
> battery:get_status()
nil
> battery:refresh()
table: 0x2205440
> battery:get_status()
FULL 100%
```