Startup in the home directory when launched by launch services

This commit is contained in:
Kovid Goyal
2017-02-02 15:07:13 +05:30
parent af1f3cc7c7
commit 3911f18fd9
2 changed files with 3 additions and 0 deletions

View File

@@ -138,6 +138,8 @@ def on_glfw_error(code, msg):
def main():
if os.environ.pop('KITTY_LAUNCHED_BY_LAUNCH_SERVICES', None) == '1' and getattr(sys, 'frozen', True):
os.chdir(os.path.expanduser('~'))
args = option_parser().parse_args()
if args.cmd:
exec(args.cmd)