diff --git a/autostart.sh b/autostart.sh new file mode 100755 index 0000000..54d7b4c --- /dev/null +++ b/autostart.sh @@ -0,0 +1,9 @@ +#!/bin/sh +if (xrdb -query | grep -q "^awesome\\.started:\\s*true$"); then echo already started; exit; fi; +xrdb -merge <<< "awesome.started:true"; +gnome-calls -d & +chatty -D & +mmsdtng & +nm-applet & +pasystray & +xfce4-power-manager & diff --git a/rc.lua b/rc.lua index ff7cfb0..4386b7e 100644 --- a/rc.lua +++ b/rc.lua @@ -19,6 +19,10 @@ end vkbd.init("ansi") +function powermenu.suspend() + awful.spawn("dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Suspend boolean:true") +end + -- {{{ Error handling -- Check if awesome encountered an error during startup and fell back to -- another config (This code will only ever execute for the fallback config) @@ -168,13 +172,14 @@ client.connect_signal("manage", function(c, startup) c.icon = gears.surface(gears.filesystem.get_configuration_dir().."/application-x-executable.svg")._native end end) --- }}} client.connect_signal("mouse::enter", function(c) c:emit_signal("request::activate", "mouse_enter", {raise = false}) end) +-- }}} -awful.spawn("gnome-calls -d") -awful.spawn("chatty -D") -awful.spawn("nm-applet") -awful.spawn("xfce4-power-manager") +if gears.filesystem.file_readable(string.format("%s/.config/awesome-mobile/autostart.sh",os.getenv("HOME"))) then + awful.spawn(gears.filesystem.file_readable(string.format("%s/.config/awesome-mobile/autostart.sh",os.getenv("HOME")))) +else + awful.spawn(gears.filesystem.get_configuration_dir().."/autostart.sh") +end