summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/awesome/awesome.lua6
-rw-r--r--.config/awesome/cmds.lua12
2 files changed, 16 insertions, 2 deletions
diff --git a/.config/awesome/awesome.lua b/.config/awesome/awesome.lua
index 391aab3..3593d23 100644
--- a/.config/awesome/awesome.lua
+++ b/.config/awesome/awesome.lua
@@ -17,6 +17,8 @@ beautiful.init(os.getenv("HOME") .. "/.local/share/awesome/themes/zenburn/theme.
local runonce = require("runonce")
+local cmd = require("cmds")
+
runonce.run("urxvtd -q -o -f")
runonce.run("start-pulseaudio-x11")
runonce.run("synergys")
@@ -227,8 +229,8 @@ globalkeys = awful.util.table.join(
awful.key({ }, "Print", function () awful.util.spawn("scrot") end),
awful.key({ modkey, }, "Print", function () awful.util.spawn("scrot -s") end),
- awful.key({ }, "XF86Suspend", function () awful.util.spawn("sudo pm-suspend") end),
- awful.key({ }, "XF86Sleep", function () awful.util.spawn("sudo pm-suspend") end),
+ awful.key({ }, "XF86Suspend", function () awful.util.spawn(cmd.suspend) end),
+ awful.key({ }, "XF86Sleep", function () awful.util.spawn(cmd.suspend) end),
awful.key({ }, "XF86MonBrightnessUp", function () awful.util.spawn("sudo brightness up") end),
awful.key({ }, "XF86MonBrightnessDown", function () awful.util.spawn("sudo brightness down") end),
awful.key({}, "XF86TouchpadToggle", function () awful.util.spawn(os.getenv("HOME") .. "/.scripts/toggle_touchpad.sh") end),
diff --git a/.config/awesome/cmds.lua b/.config/awesome/cmds.lua
new file mode 100644
index 0000000..713f807
--- /dev/null
+++ b/.config/awesome/cmds.lua
@@ -0,0 +1,12 @@
+module("eminent")
+
+local upower = "dbus-send --system --print-reply " ..
+ "--dest=org.freedesktop.UPower " ..
+ "/org/freedesktop/UPower "
+
+local cmds = {
+ suspend = upower .. "org.freedesktop.UPower.Suspend",
+ hibernate = upower .. "org.freedesktop.UPower.Hibernate",
+}
+
+return cmds