Rework theme
Before Width: | Height: | Size: 327 B After Width: | Height: | Size: 492 B |
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 396 B |
Before Width: | Height: | Size: 228 B After Width: | Height: | Size: 486 B |
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 332 B |
@ -5,11 +5,11 @@ local wibox = require("wibox")
|
||||
local os, math, string = os, math, string
|
||||
|
||||
local fonts = {
|
||||
mono_regular = "Fira Code Regular 8",
|
||||
mono_bold = "Fira Code Bold 8"
|
||||
mono_regular = "Jetbrains Mono Bold 8",
|
||||
mono_bold = "Jetbrains Mono ExtraBold 8"
|
||||
}
|
||||
|
||||
fonts.widget = "Fira Code Bold 7"
|
||||
fonts.widget = "Jetbrains Mono Bold 7"
|
||||
|
||||
local colors = {
|
||||
dark = "#161616",
|
||||
@ -32,8 +32,8 @@ theme.font = fonts.mono_regular
|
||||
theme.taglist_font = fonts.mono_bold
|
||||
theme.tasklist_font = fonts.mono_regular
|
||||
|
||||
theme.bg_systray = "#000000"
|
||||
theme.systray_icon_spacing = 3
|
||||
theme.bg_systray = colors.accent
|
||||
theme.systray_icon_spacing = 8
|
||||
theme.fg_normal = colors.light
|
||||
theme.bg_normal = colors.dark .. "dd"
|
||||
theme.fg_wibar = colors.dark
|
||||
@ -71,8 +71,8 @@ theme.titlebar_bg_focus = "#000000"
|
||||
theme.titlebar_fg_normal = colors.white
|
||||
theme.titlebar_fg_focus = colors.white
|
||||
|
||||
theme.menu_height = 16
|
||||
theme.menu_width = 140
|
||||
theme.menu_height = 24
|
||||
theme.menu_width = 200
|
||||
|
||||
theme.notification_font = fonts.mono_regular
|
||||
theme.notification_bg = colors.dark .. "dd"
|
||||
@ -131,7 +131,13 @@ theme.titlebar_maximized_button_focus_inactive = theme.dir .. "/icons/titlebar/
|
||||
|
||||
local image = {}
|
||||
|
||||
function icon(dir, icon) return wibox.widget.imagebox(theme.dir .. "/icons/" .. dir .. "/" .. icon .. ".png") end
|
||||
function icon(dir, icon)
|
||||
return {
|
||||
layout = wibox.layout.margin,
|
||||
top = 3, bottom = 3, left = 1, right = 1,
|
||||
wibox.widget.imagebox(theme.dir .. "/icons/" .. dir .. "/" .. icon .. ".png")
|
||||
}
|
||||
end
|
||||
|
||||
-- systray
|
||||
image.systray_start = icon("bar", "start")
|
||||
@ -161,13 +167,16 @@ theme.black = theme.bg_normal
|
||||
local markup = lain.util.markup
|
||||
|
||||
-- Widgets
|
||||
local clock = awful.widget.textclock("<span font=\"" .. fonts.mono_bold .. "\" color=\"" .. colors.dark .. "\"> %a %d %b %H:%M </span>")
|
||||
local clock = awful.widget.textclock("<span font=\"" .. fonts.mono_bold .. "\" color=\"" .. colors.dark .. "\"> %H:%M </span>")
|
||||
local clock_widget = wibox.container.background(wibox.container.margin(wibox.widget { clock, layout = wibox.layout.align.horizontal }, 0, 1), colors.transparent)
|
||||
|
||||
local date = awful.widget.textclock("<span font=\"" .. fonts.mono_bold .. "\" color=\"" .. colors.dark .. "\"> %a %d %b </span>")
|
||||
local date_widget = wibox.container.background(wibox.container.margin(wibox.widget { date, layout = wibox.layout.align.horizontal }, 0, 1), colors.transparent)
|
||||
|
||||
-- Calendar
|
||||
local calendar = lain.widget.calendar({
|
||||
cal = "cal --color=always",
|
||||
attach_to = { clock_widget },
|
||||
attach_to = { date_widget },
|
||||
followtag = true,
|
||||
notification_preset = {
|
||||
font = fonts.mono_regular,
|
||||
@ -262,10 +271,10 @@ function theme.connect(s)
|
||||
screen = s,
|
||||
filter = awful.widget.taglist.filter.all,
|
||||
style = {
|
||||
shape = gears.shape.powerline
|
||||
shape = function(cr, width, height) return gears.shape.parallelogram(cr, width, height, width - 8) end
|
||||
},
|
||||
layout = {
|
||||
spacing = 0,
|
||||
spacing = 2,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
widget_template = {
|
||||
@ -277,8 +286,8 @@ function theme.connect(s)
|
||||
},
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
},
|
||||
left = 12,
|
||||
right = 12,
|
||||
left = 16,
|
||||
right = 16,
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
id = 'background_role',
|
||||
@ -291,56 +300,95 @@ function theme.connect(s)
|
||||
--s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons)
|
||||
|
||||
-- Create the wibox
|
||||
s.mywibox = awful.wibar({ position = "top", screen = s, height = 16, bg = theme.bg_wibar, fg = theme.fg_wibar, })
|
||||
s.mywibox = awful.wibar({ position = "top", screen = s, height = 18, bg = theme.bg_wibar, fg = theme.fg_wibar, type = dock })
|
||||
|
||||
s.tray = wibox.widget.systray()
|
||||
|
||||
-- s.tray:setup {
|
||||
-- layout = wibox.layout.margin,
|
||||
-- widget = wibox.container.background,
|
||||
-- bg = "#ff0000"
|
||||
-- }
|
||||
|
||||
-- Add widgets to the wibox
|
||||
s.mywibox:setup {
|
||||
layout = wibox.layout.align.horizontal,
|
||||
expand = 'none',
|
||||
{ -- Left widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
s.mytaglist,
|
||||
s.mypromptbox,
|
||||
layout = wibox.layout.margin,
|
||||
left = 8,
|
||||
{
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
s.mytaglist,
|
||||
s.mypromptbox,
|
||||
}
|
||||
},
|
||||
-- s.mytasklist, -- Middle widget
|
||||
{
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
clock_widget,
|
||||
date_widget,
|
||||
},
|
||||
{ -- Right widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
{
|
||||
layout = wibox.layout.margin,
|
||||
right = -8,
|
||||
{
|
||||
widget = wibox.container.background,
|
||||
shape = function (cr, w, h) gears.shape.parallelogram(cr, w, h, w - 8) end,
|
||||
color = "#000000",
|
||||
bg = "#000000",
|
||||
{
|
||||
layout = wibox.layout.margin,
|
||||
left = 20, right = 20,
|
||||
{
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
spacing = 8,
|
||||
-- Fs widget
|
||||
fs_widget,
|
||||
-- Temp
|
||||
temp_widget,
|
||||
-- CPU widget
|
||||
cpu_widget,
|
||||
-- Mem widget
|
||||
mem_widget,
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
-- tray
|
||||
{
|
||||
widget = wibox.container.background,
|
||||
shape = function (cr, w, h) gears.shape.powerline(cr, w, h, -h/2) end,
|
||||
color = "#000000",
|
||||
bg = "#000000",
|
||||
shape = function (cr, w, h) gears.shape.parallelogram(cr, w, h, w - 8) end,
|
||||
bg = "#FF9800",
|
||||
{
|
||||
layout = wibox.layout.margin,
|
||||
left = 15, right = 5,
|
||||
left = 8, right = 8,
|
||||
{
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
-- Fs widget
|
||||
fs_widget,
|
||||
-- Temp
|
||||
temp_widget,
|
||||
-- CPU widget
|
||||
cpu_widget,
|
||||
-- Mem widget
|
||||
mem_widget,
|
||||
-- tray
|
||||
{
|
||||
s.tray,
|
||||
widget = wibox.container.background,
|
||||
layout = wibox.layout.margin,
|
||||
left = 5, right = 5,
|
||||
},
|
||||
s.tray,
|
||||
clock_widget,
|
||||
}
|
||||
}
|
||||
},
|
||||
-- Layout box
|
||||
s.mylayoutbox,
|
||||
{
|
||||
layout = wibox.layout.margin,
|
||||
left = -8, right = -8,
|
||||
{
|
||||
widget = wibox.container.background,
|
||||
bg = "#000000",
|
||||
shape = function (cr, w, h) gears.shape.parallelogram(cr, w, h, w - 8) end,
|
||||
{
|
||||
layout = wibox.layout.margin,
|
||||
s.mylayoutbox,
|
||||
left = 16,
|
||||
right = 16,
|
||||
top = 1,
|
||||
bottom = 1,
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
end
|
||||
|