Drop walker + elephant
This commit is contained in:
@@ -61,7 +61,7 @@ Do not define:
|
||||
false flags or empty args
|
||||
|
||||
Examples:
|
||||
# omarchy:summary=Restart Walker and related user services
|
||||
# omarchy:summary=Restart the shell
|
||||
|
||||
# omarchy:summary=Take a screenshot
|
||||
# omarchy:group=capture
|
||||
|
||||
@@ -18,7 +18,6 @@ if [[ -f $FIRST_RUN_MODE ]]; then
|
||||
bash "$OMARCHY_PATH/install/first-run/gnome-theme.sh"
|
||||
bash "$OMARCHY_PATH/install/first-run/gdk-scale.sh"
|
||||
bash "$OMARCHY_PATH/install/first-run/gtk-primary-paste.sh"
|
||||
bash "$OMARCHY_PATH/install/first-run/elephant.sh"
|
||||
omarchy-hook-install post-update "$OMARCHY_PATH/install/first-run/install-voxtype.hook"
|
||||
sudo rm -f /etc/sudoers.d/first-run
|
||||
|
||||
|
||||
@@ -62,7 +62,6 @@ 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() {
|
||||
|
||||
@@ -14,9 +14,6 @@ if omarchy-toggle-enabled screensaver-off && [[ $1 != "force" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Silently quit Walker on overlay
|
||||
walker -q
|
||||
|
||||
focused=$(omarchy-hyprland-monitor-focused)
|
||||
terminal=$(xdg-terminal-exec --print-id)
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Launch Walker and ensure its Elephant data provider is running
|
||||
|
||||
if ! pgrep -x elephant > /dev/null; then
|
||||
setsid uwsm-app -- elephant &
|
||||
fi
|
||||
|
||||
# Ensure walker service is running
|
||||
if ! pgrep -f "walker --gapplication-service" > /dev/null; then
|
||||
setsid uwsm-app -- env GSK_RENDERER=cairo walker --gapplication-service &
|
||||
fi
|
||||
|
||||
exec walker --width 644 --maxheight 300 --minheight 300 "$@"
|
||||
@@ -1,15 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Pick a file with Walker
|
||||
# omarchy:summary=Pick a file from a menu
|
||||
# omarchy:group=menu
|
||||
# omarchy:name=file
|
||||
# omarchy:args=label paths formats [walker args...]
|
||||
# omarchy:args=label paths formats [menu args...]
|
||||
# omarchy:examples=omarchy menu file "Select image" "$HOME/Pictures" "jpg png webp"|omarchy-menu-file "Select media" "$HOME/Pictures:$HOME/Videos" "jpg png mp4 mov" --width 800
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if (( $# < 3 )); then
|
||||
echo "Usage: omarchy-menu-file <label> <paths> <formats> [walker args...]" >&2
|
||||
echo "Usage: omarchy-menu-file <label> <paths> <formats> [menu args...]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -22,7 +22,7 @@ IFS=: read -r -a paths <<<"$paths_arg"
|
||||
read -r -a formats <<<"$formats_arg"
|
||||
|
||||
if (( ${#paths[@]} == 0 || ${#formats[@]} == 0 )); then
|
||||
echo "Usage: omarchy-menu-file <label> <paths> <formats> [walker args...]" >&2
|
||||
echo "Usage: omarchy-menu-file <label> <paths> <formats> [menu args...]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -45,4 +45,4 @@ done
|
||||
find_args+=(")" -printf '%T@\t%p\n')
|
||||
|
||||
find "${find_args[@]}" 2>/dev/null | sort -rn | cut -f2- |
|
||||
omarchy-launch-walker --dmenu --width 800 --minheight 1 --maxheight 500 -p "$label…" "$@" 2>/dev/null
|
||||
omarchy-menu-select "$label" -- --width 800 --maxheight 500 "$@"
|
||||
|
||||
+45
-3
@@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Prompt for text input with Walker
|
||||
# omarchy:summary=Prompt for text input from a menu
|
||||
# omarchy:group=menu
|
||||
# omarchy:name=input
|
||||
# omarchy:args=prompt [walker args...]
|
||||
# omarchy:args=prompt [menu args...]
|
||||
# omarchy:examples=omarchy menu input Reminder|omarchy-menu-input "Reminder in minutes" --width 400
|
||||
|
||||
set -euo pipefail
|
||||
@@ -13,4 +13,46 @@ if (( $# > 0 )); then
|
||||
shift
|
||||
fi
|
||||
|
||||
omarchy-launch-walker --dmenu --inputonly --width 295 --minheight 1 --maxheight 1 -p "$prompt…" "$@" 2>/dev/null
|
||||
menu_width=""
|
||||
|
||||
while (( $# > 0 )); do
|
||||
case "$1" in
|
||||
--width)
|
||||
shift
|
||||
if (( $# == 0 )); then
|
||||
echo "omarchy-menu-input: --width requires a value" >&2
|
||||
exit 1
|
||||
fi
|
||||
menu_width="$1"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
selection_file=$(mktemp)
|
||||
done_file=$(mktemp)
|
||||
rm -f "$done_file"
|
||||
trap 'rm -f "$selection_file" "$done_file"' EXIT
|
||||
|
||||
payload=$(perl -MEncode=decode -MJSON::PP=encode_json -e '
|
||||
my $payload = {
|
||||
mode => "input",
|
||||
prompt => decode("UTF-8", $ARGV[0]),
|
||||
selectionFile => decode("UTF-8", $ARGV[1]),
|
||||
doneFile => decode("UTF-8", $ARGV[2])
|
||||
};
|
||||
$payload->{width} = int($ARGV[3]) if length($ARGV[3] // "");
|
||||
print encode_json($payload)
|
||||
' "$prompt" "$selection_file" "$done_file" "$menu_width")
|
||||
|
||||
omarchy-shell shell summon omarchy.menu "$payload" >/dev/null
|
||||
|
||||
while [[ ! -e $done_file ]]; do
|
||||
sleep 0.05
|
||||
done
|
||||
|
||||
if [[ -s $selection_file ]]; then
|
||||
cat "$selection_file"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Display Hyprland keybindings defined in your configuration using walker for an interactive search menu.
|
||||
# omarchy:summary=Display Hyprland keybindings defined in your configuration using an interactive search menu.
|
||||
|
||||
declare -A KEYCODE_SYM_MAP
|
||||
# Hyprland reports XKB keycodes for code: bindings. Keep a small fallback for
|
||||
@@ -600,7 +600,7 @@ else
|
||||
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")
|
||||
omarchy-menu-select 'Keybindings' -- --width 800 --height "$menu_height")
|
||||
|
||||
if [[ -n $selection ]]; then
|
||||
record=$(awk -F '\t' -v selection="$selection" '$1 == selection { print; exit }' <<<"$records")
|
||||
|
||||
+63
-8
@@ -1,15 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Pick one option with Walker
|
||||
# omarchy:summary=Pick one option from a menu
|
||||
# omarchy:group=menu
|
||||
# omarchy:name=select
|
||||
# omarchy:args=prompt option... [-- walker args...]
|
||||
# omarchy:args=prompt [option...] [-- menu args...]
|
||||
# omarchy:examples=omarchy menu select Format jpg png|omarchy-menu-select Resolution 4k 1080p 720p -- --width 400
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if (( $# < 2 )); then
|
||||
echo "Usage: omarchy-menu-select <prompt> <option>... [-- walker args...]" >&2
|
||||
if (( $# < 1 )); then
|
||||
echo "Usage: omarchy-menu-select <prompt> [option...] [-- menu args...]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -17,12 +17,34 @@ prompt="$1"
|
||||
shift
|
||||
|
||||
options=()
|
||||
walker_args=()
|
||||
menu_width=""
|
||||
menu_maxheight=""
|
||||
|
||||
while (( $# > 0 )); do
|
||||
if [[ $1 == "--" ]]; then
|
||||
shift
|
||||
walker_args=("$@")
|
||||
while (( $# > 0 )); do
|
||||
case "$1" in
|
||||
--width)
|
||||
shift
|
||||
if (( $# == 0 )); then
|
||||
echo "omarchy-menu-select: --width requires a value" >&2
|
||||
exit 1
|
||||
fi
|
||||
menu_width="$1"
|
||||
;;
|
||||
--height|--maxheight)
|
||||
arg="$1"
|
||||
shift
|
||||
if (( $# == 0 )); then
|
||||
echo "omarchy-menu-select: $arg requires a value" >&2
|
||||
exit 1
|
||||
fi
|
||||
menu_maxheight="$1"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
break
|
||||
fi
|
||||
|
||||
@@ -30,9 +52,42 @@ while (( $# > 0 )); do
|
||||
shift
|
||||
done
|
||||
|
||||
if (( ${#options[@]} == 0 )) && [[ ! -t 0 ]]; then
|
||||
mapfile -t options
|
||||
fi
|
||||
|
||||
if (( ${#options[@]} == 0 )); then
|
||||
echo "Usage: omarchy-menu-select <prompt> <option>... [-- walker args...]" >&2
|
||||
echo "Usage: omarchy-menu-select <prompt> [option...] [-- menu args...]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf '%s\n' "${options[@]}" | omarchy-launch-walker --dmenu --width 295 --minheight 1 --maxheight 300 -p "$prompt…" "${walker_args[@]}" 2>/dev/null
|
||||
selection_file=$(mktemp)
|
||||
done_file=$(mktemp)
|
||||
rm -f "$done_file"
|
||||
trap 'rm -f "$selection_file" "$done_file"' EXIT
|
||||
|
||||
options_json=$(perl -MEncode=decode -MJSON::PP=encode_json -e 'print encode_json([map { decode("UTF-8", $_) } @ARGV])' "${options[@]}")
|
||||
payload=$(perl -MEncode=decode -MJSON::PP=encode_json,decode_json -e '
|
||||
my $payload = {
|
||||
mode => "select",
|
||||
prompt => decode("UTF-8", $ARGV[0]),
|
||||
options => decode_json($ARGV[1]),
|
||||
selectionFile => decode("UTF-8", $ARGV[2]),
|
||||
doneFile => decode("UTF-8", $ARGV[3])
|
||||
};
|
||||
$payload->{width} = int($ARGV[4]) if length($ARGV[4] // "");
|
||||
$payload->{maxHeight} = int($ARGV[5]) if length($ARGV[5] // "");
|
||||
print encode_json($payload)
|
||||
' "$prompt" "$options_json" "$selection_file" "$done_file" "$menu_width" "$menu_maxheight")
|
||||
|
||||
omarchy-shell shell summon omarchy.menu "$payload" >/dev/null
|
||||
|
||||
while [[ ! -e $done_file ]]; do
|
||||
sleep 0.05
|
||||
done
|
||||
|
||||
if [[ -s $selection_file ]]; then
|
||||
cat "$selection_file"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Display Tmux keybindings defined in your configuration using walker for an interactive search menu.
|
||||
# omarchy:summary=Display Tmux keybindings defined in your configuration using an interactive search menu.
|
||||
# omarchy:args=[--print|-p] [--config <path>]
|
||||
|
||||
print_only=false
|
||||
@@ -233,11 +233,6 @@ 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
|
||||
@@ -245,4 +240,4 @@ if [[ ! $monitor_height =~ ^[0-9]+$ ]] || ((monitor_height <= 0)); then
|
||||
fi
|
||||
|
||||
menu_height=$((monitor_height * 40 / 100))
|
||||
printf '%s\n' "$records" | walker --dmenu -p 'Tmux keybindings' --width 800 --height "$menu_height" >/dev/null
|
||||
printf '%s\n' "$records" | omarchy-menu-select 'Tmux keybindings' -- --width 800 --height "$menu_height" >/dev/null || true
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Overwrite the user configs for the Walker application launcher (which also powers the Omarchy Menu) and restart the services.
|
||||
|
||||
mkdir -p ~/.config/autostart/
|
||||
cp $OMARCHY_PATH/default/walker/walker.desktop ~/.config/autostart/
|
||||
|
||||
# And restarts if it crashes or is killed
|
||||
mkdir -p ~/.config/systemd/user/app-walker@autostart.service.d/
|
||||
cp $OMARCHY_PATH/default/walker/restart.conf ~/.config/systemd/user/app-walker@autostart.service.d/restart.conf
|
||||
|
||||
systemctl --user daemon-reload
|
||||
|
||||
# Refresh configs
|
||||
omarchy-refresh-config walker/config.toml
|
||||
omarchy-refresh-config elephant/calc.toml
|
||||
omarchy-refresh-config elephant/desktopapplications.toml
|
||||
|
||||
# Link all elephant menus
|
||||
mkdir -p ~/.config/elephant/menus
|
||||
for menu in $OMARCHY_PATH/default/elephant/*.lua; do
|
||||
ln -snf "$menu" ~/.config/elephant/menus/"$(basename "$menu")"
|
||||
done
|
||||
|
||||
# Restart service
|
||||
omarchy-restart-walker
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Restart Walker and related user services
|
||||
|
||||
restart_services() {
|
||||
if systemctl --user is-enabled elephant.service &>/dev/null; then
|
||||
systemctl --user restart elephant.service
|
||||
fi
|
||||
|
||||
if systemctl --user is-enabled app-walker@autostart.service &>/dev/null; then
|
||||
systemctl --user restart app-walker@autostart.service
|
||||
else
|
||||
echo -e "\e[31mUnable to restart Walker -- RESTART MANUALLY\e[0m"
|
||||
fi
|
||||
}
|
||||
|
||||
if (( EUID == 0 )); then
|
||||
SCRIPT_OWNER=$(stat -c '%U' "$0")
|
||||
USER_UID=$(id -u "$SCRIPT_OWNER")
|
||||
systemd-run --uid="$SCRIPT_OWNER" --setenv=XDG_RUNTIME_DIR="/run/user/$USER_UID" \
|
||||
bash -c "$(declare -f restart_services); restart_services"
|
||||
else
|
||||
restart_services
|
||||
fi
|
||||
+3
-3
@@ -74,9 +74,9 @@ perl -MCwd=abs_path -MEncode=encode,decode -MSocket -MIO::Handle \
|
||||
|
||||
my $shell_qml_arg = shift @ARGV;
|
||||
my $shell_qml = abs_path($shell_qml_arg);
|
||||
my $target = shift @ARGV;
|
||||
my $function = shift @ARGV;
|
||||
my @args = @ARGV;
|
||||
my $target = decode("UTF-8", shift @ARGV);
|
||||
my $function = decode("UTF-8", shift @ARGV);
|
||||
my @args = map { decode("UTF-8", $_) } @ARGV;
|
||||
my $runtime_dir = $ENV{"XDG_RUNTIME_DIR"} || "/run/user/$<";
|
||||
my $payload = chr(3) . qstring($target) . qstring($function) . pack("N", scalar @args) . join("", map { qstring($_) } @args);
|
||||
my @candidates;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Set Hyprland and Walker corners to sharp or round (the shell mirrors Hyprland)
|
||||
# omarchy:summary=Set Hyprland corners to sharp or round (the shell mirrors Hyprland)
|
||||
# omarchy:args=<sharp|round>
|
||||
# omarchy:examples=omarchy style corners round | omarchy style corners sharp
|
||||
|
||||
@@ -10,11 +10,9 @@ if [[ $1 != "sharp" && $1 != "round" ]]; then
|
||||
fi
|
||||
|
||||
# The shell tracks Hyprland's `decoration:rounding` directly via
|
||||
# Quickshell's qs.Commons.Style singleton; no separate quickshell-corners
|
||||
# state file is written. The old omarchy-style-corners-quickshell shim is
|
||||
# kept as a no-op so external callers don't error.
|
||||
# Quickshell's qs.Commons.Style singleton; no separate shell state file is
|
||||
# written.
|
||||
omarchy-style-corners-hyprland "$1"
|
||||
omarchy-style-corners-walker "$1"
|
||||
|
||||
case $1 in
|
||||
sharp) omarchy-notification-send "Sharp corners enabled" -g ;;
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
# omarchy:args=[toggle|sharp|round]
|
||||
# omarchy:examples=omarchy style corners quickshell toggle | omarchy style corners quickshell round | omarchy style corners quickshell sharp
|
||||
|
||||
# qs.Commons.Style reads decoration:rounding from hyprctl and watches the
|
||||
# theme name + rounded-corners toggle files for changes. There is no
|
||||
# separate quickshell-menu.json to write anymore. This shim stays around
|
||||
# so anyone still calling the old subcommand (or the dispatcher in
|
||||
# omarchy-style-corners) doesn't error out.
|
||||
# qs.Commons.Style reads decoration:rounding from hyprctl. Theme changes
|
||||
# refresh it through shell IPC, while user corner toggles still trigger their
|
||||
# own refresh. There is no separate quickshell-menu.json to write anymore.
|
||||
# This shim stays around so anyone still calling the old subcommand (or the
|
||||
# dispatcher in omarchy-style-corners) doesn't error out.
|
||||
|
||||
case "${1:-toggle}" in
|
||||
round|sharp|toggle) exit 0 ;;
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Set or toggle rounded Walker corners
|
||||
# omarchy:args=[toggle|sharp|round]
|
||||
# omarchy:examples=omarchy style corners walker toggle | omarchy style corners walker round | omarchy style corners walker sharp
|
||||
|
||||
TOGGLES_CSS="$HOME/.local/state/omarchy/toggles/walker.css"
|
||||
|
||||
set_radius() {
|
||||
local radius="$1"
|
||||
|
||||
mkdir -p "$(dirname "$TOGGLES_CSS")"
|
||||
printf '.box-wrapper { border-radius: %spx; }\n' "$radius" >"$TOGGLES_CSS"
|
||||
}
|
||||
|
||||
case "${1:-toggle}" in
|
||||
round) set_radius 6 ;;
|
||||
sharp) set_radius 0 ;;
|
||||
toggle)
|
||||
if [[ -f $TOGGLES_CSS ]] && grep -q 'border-radius: 6px;' "$TOGGLES_CSS"; then
|
||||
set_radius 0
|
||||
else
|
||||
set_radius 6
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Usage: omarchy-style-corners-walker [toggle|sharp|round]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
omarchy-restart-walker
|
||||
@@ -122,10 +122,6 @@ fi
|
||||
exec 9>"$THEME_SET_LOCK"
|
||||
flock 9
|
||||
|
||||
# Prevent file-watch reloads from changing shell colors before the background
|
||||
# reveal is ready. The theme IPC below resumes reloads as it applies colors.
|
||||
shell_ipc shell suspendThemeReloads || true
|
||||
|
||||
# Setup clean next theme directory (for atomic theme config swapping)
|
||||
rm -rf "$NEXT_THEME_PATH"
|
||||
mkdir -p "$NEXT_THEME_PATH"
|
||||
@@ -154,8 +150,8 @@ mv "$NEXT_THEME_PATH" "$CURRENT_THEME_PATH"
|
||||
# Store theme name for reference
|
||||
echo "$THEME_NAME" >"$HOME/.config/omarchy/current/theme.name"
|
||||
|
||||
# Make the running shell pick up the new palette immediately instead of waiting
|
||||
# for file-watch debounce while the rest of the theme hooks run.
|
||||
# Make the running shell pick up the new palette immediately while the rest of
|
||||
# the theme hooks run.
|
||||
colors_payload=$([[ -f $CURRENT_THEME_PATH/colors.toml ]] && base64 -w 0 "$CURRENT_THEME_PATH/colors.toml")
|
||||
shell_payload=$([[ -f $CURRENT_THEME_PATH/shell.toml ]] && base64 -w 0 "$CURRENT_THEME_PATH/shell.toml")
|
||||
if [[ $OMARCHY_THEME_SKIP_BACKGROUND == "1" ]]; then
|
||||
|
||||
@@ -13,7 +13,7 @@ usage() {
|
||||
Usage:
|
||||
omarchy transcode [--path path] [input] [format] [resolution]
|
||||
|
||||
With no input, pick a picture or video with Walker from ~/Pictures and ~/Videos,
|
||||
With no input, pick a picture or video from ~/Pictures and ~/Videos,
|
||||
or only from --path when provided. Then pick the output format and resolution.
|
||||
|
||||
Options:
|
||||
|
||||
@@ -45,4 +45,6 @@ for APP_NAME in "${APP_NAMES[@]}"; do
|
||||
echo "Removed $APP_NAME"
|
||||
done
|
||||
|
||||
omarchy-restart-walker
|
||||
if command -v update-desktop-database &>/dev/null; then
|
||||
update-desktop-database "$DESKTOP_DIR" &>/dev/null || true
|
||||
fi
|
||||
|
||||
@@ -32,6 +32,4 @@ if command -v update-desktop-database &>/dev/null; then
|
||||
update-desktop-database "$APP_DIR" &>/dev/null || true
|
||||
fi
|
||||
|
||||
omarchy-restart-walker
|
||||
|
||||
echo "Web apps removed successfully."
|
||||
|
||||
Reference in New Issue
Block a user