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