Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.
C# audio-converteravaloniabatch-conversionconvertercsharpdocument-converterdocx-to-pdfdotnetdrag-and-dropfile-conversionfile-converterheic-converterhwphwpximage-converterlinuxmacospdf-convertervideo-converterwindows
Keep the GNOME extension up to date on install and upgrade
KnifeLemonfcc9af3ceff3
diff --git a/docs/GNOME-WAYLAND.md b/docs/GNOME-WAYLAND.mdindex db4fcdf7..61f961a4 100644--- a/docs/GNOME-WAYLAND.md+++ b/docs/GNOME-WAYLAND.md@@ -14,11 +14,11 @@ Install Filee normally:./install.sh```-Then:+On a GNOME session, `install.sh` puts the extension in `~/.local/share/gnome-shell/extensions/[email protected]` and asks GNOME to enable it. Then:1. Open the **Extensions** application.2. Enable **Filee donut at the cursor**.-3. Log out and back in if the extension does not appear or was recently updated.+3. Log out and back in if the extension does not appear.4. Start Filee and make sure gesture detection is enabled under **Triggers**.Do not run Filee with `sudo`.@@ -38,15 +38,22 @@ Pausing Filee, disabling the gesture or extension, excluding the application, orCustom modifiers and excluded applications continue to work through Filee's existing gesture settings.+## Updates++Updating Filee, in the app or with `./install.sh --upgrade`, also updates the extension when Filee installed it. GNOME Shell keeps running the version it loaded at login, so log out and back in after an update. If the running extension and Filee don't match, the **Triggers** page says so.++`install.sh` replaces only an extension folder that Filee installed. If the folder came from somewhere else, a first install stops and an upgrade leaves it as it is. `uninstall.sh` removes the extension when Filee installed it.+## Limitations- GNOME integration is currently experimental.- GNOME Shell 45–50 are declared as supported, but not every version has been tested.-- The integration provides pointer and modifier state, not a native Wayland backend for Avalonia.- Global Tab and mouse-wheel state are not available for switching wheel faces during a drag.-- Multi-monitor setups, fractional scaling and different Wayland/XWayland combinations may require additional testing.+- Global selection shortcuts and hold gestures are not available.+- Filee runs through XWayland by default. With the experimental native Wayland backend (`FILEE_USE_WAYLAND=1`), the extension recognizes the donut by Filee's process; this combination has had less testing.+- Multi-monitor setups and fractional scaling may require additional testing.-The KDE Wayland integration remains separate.+KDE Plasma and Hyprland use a different setup; see `INSTALL.txt`.## Troubleshooting@@ -68,13 +75,13 @@ gnome-extensions info [email protected]To check the communication socket:```sh-ls -l "$XDG_RUNTIME_DIR/filee-gnome/pointer-v1.sock"+ls -l "$XDG_RUNTIME_DIR/filee-gnome/pointer.sock"```-When connected successfully, the Filee log contains:+When connected successfully, Filee's log (`~/.config/Filee/logs/`) contains:```textGNOME pointer extension connected```-If the extension is active but an older version is still loaded, log out and back in to reload GNOME Shell.\ No newline at end of file+If the **Triggers** page says the extension belongs to another version of Filee, log out and back in so GNOME Shell loads the installed extension. If the message stays, reinstall Filee.diff --git a/installer/linux/INSTALL.txt b/installer/linux/INSTALL.txtindex ff3c6f0f..a916cfd6 100644--- a/installer/linux/INSTALL.txt+++ b/installer/linux/INSTALL.txt@@ -54,6 +54,10 @@ per opening; Filee respects its configured gestures, Pause and excluded apps.It does not collect typed keys. Global selection/hold gestures and Tab/wheelflipping during a drag are not supplied by this integration. Disabling theextension stops detection; FILEE_WAYLAND_GESTURES=0 opts out on GNOME too.+Updating Filee (in the app or with --upgrade) also updates the extension if+Filee installed it; sign out and sign in afterwards so GNOME Shell loads it.+The Triggers page says when the running extension doesn't match Filee.+install.sh only replaces an extension folder that Filee installed.Read GNOME-WAYLAND.md in the package (docs/GNOME-WAYLAND.md in the source) forsetup, limits and troubleshooting.diff --git a/installer/linux/install.sh b/installer/linux/install.shindex b678fe53..890bbdb9 100755--- a/installer/linux/install.sh+++ b/installer/linux/install.sh@@ -30,13 +30,70 @@ install_dir="$data_dir/filee/application"bin_dir="$HOME/.local/bin"desktop_file="$data_dir/applications/com.filee.app.desktop"gnome_extension_id="[email protected]"-gnome_extension_source="$source_dir/gnome/$gnome_extension_id"gnome_extension_dir="$data_dir/gnome-shell/extensions/$gnome_extension_id"is_gnome=falseif printf '%s' "${XDG_CURRENT_DESKTOP:-}" | tr ':' '\n' | grep -qi '^GNOME$'; thenis_gnome=truefi+# The GNOME Shell extension folder is ours when it is a real folder whose .filee-package marker says com.filee.app.+gnome_extension_is_ours() {+ [ -d "$gnome_extension_dir" ] && [ ! -L "$gnome_extension_dir" ] \+ && [ -f "$gnome_extension_dir/.filee-package" ] && [ ! -L "$gnome_extension_dir/.filee-package" ] \+ && [ "$(tr -d '\r\n' < "$gnome_extension_dir/.filee-package" 2>/dev/null || true)" = 'com.filee.app' ]+}++# Puts the extension bundled with the installed app in place, replacing only a folder that carries our marker. The+# new copy is staged first, so a failed copy leaves the previous extension as it was.+copy_gnome_extension() {+ work=$(mktemp -d "$data_dir/filee/.gnome-extension.XXXXXX") || return 1+ if ! cp -R "$install_dir/gnome/$gnome_extension_id" "$work/new" \+ || ! printf '%s\n' 'com.filee.app' > "$work/new/.filee-package" \+ || ! mkdir -p "$(dirname -- "$gnome_extension_dir")"; then+ rm -rf "$work"+ return 1+ fi+ if [ -e "$gnome_extension_dir" ] || [ -L "$gnome_extension_dir" ]; then+ if ! gnome_extension_is_ours || ! mv "$gnome_extension_dir" "$work/old"; then+ rm -rf "$work"+ return 1+ fi+ fi+ if ! mv "$work/new" "$gnome_extension_dir"; then+ if [ -d "$work/old" ]; then+ mv "$work/old" "$gnome_extension_dir" || true+ fi+ rm -rf "$work"+ return 1+ fi+ rm -rf "$work"+}++# Asks GNOME Shell to enable the extension. Only a first install does this; an upgrade leaves the user's choice alone.+enable_gnome_extension() {+ command -v gsettings >/dev/null 2>&1 || return 0+ enabled=$(gsettings get org.gnome.shell enabled-extensions 2>/dev/null || true)+ [ -n "$enabled" ] || return 0+ updated=$(python3 - "$enabled" "$gnome_extension_id" <<'PY'+import ast+import sys++try:+ extensions = ast.literal_eval(sys.argv[1].removeprefix("@as "))+except (SyntaxError, ValueError):+ raise SystemExit(0)+if not isinstance(extensions, list) or not all(isinstance(item, str) for item in extensions):+ raise SystemExit(0)+if sys.argv[2] not in extensions:+ extensions.append(sys.argv[2])+print("[" + ", ".join("'" + item.replace("'", "\\'") + "'" for item in extensions) + "]")+PY+ ) || return 0+ if [ -n "$updated" ]; then+ gsettings set org.gnome.shell enabled-extensions "$updated" >/dev/null 2>&1 || true+ fi+}+# Validate required tools and incoming payload files before doing anything.command -v python3 >/dev/null 2>&1 || {printf '%s\n' "Python 3 is required to install Filee." >&2@@ -54,6 +111,13 @@ if [ ! -f "$source_dir/filee-cli" ] || [ ! -x "$source_dir/filee-cli" ]; thenexit 1fi+# A first install on GNOME replaces an extension folder only when it carries our marker.+if [ "$upgrade" -eq 0 ] && [ "$is_gnome" = true ] && [ -d "$source_dir/gnome/$gnome_extension_id" ] \+ && { [ -e "$gnome_extension_dir" ] || [ -L "$gnome_extension_dir" ]; } && ! gnome_extension_is_ours; then+ printf '%s\n' "A GNOME extension that Filee didn't install exists at $gnome_extension_dir. Remove or rename it before installing Filee."+ exit 1+fi+if [ "$upgrade" -eq 0 ]; then# First-time installation: refuse to overwrite an existing installation or files.if [ -e "$install_dir" ] || [ -L "$install_dir" ]; then@@ -68,44 +132,12 @@ if [ "$upgrade" -eq 0 ]; thenprintf '%s\n' "$desktop_file already exists. Remove or rename it before installing Filee."exit 1fi- if [ "$is_gnome" = true ] && [ -d "$gnome_extension_source" ] && { [ -e "$gnome_extension_dir" ] || [ -L "$gnome_extension_dir" ]; }; then- printf '%s\n' "A GNOME extension already exists at $gnome_extension_dir. Remove or rename it before installing Filee."- exit 1- fimkdir -p "$data_dir/filee" "$bin_dir" "$data_dir/applications"cp -R "$source_dir" "$install_dir"printf '%s\n' 'com.filee.app' > "$install_dir/.filee-package"rm -f "$install_dir/.filee-upgrade-token"ln -s "$install_dir/filee-cli" "$bin_dir/filee"- if [ "$is_gnome" = true ] && [ -d "$gnome_extension_source" ]; then- mkdir -p "$(dirname "$gnome_extension_dir")"- cp -R "$install_dir/gnome/$gnome_extension_id" "$gnome_extension_dir"- printf '%s\n' 'com.filee.app' > "$gnome_extension_dir/.filee-package"- if command -v gsettings >/dev/null 2>&1; then- enabled=$(gsettings get org.gnome.shell enabled-extensions 2>/dev/null || true)- if [ -n "$enabled" ]; then- updated=$(python3 - "$enabled" "$gnome_extension_id" <<'PY'-import ast-import sys--try:- extensions = ast.literal_eval(sys.argv[1].removeprefix("@as "))-except (SyntaxError, ValueError):- raise SystemExit(0)-if not isinstance(extensions, list) or not all(isinstance(item, str) for item in extensions):- raise SystemExit(0)-if sys.argv[2] not in extensions:- extensions.append(sys.argv[2])-print("[" + ", ".join("'" + item.replace("'", "\\'") + "'" for item in extensions) + "]")-PY- )- if [ -n "$updated" ]; then- gsettings set org.gnome.shell enabled-extensions "$updated" >/dev/null 2>&1 || true- fi- fi- fi- fielse# Upgrade existing installation: verify it is genuine and safely swap in place.if [ ! -d "$install_dir" ] || [ -L "$install_dir" ]; then@@ -259,6 +291,29 @@ elseln -sf "$install_dir/filee-cli" "$bin_dir/filee"fi+# GNOME Shell extension. A first install puts it in place on GNOME and asks GNOME to enable it. An upgrade refreshes+# a copy that Filee installed, and on GNOME adds a missing one without enabling it (the Triggers page says how).+gnome_extension_note=''+if [ -d "$install_dir/gnome/$gnome_extension_id" ]; then+ if gnome_extension_is_ours; then+ gnome_extension_note=updated+ elif [ "$is_gnome" = true ] && [ ! -e "$gnome_extension_dir" ] && [ ! -L "$gnome_extension_dir" ]; then+ gnome_extension_note=added+ elif [ "$is_gnome" = true ]; then+ printf '%s\n' "Left $gnome_extension_dir as it is: Filee didn't install it." >&2+ fi+ if [ -n "$gnome_extension_note" ]; then+ if copy_gnome_extension; then+ if [ "$upgrade" -eq 0 ] && [ "$is_gnome" = true ]; then+ enable_gnome_extension+ fi+ else+ gnome_extension_note=''+ printf '%s\n' "Could not install the GNOME extension at $gnome_extension_dir." >&2+ fi+ fi+fi+# Update desktop launcher.python3 - "$install_dir" "$desktop_file" <<'PY'import pathlib@@ -292,6 +347,12 @@ elseprintf '%s\n' "Installed Filee at $install_dir" "CLI: $bin_dir/filee (add $bin_dir to PATH if needed)."fi-if [ "$upgrade" -eq 0 ] && [ "$is_gnome" = true ] && [ -d "$gnome_extension_source" ]; then- printf '%s\n' 'GNOME Wayland: enable "Filee donut at the cursor" in Extensions.' 'Sign out and sign in if the extension is not listed yet. Then hold Ctrl and drag a file in Files.' 'No administrator access or input group is required. See GNOME-WAYLAND.md.'+if [ -n "$gnome_extension_note" ] && [ "$upgrade" -eq 0 ] && [ "$is_gnome" = true ]; then+ printf '%s\n' 'GNOME Wayland: enable "Filee donut at the cursor" in Extensions.' \+ 'Sign out and sign in if the extension is not listed yet. Then hold Ctrl and drag a file in Files.' \+ 'No administrator access or input group is required. See GNOME-WAYLAND.md.'+elif [ "$gnome_extension_note" = added ]; then+ printf '%s\n' 'GNOME Wayland: added the "Filee donut at the cursor" extension. Sign out and sign in, then enable it in Extensions.'+elif [ "$gnome_extension_note" = updated ]; then+ printf '%s\n' 'GNOME: updated the "Filee donut at the cursor" extension. Sign out and sign in so GNOME Shell loads it.'fi