-
-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding widgets to a theme #194
Comments
That's exactly what I was doing but for some reason awesome refuses to start after adding the simple date widget. |
I forgot to say that the If you want to know the exact cause of your issue, you have 2 options:
|
Thank you very much. Can you help me a little with this one? Then I will be able to add other vicious widgets to holo. This is the widget: (then I just add it to the wibox) local memwidget = wibox.widget.textbox() Holo is a bit different than the other themes in how widgets are handled and I couldn't find any examples of a vicious widget in holo. |
Fair enough. Thanks! |
Try this. local memory = lain.widget.mem {
settings = function()
local swap_perc = math.floor((mem_now.swap - mem_now.swapf) / mem_now.swap * 100)
widget:set_markup(markup.fontfg(theme.font, "#e0da37", -- reset this color as you like
mem_now.perc .. "% " .. swap_perc .. "% "))
end
} The markup call makes it use your theme font. |
Thank you very much, two questions:
local memory = lain.widget.mem { But with these two lines awesome refuses to star so soemthing is wrong. I'm just trying to imitate what was done with the other widgets in the holo theme. Any ideas? Thanks a lot for your help. Doing this alone would have been impossible... |
local memory = lain.widget.mem {
settings = function()
local swap_perc = math.floor((mem_now.swap - mem_now.swapf) / (mem_now.swap > 0 and mem_now.swap or 1) * 100)
widget:set_markup(lain.util.markup.fontfg(theme.font, "#FFFFFF",
mem_now.perc .. "% " .. swap_perc .. "% "))
end
}
local membg = wibox.container.background(memory.widget, theme.bg_focus, gears.shape.rectangle)
local memwidget = wibox.container.margin(membg, 0, 0, 5, 5) |
Thank you very much Luke. You helped me more than enough :) |
If you need any help in the future, remember you can always rely on the community. |
I'm trying to add a few widgets to the holo theme:
File sys info
Memory Widget
Uptime
etc.
I was trying to use vicious and I have added this to rc.lua
local vicious = require("vicious")
Then in the holo theme theme.lua I tried a simple example:
datewidget = wibox.widget.textbox()
vicious.register(datewidget, vicious.widgets.date, "%b %d, %R")
But this seems to make awesome unable to start (I wonder why).
Note this makes awesome unable to start even without adding the widget to a wibox.
Can you help me with a simple guide on how to add new widgets to one of the existing themes?
Thanks!
The text was updated successfully, but these errors were encountered: