aboutsummaryrefslogtreecommitdiff
path: root/.config/awesome/rc.lua
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2023-05-05 21:34:16 +0200
committerPatrick Spek <p.spek@tyil.nl>2023-05-05 21:34:16 +0200
commita6d495f1591c77bf5ff9ff6bd775681a7d1caef1 (patch)
tree35b6a63d5264946e93d25fdcf91319027d9e1994 /.config/awesome/rc.lua
parent5852c434779ce650676873d91eaf3d2d83931514 (diff)
Add startup applications to awesome
Diffstat (limited to '.config/awesome/rc.lua')
-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 = {