Created
May 7, 2020 21:21
-
-
Save typemytype/391b3bbe23b96b96f7bda4ae68d2a5a2 to your computer and use it in GitHub Desktop.
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
import os | |
import vanilla | |
def showHide(sender): | |
value = "true" | |
if "Hide" in sender.getNSButton().title(): | |
value = "false" | |
os.system(f"defaults write com.apple.finder CreateDesktop {value} && killall Finder") | |
w = vanilla.Window((200, 70), "Desktop Icons") | |
w.button_show = vanilla.Button((10, 10, -10, 22), "Show Icons", callback=showHide) | |
w.button_hide = vanilla.Button((10, 40, -10, 22), "Hide Icons", callback=showHide) | |
w.open() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment