From bbd48a17c2950cfeee2c8c6f4c7f09494e46de40 Mon Sep 17 00:00:00 2001 From: Kacper Donat Date: Mon, 11 Mar 2019 21:41:13 +0100 Subject: [PATCH] more awesome awesome --- awesome/rc.lua | 16 +++--- awesome/themes/kadet/theme.lua | 96 ++++++++++++++++++++++++---------- 2 files changed, 76 insertions(+), 36 deletions(-) diff --git a/awesome/rc.lua b/awesome/rc.lua index aa57fa4..42a5601 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -501,19 +501,15 @@ awful.rules.rules = { -- Set Firefox to always map on the first tag on screen 1. { rule = { class = "Firefox" }, - properties = { maximized = true, titlebars_enabled = false, tag = awful.util.tagnames[3] } }, + properties = { maximized = true, tag = awful.util.tagnames[3] } }, -- Jetbrains stuff { rule_any = { class = { "jetbrains-phpstorm", "jetbrains-idea", "jetbrains-pycharm" } }, 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 { 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 { rule = { class = "flameshot" }, @@ -530,6 +526,10 @@ awful.rules.rules = { -- quake { rule = { class = "QuakeDD" }, properties = { allow_titlebars = false } }, + + -- dialogs + { rule = { type = "dialog" }, + properties = { titlebars_enabled = true, floating = true, maximized = false, border_width = 1 } }, } -- Signals @@ -597,7 +597,7 @@ client.connect_signal("request::titlebars", function(c) awful.titlebar.widget.ontopbutton (c), awful.titlebar.widget.maximizedbutton(c), awful.titlebar.widget.closebutton (c), - layout = wibox.layout.fixed.horizontal(), + layout = wibox.layout.fixed.horizontal, spacing = 6 }, layout = wibox.layout.margin, @@ -614,7 +614,7 @@ client.connect_signal("property::floating", function (c) end awful.titlebar.show(c) - else + elseif not c.floating then awful.titlebar.hide(c) end end) diff --git a/awesome/themes/kadet/theme.lua b/awesome/themes/kadet/theme.lua index 41d7391..1d50c46 100644 --- a/awesome/themes/kadet/theme.lua +++ b/awesome/themes/kadet/theme.lua @@ -18,7 +18,7 @@ local colors = { attention = "#fc5d19", transparent = "#00000000", - transparency = "22", + transparency = "30", } colors.background = colors.dark .. colors.transparency @@ -47,7 +47,7 @@ theme.fg_widget = colors.light theme.taglist_bg_focus = colors.dark 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_bg_empty = colors.tramsparent 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.tasklist_disable_icon = true -theme.useless_gap = 7 +theme.useless_gap = 4 -- titlebar 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 -- Widgets -local clock = awful.widget.textclock(" %a %d %b %H:%M ") -local clock_widget = wibox.container.background(wibox.container.margin(wibox.widget { clock, layout = wibox.layout.align.horizontal }, 0, 1), colors.widget_bg) +local clock = awful.widget.textclock(" %a %d %b %H:%M ") +local clock_widget = wibox.container.background(wibox.container.margin(wibox.widget { clock, layout = wibox.layout.align.horizontal }, 0, 1), colors.transparent) -- 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 .. "%]"))) 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 @@ -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 .. "% "))) 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) @@ -199,7 +199,7 @@ local temp = lain.widget.temp({ widget:set_markup(markup.font(fonts.widget, markup.fg.color(theme.fg_widget, " " .. coretemp_now .. "° "))) 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 @@ -211,7 +211,7 @@ local fs = lain.widget.fs({ widget:set_markup(markup.font(fonts.widget, markup.fg.color(theme.fg_widget, fsp))) 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) -- Quake application @@ -253,7 +253,34 @@ function theme.connect(s) awful.button({ }, 4, function () awful.layout.inc( 1) end), awful.button({ }, 5, function () awful.layout.inc(-1) end))) -- 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 --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 s.mywibox:setup { layout = wibox.layout.align.horizontal, + expand = 'none', { -- Left widgets layout = wibox.layout.fixed.horizontal, s.mytaglist, s.mypromptbox, }, -- s.mytasklist, -- Middle widget - nil, + { + layout = wibox.layout.fixed.horizontal, + clock_widget, + }, { -- Right widgets 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, - layout = wibox.layout.margin, - color = "#000000", - left = 5, right = 5 + widget = wibox.container.background, + shape = gears.shape.powerline, + color = "#000000", + 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 s.mylayoutbox, },