more awesome awesome

This commit is contained in:
Kacper Donat 2019-03-11 21:41:13 +01:00
parent f4e4cd5106
commit bbd48a17c2
2 changed files with 76 additions and 36 deletions

View File

@ -501,19 +501,15 @@ awful.rules.rules = {
-- Set Firefox to always map on the first tag on screen 1. -- Set Firefox to always map on the first tag on screen 1.
{ rule = { class = "Firefox" }, { rule = { class = "Firefox" },
properties = { maximized = true, titlebars_enabled = false, tag = awful.util.tagnames[3] } }, properties = { maximized = true, tag = awful.util.tagnames[3] } },
-- Jetbrains stuff -- Jetbrains stuff
{ rule_any = { class = { "jetbrains-phpstorm", "jetbrains-idea", "jetbrains-pycharm" } }, { rule_any = { class = { "jetbrains-phpstorm", "jetbrains-idea", "jetbrains-pycharm" } },
properties = { titlebars_enabled = false, tag = awful.util.tagnames[1], maximized = false } }, properties = { titlebars_enabled = false, tag = awful.util.tagnames[1], maximized = false } },
-- dialogs
{ rule = { type = "dialog" },
properties = { titlebars_enabled = true, floating = true, maximized = false, border_width = 1 } },
-- jetbrains bugs -- jetbrains bugs
{ rule = { class = "jetbrains-.*", name = "win.*" }, { rule = { class = "jetbrains-.*", name = "win.*" },
properties = { titlebars_enabled = false, focusable = false, focus = true, floating = true, placement = awful.placement.restore }, no_titlebars = true }, properties = { titlebars_enabled = false, focusable = false, focus = true, floating = true, placement = awful.placement.restore } },
-- flameshot -- flameshot
{ rule = { class = "flameshot" }, { rule = { class = "flameshot" },
@ -530,6 +526,10 @@ awful.rules.rules = {
-- quake -- quake
{ rule = { class = "QuakeDD" }, { rule = { class = "QuakeDD" },
properties = { allow_titlebars = false } }, properties = { allow_titlebars = false } },
-- dialogs
{ rule = { type = "dialog" },
properties = { titlebars_enabled = true, floating = true, maximized = false, border_width = 1 } },
} }
-- Signals -- Signals
@ -597,7 +597,7 @@ client.connect_signal("request::titlebars", function(c)
awful.titlebar.widget.ontopbutton (c), awful.titlebar.widget.ontopbutton (c),
awful.titlebar.widget.maximizedbutton(c), awful.titlebar.widget.maximizedbutton(c),
awful.titlebar.widget.closebutton (c), awful.titlebar.widget.closebutton (c),
layout = wibox.layout.fixed.horizontal(), layout = wibox.layout.fixed.horizontal,
spacing = 6 spacing = 6
}, },
layout = wibox.layout.margin, layout = wibox.layout.margin,
@ -614,7 +614,7 @@ client.connect_signal("property::floating", function (c)
end end
awful.titlebar.show(c) awful.titlebar.show(c)
else elseif not c.floating then
awful.titlebar.hide(c) awful.titlebar.hide(c)
end end
end) end)

View File

