dotfiles/awesome/main/rules.lua

80 lines
2.2 KiB
Lua
Raw Normal View History

2023-04-20 04:08:44 +00:00
-- Standard awesome library
local awful = require("awful")
-- Theme handling library
local beautiful = require("beautiful")
local _M = {}
-- reading
-- https://awesomewm.org/apidoc/libraries/awful.rules.html
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
function _M.get(clientkeys, clientbuttons)
local rules = {
-- All clients will match this rule.
{ 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
}
},
-- Floating clients.
{ rule_any = {
instance = {
"copyq", -- Includes session name in class.
"pinentry",
},
class = {
"MessageWin", -- kalarm.
"Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size.
awesome+Alacritty changes; rm awesome ext package tracking - `awesome/binding/clientkeys.lua`: - added cyclefocus (Mod + Tab to cycle through clients of same type) - `awesome/binding/globalkeys.lua`: - i shrimply removed things i'm not using - `awesome/deco/statusbar.lua`: - completely remove keyboard layout widget - re-enable systray - NOTE: i might replace this with something else later. or not, as there's an MR to fix the transparency issues. dunno what i'll be doing for sure - `awesome/main/menu.lua`: - change the 'quit' option in the 'awesome' menu to be accessible under another nested menu, to stop me from quitting accidentally when aiming for restart and having my hand twitch (this has happened multiple times now!) - other standard adding and adjusting of other software that shows up in the menus - `awesome/main/rules.lua`: - remove rules i don't need - add rule for steam to force it to float since it plays like shit with tiled WMs or other weirder desktop setups - add rule for pokemon infinite fusion to force it to float since i just don't like the idea of games being effected by tiling usually - NOTE: i might change this to something that bars its resolution from being messed with instead; dunno if that's a thing i can do - `awesome/main/startup.lua`: - get rid of autostart entry for `redshift` as it does not work right - _technically,_ it **does** work, but the problem is that it re-applies itself whenever i restart awesome if it's in the autostart no matter what i try doing. i think there's no solution for this so i'm trying other non-awesome-related things - get rid of unused include - `awesome/main/user-variables.lua`: - literally just removed comments i didn't need - `alacritty/alacritty.yml`: - added scrolling settings
2023-04-23 01:32:15 +00:00
},
2023-04-20 04:08:44 +00:00
-- Note that the name property shown in xprop might be set slightly after creation of the client
-- and the name shown there might not match defined rules here.
name = {
"Event Tester", -- xev.
awesome+Alacritty changes; rm awesome ext package tracking - `awesome/binding/clientkeys.lua`: - added cyclefocus (Mod + Tab to cycle through clients of same type) - `awesome/binding/globalkeys.lua`: - i shrimply removed things i'm not using - `awesome/deco/statusbar.lua`: - completely remove keyboard layout widget - re-enable systray - NOTE: i might replace this with something else later. or not, as there's an MR to fix the transparency issues. dunno what i'll be doing for sure - `awesome/main/menu.lua`: - change the 'quit' option in the 'awesome' menu to be accessible under another nested menu, to stop me from quitting accidentally when aiming for restart and having my hand twitch (this has happened multiple times now!) - other standard adding and adjusting of other software that shows up in the menus - `awesome/main/rules.lua`: - remove rules i don't need - add rule for steam to force it to float since it plays like shit with tiled WMs or other weirder desktop setups - add rule for pokemon infinite fusion to force it to float since i just don't like the idea of games being effected by tiling usually - NOTE: i might change this to something that bars its resolution from being messed with instead; dunno if that's a thing i can do - `awesome/main/startup.lua`: - get rid of autostart entry for `redshift` as it does not work right - _technically,_ it **does** work, but the problem is that it re-applies itself whenever i restart awesome if it's in the autostart no matter what i try doing. i think there's no solution for this so i'm trying other non-awesome-related things - get rid of unused include - `awesome/main/user-variables.lua`: - literally just removed comments i didn't need - `alacritty/alacritty.yml`: - added scrolling settings
2023-04-23 01:32:15 +00:00
"Steam",
"infinitefusion", -- Pokémon Infinite Fusion
2023-04-20 04:08:44 +00:00
},
role = {
"AlarmWindow", -- Thunderbird's calendar.
"ConfigManager", -- Thunderbird's about:config.
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
}
},
properties = {
floating = true
}
},
-- Add titlebars to normal clients and dialogs
{ rule_any = {
type = { "normal", "dialog" }
},
properties = {
titlebars_enabled = false
}
},
-- Set Firefox to always map on the tag named "2" on screen 1.
-- { rule = { class = "Firefox" },
-- properties = { screen = 1, tag = "2" } },
}
return rules
end
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })