Use Omarchy command helpers consistently
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
OUTPUT_DIR="${OMARCHY_SCREENRECORD_DIR:-${XDG_VIDEOS_DIR:-$HOME/Videos}}"
|
OUTPUT_DIR="${OMARCHY_SCREENRECORD_DIR:-${XDG_VIDEOS_DIR:-$HOME/Videos}}"
|
||||||
|
|
||||||
if [[ ! -d $OUTPUT_DIR ]]; then
|
if [[ ! -d $OUTPUT_DIR ]]; then
|
||||||
notify-send "Screen recording directory does not exist: $OUTPUT_DIR" -u critical -t 3000
|
omarchy-notification-send -u critical -t 3000 "Screen recording directory does not exist: $OUTPUT_DIR"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ start_webcam_overlay() {
|
|||||||
if [[ -z $WEBCAM_DEVICE ]]; then
|
if [[ -z $WEBCAM_DEVICE ]]; then
|
||||||
WEBCAM_DEVICE=$(v4l2-ctl --list-devices 2>/dev/null | grep -m1 "^[[:space:]]*/dev/video" | tr -d '\t')
|
WEBCAM_DEVICE=$(v4l2-ctl --list-devices 2>/dev/null | grep -m1 "^[[:space:]]*/dev/video" | tr -d '\t')
|
||||||
if [[ -z $WEBCAM_DEVICE ]]; then
|
if [[ -z $WEBCAM_DEVICE ]]; then
|
||||||
notify-send "No webcam devices found" -u critical -t 3000
|
omarchy-notification-send -u critical -t 3000 "No webcam devices found"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -200,7 +200,7 @@ stop_screenrecording() {
|
|||||||
|
|
||||||
if pgrep -f "^gpu-screen-recorder" >/dev/null; then
|
if pgrep -f "^gpu-screen-recorder" >/dev/null; then
|
||||||
pkill -9 -f "^gpu-screen-recorder"
|
pkill -9 -f "^gpu-screen-recorder"
|
||||||
notify-send "Screen recording error" "Recording process had to be force-killed. Video may be corrupted." -u critical -t 5000
|
omarchy-notification-send -u critical -t 5000 "Screen recording error" "Recording process had to be force-killed. Video may be corrupted."
|
||||||
else
|
else
|
||||||
finalize_recording
|
finalize_recording
|
||||||
local filename=$(cat "$RECORDING_FILE" 2>/dev/null)
|
local filename=$(cat "$RECORDING_FILE" 2>/dev/null)
|
||||||
|
|||||||
+5
-11
@@ -29,13 +29,7 @@ provider_from_arg() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
self_path() {
|
self_path() {
|
||||||
local self="${BASH_SOURCE[0]}"
|
readlink -f "$OMARCHY_PATH/bin/${BASH_SOURCE[0]##*/}"
|
||||||
|
|
||||||
if [[ $self != /* ]]; then
|
|
||||||
self=$(command -v -- "$self")
|
|
||||||
fi
|
|
||||||
|
|
||||||
readlink -f "$self"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
require_root() {
|
require_root() {
|
||||||
@@ -43,7 +37,7 @@ require_root() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! command -v pkexec >/dev/null; then
|
if omarchy-cmd-missing pkexec; then
|
||||||
echo "Error: pkexec is required to change DNS settings." >&2
|
echo "Error: pkexec is required to change DNS settings." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -156,7 +150,7 @@ set_connection_dns() {
|
|||||||
local ipv4_dns="${1:-}"
|
local ipv4_dns="${1:-}"
|
||||||
local ipv6_dns="${2:-}"
|
local ipv6_dns="${2:-}"
|
||||||
|
|
||||||
command -v nmcli >/dev/null 2>&1 || return 0
|
omarchy-cmd-present nmcli || return 0
|
||||||
|
|
||||||
while IFS=: read -r uuid type; do
|
while IFS=: read -r uuid type; do
|
||||||
[[ -n $uuid ]] || continue
|
[[ -n $uuid ]] || continue
|
||||||
@@ -174,7 +168,7 @@ set_connection_dns() {
|
|||||||
clear_connection_dns() {
|
clear_connection_dns() {
|
||||||
local uuid type
|
local uuid type
|
||||||
|
|
||||||
command -v nmcli >/dev/null 2>&1 || return 0
|
omarchy-cmd-present nmcli || return 0
|
||||||
|
|
||||||
while IFS=: read -r uuid type; do
|
while IFS=: read -r uuid type; do
|
||||||
[[ -n $uuid ]] || continue
|
[[ -n $uuid ]] || continue
|
||||||
@@ -192,7 +186,7 @@ clear_connection_dns() {
|
|||||||
reapply_active_dns_connections() {
|
reapply_active_dns_connections() {
|
||||||
local device type state
|
local device type state
|
||||||
|
|
||||||
command -v nmcli >/dev/null 2>&1 || return 0
|
omarchy-cmd-present nmcli || return 0
|
||||||
|
|
||||||
while IFS=: read -r device type state; do
|
while IFS=: read -r device type state; do
|
||||||
[[ -n $device && $state == connected ]] || continue
|
[[ -n $device && $state == connected ]] || continue
|
||||||
|
|||||||
@@ -54,12 +54,12 @@ log_first_run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
notification_server_ready() {
|
notification_server_ready() {
|
||||||
if command -v gdbus >/dev/null 2>&1; then
|
if omarchy-cmd-present gdbus; then
|
||||||
gdbus call --session \
|
gdbus call --session \
|
||||||
--dest org.freedesktop.Notifications \
|
--dest org.freedesktop.Notifications \
|
||||||
--object-path /org/freedesktop/Notifications \
|
--object-path /org/freedesktop/Notifications \
|
||||||
--method org.freedesktop.Notifications.GetServerInformation >/dev/null 2>&1
|
--method org.freedesktop.Notifications.GetServerInformation >/dev/null 2>&1
|
||||||
elif command -v busctl >/dev/null 2>&1; then
|
elif omarchy-cmd-present busctl; then
|
||||||
busctl --user call \
|
busctl --user call \
|
||||||
org.freedesktop.Notifications \
|
org.freedesktop.Notifications \
|
||||||
/org/freedesktop/Notifications \
|
/org/freedesktop/Notifications \
|
||||||
@@ -71,7 +71,7 @@ notification_server_ready() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
wait_for_notifications() {
|
wait_for_notifications() {
|
||||||
command -v omarchy-shell >/dev/null || return 0
|
omarchy-cmd-present omarchy-shell || return 0
|
||||||
|
|
||||||
for _ in {1..100}; do
|
for _ in {1..100}; do
|
||||||
if omarchy-shell notifications ping >/dev/null 2>&1 && notification_server_ready; then
|
if omarchy-shell notifications ping >/dev/null 2>&1 && notification_server_ready; then
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ fi
|
|||||||
# When --no-rebuild is set, the caller is responsible for the UKI rebuild
|
# When --no-rebuild is set, the caller is responsible for the UKI rebuild
|
||||||
# (e.g. running before limine-mkinitcpio-hook is installed during initial
|
# (e.g. running before limine-mkinitcpio-hook is installed during initial
|
||||||
# install), so we only require limine-mkinitcpio when we'd invoke it ourselves.
|
# install), so we only require limine-mkinitcpio when we'd invoke it ourselves.
|
||||||
if ! $NO_REBUILD && ! command -v limine-mkinitcpio &>/dev/null; then
|
if ! $NO_REBUILD && omarchy-cmd-missing limine-mkinitcpio; then
|
||||||
echo "Skipping hibernation setup (requires Limine bootloader)"
|
echo "Skipping hibernation setup (requires Limine bootloader)"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# omarchy:summary=Detect whether the system has an active hybrid GPU configuration
|
# omarchy:summary=Detect whether the system has an active hybrid GPU configuration
|
||||||
|
|
||||||
if command -v supergfxctl &>/dev/null; then
|
if omarchy-cmd-present supergfxctl; then
|
||||||
supergfxctl -s 2>/dev/null | grep -qw Hybrid
|
supergfxctl -s 2>/dev/null | grep -qw Hybrid
|
||||||
else
|
else
|
||||||
(($(lspci | grep -cE 'VGA|3D|Display') >= 2))
|
(($(lspci | grep -cE 'VGA|3D|Display') >= 2))
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# omarchy:summary=Launch the Omarchy screensaver in the default terminal on the system with the correct font configuration.
|
# omarchy:summary=Launch the Omarchy screensaver in the default terminal on the system with the correct font configuration.
|
||||||
|
|
||||||
if ! command -v tte &>/dev/null; then
|
if omarchy-cmd-missing tte; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -22,7 +22,8 @@ hypr_focus_monitor() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hypr_exec() {
|
hypr_exec() {
|
||||||
local command="$1"
|
local command
|
||||||
|
printf -v command '%q ' "$@"
|
||||||
|
|
||||||
hyprctl dispatch "hl.dsp.exec_cmd([[$command]])" >/dev/null 2>&1 || hyprctl dispatch exec -- bash -lc "$command" >/dev/null
|
hyprctl dispatch "hl.dsp.exec_cmd([[$command]])" >/dev/null 2>&1 || hyprctl dispatch exec -- bash -lc "$command" >/dev/null
|
||||||
}
|
}
|
||||||
@@ -32,16 +33,16 @@ for m in $(hyprctl monitors -j | jq -r '.[] | .name'); do
|
|||||||
|
|
||||||
case $terminal in
|
case $terminal in
|
||||||
*Alacritty*)
|
*Alacritty*)
|
||||||
hypr_exec "alacritty --class=org.omarchy.screensaver --config-file $OMARCHY_PATH/default/alacritty/screensaver.toml -e omarchy-screensaver"
|
hypr_exec alacritty --class=org.omarchy.screensaver --config-file "$OMARCHY_PATH/default/alacritty/screensaver.toml" -e omarchy-screensaver
|
||||||
;;
|
;;
|
||||||
*ghostty*)
|
*ghostty*)
|
||||||
hypr_exec "ghostty --class=org.omarchy.screensaver --config-file=$OMARCHY_PATH/default/ghostty/screensaver --font-size=18 -e omarchy-screensaver"
|
hypr_exec ghostty --class=org.omarchy.screensaver --config-file="$OMARCHY_PATH/default/ghostty/screensaver" --font-size=18 -e omarchy-screensaver
|
||||||
;;
|
;;
|
||||||
*foot*)
|
*foot*)
|
||||||
hypr_exec "foot --app-id=org.omarchy.screensaver --config=\"$OMARCHY_PATH/default/foot/screensaver.ini\" -e omarchy-screensaver"
|
hypr_exec foot --app-id=org.omarchy.screensaver --config="$OMARCHY_PATH/default/foot/screensaver.ini" -e omarchy-screensaver
|
||||||
;;
|
;;
|
||||||
*kitty*)
|
*kitty*)
|
||||||
hypr_exec "kitty --class=org.omarchy.screensaver --override font_size=18 --override window_padding_width=0 -e omarchy-screensaver"
|
hypr_exec kitty --class=org.omarchy.screensaver --override font_size=18 --override window_padding_width=0 -e omarchy-screensaver
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
omarchy-notification-send -g ✋ "Screensaver only runs in Alacritty, Foot, Ghostty, or Kitty"
|
omarchy-notification-send -g ✋ "Screensaver only runs in Alacritty, Foot, Ghostty, or Kitty"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ fi
|
|||||||
|
|
||||||
notify_command=$(printf 'if [[ -n $(omarchy-notification-send -u critical -g "Run Omarchy Migrations" %q -a) ]]; then omarchy-launch-floating-terminal-with-presentation omarchy-migrate; fi' "$message")
|
notify_command=$(printf 'if [[ -n $(omarchy-notification-send -u critical -g "Run Omarchy Migrations" %q -a) ]]; then omarchy-launch-floating-terminal-with-presentation omarchy-migrate; fi' "$message")
|
||||||
|
|
||||||
if command -v systemd-run >/dev/null 2>&1; then
|
if omarchy-cmd-present systemd-run; then
|
||||||
unit="omarchy-migrations-notification-$(date +%Y%m%d%H%M%S)"
|
unit="omarchy-migrations-notification-$(date +%Y%m%d%H%M%S)"
|
||||||
systemd-run --user --scope --unit="$unit" bash -lc "$notify_command" >/dev/null 2>&1 && exit 0
|
systemd-run --user --scope --unit="$unit" bash -lc "$notify_command" >/dev/null 2>&1 && exit 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
+2
-2
@@ -52,7 +52,7 @@ fail() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
require_command() {
|
require_command() {
|
||||||
command -v "$1" >/dev/null 2>&1 || fail "$1 is required"
|
omarchy-cmd-present "$1" || fail "$1 is required"
|
||||||
}
|
}
|
||||||
|
|
||||||
interactive() {
|
interactive() {
|
||||||
@@ -283,7 +283,7 @@ update_one() {
|
|||||||
|
|
||||||
if (( ! ASSUME_YES )); then
|
if (( ! ASSUME_YES )); then
|
||||||
echo "Changes for $id:"
|
echo "Changes for $id:"
|
||||||
if command -v delta >/dev/null 2>&1; then
|
if omarchy-cmd-present delta; then
|
||||||
git -C "$dir" diff HEAD FETCH_HEAD | delta --paging=never
|
git -C "$dir" diff HEAD FETCH_HEAD | delta --paging=never
|
||||||
else
|
else
|
||||||
git -C "$dir" diff HEAD FETCH_HEAD
|
git -C "$dir" diff HEAD FETCH_HEAD
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
OMARCHY_PATH="${OMARCHY_PATH:-}"
|
OMARCHY_PATH="${OMARCHY_PATH:-}"
|
||||||
command -v jq >/dev/null 2>&1 || { echo "omarchy-plugin-catalog: jq is required" >&2; exit 1; }
|
omarchy-cmd-present jq || { echo "omarchy-plugin-catalog: jq is required" >&2; exit 1; }
|
||||||
|
|
||||||
paths=()
|
paths=()
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ fail() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
require_command() {
|
require_command() {
|
||||||
command -v "$1" >/dev/null 2>&1 || fail "$1 is required"
|
omarchy-cmd-present "$1" || fail "$1 is required"
|
||||||
}
|
}
|
||||||
|
|
||||||
require_omarchy_path() {
|
require_omarchy_path() {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ USAGE
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
command -v jq >/dev/null 2>&1 || fail "jq is required"
|
omarchy-cmd-present jq || fail "jq is required"
|
||||||
|
|
||||||
PLUGIN_DIR="${1:-}"
|
PLUGIN_DIR="${1:-}"
|
||||||
[[ -n $PLUGIN_DIR && -d $PLUGIN_DIR ]] || fail "plugin folder not found: ${PLUGIN_DIR:-<none>}"
|
[[ -n $PLUGIN_DIR && -d $PLUGIN_DIR ]] || fail "plugin folder not found: ${PLUGIN_DIR:-<none>}"
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
# omarchy:summary=Overwrite the user config for the Plymouth drive decryption and boot sequence with the Omarchy default and rebuild it.
|
# omarchy:summary=Overwrite the user config for the Plymouth drive decryption and boot sequence with the Omarchy default and rebuild it.
|
||||||
# omarchy:requires-sudo=true
|
# omarchy:requires-sudo=true
|
||||||
|
|
||||||
sudo cp -r $OMARCHY_PATH/default/plymouth/* /usr/share/plymouth/themes/omarchy/
|
sudo cp -r "$OMARCHY_PATH/default/plymouth/." /usr/share/plymouth/themes/omarchy/
|
||||||
sudo plymouth-set-default-theme omarchy
|
sudo plymouth-set-default-theme omarchy
|
||||||
|
|
||||||
if command -v limine-mkinitcpio &>/dev/null; then
|
if omarchy-cmd-present limine-mkinitcpio; then
|
||||||
sudo limine-mkinitcpio
|
sudo limine-mkinitcpio
|
||||||
else
|
else
|
||||||
sudo mkinitcpio -P
|
sudo mkinitcpio -P
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if command -v flatpak >/dev/null && flatpak info com.nvidia.geforcenow &>/dev/null; then
|
if omarchy-cmd-present flatpak && flatpak info com.nvidia.geforcenow &>/dev/null; then
|
||||||
flatpak uninstall -y --delete-data com.nvidia.geforcenow
|
flatpak uninstall -y --delete-data com.nvidia.geforcenow
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ if package_name="$(pacman -Qqo "$desktop_file" 2>/dev/null | head -1)" && [[ -n
|
|||||||
exec omarchy-launch-floating-terminal-with-presentation "echo Uninstalling $quoted_display...; sudo pacman -Rns $quoted_package"
|
exec omarchy-launch-floating-terminal-with-presentation "echo Uninstalling $quoted_display...; sudo pacman -Rns $quoted_package"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v flatpak >/dev/null 2>&1 && flatpak info "${desktop_file_name%.desktop}" >/dev/null 2>&1; then
|
if omarchy-cmd-present flatpak && flatpak info "${desktop_file_name%.desktop}" >/dev/null 2>&1; then
|
||||||
flatpak_id="${desktop_file_name%.desktop}"
|
flatpak_id="${desktop_file_name%.desktop}"
|
||||||
quoted_flatpak="$(printf '%q' "$flatpak_id")"
|
quoted_flatpak="$(printf '%q' "$flatpak_id")"
|
||||||
exec omarchy-launch-floating-terminal-with-presentation "flatpak uninstall $quoted_flatpak"
|
exec omarchy-launch-floating-terminal-with-presentation "flatpak uninstall $quoted_flatpak"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ if [[ -z $COMMAND ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! command -v snapper &>/dev/null; then
|
if omarchy-cmd-missing snapper; then
|
||||||
exit 127 # omarchy-update can use this to just ignore if snapper is not available
|
exit 127 # omarchy-update can use this to just ignore if snapper is not available
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ hyprctl switchxkblayout all 0 > /dev/null 2>&1
|
|||||||
|
|
||||||
# Ensure 1password is locked. Use timeout because `1password --lock` can
|
# Ensure 1password is locked. Use timeout because `1password --lock` can
|
||||||
# otherwise leave a full Electron helper tree running after each lock.
|
# otherwise leave a full Electron helper tree running after each lock.
|
||||||
if pgrep -x "1password" >/dev/null && command -v 1password >/dev/null 2>&1; then
|
if pgrep -x "1password" >/dev/null && omarchy-cmd-present 1password; then
|
||||||
(
|
(
|
||||||
flock -n 9 || exit 0
|
flock -n 9 || exit 0
|
||||||
timeout --kill-after=1s 3s 1password --lock >/dev/null 2>&1 || true
|
timeout --kill-after=1s 3s 1password --lock >/dev/null 2>&1 || true
|
||||||
|
|||||||
@@ -8,8 +8,7 @@ monitor_command='exec dbus-monitor --system "type='\''signal'\'',sender='\''org.
|
|||||||
|
|
||||||
consume_sleep_events() {
|
consume_sleep_events() {
|
||||||
local line sleep_lock
|
local line sleep_lock
|
||||||
sleep_lock=$(command -v omarchy-system-sleep-lock || true)
|
sleep_lock="$OMARCHY_PATH/bin/omarchy-system-sleep-lock"
|
||||||
sleep_lock=${sleep_lock:-/usr/bin/omarchy-system-sleep-lock}
|
|
||||||
|
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
if [[ $line == *"boolean true"* ]]; then
|
if [[ $line == *"boolean true"* ]]; then
|
||||||
@@ -24,8 +23,7 @@ if [[ ${1:-} == "--consume" ]]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep_monitor=$(command -v omarchy-system-sleep-monitor || true)
|
sleep_monitor="$OMARCHY_PATH/bin/omarchy-system-sleep-monitor"
|
||||||
sleep_monitor=${sleep_monitor:-/usr/bin/omarchy-system-sleep-monitor}
|
|
||||||
|
|
||||||
exec systemd-inhibit \
|
exec systemd-inhibit \
|
||||||
--what=sleep \
|
--what=sleep \
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ for file in "${tui_desktop_files[@]}"; do
|
|||||||
rm -f "$ICON_DIR/$icon_name.png" "$ICON_DIR/$app_name.png" "$OLD_ICON_DIR/$app_name.png"
|
rm -f "$ICON_DIR/$icon_name.png" "$ICON_DIR/$app_name.png" "$OLD_ICON_DIR/$app_name.png"
|
||||||
done
|
done
|
||||||
|
|
||||||
if command -v update-desktop-database &>/dev/null; then
|
if omarchy-cmd-present update-desktop-database; then
|
||||||
update-desktop-database "$APP_DIR" &>/dev/null || true
|
update-desktop-database "$APP_DIR" &>/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -38,7 +38,7 @@ update_disabled_idle=0
|
|||||||
sleep_inhibit_pid=""
|
sleep_inhibit_pid=""
|
||||||
|
|
||||||
disable_sleep_for_update() {
|
disable_sleep_for_update() {
|
||||||
command -v systemd-inhibit >/dev/null 2>&1 || return 0
|
omarchy-cmd-present systemd-inhibit || return 0
|
||||||
|
|
||||||
systemd-inhibit \
|
systemd-inhibit \
|
||||||
--what=sleep:idle \
|
--what=sleep:idle \
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ TEMP_LOG="/tmp/upload-log.txt"
|
|||||||
SYSTEM_INFO="/tmp/system-info.txt"
|
SYSTEM_INFO="/tmp/system-info.txt"
|
||||||
|
|
||||||
# Get system information if fastfetch is available
|
# Get system information if fastfetch is available
|
||||||
if command -v fastfetch >/dev/null 2>&1; then
|
if omarchy-cmd-present fastfetch; then
|
||||||
{
|
{
|
||||||
echo "========================================="
|
echo "========================================="
|
||||||
echo "SYSTEM INFORMATION"
|
echo "SYSTEM INFORMATION"
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ for file in "${webapp_desktop_files[@]}"; do
|
|||||||
rm -f "$ICON_DIR/$icon_name.png" "$ICON_DIR/$app_name.png" "$OLD_ICON_DIR/$app_name.png"
|
rm -f "$ICON_DIR/$icon_name.png" "$ICON_DIR/$app_name.png" "$OLD_ICON_DIR/$app_name.png"
|
||||||
done
|
done
|
||||||
|
|
||||||
if command -v update-desktop-database &>/dev/null; then
|
if omarchy-cmd-present update-desktop-database; then
|
||||||
update-desktop-database "$APP_DIR" &>/dev/null || true
|
update-desktop-database "$APP_DIR" &>/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ launch_windows() {
|
|||||||
echo "❌ Failed to start Windows VM!"
|
echo "❌ Failed to start Windows VM!"
|
||||||
echo " Try checking: omarchy-windows-vm status"
|
echo " Try checking: omarchy-windows-vm status"
|
||||||
echo " View logs: docker logs omarchy-windows"
|
echo " View logs: docker logs omarchy-windows"
|
||||||
notify-send -u critical "Windows VM" "Failed to start Windows VM"
|
omarchy-notification-send -u critical "Windows VM" "Failed to start Windows VM"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh"
|
||||||
|
|
||||||
|
raw_command_checks=$(rg -l 'command -v' "$ROOT/bin" \
|
||||||
|
| rg -v '/omarchy-(cmd-|pkg-|upgrade-to-quattro)' || true)
|
||||||
|
[[ -z $raw_command_checks ]] || fail "bin commands use command helpers" "$raw_command_checks"
|
||||||
|
pass "bin commands use command helpers"
|
||||||
|
|
||||||
|
raw_notifications=$(rg -l -P '^[[:space:]]*[^#[:space:]].*\bnotify-send\b' "$ROOT/bin" \
|
||||||
|
| rg -v '/omarchy-notification-send$' || true)
|
||||||
|
[[ -z $raw_notifications ]] || fail "bin commands use the notification helper" "$raw_notifications"
|
||||||
|
pass "bin commands use the notification helper"
|
||||||
Reference in New Issue
Block a user