Iterm for mac3/5/2023 ![]() Profile = await partial.async_get_full_profile()Īwait profile.async_set_color_preset(preset) Preset = await _get(connection, "Solarized Light") Preset = await _get(connection, "Solarized Dark") # Themes have space-delimited attributes, one of which will be light or dark. Initial_profile = await partial.async_get_full_profile()Īwait initial_profile.async_set_color_preset(initial_preset)Īsync with iterm2.VariableMonitor(connection,, "effectiveTheme", None) as mon: # Fetch the full profile and then set the color preset in it. ![]() Initial_profiles=await _query(connection) # Update the list of all profiles and iterate over them. Initial_preset = await _get(connection, "Solarized Light") ![]() Initial_preset = await _get(connection, "Solarized Dark") Initial_theme = await app.async_get_theme() Logger = logging.getLogger('macos_theme_sync')Īpp = await iterm2.async_get_app(connection) I personally use Solarized Dark and Solarized Light #!/usr/bin/env python3.7 Not the most elegant code as I am not very familiar with Python asyncĮdit: Make sure the theme is the same as your usual theme (Preferences > Profiles > Colors > Color Presets.). ![]() I tweaked it to also check if the theme is correct at iTem2 startup.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |