From 0e073a47cd90d3a410cd48f4cdfc1acd05829346 Mon Sep 17 00:00:00 2001 From: zachir Date: Fri, 17 Mar 2023 01:29:52 -0500 Subject: fix awesome scratchpads and floating windows --- awesome/rc.lua | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'awesome/rc.lua') diff --git a/awesome/rc.lua b/awesome/rc.lua index d4dc3c9..f5758c2 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -417,57 +417,46 @@ globalkeys = gears.table.join( -- scratchpads awful.key({ modkey, "Control" }, "z", function () scratch.toggle(terminal_sp_cmd("sphtop","htop"), { class = "sphtop" }) - awful.placement.centered() end, {description = "Toggle htop scratchpad"}), awful.key({ modkey, "Control" }, "x", function () scratch.toggle(terminal_sp_cmd("spterm","zsh"), { class = "spterm" }) - awful.placement.centered() end, {description = "Toggle term scratchpad"}), awful.key({ modkey, "Control" }, "c", function () scratch.toggle(terminal_sp_cmd("sppmxr","pulsemixer"), { class = "sppmxr" }) - awful.placement.centered() end, {description = "Toggle pulsemixer scratchpad"}), awful.key({ modkey, "Control" }, "v", function () scratch.toggle(terminal_sp_cmd("spblue","bluetoothctl"), { class = "spblue" }) - awful.placement.centered() end, {description = "Toggle bluetoothctl scratchpad"}), awful.key({ modkey, "Control" }, "b", function () scratch.toggle(terminal_sp_cmd("spncmp","ncmpcpp"), { class = "spncmp" }) - awful.placement.centered() end, {description = "Toggle ncmpcpp scratchpad"}), awful.key({ modkey, "Control" }, "a", function () scratch.toggle(terminal_sp_cmd("spmutt","neomutt"), { class = "spmutt" }) - awful.placement.centered() end, {description = "Toggle neomutt scratchpad"}), awful.key({ modkey, "Control" }, "s", function () scratch.toggle(terminal_sp_cmd("spprof","profanity"), { class = "spprof" }) - awful.placement.centered() end, {description = "Toggle profanity scratchpad"}), awful.key({ modkey, "Control" }, "d", function () scratch.toggle(terminal_sp_cmd("spircc","irssi"), { class = "sptrem" }) - awful.placement.centered() end, {description = "Toggle irssi scratchpad"}), awful.key({ modkey, "Control" }, "f", function () scratch.toggle(terminal_sp_cmd("sptodo","todo"), { class = "sptrem" }) - awful.placement.centered() end, {description = "Toggle todo.txt scratchpad"}), awful.key({ modkey, "Control" }, "g", function () scratch.toggle(terminal_sp_cmd("sptrem","tremc"), { class = "sptrem" }) - awful.placement.centered() end, {description = "Toggle tremc scratchpad"}), awful.key({ modkey, "Control" }, "q", function () scratch.toggle("qpwgraph", { class = "qpwgraph" }) - awful.placement.centered() end, {description = "Toggle qpwgraph scratchpad"}), awful.key({ modkey, }, "a", function () @@ -865,7 +854,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) + callback(nil, false) return end local ppid = stdout:gsub(" ", ""):gsub("\n", "") @@ -929,6 +918,18 @@ end) 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 + c.ontop = true + else + c.ontop = false + end + end +end) +-- }}} + -- spawn windows as slaves {{{ client.connect_signal( "manage", -- cgit v1.2.3