Thunar: Difference between revisions

From NixOS Wiki
imported>Artturin
add thunar page
 
imported>SuperSamus
Revamped the article
Line 1: Line 1:
Thunar is a gtk file manager originally made for xfce
Thunar is a GTK file manager originally made for [[Xfce]].


== Installation ==
== Installation ==


=== NixOS ===
=== With Xfce ===
 
If you [https://nixos.wiki/wiki/Xfce#Enabling enabled Xfce], Thunar should already be installed.
 
You can add plugins with <code>services.xserver.desktopManager.xfce.thunarPlugins</code> in your <code>/etc/nixos/configuration.nix</code>, for example:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
environment.systemPackages = with pkgs; [ xfce.thunar xfce.xfconf xfce.tumbler xfce.exo ]
services.xserver.desktopManager.xfce.thunarPlugins = with pkgs; [ xfce.thunar-volman xfce.thunar-archive-plugin ];
</syntaxhighlight>
</syntaxhighlight>


xfconf is needed to save settings
=== Standalone ===


tumbler is needed for thumbnails
If instead you want to install Thunar standalone, add to your <code>/etc/nixos/configuration.nix</code>:


exo is needed for <code>open terminal here</code> to function
<syntaxhighlight lang="nix">
environment.systemPackages = with pkgs; [
  xfce.thunar
  # Optionals
  xfce.xfconf # Needed to save the preferences
  xfce.exo # Used by default for `open terminal here`, but can be changed
];
services.gvfs.enable = true; # Mount, trash, and other functionalities
services.tumbler.enable = true; # Thumbnail support for images
</syntaxhighlight>


=== Home Manager ===
You can add plugins by [https://nixos.org/manual/nixpkgs/stable/#chap-overrides overriding] <code>thunarPlugins</code>. For example, replace <code>xfce.thunar</code> from above with:
 
<syntaxhighlight lang="nix">
(xfce.thunar.override { thunarPlugins = with pkgs; [ xfce.thunar-volman xfce.thunar-archive-plugin ]; })
</syntaxhighlight>


Same as above but replace <code>environment.systemPackages</code> with <code>home.packages</code>
=== Thumbnails ===


=== Non-NixOS ===
You can extend tumbler's functionality to other file formats by adding more packages to <code>environment.systemPackages</code>. See [https://wiki.archlinux.org/title/File_manager_functionality#Thumbnail_previews here] for a list (the names may not match 1:1).
[https://nixos.org/manual/nixpkgs/stable/#sec-declarative-package-management declarative package management on non-nixos]


== See also ==
* [[PCManFM]]


[[Category:Applications]]
[[Category:Applications]]

Revision as of 23:15, 9 November 2021

Thunar is a GTK file manager originally made for Xfce.

Installation

With Xfce

If you enabled Xfce, Thunar should already be installed.

You can add plugins with services.xserver.desktopManager.xfce.thunarPlugins in your /etc/nixos/configuration.nix, for example:

services.xserver.desktopManager.xfce.thunarPlugins = with pkgs; [ xfce.thunar-volman xfce.thunar-archive-plugin ];

Standalone

If instead you want to install Thunar standalone, add to your /etc/nixos/configuration.nix:

environment.systemPackages = with pkgs; [
  xfce.thunar
  # Optionals
  xfce.xfconf # Needed to save the preferences
  xfce.exo # Used by default for `open terminal here`, but can be changed 
];
services.gvfs.enable = true; # Mount, trash, and other functionalities
services.tumbler.enable = true; # Thumbnail support for images

You can add plugins by overriding thunarPlugins. For example, replace xfce.thunar from above with:

(xfce.thunar.override { thunarPlugins = with pkgs; [ xfce.thunar-volman xfce.thunar-archive-plugin ]; })

Thumbnails

You can extend tumbler's functionality to other file formats by adding more packages to environment.systemPackages. See here for a list (the names may not match 1:1).

See also