mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Kill this weird pattern
This commit is contained in:
@@ -58,6 +58,10 @@ Example:
|
||||
# omarchy:aliases=omarchy screenshot
|
||||
```
|
||||
|
||||
# Runtime Environment
|
||||
|
||||
- Commands in `bin/` should rely on `$OMARCHY_PATH` from the uwsm environment; do not set or default `OMARCHY_PATH` manually there.
|
||||
|
||||
# Install Scripts
|
||||
|
||||
Install entry points (`install.sh`, `boot.sh`) use `#!/bin/bash`. Many scripts under `install/` are sourced via `run_logged` and intentionally do not have shebangs.
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
set -euo pipefail
|
||||
|
||||
OMARCHY_BIN_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
|
||||
OMARCHY_PATH=${OMARCHY_PATH:-$(cd -- "$OMARCHY_BIN_DIR/.." && pwd)}
|
||||
REPEAT=5
|
||||
KEEP_CACHE=false
|
||||
|
||||
@@ -124,14 +123,12 @@ chmod +x "$stub_bin/omarchy-menu-images"
|
||||
|
||||
benchmark_env=(
|
||||
env
|
||||
"OMARCHY_PATH=$OMARCHY_PATH"
|
||||
"XDG_CACHE_HOME=$benchmark_cache"
|
||||
"PATH=$stub_bin:$OMARCHY_BIN_DIR:$PATH"
|
||||
)
|
||||
|
||||
thumbnail_env=(
|
||||
env
|
||||
"OMARCHY_PATH=$OMARCHY_PATH"
|
||||
"XDG_CACHE_HOME=$thumbnail_cache"
|
||||
"PATH=$stub_bin:$OMARCHY_BIN_DIR:$PATH"
|
||||
)
|
||||
|
||||
@@ -16,7 +16,7 @@ announce_browser_installed() {
|
||||
|
||||
copy_chromium_flags() {
|
||||
mkdir -p ~/.config
|
||||
cp -f "${OMARCHY_PATH:-$HOME/.local/share/omarchy}/config/chromium-flags.conf" "$1"
|
||||
cp -f "$OMARCHY_PATH/config/chromium-flags.conf" "$1"
|
||||
}
|
||||
|
||||
setup_firefox_preferences() {
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
# omarchy:summary=Open a generic image selector menu
|
||||
# omarchy:args=[--selected <image>] [--print-name] [--show-labels] [--filterable] [--lazy-thumbnails] [--preload] [--cache-only] <image-dir>...
|
||||
|
||||
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}
|
||||
|
||||
selected_image=""
|
||||
print_name=false
|
||||
show_labels=false
|
||||
|
||||
@@ -24,7 +24,7 @@ while (($#)); do
|
||||
done
|
||||
|
||||
if [[ ! -f $config_file ]]; then
|
||||
default_config="${OMARCHY_PATH:-$HOME/.local/share/omarchy}/config/tmux/tmux.conf"
|
||||
default_config="$OMARCHY_PATH/config/tmux/tmux.conf"
|
||||
|
||||
if [[ -f $default_config ]]; then
|
||||
config_file="$default_config"
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
CONFIG_DIR="$OMARCHY_PATH/default/quickshell/omarchy-shell"
|
||||
|
||||
quickshell kill -p "$CONFIG_DIR" >/dev/null 2>&1 || true
|
||||
setsid uwsm-app -- env OMARCHY_PATH="$OMARCHY_PATH" quickshell -p "$CONFIG_DIR" >/dev/null 2>&1 &
|
||||
setsid uwsm-app -- quickshell -p "$CONFIG_DIR" >/dev/null 2>&1 &
|
||||
|
||||
@@ -31,7 +31,6 @@ if [[ $1 == "--if-running" ]]; then
|
||||
shift
|
||||
fi
|
||||
|
||||
OMARCHY_PATH="${OMARCHY_PATH:-$HOME/.local/share/omarchy}"
|
||||
SHELL_DIR="$OMARCHY_PATH/default/quickshell/omarchy-shell"
|
||||
|
||||
shell_running() {
|
||||
@@ -50,7 +49,7 @@ else
|
||||
# 9<&- so the spawned shell does not inherit (and keep) the lock fd; the
|
||||
# spawned process is long-lived and would otherwise hold the lock for the
|
||||
# remainder of the session, deadlocking every subsequent helper invocation.
|
||||
setsid uwsm-app -- env OMARCHY_PATH="$OMARCHY_PATH" quickshell -p "$SHELL_DIR" >/dev/null 2>&1 9<&- &
|
||||
setsid uwsm-app -- quickshell -p "$SHELL_DIR" >/dev/null 2>&1 9<&- &
|
||||
for _ in 1 2 3 4 5 6 7 8 9 10; do
|
||||
sleep 0.2
|
||||
shell_running && break
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# omarchy:summary=Send a fire-and-forget IPC call to a running omarchy-shell
|
||||
# omarchy:hidden=true
|
||||
|
||||
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}
|
||||
SHELL_QML="$OMARCHY_PATH/default/quickshell/omarchy-shell/shell.qml"
|
||||
|
||||
if (( $# < 2 )); then
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
set -e
|
||||
|
||||
COMMAND="$1"
|
||||
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}
|
||||
|
||||
if [[ -z $COMMAND ]]; then
|
||||
echo "Usage: omarchy-snapshot <create|restore>" >&2
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
set -e
|
||||
|
||||
CONFIG_FILE="$HOME/.config/omarchy/shell.json"
|
||||
DEFAULTS_FILE="${OMARCHY_PATH:-$HOME/.local/share/omarchy}/default/quickshell/omarchy-shell/shell-defaults.json"
|
||||
DEFAULTS_FILE="$OMARCHY_PATH/default/quickshell/omarchy-shell/shell-defaults.json"
|
||||
position=$1
|
||||
|
||||
if [[ ! $position =~ ^(top|bottom|left|right)$ ]]; then
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
# omarchy:name=bg-switcher
|
||||
# omarchy:aliases=omarchy background
|
||||
|
||||
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}
|
||||
theme_name=$(cat "$HOME/.config/omarchy/current/theme.name" 2>/dev/null)
|
||||
current_background=$(readlink -f "$HOME/.config/omarchy/current/background" 2>/dev/null)
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
# omarchy:summary=List themes with preview image paths (tab-separated: name\tslug\tpreview)
|
||||
# omarchy:hidden=true
|
||||
|
||||
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}
|
||||
|
||||
omarchy-theme-list 2>/dev/null | while IFS= read -r name; do
|
||||
[[ -n $name ]] || continue
|
||||
slug=$(printf '%s' "$name" | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
# omarchy:summary=Open the Omarchy theme switcher
|
||||
|
||||
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}
|
||||
preload=false
|
||||
|
||||
if [[ $1 == "--preload" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user