Big changes

This commit is contained in:
2022-04-14 00:35:06 +03:00
parent 5b218de55a
commit 9136f7ef3d
96 changed files with 1780 additions and 671 deletions

View File

@@ -3,166 +3,36 @@ local awful = require("awful")
local wibox = require("wibox")
local beautiful = require("beautiful")
beautiful.bg_systray = "#2e3440"
beautiful.tasklist_bg_normal = "#2e3440"
beautiful.tasklist_bg_focus = "#4c566a"
beautiful.tasklist_bg_urgent = "#bf616a"
beautiful.tasklist_bg_minimize = "#5e81ac"
require "screen.wibar.widgets"
mykeyboardlayout = awful.widget.keyboardlayout()
mytextclock = wibox.widget.textclock()
mysystray = wibox.widget.systray()
function wibar_builder(s)
local w = awful.wibar({
screen = s,
position = "top",
bg = beautiful.bg_systray,
height = 26,
})
local taglist_buttons =
gears.table.join(
awful.button(
{},
1,
function(t)
t:view_only()
end
),
awful.button(
{modkey},
1,
function(t)
if client.focus then
client.focus:move_to_tag(t)
end
end
),
awful.button({}, 3, awful.tag.viewtoggle),
awful.button(
{modkey},
3,
function(t)
if client.focus then
client.focus:toggle_tag(t)
end
end
),
awful.button(
{},
4,
function(t)
awful.tag.viewnext(t.screen)
end
),
awful.button(
{},
5,
function(t)
awful.tag.viewprev(t.screen)
end
)
)
local taglist = taglist(s)
local tasklist = tasklist(s)
local layoutbox = layoutbox(s)
local tasklist_buttons =
gears.table.join(
awful.button(
{},
1,
function(c)
if c == client.focus then
c.minimized = true
else
c:emit_signal("request::activate", "tasklist", {raise = true})
end
end
),
awful.button(
{},
4,
function()
awful.client.focus.byidx(1)
end
),
awful.button(
{},
5,
function()
awful.client.focus.byidx(-1)
end
)
)
awful.screen.connect_for_each_screen(
function(s)
-- Wallpaper
set_wallpaper(s)
-- Tags
awful.tag({"1", "2", "3", "4", "5", "6", "7", "8", "9"}, s, awful.layout.layouts[1])
s.mytaglist = awful.widget.taglist {
screen = s,
filter = awful.widget.taglist.filter.all,
buttons = taglist_buttons
w:setup{
expand = "none",
layout = wibox.layout.align.horizontal,
{
layout = wibox.layout.fixed.horizontal,
taglist,
},
tasklist,
{
layout = wibox.layout.fixed.horizontal,
systray,
keyboardlayout,
clock,
layoutbox,
}
}
-- Layout Box
s.mylayoutbox = awful.widget.layoutbox(s)
s.mylayoutbox:buttons(
gears.table.join(
awful.button(
{},
1,
function()
awful.layout.inc(1)
end
),
awful.button(
{},
3,
function()
awful.layout.inc(-1)
end
),
awful.button(
{},
4,
function()
awful.layout.inc(1)
end
),
awful.button(
{},
5,
function()
awful.layout.inc(-1)
end
)
)
)
-- Create a tasklist widget
s.mytasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
buttons = tasklist_buttons,
}
-- Wibar initialization
s.mywibox = awful.wibar({
position = "top",
screen = s,
bg = "#2e3440"
})
s.mywibox:setup {
layout = wibox.layout.align.horizontal,
{
layout = wibox.layout.fixed.horizontal,
s.mytaglist,
},
s.mytasklist,
{
layout = wibox.layout.fixed.horizontal,
mysystray,
mykeyboardlayout,
mytextclock,
s.mylayoutbox,
}
}
end
)
return w
end