Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/omarchy-tailscale-receive
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ announce() {
local path="$1"
local name="${path##*/}"
# Untrusted received files should not be decoded automatically for a preview.
local args=("$(omarchy-i18n tailscale.received "$name")" "$(omarchy-i18n tailscale.savedTo "${dir/#$HOME/~}")" -u critical -g 󰒊)
local args=("$(omarchy-i18n tailscale.received "$name")" "$(omarchy-i18n tailscale.savedTo "${dir/#"$HOME"/"~"}")" -u critical -g 󰒊)
Comment thread
manuaudio marked this conversation as resolved.
Resolved

# Announcing is best-effort: the file is already delivered, and under `set -e`
# a notification outage would otherwise kill the long-running receiver.
Expand Down
10 changes: 10 additions & 0 deletions test/shell.d/tailscale-receive-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,13 @@ printf 'png' >"$WORKDIR/outbox/Translated Image.png"
receive 1 env OMARCHY_LANGUAGE_FILE="$WORKDIR/language"
assert_notification "$downloads/Translated Image.png" "Modtaget Translated Image.png" "Gemt til $downloads"
pass "taildrop receive preserves localized glyph notifications"

# A downloads directory under home is shown the way people know it, as ~/...
# The home path carries glob characters so it must be matched as a literal prefix.
home="$WORKDIR/home[1]"
downloads="$home/Downloads"
mkdir -p "$downloads"
printf 'pdf' >"$WORKDIR/outbox/report.pdf"
receive 1 env HOME="$home"
assert_notification "$downloads/report.pdf" "Received report.pdf" "Saved to ~/Downloads"
pass "taildrop receive shortens a downloads directory under home to ~"
Loading