[mime|yazi] Revert setting yazi as default FM
This commit is contained in:
1 parent
df5d129f2a
commit
1f8d1ee194
4 files changed
+1
-50
No files matched your search
@@ -60,7 +60,7 @@ image/bmp=gthumb.desktop;
|
|||||||
image/tiff=gthumb.desktop;
|
image/tiff=gthumb.desktop;
|
||||||
image/svg+xml=gthumb.desktop;
|
image/svg+xml=gthumb.desktop;
|
||||||
image/*=gthumb.desktop;
|
image/*=gthumb.desktop;
|
||||||
inode/directory=yazi.desktop
|
inode/directory=org.kde.dolphin.desktop;
|
||||||
text/html=librewolf.desktop;
|
text/html=librewolf.desktop;
|
||||||
text/markdown=vim.desktop;
|
text/markdown=vim.desktop;
|
||||||
text/plain=vim.desktop;
|
text/plain=vim.desktop;
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
[filechooser]
|
|
||||||
cmd=$HOME/.config/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh
|
|
||||||
default_dir=$HOME
|
|
||||||
open_mode=suggested
|
|
||||||
save_mode=last
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
multiple="$1"
|
|
||||||
directory="$2"
|
|
||||||
save="$3"
|
|
||||||
path="$4"
|
|
||||||
out="$5"
|
|
||||||
|
|
||||||
termcmd="kitty --class=filechooser --title=Yazi-FileChooser -e"
|
|
||||||
|
|
||||||
cmd="yazi"
|
|
||||||
|
|
||||||
if [ "$save" = "1" ]; then
|
|
||||||
set -- --chooser-file="$out" "$path"
|
|
||||||
elif [ "$directory" = "1" ]; then
|
|
||||||
set -- --chooser-file="$out" --cwd-file="$out.1" "$path"
|
|
||||||
else
|
|
||||||
set -- --chooser-file="$out" "$path"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Escape and run
|
|
||||||
command="$termcmd $cmd"
|
|
||||||
for arg in "$@"; do
|
|
||||||
escaped=$(printf '%s' "$arg" | sed 's/"/\\"/g')
|
|
||||||
command="$command \"$escaped\""
|
|
||||||
done
|
|
||||||
|
|
||||||
sh -c "$command"
|
|
||||||
|
|
||||||
# Handle directory selection (Yazi writes cwd on quit)
|
|
||||||
if [ "$directory" = "1" ]; then
|
|
||||||
if [ ! -s "$out" ] && [ -s "$out.1" ]; then
|
|
||||||
cat "$out.1" > "$out"
|
|
||||||
fi
|
|
||||||
rm -f "$out.1"
|
|
||||||
fi
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[preferred]
|
|
||||||
default=gtk;niri
|
|
||||||
{{ if .use_yazi_picker }}
|
|
||||||
org.freedesktop.impl.portal.FileChooser=termfilechooser
|
|
||||||
{{ else }}
|
|
||||||
org.freedesktop.impl.portal.FileChooser=gtk
|
|
||||||
{{ end }}
|
|
||||||
Reference in new issue
Block a user