From 03b12e8b6b3c93b403d123cb603278bc814ba3c8 Mon Sep 17 00:00:00 2001 From: Mathias Scheider Date: Fri, 6 Mar 2026 10:05:11 +0100 Subject: [PATCH] integrated mime fix in Makefile --- Makefile | 3 +- .../scripts/fix_dolphin_file_associations.sh | 5 ++ hypr/README.md | 77 ------------------- 3 files changed, 7 insertions(+), 78 deletions(-) create mode 100755 hypr/.config/hypr/scripts/fix_dolphin_file_associations.sh delete mode 100644 hypr/README.md diff --git a/Makefile b/Makefile index 4e99d8b..5772b74 100644 --- a/Makefile +++ b/Makefile @@ -4,4 +4,5 @@ setup: stow --adopt hypr bash hypr/.config/hypr/scripts/ensure-env.sh - bash hypr/.config/hypr/scripts/portal-host-override.sh \ No newline at end of file + bash hypr/.config/hypr/scripts/portal-host-override.sh + bash hypr/.config/hypr/scripts/fix_dolphin_file_associations.sh diff --git a/hypr/.config/hypr/scripts/fix_dolphin_file_associations.sh b/hypr/.config/hypr/scripts/fix_dolphin_file_associations.sh new file mode 100755 index 0000000..d79722f --- /dev/null +++ b/hypr/.config/hypr/scripts/fix_dolphin_file_associations.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +sudo pacman -Sy archlinux-xdg-menu +sudo mv /etc/xdg/menus/arch-applications-menu /etc/xdg/menus/applications.menu +kbuildsycoca6 --noincremental diff --git a/hypr/README.md b/hypr/README.md deleted file mode 100644 index c136bd2..0000000 --- a/hypr/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# Hyprland Dotfiles (Portal + MIME Stabilisierung) - -Diese Konfiguration ist für Nutzung via `stow` ausgelegt und enthält zusätzliche Stabilisierung für Dateizuordnungen (MIME) unter Hyprland. - -## WICHTIG: Primärer Fix für MIME-Probleme - -Wenn Dateizuordnungen in Dolphin verschwinden oder Doppelklicks unzuverlässig sind, ist dies die erste und wichtigste Referenz: - -- https://github.com/n4zz/Fix-Dolphin-File-Associations - -Der dort beschriebene Ansatz ist die primäre Lösung. - -Die lokalen `ensure-mime-defaults`-Skripte in diesen Dotfiles sind nur als Zusatz/Notfall-Fallback gedacht, falls trotz primärem Fix weiterhin nichts zuverlässig funktioniert. - -## Aktiver Stand - -### Portal-Backends - -Die Priorität in `.config/xdg-desktop-portal/portals.conf` ist: - -- `hyprland` (Hyprland-spezifische Portale) -- `gtk` (primär für `OpenURI`, `FileChooser`, `Settings`) -- `kde` (Fallback) - -### Session-Umgebung - -In `.config/hypr/hyprland.conf` werden diese Variablen gesetzt und an systemd/DBus exportiert: - -- `XDG_CURRENT_DESKTOP=Hyprland` -- `XDG_SESSION_DESKTOP=Hyprland` -- `XDG_SESSION_TYPE=wayland` -- `XDG_MENU_PREFIX=plasma-` -- `GTK_USE_PORTAL=1` - -### MIME-Selbstheilung - -Hinweis: Dieser Block ist bewusst nur Fallback und nicht die Hauptlösung. - -Dateien: - -- `.config/hypr/scripts/ensure-mime-defaults.sh` -- `.config/systemd/user/ensure-mime-defaults.service` -- `.config/systemd/user/ensure-mime-defaults.path` - -Verhalten: - -- setzt bevorzugte MIME-Defaults beim Login -- setzt sie erneut, wenn `~/.config/mimeapps.list` oder `~/.local/share/applications/mimeapps.list` geändert werden - -## Deployment / Reload - -Nach Änderungen an den Dotfiles: - -1. `stow hypr` (falls Symlinks noch nicht gesetzt sind) -2. `hyprctl reload` -3. `systemctl --user daemon-reload` -4. `systemctl --user restart xdg-desktop-portal.service xdg-desktop-portal-hyprland.service xdg-desktop-portal-gtk.service plasma-xdg-desktop-portal-kde.service` -5. `systemctl --user restart ensure-mime-defaults.service` - -## Verifikation - -- `xdg-mime query default image/jpeg` -- `xdg-mime query default application/pdf` -- `systemctl --user status ensure-mime-defaults.path ensure-mime-defaults.service` -- `systemctl --user status xdg-desktop-portal.service xdg-desktop-portal-hyprland.service xdg-desktop-portal-gtk.service plasma-xdg-desktop-portal-kde.service` - -## Paketvoraussetzungen - -Mindestens empfohlen: - -- `xdg-desktop-portal` -- `xdg-desktop-portal-hyprland` -- `xdg-desktop-portal-gtk` - -Optional (Fallback, aktuell genutzt): - -- `xdg-desktop-portal-kde`