Switch to Lain widgets
This commit is contained in:
parent
1c42660271
commit
53ec2790a2
1 changed files with 28 additions and 8 deletions
|
@ -13,8 +13,7 @@ local beautiful = require("beautiful")
|
||||||
-- Notification library
|
-- Notification library
|
||||||
local naughty = require("naughty")
|
local naughty = require("naughty")
|
||||||
local menubar = require("menubar")
|
local menubar = require("menubar")
|
||||||
local cpu_widget = require("awesome-wm-widgets.cpu-widget.cpu-widget")
|
local lain = require("lain")
|
||||||
local ram_widget = require("awesome-wm-widgets.ram-widget.ram-widget")
|
|
||||||
local hotkeys_popup = require("awful.hotkeys_popup")
|
local hotkeys_popup = require("awful.hotkeys_popup")
|
||||||
-- Enable hotkeys help widget for VIM and other apps
|
-- Enable hotkeys help widget for VIM and other apps
|
||||||
-- when client with a matching name is opened:
|
-- when client with a matching name is opened:
|
||||||
|
@ -177,6 +176,29 @@ end
|
||||||
-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)
|
-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)
|
||||||
screen.connect_signal("property::geometry", set_wallpaper)
|
screen.connect_signal("property::geometry", set_wallpaper)
|
||||||
|
|
||||||
|
local mymem = lain.widget.mem {
|
||||||
|
settings = function()
|
||||||
|
widget:set_markup(" mem " .. mem_now.perc)
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
local mycpu = lain.widget.cpu {
|
||||||
|
settings = function()
|
||||||
|
widget:set_markup(" cpu " .. cpu_now.usage)
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
local myweather = lain.widget.weather({
|
||||||
|
APPID = "f6497dd133dd22b541abc8bbe8360f3b",
|
||||||
|
city_id = 5110302,
|
||||||
|
units = 'imperial',
|
||||||
|
timeout = 20, -- remove this
|
||||||
|
settings = function()
|
||||||
|
units = math.floor(weather_now["main"]["temp"])
|
||||||
|
widget:set_markup(" " .. units .. " ")
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
awful.screen.connect_for_each_screen(function(s)
|
awful.screen.connect_for_each_screen(function(s)
|
||||||
-- Wallpaper
|
-- Wallpaper
|
||||||
set_wallpaper(s)
|
set_wallpaper(s)
|
||||||
|
@ -223,13 +245,11 @@ awful.screen.connect_for_each_screen(function(s)
|
||||||
s.mytasklist, -- Middle widget
|
s.mytasklist, -- Middle widget
|
||||||
{ -- Right widgets
|
{ -- Right widgets
|
||||||
layout = wibox.layout.fixed.horizontal,
|
layout = wibox.layout.fixed.horizontal,
|
||||||
cpu_widget(),
|
mycpu.widget,
|
||||||
ram_widget({
|
mymem.widget,
|
||||||
widget_height = 48,
|
|
||||||
widget_width = 48,
|
|
||||||
color_buf = beautiful.fg_normal,
|
|
||||||
}),
|
|
||||||
wibox.widget.systray(),
|
wibox.widget.systray(),
|
||||||
|
myweather.icon,
|
||||||
|
myweather.widget,
|
||||||
mytextclock,
|
mytextclock,
|
||||||
s.mylayoutbox,
|
s.mylayoutbox,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue