Switch default editor to tensaku so we can move things

This commit is contained in:
Ryan Hughes
2026-06-12 22:27:20 -04:00
parent c582e7133a
commit 4bfa5a6949
7 changed files with 37 additions and 33 deletions
+2 -10
View File
@@ -16,7 +16,7 @@ fi
pkill slurp && exit 0 pkill slurp && exit 0
SCREENSHOT_EDITOR="${OMARCHY_SCREENSHOT_EDITOR:-satty}" SCREENSHOT_EDITOR="${OMARCHY_SCREENSHOT_EDITOR:-tensaku-edit}"
# Parse --editor flag from any position # Parse --editor flag from any position
ARGS=() ARGS=()
@@ -31,15 +31,7 @@ set -- "${ARGS[@]}"
open_editor() { open_editor() {
local filepath="$1" local filepath="$1"
if [[ $SCREENSHOT_EDITOR == "satty" ]]; then "$SCREENSHOT_EDITOR" "$filepath"
satty --filename "$filepath" \
--output-filename "$filepath" \
--actions-on-enter save-to-clipboard \
--save-after-copy \
--copy-command 'wl-copy --type image/png'
else
$SCREENSHOT_EDITOR "$filepath"
fi
} }
MODE="${1:-smart}" MODE="${1:-smart}"
+1 -1
View File
@@ -29,7 +29,7 @@ open_image() {
local path="$1" local path="$1"
[[ -r $path ]] || exit 1 [[ -r $path ]] || exit 1
exec satty --filename "$path" --output-filename "$path" exec tensaku-edit "$path"
} }
open_text() { open_text() {
+2 -2
View File
@@ -12,5 +12,5 @@
# Rotate the currently open image by 90 degrees # Rotate the currently open image by 90 degrees
<Ctrl+r> = exec mogrify -rotate 90 "$imv_current_file" <Ctrl+r> = exec mogrify -rotate 90 "$imv_current_file"
# Edit the current image in Satty and quit the viewer # Edit the current image in Tensaku and quit the viewer
<Ctrl+e> = exec satty --filename "$imv_current_file" & ; quit <Ctrl+e> = exec tensaku-edit "$imv_current_file" & ; quit
+21 -13
View File
@@ -3,16 +3,18 @@ o.window({ tag = "floating-window" }, { float = true })
o.window({ tag = "floating-window" }, { center = true }) o.window({ tag = "floating-window" }, { center = true })
o.window({ tag = "floating-window" }, { size = { 875, 600 } }) o.window({ tag = "floating-window" }, { size = { 875, 600 } })
o.window("(org.omarchy.btop|org.omarchy.terminal|org.omarchy.bash|org.codeberg.dnkl.foot|org.gnome.NautilusPreviewer|org.gnome.Evince|com.gabm.satty|Omarchy|About|TUI.float|imv|mpv)", {
tag = "+floating-window",
})
o.window( o.window(
"(org.omarchy.btop|org.omarchy.terminal|org.omarchy.bash|org.codeberg.dnkl.foot|org.gnome.NautilusPreviewer|org.gnome.Evince|Omarchy|About|TUI.float|imv|mpv)",
{ {
class = "(xdg-desktop-portal-gtk|sublime_text|DesktopEditors|org.gnome.Nautilus)", tag = "+floating-window",
title = "^(Open.*Files?|Open [F|f]older.*|Save.*Files?|Save.*As|Save|All Files|.*wants to [open|save].*|[C|c]hoose.*)", }
},
{ tag = "+floating-window" }
) )
o.window({
class = "(xdg-desktop-portal-gtk|sublime_text|DesktopEditors|org.gnome.Nautilus)",
title = "^(Open.*Files?|Open [F|f]older.*|Save.*Files?|Save.*As|Save|All Files|.*wants to [open|save].*|[C|c]hoose.*)",
}, { tag = "+floating-window" })
o.window("dev.tensaku.Tensaku", { float = true })
o.window("dev.tensaku.Tensaku", { center = true })
o.window("org.gnome.Calculator", { float = true }) o.window("org.gnome.Calculator", { float = true })
-- Fullscreen screensaver. -- Fullscreen screensaver.
@@ -21,12 +23,18 @@ o.window("org.omarchy.screensaver", { float = true })
o.window("org.omarchy.screensaver", { animation = "slide" }) o.window("org.omarchy.screensaver", { animation = "slide" })
-- No transparency on media windows. -- No transparency on media windows.
o.window("^(zoom|vlc|mpv|org.kde.kdenlive|com.obsproject.Studio|com.github.PintaProject.Pinta|imv|org.gnome.NautilusPreviewer)$", { o.window(
tag = "-default-opacity", "^(zoom|vlc|mpv|org.kde.kdenlive|com.obsproject.Studio|com.github.PintaProject.Pinta|imv|org.gnome.NautilusPreviewer)$",
}) {
o.window("^(zoom|vlc|mpv|org.kde.kdenlive|com.obsproject.Studio|com.github.PintaProject.Pinta|imv|org.gnome.NautilusPreviewer)$", { tag = "-default-opacity",
opacity = "1 1", }
}) )
o.window(
"^(zoom|vlc|mpv|org.kde.kdenlive|com.obsproject.Studio|com.github.PintaProject.Pinta|imv|org.gnome.NautilusPreviewer)$",
{
opacity = "1 1",
}
)
-- Popped window rounding. -- Popped window rounding.
o.window({ tag = "pop" }, { rounding = 8 }) o.window({ tag = "pop" }, { rounding = 8 })
+1 -1
View File
@@ -109,7 +109,7 @@ quickshell
ripgrep ripgrep
ruby ruby
rust rust
satty tensaku
sddm sddm
slurp slurp
socat socat
+4
View File
@@ -0,0 +1,4 @@
echo "Replace Satty with Tensaku"
omarchy-pkg-add tensaku
omarchy-pkg-drop satty
+6 -6
View File
@@ -160,12 +160,12 @@ printf '%s\n' "$1" >"$EDITOR_PATH_OUT"
cat "$1" >"$EDITOR_TEXT_OUT" cat "$1" >"$EDITOR_TEXT_OUT"
SH SH
cat >"$TMPDIR/bin/satty" <<'SH' cat >"$TMPDIR/bin/tensaku-edit" <<'SH'
#!/bin/bash #!/bin/bash
printf '%s\n' "$*" >"$SATTY_OUT" printf '%s\n' "$*" >"$TENSAKU_OUT"
SH SH
chmod +x "$TMPDIR/bin/wl-copy" "$TMPDIR/bin/wl-paste" "$TMPDIR/bin/wtype" "$TMPDIR/bin/omarchy-launch-browser" "$TMPDIR/bin/omarchy-launch-editor" "$TMPDIR/bin/satty" chmod +x "$TMPDIR/bin/wl-copy" "$TMPDIR/bin/wl-paste" "$TMPDIR/bin/wtype" "$TMPDIR/bin/omarchy-launch-browser" "$TMPDIR/bin/omarchy-launch-editor" "$TMPDIR/bin/tensaku-edit"
capture_output=$(XDG_RUNTIME_DIR="$TMPDIR" PATH="$TMPDIR/bin:$PATH" "$ROOT/shell/plugins/clipboard/capture.sh") capture_output=$(XDG_RUNTIME_DIR="$TMPDIR" PATH="$TMPDIR/bin:$PATH" "$ROOT/shell/plugins/clipboard/capture.sh")
[[ $capture_output == '{"type":"text","text":"terminal copy"}' ]] || fail "clipboard capture records normal text events" [[ $capture_output == '{"type":"text","text":"terminal copy"}' ]] || fail "clipboard capture records normal text events"
@@ -237,8 +237,8 @@ pass "clipboard open helper opens text entries in editor"
[[ $(<"$TMPDIR/editor-path") == "$TMPDIR"/state/omarchy/clipboard-open/clipboard.*.txt ]] || fail "clipboard open helper writes text entries to a temporary file" [[ $(<"$TMPDIR/editor-path") == "$TMPDIR"/state/omarchy/clipboard-open/clipboard.*.txt ]] || fail "clipboard open helper writes text entries to a temporary file"
pass "clipboard open helper writes text entries to a temporary file" pass "clipboard open helper writes text entries to a temporary file"
SATTY_OUT="$TMPDIR/satty" HOME="$TMPDIR/home" PATH="$TMPDIR/bin:$PATH" \ TENSAKU_OUT="$TMPDIR/tensaku" HOME="$TMPDIR/home" PATH="$TMPDIR/bin:$PATH" \
"$ROOT/bin/omarchy-clipboard-open" --history-index 2 "$ROOT/bin/omarchy-clipboard-open" --history-index 2
[[ $(<"$TMPDIR/satty") == "--filename $TMPDIR/image.png --output-filename $TMPDIR/image.png" ]] || fail "clipboard open helper opens image entries in satty" [[ $(<"$TMPDIR/tensaku") == "$TMPDIR/image.png" ]] || fail "clipboard open helper opens image entries in Tensaku"
pass "clipboard open helper opens image entries in satty" pass "clipboard open helper opens image entries in Tensaku"