diff --git a/rc/start.lua b/rc/start.lua index 58fe844..6a88935 100644 --- a/rc/start.lua +++ b/rc/start.lua @@ -56,12 +56,12 @@ xrun("polkit-gnome-authentication-agent-1", "/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1") xrun("Bluetooth Applet", "bluetooth-applet") -xrun("Pidgin", "pidgin -n") +xrun("pidgin", "pidgin -n") xrun("emacs") if config.hostname == "neo" then xrun("keepassx", "keepassx -min -lock") - xrun("Transmission", "transmission-gtk -m") + xrun("transmission", "transmission-gtk -m") xrun("chromium") elseif config.hostname == "guybrush" then xrun("keepassx", "keepassx -min -lock") diff --git a/rc/xrun.lua b/rc/xrun.lua index 8e91696..b9b2dbc 100644 --- a/rc/xrun.lua +++ b/rc/xrun.lua @@ -4,12 +4,15 @@ local xrun_now = function(name, cmd) -- Try first the list of clients from awesome (which is available -- only if awesome has fully started, therefore, this function -- should be run inside a 0 timer) - local clients = client.get() - local client - for _, client in pairs(clients) do - if client.name == name or client.class == name or client.instance == name then - return - end + local squid = { name, name:sub(1,1):upper() .. name:sub(2) } + if awful.client.cycle( + function(c) + return awful.rules.match_any(c, + { name = squid, + class = squid, + instance = squid }) + end)() then + return end -- Not found, let's check with xwininfo. We can only check name but