summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
m---------awesome/bling0
-rw-r--r--awesome/rc.lua64
3 files changed, 57 insertions, 10 deletions
diff --git a/.gitmodules b/.gitmodules
index 5c2ba09..80e6b9d 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -13,3 +13,6 @@
[submodule "awesome/awesome-scratch"]
path = awesome/awesome-scratch
url = https://github.com/notnew/awesome-scratch
+[submodule "awesome/bling"]
+ path = awesome/bling
+ url = https://github.com/BlingCorp/bling.git
diff --git a/awesome/bling b/awesome/bling
new file mode 160000
+Subproject 677917056d118d02feaa5c21ecf5a50375ef123
diff --git a/awesome/rc.lua b/awesome/rc.lua
index e47e624..a8643e5 100644
--- a/awesome/rc.lua
+++ b/awesome/rc.lua
@@ -17,6 +17,7 @@ local naughty = require("naughty")
package.loaded["naughty.dbus"] = {}
local menubar = require("menubar")
local hotkeys_popup = require("awful.hotkeys_popup")
+local bling = require("bling")
-- Enable hotkeys help widget for VIM and other apps
-- when client with a matching name is opened:
require("awful.hotkeys_popup.keys")
@@ -816,9 +817,12 @@ awful.rules.rules = {
}, properties = { titlebars_enabled = true }
},
+ -- These windows will be force resized to fit
{ rule_any = {
class = {
- "mpv"
+ "mpv",
+ "Lutris",
+ "polychromatic-controller"
},
}, properties = { size_hints_honor = false } },
@@ -828,12 +832,23 @@ awful.rules.rules = {
}
-- }}}
--- {{{ Window Swallowing functions
----[[
+--{{{ bling window swallowing
+bling.module.window_swallowing.start()
+theme.parent_filter_list = { "firefox", "Gimp" } -- class names list of parents that should not be swallowed
+theme.child_filter_list = { "Dragon" } -- class names list that should not swallow their parents
+theme.swallowing_filter = true -- whether the filters above should be active
+--}}}
+
+-- {{{ Window Swallowing functions OLD/DEPRECATED
+--[[
function is_terminal(c)
return (c.class and (c.class:match("St") or c.class:match("Alacritty"))) and true or false
end
+function is_noswallow(c)
+ return false
+end
+
function copy_size(c, parent_client)
if not c or not parent_client then
return
@@ -857,7 +872,7 @@ function get_parent_pid(child_ppid, callback)
awful.spawn.easy_async(ppid_cmd, function(stdout, stderr, reason, exit_code)
-- primitive error checking
if stderr and stderr ~= "" then
- callback(stderr, false)
+ callback(err, false)
return
end
local ppid = stdout:gsub(" ", ""):gsub("\n", "")
@@ -866,39 +881,66 @@ function get_parent_pid(child_ppid, callback)
end
function if_client_and_parent(c1, c2, cl)
- if c1 and (c1:find('^' .. cl.pid) or c2) then
+ if c1 and cl and cl.pid and (c1:find('^' .. cl.pid) or c2) then
return true
end
end
+--]]
+--[[ FULLY UNTESTED, UNVERIFIED. PLEASE DO NOT RUN.
+function incall(err, ppid, cl)
+ if err then
+ return
+ end
+ if ppid and cl and cl.pid and (ppid:find('^' .. cl.pid)) then
+ return true
+ end
+ if ppid ~= 1 then
+ get_parent_pid(ppid, incall)
+ else
+ end
+end
+
+function get_id_or_recurse(pid, err)
+ if pid == 1 then
+ return 1
+ else
+ end
+end
+--]]
+--[[
client.connect_signal("property::size", check_resize_client)
client.connect_signal("property::position", check_resize_client)
client.connect_signal("manage", function(c)
- if is_terminal(c) then
+ if is_terminal(c) or is_noswallow(c) then
return
end
+ local procid = 0
+ while (procid ~= 1) do
+
+ end
local parent_client=awful.client.focus.history.get(c.screen, 1)
get_parent_pid(c.pid, function(err, ppid)
if err then
- error(err)
+ --error(err)
return
end
parent_pid = ppid or false
get_parent_pid(parent_pid, function(err, gppid)
if err then
- error(err)
+ --error(err)
return
end
grand_parent_pid = gppid or false
get_parent_pid(grand_parent_pid, function(err, ggppid)
if err then
- error(err)
+ --error(err)
return
end
great_grand_parent_pid = ggppid or false
get_parent_pid(great_grand_parent_pid, function(err, gggppid)
if err then
- error(err)
+ --error(err)
return
end
great_great_grand_parent_pid = gggppid or false
@@ -922,6 +964,7 @@ awful.spawn.with_shell(string.format("sh %s/autostart.sh &", config_dir))
-- }}}
-- {{{ Floating windows always on top
+--[[
client.connect_signal("property::floating", function(c)
if not c.fullscreen then
if c.floating then
@@ -931,6 +974,7 @@ client.connect_signal("property::floating", function(c)
end
end
end)
+--]]
-- }}}
-- spawn windows as slaves {{{