@ -18,7 +18,7 @@ local colors = {
attention = "#fc5d19", attention = "#fc5d19",
transparent = "#00000000", transparent = "#00000000",
transparency = "22", transparency = "30",
} }
colors.background = colors.dark .. colors.transparency colors.background = colors.dark .. colors.transparency
@ -47,7 +47,7 @@ theme.fg_widget = colors.light
theme.taglist_bg_focus = colors.dark theme.taglist_bg_focus = colors.dark
theme.taglist_fg_focus = colors.accent theme.taglist_fg_focus = colors.accent
theme.taglist_bg_occupied = colors.dark .. "66" theme.taglist_bg_occupied = colors.dark .. "40"
theme.taglist_fg_occupied = colors.dark theme.taglist_fg_occupied = colors.dark
theme.taglist_bg_empty = colors.tramsparent theme.taglist_bg_empty = colors.tramsparent
theme.taglist_fg_empty = colors.dark theme.taglist_fg_empty = colors.dark
@ -110,7 +110,7 @@ theme.layout_cornerne = theme.dir .. "/icons/layout/cp
theme.layout_cornernw = theme.dir .. "/icons/layout/cornernw.png" theme.layout_cornernw = theme.dir .. "/icons/layout/cornernw.png"
theme.tasklist_disable_icon = true theme.tasklist_disable_icon = true
theme.useless_gap = 7 theme.useless_gap = 4
-- titlebar -- titlebar
theme.titlebar_close_button_focus = theme.dir .. "/icons/titlebar/close.png" theme.titlebar_close_button_focus = theme.dir .. "/icons/titlebar/close.png"
@ -160,8 +160,8 @@ theme.black = theme.bg_normal
local markup = lain.util.markup local markup = lain.util.markup
-- Widgets -- Widgets
local clock = awful.widget.textclock("<span font=\"" .. fonts.widget .. "\" color=\"" .. colors.light .. "\"> %a %d %b %H:%M </span>") local clock = awful.widget.textclock("<span font=\"" .. fonts.mono_bold .. "\" color=\"" .. colors.dark .. "\"> %a %d %b %H:%M </span>")
local clock_widget = wibox.container.background(wibox.container.margin(wibox.widget { clock, layout = wibox.layout.align.horizontal }, 0, 1), colors.widget_bg) local clock_widget = wibox.container.background(wibox.container.margin(wibox.widget { clock, layout = wibox.layout.align.horizontal }, 0, 1), colors.transparent)
-- Calendar -- Calendar
local calendar = lain.widget.calendar({ local calendar = lain.widget.calendar({
@ -180,7 +180,7 @@ local mem = lain.widget.mem({
widget:set_markup(markup.font(fonts.widget, markup.fg.color(theme.fg_widget, " " .. mem_now.used .. "MB [" .. mem_now.perc .. "%]"))) widget:set_markup(markup.font(fonts.widget, markup.fg.color(theme.fg_widget, " " .. mem_now.used .. "MB [" .. mem_now.perc .. "%]")))
end end
}) })
local mem_widget = wibox.container.background(wibox.container.margin(wibox.widget { image.icons.mem, mem.widget, layout = wibox.layout.align.horizontal }, 0, 0), colors.widget_bg) local mem_widget = wibox.widget { image.icons.mem, mem.widget, layout = wibox.layout.align.horizontal }
-- CPU -- CPU
@ -189,7 +189,7 @@ local cpu = lain.widget.cpu({
widget:set_markup(markup.font(fonts.widget, markup.fg.color(theme.fg_widget, " " .. cpu_now.usage .. "% "))) widget:set_markup(markup.font(fonts.widget, markup.fg.color(theme.fg_widget, " " .. cpu_now.usage .. "% ")))
end end
}) })
local cpu_widget = wibox.container.background(wibox.container.margin(wibox.widget { image.icons.cpu, cpu.widget, layout = wibox.layout.align.horizontal }, 0, 0), colors.widget_bg) local cpu_widget = wibox.widget { image.icons.cpu, cpu.widget, layout = wibox.layout.align.horizontal }
-- Coretemp (lain, average) -- Coretemp (lain, average)
@ -199,7 +199,7 @@ local temp = lain.widget.temp({
widget:set_markup(markup.font(fonts.widget, markup.fg.color(theme.fg_widget, " " .. coretemp_now .. "° "))) widget:set_markup(markup.font(fonts.widget, markup.fg.color(theme.fg_widget, " " .. coretemp_now .. "° ")))
end end
}) })
local temp_widget = wibox.container.background(wibox.container.margin(wibox.widget { image.icons.temp, temp.widget, layout = wibox.layout.align.horizontal }, 0, 0), colors.widget_bg) local temp_widget = wibox.widget { image.icons.temp, temp.widget, layout = wibox.layout.align.horizontal }
-- FS -- FS
@ -211,7 +211,7 @@ local fs = lain.widget.fs({
widget:set_markup(markup.font(fonts.widget, markup.fg.color(theme.fg_widget, fsp))) widget:set_markup(markup.font(fonts.widget, markup.fg.color(theme.fg_widget, fsp)))
end end
}) })
local fs_widget = wibox.container.background(wibox.container.margin(wibox.widget { image.icons.hdd, fs.widget, layout = wibox.layout.align.horizontal }, 0, 0), colors.widget_bg) local fs_widget = wibox.widget { image.icons.hdd, fs.widget, layout = wibox.layout.align.horizontal }
function theme.connect(s) function theme.connect(s)
-- Quake application -- Quake application
@ -253,7 +253,34 @@ function theme.connect(s)
awful.button({ }, 4, function () awful.layout.inc( 1) end), awful.button({ }, 4, function () awful.layout.inc( 1) end),
awful.button({ }, 5, function () awful.layout.inc(-1) end))) awful.button({ }, 5, function () awful.layout.inc(-1) end)))
-- Create a taglist widget -- Create a taglist widget
s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons) s.mytaglist = awful.widget.taglist {
screen = s,
filter = awful.widget.taglist.filter.all,
style = {
shape = gears.shape.powerline
},
layout = {
spacing = 0,
layout = wibox.layout.fixed.horizontal
},
widget_template = {
{
{
{
id = 'text_role',
widget = wibox.widget.textbox,
},
layout = wibox.layout.fixed.horizontal,
},
left = 12,
right = 12,
widget = wibox.container.margin
},
id = 'background_role',
widget = wibox.container.background,
},
buttons = awful.util.taglist_buttons
}
-- Create a tasklist widget -- Create a tasklist widget
--s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons) --s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons)
@ -266,34 +293,47 @@ function theme.connect(s)
-- Add widgets to the wibox -- Add widgets to the wibox
s.mywibox:setup { s.mywibox:setup {
layout = wibox.layout.align.horizontal, layout = wibox.layout.align.horizontal,
expand = 'none',
{ -- Left widgets { -- Left widgets
layout = wibox.layout.fixed.horizontal, layout = wibox.layout.fixed.horizontal,
s.mytaglist, s.mytaglist,
s.mypromptbox, s.mypromptbox,
}, },
-- s.mytasklist, -- Middle widget -- s.mytasklist, -- Middle widget
nil, {
layout = wibox.layout.fixed.horizontal,
clock_widget,
},
{ -- Right widgets { -- Right widgets
layout = wibox.layout.fixed.horizontal, layout = wibox.layout.fixed.horizontal,
image.systray_start,
-- Fs widget
fs_widget,
-- Temp
temp_widget,
-- CPU widget
cpu_widget,
-- Mem widget
mem_widget,
-- Clock
clock_widget,
-- tray
{ {
s.tray, widget = wibox.container.background,
layout = wibox.layout.margin, shape = gears.shape.powerline,
color = "#000000", color = "#000000",
left = 5, right = 5 bg = "#000000",
{
layout = wibox.layout.margin,
left = 15, right = 5,
{
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,
},
}
}
}, },
image.systray_end,
-- Layout box -- Layout box
s.mylayoutbox, s.mylayoutbox,
}, },