Commit 9775b1f2 authored by epsi sayidina's avatar epsi sayidina

awesome: 4.3: stacked statusbar

parent be6127f3
......@@ -93,7 +93,7 @@ function WB.generate_wibox_tasklist (s)
-- Create the wibox
s.wibox_top_bottom = awful.wibar({
position = "top",
position = "bottom",
screen = s,
height = "20",
widget = s.tasklist
......
--[[
Original Source Modified From: github.com/copycat-killer
https://github.com/copycat-killer/awesome-copycats/blob/master/rc.lua.copland
--]]
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- Standard awesome library
local awful = require("awful")
local beautiful = require("beautiful")
-- Wibox handling library
local wibox = require("wibox")
local W = {}
clone_widget_set = W -- object name
local I = {}
clone_icon_set = I -- object name
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
I.uptime = wibox.widget.imagebox(beautiful.widget_fs)
W.uptime = wibox.widget.textbox()
W.update_uptime = function()
local fg_color = "#000000"
local cmd = {"uptime", "-p"}
awful.spawn.easy_async(cmd, function(stdout, stderr, reason, exit_code)
W.uptime:set_markup(markup(fg_color, stdout))
end)
end
W.update_uptime()
local mytimer = timer({ timeout = 30 })
mytimer:connect_signal("timeout", W.update_uptime)
mytimer:start()
......@@ -64,7 +64,7 @@ function WB.generate_wibox_tasklist (s)
-- Create the wibox
s.wibox_top_bottom = awful.wibar({
position = "top",
position = "bottom",
screen = s,
height = "16",
widget = s.tasklist
......
......@@ -7,7 +7,12 @@ local wibox = require("wibox")
local lain = require("lain")
-- Custom Local Library
--require("statusbar.stacked.custom")
local gmc = require("themes.gmc")
-- progress bar related widgets -- after global markup
local config_path = awful.util.getdir("config") .. "statusbar/stacked/"
dofile(config_path .. "custom.lua")
-- }}}
-- Separators lain
......@@ -52,7 +57,7 @@ function WB.add_widgets_monitor_left (line, s)
setar(gmc.color['blue200'], gmc.color['blue300']),
setbg(icon_example, gmc.color['blue300']),
setar(gmc.color['blue300'], gmc.color['blue500']),
setbg(icon_example, gmc.color['blue400']),
setbg(icon_example, gmc.color['blue500']),
setar(gmc.color['blue500'], gmc.color['blue700']),
setbg(icon_example, gmc.color['blue700']),
setar(gmc.color['blue700'], gmc.color['blue900']),
......@@ -84,6 +89,19 @@ end
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
function WB.add_widgets_monitor_middle (line, s)
local cws = clone_widget_set
local cis = clone_icon_set
markup = lain.util.markup
return {
layout = wibox.layout.fixed.horizontal,
cis.uptime, cws.uptime,
}
end
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
function WB.generate_wibox_two (s)
-- layout: l_left, nil, tasklist
......@@ -94,7 +112,7 @@ function WB.generate_wibox_two (s)
s.wibox_two:setup {
layout = wibox.layout.align.horizontal,
WB.add_widgets_monitor_left (s),
nil,
WB.add_widgets_monitor_middle (s),
WB.add_widgets_monitor_right (s),
}
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment