dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit d1c83f65e5d3f5b99656f939ebfc1a785b141fb7
parent 58ac932df02be4c234201eba5043f4ab85ab426c
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Sat,  3 Aug 2019 22:46:58 +0200

toggle_dark_mode.py: catch app not open exception


Former-commit-id: eeff8c5490ad28d2fa51448a2d3fb9281c3d990b
Diffstat:
Miterm2/scripts/toggle_dark_mode.py | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/iterm2/scripts/toggle_dark_mode.py b/iterm2/scripts/toggle_dark_mode.py @@ -15,7 +15,11 @@ async def main(connection): for p in profiles: if "Light" in p.name and is_dark_theme == "false": await p.async_make_default() + return elif "Dark" in p.name and is_dark_theme == "true": await p.async_make_default() - -iterm2.run_until_complete(main) + return +try: + iterm2.run_until_complete(main) +except Exception as exception: + print("Error: ", exception)