From 1f8d1ee19492a7a40ddfcaed4f198ef9cf2a0c76 Mon Sep 17 00:00:00 2001 From: aloslider <53711835+aloslider@users.noreply.github.com> Date: Sun, 19 Jul 2026 23:35:16 +0300 Subject: [PATCH] [mime|yazi] Revert setting yazi as default FM --- dot_config/mimeapps.list | 2 +- .../xdg-desktop-portal-termfilechooser/config | 5 --- .../executable_yazi-wrapper.sh | 37 ------------------- .../xdg-desktop-portal/portals.conf.tmpl | 7 ---- 4 files changed, 1 insertion(+), 50 deletions(-) delete mode 100644 dot_config/xdg-desktop-portal-termfilechooser/config delete mode 100644 dot_config/xdg-desktop-portal-termfilechooser/executable_yazi-wrapper.sh delete mode 100644 dot_config/xdg-desktop-portal/portals.conf.tmpl diff --git a/dot_config/mimeapps.list b/dot_config/mimeapps.list index ba59894..1c70348 100644 --- a/dot_config/mimeapps.list +++ b/dot_config/mimeapps.list @@ -60,7 +60,7 @@ image/bmp=gthumb.desktop; image/tiff=gthumb.desktop; image/svg+xml=gthumb.desktop; image/*=gthumb.desktop; -inode/directory=yazi.desktop +inode/directory=org.kde.dolphin.desktop; text/html=librewolf.desktop; text/markdown=vim.desktop; text/plain=vim.desktop; diff --git a/dot_config/xdg-desktop-portal-termfilechooser/config b/dot_config/xdg-desktop-portal-termfilechooser/config deleted file mode 100644 index 17b2738..0000000 --- a/dot_config/xdg-desktop-portal-termfilechooser/config +++ /dev/null @@ -1,5 +0,0 @@ -[filechooser] -cmd=$HOME/.config/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh -default_dir=$HOME -open_mode=suggested -save_mode=last diff --git a/dot_config/xdg-desktop-portal-termfilechooser/executable_yazi-wrapper.sh b/dot_config/xdg-desktop-portal-termfilechooser/executable_yazi-wrapper.sh deleted file mode 100644 index dd7cd8f..0000000 --- a/dot_config/xdg-desktop-portal-termfilechooser/executable_yazi-wrapper.sh +++ /dev/null @@ -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 diff --git a/dot_config/xdg-desktop-portal/portals.conf.tmpl b/dot_config/xdg-desktop-portal/portals.conf.tmpl deleted file mode 100644 index d73e78e..0000000 --- a/dot_config/xdg-desktop-portal/portals.conf.tmpl +++ /dev/null @@ -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 }}