Merge remote-tracking branch 'origin/omarchy-shell' into omarchy-4

# Conflicts:
#	bin/omarchy-debug
#	bin/omarchy-upload-log
This commit is contained in:
Ryan Hughes
2026-06-06 13:28:47 -04:00
26 changed files with 271 additions and 135 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ fi
charge_holding=false
if [[ $ac_online == "true" && -n $threshold_end ]]; then
if [[ $state == "discharging" || $state == "pending-charge" ]]; then
if [[ $state == "pending-charge" ]]; then
charge_holding=true
elif [[ $state == "fully-charged" ]] && (( percentage < 99 )); then
charge_holding=true
+1 -1
View File
@@ -75,7 +75,7 @@ ACTION=$(gum choose "${OPTIONS[@]}")
case "$ACTION" in
"Upload log")
echo "Uploading debug log to logs.omarchy.org..."
URL=$(curl -sf -F "file=@$LOG_FILE" https://logs.omarchy.org/)
URL=$(curl -sf -F "file=@$LOG_FILE" -Fexpires=24 https://logs.omarchy.org/)
if (( $? == 0 )) && [[ -n $URL ]]; then
echo "✓ Log uploaded successfully!"
echo "Share this URL:"
+23 -1
View File
@@ -94,6 +94,21 @@ require_command() {
command -v "$command_name" >/dev/null 2>&1 || fail "$command_name is required"
}
plugin_discovered() {
local id="$1" plugins
plugins=$(omarchy-shell shell listPlugins 2>/dev/null) || return 1
jq -e --arg id "$id" 'any(.[]; .id == $id)' <<<"$plugins" >/dev/null 2>&1
}
wait_for_plugin_discovery() {
local id="$1" attempt
for (( attempt = 0; attempt < 40; attempt++ )); do
plugin_discovered "$id" && return 0
sleep 0.05
done
return 1
}
section_valid() {
[[ $1 =~ ^(left|center|right)$ ]]
}
@@ -181,7 +196,14 @@ plugin_enabled() {
id=$(canonical_widget_id "$id")
omarchy-shell shell rescanPlugins >/dev/null 2>&1 || true
omarchy-shell shell setPluginEnabled "$id" "$enabled" || fail "could not update plugin; is omarchy-shell running?"
if [[ $enabled == "true" ]]; then
require_command jq
wait_for_plugin_discovery "$id" || fail "plugin '$id' was not discovered; is omarchy-shell running?"
fi
local result
result=$(omarchy-shell shell setPluginEnabled "$id" "$enabled") || fail "could not update plugin; is omarchy-shell running?"
[[ $result == "ok" ]] || fail "plugin '$id' is not known; run: omarchy plugin rescan"
if [[ $enabled == "true" && $# -gt 0 ]]; then
mutate_bar move --id "$id" "$@"
+18 -1
View File
@@ -29,6 +29,21 @@ interactive() {
[[ -t 0 && -t 1 ]]
}
plugin_discovered() {
local id="$1" plugins
plugins=$(omarchy-shell shell listPlugins 2>/dev/null) || return 1
jq -e --arg id "$id" 'any(.[]; .id == $id)' <<<"$plugins" >/dev/null 2>&1
}
wait_for_plugin_discovery() {
local id="$1" attempt
for (( attempt = 0; attempt < 40; attempt++ )); do
plugin_discovered "$id" && return 0
sleep 0.05
done
return 1
}
PLUGIN_ID=""
FROM_SOURCE=""
ENABLE_AFTER="" # "", "true", or "false"
@@ -280,7 +295,9 @@ if [[ -z $ENABLE_AFTER ]]; then
fi
if [[ $ENABLE_AFTER == true ]]; then
if omarchy-shell shell setPluginEnabled "$m_id" true >/dev/null 2>&1; then
if ! wait_for_plugin_discovery "$m_id"; then
echo "Could not enable $m_id because omarchy-shell did not discover it yet. Enable later with: omarchy plugin enable $m_id" >&2
elif result=$(omarchy-shell shell setPluginEnabled "$m_id" true) && [[ $result == "ok" ]]; then
echo "Enabled $m_id."
if [[ $m_kinds == *bar-widget* ]]; then
echo "It was added to the bar; arrange it with: omarchy plugin bar move $m_id --section <left|center|right>"
+1 -2
View File
@@ -102,6 +102,5 @@ fi
omarchy-shell shell rescanPlugins >/dev/null 2>&1 || true
if [[ $was_enabled == "true" ]]; then
echo "Plugin was enabled; restart the shell to fully unload it:"
echo " omarchy restart shell"
echo "Plugin was enabled and was unloaded from omarchy-shell."
fi
+1 -2
View File
@@ -208,8 +208,7 @@ done
if ((any_enabled)); then
echo
echo "Updated plugins that were enabled may need a shell restart to fully reload:"
echo " omarchy restart shell"
echo "Updated enabled plugins were hot-reloaded by omarchy-shell."
fi
exit $rc
+1 -1
View File
@@ -152,7 +152,7 @@ esac
echo ""
URL=$(curl -sf -F "file=@$TEMP_LOG" https://logs.omarchy.org/)
URL=$(curl -sf -F "file=@$TEMP_LOG" -Fexpires=24 https://logs.omarchy.org/)
if (( $? == 0 )) && [[ -n $URL ]]; then
echo "✓ Log uploaded successfully!"