You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
warnings=$(printf "${warnings}\njq is not in your PATH! - click for installation instructions | color=$STOPPED_VM_COLOR href=https://stedolan.github.io/jq/download/\n")
100
+
depsOK=0
101
+
fi
102
+
if! has lima;then
103
+
warnings=$(printf "${warnings}lima is not in your PATH! - click to get started | color=$STOPPED_VM_COLOR href=https://github.com/lima-vm/lima#getting-started\n")
104
+
depsOK=0
105
+
fi
73
106
if! has limactl;then
74
107
warnings=$(printf "${warnings}limactl is not in your PATH! - click to get started | color=$STOPPED_VM_COLOR href=https://github.com/lima-vm/lima#getting-started\n")
75
108
depsOK=0
76
109
fi
77
-
if! has jq;then
78
-
warnings=$(printf "${warnings}\njq is not in your PATH! - click for installation instructions | color=$STOPPED_VM_COLOR href=https://stedolan.github.io/jq/download/\n")
110
+
if! has osascript;then
111
+
warnings=$(printf "${warnings}osascript is not in your PATH! - click to get started | color=$STOPPED_VM_COLOR\n")
79
112
depsOK=0
80
113
fi
81
114
if [[ depsOK -eq 0 ]];then
@@ -101,6 +134,7 @@ function printMenuBarIcon() {
101
134
echo'---'
102
135
}
103
136
137
+
# shellcheck disable=SC2059
104
138
functionprintMenu() {
105
139
warnIfMissingDependencies
106
140
@@ -114,27 +148,104 @@ function printMenu() {
114
148
name=$(echo "$raw"| jq -r '.name')
115
149
vmstatus=$(echo "$raw"| jq -r '.status')
116
150
if [[ $vmstatus=='Running' ]];then
117
-
menuItem="$name VM is running - ⛔ | color=$RUNNING_VM_COLOR | bash=$XBAR_PLUGIN param1=stop param2=$name terminal=false refresh=true"
151
+
echo"$name VM is running | color=$RUNNING_VM_COLOR"
152
+
echo"--⛔ Stop $name VM | bash=$XBAR_PLUGIN param1=stop param2=$name terminal=false refresh=true"
0 commit comments