Skip to content

zinovyev/plain

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 

plain

Plain widgets pack for AwesomeWM 4

About

awesome panel with 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:

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:

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:

$ 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%

About

Plain widgets pack for AwesomeWM 4

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages