File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/osascript
2
+
3
+ # Required parameters:
4
+ # @raycast.schemaVersion 1
5
+ # @raycast.title Toggle .DS_Store
6
+ # @raycast.mode silent
7
+ # @raycast.packageName System
8
+
9
+ # Optional parameters:
10
+ # @raycast.icon 🧬
11
+ # @raycast.author Astrit
12
+ # @raycast.authorURL https://github.com/astrit
13
+ # @raycast.description A script command to enable and disable .DS_Store
14
+
15
+
16
+ try
17
+ set ToggleDSStore to do shell script " defaults read com.apple.desktopservices"
18
+ on error
19
+ set ToggleDSStore to " 1"
20
+ end try
21
+
22
+ if ToggleDSStore is " 1" then
23
+ do shell script " defaults write com.apple.desktopservices DSDontWriteNetworkStores true"
24
+ set DSStoreStatus to " .DS_Store Deactivated"
25
+ else
26
+ do shell script " defaults delete com.apple.desktopservices DSDontWriteNetworkStores"
27
+ set DSStoreStatus to " .DS_Store Activated"
28
+ end if
29
+
30
+ DSStoreStatus
You can’t perform that action at this time.
0 commit comments