aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/awesome/rc.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua
index c67725b..eaac212 100644
--- a/.config/awesome/rc.lua
+++ b/.config/awesome/rc.lua
@@ -43,6 +43,22 @@ do
end
-- }}}
+-- {{{ Background services
+function run_once(cmd)
+ findme = cmd
+ firstspace = cmd:find(" ")
+
+ if firstspace then
+ findme = cmd:sub(0, firstspace - 1)
+ end
+
+ awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")")
+end
+
+run_once("xcompmgr")
+run_once("chwp")
+-- }}}
+
-- {{{ Variable definitions
beautiful.init(awful.util.getdir("config") .. "/theme.lua")
@@ -462,6 +478,7 @@ awful.rules.rules = {
rule_any = {
class = {
"thunderbird",
+ "kmail",
},
},
properties = {