Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- start applications only once
- function run_once(prg, args)
- if not prg then
- do return nil end
- end
- if not args then
- args = ""
- end
- awful.util.spawn_with_shell('pgrep '..prg..' || ('..prg..' '..args..')')
- end
- -- start application only once (with path to detect original app started by a script with the same name)
- function run_once_p(path, prg, args)
- if not prg or not path then
- do return nil end
- end
- if not args then
- args = ""
- end
- awful.util.spawn_with_shell('pgrep '..prg..' || ('..path..prg..' '..args..')')
- end
- -- start applications via starter which differs from applicationname when running
- function run_once_spec(prg, prgs, args)
- if not prg or not prgs then
- do return nil end
- end
- if not args then
- args=""
- end
- awful.util.spawn_with_shell('pgrep '..prgs..' || ('..prg..' '..args..')')
- end
Advertisement
Add Comment
Please, Sign In to add comment