Comments (4)
depends how your rc.lua
looks like. The current default contains a section which looks like:
awful.titlebar(c) : setup {
{ -- Left
...
},
{ -- Middle
...
},
{ -- Right
...
},
layout = wibox.layout.align.horizontal
}
you can insert battery.widget
there as you like it.
The usage example from the README is from a time where the default looked different, I believe.
from battery-widget.
Oh, forget what I said! This is for the client titlebars, not the wibox.
Instead, look for:
s.mywibox:setup {
layout = wibox.layout.align.horizontal,
{ -- Left widgets
...
},
s.mytasklist, -- Middle widget
{ -- Right widgets
...
},
}
from battery-widget.
I know that I can add it this way, however I would like to add it after the initial run of s.mywibox:setup
. Is that still possible? The reason is that I use the same rc.lua for both desktop and laptop. I wrote a little lua snippet which finds out on which device I am, now I would like to add it to the wibox.
from battery-widget.
Oh. Well, you can restructure your init code like this:
local right_layout = {
...
}
if laptop then table.insert(right_layout, battery.widget) end
s.mywibox:setup {
layout = wibox.layout.align.horizontal,
left_layout,
nil,
right_layout,
}
Or just look into the awesome documentation.
from battery-widget.
Related Issues (11)
- Error on init.lua:143 HOT 4
- Widget only displays battery prefix HOT 5
- Port to FreeBSD
- Error init.lua:272: attempt to compare number with string HOT 2
- Widget Fails on Battery Power (Pinebook Pro) HOT 2
- Font to small. HOT 2
- error on install HOT 4
- Unicode character support assistance HOT 4
- "Capacity 119%" in your screenshot HOT 1
- Rename battery-widget.lua to init.lua HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from battery-widget.