files.nix (3431B)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | ## File Manager { util ? null, files ? null, inputs ? null, ... }: { nixos = {pkgs, ...}: { services.dbus.packages = [pkgs.nemo-with-extensions]; environment.systemPackages = with pkgs; [ nemo-with-extensions cinnamon-desktop bulky file-roller lxqt.pcmanfm-qt ]; }; home = { config, pkgs, ... }: let inherit (pkgs.lib) getExe getExe' replaceStrings; inherit (inputs.home-manager.lib) hm; terminal = "kitty"; in { xdg.mimeApps.defaultApplications = util.build.mime { archive = ["org.gnome.FileRoller.desktop"]; directory = ["nemo.desktop"]; }; # Settings dconf.settings = { "org/gtk/gtk4/settings/file-chooser".sort-directories-first = true; "org/nemo/search".search-reverse-sort = false; "org/nemo/desktop".show-desktop-icons = false; "org/nemo/plugins".disabled-actions = ["change-background.nemo_action"]; "org/nemo/icon-view".captions = [ "size" "type" "date_modified" ]; "org/nemo/preferences" = { click-policy = "double"; date-format = "informal"; inherit-folder-viewer = true; quick-renames-with-pause-in-between = true; show-advanced-permissions = true; show-new-folder-icon-toolbar = false; show-show-thumbnails-toolbar = true; tooltips-in-icon-view = true; tooltips-in-list-view = false; tooltips-show-access-date = true; tooltips-show-birth-date = true; tooltips-show-file-type = true; tooltips-show-mod-date = true; }; "org/nemo/preferences/menu-config" = { background-menu-open-in-terminal = false; selection-menu-open-in-terminal = false; }; }; home = { persist.directories = [ ".config/nemo" ".local/share/nemo" ".config/pcmanfm-qt" ]; # Bulk Renamer activation.nemo-rename = hm.dag.entryAfter ["writeBoundary"] '' if [[ -v DBUS_SESSION_BUS_ADDRESS ]] then export DCONF_DBUS_RUN_SESSION="" else export DCONF_DBUS_RUN_SESSION="${getExe' pkgs.dbus "dbus-run-session"} --dbus-daemon=${getExe' pkgs.dbus "dbus-daemon"}" fi run $DCONF_DBUS_RUN_SESSION ${getExe pkgs.dconf} write /org/nemo/preferences/bulk-rename-tool "b'bulky'" unset DCONF_DBUS_RUN_SESSION ''; file = { # Open in Terminal ".local/share/nemo/actions/terminal.nemo_action".text = '' [Nemo Action] Name=Open in Terminal Comment=Opens ${terminal} in the selected folder Exec=${terminal} --working-directory=%F Icon-Name=${terminal} Selection=any Extensions=dir; EscapeSpaces=true ''; # Desktop Icons ".config/pcmanfm-qt/default/settings.conf".text = replaceStrings [ "@icon" "@font" "@terminal" "@wallpaper" "@archiver" ] [ ( if config.stylix.icons.dark != null then config.stylix.icons.dark else "default" ) config.stylix.fonts.sansSerif.name terminal (toString files.images.transparent) "file-roller" ] files.pcmanfm; }; }; }; } |