Skip to content

Commit 71a2ae1

Browse files
astritdehesa
authored andcommitted
Add Toggle .DS_Store
1 parent d6fad3a commit 71a2ae1

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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

0 commit comments

Comments
 (0)