auotstart basic

This commit is contained in:
Sakooooo 2023-08-06 23:12:34 +03:00
parent 8838778d84
commit ff6addd181
Signed by: sako
GPG key ID: 3FD715D87D7725E0

View file

@ -22,9 +22,11 @@ require("awful.hotkeys_popup.keys")
-- Check if awesome encountered an error during startup and fell back to
-- another config (This code will only ever execute for the fallback config)
if awesome.startup_errors then
naughty.notify({ preset = naughty.config.presets.critical,
naughty.notify({
preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors })
text = awesome.startup_errors
})
end
-- Handle runtime errors after startup
@ -35,9 +37,11 @@ do
if in_error then return end
in_error = true
naughty.notify({ preset = naughty.config.presets.critical,
naughty.notify({
preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = tostring(err) })
text = tostring(err)
})
in_error = false
end)
end
@ -90,13 +94,16 @@ myawesomemenu = {
{ "quit", function() awesome.quit() end },
}
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
mymainmenu = awful.menu({
items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
{ "open terminal", terminal }
}
})
mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
menu = mymainmenu })
mylauncher = awful.widget.launcher({
image = beautiful.awesome_icon,
menu = mymainmenu
})
-- Menubar configuration
menubar.utils.terminal = terminal -- Set the terminal for applications that require it
@ -201,14 +208,16 @@ awful.screen.connect_for_each_screen(function(s)
-- Add widgets to the wibox
s.mywibox:setup {
layout = wibox.layout.align.horizontal,
{ -- Left widgets
{
-- Left widgets
layout = wibox.layout.fixed.horizontal,
mylauncher,
s.mytaglist,
s.mypromptbox,
},
s.mytasklist, -- Middle widget
{ -- Right widgets
{
-- Right widgets
layout = wibox.layout.fixed.horizontal,
mykeyboardlayout,
wibox.widget.systray(),
@ -280,7 +289,6 @@ globalkeys = gears.table.join(
{ description = "reload awesome", group = "awesome" }),
awful.key({ modkey, "Shift" }, "q", awesome.quit,
{ description = "quit awesome", group = "awesome" }),
awful.key({ modkey, }, "l", function() awful.tag.incmwfact(0.05) end,
{ description = "increase master width factor", group = "layout" }),
awful.key({ modkey, }, "h", function() awful.tag.incmwfact(-0.05) end,
@ -445,8 +453,10 @@ root.keys(globalkeys)
-- Rules to apply to new clients (through the "manage" signal).
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
{
rule = {},
properties = {
border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
raise = true,
@ -458,7 +468,8 @@ awful.rules.rules = {
},
-- Floating clients.
{ rule_any = {
{
rule_any = {
instance = {
"DTA", -- Firefox addon DownThemAll.
"copyq", -- Includes session name in class.
@ -486,11 +497,15 @@ awful.rules.rules = {
"ConfigManager", -- Thunderbird's about:config.
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
}
}, properties = { floating = true }},
},
properties = { floating = true }
},
-- Add titlebars to normal clients and dialogs
{ rule_any = {type = { "normal", "dialog" }
}, properties = { titlebars_enabled = true }
{
rule_any = { type = { "normal", "dialog" }
},
properties = { titlebars_enabled = true }
},
-- Set Firefox to always map on the tag named "2" on screen 1.
@ -529,20 +544,24 @@ client.connect_signal("request::titlebars", function(c)
)
awful.titlebar(c):setup {
{ -- Left
{
-- Left
awful.titlebar.widget.iconwidget(c),
buttons = buttons,
layout = wibox.layout.fixed.horizontal
},
{ -- Middle
{ -- Title
{
-- Middle
{
-- Title
align = "center",
widget = awful.titlebar.widget.titlewidget(c)
},
buttons = buttons,
layout = wibox.layout.flex.horizontal
},
{ -- Right
{
-- Right
awful.titlebar.widget.floatingbutton(c),
awful.titlebar.widget.maximizedbutton(c),
awful.titlebar.widget.stickybutton(c),
@ -565,3 +584,7 @@ client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_n
-- Gaps for dopamine
beautiful.useless_gap = 5
-- Autostart for bloatware
awful.spawn.with_shell("feh --bg-scale /home/sako/background.png")
awful.spawn.with_shell("keepassxc")