Add config files for awesomewm, alacritty, picom and rofi
This commit is contained in:
33
awesome/main/error_handling.lua
Normal file
33
awesome/main/error_handling.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
----------------------------------------------------------------
|
||||
-- This class is to output an error if you fuck up the config --
|
||||
----------------------------------------------------------------
|
||||
-- Awesome Libs
|
||||
local naughty = require("naughty")
|
||||
|
||||
if awesome.startup_errors then
|
||||
naughty.notify({
|
||||
preset = naughty.config.presets.critical,
|
||||
title = "ERROR in Awesome config!",
|
||||
text = awesome.startup_errors
|
||||
})
|
||||
end
|
||||
|
||||
do
|
||||
local in_error = false
|
||||
awesome.connect_signal(
|
||||
"debug::error",
|
||||
function (err)
|
||||
if in_error then
|
||||
return
|
||||
end
|
||||
in_error = true
|
||||
|
||||
naughty.notify({
|
||||
preset = naughty.config.presets.critical,
|
||||
title = "ERROR",
|
||||
text = tostring(err)
|
||||
})
|
||||
in_error = false
|
||||
end
|
||||
)
|
||||
end
|
||||
18
awesome/main/layouts.lua
Normal file
18
awesome/main/layouts.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
------------------------------------------------------------------------------------------
|
||||
-- Layout class, if you want to add or remove layouts from the list do it in this table --
|
||||
------------------------------------------------------------------------------------------
|
||||
-- Awesome Libs
|
||||
local awful = require("awful")
|
||||
|
||||
local _M = { }
|
||||
|
||||
function _M.get()
|
||||
local layouts = {
|
||||
awful.layout.suit.tile,
|
||||
awful.layout.suit.floating,
|
||||
}
|
||||
|
||||
return layouts
|
||||
end
|
||||
|
||||
return _M.get
|
||||
46
awesome/main/menu.lua
Normal file
46
awesome/main/menu.lua
Normal file
@@ -0,0 +1,46 @@
|
||||
--------------------------------------------------------------
|
||||
-- Menu class, this is where you change the rightclick menu --
|
||||
--------------------------------------------------------------
|
||||
-- Awesome Libs
|
||||
local awful = require("awful")
|
||||
|
||||
-- Menu Namespace
|
||||
local M = { }
|
||||
|
||||
-- Module Namespace
|
||||
local _M = { }
|
||||
|
||||
local terminal = RC.vars.terminal
|
||||
|
||||
M.session = {
|
||||
{ "Logout", function () awful.spawn.with_shell('logout') end },
|
||||
{ "Shutdown", function () awful.spawn.with_shell('shutdown now') end },
|
||||
{ "Reboot", function () awful.spawn.with_shell('reboot') end },
|
||||
}
|
||||
|
||||
M.applications = {
|
||||
{ "Brave", "brave-browser" },
|
||||
{ "VS Code", "code" },
|
||||
{ "Blender", "blender" },
|
||||
{ "Steam", "steam" },
|
||||
{ "Lutris", "lutris" },
|
||||
}
|
||||
|
||||
M.settings = {
|
||||
{ "General Settings", "gnome-control-center" },
|
||||
{ "Power Settings", "xfce4-power-manager-settings" },
|
||||
{ "Display Settings", "arandr" }
|
||||
}
|
||||
|
||||
function _M.get()
|
||||
local menu_items = {
|
||||
{ "Power Menu", M.session },
|
||||
{ "Applications", M.applications },
|
||||
{ "Open Terminal", terminal },
|
||||
{ "Settings", M.settings },
|
||||
}
|
||||
|
||||
return menu_items
|
||||
end
|
||||
|
||||
return _M.get
|
||||
52
awesome/main/rules.lua
Normal file
52
awesome/main/rules.lua
Normal file
@@ -0,0 +1,52 @@
|
||||
-------------------------------------------------------------------------------------------------
|
||||
-- This class contains rules for float exceptions or special themeing for certain applications --
|
||||
-------------------------------------------------------------------------------------------------
|
||||
|
||||
-- Awesome Libs
|
||||
local awful = require("awful")
|
||||
local beautiful = require("beautiful")
|
||||
|
||||
local _M = { }
|
||||
|
||||
function _M.get(clientkeys, clientbuttons)
|
||||
local rules = {
|
||||
{
|
||||
rule = { },
|
||||
properties = {
|
||||
border_width = beautiful.border_width,
|
||||
border_color = beautiful.border_normal,
|
||||
focus = awful.client.focus.filter,
|
||||
raise = true,
|
||||
keys = clientkeys,
|
||||
buttons = clientbuttons,
|
||||
screen = awful.screen.preferred,
|
||||
placement = awful.placement.no_overlap+awful.placement.no_offscreen
|
||||
}
|
||||
},
|
||||
{
|
||||
rule_any = {
|
||||
instance = { },
|
||||
class = {
|
||||
"Arandr",
|
||||
"Tor Browser"
|
||||
},
|
||||
name = { },
|
||||
role = {
|
||||
"AlarmWindow",
|
||||
"ConfigManager",
|
||||
"pop-up"
|
||||
}
|
||||
},
|
||||
properties = { floating = true }
|
||||
},
|
||||
{
|
||||
rule_any = {
|
||||
type = { "normal", "dialog" }
|
||||
},
|
||||
properties = { titlebars_enabled = false }
|
||||
}
|
||||
}
|
||||
return rules
|
||||
end
|
||||
|
||||
return _M.get
|
||||
22
awesome/main/signals.lua
Normal file
22
awesome/main/signals.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
-- Awesome Libs
|
||||
local awful = require("awful")
|
||||
local beautiful = require("beautiful")
|
||||
|
||||
client.connect_signal(
|
||||
"manage",
|
||||
function (c)
|
||||
if awesome.startup and not c.size_hints.user_porition and not c.size_hints.program_position then
|
||||
awful.placement.no_offscreen(c)
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
-- Workaround for focused border color, why in the love of god doesnt it work with
|
||||
-- beautiful.border_focus
|
||||
client.connect_signal("focus", function (c)
|
||||
c.border_color = "#bdbdbd"
|
||||
end)
|
||||
|
||||
client.connect_signal("unfocus", function (c)
|
||||
c.border_color = beautiful.border_normal
|
||||
end)
|
||||
27
awesome/main/tags.lua
Normal file
27
awesome/main/tags.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
-- Here are the ammount of tags generated, edit the awful.tag args if you want a different ammount --
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
|
||||
-- Awesome Libs
|
||||
local awful = require("awful")
|
||||
|
||||
local _M = { }
|
||||
|
||||
function _M.get()
|
||||
local tags = {}
|
||||
awful.screen.connect_for_each_screen(
|
||||
function (s)
|
||||
tags[s] = awful.tag(
|
||||
{
|
||||
"1", "2", "3", "4"
|
||||
},
|
||||
s,
|
||||
RC.layouts[1]
|
||||
)
|
||||
end
|
||||
)
|
||||
|
||||
return tags
|
||||
end
|
||||
|
||||
return _M.get
|
||||
19
awesome/main/theme.lua
Normal file
19
awesome/main/theme.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
local awful = require("awful")
|
||||
local beautiful = require("beautiful")
|
||||
local gears = require("gears")
|
||||
local home = os.getenv("HOME")
|
||||
|
||||
beautiful.init(home .. "/.config/awesome/theme/crylia/theme.lua")
|
||||
|
||||
if(RC.vars.wallpaper) then
|
||||
local wallpaper = RC.vars.wallpaper
|
||||
if awful.util.file_readable(wallpaper) then
|
||||
Theme.wallpaper = wallpaper
|
||||
end
|
||||
end
|
||||
|
||||
if beautiful.wallpaper then
|
||||
for s = 1, screen.count() do
|
||||
gears.wallpaper.maximized(beautiful.wallpaper, s, true)
|
||||
end
|
||||
end
|
||||
13
awesome/main/user_variables.lua
Normal file
13
awesome/main/user_variables.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
-------------------------------------------
|
||||
-- Uservariables are stored in this file --
|
||||
-------------------------------------------
|
||||
local home = os.getenv("HOME")
|
||||
|
||||
-- If you want different default programs, wallpaper path or modkey; edit this file.
|
||||
local _M = {
|
||||
terminal = "alacritty",
|
||||
modkey = "Mod4",
|
||||
wallpaper = home .. "/.config/awesome/theme/crylia/assets/wallpaper.jpg"
|
||||
}
|
||||
|
||||
return _M
|
||||
Reference in New Issue
Block a user