From a79342962259719778e188ee0052334b05d31644 Mon Sep 17 00:00:00 2001 From: kenji Date: Sun, 11 Jan 2026 11:18:50 -0600 Subject: [PATCH] revert: remove yazi image saving feature and portal changes --- apps/firefox/default.nix | 3 -- apps/hyprland/hypr/rules.nix | 8 ----- apps/yazi/default.nix | 69 +----------------------------------- modules/nixos/hyprland.nix | 13 +------ 4 files changed, 2 insertions(+), 91 deletions(-) diff --git a/apps/firefox/default.nix b/apps/firefox/default.nix index e103f4a..e3b12ee 100644 --- a/apps/firefox/default.nix +++ b/apps/firefox/default.nix @@ -43,9 +43,6 @@ bind K tabprev unbind - " Hint images and save using Yazi picker - bind ;y hint -i -c native yazi-img-save - " Force Tridactyl to yield new tab control to Firefox/Extensions set newtab about:newtab ''; diff --git a/apps/hyprland/hypr/rules.nix b/apps/hyprland/hypr/rules.nix index 26e070a..b02cc05 100644 --- a/apps/hyprland/hypr/rules.nix +++ b/apps/hyprland/hypr/rules.nix @@ -4,14 +4,6 @@ ]; windowrulev2 = [ - "suppressevent maximize, class:.*" - - # --- YAZI FILE PICKER --- - "float, class:^(yazi-picker)$" - "center, class:^(yazi-picker)$" - "size 60% 60%, class:^(yazi-picker)$" - "dimaround, class:^(yazi-picker)$" - ]; }; } diff --git a/apps/yazi/default.nix b/apps/yazi/default.nix index 2b5cbde..5d8dd48 100644 --- a/apps/yazi/default.nix +++ b/apps/yazi/default.nix @@ -1,67 +1,4 @@ -{ - pkgs, - config, - ... -}: let - yazi-img-save = pkgs.writeShellScriptBin "yazi-img-save" '' - echo "--- $(date) ---" >> /tmp/yazi-save.log - echo "Args: $@" >> /tmp/yazi-save.log - - url="$1" - if [ -z "$url" ]; then - ${pkgs.libnotify}/bin/notify-send "Yazi Save" "No URL provided" - echo "Error: No URL provided" >> /tmp/yazi-save.log - exit 1 - fi - - # Create a temp file to store the chosen directory - out=$(mktemp) - - echo "Launching ghostty..." >> /tmp/yazi-save.log - ${pkgs.ghostty}/bin/ghostty --class="yazi-picker" --title="Pick Save Folder" -e ${pkgs.yazi}/bin/yazi . --chooser-file="$out" - - if [ -f "$out" ]; then - selected=$(cat "$out") - rm "$out" - - echo "Selected: $selected" >> /tmp/yazi-save.log - - if [ -n "$selected" ]; then - # If selected is a file, get its directory. - if [ -f "$selected" ]; then - target_dir=$(dirname "$selected") - elif [ -d "$selected" ]; then - target_dir="$selected" - else - # fallback - target_dir="$HOME/Downloads" - fi - - echo "Target Dir: $target_dir" >> /tmp/yazi-save.log - - ${pkgs.libnotify}/bin/notify-send "Downloading..." "$url" - - # Download - cd "$target_dir" - echo "Downloading with wget..." >> /tmp/yazi-save.log - ${pkgs.wget}/bin/wget --content-disposition --no-clobber "$url" - ret=$? - - if [ $ret -eq 0 ]; then - ${pkgs.libnotify}/bin/notify-send "Download Complete" "Saved to $target_dir" - echo "Download success" >> /tmp/yazi-save.log - else - ${pkgs.libnotify}/bin/notify-send -u critical "Download Failed" "wget exit code: $ret" - echo "Download failed: $ret" >> /tmp/yazi-save.log - fi - else - echo "No selection made" >> /tmp/yazi-save.log - fi - else - echo "No output file" >> /tmp/yazi-save.log - fi - ''; -in { +{pkgs, ...}: { programs.yazi = { enable = true; enableFishIntegration = true; @@ -74,8 +11,4 @@ in { }; }; }; - - home.packages = [ - yazi-img-save - ]; } diff --git a/modules/nixos/hyprland.nix b/modules/nixos/hyprland.nix index 4fd0578..f19a764 100644 --- a/modules/nixos/hyprland.nix +++ b/modules/nixos/hyprland.nix @@ -24,15 +24,4 @@ default = ["${myConfig.terminal.default}"]; }; }; - - xdg.portal = { - enable = true; - extraPortals = [ - pkgs.xdg-desktop-portal-hyprland - ]; - config.common = { - default = ["hyprland"]; - }; - }; - } - \ No newline at end of file +} \ No newline at end of file