From 41a75bc864d915b904c9577e729c145ffe889305 Mon Sep 17 00:00:00 2001 From: zachir Date: Sat, 25 Mar 2023 23:50:15 -0500 Subject: remove awesome-scratch as dependency (now using bling) --- .gitmodules | 3 - awesome/awesome-scratch | 1 - awesome/rc.lua | 188 ++++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 160 insertions(+), 32 deletions(-) delete mode 160000 awesome/awesome-scratch diff --git a/.gitmodules b/.gitmodules index 80e6b9d..b51913f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,9 +10,6 @@ [submodule "awesome/awesome-wm-widgets"] path = awesome/awesome-wm-widgets url = https://git.zachir.xyz/awesome-wm-widgets.git -[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/awesome-scratch b/awesome/awesome-scratch deleted file mode 160000 index 172c0b4..0000000 --- a/awesome/awesome-scratch +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 172c0b47228a4cb83e298273d217c03f8eed7417 diff --git a/awesome/rc.lua b/awesome/rc.lua index 002d609..bbdcfce 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -2,8 +2,6 @@ -- found (e.g. lgi). If LuaRocks is not installed, do nothing. pcall(require, "luarocks.loader") -local scratch = require("awesome-scratch.scratch") - -- Standard awesome library local gears = require("gears") local awful = require("awful") @@ -123,22 +121,32 @@ function crcparse(substr) until not line end -function terminal_sp_cmd (spc, cmd) +function terminal_sp_cmd (spc, cmd, geo) if terminal == "st" then cflag = "-c" gflag = "-g" xflag = "-e" - geo = "160x45" elseif terminal == "alacritty" then cflag = "--class" gflag = false xflag = "-e" end + if cflag and spc then + cl = " " .. cflag .. " " .. spc + else + cl = "" + end if gflag then - return terminal .. " " .. cflag .. " " .. spc .. " " .. gflag .. " " .. geo .. " " .. xflag .. " " .. cmd + gl = " " .. gflag .. " " .. geo + else + gl = "" + end + if xflag and cmd then + xl = " " .. xflag .. " " .. cmd else - return terminal .. " " .. cflag .. " " .. spc .. " " .. " " .. xflag .. " " .. cmd + xl = "" end + return terminal .. cl .. gl .. xl end -- }}} @@ -162,6 +170,141 @@ end -- }}} +--{{{ bling scratchpad definitions +--{{{ sphtop +local sphtop = bling.module.scratchpad { + command = terminal_sp_cmd("sphtop", "htop", nil), + rule = { class = "sphtop" }, + sticky = true, + autoclose = true, + floating = true, + geometry = { x = 575, y = 275, height = 530, width = 770 }, + reapply = true, + dont_focus_before_close = false +} +--}}} +--{{{ spterm +local spterm = bling.module.scratchpad { + command = terminal_sp_cmd("spterm", nil, nil), + rule = { class = "spterm" }, + sticky = true, + autoclose = true, + floating = true, + geometry = { x = 575, y = 275, height = 530, width = 770 }, + reapply = true, + dont_focus_before_close = false +} +--}}} +--{{{ sppmxr +local sppmxr = bling.module.scratchpad { + command = terminal_sp_cmd("sppmxr", "pulsemixer", nil), + rule = { class = "sppmxr" }, + sticky = true, + autoclose = true, + floating = true, + geometry = { x = 575, y = 275, height = 530, width = 770 }, + reapply = true, + dont_focus_before_close = false +} +--}}} +--{{{ spblue +local spblue = bling.module.scratchpad { + command = terminal_sp_cmd("spblue", "bluetoothctl", nil), + rule = { class = "spblue" }, + sticky = true, + autoclose = true, + floating = true, + geometry = { x = 575, y = 275, height = 530, width = 770 }, + reapply = true, + dont_focus_before_close = false +} +--}}} +--{{{ spncmp +local spncmp = bling.module.scratchpad { + command = terminal_sp_cmd("spncmp", "ncmpcpp", nil), + rule = { class = "spncmp" }, + sticky = true, + autoclose = true, + floating = true, + geometry = { x = 575, y = 275, height = 530, width = 770 }, + reapply = true, + dont_focus_before_close = false +} +--}}} +--{{{ spmutt +local spmutt = bling.module.scratchpad { + command = terminal_sp_cmd("spmutt", "neomutt", nil), + rule = { class = "spmutt" }, + sticky = true, + autoclose = true, + floating = true, + geometry = { x = 575, y = 275, height = 530, width = 770 }, + reapply = true, + dont_focus_before_close = false +} +--}}} +--{{{ spprof +local spprof = bling.module.scratchpad { + command = terminal_sp_cmd("spprof", "profanity", nil), + rule = { class = "spprof" }, + sticky = true, + autoclose = true, + floating = true, + geometry = { x = 575, y = 275, height = 530, width = 770 }, + reapply = true, + dont_focus_before_close = false +} +--}}} +--{{{ spirss +local spirss = bling.module.scratchpad { + command = terminal_sp_cmd("spirss", "irssi", nil), + rule = { class = "spirss" }, + sticky = true, + autoclose = true, + floating = true, + geometry = { x = 575, y = 275, height = 530, width = 770 }, + reapply = true, + dont_focus_before_close = false +} +--}}} +--{{{ sptodo +local sptodo = bling.module.scratchpad { + command = terminal_sp_cmd("sptodo", "todo", nil), + rule = { class = "sptodo" }, + sticky = true, + autoclose = true, + floating = true, + geometry = { x = 575, y = 275, height = 530, width = 770 }, + reapply = true, + dont_focus_before_close = false +} +--}}} +--{{{ sptrem +local sptrem = bling.module.scratchpad { + command = terminal_sp_cmd("sptrem", "tremc", nil), + rule = { class = "sptrem" }, + sticky = true, + autoclose = true, + floating = true, + geometry = { x = 575, y = 275, height = 530, width = 770 }, + reapply = true, + dont_focus_before_close = false +} +--}}} +--{{{ qpwgraph +local qpwgraph = bling.module.scratchpad { + command = "qpwgraph", + rule = { class = "qpwgraph" }, + sticky = true, + autoclose = true, + floating = true, + geometry = { x = 575, y = 275, height = 530, width = 770 }, + reapply = true, + dont_focus_before_close = false +} +--}}} +--}}} + -- {{{ Menu -- Create a launcher widget and a main menu myawesomemenu = { @@ -419,47 +562,47 @@ end) globalkeys = gears.table.join( -- scratchpads awful.key({ modkey, "Control" }, "z", function () - scratch.toggle(terminal_sp_cmd("sphtop","htop"), { class = "sphtop" }) + sphtop:toggle() end, {description = "Toggle htop scratchpad"}), awful.key({ modkey, "Control" }, "x", function () - scratch.toggle(terminal_sp_cmd("spterm","zsh"), { class = "spterm" }) + spterm:toggle() end, {description = "Toggle term scratchpad"}), awful.key({ modkey, "Control" }, "c", function () - scratch.toggle(terminal_sp_cmd("sppmxr","pulsemixer"), { class = "sppmxr" }) + sppmxr:toggle() end, {description = "Toggle pulsemixer scratchpad"}), awful.key({ modkey, "Control" }, "v", function () - scratch.toggle(terminal_sp_cmd("spblue","bluetoothctl"), { class = "spblue" }) + spblue:toggle() end, {description = "Toggle bluetoothctl scratchpad"}), awful.key({ modkey, "Control" }, "b", function () - scratch.toggle(terminal_sp_cmd("spncmp","ncmpcpp"), { class = "spncmp" }) + spncmp:toggle() end, {description = "Toggle ncmpcpp scratchpad"}), awful.key({ modkey, "Control" }, "a", function () - scratch.toggle(terminal_sp_cmd("spmutt","neomutt"), { class = "spmutt" }) + spmutt:toggle() end, {description = "Toggle neomutt scratchpad"}), awful.key({ modkey, "Control" }, "s", function () - scratch.toggle(terminal_sp_cmd("spprof","profanity"), { class = "spprof" }) + spprof:toggle() end, {description = "Toggle profanity scratchpad"}), awful.key({ modkey, "Control" }, "d", function () - scratch.toggle(terminal_sp_cmd("spircc","irssi"), { class = "sptrem" }) + spirss:toggle() end, {description = "Toggle irssi scratchpad"}), awful.key({ modkey, "Control" }, "f", function () - scratch.toggle(terminal_sp_cmd("sptodo","todo"), { class = "sptrem" }) + sptodo:toggle() end, {description = "Toggle todo.txt scratchpad"}), awful.key({ modkey, "Control" }, "g", function () - scratch.toggle(terminal_sp_cmd("sptrem","tremc"), { class = "sptrem" }) + sptrem:toggle() end, {description = "Toggle tremc scratchpad"}), awful.key({ modkey, "Control" }, "q", function () - scratch.toggle("qpwgraph", { class = "qpwgraph" }) + qpwgraph:toggle() end, {description = "Toggle qpwgraph scratchpad"}), awful.key({ modkey, }, "a", function () @@ -757,17 +900,6 @@ awful.rules.rules = { { rule_any = { class = { - "sphtop", - "spterm", - "sppmxr", - "spblue", - "spncmp", - "spmutt", - "spprof", - "spircc", - "sptodo", - "sptrem", - "qpwgraph", "QjackCtl", "gcr-prompter" } -- cgit v1.2.3 From 69690e89147a39dbe2a2a1ea5d9b496e3324cf4c Mon Sep 17 00:00:00 2001 From: zachir Date: Sun, 23 Apr 2023 20:28:11 -0500 Subject: add ckasses to awesome swallow filter (obs, librewolf, reaper) --- awesome/themes/default/theme.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/awesome/themes/default/theme.lua b/awesome/themes/default/theme.lua index 0d8b7b8..8c74ab3 100644 --- a/awesome/themes/default/theme.lua +++ b/awesome/themes/default/theme.lua @@ -138,8 +138,11 @@ You might just want to copy that whole part into your theme.lua and start adjust --]] -- LuaFormatter off -- window swallowing -theme.dont_swallow_classname_list = { "firefox", "Gimp", "Lutris", "VirtualBox Manager", "VirtualBox Machine" } -- list of class names that should not be swallowed +theme.dont_swallow_classname_list = { "firefox", "Gimp", "Lutris", "REAPER", "VirtualBox Manager", "VirtualBox Machine" } -- list of class names that should not be swallowed theme.dont_swallow_filter_activated = true -- whether the filter above should be active +theme.parent_filter_list = {"firefox", "Gimp", "Lutris", "REAPER", "obs", "LibreWolf"} -- class names list of parents that should not be swallowed +theme.child_filter_list = { "Dragon", "REAPER" } -- class names list that should not swallow their parents +theme.swallowing_filter = true -- whether the filters above should be active -- flash focus theme.flash_focus_start_opacity = 0.6 -- the starting opacity -- cgit v1.2.3 From beeb0a5338711b05fd4a9615e95af791c29cc35e Mon Sep 17 00:00:00 2001 From: zachir Date: Sun, 23 Apr 2023 20:42:23 -0500 Subject: add LTSpice to swallow exclusion --- awesome/themes/default/theme.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awesome/themes/default/theme.lua b/awesome/themes/default/theme.lua index 8c74ab3..e2903ed 100644 --- a/awesome/themes/default/theme.lua +++ b/awesome/themes/default/theme.lua @@ -138,7 +138,7 @@ You might just want to copy that whole part into your theme.lua and start adjust --]] -- LuaFormatter off -- window swallowing -theme.dont_swallow_classname_list = { "firefox", "Gimp", "Lutris", "REAPER", "VirtualBox Manager", "VirtualBox Machine" } -- list of class names that should not be swallowed +theme.dont_swallow_classname_list = { "firefox", "Gimp", "Lutris", "REAPER", "VirtualBox Manager", "VirtualBox Machine", "xviix64.exe" } -- list of class names that should not be swallowed theme.dont_swallow_filter_activated = true -- whether the filter above should be active theme.parent_filter_list = {"firefox", "Gimp", "Lutris", "REAPER", "obs", "LibreWolf"} -- class names list of parents that should not be swallowed theme.child_filter_list = { "Dragon", "REAPER" } -- class names list that should not swallow their parents -- cgit v1.2.3