Nemo: Difference between revisions
Denperidge (talk | contribs) Added declarative preference configuration |
Denperidge (talk | contribs) m Declarative preference configuration phrasing change |
||
| Line 91: | Line 91: | ||
=== Declarative preference configuration === | === Declarative preference configuration === | ||
Nemo preferences can be configured decoratively.<syntaxhighlight lang="nixos"> | |||
{ | { | ||
programs.dconf.profiles.user.databases = [ | programs.dconf.profiles.user.databases = [ | ||
Revision as of 19:02, 22 March 2026
Nemo is the default file manager for Cinnamon. It is a fork of GNOME's Nautilus.
Installation
Install the nemo-with-extensions or nemo package.
Configuration
Set Nemo as default file browser
Home-Manager
To set Nemo as the default file browser, create a desktop entry and set it as a default application using Home Manager:
xdg.desktopEntries.nemo = {
name = "Nemo";
exec = "${pkgs.nemo-with-extensions}/bin/nemo";
};
xdg.mimeApps = {
enable = true;
defaultApplications = {
"inode/directory" = [ "nemo.desktop" ];
"application/x-gnome-saved-search" = [ "nemo.desktop" ];
};
};
NixOS
On NixOS, you don't need to create a nemo.desktop file. Just add the following to your configuration:
# configuration.nix
{ config, pkgs, ... }:
{
# ...
xdg = {
mime.defaultApplications = {
"inode/directory" = [ "nemo.desktop" ];
"application/x-gnome-saved-search" = [ "nemo.desktop" ];
};
};
# ...
}
Change the default terminal emulator for Nemo
To change the default terminal emulator for Nemo, set dconf.settings in the Home Manager config:
dconf = {
settings = {
"org/cinnamon/desktop/applications/terminal" = {
exec = "terminal-name";
# exec-arg = ""; # argument
};
};
};
Set keyboard shortcut for "Open in terminal"
To edit keyboard shortcuts, set dconf.settings and edit ~/.gnome2/accels/nemo using Home Manager (replacing "F4" with the desired key combination):
dconf = {
settings = {
"org/cinnamon/desktop/interface" = {
can-change-accels = true;
};
};
};
home.file = {
".gnome2/accels/nemo".text = ''
(gtk_accel_path "<Actions>/DirViewActions/OpenInTerminal" "F4")
'';
};
<Alt>, <Primary>, and <Shift> can be used as key modifiers (for example, <Primary><Shift>t).
With extensions
When using nemo-with-extensions, the default Mint installation plugins (aside from nemo-share) are provided by default: nemo-emblem, folder-color-switcher, nemo-python, and nemo-fileroller are provided.
# configuration.nix
{ config, pkgs, ... }:
{
environment.systemPackages = (with pkgs; [
(nemo-with-extensions.override {
extensions = with pkgs; [ nemo-seahorse ];
# useDefaultExtensions = false; # Uncomment to not add default extensions
})
]);
}
Declarative preference configuration
Nemo preferences can be configured decoratively.
{
programs.dconf.profiles.user.databases = [
{
settings = {
"org/nemo/preferences" = {
click-policy = "double";
date-format = "iso";
show-advanced-permissions = true;
show-hidden-files = true;
show-toggle-extra-pane-toolbar = true;
size-prefixes = "base-10";
tooltips-in-icon-view = false;
tooltips-in-list-view = false;
};
"org/nemo/preferences/menu-config" = {
selection-menu-open-as-root = false;
selection-menu-open-in-new-tab = false;
selection-menu-pin = false;
};
};
}
];
}
You can use 📦︎ dconf-editor to view existing dconf entries made through the Nemo preferences menu, or use dconf-to-nixos to export your current preferences into copy-pasteable NixOS settings.
See Nemo - ArchWiki for further information.