-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Adobe Creative Cloud Desktop Panel Visibility.sh
156 lines (124 loc) · 3.98 KB
/
Adobe Creative Cloud Desktop Panel Visibility.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#!/bin/sh
####################################################################################################
#
# ABOUT
#
# Adobe Creative Cloud Desktop Panel Visibility
#
# See: https://helpx.adobe.com/in/creative-cloud/kb/apps-tab-missing.html
# See: https://helpx.adobe.com/in/creative-cloud/kb/disable-updates-and-apps-panel-for-the-creative-cloud-products.html
#
####################################################################################################
#
# HISTORY
#
# Version 1.0, 12-Oct-2017, Dan K. Snelson
# Original version
#
# Version 1.1, 29-Jul-2019, Dan K. Snelson
# Updated for Creative Cloud Desktop app 4.9.0.504
#
####################################################################################################
### Variables
loggedInUser=$( /usr/bin/stat -f%Su /dev/console ) # Currently logged in user
### Functions
killProcess(){
echo "Quit Adobe-related process: \"${1}\" ..."
/usr/bin/pkill -l -U ${loggedInUser} ${1}
}
echo "### Adobe Creative Cloud Desktop: Panel Visibility ###"
# If Parameter 4 is blank, use "false" as the default value ...
if [[ "${4}" != "" ]] && [[ "${AppsPanelVisibility}" == "" ]]; then
AppsPanelVisibility="${4}" # Apps Panel Visibility (i.e., "true" | "false")
else
echo "Parameter 4 is blank; using \"false\" as the visibilty setting for the Adobe Creative Cloud Desktop Apps panel ..."
AppsPanelVisibility="false"
fi
# Check for a valid value for Apps Panel Visibility (i.e., "true" or "false")
if [[ "${AppsPanelVisibility}" == "true" ]] || [[ "${AppsPanelVisibility}" == "false" ]]; then
echo "Using \"${AppsPanelVisibility}\" as the visibilty setting for the Adobe Creative Cloud Desktop Apps panel ..."
echo "Quit Adobe Creative Cloud Desktop App ..."
killProcess "Creative Cloud"
killProcess "CCLibrary"
killProcess "Core Sync"
killProcess "Core Sync Helper"
killProcess "Adobe Desktop Service"
killProcess "CCXProcess"
if [[ "${AppsPanelVisibility}" == "false" ]]; then
echo "Disabling Apps Panel Visibility ..."
/bin/echo "<config>
<panel>
<name>AppsPanel</name>
<visible>false</visible>
</panel>
<panel>
<name>FilesPanel</name>
<visible>false</visible>
</panel>
<panel>
<name>MarketPanel</name>
<masked>false</masked>
</panel>
<panel>
<name>StockPanel</name>
<visible>false</visible>
</panel>
<panel>
<name>BehancePanel</name>
<visible>false</visible>
</panel>
<panel>
<name>FontsPanel</name>
<visible>false</visible>
</panel>
<feature>
<name>SelfServeInstalls</name>
<enabled>false</enabled>
</feature>
</config>" > /Library/Application\ Support/Adobe/OOBE/Configs/ServiceConfig.xml
elif [[ "${AppsPanelVisibility}" == "true" ]]; then
echo "Enabling Apps Panel Visibility ..."
/bin/echo "<config>
<panel>
<name>AppsPanel</name>
<visible>true</visible>
</panel>
<panel>
<name>FilesPanel</name>
<visible>false</visible>
</panel>
<panel>
<name>MarketPanel</name>
<masked>false</masked>
</panel>
<panel>
<name>StockPanel</name>
<visible>false</visible>
</panel>
<panel>
<name>BehancePanel</name>
<visible>false</visible>
</panel>
<panel>
<name>FontsPanel</name>
<visible>false</visible>
</panel>
<feature>
<name>SelfServeInstalls</name>
<enabled>false</enabled>
</feature>
</config>" > /Library/Application\ Support/Adobe/OOBE/Configs/ServiceConfig.xml
fi
# Reload preferences
echo "Reload preferences for ${loggedInUser} ..."
/usr/bin/pkill -l -U "${loggedInUser}" cfprefsd
# Launch Adobe Creative Cloud Desktop App
#echo "Launch Adobe Creative Cloud Desktop App as \"${loggedInUser}\" ..."
#/usr/bin/su \- "${loggedInUser}" -c "/usr/bin/open '/Applications/Utilities/Adobe Creative Cloud/ACC/Creative Cloud.app'"
else
echo "ERROR: Parameter 4 set to \"${AppsPanelVisibility}\" instead of either \"true\" or \"false\"; exiting."
exit 1
fi
# Record result to JSS
echo "Set Adobe Creative Cloud Desktop Apps Panel Visibility to \"${AppsPanelVisibility}\"."
exit 0