Created
August 22, 2022 00:14
-
-
Save mattpolicastro/98e526e1656c7b0ce3f0c7bda1fa3278 to your computer and use it in GitHub Desktop.
Quick script for switching Dock orientation based on a target process running or not. (In this case, Rstudio.)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PROCESS_NAME=RStudio | |
if pgrep $PROCESS_NAME; then | |
echo running | |
defaults write com.apple.dock orientation left | |
else | |
echo not running | |
defaults write com.apple.dock orientation bottom | |
fi | |
killall Dock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment