summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-09-21 08:55:56 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-09-21 08:55:56 +0200
commit8a74f1fe5ba4b13e552c0423df3bf5d0180a0a55 (patch)
treed66ac81af0a37887dceadf3712b66bbcf0dd10d1
parent1e1ac4c6404393f4fc08ec63cfccb49c625b1eb7 (diff)
downloaddotfiles-8a74f1fe5ba4b13e552c0423df3bf5d0180a0a55.tar.gz
dotfiles-8a74f1fe5ba4b13e552c0423df3bf5d0180a0a55.tar.bz2
dotfiles-8a74f1fe5ba4b13e552c0423df3bf5d0180a0a55.zip
awesome: Run everything awesome starts as systemd scope unit
So programs can be nicely managed from systemctl --user :) This time let systemd choose the unit name itself, so we can start tools more than once.
-rw-r--r--.config/awesome/awesome.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/.config/awesome/awesome.lua b/.config/awesome/awesome.lua
index 01f3d6d..f2e3a1a 100644
--- a/.config/awesome/awesome.lua
+++ b/.config/awesome/awesome.lua
@@ -38,9 +38,13 @@ editor = os.getenv("EDITOR") or "nano"
editor_cmd = terminal .. " -e " .. editor
-- Fixes for the cursor [disables startup notification]
-local oldspawn = awful.util.spawn
-awful.util.spawn = function (s)
- oldspawn(s, false)
+local spawn_from_awesome = awful.util.spawn
+--awful.util.spawn = function (s)
+-- spawn_from_awesome("launch " .. s, false)
+--end
+
+awful.util.spawn = function(cmd, n)
+ spawn_from_awesome("systemd-run --user --scope -- " .. cmd, n)
end
awful.util.spawn("xsetroot -cursor_name left_ptr", false)
@@ -252,7 +256,7 @@ globalkeys = awful.util.table.join(
awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
-- Standard program
- awful.key({ modkey, }, "x", function () awful.util.spawn(terminal) end),
+ awful.key({ modkey, }, "x", function () spawn_from_awesome(terminal, false) end),
awful.key({ modkey, }, "a", function () awful.util.spawn(terminal .. " -geometry 100x25 -e pa-sink-ctl" ) end),
awful.key({ modkey, }, "w", function () awful.util.spawn("luakit") end),
awful.key({ modkey, }, "p", function () awful.util.spawn("pidgin") end),