greatly improve autostart, won't run every time you rotate the display

This commit is contained in:
Izaya 2022-09-01 22:08:09 +10:00
parent 1796ad0be9
commit 6e97e4b0fe
2 changed files with 19 additions and 5 deletions

9
autostart.sh Executable file
View File

@ -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 &

15
rc.lua
View File

@ -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