![]() Now, name the file however you want, but preferably something relevant, like auto_dark_mode.py. Choose Long-Running Daemon as the script interval.Click Scripts > Manage > New Python Script in the MacOS menu bar.ITerm2 doesn't have any built-in feature for switching themes depending on the system theme setting, so to make this happen, we need to create a custom script for this. Hitting yes in the popup should make the system toggle its theme setting. Now, if you open your spotlight, or some other application launcher tool, you should be able to search for the newly created application, and once you run it, see a warning window show up, asking you whether you want to allow this application to run or not. ![]() Once it's in there, just add this piece of code, name it something reasonable, like Toggle dark mode, and save it somewhere you can find it later. ![]() Simply search for AppleScript in the search-bar, and drag it into the canvas. Now, we're going to choose an AppleScript block from the left-hand side menu. Select Application, and click the blue button. Make sure you're also on somewhat of a new update of MacOS, to ensure that this is going to work. To do this, start by opening the Automator application. To start off, we'll create a MacOS Automator application that we can run from our spotlight, or something like Alfred, to be able to quickly change between light mode and dark mode in MacOS, manual, whenever we feel like it.
0 Comments
Leave a Reply. |