Merge upstream quattro for the Qt 6.12 palette fix (#14553)
Qt 6.12 shadows the bare Color singleton, so the bar and every Color role read undefined on fresh installs. Keep our I18n text in the four conflicting files, qualify #14433's notification button color, give the new dictation menu rows and notifications Chinese, and drop table entries for the removed Voxtype and FIDO2 texts.
This commit is contained in:
commit
fcd681c099
239 files changed
+3996
-616
No files matched your search
@@ -46,6 +46,7 @@ GROUP_DESCRIPTIONS[finalize]="Finalize user setup"
|
||||
GROUP_DESCRIPTIONS[default]="Default application selection"
|
||||
GROUP_DESCRIPTIONS[dev]="Omarchy development tools"
|
||||
GROUP_DESCRIPTIONS[disk]="Disk performance helpers"
|
||||
GROUP_DESCRIPTIONS[dictation]="Dictation recording"
|
||||
GROUP_DESCRIPTIONS[display]="Display and text scaling"
|
||||
GROUP_DESCRIPTIONS[dns]="DNS resolver configuration"
|
||||
GROUP_DESCRIPTIONS[drive]="Drive selection and encryption"
|
||||
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Get or set the default dictation backend
|
||||
# omarchy:args=[backend]
|
||||
# omarchy:examples=omarchy default dictation | omarchy default dictation superwhisper
|
||||
|
||||
if (($# > 1)); then
|
||||
echo "Usage: omarchy default dictation [backend]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if (($# == 0)); then
|
||||
config="${XDG_CONFIG_HOME:-$HOME/.config}/omarchy/defaults/dictation"
|
||||
if [[ ! -s $config ]]; then
|
||||
echo "No dictation backend configured. Select one in Setup > Defaults > Dictation." >&2
|
||||
exit 1
|
||||
fi
|
||||
read -r backend < "$config"
|
||||
else
|
||||
backend=$1
|
||||
fi
|
||||
|
||||
if [[ ! $backend =~ ^[a-z0-9][a-z0-9-]*$ ]]; then
|
||||
echo "Invalid dictation backend: $backend" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if (($# == 0)); then
|
||||
echo "$backend"
|
||||
else
|
||||
installer="omarchy-install-dictation-$backend"
|
||||
if omarchy-cmd-missing "$installer"; then
|
||||
echo "No installer available for dictation backend: $backend" >&2
|
||||
exit 1
|
||||
fi
|
||||
omarchy-launch-floating-terminal-with-presentation "$installer"
|
||||
fi
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Record dictation with the configured backend
|
||||
# omarchy:args=<start|stop|toggle>
|
||||
# omarchy:examples=omarchy dictation start | omarchy dictation toggle
|
||||
|
||||
if (($# != 1)) || [[ $1 != "start" && $1 != "stop" && $1 != "toggle" ]]; then
|
||||
echo "Usage: omarchy dictation <start|stop|toggle>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
config="${XDG_CONFIG_HOME:-$HOME/.config}/omarchy/defaults/dictation"
|
||||
mkdir -p "${config%/*}"
|
||||
exec 9> "$config.lock"
|
||||
if ! flock -w 5 9; then
|
||||
echo "Dictation is busy; try again." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
backend=$(omarchy-default-dictation) || exit 1
|
||||
adapter="omarchy-dictation-$backend"
|
||||
if omarchy-cmd-missing "$adapter"; then
|
||||
echo "The selected dictation backend ($backend) is not installed." >&2
|
||||
exit 1
|
||||
fi
|
||||
"$adapter" "$1" 9>&-
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Record dictation using Superwhisper
|
||||
# omarchy:args=<start|stop|toggle>
|
||||
|
||||
case "${1:-}" in
|
||||
start) superwhisper start ;;
|
||||
stop)
|
||||
if omarchy-cmd-missing superwhisper || ! systemctl --user is-active --quiet superwhisper.service; then
|
||||
exit 0
|
||||
else
|
||||
superwhisper stop
|
||||
fi
|
||||
;;
|
||||
toggle) superwhisper record ;;
|
||||
*) echo "Usage: omarchy dictation superwhisper <start|stop|toggle>" >&2; exit 1 ;;
|
||||
esac
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:hidden=true
|
||||
# omarchy:summary=Save a configured dictation backend after stopping the previous backend
|
||||
# omarchy:args=<backend>
|
||||
|
||||
set -e
|
||||
|
||||
if (($# != 1)) || [[ ! $1 =~ ^[a-z0-9][a-z0-9-]*$ ]]; then
|
||||
echo "Usage: omarchy-dictation-use <backend>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
config="${XDG_CONFIG_HOME:-$HOME/.config}/omarchy/defaults/dictation"
|
||||
mkdir -p "${config%/*}"
|
||||
exec 9> "$config.lock"
|
||||
if ! flock -w 5 9; then
|
||||
echo "Dictation is busy; try again." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
previous=$(omarchy-default-dictation 2>/dev/null) || previous=""
|
||||
if [[ -n $previous && $previous != "$1" ]] && omarchy-cmd-present "omarchy-dictation-$previous"; then
|
||||
if ! "omarchy-dictation-$previous" stop 9>&-; then
|
||||
echo "Could not stop $previous; keeping the existing dictation backend." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
temporary=$(mktemp "$config.XXXXXX")
|
||||
trap 'rm -f "$temporary"' EXIT
|
||||
printf '%s\n' "$1" > "$temporary"
|
||||
mv -f "$temporary" "$config"
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Record dictation using Voxtype
|
||||
# omarchy:args=<start|stop|toggle>
|
||||
|
||||
case "${1:-}" in
|
||||
start|toggle) voxtype record "$1" ;;
|
||||
stop)
|
||||
if omarchy-cmd-missing voxtype || [[ $(voxtype status) == "stopped" ]]; then
|
||||
exit 0
|
||||
else
|
||||
voxtype record stop
|
||||
fi
|
||||
;;
|
||||
*) echo "Usage: omarchy dictation voxtype <start|stop|toggle>" >&2; exit 1 ;;
|
||||
esac
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Install and configure Superwhisper dictation
|
||||
# omarchy:requires-sudo=true
|
||||
|
||||
set -e
|
||||
|
||||
omarchy-pkg-add superwhisper-bin
|
||||
bash /usr/share/superwhisper/setup-user
|
||||
# Existing profiles may still use Right Alt, which conflicts with Omarchy.
|
||||
# Keep a recording shortcut active while moving away from that binding.
|
||||
shortcuts=$(superwhisper shortcuts show)
|
||||
if [[ $(jq -r '.shortcuts.hold' <<< "$shortcuts") == "RightAlt" ]]; then
|
||||
if [[ -z $(jq -r '.shortcuts.toggle' <<< "$shortcuts") ]]; then
|
||||
superwhisper shortcuts set hold "RightSuper" >/dev/null
|
||||
else
|
||||
superwhisper shortcuts set hold none >/dev/null
|
||||
fi
|
||||
fi
|
||||
# Superwhisper requires a native recording shortcut; keep it separate from
|
||||
# Omarchy's push-to-talk keys.
|
||||
superwhisper shortcuts set toggle "Alt+Space" >/dev/null
|
||||
superwhisper shortcuts set hold none >/dev/null
|
||||
omarchy-dictation-use superwhisper
|
||||
hyprctl reload >/dev/null
|
||||
omarchy-notification-send -g "$(omarchy-text "Superwhisper Dictation Ready")" "$(omarchy-text "Hold Right Alt or F9 to dictate (or toggle with Super + Ctrl + X).")" -t 10000
|
||||
superwhisper settings
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Install and configure Voxtype dictation
|
||||
# omarchy:requires-sudo=true
|
||||
|
||||
set -e
|
||||
|
||||
if omarchy-cmd-missing voxtype; then
|
||||
if gum confirm "Install Voxtype + AI model (~150MB) to enable dictation?"; then
|
||||
omarchy-pkg-add wtype voxtype-bin
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
config_home="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||
mkdir -p "$config_home/voxtype"
|
||||
if [[ ! -e $config_home/voxtype/config.toml ]]; then
|
||||
cp "$OMARCHY_PATH/default/voxtype/config.toml" "$config_home/voxtype/"
|
||||
if omarchy-hw-vulkan; then
|
||||
voxtype setup gpu --enable || true
|
||||
fi
|
||||
fi
|
||||
|
||||
# Setup reuses the configured model and downloads it only when missing.
|
||||
# Retry these steps even when an earlier attempt already installed the binary.
|
||||
voxtype setup --download --no-post-install
|
||||
voxtype setup systemd
|
||||
systemctl --user enable --now voxtype.service
|
||||
|
||||
omarchy-dictation-use voxtype
|
||||
hyprctl reload >/dev/null
|
||||
omarchy-notification-send -g "$(omarchy-text "Voxtype Dictation Ready")" "$(omarchy-text "Hold Right Alt or F9 to dictate (or toggle with Super + Ctrl + X).")" -t 10000
|
||||
@@ -15,7 +15,9 @@
|
||||
# against a half-written tree, and that failed reload leaves a second engine
|
||||
# generation behind that turns the next restart's IPC kill into a crash.
|
||||
run_shell() {
|
||||
QS_DISABLE_FILE_WATCHER=1 QS_NO_RELOAD_POPUP=1 \
|
||||
local startup_background
|
||||
startup_background=$(readlink -f "$HOME/.local/state/omarchy/current/background" 2>/dev/null)
|
||||
OMARCHY_STARTUP_BACKGROUND="$startup_background" QS_DISABLE_FILE_WATCHER=1 QS_NO_RELOAD_POPUP=1 \
|
||||
systemd-cat -t omarchy-shell -- quickshell -n -p "$OMARCHY_PATH/shell" &
|
||||
shell_pid=$!
|
||||
|
||||
|
||||
@@ -68,8 +68,6 @@ run_first_run_step() {
|
||||
fi
|
||||
}
|
||||
|
||||
run_first_run_step "install Voxtype post-update hook" \
|
||||
omarchy-hook-install post-update "$OMARCHY_PATH/install/user/first-run/install-voxtype.hook"
|
||||
run_first_run_step "install fingerprint setup post-update hook" \
|
||||
omarchy-hook-install post-update "$OMARCHY_PATH/install/user/first-run/setup-fingerprint.hook"
|
||||
run_first_run_step "install agent setup post-update hook" \
|
||||
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Remove Superwhisper dictation and its desktop integration
|
||||
# omarchy:requires-sudo=true
|
||||
|
||||
set -e
|
||||
|
||||
config_home="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||
data_home="${XDG_DATA_HOME:-$HOME/.local/share}"
|
||||
|
||||
systemctl --user disable --now superwhisper.service 2>/dev/null || true
|
||||
omarchy-shell -q shell setPluginEnabled superwhisper.panel false >/dev/null
|
||||
omarchy-pkg-drop superwhisper-bin
|
||||
systemctl --user daemon-reload
|
||||
|
||||
# Remove the package setup's links, preserving independently installed copies
|
||||
# and the user's preferences, history, and models.
|
||||
unlink_package_link() {
|
||||
if [[ -L $1 && $(readlink "$1") == "$2" ]]; then
|
||||
rm "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
unlink_package_link "$HOME/.local/bin/superwhisper" /usr/bin/superwhisper
|
||||
unlink_package_link "$data_home/superwhisper/app/current" /opt/superwhisper
|
||||
unlink_package_link "$config_home/omarchy/plugins/superwhisper-panel" /opt/superwhisper/assets/omarchy-plugin/superwhisper-panel
|
||||
for agent in .agents .claude .codex .pi/agent; do
|
||||
unlink_package_link "$HOME/$agent/skills/superwhisper" /opt/superwhisper/assets/agent-skill/superwhisper
|
||||
done
|
||||
|
||||
backend_config="$config_home/omarchy/defaults/dictation"
|
||||
if [[ -f $backend_config && $(< "$backend_config") == "superwhisper" ]]; then
|
||||
rm "$backend_config"
|
||||
fi
|
||||
|
||||
omarchy-shell -q shell rescanPlugins
|
||||
hyprctl reload >/dev/null
|
||||
if systemctl --user -q is-active omarchy-fcitx5.service; then
|
||||
systemctl --user restart omarchy-fcitx5.service
|
||||
fi
|
||||
@@ -18,6 +18,10 @@ if omarchy-cmd-present voxtype; then
|
||||
omarchy-pkg-drop voxtype-bin
|
||||
rm -rf ~/.config/voxtype
|
||||
rm -rf ~/.local/share/voxtype
|
||||
backend_config="${XDG_CONFIG_HOME:-$HOME/.config}/omarchy/defaults/dictation"
|
||||
if [[ -f $backend_config && $(< "$backend_config") == "voxtype" ]]; then
|
||||
rm "$backend_config"
|
||||
fi
|
||||
hyprctl reload >/dev/null
|
||||
else
|
||||
echo "Voxtype was not installed."
|
||||
Executable
+201
@@ -0,0 +1,201 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Play the current background's matching theme intro
|
||||
# omarchy:hidden=true
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
state_home="$HOME/.local/state"
|
||||
current_dir="$state_home/omarchy/current"
|
||||
current_background_link="$current_dir/background"
|
||||
marker="$state_home/omarchy/background-intro.session-id"
|
||||
toggle="$state_home/omarchy/toggles/background-intros-off"
|
||||
video_extensions=(mp4 m4v mov webm mkv avi)
|
||||
|
||||
resolve_intro() {
|
||||
local background
|
||||
local stem
|
||||
local extension
|
||||
local intro
|
||||
|
||||
background=$(readlink -f "${1:-$current_background_link}" 2>/dev/null) || return 1
|
||||
[[ -f $background ]] || return 1
|
||||
case ${background,,} in
|
||||
*.jpg | *.jpeg | *.png | *.bmp | *.webp) ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
|
||||
stem=${background##*/}
|
||||
stem=${stem%.*}
|
||||
for extension in "${video_extensions[@]}"; do
|
||||
intro="${background%/*}/intros/$stem.$extension"
|
||||
if [[ -f $intro ]]; then
|
||||
printf '%s\n' "$intro"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
# Preparation is speculative: the selected staged clip is compared again by OWE.
|
||||
prepare_theme_intro() {
|
||||
local theme="$1" background remembered name source intro
|
||||
local -a names=()
|
||||
[[ -n $theme && $theme != .* && $theme != */* ]] || return 0
|
||||
[[ ! -f $toggle ]] && ! animations_off || return 0
|
||||
owe warm >/dev/null 2>&1 || return 0
|
||||
[[ $(cat "$current_dir/theme.name" 2>/dev/null) != "$theme" ]] || return 0
|
||||
remembered=$(cat "$state_home/omarchy/theme-backgrounds/$theme" 2>/dev/null || true)
|
||||
if [[ ${remembered%/*} == "$current_dir/theme/backgrounds" ]]; then
|
||||
name=${remembered##*/}
|
||||
elif [[ -f $remembered ]]; then
|
||||
background="$remembered"
|
||||
else
|
||||
mapfile -d '' -t names < <(
|
||||
find -L "$HOME/.config/omarchy/backgrounds/$theme" -maxdepth 1 -type f -print0 2>/dev/null | sort -z
|
||||
)
|
||||
if (( ${#names[@]} > 0 )); then
|
||||
background=${names[0]}
|
||||
else
|
||||
mapfile -d '' -t names < <(
|
||||
find -L "$OMARCHY_PATH/themes/$theme/backgrounds" "$HOME/.config/omarchy/themes/$theme/backgrounds" -maxdepth 1 -type f \
|
||||
\( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' -o -iname '*.bmp' -o -iname '*.webp' \) -printf '%f\0' 2>/dev/null | sort -zu
|
||||
)
|
||||
(( ${#names[@]} > 0 )) || return 0
|
||||
name=${names[0]}
|
||||
fi
|
||||
fi
|
||||
if [[ -n ${name:-} ]]; then
|
||||
for source in "$HOME/.config/omarchy/themes/$theme" "$OMARCHY_PATH/themes/$theme"; do
|
||||
if [[ -f $source/backgrounds/$name ]]; then
|
||||
background="$source/backgrounds/$name"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
[[ -n ${background:-} ]] || return 0
|
||||
intro=$(resolve_intro "$background" || true)
|
||||
[[ -z $intro ]] || owe intro-prepare "$intro" >/dev/null 2>&1 || true
|
||||
}
|
||||
|
||||
animations_off() {
|
||||
[[ $(hyprctl -j getoption animations:enabled 2>/dev/null | jq -r '.bool' 2>/dev/null) == "false" ]]
|
||||
}
|
||||
|
||||
theme_switch=false
|
||||
intro_prepared=false
|
||||
expected_background=""
|
||||
expected_theme=""
|
||||
case ${1:-} in
|
||||
"") ;;
|
||||
--prepare-theme)
|
||||
prepare_theme_intro "${2:-}"
|
||||
exit 0
|
||||
;;
|
||||
--resolve-only)
|
||||
resolve_intro "${2:-}" || true
|
||||
exit 0
|
||||
;;
|
||||
--resolve-startup)
|
||||
if [[ ! -f $toggle ]] && ! animations_off; then
|
||||
resolve_intro || true
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
--theme-switch)
|
||||
theme_switch=true
|
||||
expected_background=$(readlink -f "${2:-}" 2>/dev/null) || exit 1
|
||||
expected_theme=${3:-}
|
||||
intro_prepared=${4:-false}
|
||||
[[ -n $expected_theme ]] || exit 1
|
||||
;;
|
||||
*)
|
||||
echo "Usage: omarchy-theme-bg-boot-intro [--resolve-only [background]|--resolve-startup|--prepare-theme theme|--theme-switch background theme-id [prepared]]" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ $theme_switch == false ]]; then
|
||||
mkdir -p "$(dirname "$marker")"
|
||||
exec 9>"$state_home/omarchy/background-intro.lock"
|
||||
flock 9
|
||||
|
||||
session_id=${OMARCHY_SESSION_ID:-${HYPRLAND_INSTANCE_SIGNATURE:-}}
|
||||
[[ -n $session_id ]] || exit 0
|
||||
if [[ -f $marker && $(<"$marker") == "$session_id" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
marker_staged=$(mktemp "$state_home/omarchy/.background-intro.session-id.XXXXXX")
|
||||
trap 'rm -f "$marker_staged"' EXIT
|
||||
printf '%s\n' "$session_id" >"$marker_staged"
|
||||
mv -f "$marker_staged" "$marker"
|
||||
trap - EXIT
|
||||
exec 9>&-
|
||||
fi
|
||||
|
||||
selection_current() {
|
||||
[[ $(readlink -f "$current_background_link") == "$expected_background" &&
|
||||
$(stat -Lc '%d:%i' "$current_dir/theme" 2>/dev/null) == "$expected_theme" ]]
|
||||
}
|
||||
|
||||
if [[ $theme_switch == true ]] && ! selection_current; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ -f $toggle ]] || animations_off; then
|
||||
[[ $theme_switch == false ]] || exit 1
|
||||
exit 0
|
||||
fi
|
||||
|
||||
intro=$(resolve_intro || true)
|
||||
if [[ -z $intro ]]; then
|
||||
[[ $theme_switch == false ]] || exit 1
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ $theme_switch == true && $intro_prepared != "true" ]]; then
|
||||
owe refresh >/dev/null || exit 1
|
||||
elif [[ $theme_switch == false ]]; then
|
||||
deadline=$((SECONDS + 5))
|
||||
while ! timeout 1 owe status >/dev/null 2>&1; do
|
||||
if (( SECONDS >= deadline )); then
|
||||
exit 0
|
||||
fi
|
||||
sleep 0.2
|
||||
done
|
||||
(( SECONDS < deadline )) || exit 0
|
||||
fi
|
||||
|
||||
# The asynchronous outgoing cover must reach the compositor before playback
|
||||
# can hide the shell background. Older shells have no readiness method.
|
||||
if [[ $theme_switch == true ]]; then
|
||||
deadline=$((SECONDS + 3))
|
||||
while true; do
|
||||
cover_status=$(omarchy-shell shell themeIntroCoverStatus "$expected_theme" 2>/dev/null || true)
|
||||
case $cover_status in
|
||||
loading)
|
||||
(( SECONDS < deadline )) || exit 1
|
||||
sleep 0.01
|
||||
;;
|
||||
error) exit 1 ;;
|
||||
superseded) exit 0 ;;
|
||||
*) break ;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ $theme_switch == true ]] && ! selection_current; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# A selection or setting changed while OWE was starting no longer permits this intro.
|
||||
if [[ ! -f $toggle && $intro == "$(resolve_intro || true)" ]] && ! animations_off; then
|
||||
if [[ $theme_switch == true && $intro_prepared == "true" ]]; then
|
||||
owe intro --start first-frame --refresh "$intro"
|
||||
else
|
||||
owe intro --start first-frame "$intro"
|
||||
fi
|
||||
elif [[ $theme_switch == true ]]; then
|
||||
exit 1
|
||||
fi
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Enable or disable background intros
|
||||
# omarchy:args=<enable|disable|toggle|status>
|
||||
# omarchy:examples=omarchy theme bg intro toggle | omarchy theme bg intro disable
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
toggle="$HOME/.local/state/omarchy/toggles/background-intros-off"
|
||||
case ${1:-} in
|
||||
enable)
|
||||
rm -f "$toggle"
|
||||
omarchy-notification-send "$(omarchy-text "Background Intros")" "$(omarchy-text "Enabled")"
|
||||
;;
|
||||
disable)
|
||||
mkdir -p "$(dirname "$toggle")"
|
||||
touch "$toggle"
|
||||
omarchy-notification-send "$(omarchy-text "Background Intros")" "$(omarchy-text "Disabled")"
|
||||
;;
|
||||
toggle)
|
||||
if [[ -f $toggle ]]; then
|
||||
omarchy-theme-bg-intro enable
|
||||
else
|
||||
omarchy-theme-bg-intro disable
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
[[ ! -f $toggle ]]
|
||||
;;
|
||||
*)
|
||||
echo "Usage: omarchy-theme-bg-intro <enable|disable|toggle|status>" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
+84
-6
@@ -50,6 +50,13 @@ shell_ipc() {
|
||||
timeout 2 omarchy-shell "$@" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
wait_for_theme_intro() {
|
||||
local method="$1" token="$2" pending="$3" deadline=$((SECONDS + 3))
|
||||
while (( SECONDS < deadline )) && [[ $(omarchy-shell shell "$method" "$token" 2>/dev/null) == "$pending" ]]; do
|
||||
sleep 0.02
|
||||
done
|
||||
}
|
||||
|
||||
is_video_path() {
|
||||
[[ ${1,,} =~ \.(mp4|m4v|mov|webm|mkv|avi)$ ]]
|
||||
}
|
||||
@@ -70,10 +77,18 @@ snapshot_background_path() {
|
||||
}
|
||||
|
||||
snapshot_current_background() {
|
||||
local current_background
|
||||
local current_background snapshot
|
||||
|
||||
current_background=$(readlink -f "$CURRENT_BACKGROUND_LINK" 2>/dev/null || true)
|
||||
snapshot_background_path "$current_background" "previous"
|
||||
# An interrupted intro is still moving; its final still would flash as a
|
||||
# cover. Capture the frame already playing instead, when OWE supports it.
|
||||
mkdir -p "$BACKGROUND_TRANSITION_CACHE"
|
||||
snapshot="$BACKGROUND_TRANSITION_CACHE/previous-$$.ppm"
|
||||
if owe render "$(jq -nc --arg path "$snapshot" '{cmd: "snapshot", path: $path}')" >/dev/null 2>&1; then
|
||||
echo "$snapshot"
|
||||
else
|
||||
current_background=$(readlink -f "$CURRENT_BACKGROUND_LINK" 2>/dev/null || true)
|
||||
snapshot_background_path "$current_background" "previous"
|
||||
fi
|
||||
}
|
||||
|
||||
theme_background_state_file() {
|
||||
@@ -171,7 +186,7 @@ set_theme_background_link() {
|
||||
}
|
||||
|
||||
set_theme_background() {
|
||||
local new_background new_background_snapshot
|
||||
local new_background new_background_snapshot theme_id intro_prepared=false
|
||||
|
||||
if [[ -z $CHOSEN_THEME_BACKGROUND || ! -f $CHOSEN_THEME_BACKGROUND ]]; then
|
||||
if ! choose_theme_background; then
|
||||
@@ -182,6 +197,37 @@ set_theme_background() {
|
||||
fi
|
||||
|
||||
new_background="$CHOSEN_THEME_BACKGROUND"
|
||||
if [[ -n $THEME_BACKGROUND_INTRO ]]; then
|
||||
if [[ -n $INTRO_PREPARE_PID ]] && wait "$INTRO_PREPARE_PID"; then
|
||||
intro_prepared=true
|
||||
fi
|
||||
theme_id=$(stat -Lc '%d:%i' "$CURRENT_THEME_PATH")
|
||||
THEME_INTRO_TOKEN="$theme_id"
|
||||
shell_ipc shell prepareThemeIntro "$OLD_BACKGROUND_SNAPSHOT" "$theme_id" "$colors_payload" "$shell_payload" || \
|
||||
shell_ipc shell applyTheme "$colors_payload" "$shell_payload" || true
|
||||
ln -nsf "$new_background" "$CURRENT_BACKGROUND_LINK"
|
||||
(
|
||||
if ! omarchy-theme-bg-boot-intro --theme-switch "$new_background" "$theme_id" "$intro_prepared"; then
|
||||
if [[ $(readlink -f "$CURRENT_BACKGROUND_LINK") == "$(readlink -f "$new_background")" &&
|
||||
$(stat -Lc '%d:%i' "$CURRENT_THEME_PATH" 2>/dev/null) == "$theme_id" ]]; then
|
||||
shell_ipc background setInstant "$new_background" || true
|
||||
fi
|
||||
fi
|
||||
shell_ipc shell finishThemeIntro "$theme_id" || true
|
||||
wait_for_theme_intro themeIntroStatus "$theme_id" "pending"
|
||||
# Reloading Hyprland interrupts video presentation. Wait for playback,
|
||||
# then serialize with theme selection so an old intro cannot reload
|
||||
# the compositor during the next theme's video.
|
||||
(
|
||||
flock 9
|
||||
if [[ $(stat -Lc '%d:%i' "$CURRENT_THEME_PATH" 2>/dev/null) == "$theme_id" ]]; then
|
||||
omarchy-restart-hyprctl
|
||||
fi
|
||||
) 9>"$THEME_SET_LOCK"
|
||||
[[ -z $OLD_BACKGROUND_SNAPSHOT ]] || rm -f "$OLD_BACKGROUND_SNAPSHOT"
|
||||
) 9>&- &
|
||||
return
|
||||
fi
|
||||
new_background_snapshot=""
|
||||
if [[ -n $PREPARED_BACKGROUND_SNAPSHOT && $PREPARED_BACKGROUND == "$new_background" ]]; then
|
||||
new_background_snapshot="$PREPARED_BACKGROUND_SNAPSHOT"
|
||||
@@ -337,6 +383,12 @@ fi
|
||||
exec 9>"$THEME_SET_LOCK"
|
||||
flock 9
|
||||
|
||||
# A current video frame only represents the screen after its opening fade.
|
||||
# Finish that short reveal before capturing the next outgoing cover.
|
||||
if [[ $THEME_HEADLESS != "1" && $OMARCHY_THEME_SKIP_BACKGROUND != "1" ]]; then
|
||||
wait_for_theme_intro themeIntroStatus "$(stat -Lc '%d:%i' "$CURRENT_THEME_PATH" 2>/dev/null)" "pending"
|
||||
fi
|
||||
|
||||
PREVIOUS_THEME_NAME=$(cat "$CURRENT_THEME_NAME_PATH" 2>/dev/null || true)
|
||||
remember_current_theme_background
|
||||
|
||||
@@ -365,11 +417,24 @@ OLD_BACKGROUND_SNAPSHOT=""
|
||||
PREPARED_BACKGROUND=""
|
||||
PREPARED_BACKGROUND_SNAPSHOT=""
|
||||
BACKGROUND_TRANSITION_SNAPSHOTS=true
|
||||
THEME_BACKGROUND_INTRO=""
|
||||
INTRO_PREPARE_PID=""
|
||||
THEME_INTRO_TOKEN=""
|
||||
if [[ $THEME_HEADLESS != "1" && $OMARCHY_THEME_SKIP_BACKGROUND != "1" ]]; then
|
||||
# Resolve the staged choice while the old theme still exists. Video changes
|
||||
# switch directly to the durable path in QML, so neither side needs a copy.
|
||||
if choose_staged_theme_background; then
|
||||
if background_transition_uses_snapshots "$CHOSEN_THEME_BACKGROUND"; then
|
||||
if [[ $PREVIOUS_THEME_NAME != "$THEME_NAME" && ! -f $HOME/.local/state/omarchy/toggles/background-intros-off ]] &&
|
||||
[[ $(hyprctl -j getoption animations:enabled 2>/dev/null | jq -r '.bool') == "true" ]]; then
|
||||
THEME_BACKGROUND_INTRO=$(omarchy-theme-bg-boot-intro --resolve-only "$STAGED_THEME_BACKGROUND")
|
||||
fi
|
||||
if [[ -n $THEME_BACKGROUND_INTRO ]]; then
|
||||
OLD_BACKGROUND_SNAPSHOT=$(snapshot_current_background)
|
||||
# OWE retains the opened clip across the staged directory's rename.
|
||||
owe intro-prepare "$THEME_BACKGROUND_INTRO" >/dev/null 2>&1 9>&- &
|
||||
INTRO_PREPARE_PID=$!
|
||||
shell_ipc shell prepareThemeIntro "$OLD_BACKGROUND_SNAPSHOT" "$(stat -Lc '%d:%i' "$NEXT_THEME_PATH")" "" "" || true
|
||||
elif background_transition_uses_snapshots "$CHOSEN_THEME_BACKGROUND"; then
|
||||
OLD_BACKGROUND_SNAPSHOT=$(snapshot_current_background)
|
||||
|
||||
# Hand the shell the next background now, so it decodes while the
|
||||
@@ -389,6 +454,12 @@ fi
|
||||
# Generate dynamic configs
|
||||
omarchy-theme-set-templates
|
||||
|
||||
# Replacing the theme's still can cancel an active OWE intro even before the
|
||||
# background link changes. Present its cover before replacing either path.
|
||||
if [[ -n $THEME_BACKGROUND_INTRO ]]; then
|
||||
wait_for_theme_intro themeIntroCoverStatus "$(stat -Lc '%d:%i' "$NEXT_THEME_PATH")" "loading"
|
||||
fi
|
||||
|
||||
# Swap next theme in as current
|
||||
rm -rf "$CURRENT_THEME_PATH"
|
||||
mv "$NEXT_THEME_PATH" "$CURRENT_THEME_PATH"
|
||||
@@ -418,7 +489,6 @@ flock -u 9
|
||||
|
||||
post_theme_commands=(
|
||||
omarchy-restart-terminal
|
||||
omarchy-restart-hyprctl
|
||||
omarchy-restart-btop
|
||||
omarchy-restart-opencode
|
||||
omarchy-restart-helix
|
||||
@@ -437,6 +507,14 @@ post_theme_commands=(
|
||||
)
|
||||
|
||||
if [[ $THEME_HEADLESS != "1" ]]; then
|
||||
# Let the wallpaper and bar finish their reveal before app retints compete
|
||||
# with decoding and the shell's frame rendering. An intro reloads Hyprland
|
||||
# after playback; ordinary theme changes reload it with the app retints.
|
||||
if [[ -n $THEME_INTRO_TOKEN ]]; then
|
||||
wait_for_theme_intro themeIntroStatus "$THEME_INTRO_TOKEN" "pending"
|
||||
else
|
||||
post_theme_commands+=(omarchy-restart-hyprctl)
|
||||
fi
|
||||
run_parallel "${post_theme_commands[@]}"
|
||||
|
||||
# Call hook on theme set
|
||||
|
||||
@@ -29,6 +29,8 @@ if [[ -n $OMARCHY_THEME_SYNC_FROM ]] || ! omarchy-toggle-enabled herdr-theme-syn
|
||||
fi
|
||||
|
||||
theme=$(cat "$HOME/.local/state/omarchy/current/theme.name" 2>/dev/null)
|
||||
control_dir="$XDG_RUNTIME_DIR/omarchy-theme-sync"
|
||||
mkdir -m 700 -p "$control_dir"
|
||||
|
||||
# Runs on the remote machine under a login shell, so OMARCHY_PATH and PATH are set there.
|
||||
# SSH carries no desktop session, so the environment comes from the live Hyprland instance.
|
||||
@@ -66,10 +68,13 @@ read -r -d '' REMOTE_SCRIPT <<'EOF'
|
||||
} </dev/null
|
||||
EOF
|
||||
|
||||
# One machine at a time, so an SSH agent like 1Password asks for approval at most once.
|
||||
# Reuse each authenticated connection for ten idle minutes, so an SSH agent like
|
||||
# 1Password does not need to approve every theme change. Connect one machine at a time.
|
||||
# SSH joins its arguments into a shell command, so the theme travels on stdin as a quoted assignment.
|
||||
for target in $targets; do
|
||||
result=$(printf 'theme=%q from=%q\n%s\n' "$theme" "$(hostname)" "$REMOTE_SCRIPT" |
|
||||
timeout 60 ssh -o BatchMode=yes -o ConnectTimeout=5 "$target" bash -l -s 2>&1 | tail -n 1)
|
||||
timeout 60 ssh -o BatchMode=yes -o ConnectTimeout=5 \
|
||||
-o ControlMaster=auto -o ControlPersist=600 -o "ControlPath=$control_dir/%C" \
|
||||
"$target" bash -l -s 2>&1 | tail -n 1)
|
||||
echo "$(date '+%F %T') $target: ${result:-unreachable}"
|
||||
done
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Install and configure Voxtype dictation
|
||||
# omarchy:requires-sudo=true
|
||||
|
||||
set -e
|
||||
|
||||
# Install voxtype and configure it for use.
|
||||
|
||||
if gum confirm "Install Voxtype + AI model (~150MB) to enable dictation?"; then
|
||||
omarchy-pkg-add wtype voxtype-bin
|
||||
|
||||
# Setup voxtype
|
||||
mkdir -p ~/.config/voxtype
|
||||
cp "$OMARCHY_PATH/default/voxtype/config.toml" ~/.config/voxtype/
|
||||
|
||||
voxtype setup --download --no-post-install
|
||||
if omarchy-hw-vulkan; then
|
||||
voxtype setup gpu --enable || true
|
||||
fi
|
||||
voxtype setup systemd
|
||||
|
||||
hyprctl reload >/dev/null
|
||||
omarchy-restart-shell
|
||||
omarchy-notification-send -g "$(omarchy-text "Voxtype Dictation Ready")" "$(omarchy-text "Hold F9 to dictate (or toggle with Super + Ctrl + X).")" -t 10000
|
||||
fi
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Stream voxtype --follow status as bar-friendly JSON
|
||||
|
||||
if omarchy-cmd-missing voxtype; then
|
||||
echo '{"alt": "", "class": "idle", "tooltip": ""}'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Keep the status follower as the direct child of the bar. Quickshell
|
||||
# clean up their direct child when they restart; a shell pipeline/coproc would
|
||||
# leave `voxtype status --follow` orphaned under the user systemd instance.
|
||||
exec setpriv --pdeathsig TERM voxtype status --follow --extended --format json
|
||||
Reference in new issue
Block a user