|
| 1 | +--- |
| 2 | +# Nemo File Manager - Linux Mint's fork of Nautilus |
| 3 | +# More feature-rich: dual-pane (F3), tree view, plugins, better bulk rename |
| 4 | +# https://github.com/linuxmint/nemo |
| 5 | +# |
| 6 | +# Strategy: Install alongside Nautilus (keeps GNOME integration intact), |
| 7 | +# set Nemo as default file manager for user file browsing. |
| 8 | + |
| 9 | +# ============================================================================ |
| 10 | +# FEDORA |
| 11 | +# ============================================================================ |
| 12 | + |
| 13 | +- name: Install Nemo file manager (Fedora) |
| 14 | + ansible.builtin.dnf: |
| 15 | + name: |
| 16 | + - nemo |
| 17 | + - nemo-fileroller # Archive integration |
| 18 | + - nemo-preview # Quick preview with spacebar |
| 19 | + state: present |
| 20 | + when: ansible_facts['distribution'] == 'Fedora' |
| 21 | + |
| 22 | +# ============================================================================ |
| 23 | +# UBUNTU |
| 24 | +# ============================================================================ |
| 25 | + |
| 26 | +# Nemo 6.x available in Ubuntu 24.04 universe - no PPA needed |
| 27 | +- name: Install Nemo file manager (Ubuntu) |
| 28 | + ansible.builtin.apt: |
| 29 | + name: |
| 30 | + - nemo |
| 31 | + - nemo-fileroller # Archive integration |
| 32 | + state: present |
| 33 | + when: ansible_facts['distribution'] == 'Ubuntu' |
| 34 | + |
| 35 | +# ============================================================================ |
| 36 | +# SET AS DEFAULT FILE MANAGER (both distros) |
| 37 | +# ============================================================================ |
| 38 | + |
| 39 | +# Set Nemo as default for opening directories |
| 40 | +# This affects "Open Folder" actions throughout the system |
| 41 | +- name: Set Nemo as default file manager |
| 42 | + ansible.builtin.command: |
| 43 | + cmd: xdg-mime default nemo.desktop inode/directory |
| 44 | + become: true |
| 45 | + become_user: "{{ dfe_actual_user }}" |
| 46 | + changed_when: true |
| 47 | + when: ansible_facts['distribution'] in ['Fedora', 'Ubuntu'] |
| 48 | + |
| 49 | +# Also set for application/x-gnome-saved-search (saved searches) |
| 50 | +- name: Set Nemo as default for saved searches |
| 51 | + ansible.builtin.command: |
| 52 | + cmd: xdg-mime default nemo.desktop application/x-gnome-saved-search |
| 53 | + become: true |
| 54 | + become_user: "{{ dfe_actual_user }}" |
| 55 | + changed_when: true |
| 56 | + failed_when: false |
| 57 | + when: ansible_facts['distribution'] in ['Fedora', 'Ubuntu'] |
0 commit comments