mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-02 12:47:49 +02:00
Compare commits
109
Commits
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"workspace": {
|
||||
"library": [
|
||||
"/usr/share/hypr/stubs"
|
||||
],
|
||||
"checkThirdParty": false
|
||||
},
|
||||
"diagnostics": {
|
||||
"globals": ["hl"]
|
||||
}
|
||||
}
|
||||
@@ -97,6 +97,10 @@ Exceptions are allowed for bootstrap, preflight, migration, and package-helper s
|
||||
|
||||
When making visual changes, such as Waybar styles or desktop appearance, always take and analyze a screenshot after applying the change to verify the result. Use `omarchy capture screenshot fullscreen save` for fullscreen screenshots.
|
||||
|
||||
For interactive UI work, use `wtype` to simulate keyboard input when available. Example: start the UI in the background, wait briefly for focus, then run `wtype -k Right -k Return` to exercise keyboard selection and confirm the resulting command output or state change. Prefer this over manual-only verification when a UI returns a selected value or changes a symlink/config.
|
||||
|
||||
When testing layer-shell UI, capture the reference and candidate states as separate screenshots, then compare them visually before further edits. If a launched UI would otherwise remain open, keep track of its PID and stop it after the screenshot; avoid broad process kills unless checking with `ps` first.
|
||||
|
||||
# Refresh Pattern
|
||||
|
||||
To copy a default config to user config with automatic backup:
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
@@ -40,6 +40,7 @@ GROUP_DESCRIPTIONS[default]="Default application selection"
|
||||
GROUP_DESCRIPTIONS[dev]="Omarchy development tools"
|
||||
GROUP_DESCRIPTIONS[drive]="Drive selection and encryption"
|
||||
GROUP_DESCRIPTIONS[font]="Font management"
|
||||
GROUP_DESCRIPTIONS[games]="Game launchers and helpers"
|
||||
GROUP_DESCRIPTIONS[hibernation]="Hibernation setup and removal"
|
||||
GROUP_DESCRIPTIONS[hook]="User hook runner"
|
||||
GROUP_DESCRIPTIONS[hw]="Hardware detection and controls"
|
||||
|
||||
@@ -21,7 +21,7 @@ time_remaining=$(omarchy-battery-remaining-time)
|
||||
capacity=$(omarchy-battery-capacity)
|
||||
|
||||
if [[ $state == "charging" ]]; then
|
||||
echo " Battery ${percentage}% · ${time_remaining} to full · ${power_rate}W / ${capacity}Wh"
|
||||
echo "Battery ${percentage}% · ${time_remaining} to full · ${power_rate}W / ${capacity}Wh"
|
||||
else
|
||||
echo " Battery ${percentage}% · ${time_remaining} left · ${power_rate}W / ${capacity}Wh"
|
||||
echo "Battery ${percentage}% · ${time_remaining} left · ${power_rate}W / ${capacity}Wh"
|
||||
fi
|
||||
|
||||
@@ -6,6 +6,21 @@
|
||||
|
||||
step="${1:-+5%}"
|
||||
|
||||
if [[ $step == "off" ]]; then
|
||||
hyprctl dispatch 'hl.dsp.dpms({ action = "disable" })' >/dev/null 2>&1 || hyprctl dispatch dpms off >/dev/null 2>&1
|
||||
exit 0
|
||||
elif [[ $step == "on" ]]; then
|
||||
hyprctl dispatch 'hl.dsp.dpms({ action = "enable" })' >/dev/null 2>&1 || hyprctl dispatch dpms on >/dev/null 2>&1
|
||||
exit 0
|
||||
fi
|
||||
|
||||
runtime_dir="${XDG_RUNTIME_DIR:-/tmp}"
|
||||
|
||||
# Drop overlapping brightness key events so concurrent invocations do not race.
|
||||
# Hardware key repeat present on some devices can otherwise glitch SwayOSD rendering.
|
||||
exec 9>"$runtime_dir/omarchy-brightness-display.lock"
|
||||
flock -n 9 || exit 0
|
||||
|
||||
# Start with the first possible output, then refine to the most likely given an order heuristic.
|
||||
device="$(ls -1 /sys/class/backlight 2>/dev/null | head -n1)"
|
||||
for candidate in amdgpu_bl* intel_backlight acpi_video*; do
|
||||
@@ -15,13 +30,6 @@ for candidate in amdgpu_bl* intel_backlight acpi_video*; do
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ $step == "off" ]]; then
|
||||
hyprctl dispatch dpms off >/dev/null 2>&1
|
||||
exit 0
|
||||
elif [[ $step == "on" ]]; then
|
||||
hyprctl dispatch dpms on >/dev/null 2>&1
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if omarchy-hyprland-monitor-focused-apple; then
|
||||
omarchy-brightness-display-apple "$step"
|
||||
|
||||
Executable
+228
@@ -0,0 +1,228 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Measure Quickshell Omarchy menu response times
|
||||
# omarchy:args=[--repeat=<count>] [--no-ui]
|
||||
# omarchy:examples=omarchy dev benchmark menu | omarchy dev benchmark menu --repeat=10
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
OMARCHY_BIN_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
|
||||
OMARCHY_PATH=${OMARCHY_PATH:-$(cd -- "$OMARCHY_BIN_DIR/.." && pwd)}
|
||||
REPEAT=5
|
||||
NO_UI=false
|
||||
|
||||
show_help() {
|
||||
cat <<'EOF'
|
||||
Usage:
|
||||
omarchy dev benchmark menu [--repeat=<count>] [--no-ui]
|
||||
|
||||
Measure the Omarchy menu startup path:
|
||||
- static JSONC menu parsing
|
||||
- Quickshell socket startup
|
||||
- cold open/close roundtrip (unless --no-ui)
|
||||
- warm open/close roundtrip against the resident Quickshell process
|
||||
|
||||
Options:
|
||||
--repeat=<count> Number of UI open/close runs to measure (default: 5)
|
||||
--no-ui Skip cases that briefly open the menu
|
||||
EOF
|
||||
}
|
||||
|
||||
now_us() {
|
||||
local now="${EPOCHREALTIME/./}"
|
||||
printf '%s' "$now"
|
||||
}
|
||||
|
||||
format_ms() {
|
||||
local us="$1"
|
||||
printf '%d.%03d' "$(( us / 1000 ))" "$(( us % 1000 ))"
|
||||
}
|
||||
|
||||
measure_once() {
|
||||
local start_us end_us
|
||||
start_us=$(now_us)
|
||||
"$@" >/dev/null
|
||||
end_us=$(now_us)
|
||||
printf '%s' "$(( end_us - start_us ))"
|
||||
}
|
||||
|
||||
run_case() {
|
||||
local label="$1"
|
||||
shift
|
||||
local total_us=0
|
||||
local min_us=0
|
||||
local max_us=0
|
||||
local elapsed_us=0
|
||||
|
||||
for (( i = 1; i <= REPEAT; i++ )); do
|
||||
elapsed_us=$(measure_once "$@")
|
||||
total_us=$(( total_us + elapsed_us ))
|
||||
|
||||
if (( i == 1 || elapsed_us < min_us )); then
|
||||
min_us=$elapsed_us
|
||||
fi
|
||||
|
||||
if (( elapsed_us > max_us )); then
|
||||
max_us=$elapsed_us
|
||||
fi
|
||||
done
|
||||
|
||||
printf '%-34s avg %8s ms min %8s ms max %8s ms\n' \
|
||||
"$label" \
|
||||
"$(format_ms "$(( total_us / REPEAT ))")" \
|
||||
"$(format_ms "$min_us")" \
|
||||
"$(format_ms "$max_us")"
|
||||
}
|
||||
|
||||
socket_path() {
|
||||
printf '%s/omarchy-menu.sock' "${XDG_RUNTIME_DIR:-/run/user/$UID}"
|
||||
}
|
||||
|
||||
menu_qml() {
|
||||
printf '%s/default/quickshell/menu.qml' "$OMARCHY_PATH"
|
||||
}
|
||||
|
||||
kill_menu_shell() {
|
||||
quickshell kill -p "$(menu_qml)" >/dev/null 2>&1 || true
|
||||
|
||||
for (( i = 0; i < 200; i++ )); do
|
||||
if ! pgrep -f "[q]uickshell .*$(menu_qml)" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 0.01
|
||||
done
|
||||
|
||||
rm -f "$(socket_path)" "${XDG_RUNTIME_DIR:-/run/user/$UID}/omarchy-menu.state" "${XDG_RUNTIME_DIR:-/run/user/$UID}/omarchy-menu.lock"
|
||||
}
|
||||
|
||||
build_menu_json() {
|
||||
env OMARCHY_PATH="$OMARCHY_PATH" PATH="$OMARCHY_BIN_DIR:$PATH" \
|
||||
"$OMARCHY_BIN_DIR/omarchy-menu" --json
|
||||
}
|
||||
|
||||
start_quickshell_socket() {
|
||||
local menu_file
|
||||
local selection_file
|
||||
local done_file
|
||||
|
||||
kill_menu_shell
|
||||
menu_file=$(mktemp)
|
||||
selection_file=$(mktemp)
|
||||
done_file=$(mktemp)
|
||||
printf '{"items":[]}' >"$menu_file"
|
||||
rm -f "$done_file"
|
||||
|
||||
env \
|
||||
OMARCHY_PATH="$OMARCHY_PATH" \
|
||||
OMARCHY_MENU_JSON_FILE="$menu_file" \
|
||||
OMARCHY_MENU_INITIAL_MENU="root" \
|
||||
OMARCHY_MENU_SELECTION_FILE="$selection_file" \
|
||||
OMARCHY_MENU_DONE_FILE="$done_file" \
|
||||
quickshell -n -d -p "$(menu_qml)" >/dev/null
|
||||
|
||||
for (( i = 0; i < 200; i++ )); do
|
||||
[[ -S $(socket_path) ]] && break
|
||||
sleep 0.01
|
||||
done
|
||||
|
||||
[[ -S $(socket_path) ]]
|
||||
kill_menu_shell
|
||||
rm -f "$menu_file" "$selection_file" "$done_file"
|
||||
}
|
||||
|
||||
menu_layer_visible() {
|
||||
hyprctl layers -j 2>/dev/null | jq -e '.. | objects | select(.namespace? == "omarchy-menu")' >/dev/null
|
||||
}
|
||||
|
||||
open_close_menu() {
|
||||
local pid
|
||||
|
||||
env OMARCHY_PATH="$OMARCHY_PATH" PATH="$OMARCHY_BIN_DIR:$PATH" \
|
||||
"$OMARCHY_BIN_DIR/omarchy-menu" >/dev/null &
|
||||
pid=$!
|
||||
|
||||
for (( i = 0; i < 300; i++ )); do
|
||||
if menu_layer_visible && [[ -S $(socket_path) ]]; then
|
||||
break
|
||||
fi
|
||||
sleep 0.01
|
||||
done
|
||||
|
||||
if [[ ! -S $(socket_path) ]]; then
|
||||
kill "$pid" 2>/dev/null || true
|
||||
kill_menu_shell
|
||||
return 1
|
||||
fi
|
||||
|
||||
printf 'close\n' | socat -u - "UNIX-CONNECT:$(socket_path)" >/dev/null 2>&1 || true
|
||||
|
||||
for (( i = 0; i < 500; i++ )); do
|
||||
if ! kill -0 "$pid" 2>/dev/null; then
|
||||
break
|
||||
fi
|
||||
sleep 0.01
|
||||
done
|
||||
|
||||
if kill -0 "$pid" 2>/dev/null; then
|
||||
kill "$pid" 2>/dev/null || true
|
||||
kill_menu_shell
|
||||
return 1
|
||||
fi
|
||||
|
||||
wait "$pid" || true
|
||||
}
|
||||
|
||||
cold_open_close_menu() {
|
||||
kill_menu_shell
|
||||
open_close_menu
|
||||
kill_menu_shell
|
||||
}
|
||||
|
||||
warm_open_close_menu() {
|
||||
open_close_menu
|
||||
}
|
||||
|
||||
while (( $# > 0 )); do
|
||||
case "$1" in
|
||||
--repeat=*) REPEAT="${1#*=}" ;;
|
||||
--no-ui) NO_UI=true ;;
|
||||
--help | -h)
|
||||
show_help
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $1" >&2
|
||||
show_help >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [[ ! $REPEAT =~ ^[0-9]+$ ]] || (( REPEAT < 1 )); then
|
||||
echo "--repeat must be a positive integer" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
cleanup() {
|
||||
kill_menu_shell
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
run_label="runs"
|
||||
(( REPEAT == 1 )) && run_label="run"
|
||||
printf 'Omarchy menu benchmark (%d %s each)\n\n' "$REPEAT" "$run_label"
|
||||
|
||||
run_case "menu JSON build" build_menu_json
|
||||
|
||||
if [[ $NO_UI != true ]]; then
|
||||
if omarchy-cmd-present quickshell socat hyprctl jq && [[ -n ${WAYLAND_DISPLAY:-} ]]; then
|
||||
printf '%-34s %s ms\n' "quickshell socket startup" "$(format_ms "$(measure_once start_quickshell_socket)")"
|
||||
run_case "cold open/close" cold_open_close_menu
|
||||
kill_menu_shell
|
||||
open_close_menu >/dev/null
|
||||
run_case "warm open/close" warm_open_close_menu
|
||||
else
|
||||
printf 'Skipping UI cases: quickshell/socat/hyprctl/jq/Wayland unavailable\n'
|
||||
fi
|
||||
fi
|
||||
Executable
+163
@@ -0,0 +1,163 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Measure theme switcher cache and selector prep times
|
||||
# omarchy:args=[--repeat=<count>] [--keep-cache]
|
||||
# omarchy:examples=omarchy dev benchmark theme switcher | omarchy dev benchmark theme-switcher --repeat=10
|
||||
# omarchy:aliases=omarchy dev benchmark theme-switcher
|
||||
|
||||
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
|
||||
|
||||
show_help() {
|
||||
cat <<'EOF'
|
||||
Usage:
|
||||
omarchy dev benchmark theme switcher [--repeat=<count>] [--keep-cache]
|
||||
|
||||
Measure the non-interactive parts of the theme switcher:
|
||||
- theme preview index build (omarchy-theme-switcher before UI handoff)
|
||||
- lazy selector row prep used by the interactive theme switcher
|
||||
- full thumbnail cache warmup cost (omarchy-menu-images --cache-only)
|
||||
|
||||
Options:
|
||||
--repeat=<count> Number of warm runs to measure for each case (default: 5)
|
||||
--keep-cache Keep the temporary benchmark cache and print its path
|
||||
EOF
|
||||
}
|
||||
|
||||
now_us() {
|
||||
local now="${EPOCHREALTIME/./}"
|
||||
printf '%s' "$now"
|
||||
}
|
||||
|
||||
format_ms() {
|
||||
local us="$1"
|
||||
printf '%d.%03d' "$(( us / 1000 ))" "$(( us % 1000 ))"
|
||||
}
|
||||
|
||||
measure_once() {
|
||||
local start_us end_us
|
||||
start_us=$(now_us)
|
||||
"$@" >/dev/null
|
||||
end_us=$(now_us)
|
||||
printf '%s' "$(( end_us - start_us ))"
|
||||
}
|
||||
|
||||
run_case() {
|
||||
local label="$1"
|
||||
shift
|
||||
local total_us=0
|
||||
local min_us=0
|
||||
local max_us=0
|
||||
local elapsed_us=0
|
||||
|
||||
for (( i = 1; i <= REPEAT; i++ )); do
|
||||
elapsed_us=$(measure_once "$@")
|
||||
total_us=$(( total_us + elapsed_us ))
|
||||
|
||||
if (( i == 1 || elapsed_us < min_us )); then
|
||||
min_us=$elapsed_us
|
||||
fi
|
||||
|
||||
if (( elapsed_us > max_us )); then
|
||||
max_us=$elapsed_us
|
||||
fi
|
||||
done
|
||||
|
||||
printf '%-34s avg %8s ms min %8s ms max %8s ms\n' \
|
||||
"$label" \
|
||||
"$(format_ms "$(( total_us / REPEAT ))")" \
|
||||
"$(format_ms "$min_us")" \
|
||||
"$(format_ms "$max_us")"
|
||||
}
|
||||
|
||||
while (( $# > 0 )); do
|
||||
case "$1" in
|
||||
--repeat=*)
|
||||
REPEAT="${1#*=}"
|
||||
;;
|
||||
--keep-cache)
|
||||
KEEP_CACHE=true
|
||||
;;
|
||||
--help | -h)
|
||||
show_help
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $1" >&2
|
||||
show_help >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [[ ! $REPEAT =~ ^[0-9]+$ ]] || (( REPEAT < 1 )); then
|
||||
echo "--repeat must be a positive integer" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
benchmark_cache=$(mktemp -d)
|
||||
thumbnail_cache=$(mktemp -d)
|
||||
stub_bin=$(mktemp -d)
|
||||
|
||||
cleanup() {
|
||||
rm -rf "$stub_bin"
|
||||
|
||||
if [[ $KEEP_CACHE == "true" ]]; then
|
||||
printf 'Benchmark cache: %s\n' "$benchmark_cache"
|
||||
printf 'Thumbnail cache: %s\n' "$thumbnail_cache"
|
||||
else
|
||||
rm -rf "$benchmark_cache" "$thumbnail_cache"
|
||||
fi
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
cat >"$stub_bin/omarchy-menu-images" <<'EOF'
|
||||
#!/bin/bash
|
||||
exit 0
|
||||
EOF
|
||||
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"
|
||||
)
|
||||
|
||||
preview_dir="$benchmark_cache/omarchy/theme-selector/previews"
|
||||
thumbnail_preview_dir="$thumbnail_cache/omarchy/theme-selector/previews"
|
||||
|
||||
build_theme_index() {
|
||||
"${benchmark_env[@]}" "$OMARCHY_BIN_DIR/omarchy-theme-switcher"
|
||||
}
|
||||
|
||||
prepare_selector_lazy() {
|
||||
"${benchmark_env[@]}" "$OMARCHY_BIN_DIR/omarchy-menu-images" --prepare-only --lazy-thumbnails --show-labels --filterable "$preview_dir"
|
||||
}
|
||||
|
||||
prepare_image_cache() {
|
||||
"${thumbnail_env[@]}" "$OMARCHY_BIN_DIR/omarchy-menu-images" --cache-only "$thumbnail_preview_dir"
|
||||
}
|
||||
|
||||
printf 'Theme switcher benchmark (%d warm runs each)\n\n' "$REPEAT"
|
||||
printf '%-34s %s ms\n' "theme index cold" "$(format_ms "$(measure_once build_theme_index)")"
|
||||
run_case "theme index warm" build_theme_index
|
||||
printf '%-34s %s ms\n' "selector prep cold (lazy)" "$(format_ms "$(measure_once prepare_selector_lazy)")"
|
||||
run_case "selector prep warm (lazy)" prepare_selector_lazy
|
||||
"${thumbnail_env[@]}" "$OMARCHY_BIN_DIR/omarchy-theme-switcher" >/dev/null
|
||||
printf '%-34s %s ms\n' "thumbnail cache cold" "$(format_ms "$(measure_once prepare_image_cache)")"
|
||||
run_case "thumbnail cache warm" prepare_image_cache
|
||||
|
||||
printf '\nTheme previews: %d\n' "$(find -L "$preview_dir" -maxdepth 1 -type f 2>/dev/null | wc -l)"
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=List installed RetroArch core names
|
||||
|
||||
set -e
|
||||
|
||||
core_dir="/usr/lib/libretro"
|
||||
preferred_cores=(
|
||||
"Amstrad CPC|cap32"
|
||||
"Arcade FBNeo|fbneo"
|
||||
"Arcade MAME|mame"
|
||||
"Commodore Amiga|puae"
|
||||
"Commodore C128|vice_x128"
|
||||
"Commodore C64|vice_x64"
|
||||
"Commodore VIC-20|vice_xvic"
|
||||
"Nintendo DS|desmume"
|
||||
"Nintendo Game Boy / Color|gambatte"
|
||||
"Nintendo Game Boy Advance|mgba"
|
||||
"Nintendo GameCube / Wii|dolphin"
|
||||
"Nintendo NES / Famicom|mesen"
|
||||
"Nintendo 64|parallel_n64"
|
||||
"Nintendo SNES / SFC|snes9x"
|
||||
"NEC PC Engine / TurboGrafx-16|mednafen_pce_fast"
|
||||
"NEC PC Engine CD / TurboGrafx-CD|mednafen_pce"
|
||||
"NEC PC Engine SuperGrafx|mednafen_supergrafx"
|
||||
"Sega Dreamcast|flycast"
|
||||
"Sega Mega Drive / Master System / Game Gear|genesis_plus_gx"
|
||||
"Sega Saturn|kronos"
|
||||
"Sony PlayStation|mednafen_psx_hw"
|
||||
"Sony PlayStation Portable|ppsspp"
|
||||
)
|
||||
|
||||
[[ -d $core_dir ]] || exit 0
|
||||
|
||||
for preferred_core in "${preferred_cores[@]}"; do
|
||||
label="${preferred_core%%|*}"
|
||||
core="${preferred_core#*|}"
|
||||
[[ -f $core_dir/${core}_libretro.so ]] && printf '%s (%s)\n' "$label" "$core"
|
||||
done
|
||||
Executable
+76
@@ -0,0 +1,76 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Create a desktop launcher for a RetroArch game
|
||||
# omarchy:args=[core path-to-game]
|
||||
# omarchy:examples=omarchy games retro install snes9x ~/Games/roms/snes/game.sfc | omarchy-games-retro-install /usr/lib/libretro/mgba_libretro.so ~/Games/roms/gba/game.gba
|
||||
|
||||
set -e
|
||||
|
||||
if (( $# == 0 )); then
|
||||
mapfile -t cores < <(omarchy-games-retro-cores)
|
||||
|
||||
if (( ${#cores[@]} == 0 )); then
|
||||
omarchy-notification-send -g "" "No RetroArch cores found" "/usr/lib/libretro"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
core=$(omarchy-menu-select "RetroArch core" "${cores[@]}") || exit 0
|
||||
[[ -n $core ]] || exit 0
|
||||
core="${core##*(}"
|
||||
core="${core%)}"
|
||||
|
||||
game_path=$(omarchy-menu-file "Retro game" "$HOME/Games/roms" "7z bin ccd chd cue dmg elf fds gb gba gbc iso lha m3u md n64 nds nes pbp sfc smc swc zip z64") || exit 0
|
||||
[[ -n $game_path ]] || exit 0
|
||||
elif (( $# == 2 )); then
|
||||
core="$1"
|
||||
game_path="$2"
|
||||
else
|
||||
echo "Usage: omarchy-games-retro-install [core path-to-game]"
|
||||
echo "Example: omarchy-games-retro-install snes9x ~/Games/roms/snes/game.sfc"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -f $game_path ]]; then
|
||||
echo "Game not found: $game_path"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $core == */* ]]; then
|
||||
core_path="$core"
|
||||
else
|
||||
core_path="/usr/lib/libretro/${core}_libretro.so"
|
||||
fi
|
||||
|
||||
if [[ ! -f $core_path ]]; then
|
||||
echo "Core not found: $core_path"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
game_name=$(printf '%s' "${game_path##*/}" | sed 's/\.[^.]*$//; s/[[:space:]]*([^)]*)//g; s/[[:space:]]\+/ /g; s/^ //; s/ $//' | perl -Mopen=locale -pe 's/(^|[[:space:]])([^[:space:]])/$1\U$2/g')
|
||||
desktop_name="$game_name"
|
||||
desktop_id=$(printf '%s' "$desktop_name" | tr '[:upper:]' '[:lower:]' | tr -cs '[:alnum:]' '-' | sed 's/^-//; s/-$//')
|
||||
desktop_dir="$HOME/.local/share/applications"
|
||||
desktop_file="$desktop_dir/$desktop_id.desktop"
|
||||
icon_dir="$desktop_dir/icons"
|
||||
icon_path="$icon_dir/Retro Gaming.png"
|
||||
|
||||
mkdir -p "$desktop_dir" "$icon_dir"
|
||||
[[ -f $icon_path ]] || cp "$HOME/.local/share/omarchy/applications/icons/Retro Gaming.png" "$icon_path"
|
||||
|
||||
cat >"$desktop_file" <<EOF
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Name=$desktop_name
|
||||
Comment=Play $game_name with RetroArch
|
||||
Exec=retroarch -L "$core_path" "$game_path"
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=$icon_path
|
||||
StartupNotify=true
|
||||
Categories=Game;Emulator;
|
||||
EOF
|
||||
|
||||
chmod +x "$desktop_file"
|
||||
update-desktop-database "$desktop_dir" &>/dev/null || true
|
||||
|
||||
omarchy-notification-send -g "" "$game_name installed" "Start it with Super + Space"
|
||||
@@ -44,11 +44,6 @@ if grep -Fq "$SWAP_FILE" /etc/fstab; then
|
||||
sudo sed -i '/^# Btrfs swapfile for system hibernation$/d' /etc/fstab
|
||||
fi
|
||||
|
||||
# Remove suspend-then-hibernate configuration
|
||||
echo "Removing suspend-then-hibernate configuration"
|
||||
sudo rm -f /etc/systemd/logind.conf.d/lid.conf
|
||||
sudo rm -f /etc/systemd/sleep.conf.d/hibernate.conf
|
||||
|
||||
# Remove mkinitcpio resume hook
|
||||
echo "Removing resume hook"
|
||||
sudo rm "$MKINITCPIO_CONF"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# omarchy:summary=Clear the internal-monitor-disable toggle if no external display is connected.
|
||||
|
||||
TOGGLE="$HOME/.local/state/omarchy/toggles/hypr/internal-monitor-disable.conf"
|
||||
TOGGLE="$HOME/.local/state/omarchy/toggles/hypr/internal-monitor-disable.lua"
|
||||
|
||||
if [[ -f $TOGGLE ]] && ! omarchy-hw-external-monitors; then
|
||||
rm -f "$TOGGLE"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# omarchy:args=<on|off|toggle|recover>
|
||||
|
||||
TOGGLE="internal-monitor-disable"
|
||||
TOGGLE_FLAG="$HOME/.local/state/omarchy/toggles/hypr/$TOGGLE.conf"
|
||||
TOGGLE_FLAG="$HOME/.local/state/omarchy/toggles/hypr/$TOGGLE.lua"
|
||||
MIRROR_TOGGLE="internal-monitor-mirror"
|
||||
|
||||
# Get internal monitor name dynamically
|
||||
@@ -24,14 +24,14 @@ off() {
|
||||
fi
|
||||
|
||||
if omarchy-hyprland-toggle-disabled $TOGGLE && omarchy-hyprland-toggle-disabled $MIRROR_TOGGLE; then
|
||||
echo "monitor=$INTERNAL,disable" >"$TOGGLE_FLAG"
|
||||
printf 'hl.monitor({ output = "%s", disabled = true })\n' "$INTERNAL" >"$TOGGLE_FLAG"
|
||||
omarchy-notification-send -g "Laptop display disabled"
|
||||
hyprctl reload
|
||||
fi
|
||||
}
|
||||
|
||||
recover() {
|
||||
if ! omarchy-hw-external-monitors; then
|
||||
if ! omarchy-hw-external-monitors && omarchy-hyprland-toggle-enabled $TOGGLE; then
|
||||
omarchy-hyprland-toggle $TOGGLE off
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# omarchy:args=<on|off|toggle|recover>
|
||||
|
||||
TOGGLE="internal-monitor-mirror"
|
||||
TOGGLE_FLAG="$HOME/.local/state/omarchy/toggles/hypr/$TOGGLE.conf"
|
||||
TOGGLE_FLAG="$HOME/.local/state/omarchy/toggles/hypr/$TOGGLE.lua"
|
||||
DISABLE_TOGGLE="internal-monitor-disable"
|
||||
|
||||
# Get names dynamically
|
||||
@@ -24,9 +24,12 @@ on() {
|
||||
fi
|
||||
|
||||
omarchy-hyprland-toggle $DISABLE_TOGGLE off
|
||||
echo "monitor=$EXTERNAL, preferred, auto, 1, mirror, $INTERNAL" >"$TOGGLE_FLAG"
|
||||
omarchy-notification-send -g "Mirroring enabled ($EXTERNAL)"
|
||||
hyprctl reload
|
||||
|
||||
if omarchy-hyprland-toggle-disabled $TOGGLE; then
|
||||
printf 'hl.monitor({ output = "%s", mode = "preferred", position = "auto", scale = 1, mirror = "%s" })\n' "$EXTERNAL" "$INTERNAL" >"$TOGGLE_FLAG"
|
||||
omarchy-notification-send -g "Mirroring enabled ($EXTERNAL)"
|
||||
hyprctl reload
|
||||
fi
|
||||
}
|
||||
|
||||
off() {
|
||||
@@ -45,7 +48,7 @@ toggle() {
|
||||
}
|
||||
|
||||
recover() {
|
||||
if ! omarchy-hw-external-monitors; then
|
||||
if ! omarchy-hw-external-monitors && omarchy-hyprland-toggle-enabled $TOGGLE; then
|
||||
omarchy-hyprland-toggle $TOGGLE off
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -9,8 +9,9 @@ WIDTH=$(echo "$MONITOR_INFO" | jq -r '.width')
|
||||
HEIGHT=$(echo "$MONITOR_INFO" | jq -r '.height')
|
||||
REFRESH_RATE=$(echo "$MONITOR_INFO" | jq -r '.refreshRate')
|
||||
|
||||
# Cycle through scales: 1 → 1.25 → 1.6 → 2 → 3 → 4 → 1 (or reverse with --reverse)
|
||||
# Cycle through monitor/GDK scale pairs: 1 → 1.25 → 1.6 → 2 → 3 → 4 → 1 (or reverse with --reverse)
|
||||
SCALES=(1 1.25 1.6 2 3 4)
|
||||
GDK_SCALES=(1 1.25 1.75 2 3 4)
|
||||
|
||||
# Find the index of the scale closest to the current one (Hyprland may
|
||||
# snap fractional scales to nearby values, so we can't match exactly)
|
||||
@@ -24,27 +25,30 @@ CURRENT_IDX=$(awk -v s="$CURRENT_SCALE" -v list="${SCALES[*]}" 'BEGIN {
|
||||
print best
|
||||
}')
|
||||
|
||||
if [[ "$1" == "--reverse" ]]; then
|
||||
if [[ $1 == "--reverse" ]]; then
|
||||
NEW_IDX=$(( (CURRENT_IDX - 1 + ${#SCALES[@]}) % ${#SCALES[@]} ))
|
||||
else
|
||||
NEW_IDX=$(( (CURRENT_IDX + 1) % ${#SCALES[@]} ))
|
||||
fi
|
||||
|
||||
NEW_SCALE=${SCALES[$NEW_IDX]}
|
||||
NEW_GDK_SCALE=${GDK_SCALES[$NEW_IDX]}
|
||||
|
||||
hyprctl keyword monitor "$ACTIVE_MONITOR,${WIDTH}x${HEIGHT}@${REFRESH_RATE},auto,$NEW_SCALE"
|
||||
hyprctl eval "hl.monitor({ output = \"$ACTIVE_MONITOR\", mode = \"${WIDTH}x${HEIGHT}@${REFRESH_RATE}\", position = \"auto\", scale = $NEW_SCALE })" >/dev/null
|
||||
|
||||
# Persist to monitors.conf if the user has a single generic catch-all line
|
||||
# (ignoring disabled monitors), so the scale survives reboots.
|
||||
MONITOR_CONF="$HOME/.config/hypr/monitors.conf"
|
||||
if [[ -f $MONITOR_CONF ]]; then
|
||||
mapfile -t ACTIVE_LINES < <(grep -E '^[[:space:]]*monitor=' "$MONITOR_CONF" | grep -vE 'disable[[:space:]]*$')
|
||||
if [[ ${#ACTIVE_LINES[@]} -eq 1 ]] && [[ "${ACTIVE_LINES[0]}" =~ ^monitor=,preferred,auto, ]]; then
|
||||
sed -i -E \
|
||||
-e "s|^(monitor=,preferred,auto,).*|\\1${NEW_SCALE}|" \
|
||||
-e "s|^([[:space:]]*env[[:space:]]*=[[:space:]]*GDK_SCALE,).*|\\1${NEW_SCALE}|" \
|
||||
"$MONITOR_CONF"
|
||||
fi
|
||||
# Persist to monitors.lua if the user still has Omarchy's generic catch-all
|
||||
# defaults, so the scale survives reboots.
|
||||
MONITOR_LUA="$HOME/.config/hypr/monitors.lua"
|
||||
if [[ -f $MONITOR_LUA ]] && grep -q '^local omarchy_monitor_scale = ' "$MONITOR_LUA"; then
|
||||
sed -i -E \
|
||||
-e "s|^local omarchy_monitor_scale = .*|local omarchy_monitor_scale = ${NEW_SCALE}|" \
|
||||
-e "s|^local omarchy_gdk_scale = .*|local omarchy_gdk_scale = ${NEW_GDK_SCALE}|" \
|
||||
"$MONITOR_LUA"
|
||||
elif [[ -f $MONITOR_LUA ]] && grep -Eq '^hl\.monitor\(\{ output = "", mode = "preferred", position = "auto", scale = ("auto"|[0-9.]+) \}\)' "$MONITOR_LUA"; then
|
||||
sed -i -E \
|
||||
-e "s|^(hl\.monitor\(\{ output = \"\", mode = \"preferred\", position = \"auto\", scale = )([^ ]+)( \}\))|\\1${NEW_SCALE}\\3|" \
|
||||
-e 's|^hl\.env\("GDK_SCALE", ".*"\)|hl.env("GDK_SCALE", "'"$NEW_GDK_SCALE"'")|' \
|
||||
"$MONITOR_LUA"
|
||||
fi
|
||||
|
||||
notify-send -u low " Display scaling set to ${NEW_SCALE}x"
|
||||
|
||||
@@ -1,29 +1,61 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Toggle permanent Hyprland flags by copying them into a directory that's sourced entirely.
|
||||
# omarchy:args=<flag-name> [on|off]
|
||||
# omarchy:args=[--enabled-notification <text>] [--disabled-notification <text>] <flag-name> [on|off|toggle]
|
||||
|
||||
ENABLED_NOTIFICATION=""
|
||||
DISABLED_NOTIFICATION=""
|
||||
|
||||
while (($# > 0)); do
|
||||
case $1 in
|
||||
--enabled-notification)
|
||||
if (($# < 2)); then
|
||||
echo "Missing value for $1" >&2
|
||||
exit 1
|
||||
fi
|
||||
ENABLED_NOTIFICATION="$2"
|
||||
shift 2
|
||||
;;
|
||||
--disabled-notification)
|
||||
if (($# < 2)); then
|
||||
echo "Missing value for $1" >&2
|
||||
exit 1
|
||||
fi
|
||||
DISABLED_NOTIFICATION="$2"
|
||||
shift 2
|
||||
;;
|
||||
*) break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if (($# < 1)); then
|
||||
echo "Usage: omarchy-hyprland-toggle [--enabled-notification <text>] [--disabled-notification <text>] <flag-name> [on|off|toggle]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FLAG_NAME="$1"
|
||||
ACTION="${2:-toggle}"
|
||||
FLAG="$HOME/.local/state/omarchy/toggles/hypr/$FLAG_NAME.conf"
|
||||
FLAG_SOURCE="$OMARCHY_PATH/default/hypr/toggles/$FLAG_NAME.conf"
|
||||
FLAG_FILE="$HOME/.local/state/omarchy/toggles/hypr/$FLAG_NAME.lua"
|
||||
FLAG_SOURCE="$OMARCHY_PATH/default/hypr/toggles/$FLAG_NAME.lua"
|
||||
|
||||
on() {
|
||||
if [[ -f $FLAG_SOURCE ]]; then
|
||||
mkdir -p "$(dirname "$FLAG")"
|
||||
cp "$FLAG_SOURCE" "$FLAG"
|
||||
mkdir -p "$(dirname "$FLAG_FILE")"
|
||||
cp "$FLAG_SOURCE" "$FLAG_FILE"
|
||||
[[ -n $ENABLED_NOTIFICATION ]] && notify-send -u low "$ENABLED_NOTIFICATION"
|
||||
else
|
||||
echo "Flag not found: $FLAG_NAME"
|
||||
echo "Flag not found: $FLAG_NAME" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
off() {
|
||||
rm -f "$FLAG"
|
||||
rm -f "$FLAG_FILE"
|
||||
[[ -n $DISABLED_NOTIFICATION ]] && notify-send -u low "$DISABLED_NOTIFICATION"
|
||||
}
|
||||
|
||||
toggle() {
|
||||
if [[ -f $FLAG ]]; then
|
||||
if [[ -f $FLAG_FILE ]]; then
|
||||
off
|
||||
echo "off"
|
||||
else
|
||||
@@ -37,7 +69,7 @@ case $ACTION in
|
||||
off) off ;;
|
||||
toggle) toggle ;;
|
||||
*)
|
||||
echo "Usage: omarchy-hyprland-toggle <flag-name> [on|off]"
|
||||
echo "Usage: omarchy-hyprland-toggle [--enabled-notification <text>] [--disabled-notification <text>] <flag-name> [on|off|toggle]" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
# omarchy:summary=Check if a Hyprland toggle is currently disabled (missing).
|
||||
# omarchy:args=<flag-name>
|
||||
|
||||
[[ ! -f "$HOME/.local/state/omarchy/toggles/hypr/$1.conf" ]]
|
||||
[[ ! -f "$HOME/.local/state/omarchy/toggles/hypr/$1.lua" ]]
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
# omarchy:summary=Check if a Hyprland toggle is currently enabled.
|
||||
# omarchy:args=<flag-name>
|
||||
|
||||
[[ -f "$HOME/.local/state/omarchy/toggles/hypr/$1.conf" ]]
|
||||
[[ -f "$HOME/.local/state/omarchy/toggles/hypr/$1.lua" ]]
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
|
||||
hyprctl clients -j | \
|
||||
jq -r ".[].address" | \
|
||||
xargs -I{} hyprctl dispatch closewindow address:{}
|
||||
while read -r addr; do
|
||||
hyprctl dispatch "hl.dsp.window.close(\"address:$addr\")" >/dev/null 2>&1 || hyprctl dispatch closewindow "address:$addr"
|
||||
done
|
||||
|
||||
# Move to first workspace
|
||||
hyprctl dispatch workspace 1
|
||||
hyprctl dispatch 'hl.dsp.focus({ workspace = "1" })' >/dev/null 2>&1 || hyprctl dispatch workspace 1
|
||||
|
||||
@@ -11,24 +11,30 @@ y=${4:-}
|
||||
active=$(hyprctl activewindow -j)
|
||||
pinned=$(echo "$active" | jq ".pinned")
|
||||
addr=$(echo "$active" | jq -r ".address")
|
||||
window="address:$addr"
|
||||
|
||||
hypr_dispatch() {
|
||||
local lua="$1"
|
||||
shift
|
||||
|
||||
hyprctl dispatch "$lua" >/dev/null 2>&1 || hyprctl dispatch "$@" >/dev/null
|
||||
}
|
||||
|
||||
if [[ $pinned == "true" ]]; then
|
||||
hyprctl -q --batch \
|
||||
"dispatch pin address:$addr;" \
|
||||
"dispatch togglefloating address:$addr;" \
|
||||
"dispatch tagwindow -pop address:$addr;"
|
||||
hypr_dispatch "hl.dsp.window.pin({ window = \"$window\" })" pin "$window"
|
||||
hypr_dispatch "hl.dsp.window.float({ window = \"$window\", action = \"toggle\" })" togglefloating "$window"
|
||||
hypr_dispatch "hl.dsp.window.tag({ window = \"$window\", tag = \"-pop\" })" tagwindow -pop "$window"
|
||||
elif [[ -n $addr ]]; then
|
||||
hyprctl dispatch togglefloating address:$addr
|
||||
hyprctl dispatch resizeactive exact $width $height address:$addr
|
||||
hypr_dispatch "hl.dsp.window.float({ window = \"$window\", action = \"toggle\" })" togglefloating "$window"
|
||||
hypr_dispatch "hl.dsp.window.resize({ window = \"$window\", x = $width, y = $height })" resizeactive exact "$width" "$height" "$window"
|
||||
|
||||
if [[ -n $x && -n $y ]]; then
|
||||
hyprctl dispatch moveactive $x $y address:$addr
|
||||
hypr_dispatch "hl.dsp.window.move({ window = \"$window\", x = $x, y = $y })" moveactive "$x" "$y" "$window"
|
||||
else
|
||||
hyprctl dispatch centerwindow address:$addr
|
||||
hypr_dispatch "hl.dsp.window.center({ window = \"$window\" })" centerwindow "$window"
|
||||
fi
|
||||
|
||||
hyprctl -q --batch \
|
||||
"dispatch pin address:$addr;" \
|
||||
"dispatch alterzorder top address:$addr;" \
|
||||
"dispatch tagwindow +pop address:$addr;"
|
||||
hypr_dispatch "hl.dsp.window.pin({ window = \"$window\" })" pin "$window"
|
||||
hypr_dispatch "hl.dsp.window.alter_zorder({ window = \"$window\", mode = \"top\" })" alterzorder top "$window"
|
||||
hypr_dispatch "hl.dsp.window.tag({ window = \"$window\", tag = \"+pop\" })" tagwindow +pop "$window"
|
||||
fi
|
||||
|
||||
@@ -2,4 +2,6 @@
|
||||
|
||||
# omarchy:summary=Toggles transparency for the currently focused window.
|
||||
|
||||
hyprctl dispatch setprop "address:$(hyprctl activewindow -j | jq -r '.address')" opaque toggle
|
||||
addr=$(hyprctl activewindow -j | jq -r '.address')
|
||||
hyprctl dispatch "hl.dsp.window.set_prop({ window = \"address:$addr\", prop = \"opaque\", value = \"toggle\" })" >/dev/null 2>&1 || \
|
||||
hyprctl dispatch setprop "address:$addr" opaque toggle
|
||||
|
||||
@@ -10,5 +10,6 @@ case "$CURRENT_LAYOUT" in
|
||||
*) NEW_LAYOUT=dwindle ;;
|
||||
esac
|
||||
|
||||
hyprctl keyword workspace $ACTIVE_WORKSPACE, layout:$NEW_LAYOUT
|
||||
hyprctl eval "hl.workspace_rule({ workspace = \"$ACTIVE_WORKSPACE\", layout = \"$NEW_LAYOUT\" })" >/dev/null 2>&1 || \
|
||||
hyprctl keyword workspace $ACTIVE_WORKSPACE, layout:$NEW_LAYOUT
|
||||
notify-send -u low " Workspace layout set to $NEW_LAYOUT"
|
||||
|
||||
Executable
+92
@@ -0,0 +1,92 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Install Sunshine and open Moonlight streaming ports for LAN and Tailscale.
|
||||
# omarchy:requires-sudo=true
|
||||
|
||||
set -e
|
||||
|
||||
TCP_PORTS=(47984 47989 48010)
|
||||
UDP_PORTS=(5353 47998 47999 48000 48002 48010)
|
||||
PRIVATE_CIDRS=(10.0.0.0/8 172.16.0.0/12 192.168.0.0/16)
|
||||
UFW_COMMENT="omarchy-sunshine"
|
||||
SUNSHINE_ADMIN_APP="Sunshine Admin"
|
||||
SUNSHINE_ADMIN_URL="https://localhost:47990"
|
||||
SUNSHINE_ADMIN_EXEC="omarchy-launch-webapp $SUNSHINE_ADMIN_URL --ignore-certificate-errors"
|
||||
SUNSHINE_ICON_SOURCE="/usr/share/sunshine/web/images/logo-sunshine-45.png"
|
||||
SUNSHINE_ICON_NAME="Sunshine Admin.png"
|
||||
WEBAPP_ICON_DIR="$HOME/.local/share/applications/icons"
|
||||
HYPR_AUTOSTART_FILE="$HOME/.config/hypr/autostart.lua"
|
||||
HYPR_AUTOSTART_ENTRY='o.launch_on_start("sunshine")'
|
||||
|
||||
open_ufw_port_for_private_lans() {
|
||||
local proto="$1"
|
||||
local port="$2"
|
||||
local cidr
|
||||
|
||||
for cidr in "${PRIVATE_CIDRS[@]}"; do
|
||||
sudo ufw allow in proto "$proto" from "$cidr" to any port "$port" comment "$UFW_COMMENT"
|
||||
done
|
||||
}
|
||||
|
||||
open_ufw_port_for_tailscale() {
|
||||
local proto="$1"
|
||||
local port="$2"
|
||||
|
||||
if ip link show tailscale0 >/dev/null 2>&1; then
|
||||
sudo ufw allow in on tailscale0 to any port "$port" proto "$proto" comment "$UFW_COMMENT"
|
||||
fi
|
||||
}
|
||||
|
||||
open_ufw_ports() {
|
||||
local port
|
||||
|
||||
if omarchy-cmd-missing ufw; then
|
||||
echo "UFW is not installed; skipping Sunshine firewall rules."
|
||||
return
|
||||
fi
|
||||
|
||||
for port in "${TCP_PORTS[@]}"; do
|
||||
open_ufw_port_for_private_lans tcp "$port"
|
||||
open_ufw_port_for_tailscale tcp "$port"
|
||||
done
|
||||
|
||||
for port in "${UDP_PORTS[@]}"; do
|
||||
open_ufw_port_for_private_lans udp "$port"
|
||||
open_ufw_port_for_tailscale udp "$port"
|
||||
done
|
||||
|
||||
sudo ufw reload
|
||||
}
|
||||
|
||||
install_admin_webapp() {
|
||||
mkdir -p "$WEBAPP_ICON_DIR"
|
||||
cp "$SUNSHINE_ICON_SOURCE" "$WEBAPP_ICON_DIR/$SUNSHINE_ICON_NAME"
|
||||
omarchy-webapp-install "$SUNSHINE_ADMIN_APP" "$SUNSHINE_ADMIN_URL" "$SUNSHINE_ICON_NAME" "$SUNSHINE_ADMIN_EXEC"
|
||||
omarchy-restart-walker
|
||||
}
|
||||
|
||||
enable_hyprland_autostart() {
|
||||
mkdir -p "$(dirname "$HYPR_AUTOSTART_FILE")"
|
||||
touch "$HYPR_AUTOSTART_FILE"
|
||||
|
||||
if ! grep -Fxq "$HYPR_AUTOSTART_ENTRY" "$HYPR_AUTOSTART_FILE"; then
|
||||
printf '\n%s\n' "$HYPR_AUTOSTART_ENTRY" >>"$HYPR_AUTOSTART_FILE"
|
||||
fi
|
||||
}
|
||||
|
||||
echo "Installing Sunshine..."
|
||||
omarchy-pkg-add sunshine
|
||||
systemctl --user enable --now sunshine
|
||||
|
||||
echo "Opening Sunshine firewall ports..."
|
||||
open_ufw_ports
|
||||
|
||||
echo "Installing Sunshine admin web app..."
|
||||
install_admin_webapp
|
||||
$SUNSHINE_ADMIN_EXEC >/dev/null 2>&1 &
|
||||
|
||||
echo "Enabling Sunshine autostart..."
|
||||
enable_hyprland_autostart
|
||||
|
||||
echo ""
|
||||
echo "Sunshine has been installed and its Moonlight streaming ports are open for private LANs and Tailscale."
|
||||
@@ -30,10 +30,10 @@ if omarchy-pkg-add $package; then
|
||||
# Copy custom desktop entries with X-TerminalArg* keys
|
||||
if [[ $package == "alacritty" ]]; then
|
||||
mkdir -p ~/.local/share/applications
|
||||
cp "$OMARCHY_PATH/applications/$desktop_id" ~/.local/share/applications/
|
||||
cp "$OMARCHY_PATH/default/alacritty/$desktop_id" ~/.local/share/applications/
|
||||
elif [[ $package == "foot" ]]; then
|
||||
mkdir -p ~/.local/share/applications
|
||||
cp "$OMARCHY_PATH/default/foot/$desktop_id" ~/.local/share/applications/
|
||||
cp "$OMARCHY_PATH/applications/$desktop_id" ~/.local/share/applications/
|
||||
fi
|
||||
|
||||
# Copy default config for optional terminals when missing
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
default_browser=$(xdg-settings get default-web-browser)
|
||||
browser_exec=$(sed -n 's/^Exec=\([^ ]*\).*/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$default_browser 2>/dev/null | head -1)
|
||||
|
||||
if $browser_exec --help | grep -q MOZ_LOG; then
|
||||
if $browser_exec --help 2>/dev/null | grep -q MOZ_LOG; then
|
||||
private_flag="--private-window"
|
||||
elif [[ $browser_exec =~ edge ]]; then
|
||||
private_flag="--inprivate"
|
||||
@@ -14,4 +14,6 @@ else
|
||||
private_flag="--incognito"
|
||||
fi
|
||||
|
||||
exec setsid uwsm-app -- "$browser_exec" "${@/--private/$private_flag}"
|
||||
systemd-run --user --quiet --collect --unit="omarchy-browser-$(date +%s%N)" \
|
||||
--property=StandardOutput=null --property=StandardError=null \
|
||||
uwsm-app -- "$browser_exec" "${@/--private/$private_flag}"
|
||||
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Launch Files
|
||||
|
||||
exec setsid uwsm-app -- nautilus --new-window
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Launch Files in the active terminal's current directory
|
||||
|
||||
exec setsid uwsm-app -- nautilus --new-window "$(omarchy-cmd-terminal-cwd)"
|
||||
@@ -13,7 +13,7 @@ LAUNCH_COMMAND="${2:-"uwsm-app -- $WINDOW_PATTERN"}"
|
||||
WINDOW_ADDRESS=$(hyprctl clients -j | jq -r --arg p "$WINDOW_PATTERN" '.[]|select((.class|test("\\b" + $p + "\\b";"i")) or (.title|test("\\b" + $p + "\\b";"i")))|.address' | head -n1)
|
||||
|
||||
if [[ -n $WINDOW_ADDRESS ]]; then
|
||||
hyprctl dispatch focuswindow "address:$WINDOW_ADDRESS"
|
||||
hyprctl dispatch "hl.dsp.focus({ window = \"address:$WINDOW_ADDRESS\" })" >/dev/null 2>&1 || hyprctl dispatch focuswindow "address:$WINDOW_ADDRESS"
|
||||
else
|
||||
eval exec setsid $LAUNCH_COMMAND
|
||||
fi
|
||||
|
||||
@@ -20,35 +20,31 @@ walker -q
|
||||
focused=$(omarchy-hyprland-monitor-focused)
|
||||
terminal=$(xdg-terminal-exec --print-id)
|
||||
|
||||
hypr_focus_monitor() {
|
||||
hyprctl dispatch "hl.dsp.focus({ monitor = \"$1\" })" >/dev/null 2>&1 || hyprctl dispatch focusmonitor "$1" >/dev/null
|
||||
}
|
||||
|
||||
hypr_exec() {
|
||||
local command="$1"
|
||||
|
||||
hyprctl dispatch "hl.dsp.exec_cmd([[$command]])" >/dev/null 2>&1 || hyprctl dispatch exec -- bash -lc "$command" >/dev/null
|
||||
}
|
||||
|
||||
for m in $(hyprctl monitors -j | jq -r '.[] | .name'); do
|
||||
hyprctl dispatch focusmonitor $m
|
||||
hypr_focus_monitor "$m"
|
||||
|
||||
case $terminal in
|
||||
*Alacritty*)
|
||||
hyprctl dispatch exec -- \
|
||||
alacritty --class=org.omarchy.screensaver \
|
||||
--config-file ~/.local/share/omarchy/default/alacritty/screensaver.toml \
|
||||
-e omarchy-screensaver
|
||||
hypr_exec "alacritty --class=org.omarchy.screensaver --config-file ~/.local/share/omarchy/default/alacritty/screensaver.toml -e omarchy-screensaver"
|
||||
;;
|
||||
*ghostty*)
|
||||
hyprctl dispatch exec -- \
|
||||
ghostty --class=org.omarchy.screensaver \
|
||||
--config-file=~/.local/share/omarchy/default/ghostty/screensaver \
|
||||
--font-size=18 \
|
||||
-e omarchy-screensaver
|
||||
hypr_exec "ghostty --class=org.omarchy.screensaver --config-file=~/.local/share/omarchy/default/ghostty/screensaver --font-size=18 -e omarchy-screensaver"
|
||||
;;
|
||||
*foot*)
|
||||
hyprctl dispatch 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*)
|
||||
hyprctl dispatch 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"
|
||||
;;
|
||||
*)
|
||||
notify-send -u low "✋ Screensaver only runs in Alacritty, Foot, Ghostty, or Kitty"
|
||||
@@ -56,4 +52,4 @@ for m in $(hyprctl monitors -j | jq -r '.[] | .name'); do
|
||||
esac
|
||||
done
|
||||
|
||||
hyprctl dispatch focusmonitor $focused
|
||||
hypr_focus_monitor "$focused"
|
||||
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Launch a terminal in the active terminal's current directory
|
||||
# omarchy:args=[command...]
|
||||
|
||||
exec setsid uwsm-app -- xdg-terminal-exec --dir="$(omarchy-cmd-terminal-cwd)" "$@"
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Launch or attach to the Work tmux session in a terminal
|
||||
|
||||
exec omarchy-launch-terminal bash -c "tmux attach || tmux new -s Work"
|
||||
+938
-823
File diff suppressed because it is too large
Load Diff
Executable
+285
@@ -0,0 +1,285 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Open a generic image selector menu
|
||||
# omarchy:args=[--selected <image>] [--colors-file <path>] [--print-name] [--show-labels] [--filterable] [--lazy-thumbnails] [--cache-only] <image-dir>...
|
||||
|
||||
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}
|
||||
|
||||
selected_image=""
|
||||
colors_file=""
|
||||
print_name=false
|
||||
show_labels=false
|
||||
filterable=false
|
||||
lazy_thumbnails=false
|
||||
prepare_only=false
|
||||
cache_only=false
|
||||
image_dirs=()
|
||||
|
||||
usage() {
|
||||
echo "Usage: omarchy-menu-images [--selected <image>] [--colors-file <path>] [--print-name] [--show-labels] [--filterable] [--lazy-thumbnails] [--cache-only] <image-dir>..."
|
||||
}
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--selected)
|
||||
if (( $# < 2 )); then
|
||||
usage >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
selected_image="$2"
|
||||
shift 2
|
||||
;;
|
||||
--colors-file)
|
||||
if (( $# < 2 )); then
|
||||
usage >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
colors_file="$2"
|
||||
shift 2
|
||||
;;
|
||||
--print-name)
|
||||
print_name=true
|
||||
shift
|
||||
;;
|
||||
--show-labels)
|
||||
show_labels=true
|
||||
shift
|
||||
;;
|
||||
--filterable)
|
||||
filterable=true
|
||||
shift
|
||||
;;
|
||||
--lazy-thumbnails)
|
||||
lazy_thumbnails=true
|
||||
shift
|
||||
;;
|
||||
--prepare-only)
|
||||
prepare_only=true
|
||||
shift
|
||||
;;
|
||||
--cache-only)
|
||||
cache_only=true
|
||||
shift
|
||||
;;
|
||||
--help|-h)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
image_dirs+=("$1")
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if (( ${#image_dirs[@]} == 0 )); then
|
||||
usage >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
selection_file=$(mktemp)
|
||||
done_file=$(mktemp)
|
||||
rm -f "$done_file"
|
||||
trap 'rm -f "$selection_file" "$done_file"' EXIT
|
||||
socket_path="${XDG_RUNTIME_DIR:-/run/user/$UID}/omarchy-image-selector.sock"
|
||||
selector_qml="$OMARCHY_PATH/default/quickshell/select-by-image.qml"
|
||||
|
||||
image_dirs_env=""
|
||||
for dir in "${image_dirs[@]}"; do
|
||||
if [[ -z $image_dirs_env ]]; then
|
||||
image_dirs_env="$dir"
|
||||
else
|
||||
image_dirs_env+=$'\n'"$dir"
|
||||
fi
|
||||
done
|
||||
|
||||
current_image=$(readlink -f "$selected_image" 2>/dev/null)
|
||||
selected_list_image=""
|
||||
|
||||
if [[ -n $current_image ]]; then
|
||||
for dir in "${image_dirs[@]}"; do
|
||||
if [[ -d $dir && -f $selected_image && ${selected_image%/*} == "$dir" ]]; then
|
||||
selected_list_image="$selected_image"
|
||||
break
|
||||
elif [[ -d $dir ]]; then
|
||||
selected_list_image=$(find -L "$dir" -maxdepth 1 -type f -samefile "$current_image" -print -quit 2>/dev/null)
|
||||
[[ -n $selected_list_image ]] && break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
cache_dir=${XDG_CACHE_HOME:-$HOME/.cache}/omarchy/image-selector
|
||||
index_file="$cache_dir/index.tsv"
|
||||
rows=""
|
||||
mkdir -p "$cache_dir"
|
||||
|
||||
cache_key=$(printf '%s' "$image_dirs_env" | md5sum | cut -d ' ' -f 1)
|
||||
rows_cache_file="$cache_dir/$cache_key.rows"
|
||||
rows_signature_file="$cache_dir/$cache_key.signature"
|
||||
rows_signature="v2"$'\n'
|
||||
rows_cacheable=true
|
||||
image_files=()
|
||||
|
||||
for dir in "${image_dirs[@]}"; do
|
||||
if [[ -d $dir ]]; then
|
||||
rows_signature+="$dir:$(stat -Lc '%Y' "$dir")"$'\n'
|
||||
|
||||
while IFS= read -r -d '' image; do
|
||||
image_files+=("$image")
|
||||
image_signature=$(stat -Lc '%s:%Y' "$image") || continue
|
||||
rows_signature+="$image:$image_signature"$'\n'
|
||||
done < <(find -L "$dir" -maxdepth 1 -type f \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' -o -iname '*.gif' -o -iname '*.bmp' -o -iname '*.webp' \) -print0 2>/dev/null | sort -z)
|
||||
fi
|
||||
done
|
||||
|
||||
generate_thumbnail() {
|
||||
local image="$1"
|
||||
local thumbnail="$2"
|
||||
local lock="$thumbnail.lock"
|
||||
local tmp="$thumbnail.$$.jpg"
|
||||
|
||||
if mkdir "$lock" 2>/dev/null; then
|
||||
if magick "${image}[0]" -auto-orient -resize '1536x864^' -gravity center -extent '1536x864' -strip -quality 82 "$tmp"; then
|
||||
mv -f "$tmp" "$thumbnail"
|
||||
else
|
||||
rm -f "$tmp" "$thumbnail"
|
||||
fi
|
||||
|
||||
rmdir "$lock" 2>/dev/null || true
|
||||
else
|
||||
for ((i = 0; i < 3000; i++)); do
|
||||
[[ -f $thumbnail ]] && return
|
||||
[[ -d $lock ]] || break
|
||||
sleep 0.01
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
thumbnail_for() {
|
||||
local image="$1"
|
||||
local signature hash thumbnail
|
||||
|
||||
signature=$(stat -Lc '%s:%Y' "$image") || return
|
||||
hash=$(awk -F '\t' -v path="$image" -v sig="$signature" '$1 == path && $2 == sig { print $3; exit }' "$index_file" 2>/dev/null)
|
||||
|
||||
if [[ -z $hash ]]; then
|
||||
hash=$(printf '%s\t%s' "$image" "$signature" | md5sum | cut -d ' ' -f 1)
|
||||
printf '%s\t%s\t%s\n' "$image" "$signature" "$hash" >>"$index_file"
|
||||
fi
|
||||
|
||||
thumbnail="$cache_dir/$hash.jpg"
|
||||
|
||||
if [[ ! -f $thumbnail ]]; then
|
||||
if [[ $lazy_thumbnails == true && $cache_only != true ]]; then
|
||||
rows_cacheable=false
|
||||
|
||||
if [[ $prepare_only != true ]]; then
|
||||
generate_thumbnail "$image" "$thumbnail" >/dev/null 2>&1 &
|
||||
fi
|
||||
|
||||
printf '%s' "$image"
|
||||
return
|
||||
fi
|
||||
|
||||
generate_thumbnail "$image" "$thumbnail"
|
||||
fi
|
||||
|
||||
[[ -f $thumbnail ]] && printf '%s' "$thumbnail"
|
||||
}
|
||||
|
||||
if [[ -f $rows_cache_file && -f $rows_signature_file ]] && cmp -s "$rows_signature_file" <(printf '%s' "$rows_signature"); then
|
||||
rows=$(<"$rows_cache_file")
|
||||
else
|
||||
for image in "${image_files[@]}"; do
|
||||
thumbnail=$(thumbnail_for "$image")
|
||||
[[ -n $thumbnail ]] || continue
|
||||
if [[ $lazy_thumbnails == true && $cache_only != true && $thumbnail == "$image" ]]; then
|
||||
rows_cacheable=false
|
||||
fi
|
||||
|
||||
if [[ -z $rows ]]; then
|
||||
rows="$image"$'\t'"$thumbnail"
|
||||
else
|
||||
rows+=$'\n'"$image"$'\t'"$thumbnail"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ $rows_cacheable == true ]]; then
|
||||
printf '%s' "$rows" >"$rows_cache_file"
|
||||
printf '%s' "$rows_signature" >"$rows_signature_file"
|
||||
else
|
||||
rm -f "$rows_cache_file" "$rows_signature_file"
|
||||
fi
|
||||
fi
|
||||
|
||||
rows_payload=${rows//$'\t'/$'\f'}
|
||||
rows_payload=${rows_payload//$'\n'/$'\v'}
|
||||
colors_file=${colors_file:-$HOME/.config/omarchy/current/theme/quickshell.json}
|
||||
colors_payload=""
|
||||
|
||||
if [[ -f $colors_file ]]; then
|
||||
colors_payload=$(<"$colors_file")
|
||||
colors_payload=${colors_payload//$'\t'/$'\f'}
|
||||
colors_payload=${colors_payload//$'\n'/$'\v'}
|
||||
fi
|
||||
|
||||
if [[ $cache_only == true || $prepare_only == true ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
ensure_selector() {
|
||||
if [[ -S $socket_path && $selector_qml -nt $socket_path ]]; then
|
||||
quickshell kill -p "$selector_qml" >/dev/null 2>&1 || true
|
||||
rm -f "$socket_path"
|
||||
fi
|
||||
|
||||
if [[ ! -S $socket_path ]]; then
|
||||
quickshell kill -p "$selector_qml" >/dev/null 2>&1 || true
|
||||
quickshell -d -p "$selector_qml" >/dev/null
|
||||
|
||||
for ((i = 0; i < 100; i++)); do
|
||||
if [[ -S $socket_path ]]; then
|
||||
break
|
||||
fi
|
||||
|
||||
sleep 0.01
|
||||
done
|
||||
fi
|
||||
|
||||
[[ -S $socket_path ]]
|
||||
}
|
||||
|
||||
send_request() {
|
||||
printf '%s\t%s\t%s\t%s\t%s\t%s\t%s\n' "$rows_payload" "$selected_list_image" "$selection_file" "$done_file" "$colors_payload" "$show_labels" "$filterable" |
|
||||
socat -u - "UNIX-CONNECT:$socket_path"
|
||||
}
|
||||
|
||||
if ! ensure_selector; then
|
||||
echo "Image selector failed to start" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! send_request; then
|
||||
rm -f "$socket_path"
|
||||
|
||||
if ! ensure_selector || ! send_request; then
|
||||
echo "Image selector failed to accept request" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
while [[ ! -e $done_file ]]; do
|
||||
sleep 0.01
|
||||
done
|
||||
|
||||
if [[ -s $selection_file ]]; then
|
||||
if [[ $print_name == true ]]; then
|
||||
selection=$(<"$selection_file")
|
||||
selection=${selection##*/}
|
||||
printf '%s\n' "${selection%.*}"
|
||||
else
|
||||
cat "$selection_file"
|
||||
fi
|
||||
fi
|
||||
+190
-38
@@ -21,6 +21,11 @@ declare -A FALLBACK_KEYCODE_SYM_MAP=(
|
||||
[61]="SLASH"
|
||||
)
|
||||
|
||||
# Hyprland's Lua config provider currently reports code:... binds from hl.bind()
|
||||
# as key="" and keycode=0 in `hyprctl -j binds`. Keep a lightweight
|
||||
# source-derived key cache so the menu can still show those bindings.
|
||||
declare -A LUA_BIND_KEY_MAP
|
||||
|
||||
build_keymap_cache() {
|
||||
local keymap
|
||||
keymap="$(xkbcli compile-keymap)" || {
|
||||
@@ -108,44 +113,151 @@ parse_keycodes() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Fetch dynamic keybindings from Hyprland
|
||||
# Supplement `hyprctl -j binds` for Lua-only binds that Hyprland currently
|
||||
# reports without their original key, such as hl.bind("SUPER + code:10", ...).
|
||||
build_lua_bind_key_cache() {
|
||||
local modmask description key
|
||||
|
||||
omarchy-cmd-present lua || return 0
|
||||
|
||||
while IFS=$'\t' read -r modmask description key; do
|
||||
[[ -z $modmask || -z $description || -z $key ]] && continue
|
||||
LUA_BIND_KEY_MAP["$modmask,$description"]="$key"
|
||||
done < <(
|
||||
lua <<'LUA'
|
||||
local modifiers = { SHIFT = 1, CTRL = 4, CONTROL = 4, ALT = 8, SUPER = 64 }
|
||||
|
||||
local function split_keys(keys)
|
||||
local modmask = 0
|
||||
local key = ""
|
||||
|
||||
for part in string.gmatch(keys, "[^+]+") do
|
||||
local value = part:gsub("^%s+", ""):gsub("%s+$", "")
|
||||
local modifier = modifiers[string.upper(value)]
|
||||
|
||||
if modifier then
|
||||
modmask = modmask + modifier
|
||||
else
|
||||
key = value
|
||||
end
|
||||
end
|
||||
|
||||
return modmask, key
|
||||
end
|
||||
|
||||
local function proxy()
|
||||
local p = {}
|
||||
|
||||
return setmetatable(p, {
|
||||
__index = function()
|
||||
return p
|
||||
end,
|
||||
__call = function()
|
||||
return p
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
local p = proxy()
|
||||
|
||||
hl = setmetatable({
|
||||
dsp = p,
|
||||
bind = function(keys, _, opts)
|
||||
opts = opts or {}
|
||||
if opts.description and opts.description ~= "" then
|
||||
local modmask, key = split_keys(keys)
|
||||
print(modmask .. "\t" .. opts.description .. "\t" .. key)
|
||||
end
|
||||
return p
|
||||
end,
|
||||
unbind = function() end,
|
||||
config = function() end,
|
||||
env = function() end,
|
||||
monitor = function() end,
|
||||
window_rule = function() end,
|
||||
gesture = function() end,
|
||||
animation = function() end,
|
||||
curve = function() end,
|
||||
exec_cmd = function() end,
|
||||
}, {
|
||||
__index = function()
|
||||
return function()
|
||||
return p
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
local config = os.getenv("HOME") .. "/.config/hypr/hyprland.lua"
|
||||
local file = io.open(config, "r")
|
||||
|
||||
if file then
|
||||
file:close()
|
||||
local ok, err = pcall(dofile, config)
|
||||
if not ok and os.getenv("DEBUG") == "1" then
|
||||
io.stderr:write("[DEBUG] lua bind scan failed: " .. tostring(err) .. "\n")
|
||||
end
|
||||
end
|
||||
LUA
|
||||
)
|
||||
}
|
||||
|
||||
modmask_to_text() {
|
||||
case "$1" in
|
||||
0) printf '' ;;
|
||||
1) printf 'SHIFT' ;;
|
||||
4) printf 'CTRL' ;;
|
||||
5) printf 'SHIFT CTRL' ;;
|
||||
8) printf 'ALT' ;;
|
||||
9) printf 'SHIFT ALT' ;;
|
||||
12) printf 'CTRL ALT' ;;
|
||||
13) printf 'SHIFT CTRL ALT' ;;
|
||||
64) printf 'SUPER' ;;
|
||||
65) printf 'SUPER SHIFT' ;;
|
||||
68) printf 'SUPER CTRL' ;;
|
||||
69) printf 'SUPER SHIFT CTRL' ;;
|
||||
72) printf 'SUPER ALT' ;;
|
||||
73) printf 'SUPER SHIFT ALT' ;;
|
||||
76) printf 'SUPER CTRL ALT' ;;
|
||||
77) printf 'SUPER SHIFT CTRL ALT' ;;
|
||||
*) printf '%s' "$1" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Fetch dynamic keybindings from Hyprland.
|
||||
#
|
||||
# Also do some pre-processing:
|
||||
# - Fill missing Lua code:... keys from the Lua source cache
|
||||
# - Remove standard Omarchy bin path prefix
|
||||
# - Remove uwsm prefix
|
||||
# - Map numeric modifier key mask to a textual rendition
|
||||
# - Output comma-separated values that the parser can understand
|
||||
dynamic_bindings() {
|
||||
local modmask key keycode description dispatcher arg modifiers
|
||||
|
||||
hyprctl -j binds |
|
||||
jq -r '.[] | {modmask, key, keycode, description, dispatcher, arg} | "\(.modmask),\(.key)@\(.keycode),\(.description),\(.dispatcher),\(.arg)"' |
|
||||
sed -r \
|
||||
-e 's/null//' \
|
||||
-e 's,~/.local/share/omarchy/bin/,,' \
|
||||
-e 's,uwsm app -- ,,' \
|
||||
-e 's,uwsm-app -- ,,' \
|
||||
-e 's/@0//' \
|
||||
-e 's/,@/,code:/' \
|
||||
-e 's/^0,/,/' \
|
||||
-e 's/^1,/SHIFT,/' \
|
||||
-e 's/^4,/CTRL,/' \
|
||||
-e 's/^5,/SHIFT CTRL,/' \
|
||||
-e 's/^8,/ALT,/' \
|
||||
-e 's/^9,/SHIFT ALT,/' \
|
||||
-e 's/^12,/CTRL ALT,/' \
|
||||
-e 's/^13,/SHIFT CTRL ALT,/' \
|
||||
-e 's/^64,/SUPER,/' \
|
||||
-e 's/^65,/SUPER SHIFT,/' \
|
||||
-e 's/^68,/SUPER CTRL,/' \
|
||||
-e 's/^69,/SUPER SHIFT CTRL,/' \
|
||||
-e 's/^72,/SUPER ALT,/' \
|
||||
-e 's/^73,/SUPER SHIFT ALT,/' \
|
||||
-e 's/^76,/SUPER CTRL ALT,/' \
|
||||
-e 's/^77,/SUPER SHIFT CTRL ALT,/'
|
||||
jq -r '.[] | [.modmask, (.key // ""), (.keycode // 0), (.description // ""), (.dispatcher // ""), (.arg // "") | tostring] | join("\u001f")' |
|
||||
while IFS=$'\x1f' read -r modmask key keycode description dispatcher arg; do
|
||||
if [[ -z $key && $keycode != "0" ]]; then
|
||||
key="code:$keycode"
|
||||
fi
|
||||
|
||||
if [[ -z $key && -n $description ]]; then
|
||||
key="${LUA_BIND_KEY_MAP["$modmask,$description"]}"
|
||||
fi
|
||||
|
||||
[[ -z $description && $dispatcher == "__lua" ]] && continue
|
||||
|
||||
modifiers=$(modmask_to_text "$modmask")
|
||||
arg="${arg//~\/.local\/share\/omarchy\/bin\//}"
|
||||
arg="${arg//uwsm app -- /}"
|
||||
arg="${arg//uwsm-app -- /}"
|
||||
|
||||
printf '%s,%s,%s,%s,%s\n' "$modifiers" "$key" "$description" "$dispatcher" "$arg"
|
||||
done
|
||||
}
|
||||
|
||||
# Hardcoded bindings, like the copy-url extension and such
|
||||
static_bindings() {
|
||||
echo "SHIFT ALT,L,Copy URL from Web App,extension,copy-url"
|
||||
echo "SHIFT ALT,L,Copy URL from Web App,sendshortcut,SHIFT ALT,L,"
|
||||
}
|
||||
|
||||
# Parse and format keybindings
|
||||
@@ -154,8 +266,8 @@ static_bindings() {
|
||||
# - Set the field separator to a comma ','.
|
||||
# - Joins the key combination (e.g., "SUPER + Q").
|
||||
# - Joins the command that the key executes.
|
||||
# - Prints everything in a nicely aligned format.
|
||||
parse_bindings() {
|
||||
# - Prints display text and dispatch metadata as tab-separated fields.
|
||||
parse_binding_records() {
|
||||
awk -F, '
|
||||
{
|
||||
# Combine the modifier and key (first two fields)
|
||||
@@ -167,6 +279,13 @@ parse_bindings() {
|
||||
|
||||
# Use description, if set
|
||||
action = $3;
|
||||
dispatcher = $4;
|
||||
|
||||
# Reconstruct the dispatcher arg from the remaining fields
|
||||
arg = "";
|
||||
for (i = 5; i <= NF; i++) {
|
||||
arg = arg $i (i < NF ? "," : "");
|
||||
}
|
||||
|
||||
if (action == "") {
|
||||
# Reconstruct the command from the remaining fields
|
||||
@@ -177,6 +296,7 @@ parse_bindings() {
|
||||
# Clean up trailing commas, remove leading "exec, ", and trim
|
||||
sub(/,$/, "", action);
|
||||
gsub(/(^|,)[[:space:]]*exec[[:space:]]*,?/, "", action);
|
||||
gsub(/(^|[[:space:]])uwsm(-app| app)[[:space:]]+--[[:space:]]+/, "", action);
|
||||
gsub(/^[ \t]+|[ \t]+$/, "", action);
|
||||
gsub(/[ \t]+/, " ", key_combo); # Collapse multiple spaces to one
|
||||
|
||||
@@ -189,15 +309,15 @@ parse_bindings() {
|
||||
}
|
||||
|
||||
if (action != "") {
|
||||
printf "%-35s → %s\n", key_combo, action;
|
||||
printf "%-35s → %s\t%s\t%s\n", key_combo, action, dispatcher, arg;
|
||||
}
|
||||
}'
|
||||
}
|
||||
|
||||
prioritize_entries() {
|
||||
awk '
|
||||
awk -F '\t' '
|
||||
{
|
||||
line = $0
|
||||
line = $1
|
||||
prio = 50
|
||||
if (match(line, /Terminal/)) prio = 0
|
||||
if (match(line, /Tmux/)) prio = 1
|
||||
@@ -248,15 +368,16 @@ prioritize_entries() {
|
||||
if (match(line, /Apple Display/)) prio = 98
|
||||
if (match(line, /XF86/)) prio = 99
|
||||
|
||||
# print "priority<TAB>line"
|
||||
printf "%d\t%s\n", prio, line
|
||||
# print "priority<TAB>record"
|
||||
printf "%d\t%s\n", prio, $0
|
||||
}' |
|
||||
sort -k1,1n -k2,2 |
|
||||
cut -f2-
|
||||
}
|
||||
|
||||
output_keybindings() {
|
||||
output_binding_records() {
|
||||
build_keymap_cache
|
||||
build_lua_bind_key_cache
|
||||
|
||||
{
|
||||
dynamic_bindings
|
||||
@@ -264,16 +385,47 @@ output_keybindings() {
|
||||
} |
|
||||
sort -u |
|
||||
parse_keycodes |
|
||||
parse_bindings |
|
||||
parse_binding_records |
|
||||
prioritize_entries
|
||||
}
|
||||
|
||||
output_keybindings() {
|
||||
output_binding_records | cut -f1
|
||||
}
|
||||
|
||||
dispatch_binding() {
|
||||
local dispatcher="$1"
|
||||
local arg="$2"
|
||||
|
||||
case "$dispatcher" in
|
||||
exec)
|
||||
[[ -n $arg ]] && hyprctl dispatch exec "$arg"
|
||||
;;
|
||||
"") return 1 ;;
|
||||
*)
|
||||
if [[ -n $arg ]]; then
|
||||
hyprctl dispatch "$dispatcher" "$arg"
|
||||
else
|
||||
hyprctl dispatch "$dispatcher"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
if [[ $1 == "--print" || $1 == "-p" ]]; then
|
||||
output_keybindings
|
||||
else
|
||||
records=$(output_binding_records)
|
||||
monitor_height=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .height')
|
||||
menu_height=$((monitor_height * 40 / 100))
|
||||
selection=$(cut -f1 <<<"$records" |
|
||||
walker --dmenu -p 'Keybindings' --width 800 --height "$menu_height")
|
||||
|
||||
output_keybindings |
|
||||
walker --dmenu -p 'Keybindings' --width 800 --height "$menu_height"
|
||||
if [[ -n $selection ]]; then
|
||||
record=$(awk -F '\t' -v selection="$selection" '$1 == selection { print; exit }' <<<"$records")
|
||||
dispatcher=$(cut -f2 <<<"$record")
|
||||
arg=$(cut -f3- <<<"$record")
|
||||
|
||||
dispatch_binding "$dispatcher" "$arg"
|
||||
fi
|
||||
fi
|
||||
|
||||
Executable
+248
@@ -0,0 +1,248 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Display Tmux keybindings defined in your configuration using walker for an interactive search menu.
|
||||
# omarchy:args=[--print|-p] [--config <path>]
|
||||
|
||||
print_only=false
|
||||
config_file="${TMUX_CONF:-$HOME/.config/tmux/tmux.conf}"
|
||||
|
||||
while (($#)); do
|
||||
case "$1" in
|
||||
--print|-p)
|
||||
print_only=true
|
||||
;;
|
||||
--config)
|
||||
shift
|
||||
config_file="$1"
|
||||
;;
|
||||
*)
|
||||
config_file="$1"
|
||||
;;
|
||||
esac
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
if [[ ! -f $config_file ]]; then
|
||||
default_config="${OMARCHY_PATH:-$HOME/.local/share/omarchy}/config/tmux/tmux.conf"
|
||||
|
||||
if [[ -f $default_config ]]; then
|
||||
config_file="$default_config"
|
||||
else
|
||||
echo "Tmux config not found: $config_file" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
output_keybindings() {
|
||||
awk '
|
||||
function trim(value) {
|
||||
gsub(/^[ \t]+|[ \t]+$/, "", value)
|
||||
return value
|
||||
}
|
||||
|
||||
function key_part_text(part, is_modifier, part_count) {
|
||||
gsub(/^\\/, "", part)
|
||||
|
||||
if (is_modifier && part == "C") return "CTRL"
|
||||
if (is_modifier && part == "M") return "ALT"
|
||||
if (is_modifier && part == "S") return "SHIFT"
|
||||
if (part == "Space") return "SPACE"
|
||||
if (part == "BSpace") return "BACKSPACE"
|
||||
if (part == "BTab") return "SHIFT + TAB"
|
||||
if (part == "PPage") return "PAGE UP"
|
||||
if (part == "NPage") return "PAGE DOWN"
|
||||
if (part == "DC") return "DELETE"
|
||||
if (part == "IC") return "INSERT"
|
||||
if (part_count == 1 && part ~ /^[a-z]$/) return part
|
||||
|
||||
return toupper(part)
|
||||
}
|
||||
|
||||
function key_text(key, parts, count, i, part, text) {
|
||||
gsub(/\\/, "", key)
|
||||
count = split(key, parts, "-")
|
||||
text = ""
|
||||
|
||||
for (i = 1; i <= count; i++) {
|
||||
part = key_part_text(parts[i], i < count, count)
|
||||
text = text (text == "" ? "" : " + ") part
|
||||
}
|
||||
|
||||
return text
|
||||
}
|
||||
|
||||
function table_text(table) {
|
||||
if (table == "copy-mode-vi") return "COPY MODE"
|
||||
if (table == "copy-mode") return "COPY MODE"
|
||||
if (table == "prefix") return "PREFIX"
|
||||
|
||||
gsub(/-/, " ", table)
|
||||
return toupper(table)
|
||||
}
|
||||
|
||||
function pretty_command(command) {
|
||||
gsub(/\\;/, ";", command)
|
||||
gsub(/[{}]/, "", command)
|
||||
gsub(/^[ \t]+|[ \t]+$/, "", command)
|
||||
gsub(/[ \t]+/, " ", command)
|
||||
return command
|
||||
}
|
||||
|
||||
function command_action(command, normalized, target) {
|
||||
normalized = pretty_command(command)
|
||||
|
||||
if (normalized ~ /omarchy-menu-tmux-keybindings/) return "Show Tmux keybindings"
|
||||
if (normalized ~ /^send(-keys)? -X begin-selection/) return "Begin selection"
|
||||
if (normalized ~ /^send(-keys)? -X copy-selection-and-cancel/) return "Copy selection"
|
||||
if (normalized ~ /^send-prefix/) return "Send prefix"
|
||||
if (normalized ~ /^source-file/) return "Reload config"
|
||||
if (normalized ~ /^split-window -v/) return "Split pane vertically"
|
||||
if (normalized ~ /^split-window -h/) return "Split pane horizontally"
|
||||
if (normalized ~ /^kill-pane/) return "Kill pane"
|
||||
if (normalized ~ /^select-pane -L/) return "Focus pane left"
|
||||
if (normalized ~ /^select-pane -R/) return "Focus pane right"
|
||||
if (normalized ~ /^select-pane -U/) return "Focus pane up"
|
||||
if (normalized ~ /^select-pane -D/) return "Focus pane down"
|
||||
if (normalized ~ /^resize-pane -L/) return "Resize pane left"
|
||||
if (normalized ~ /^resize-pane -R/) return "Resize pane right"
|
||||
if (normalized ~ /^resize-pane -U/) return "Resize pane up"
|
||||
if (normalized ~ /^resize-pane -D/) return "Resize pane down"
|
||||
if (normalized ~ /^swap-pane -t "?left-of"?/) return "Move pane left"
|
||||
if (normalized ~ /^swap-pane -t "?right-of"?/) return "Move pane right"
|
||||
if (normalized ~ /^swap-pane -t "?up-of"?/) return "Move pane up"
|
||||
if (normalized ~ /^swap-pane -t "?down-of"?/) return "Move pane down"
|
||||
if (normalized ~ /^swap-pane -U/) return "Move pane left"
|
||||
if (normalized ~ /^swap-pane -D/) return "Move pane right"
|
||||
if (normalized ~ /rename-window/) return "Rename window"
|
||||
if (normalized ~ /^new-window/) return "New window"
|
||||
if (normalized ~ /^kill-window/) return "Kill window"
|
||||
|
||||
if (match(normalized, /^select-window -t ([^ ;]+)/, target)) {
|
||||
gsub(/^:=?/, "", target[1])
|
||||
|
||||
if (target[1] == "-1") return "Previous window"
|
||||
if (target[1] == "+1") return "Next window"
|
||||
|
||||
return "Switch to window " target[1]
|
||||
}
|
||||
|
||||
if (normalized ~ /^swap-window -t -1/) return "Move window left"
|
||||
if (normalized ~ /^swap-window -t \+1/) return "Move window right"
|
||||
if (normalized ~ /rename-session/) return "Rename session"
|
||||
if (normalized ~ /^new-session/) return "New session"
|
||||
if (normalized ~ /^kill-session/) return "Kill session"
|
||||
if (normalized ~ /^switch-client -p/) return "Previous session"
|
||||
if (normalized ~ /^switch-client -n/) return "Next session"
|
||||
|
||||
return normalized
|
||||
}
|
||||
|
||||
function add_record(combo, action) {
|
||||
records[++record_count] = sprintf("%-32s → %s", combo, action)
|
||||
}
|
||||
|
||||
function parse_bind(line, words, count, i, table, global, key, command, combo, action) {
|
||||
count = split(line, words, /[ \t]+/)
|
||||
i = 2
|
||||
table = "prefix"
|
||||
global = 0
|
||||
|
||||
while (i <= count && words[i] ~ /^-/) {
|
||||
if (words[i] == "-n") {
|
||||
global = 1
|
||||
i++
|
||||
} else if (words[i] == "-T") {
|
||||
table = words[i + 1]
|
||||
i += 2
|
||||
} else if (words[i] == "-r") {
|
||||
i++
|
||||
} else {
|
||||
i++
|
||||
}
|
||||
}
|
||||
|
||||
key = words[i]
|
||||
i++
|
||||
|
||||
command = ""
|
||||
for (; i <= count; i++) {
|
||||
command = command (command == "" ? "" : " ") words[i]
|
||||
}
|
||||
|
||||
if (key == "" || command == "") return
|
||||
|
||||
if (global) {
|
||||
combo = key_text(key)
|
||||
} else if (table == "prefix") {
|
||||
combo = "PREFIX + " key_text(key)
|
||||
} else {
|
||||
combo = table_text(table) " + " key_text(key)
|
||||
}
|
||||
|
||||
action = command_action(command)
|
||||
add_record(combo, action)
|
||||
}
|
||||
|
||||
BEGIN {
|
||||
prefix = "C-b"
|
||||
prefix2 = ""
|
||||
}
|
||||
|
||||
{
|
||||
line = trim($0)
|
||||
|
||||
if (line == "") next
|
||||
if (line ~ /^#/) next
|
||||
|
||||
if (line ~ /^(set|set-option|setw|set-window-option)[ \t]/) {
|
||||
word_count = split(line, words, /[ \t]+/)
|
||||
|
||||
for (i = 2; i <= word_count; i++) {
|
||||
if (words[i] == "prefix") prefix = words[i + 1]
|
||||
if (words[i] == "prefix2") prefix2 = words[i + 1]
|
||||
}
|
||||
|
||||
next
|
||||
}
|
||||
|
||||
if (line ~ /^(bind|bind-key)[ \t]/) parse_bind(line)
|
||||
}
|
||||
|
||||
END {
|
||||
prefix_description = key_text(prefix)
|
||||
|
||||
if (prefix2 != "" && prefix2 != "None") {
|
||||
prefix_description = prefix_description " / " key_text(prefix2)
|
||||
}
|
||||
|
||||
printf "%-32s → %s\n", "PREFIX", prefix_description
|
||||
|
||||
add_record("PREFIX + {", "Move pane left")
|
||||
add_record("PREFIX + }", "Move pane right")
|
||||
|
||||
for (i = 1; i <= record_count; i++) print records[i]
|
||||
}
|
||||
' "$config_file"
|
||||
}
|
||||
|
||||
if [[ $print_only == "true" ]]; then
|
||||
output_keybindings
|
||||
exit 0
|
||||
fi
|
||||
|
||||
records=$(output_keybindings)
|
||||
|
||||
if [[ -z $WAYLAND_DISPLAY ]] || omarchy-cmd-missing walker; then
|
||||
printf '%s\n' "$records"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
monitor_height=$(hyprctl monitors -j 2>/dev/null | jq -r '.[] | select(.focused == true) | .height' 2>/dev/null)
|
||||
|
||||
if [[ ! $monitor_height =~ ^[0-9]+$ ]] || ((monitor_height <= 0)); then
|
||||
monitor_height=900
|
||||
fi
|
||||
|
||||
menu_height=$((monitor_height * 40 / 100))
|
||||
printf '%s\n' "$records" | walker --dmenu -p 'Tmux keybindings' --width 800 --height "$menu_height" >/dev/null
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Show the current battery status notification
|
||||
|
||||
omarchy-notification-send -g -u low "$(omarchy-battery-status)"
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Show the current time and date notification
|
||||
|
||||
omarchy-notification-send -g -u low "$(date +"%A %H:%M · %d %B %Y · Week %V")"
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Show the current weather notification
|
||||
|
||||
omarchy-notification-send -g $(omarchy-weather-icon) -u low "$(omarchy-weather-status)"
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Install an npx wrapper for a given npm package.
|
||||
# omarchy:summary=Install a pnpm dlx wrapper for a given npm package.
|
||||
# omarchy:args=<package> [command-name]
|
||||
|
||||
if [[ -z $1 ]]; then
|
||||
echo "Usage: omarchy-npx-install <package> [command-name]"
|
||||
echo "Usage: omarchy-npm-install <package> [command-name]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -23,8 +23,13 @@ if ! node_root="\$(mise where node@latest 2>/dev/null)"; then
|
||||
node_root="\$(mise where node@latest)"
|
||||
fi
|
||||
|
||||
node_bin="\$node_root/bin/node"
|
||||
npx_bin="\$node_root/bin/npx"
|
||||
if omarchy-cmd-missing pnpm; then
|
||||
echo "Installing pnpm for \$package..."
|
||||
omarchy-pkg-add pnpm
|
||||
hash -r
|
||||
fi
|
||||
|
||||
export PNPM_CONFIG_MINIMUM_RELEASE_AGE=7200
|
||||
|
||||
ensure_bin_runtime() {
|
||||
local bin_path=\$1
|
||||
@@ -51,15 +56,15 @@ exec_package_bin() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Resolve the package bin inside npx, then run it with node@latest available for node shebangs.
|
||||
# Resolve the package bin inside pnpm dlx, then run it with node@latest available for node shebangs.
|
||||
# Some wrappers are aliases, e.g. playwright-cli wraps the playwright bin.
|
||||
"\$node_bin" "\$npx_bin" --yes --prefer-online --package "\$package" -- true
|
||||
PATH="\$node_root/bin:\$PATH" pnpm dlx --package "\$package" true
|
||||
|
||||
package_bin_path=\$("\$node_bin" "\$npx_bin" --yes --package "\$package" -- which "\$package" 2>/dev/null)
|
||||
package_bin_path=\$(PATH="\$node_root/bin:\$PATH" pnpm dlx --package "\$package" which "\$package" 2>/dev/null)
|
||||
exec_package_bin "\$package_bin_path" "\$@"
|
||||
|
||||
# Scoped packages like @openai/codex expose an unscoped bin like codex.
|
||||
package_bin_path=\$("\$node_bin" "\$npx_bin" --yes --package "\$package" -- which "\$command" 2>/dev/null)
|
||||
package_bin_path=\$(PATH="\$node_root/bin:\$PATH" pnpm dlx --package "\$package" which "\$command" 2>/dev/null)
|
||||
exec_package_bin "\$package_bin_path" "\$@"
|
||||
|
||||
echo "Could not resolve npm bin for \$package / \$command" >&2
|
||||
@@ -11,14 +11,14 @@ mkdir -p ~/.local/share/applications
|
||||
cp ~/.local/share/omarchy/applications/*.desktop ~/.local/share/applications/
|
||||
cp ~/.local/share/omarchy/applications/hidden/*.desktop ~/.local/share/applications/
|
||||
|
||||
if omarchy-cmd-present foot; then
|
||||
cp ~/.local/share/omarchy/default/foot/foot.desktop ~/.local/share/applications/
|
||||
if omarchy-cmd-present alacritty; then
|
||||
cp ~/.local/share/omarchy/default/alacritty/alacritty.desktop ~/.local/share/applications/
|
||||
fi
|
||||
|
||||
# Refresh the webapps, TUIs, and npx wrappers
|
||||
bash $OMARCHY_PATH/install/packaging/icons.sh
|
||||
bash $OMARCHY_PATH/install/packaging/webapps.sh
|
||||
bash $OMARCHY_PATH/install/packaging/tuis.sh
|
||||
bash $OMARCHY_PATH/install/packaging/npx.sh
|
||||
bash $OMARCHY_PATH/install/packaging/npm.sh
|
||||
|
||||
update-desktop-database ~/.local/share/applications
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Overwrite all the user configs in ~/.config/hypr with the Omarchy defaults.
|
||||
# omarchy:summary=Overwrite all the user Hyprland Lua configs in ~/.config/hypr with the Omarchy defaults.
|
||||
|
||||
omarchy-refresh-config hypr/autostart.conf
|
||||
omarchy-refresh-config hypr/bindings.conf
|
||||
omarchy-refresh-config hypr/input.conf
|
||||
omarchy-refresh-config hypr/looknfeel.conf
|
||||
omarchy-refresh-config hypr/hyprland.conf
|
||||
omarchy-refresh-config hypr/monitors.conf
|
||||
omarchy-refresh-config hypr/.luarc.json
|
||||
omarchy-refresh-config hypr/autostart.lua
|
||||
omarchy-refresh-config hypr/bindings.lua
|
||||
omarchy-refresh-config hypr/input.lua
|
||||
omarchy-refresh-config hypr/looknfeel.lua
|
||||
omarchy-refresh-config hypr/hyprland.lua
|
||||
omarchy-refresh-config hypr/monitors.lua
|
||||
bash "$OMARCHY_PATH/install/config/omarchy-toggles.sh"
|
||||
bash "$OMARCHY_PATH/install/config/detect-keyboard-layout.sh"
|
||||
|
||||
@@ -3,6 +3,17 @@
|
||||
# omarchy:summary=Reset Waybar config to Omarchy defaults
|
||||
# omarchy:examples=omarchy refresh waybar
|
||||
|
||||
WAYBAR_CONFIG="$HOME/.config/waybar/config.jsonc"
|
||||
|
||||
position=$(sed -nE 's/.*"position"[[:space:]]*:[[:space:]]*"(top|bottom|left|right)".*/\1/p' "$WAYBAR_CONFIG" 2>/dev/null | head -n 1)
|
||||
height=$(sed -nE 's/.*"height"[[:space:]]*:[[:space:]]*([0-9]+).*/\1/p' "$WAYBAR_CONFIG" 2>/dev/null | head -n 1)
|
||||
width=$(sed -nE 's/.*"width"[[:space:]]*:[[:space:]]*([0-9]+).*/\1/p' "$WAYBAR_CONFIG" 2>/dev/null | head -n 1)
|
||||
|
||||
omarchy-refresh-config waybar/config.jsonc
|
||||
omarchy-refresh-config waybar/style.css
|
||||
|
||||
[[ -n $position ]] && sed -i -E "s/(\"position\"[[:space:]]*:[[:space:]]*\")[a-z]+(\")/\\1${position}\\2/" "$WAYBAR_CONFIG"
|
||||
[[ -n $height ]] && sed -i -E "s/(\"height\"[[:space:]]*:[[:space:]]*)[0-9]+/\\1${height}/" "$WAYBAR_CONFIG"
|
||||
[[ -n $width ]] && sed -i -E "s/(\"width\"[[:space:]]*:[[:space:]]*)[0-9]+/\\1${width}/" "$WAYBAR_CONFIG"
|
||||
|
||||
omarchy-restart-waybar
|
||||
|
||||
@@ -6,6 +6,6 @@ set -e
|
||||
|
||||
# Reinstall the Omarchy configuration directory from the git source.
|
||||
|
||||
git clone "https://github.com/basecamp/omarchy.git" ~/.local/share/omarchy-new >/dev/null
|
||||
git clone --depth=1 --branch master "https://github.com/basecamp/omarchy.git" ~/.local/share/omarchy-new >/dev/null
|
||||
mv $OMARCHY_PATH ~/.local/share/omarchy-old
|
||||
mv ~/.local/share/omarchy-new $OMARCHY_PATH
|
||||
|
||||
@@ -8,8 +8,8 @@ if gum confirm "Are you sure you want to remove all preinstalled web apps, TUI w
|
||||
omarchy-webapp-remove-all
|
||||
omarchy-tui-remove-all
|
||||
|
||||
cp ~/.config/hypr/bindings.conf ~/.config/hypr/bindings.conf.bak
|
||||
cp "$OMARCHY_PATH/default/hypr/plain-bindings.conf" ~/.config/hypr/bindings.conf
|
||||
[[ -f ~/.config/hypr/bindings.lua ]] && cp ~/.config/hypr/bindings.lua ~/.config/hypr/bindings.lua.bak
|
||||
cp "$OMARCHY_PATH/default/hypr/plain-bindings.lua" ~/.config/hypr/bindings.lua
|
||||
hyprctl reload
|
||||
|
||||
# Remove npx stubs
|
||||
|
||||
Executable
+69
@@ -0,0 +1,69 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Remove Sunshine and close Omarchy-managed Moonlight streaming ports.
|
||||
# omarchy:requires-sudo=true
|
||||
|
||||
set -e
|
||||
|
||||
TCP_PORTS=(47984 47989 48010)
|
||||
UDP_PORTS=(5353 47998 47999 48000 48002 48010)
|
||||
PRIVATE_CIDRS=(10.0.0.0/8 172.16.0.0/12 192.168.0.0/16)
|
||||
SUNSHINE_ADMIN_APP="Sunshine Admin"
|
||||
HYPR_AUTOSTART_FILE="$HOME/.config/hypr/autostart.lua"
|
||||
HYPR_AUTOSTART_ENTRY='o.launch_on_start("sunshine")'
|
||||
|
||||
delete_ufw_rule() {
|
||||
sudo ufw --force delete "$@" 2>/dev/null || true
|
||||
}
|
||||
|
||||
close_ufw_port_for_private_lans() {
|
||||
local proto="$1"
|
||||
local port="$2"
|
||||
local cidr
|
||||
|
||||
for cidr in "${PRIVATE_CIDRS[@]}"; do
|
||||
delete_ufw_rule allow in proto "$proto" from "$cidr" to any port "$port"
|
||||
done
|
||||
}
|
||||
|
||||
close_ufw_port_for_tailscale() {
|
||||
local proto="$1"
|
||||
local port="$2"
|
||||
|
||||
delete_ufw_rule allow in on tailscale0 to any port "$port" proto "$proto"
|
||||
}
|
||||
|
||||
close_ufw_ports() {
|
||||
local port
|
||||
|
||||
if omarchy-cmd-missing ufw; then
|
||||
return
|
||||
fi
|
||||
|
||||
for port in "${TCP_PORTS[@]}"; do
|
||||
close_ufw_port_for_private_lans tcp "$port"
|
||||
close_ufw_port_for_tailscale tcp "$port"
|
||||
done
|
||||
|
||||
for port in "${UDP_PORTS[@]}"; do
|
||||
close_ufw_port_for_private_lans udp "$port"
|
||||
close_ufw_port_for_tailscale udp "$port"
|
||||
done
|
||||
|
||||
sudo ufw reload
|
||||
}
|
||||
|
||||
disable_hyprland_autostart() {
|
||||
if [[ -f $HYPR_AUTOSTART_FILE ]]; then
|
||||
sed -i "\|^$HYPR_AUTOSTART_ENTRY$|d" "$HYPR_AUTOSTART_FILE"
|
||||
fi
|
||||
}
|
||||
|
||||
systemctl --user disable --now sunshine 2>/dev/null || true
|
||||
omarchy-pkg-drop sunshine
|
||||
omarchy-webapp-remove "$SUNSHINE_ADMIN_APP" 2>/dev/null || true
|
||||
disable_hyprland_autostart
|
||||
close_ufw_ports
|
||||
|
||||
echo ""
|
||||
echo "Sunshine has been removed and its Omarchy-managed Moonlight streaming ports have been closed."
|
||||
@@ -7,7 +7,7 @@ screensaver_in_focus() {
|
||||
}
|
||||
|
||||
exit_screensaver() {
|
||||
hyprctl keyword cursor:invisible false &>/dev/null || true
|
||||
hyprctl eval 'hl.config({ cursor = { invisible = false } })' &>/dev/null || hyprctl keyword cursor:invisible false &>/dev/null || true
|
||||
pkill -x tte 2>/dev/null
|
||||
pkill -f org.omarchy.screensaver 2>/dev/null
|
||||
exit 0
|
||||
@@ -18,7 +18,7 @@ trap exit_screensaver SIGINT SIGTERM SIGHUP SIGQUIT
|
||||
|
||||
printf '\033]11;rgb:00/00/00\007' # Set background color to black
|
||||
|
||||
hyprctl keyword cursor:invisible true &>/dev/null
|
||||
hyprctl eval 'hl.config({ cursor = { invisible = true } })' &>/dev/null || hyprctl keyword cursor:invisible true &>/dev/null
|
||||
|
||||
tty=$(tty 2>/dev/null)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Set Hyprland, Hyprlock, Mako, and Walker corners to sharp or round
|
||||
# omarchy:summary=Set Hyprland, Hyprlock, Mako, Walker, and Quickshell corners to sharp or round
|
||||
# omarchy:args=<sharp|round>
|
||||
# omarchy:examples=omarchy style corners round | omarchy style corners sharp
|
||||
|
||||
@@ -13,6 +13,7 @@ omarchy-style-corners-hyprland "$1"
|
||||
omarchy-style-corners-hyprlock "$1"
|
||||
omarchy-style-corners-mako "$1"
|
||||
omarchy-style-corners-walker "$1"
|
||||
omarchy-style-corners-quickshell "$1"
|
||||
|
||||
case $1 in
|
||||
sharp) omarchy-notification-send "Sharp corners enabled" -g ;;
|
||||
|
||||
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Set Quickshell Omarchy menu corners
|
||||
# omarchy:args=<sharp|round>
|
||||
# omarchy:examples=omarchy style corners quickshell round | omarchy style corners quickshell sharp
|
||||
|
||||
set_radius() {
|
||||
local radius="$1"
|
||||
local toggles_dir="$HOME/.local/state/omarchy/toggles"
|
||||
|
||||
mkdir -p "$toggles_dir"
|
||||
printf '{ "radius": %s }\n' "$radius" >"$toggles_dir/quickshell-menu.json"
|
||||
}
|
||||
|
||||
case "${1:-}" in
|
||||
sharp) set_radius 0 ;;
|
||||
round) set_radius 6 ;;
|
||||
*)
|
||||
echo "Usage: omarchy-style-corners-quickshell <sharp|round>"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -15,31 +15,15 @@ if [[ ! $position =~ ^(top|bottom|left|right)$ ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Reset config and styles before making adjustments
|
||||
omarchy-refresh-config waybar/config.jsonc
|
||||
omarchy-refresh-config waybar/style.css
|
||||
|
||||
if [[ $position == "left" || $position == "right" ]]; then
|
||||
height=0
|
||||
width=28
|
||||
horizontal=false
|
||||
else
|
||||
height=26
|
||||
width=0
|
||||
horizontal=true
|
||||
fi
|
||||
|
||||
# Change position
|
||||
sed -i -E "s/(\"position\"[[:space:]]*:[[:space:]]*\")[a-z]+(\")/\\1${position}\\2/" "$WAYBAR_CONFIG"
|
||||
|
||||
# Change height/width
|
||||
sed -i -E "s/(\"height\"[[:space:]]*:[[:space:]]*)[0-9]+/\\1${height}/; s/(\"width\"[[:space:]]*:[[:space:]]*)[0-9]+/\\1${width}/" "$WAYBAR_CONFIG"
|
||||
|
||||
# Change the clock format
|
||||
if [[ $horizontal == true ]]; then
|
||||
sed -i -E '/"clock"[[:space:]]*:[[:space:]]*\{/,/\}/ s/"format"[[:space:]]*:[[:space:]]*"[^"]*"/"format": "{:L%A %H:%M}"/' "$WAYBAR_CONFIG"
|
||||
else
|
||||
sed -i -E '/"clock"[[:space:]]*:[[:space:]]*\{/,/\}/ s/"format"[[:space:]]*:[[:space:]]*"[^"]*"/"format": "{:%H\\n —\\n%M}"/' "$WAYBAR_CONFIG"
|
||||
fi
|
||||
|
||||
omarchy-restart-waybar
|
||||
|
||||
@@ -12,4 +12,4 @@ progress="$(awk -v p="$percent" 'BEGIN{printf "%.2f", p/100}')"
|
||||
omarchy-swayosd-client \
|
||||
--custom-icon display-brightness-symbolic \
|
||||
--custom-progress "$progress" \
|
||||
--custom-progress-text "${percent}%"
|
||||
--custom-progress-text "$(printf '%3d%%' "$percent")"
|
||||
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Cache background switcher thumbnails for the current theme
|
||||
|
||||
theme_name=$(cat "$HOME/.config/omarchy/current/theme.name" 2>/dev/null)
|
||||
|
||||
omarchy-menu-images \
|
||||
--cache-only \
|
||||
"$HOME/.config/omarchy/current/theme/backgrounds" \
|
||||
"$HOME/.config/omarchy/backgrounds/$theme_name"
|
||||
@@ -8,13 +8,15 @@ THEME_BACKGROUNDS_PATH="$HOME/.config/omarchy/current/theme/backgrounds/"
|
||||
USER_BACKGROUNDS_PATH="$HOME/.config/omarchy/backgrounds/$THEME_NAME/"
|
||||
CURRENT_BACKGROUND_LINK="$HOME/.config/omarchy/current/background"
|
||||
|
||||
mapfile -d '' -t BACKGROUNDS < <(find -L "$USER_BACKGROUNDS_PATH" "$THEME_BACKGROUNDS_PATH" -maxdepth 1 -type f -print0 2>/dev/null | sort -z)
|
||||
mapfile -d '' -t BACKGROUNDS < <(
|
||||
find -L "$USER_BACKGROUNDS_PATH" "$THEME_BACKGROUNDS_PATH" -maxdepth 1 -type f \
|
||||
\( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' -o -iname '*.gif' -o -iname '*.bmp' -o -iname '*.webp' \) \
|
||||
-print0 2>/dev/null | sort -z
|
||||
)
|
||||
TOTAL=${#BACKGROUNDS[@]}
|
||||
|
||||
if (( TOTAL == 0 )); then
|
||||
notify-send "No background was found for theme" -t 2000
|
||||
pkill -x swaybg
|
||||
setsid uwsm-app -- swaybg --color '#000000' >/dev/null 2>&1 &
|
||||
omarchy-notification-send "No background was found for theme" -t 2000
|
||||
else
|
||||
# Get current background from symlink
|
||||
if [[ -L $CURRENT_BACKGROUND_LINK ]]; then
|
||||
@@ -42,10 +44,5 @@ else
|
||||
NEW_BACKGROUND="${BACKGROUNDS[$NEXT_INDEX]}"
|
||||
fi
|
||||
|
||||
# Set new background symlink
|
||||
ln -nsf "$NEW_BACKGROUND" "$CURRENT_BACKGROUND_LINK"
|
||||
|
||||
# Relaunch swaybg
|
||||
pkill -x swaybg
|
||||
setsid uwsm-app -- swaybg -i "$CURRENT_BACKGROUND_LINK" -m fill >/dev/null 2>&1 &
|
||||
omarchy-theme-bg-set "$NEW_BACKGROUND"
|
||||
fi
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# omarchy:summary=Set the current background image
|
||||
# omarchy:args=<path-to-image>
|
||||
# omarchy:examples=omarchy theme bg set ~/Pictures/wallpaper.png
|
||||
# omarchy:examples=omarchy theme bg set ~/Pictures/background.png
|
||||
|
||||
if [[ -z $1 ]]; then
|
||||
echo "Usage: omarchy-theme-bg-set <path-to-image>" >&2
|
||||
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Open the Omarchy background switcher
|
||||
# omarchy:group=theme
|
||||
# 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)
|
||||
|
||||
omarchy-menu-images \
|
||||
--selected "$current_background" \
|
||||
"$HOME/.config/omarchy/current/theme/backgrounds" \
|
||||
"$HOME/.config/omarchy/backgrounds/$theme_name"
|
||||
@@ -71,3 +71,6 @@ omarchy-theme-set-keyboard
|
||||
|
||||
# Call hook on theme set
|
||||
omarchy-hook theme-set "$THEME_NAME" >/dev/null
|
||||
|
||||
# Warm the background selector cache after the theme is applied, off the critical path.
|
||||
omarchy-theme-bg-cache >/dev/null 2>&1 &
|
||||
|
||||
Executable
+98
@@ -0,0 +1,98 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Open the Omarchy theme switcher
|
||||
|
||||
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}
|
||||
USER_THEMES_PATH="$HOME/.config/omarchy/themes"
|
||||
OMARCHY_THEMES_PATH="$OMARCHY_PATH/themes"
|
||||
CACHE_PATH="${XDG_CACHE_HOME:-$HOME/.cache}/omarchy/theme-selector"
|
||||
preview_dir="$CACHE_PATH/previews"
|
||||
signature_file="$CACHE_PATH/signature"
|
||||
|
||||
mkdir -p "$preview_dir"
|
||||
|
||||
find_preview() {
|
||||
local theme_path="$1"
|
||||
local preview preview_name
|
||||
|
||||
for preview_name in preview.png preview.jpg preview.jpeg preview.webp preview.gif preview.bmp; do
|
||||
preview=$(find -L "$theme_path" -maxdepth 1 -type f -iname "$preview_name" -print -quit 2>/dev/null)
|
||||
|
||||
if [[ -n $preview ]]; then
|
||||
printf '%s\n' "$preview"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -d $theme_path/backgrounds ]]; then
|
||||
find -L "$theme_path/backgrounds" -maxdepth 1 -type f \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' -o -iname '*.gif' -o -iname '*.bmp' -o -iname '*.webp' \) -print 2>/dev/null | sort | head -n 1
|
||||
fi
|
||||
}
|
||||
|
||||
add_theme_preview() {
|
||||
local theme_name="$1"
|
||||
local preview="$2"
|
||||
local extension="${preview##*.}"
|
||||
extension="${extension,,}"
|
||||
|
||||
[[ -n $preview ]] || return
|
||||
[[ -e $preview_dir/$theme_name.$extension ]] && return
|
||||
|
||||
ln -s "$preview" "$preview_dir/$theme_name.$extension"
|
||||
}
|
||||
|
||||
theme_signature=""
|
||||
for theme_dir in "$USER_THEMES_PATH" "$OMARCHY_THEMES_PATH"; do
|
||||
if [[ -d $theme_dir ]]; then
|
||||
theme_signature+="$theme_dir:$(stat -Lc '%Y' "$theme_dir")"$'\n'
|
||||
|
||||
while IFS= read -r -d '' theme_path; do
|
||||
preview=$(find_preview "$theme_path")
|
||||
theme_signature+="$theme_path:$(stat -Lc '%Y' "$theme_path")"$'\n'
|
||||
|
||||
if [[ -n $preview ]]; then
|
||||
theme_signature+="$preview:$(stat -Lc '%s:%Y' "$preview")"$'\n'
|
||||
fi
|
||||
done < <(find -L "$theme_dir" -mindepth 1 -maxdepth 1 \( -type d -o -type l \) -print0 2>/dev/null | sort -z)
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ ! -f $signature_file ]] || ! cmp -s "$signature_file" <(printf '%s' "$theme_signature"); then
|
||||
rm -rf "$preview_dir"
|
||||
mkdir -p "$preview_dir"
|
||||
|
||||
while IFS= read -r theme_path; do
|
||||
theme_name=${theme_path##*/}
|
||||
preview=$(find_preview "$theme_path")
|
||||
|
||||
if [[ -z $preview ]]; then
|
||||
preview=$(find_preview "$OMARCHY_THEMES_PATH/$theme_name")
|
||||
fi
|
||||
|
||||
add_theme_preview "$theme_name" "$preview"
|
||||
done < <(find -L "$USER_THEMES_PATH" -mindepth 1 -maxdepth 1 \( -type d -o -type l \) -print 2>/dev/null | sort)
|
||||
|
||||
while IFS= read -r theme_path; do
|
||||
theme_name=${theme_path##*/}
|
||||
preview=$(find_preview "$theme_path")
|
||||
add_theme_preview "$theme_name" "$preview"
|
||||
done < <(find -L "$OMARCHY_THEMES_PATH" -mindepth 1 -maxdepth 1 -type d -print 2>/dev/null | sort)
|
||||
|
||||
printf '%s' "$theme_signature" >"$signature_file"
|
||||
fi
|
||||
|
||||
current_theme=$(cat "$HOME/.config/omarchy/current/theme.name" 2>/dev/null)
|
||||
selected_preview=""
|
||||
for extension in png jpg jpeg webp gif bmp; do
|
||||
if [[ -e $preview_dir/$current_theme.$extension ]]; then
|
||||
selected_preview="$preview_dir/$current_theme.$extension"
|
||||
break
|
||||
fi
|
||||
done
|
||||
exec omarchy-menu-images \
|
||||
--print-name \
|
||||
--show-labels \
|
||||
--filterable \
|
||||
--lazy-thumbnails \
|
||||
--selected "$selected_preview" \
|
||||
"$preview_dir"
|
||||
@@ -3,7 +3,7 @@
|
||||
# omarchy:summary=Enable, disable, or toggle the touchpad
|
||||
# omarchy:args=[on|off|toggle]
|
||||
|
||||
STATE_CONF="$HOME/.local/state/omarchy/toggles/hypr/touchpad-disabled.conf"
|
||||
STATE_FILE="$HOME/.local/state/omarchy/toggles/hypr/touchpad-disabled.lua"
|
||||
|
||||
device="$(omarchy-hw-touchpad)"
|
||||
|
||||
@@ -13,20 +13,20 @@ if [[ -z $device ]]; then
|
||||
fi
|
||||
|
||||
enable() {
|
||||
hyprctl keyword "device[$device]:enabled" true >/dev/null
|
||||
rm -f "$STATE_CONF"
|
||||
hyprctl eval "hl.device({ name = \"$device\", enabled = true })" >/dev/null
|
||||
rm -f "$STATE_FILE"
|
||||
omarchy-swayosd-client --custom-icon input-touchpad-symbolic --custom-message "Touchpad enabled"
|
||||
}
|
||||
|
||||
disable() {
|
||||
hyprctl keyword "device[$device]:enabled" false >/dev/null
|
||||
mkdir -p "$(dirname "$STATE_CONF")"
|
||||
printf 'device {\n name = %s\n enabled = false\n}\n' "$device" > "$STATE_CONF"
|
||||
hyprctl eval "hl.device({ name = \"$device\", enabled = false })" >/dev/null
|
||||
mkdir -p "$(dirname "$STATE_FILE")"
|
||||
printf 'hl.device({ name = "%s", enabled = false })\n' "$device" >"$STATE_FILE"
|
||||
omarchy-swayosd-client --custom-icon touchpad-disabled-symbolic --custom-message "Touchpad disabled"
|
||||
}
|
||||
|
||||
case "${1:-toggle}" in
|
||||
on) enable ;;
|
||||
off) disable ;;
|
||||
toggle) if [[ -f $STATE_CONF ]]; then enable; else disable; fi ;;
|
||||
toggle) if [[ -f $STATE_FILE ]]; then enable; else disable; fi ;;
|
||||
esac
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# omarchy:summary=Enable, disable, or toggle the touch functionality of the screen
|
||||
# omarchy:args=[on|off|toggle]
|
||||
|
||||
STATE_CONF="$HOME/.local/state/omarchy/toggles/hypr/touchscreen-disabled.conf"
|
||||
STATE_FILE="$HOME/.local/state/omarchy/toggles/hypr/touchscreen-disabled.lua"
|
||||
|
||||
device="$(omarchy-hw-touchscreen)"
|
||||
|
||||
@@ -13,20 +13,20 @@ if [[ -z $device ]]; then
|
||||
fi
|
||||
|
||||
enable() {
|
||||
hyprctl keyword "device[$device]:enabled" true >/dev/null
|
||||
rm -f "$STATE_CONF"
|
||||
hyprctl eval "hl.device({ name = \"$device\", enabled = true })" >/dev/null
|
||||
rm -f "$STATE_FILE"
|
||||
omarchy-swayosd-client --custom-icon device-support-touch-symbolic --custom-message "Touchscreen enabled"
|
||||
}
|
||||
|
||||
disable() {
|
||||
hyprctl keyword "device[$device]:enabled" false >/dev/null
|
||||
mkdir -p "$(dirname "$STATE_CONF")"
|
||||
printf 'device {\n name = %s\n enabled = false\n}\n' "$device" > "$STATE_CONF"
|
||||
hyprctl eval "hl.device({ name = \"$device\", enabled = false })" >/dev/null
|
||||
mkdir -p "$(dirname "$STATE_FILE")"
|
||||
printf 'hl.device({ name = "%s", enabled = false })\n' "$device" >"$STATE_FILE"
|
||||
omarchy-swayosd-client --custom-icon touch-disabled-symbolic --custom-message "Touchscreen disabled"
|
||||
}
|
||||
|
||||
case "${1:-toggle}" in
|
||||
on) enable ;;
|
||||
off) disable ;;
|
||||
toggle) if [[ -f $STATE_CONF ]]; then enable; else disable; fi ;;
|
||||
toggle) if [[ -f $STATE_FILE ]]; then enable; else disable; fi ;;
|
||||
esac
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# omarchy:name=
|
||||
# omarchy:summary=Transcode pictures and videos for sharing
|
||||
# omarchy:args=[--path path] [input] [format] [resolution]
|
||||
# omarchy:examples=omarchy transcode|omarchy transcode --path ~/Downloads|omarchy transcode ~/Videos/demo.mov mp4 1080p|omarchy transcode ~/Pictures/wallpaper.heic jpg medium
|
||||
# omarchy:examples=omarchy transcode|omarchy transcode --path ~/Downloads|omarchy transcode ~/Videos/demo.mov mp4 1080p|omarchy transcode ~/Pictures/background.heic jpg medium
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ omarchy-update-time
|
||||
|
||||
# Suppress Hyprland config errors while git updates default config files mid-pull
|
||||
hyprctl keyword debug:suppress_errors true &>/dev/null || true
|
||||
hyprctl eval 'hl.config({ debug = { suppress_errors = true } })' &>/dev/null || true
|
||||
|
||||
git -C $OMARCHY_PATH pull --autostash
|
||||
git -C $OMARCHY_PATH --no-pager diff --check || git -C $OMARCHY_PATH reset --merge
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
set -e
|
||||
|
||||
# Ensure screensaver/sleep doesn't set in during updates
|
||||
hyprctl dispatch tagwindow +noidle &>/dev/null || true
|
||||
hyprctl dispatch 'hl.dsp.window.tag({ tag = "+noidle" })' &>/dev/null || hyprctl dispatch tagwindow +noidle &>/dev/null || true
|
||||
|
||||
# Perform all update steps
|
||||
omarchy-update-keyring
|
||||
@@ -22,4 +22,4 @@ omarchy-update-analyze-logs
|
||||
omarchy-update-restart
|
||||
|
||||
# Re-enable screensaver/sleep after updates
|
||||
hyprctl dispatch tagwindow -- -noidle &>/dev/null || true
|
||||
hyprctl dispatch 'hl.dsp.window.tag({ tag = "-noidle" })' &>/dev/null || hyprctl dispatch tagwindow -- -noidle &>/dev/null || true
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
|
||||
echo
|
||||
|
||||
confirm_reboot() {
|
||||
gum confirm "$1" && { omarchy-system-reboot; exit 0; }
|
||||
}
|
||||
|
||||
running_kernel=$(uname -r)
|
||||
kernel_updated=true
|
||||
|
||||
@@ -19,14 +23,14 @@ for kernel in /usr/lib/modules/*/vmlinuz; do
|
||||
done
|
||||
|
||||
if [[ $kernel_updated == "true" ]]; then
|
||||
gum confirm "Linux kernel has been updated. Reboot?" && omarchy-system-reboot
|
||||
confirm_reboot "Linux kernel has been updated. Reboot?"
|
||||
elif [[ -f $HOME/.local/state/omarchy/reboot-required ]]; then
|
||||
gum confirm "Updates require reboot. Ready?" && omarchy-system-reboot
|
||||
confirm_reboot "Updates require reboot. Ready?"
|
||||
fi
|
||||
|
||||
running_hyprland=$(readlink /proc/$(pgrep -x Hyprland)/exe 2>/dev/null)
|
||||
if [[ $running_hyprland == *"(deleted)"* ]]; then
|
||||
gum confirm "Hyprland has been updated. Reboot?" && omarchy-system-reboot
|
||||
confirm_reboot "Hyprland has been updated. Reboot?"
|
||||
fi
|
||||
|
||||
for file in "$HOME"/.local/state/omarchy/restart-*-required; do
|
||||
|
||||
@@ -11,12 +11,11 @@ if omarchy-cmd-present voxtype; then
|
||||
echo "Uninstall Voxtype to remove dictation."
|
||||
|
||||
# Remove services
|
||||
systemctl --user stop voxtype.service 2>/dev/null || true
|
||||
rm -f ~/.config/systemd/user/voxtype*
|
||||
systemctl --user disable --now voxtype.service 2>/dev/null || true
|
||||
systemctl --user daemon-reload
|
||||
|
||||
# Remove packages and configs
|
||||
omarchy-pkg-drop wtype voxtype-bin
|
||||
omarchy-pkg-drop voxtype-bin
|
||||
rm -rf ~/.config/voxtype
|
||||
rm -rf ~/.local/share/voxtype
|
||||
else
|
||||
|
||||
@@ -24,11 +24,11 @@ case $weather_code in
|
||||
116) [[ $night == "true" ]] && icon="" || icon="" ;;
|
||||
119|122) icon="" ;;
|
||||
143|248|260) icon="" ;;
|
||||
176|263|266|293|296|353) [[ $night == "true" ]] && icon="" || icon="" ;;
|
||||
176|263|353) [[ $night == "true" ]] && icon="" || icon="" ;;
|
||||
179|227|230|323|326|368) [[ $night == "true" ]] && icon="" || icon="" ;;
|
||||
182|185|281|284|311|314|317|320|350|362|365|374|377) icon="" ;;
|
||||
200|386|389|392|395) icon="" ;;
|
||||
299|302|305|308|356|359) icon="" ;;
|
||||
266|293|296|299|302|305|308|356|359) icon="" ;;
|
||||
329|332|335|338|371) icon="" ;;
|
||||
*) icon="" ;;
|
||||
esac
|
||||
|
||||
@@ -14,4 +14,4 @@ place=${place%%,*}
|
||||
place=${place^}
|
||||
temperature=${temperature#+}
|
||||
|
||||
echo "$(omarchy-weather-icon) $place · Temp $temperature · Wind $wind"
|
||||
echo "$place · Temp $temperature · Wind $wind"
|
||||
|
||||
@@ -1 +1 @@
|
||||
command = 'wl-copy && hyprctl dispatch sendshortcut "SHIFT, Insert,"'
|
||||
command = 'wl-copy && ((hyprctl dispatch "hl.dsp.send_key_state({ mods = \"SHIFT\", key = \"Insert\", state = \"down\", window = \"activewindow\" })" && sleep 0.05 && hyprctl dispatch "hl.dsp.send_key_state({ mods = \"SHIFT\", key = \"Insert\", state = \"up\", window = \"activewindow\" })") || hyprctl dispatch sendshortcut "SHIFT, Insert, activewindow")'
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"workspace": {
|
||||
"library": [
|
||||
"/usr/share/hypr/stubs"
|
||||
],
|
||||
"checkThirdParty": false
|
||||
},
|
||||
"diagnostics": {
|
||||
"globals": ["hl", "o"]
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
# Extra autostart processes
|
||||
# exec-once = uwsm-app -- my-service
|
||||
@@ -0,0 +1,2 @@
|
||||
-- Extra autostart processes.
|
||||
-- o.launch_on_start("my-service")
|
||||
@@ -1,40 +0,0 @@
|
||||
# Application bindings
|
||||
bindd = SUPER, RETURN, Terminal, exec, uwsm-app -- xdg-terminal-exec --dir="$(omarchy-cmd-terminal-cwd)"
|
||||
bindd = SUPER ALT, RETURN, Tmux, exec, uwsm-app -- xdg-terminal-exec --dir="$(omarchy-cmd-terminal-cwd)" bash -c "tmux attach || tmux new -s Work"
|
||||
bindd = SUPER SHIFT, RETURN, Browser, exec, omarchy-launch-browser
|
||||
bindd = SUPER SHIFT, F, File manager, exec, uwsm-app -- nautilus --new-window
|
||||
bindd = SUPER ALT SHIFT, F, File manager (cwd), exec, uwsm-app -- nautilus --new-window "$(omarchy-cmd-terminal-cwd)"
|
||||
bindd = SUPER SHIFT, B, Browser, exec, omarchy-launch-browser
|
||||
bindd = SUPER SHIFT ALT, B, Browser (private), exec, omarchy-launch-browser --private
|
||||
bindd = SUPER SHIFT, M, Music, exec, omarchy-launch-or-focus spotify
|
||||
bindd = SUPER SHIFT ALT, M, Music TUI, exec, omarchy-launch-or-focus-tui cliamp
|
||||
bindd = SUPER SHIFT, N, Editor, exec, omarchy-launch-editor
|
||||
bindd = SUPER SHIFT, D, Docker, exec, omarchy-launch-tui lazydocker
|
||||
bindd = SUPER SHIFT, G, Signal, exec, omarchy-launch-or-focus ^signal$ "uwsm-app -- signal-desktop"
|
||||
bindd = SUPER SHIFT, O, Obsidian, exec, omarchy-launch-or-focus ^obsidian$ "uwsm-app -- obsidian"
|
||||
bindd = SUPER SHIFT, W, Typora, exec, uwsm-app -- typora --enable-wayland-ime
|
||||
bindd = SUPER SHIFT, SLASH, Passwords, exec, uwsm-app -- 1password
|
||||
|
||||
# If your web app url contains #, type it as ## to prevent hyprland treating it as a comment
|
||||
bindd = SUPER SHIFT, A, ChatGPT, exec, omarchy-launch-webapp "https://chatgpt.com"
|
||||
bindd = SUPER SHIFT ALT, A, Grok, exec, omarchy-launch-webapp "https://grok.com"
|
||||
bindd = SUPER SHIFT, C, Calendar, exec, omarchy-launch-webapp "https://app.hey.com/calendar/weeks/"
|
||||
bindd = SUPER SHIFT, E, Email, exec, omarchy-launch-webapp "https://app.hey.com"
|
||||
bindd = SUPER SHIFT, Y, YouTube, exec, omarchy-launch-webapp "https://youtube.com/"
|
||||
bindd = SUPER SHIFT ALT, G, WhatsApp, exec, omarchy-launch-or-focus-webapp WhatsApp "https://web.whatsapp.com/"
|
||||
bindd = SUPER SHIFT CTRL, G, Google Messages, exec, omarchy-launch-or-focus-webapp "Google Messages" "https://messages.google.com/web/conversations"
|
||||
bindd = SUPER SHIFT, P, Google Photos, exec, omarchy-launch-or-focus-webapp "Google Photos" "https://photos.google.com/"
|
||||
bindd = SUPER SHIFT, X, X, exec, omarchy-launch-webapp "https://x.com/"
|
||||
bindd = SUPER SHIFT ALT, X, X Post, exec, omarchy-launch-webapp "https://x.com/compose/post"
|
||||
|
||||
# Add extra bindings
|
||||
# bind = SUPER SHIFT, R, exec, alacritty -e ssh your-server
|
||||
|
||||
# Overwrite existing bindings, like putting Omarchy Menu on Super + Space
|
||||
# unbind = SUPER, SPACE
|
||||
# bindd = SUPER, SPACE, Omarchy menu, exec, omarchy-menu
|
||||
|
||||
# Logitech MX Keys
|
||||
# bind = SUPER SHIFT, S, exec, omarchy-capture-screenshot # Print Screen Button
|
||||
# bind = SUPER, H, exec, voxtype record toggle # Dictation Button
|
||||
# bind = SUPER, PERIOD, exec, omarchy-launch-walker -m symbols # Emoji Button
|
||||
@@ -0,0 +1,41 @@
|
||||
-- Application bindings.
|
||||
o.bind("SUPER + RETURN", "Terminal", { omarchy = "terminal" })
|
||||
o.bind("SUPER + ALT + RETURN", "Tmux", { omarchy = "terminal-tmux" })
|
||||
o.bind("SUPER + SHIFT + RETURN", "Browser", { omarchy = "browser" })
|
||||
o.bind("SUPER + SHIFT + F", "File manager", { omarchy = "nautilus" })
|
||||
o.bind("SUPER + ALT + SHIFT + F", "File manager (cwd)", { omarchy = "nautilus-cwd" })
|
||||
o.bind("SUPER + SHIFT + B", "Browser", { omarchy = "browser" })
|
||||
o.bind("SUPER + SHIFT + ALT + B", "Browser (private)", { omarchy = "browser --private" })
|
||||
o.bind("SUPER + SHIFT + M", "Music", { omarchy = "or-focus spotify" })
|
||||
o.bind("SUPER + SHIFT + ALT + M", "Music TUI", { tui = "cliamp", focus = true })
|
||||
o.bind("SUPER + SHIFT + N", "Editor", { omarchy = "editor" })
|
||||
o.bind("SUPER + SHIFT + D", "Docker", { tui = "lazydocker" })
|
||||
o.bind("SUPER + SHIFT + G", "Signal", { launch = "signal-desktop", focus = "^signal$" })
|
||||
o.bind("SUPER + SHIFT + O", "Obsidian", { launch = "obsidian", focus = "^obsidian$" })
|
||||
o.bind("SUPER + SHIFT + W", "Typora", { launch = "typora --enable-wayland-ime" })
|
||||
o.bind("SUPER + SHIFT + SLASH", "Passwords", { launch = "1password" })
|
||||
|
||||
-- Web app bindings.
|
||||
o.bind("SUPER + SHIFT + A", "ChatGPT", { webapp = "https://chatgpt.com" })
|
||||
o.bind("SUPER + SHIFT + ALT + A", "Grok", { webapp = "https://grok.com" })
|
||||
o.bind("SUPER + SHIFT + C", "Calendar", { webapp = "https://app.hey.com/calendar/weeks/" })
|
||||
o.bind("SUPER + SHIFT + E", "Email", { webapp = "https://app.hey.com" })
|
||||
o.bind("SUPER + SHIFT + Y", "YouTube", { webapp = "https://youtube.com/" })
|
||||
o.bind("SUPER + SHIFT + ALT + G", "WhatsApp", { webapp = "https://web.whatsapp.com/", focus = true })
|
||||
o.bind("SUPER + SHIFT + CTRL + G", "Google Messages", { webapp = "https://messages.google.com/web/conversations", focus = true })
|
||||
o.bind("SUPER + SHIFT + P", "Google Photos", { webapp = "https://photos.google.com/", focus = true })
|
||||
o.bind("SUPER + SHIFT + S", "Google Maps", { webapp = "https://maps.google.com/", focus = true })
|
||||
o.bind("SUPER + SHIFT + X", "X", { webapp = "https://x.com/" })
|
||||
o.bind("SUPER + SHIFT + ALT + X", "X Post", { webapp = "https://x.com/compose/post" })
|
||||
|
||||
-- Add extra bindings below.
|
||||
-- o.bind("SUPER + SHIFT + R", "SSH", "alacritty -e ssh your-server")
|
||||
|
||||
-- Overwrite existing bindings with hl.unbind() first if needed.
|
||||
-- hl.unbind("SUPER + SPACE")
|
||||
-- o.bind("SUPER + SPACE", "Omarchy menu", "omarchy-menu")
|
||||
|
||||
-- Logitech MX Keys examples:
|
||||
-- o.bind("SUPER + SHIFT + S", nil, "omarchy-capture-screenshot")
|
||||
-- o.bind("SUPER + H", nil, "voxtype record toggle")
|
||||
-- o.bind("SUPER + PERIOD", nil, { omarchy = "walker -m symbols" })
|
||||
@@ -1,26 +0,0 @@
|
||||
# Learn how to configure Hyprland: https://wiki.hypr.land/Configuring/
|
||||
|
||||
# Use defaults Omarchy defaults (but don't edit these directly!)
|
||||
source = ~/.local/share/omarchy/default/hypr/autostart.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/bindings/media.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/bindings/clipboard.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/bindings/tiling-v2.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/bindings/utilities.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/envs.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/looknfeel.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/input.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/windows.conf
|
||||
source = ~/.config/omarchy/current/theme/hyprland.conf
|
||||
|
||||
# Change your own setup in these files (and overwrite any settings from defaults!)
|
||||
source = ~/.config/hypr/monitors.conf
|
||||
source = ~/.config/hypr/input.conf
|
||||
source = ~/.config/hypr/bindings.conf
|
||||
source = ~/.config/hypr/looknfeel.conf
|
||||
source = ~/.config/hypr/autostart.conf
|
||||
|
||||
# Toggle config flags dynamically
|
||||
source = ~/.local/state/omarchy/toggles/hypr/*.conf
|
||||
|
||||
# Add any other personal Hyprland configuration below
|
||||
# windowrule = workspace 5, match:class qemu
|
||||
@@ -0,0 +1,24 @@
|
||||
-- Learn how to configure Hyprland: https://wiki.hypr.land/Configuring/Start/
|
||||
|
||||
-- Load user modules from ~/.config and Omarchy defaults from $OMARCHY_PATH.
|
||||
package.path = os.getenv("HOME")
|
||||
.. "/.config/?.lua;"
|
||||
.. (os.getenv("OMARCHY_PATH") or (os.getenv("HOME") .. "/.local/share/omarchy"))
|
||||
.. "/?.lua;"
|
||||
.. package.path
|
||||
|
||||
-- All Omarchy default setups
|
||||
require("default.hypr.omarchy")
|
||||
|
||||
-- Change your own setup in these files and override defaults.
|
||||
require("hypr.monitors")
|
||||
require("hypr.input")
|
||||
require("hypr.bindings")
|
||||
require("hypr.looknfeel")
|
||||
require("hypr.autostart")
|
||||
|
||||
-- Toggle config flags dynamically.
|
||||
require("default.hypr.toggles")
|
||||
|
||||
-- Add any other personal Hyprland configuration below.
|
||||
-- o.window("qemu", { workspace = "5" })
|
||||
@@ -1,53 +0,0 @@
|
||||
# Control your input devices
|
||||
# See https://wiki.hypr.land/Configuring/Basics/Variables/#input
|
||||
input {
|
||||
# Use multiple keyboard layouts and switch between them with Left Alt + Right Alt
|
||||
# kb_layout = us,dk,eu
|
||||
|
||||
# Use a specific keyboard variant if needed (e.g. intl for international keyboards)
|
||||
# kb_variant = intl
|
||||
|
||||
kb_options = compose:caps # ,grp:alts_toggle
|
||||
|
||||
# Change speed of keyboard repeat
|
||||
repeat_rate = 40
|
||||
repeat_delay = 250
|
||||
|
||||
# Start with numlock on by default
|
||||
numlock_by_default = true
|
||||
|
||||
# Increase sensitivity for mouse/trackpad (default: 0)
|
||||
# sensitivity = 0.35
|
||||
|
||||
# Turn off mouse acceleration (default: adaptive)
|
||||
# accel_profile = flat
|
||||
|
||||
touchpad {
|
||||
# Use natural (inverse) scrolling
|
||||
# natural_scroll = true
|
||||
|
||||
# Use two-finger clicks for right-click instead of lower-right corner
|
||||
clickfinger_behavior = true
|
||||
|
||||
# Control the speed of your scrolling
|
||||
scroll_factor = 0.4
|
||||
|
||||
# Enable the touchpad while typing
|
||||
# disable_while_typing = false
|
||||
|
||||
# Left-click-and-drag with three fingers
|
||||
# drag_3fg = 1
|
||||
}
|
||||
}
|
||||
|
||||
# Scroll nicely in the terminal
|
||||
windowrule = match:class (Alacritty|kitty|foot), scroll_touchpad 1.5
|
||||
windowrule = match:class com.mitchellh.ghostty, scroll_touchpad 0.2
|
||||
|
||||
# Enable touchpad gestures for changing workspaces
|
||||
# See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Gestures/
|
||||
# gesture = 3, horizontal, workspace
|
||||
|
||||
# Enable touchpad gestures for moving focus (helpful on scrolling layout)
|
||||
# gesture = 3, left, dispatcher, movefocus, l
|
||||
# gesture = 3, right, dispatcher, movefocus, r
|
||||
@@ -0,0 +1,55 @@
|
||||
-- Control your input devices.
|
||||
-- See https://wiki.hypr.land/Configuring/Basics/Variables/#input
|
||||
hl.config({
|
||||
input = {
|
||||
-- Use multiple keyboard layouts and switch between them with Left Alt + Right Alt.
|
||||
-- kb_layout = "us,dk,eu",
|
||||
|
||||
-- Use a specific keyboard variant if needed (e.g. intl for international keyboards).
|
||||
-- kb_variant = "intl",
|
||||
|
||||
kb_options = "compose:caps", -- ,grp:alts_toggle
|
||||
|
||||
-- Change speed of keyboard repeat.
|
||||
repeat_rate = 40,
|
||||
repeat_delay = 250,
|
||||
|
||||
-- Start with numlock on by default.
|
||||
numlock_by_default = true,
|
||||
|
||||
-- Increase sensitivity for mouse/trackpad (default: 0).
|
||||
-- sensitivity = 0.35,
|
||||
|
||||
-- Turn off mouse acceleration (default: adaptive).
|
||||
-- accel_profile = "flat",
|
||||
|
||||
touchpad = {
|
||||
-- Use natural (inverse) scrolling.
|
||||
-- natural_scroll = true,
|
||||
|
||||
-- Use two-finger clicks for right-click instead of lower-right corner.
|
||||
clickfinger_behavior = true,
|
||||
|
||||
-- Control the speed of your scrolling.
|
||||
scroll_factor = 0.4,
|
||||
|
||||
-- Enable the touchpad while typing.
|
||||
-- disable_while_typing = false,
|
||||
|
||||
-- Left-click-and-drag with three fingers.
|
||||
-- drag_3fg = 1,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Scroll nicely in the terminal.
|
||||
o.window("(Alacritty|kitty|foot)", { scroll_touchpad = 1.5 })
|
||||
o.window("com.mitchellh.ghostty", { scroll_touchpad = 0.2 })
|
||||
|
||||
-- Enable touchpad gestures for changing workspaces.
|
||||
-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Gestures/
|
||||
-- hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" })
|
||||
|
||||
-- Enable touchpad gestures for moving focus (helpful on scrolling layout).
|
||||
-- hl.gesture({ fingers = 3, direction = "left", action = function() hl.dispatch(hl.dsp.focus({ direction = "l" })) end })
|
||||
-- hl.gesture({ fingers = 3, direction = "right", action = function() hl.dispatch(hl.dsp.focus({ direction = "r" })) end })
|
||||
@@ -1,40 +0,0 @@
|
||||
# Change the default Omarchy look'n'feel
|
||||
|
||||
# https://wiki.hypr.land/Configuring/Basics/Variables/#general
|
||||
general {
|
||||
# No gaps between windows or borders
|
||||
# gaps_in = 0
|
||||
# gaps_out = 0
|
||||
# border_size = 0
|
||||
|
||||
# Change to niri-like side-scrolling layout
|
||||
# layout = scrolling
|
||||
}
|
||||
|
||||
# https://wiki.hypr.land/Configuring/Basics/Variables/#decoration
|
||||
decoration {
|
||||
# Use round window corners
|
||||
# rounding = 8
|
||||
|
||||
# Dim unfocused windows (0.0 = no dim, 1.0 = fully dimmed)
|
||||
# dim_inactive = true
|
||||
# dim_strength = 0.15
|
||||
}
|
||||
|
||||
# https://wiki.hypr.land/Configuring/Basics/Variables/#animations
|
||||
animations {
|
||||
# Disable all animations
|
||||
# enabled = no
|
||||
}
|
||||
|
||||
# https://wiki.hypr.land/Configuring/Basics/Variables/#layout
|
||||
layout {
|
||||
# Avoid overly wide single-window layouts on wide screens
|
||||
# single_window_aspect_ratio = 1 1
|
||||
}
|
||||
|
||||
# https://wiki.hypr.land/Configuring/Layouts/Scrolling-Layout/
|
||||
scrolling {
|
||||
# See only one column per screen instead of two
|
||||
# column_width = 0.97
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
-- Change the default Omarchy look'n'feel.
|
||||
|
||||
-- https://wiki.hypr.land/Configuring/Basics/Variables/#general
|
||||
-- hl.config({
|
||||
-- general = {
|
||||
-- -- No gaps between windows or borders.
|
||||
-- gaps_in = 0,
|
||||
-- gaps_out = 0,
|
||||
-- border_size = 0,
|
||||
--
|
||||
-- -- Change to niri-like side-scrolling layout.
|
||||
-- layout = "scrolling",
|
||||
-- },
|
||||
-- })
|
||||
|
||||
-- https://wiki.hypr.land/Configuring/Basics/Variables/#decoration
|
||||
-- hl.config({
|
||||
-- decoration = {
|
||||
-- -- Use round window corners.
|
||||
-- rounding = 8,
|
||||
--
|
||||
-- -- Dim unfocused windows (0.0 = no dim, 1.0 = fully dimmed).
|
||||
-- dim_inactive = true,
|
||||
-- dim_strength = 0.15,
|
||||
-- },
|
||||
-- })
|
||||
|
||||
-- https://wiki.hypr.land/Configuring/Basics/Variables/#animations
|
||||
-- hl.config({
|
||||
-- animations = {
|
||||
-- -- Disable all animations.
|
||||
-- enabled = false,
|
||||
-- },
|
||||
-- })
|
||||
|
||||
-- https://wiki.hypr.land/Configuring/Basics/Variables/#layout
|
||||
-- hl.config({
|
||||
-- layout = {
|
||||
-- -- Avoid overly wide single-window layouts on wide screens.
|
||||
-- single_window_aspect_ratio = { 1, 1 },
|
||||
-- },
|
||||
-- })
|
||||
|
||||
-- https://wiki.hypr.land/Configuring/Layouts/Scrolling-Layout/
|
||||
-- hl.config({
|
||||
-- scrolling = {
|
||||
-- -- See only one column per screen instead of two.
|
||||
-- column_width = 0.97,
|
||||
-- },
|
||||
-- })
|
||||
@@ -1,13 +0,0 @@
|
||||
# See https://wiki.hypr.land/Configuring/Basics/Monitors/
|
||||
# List current monitors and resolutions possible: hyprctl monitors
|
||||
# Format: monitor = [port], resolution, position, scale
|
||||
|
||||
# Default configuration
|
||||
env = GDK_SCALE,2
|
||||
monitor=,preferred,auto,auto
|
||||
|
||||
# Portrait/rotated secondary monitor (transform: 1 = 90°, 3 = 270°)
|
||||
# monitor = DP-2, preferred, auto, 1, transform, 1
|
||||
|
||||
# Disable the second ghost monitor on an Apple 6K XDR over Thunderbolt
|
||||
# monitor=DP-2,disable
|
||||
@@ -0,0 +1,30 @@
|
||||
-- See https://wiki.hypr.land/Configuring/Basics/Monitors/
|
||||
-- List current monitors and resolutions possible: hyprctl monitors all
|
||||
|
||||
local omarchy_gdk_scale = 2
|
||||
local omarchy_monitor_scale = "auto"
|
||||
|
||||
-- Optimized for retina-class 2x displays, like 13" 2.8K, 27" 5K, 32" 6K.
|
||||
-- local omarchy_gdk_scale = 2
|
||||
-- local omarchy_monitor_scale = "auto"
|
||||
|
||||
-- Good compromise for 27" or 32" 4K monitors (but fractional!): monitor scale 1.6, GDK scale 1.75.
|
||||
-- local omarchy_gdk_scale = 1.75
|
||||
-- local omarchy_monitor_scale = 1.6
|
||||
|
||||
-- Straight 1x setup for low-resolution displays like 1080p, 1440p, or ultrawides: both 1.
|
||||
-- local omarchy_gdk_scale = 1
|
||||
-- local omarchy_monitor_scale = 1
|
||||
|
||||
hl.env("GDK_SCALE", tostring(omarchy_gdk_scale))
|
||||
hl.monitor({ output = "", mode = "preferred", position = "auto", scale = omarchy_monitor_scale })
|
||||
|
||||
-- Portrait/rotated secondary monitor (transform: 1 = 90°, 3 = 270°)
|
||||
-- hl.monitor({ output = "DP-2", mode = "preferred", position = "auto", scale = 1, transform = 1 })
|
||||
|
||||
-- Example for Framework 13 w/ 6K XDR Apple display.
|
||||
-- hl.monitor({ output = "DP-5", mode = "6016x3384@60", position = "auto", scale = 2 })
|
||||
-- hl.monitor({ output = "eDP-1", mode = "2880x1920@120", position = "auto", scale = 2 })
|
||||
|
||||
-- Disable the second ghost monitor on an Apple 6K XDR over Thunderbolt.
|
||||
-- hl.monitor({ output = "DP-2", disabled = true })
|
||||
@@ -1,20 +0,0 @@
|
||||
# Overwrite parts of the omarchy-menu with user-specific submenus.
|
||||
# See $OMARCHY_PATH/bin/omarchy-menu for functions that can be overwritten.
|
||||
#
|
||||
# WARNING: Overwritten functions will obviously not be updated when Omarchy changes.
|
||||
#
|
||||
# Example of minimal system menu:
|
||||
#
|
||||
# show_system_menu() {
|
||||
# case $(menu "System" " Lock\n Shutdown") in
|
||||
# *Lock*) omarchy-system-lock ;;
|
||||
# *Shutdown*) omarchy-system-shutdown ;;
|
||||
# *) back_to show_main_menu ;;
|
||||
# esac
|
||||
# }
|
||||
#
|
||||
# Example of overriding just the about menu action: (Using zsh instead of bash (default))
|
||||
#
|
||||
# show_about() {
|
||||
# exec omarchy-launch-or-focus-tui "zsh -c 'fastfetch; read -k 1'"
|
||||
# }
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
// Extend the Quickshell Omarchy menu with JSONC.
|
||||
//
|
||||
// IDs are object keys. The parent is inferred from the dotted id, so
|
||||
// "personal.notes" appears under "personal", and "personal" appears on the
|
||||
// root menu. Reuse an existing id to override/extend it.
|
||||
//
|
||||
// Fields:
|
||||
// icon Nerd Font glyph shown in the icon column.
|
||||
// label Visible row title.
|
||||
// action Shell command to run. If omitted, the row is a submenu.
|
||||
// target Existing submenu id to open. Use for links/aliases.
|
||||
// provider Runtime provider function/command returning JSON rows.
|
||||
// aliases Alternate `omarchy-menu <name>` routes; also searchable.
|
||||
// keywords Extra search terms beyond id/label/aliases.
|
||||
// description Optional subtitle and extra search text.
|
||||
// when Shell condition; hide row when it fails.
|
||||
// checked Shell condition; append ✓ when it succeeds.
|
||||
//
|
||||
// Examples:
|
||||
// "personal": {"icon":"","label":"Personal","keywords":"notes projects"},
|
||||
// "personal.notes": {"icon":"","label":"Notes","action":"omarchy-launch-editor ~/notes","keywords":"notes"},
|
||||
// "personal.files": {"icon":"","label":"Files","action":"uwsm-app -- nautilus ~/Documents","keywords":"files documents"},
|
||||
//
|
||||
// Only use provider when a provider_name function or command named "name"
|
||||
// returns JSON rows. Static submenus only need dotted ids.
|
||||
//
|
||||
// Example: replace the default About action by reusing the same id. Existing
|
||||
// fields are kept unless overridden.
|
||||
// "about": {"icon":"","label":"About","action":"omarchy-launch-or-focus-tui \"zsh -c 'fastfetch; read -k 1'\""},
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
[Unit]
|
||||
Description=Recover the internal monitor toggle when no external display is connected
|
||||
Before=graphical-session-pre.target
|
||||
ConditionPathExists=%h/.local/state/omarchy/toggles/hypr/internal-monitor-disable.conf
|
||||
ConditionPathExists=%h/.local/state/omarchy/toggles/hypr/internal-monitor-disable.lua
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
||||
@@ -3,8 +3,9 @@ set -g prefix C-Space
|
||||
set -g prefix2 C-b
|
||||
bind C-Space send-prefix
|
||||
|
||||
# Reload config
|
||||
# Config and help
|
||||
bind q source-file ~/.config/tmux/tmux.conf \; display "Configuration reloaded"
|
||||
bind ? display-popup -E -w 80% -h 70% -T "Tmux keybindings" "omarchy-menu-tmux-keybindings --print | less -R"
|
||||
|
||||
# Vi mode for copy
|
||||
setw -g mode-keys vi
|
||||
@@ -12,6 +13,10 @@ bind -T copy-mode-vi v send -X begin-selection
|
||||
bind -T copy-mode-vi y send -X copy-selection-and-cancel
|
||||
|
||||
# Pane Controls
|
||||
bind -n M-Enter split-window -v -c "#{pane_current_path}"
|
||||
bind -n M-S-Enter split-window -h -c "#{pane_current_path}"
|
||||
bind -n M-Escape kill-pane
|
||||
|
||||
bind h split-window -v -c "#{pane_current_path}"
|
||||
bind v split-window -h -c "#{pane_current_path}"
|
||||
bind x kill-pane
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
# Install other terminals via Install > Terminal
|
||||
export TERMINAL=xdg-terminal-exec
|
||||
|
||||
# Used by terminal programs (like gh) to open URLs detached from the terminal process tree
|
||||
export BROWSER=omarchy-launch-browser
|
||||
|
||||
# Use code for VSCode
|
||||
export EDITOR=nvim
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"height": 26,
|
||||
"width": 0,
|
||||
"modules-left": ["custom/omarchy", "hyprland/workspaces"],
|
||||
"modules-center": ["clock", "custom/weather", "custom/update", "custom/voxtype", "custom/screenrecording-indicator", "custom/idle-indicator", "custom/notification-silencing-indicator"],
|
||||
"modules-center": ["clock#horizontal", "clock#vertical", "custom/weather", "custom/update", "custom/voxtype", "custom/screenrecording-indicator", "custom/idle-indicator", "custom/notification-silencing-indicator"],
|
||||
"modules-right": [
|
||||
"group/tray-expander",
|
||||
"bluetooth",
|
||||
@@ -61,12 +61,18 @@
|
||||
"on-click": "omarchy-launch-or-focus-tui btop",
|
||||
"on-click-right": "alacritty"
|
||||
},
|
||||
"clock": {
|
||||
"clock#horizontal": {
|
||||
"format": "{:L%A %H:%M}",
|
||||
"format-alt": "{:L%d %B W%V %Y}",
|
||||
"tooltip": false,
|
||||
"on-click-right": "omarchy-launch-floating-terminal-with-presentation omarchy-tz-select"
|
||||
},
|
||||
"clock#vertical": {
|
||||
"format": "{:%H\n —\n%M}",
|
||||
"format-alt": "{:L%d %B W%V %Y}",
|
||||
"tooltip": false,
|
||||
"on-click-right": "omarchy-launch-floating-terminal-with-presentation omarchy-tz-select"
|
||||
},
|
||||
"custom/weather": {
|
||||
"exec": "$OMARCHY_PATH/default/waybar/weather.sh",
|
||||
"return-type": "json",
|
||||
@@ -135,9 +141,13 @@
|
||||
"transition-duration": 600,
|
||||
"children-class": "tray-group-item"
|
||||
},
|
||||
"modules": ["custom/expand-icon", "tray"]
|
||||
"modules": ["group/expand-icons", "tray"]
|
||||
},
|
||||
"custom/expand-icon": {
|
||||
"group/expand-icons": {
|
||||
"orientation": "inherit",
|
||||
"modules": ["custom/expand-icon#horizontal", "custom/expand-icon#vertical"]
|
||||
},
|
||||
"custom/expand-icon#horizontal": {
|
||||
"format": "",
|
||||
"tooltip": false,
|
||||
"on-scroll-up": "",
|
||||
@@ -145,6 +155,15 @@
|
||||
"on-scroll-left": "",
|
||||
"on-scroll-right": ""
|
||||
},
|
||||
"custom/expand-icon#vertical": {
|
||||
"format": "",
|
||||
"rotate": 270,
|
||||
"tooltip": false,
|
||||
"on-scroll-up": "",
|
||||
"on-scroll-down": "",
|
||||
"on-scroll-left": "",
|
||||
"on-scroll-right": ""
|
||||
},
|
||||
"custom/screenrecording-indicator": {
|
||||
"on-click": "omarchy-capture-screenrecording",
|
||||
"exec": "$OMARCHY_PATH/default/waybar/indicators/screen-recording.sh",
|
||||
|
||||
@@ -110,6 +110,7 @@ tooltip {
|
||||
#custom-voxtype.recording {
|
||||
color: #a55555;
|
||||
}
|
||||
|
||||
.left .modules-left, .right .modules-left { margin: 8px 0 0 0; }
|
||||
.left .modules-right, .right .modules-right { margin: 0 0 8px 0; }
|
||||
|
||||
@@ -145,3 +146,44 @@ tooltip {
|
||||
}
|
||||
|
||||
.left #custom-voxtype, .right #custom-voxtype { margin: 7.5px 0 0 0; min-width: 0; min-height: 12px; }
|
||||
|
||||
#custom-expand-icon.vertical,
|
||||
.left #custom-expand-icon.horizontal,
|
||||
.right #custom-expand-icon.horizontal {
|
||||
opacity: 0;
|
||||
font-size: 0;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.left #custom-expand-icon.vertical,
|
||||
.right #custom-expand-icon.vertical {
|
||||
opacity: 1;
|
||||
font-size: inherit;
|
||||
min-width: 0;
|
||||
min-height: 12px;
|
||||
margin: 1.5px 0;
|
||||
padding: 6px 0;
|
||||
}
|
||||
|
||||
#clock.vertical,
|
||||
.left #clock.horizontal,
|
||||
.right #clock.horizontal {
|
||||
opacity: 0;
|
||||
font-size: 0;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.left #clock.vertical,
|
||||
.right #clock.vertical {
|
||||
opacity: 1;
|
||||
font-size: inherit;
|
||||
min-width: 0;
|
||||
min-height: 12px;
|
||||
margin: 8.75px 0 0 0;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,33 @@ tdl() {
|
||||
tmux send-keys -t "$editor_pane" "$EDITOR ." C-m
|
||||
|
||||
# Select the nvim pane for focus
|
||||
tmux select-pane -t "$opencode_pane"
|
||||
}
|
||||
|
||||
# Create a Tmux Dev Square layout with editor, diff watch, terminal, and opencode
|
||||
# Usage: tds
|
||||
tds() {
|
||||
[[ -n $1 ]] && { echo "Usage: tds"; return 1; }
|
||||
[[ -z $TMUX ]] && { echo "You must start tmux to use tds."; return 1; }
|
||||
|
||||
local current_dir="${PWD}"
|
||||
local editor_pane diff_pane terminal_pane opencode_pane
|
||||
|
||||
editor_pane="$TMUX_PANE"
|
||||
|
||||
tmux rename-window -t "$editor_pane" "$(basename "$current_dir")"
|
||||
|
||||
terminal_pane=$(tmux split-window -v -p 50 -t "$editor_pane" -c "$current_dir" -P -F '#{pane_id}')
|
||||
diff_pane=$(tmux split-window -h -p 50 -t "$editor_pane" -c "$current_dir" -P -F '#{pane_id}')
|
||||
opencode_pane=$(tmux split-window -h -p 50 -t "$terminal_pane" -c "$current_dir" -P -F '#{pane_id}')
|
||||
|
||||
tmux send-keys -t "$editor_pane" -l "nvim ."
|
||||
tmux send-keys -t "$editor_pane" C-m
|
||||
tmux send-keys -t "$diff_pane" -l "hunk diff --watch"
|
||||
tmux send-keys -t "$diff_pane" C-m
|
||||
tmux send-keys -t "$opencode_pane" -l "opencode"
|
||||
tmux send-keys -t "$opencode_pane" C-m
|
||||
|
||||
tmux select-pane -t "$editor_pane"
|
||||
}
|
||||
|
||||
|
||||
@@ -44,9 +44,9 @@ function GetEntries()
|
||||
-- Track added files to avoid duplicates
|
||||
local seen = {}
|
||||
|
||||
for _, wallpaper_dir in ipairs(dirs) do
|
||||
for _, background_dir in ipairs(dirs) do
|
||||
local handle = io.popen(
|
||||
"find -L " .. ShellEscape(wallpaper_dir)
|
||||
"find -L " .. ShellEscape(background_dir)
|
||||
.. " -maxdepth 1 -type f \\( -name '*.jpg' -o -name '*.jpeg' -o -name '*.png' -o -name '*.gif' -o -name '*.bmp' -o -name '*.webp' \\) 2>/dev/null | sort"
|
||||
)
|
||||
if handle then
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
# App-specific tweaks
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/1password.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/bitwarden.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/browser.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/hyprshot.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/jetbrains.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/localsend.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/pip.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/qemu.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/retroarch.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/steam.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/geforce.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/moonlight.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/system.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/telegram.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/typora.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/terminals.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/walker.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/webcam-overlay.conf
|
||||
@@ -0,0 +1,5 @@
|
||||
-- App-specific tweaks.
|
||||
local paths = require("default.hypr.paths")
|
||||
local require_all = require("default.hypr.require_all")
|
||||
|
||||
require_all.files(paths.omarchy_path .. "/default/hypr/apps", "default.hypr.apps")
|
||||
@@ -1,2 +0,0 @@
|
||||
windowrule = no_screen_share on, match:class ^(1[p|P]assword)$
|
||||
windowrule = tag +floating-window, match:class ^(1[p|P]assword)$
|
||||
@@ -0,0 +1 @@
|
||||
o.window("^(1[p|P]assword)$", { no_screen_share = true, tag = "+floating-window" })
|
||||
@@ -1,6 +0,0 @@
|
||||
windowrule = no_screen_share on, match:class ^(Bitwarden)$
|
||||
windowrule = tag +floating-window, match:class ^(Bitwarden)$
|
||||
|
||||
# Bitwarden Chrome Extension
|
||||
windowrule = no_screen_share on, match:class chrome-nngceckbapebfimnlniiiahkandclblb-Default
|
||||
windowrule = tag +floating-window, match:class chrome-nngceckbapebfimnlniiiahkandclblb-Default
|
||||
@@ -0,0 +1,6 @@
|
||||
o.window("^(Bitwarden)$", { no_screen_share = true, tag = "+floating-window" })
|
||||
|
||||
o.window("chrome-nngceckbapebfimnlniiiahkandclblb-Default", {
|
||||
no_screen_share = true,
|
||||
tag = "+floating-window",
|
||||
})
|
||||
@@ -1,19 +0,0 @@
|
||||
# Browser types
|
||||
windowrule = tag +chromium-based-browser, match:class ((google-)?[cC]hrom(e|ium)|[bB]rave-browser|[mM]icrosoft-edge|Vivaldi-stable|helium)
|
||||
windowrule = tag +firefox-based-browser, match:class ([fF]irefox|zen|librewolf)
|
||||
windowrule = tag -default-opacity, match:tag chromium-based-browser
|
||||
windowrule = tag -default-opacity, match:tag firefox-based-browser
|
||||
|
||||
# Video apps: remove chromium browser tag so they don't get opacity applied
|
||||
windowrule = tag -chromium-based-browser, match:class (chrome-youtube.com__-Default|chrome-app.zoom.us__wc_home-Default)
|
||||
windowrule = tag -default-opacity, match:class (chrome-youtube.com__-Default|chrome-app.zoom.us__wc_home-Default)
|
||||
|
||||
# Force chromium-based browsers into a tile to deal with --app bug
|
||||
windowrule = tile on, match:tag chromium-based-browser
|
||||
|
||||
# Only a subtle opacity change, but not for video sites
|
||||
windowrule = opacity 1.0 0.97, match:tag chromium-based-browser
|
||||
windowrule = opacity 1.0 0.97, match:tag firefox-based-browser
|
||||
|
||||
# Hide the screen-sharing notification bar (the "Hide" button on it is broken on Wayland)
|
||||
windowrule = workspace special silent, match:title .*is sharing.*
|
||||
@@ -0,0 +1,12 @@
|
||||
-- Browser tags and styling.
|
||||
o.window("((google-)?[cC]hrom(e|ium)|[bB]rave-browser|[mM]icrosoft-edge|Vivaldi-stable|helium)", { tag = "+chromium-based-browser" })
|
||||
o.window("([fF]irefox|zen|librewolf)", { tag = "+firefox-based-browser" })
|
||||
o.window({ tag = "chromium-based-browser" }, { tag = "-default-opacity", tile = true, opacity = "1.0 0.97" })
|
||||
o.window({ tag = "firefox-based-browser" }, { tag = "-default-opacity", opacity = "1.0 0.97" })
|
||||
|
||||
-- Video apps: remove chromium browser tag so they don't get opacity applied.
|
||||
o.window("(chrome-youtube.com__-Default|chrome-app.zoom.us__wc_home-Default)", { tag = "-chromium-based-browser" })
|
||||
o.window("(chrome-youtube.com__-Default|chrome-app.zoom.us__wc_home-Default)", { tag = "-default-opacity" })
|
||||
|
||||
-- Hide screen sharing notification windows.
|
||||
o.window({ title = ".*is sharing.*" }, { workspace = "special silent" })
|
||||
@@ -1,2 +0,0 @@
|
||||
# Focus floating DaVinci Resolve dialog windows
|
||||
windowrule = stay_focused on, match:class .*[Rr]esolve.*, match:float 1
|
||||
@@ -0,0 +1,2 @@
|
||||
-- DaVinci Resolve dialog focus handling.
|
||||
o.window(".*[Rr]esolve.*", { float = true, stay_focused = true })
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user