Compare commits

..

2 Commits

Author SHA1 Message Date
Fabio Scotto di Santolo
826f502af0 Add basic tmux configuration for WSL 2026-07-01 23:53:06 +02:00
Fabio Scotto di Santolo
dc230feace Add XFCE optional desktop 2026-07-01 23:48:11 +02:00
27 changed files with 673 additions and 74 deletions

View File

@@ -52,7 +52,7 @@ Ansible-driven personal infrastructure repo for Void desktops, Linux workstation
- Use `no_log: true` for secret-bearing task inputs or outputs.
## Desktop Notes
- `desktop_environment` selects the mutually exclusive `minimal` (default) or `kde` desktop mode. `profile_desktop_common` owns shared bootstrap; the minimal mode uses `profile_desktop_sway` and `profile_desktop_hyprland`, while `profile_desktop_kde` owns KDE-specific defaults and cleanup. `desktop_sessions_enabled` and `desktop_default_session` apply only to the minimal mode.
- `desktop_environment` selects the mutually exclusive `minimal` (default), `xfce`, or `kde` desktop mode. `profile_desktop_common` owns shared bootstrap; the minimal mode uses `profile_desktop_sway` and `profile_desktop_hyprland`, `profile_desktop_xfce` owns the reproducible XFCE setup, and `profile_desktop_kde` owns KDE-specific defaults and cleanup. `desktop_sessions_enabled` and `desktop_default_session` apply only to the minimal mode.
- `.emacs.d` is deployed by a dedicated `profile_desktop_common` task tagged `emacs`.
- NTFS filesystem support is provided by `ntfs-3g` in `ansible/inventory/group_vars/void.yml`.
- Void user services are managed by `turnstile` and live under `dotfiles/desktop/.config/service/`.
@@ -60,17 +60,17 @@ Ansible-driven personal infrastructure repo for Void desktops, Linux workstation
- Critical session entrypoints:
- `dotfiles/desktop/.config/sway/config` plus `host.conf` and `session-env` deployed via `host_sway_dotfiles` (sway / Wayland)
- `dotfiles/desktop/.config/hypr/hyprland.conf` plus `host.conf` and `session-env` deployed via `host_hyprland_dotfiles` (Hyprland / Wayland)
- Do not switch or restart a display manager during a playbook run from an active graphical session. Changing between `emptty` and SDDM requires an explicit run from another TTY/SSH session with `desktop_allow_display_manager_switch=true`.
- Do not switch or restart a display manager during a playbook run from an active graphical session. Changing among `emptty`, LightDM, and SDDM requires an explicit run from another TTY/SSH session with `desktop_allow_display_manager_switch=true`. Apply managed XFCE XML while logged out of XFCE so `xfconfd` cannot overwrite it from its in-memory state.
- `nymph` is a Void laptop with NVIDIA Optimus, running sway (Wayland) and Hyprland (Wayland); host-specific tasks in `profile_desktop_host/tasks/nymph.yml` handle GRUB NVIDIA cmdline params, `prime-run` wrapper, and the WirePlumber camera priority config. Multi-monitor on sway is driven by `kanshi` (config deployed via `host_sway_dotfiles`), and on Hyprland by host-specific Hyprland monitor/workspace rules.
## Void Package And Dotfile Bucket Rules
The Void desktop package lists in `ansible/inventory/group_vars/void.yml` are kept disjoint by role:
- `void_packages_base` — system runtime only (init/services, kernel, audio core, networking, filesystem, firewall, hardware daemons, runit logging).
- `desktop_common_packages` — GUI infrastructure shared by minimal and KDE modes.
- `desktop_minimal_packages` / `desktop_kde_packages` — mutually exclusive applications, integration components, and display managers.
- `desktop_common_packages` — GUI infrastructure shared by all desktop modes.
- `desktop_minimal_packages` / `desktop_xfce_packages` / `desktop_kde_packages` — mutually exclusive applications, integration components, and display managers. Packages required by more than one exclusive mode may be repeated; cleanup subtracts the selected mode before removing inactive packages.
- `desktop_sway_packages` / `desktop_hyprland_packages` — binaries specific to each session. Cross-WM packages used by both (such as `dunst`, `rofi`, and `foot`) are intentionally duplicated in the two lists.
`profile_packages` in the same file is cross-distro and is overridden by `group_vars/server.yml` and the workstation group vars; do not move desktop-specific Void entries through it.
The dotfile vars follow the same split: `desktop_common_dotfiles` carries mode-independent content, while `desktop_minimal_dotfiles` carries Thunar, Udiskie, and minimal MIME defaults. KDE uses its own MIME defaults. `desktop_void_dotfiles` remains reserved for files that need the Void runtime.
The dotfile vars follow the same split: `desktop_common_dotfiles` carries mode-independent content, `desktop_minimal_dotfiles` carries Thunar, Udiskie, and minimal MIME defaults, and `desktop_xfce_dotfiles` carries XFCE state. KDE uses its own MIME defaults. `desktop_void_dotfiles` remains reserved for files that need the Void runtime.
## Workstation Notes
- Native Linux workstation hosts can combine `workstation_host_linux` with an OS-specific dev group.

View File

@@ -73,6 +73,7 @@ Sistema operativo:
Modalita desktop:
- `minimal`: sway (Wayland) + Hyprland (Wayland), gestite da `emptty`
- `xfce`: XFCE puro con look scuro e sobrio, gestito da LightDM
- `kde`: KDE Plasma, gestito da SDDM
Macchine:
@@ -80,18 +81,20 @@ Macchine:
- `ikaros`
- `nymph`
Queste macchine condividono la stessa configurazione base desktop e vengono mantenute allineate tramite Ansible. `desktop_environment` seleziona in modo esclusivo `minimal` (default) oppure `kde`. Nella modalita minimale Sway/SwayFX e Hyprland sono installate in parallelo e selezionabili da `emptty`; `desktop_default_session` decide quale sessione viene preselezionata al login.
Queste macchine condividono la stessa configurazione base desktop e vengono mantenute allineate tramite Ansible. `desktop_environment` seleziona in modo esclusivo `minimal` (default), `xfce` oppure `kde`. Nella modalita minimale Sway/SwayFX e Hyprland sono installate in parallelo e selezionabili da `emptty`; `desktop_default_session` decide quale sessione viene preselezionata al login. XFCE usa direttamente la sessione `xfce` tramite LightDM.
Lo stato attuale del profilo desktop include, tra le altre cose:
- dotfiles comuni e desktop
- sessioni sway e Hyprland su entrambi gli host in modalita `minimal`
- KDE Plasma con applicazioni KDE curate e SDDM disponibile come alternativa esclusiva
- XFCE con pannello, keybinding, terminale, tema e workspace dichiarativi, LightDM e Thunderbird come client grafico principale
- `emptty` con default host-specific in modalita `minimal`, con session file Wayland esposti per `sway` e `hyprland`
- pacchetti Void Linux e servizi runit; le liste pacchetti Void desktop sono separate per criterio:
- `void_packages_base` per il runtime sistema (init, kernel, audio core, networking, firewall, hw daemons)
- `desktop_common_packages` per l'infrastruttura condivisa dalle due modalita
- `desktop_common_packages` per l'infrastruttura condivisa dalle modalita
- `desktop_minimal_packages` per applicazioni GTK/XFCE e `emptty`
- `desktop_xfce_packages` per XFCE, LightDM e le relative integrazioni
- `desktop_kde_packages` per Plasma, SDDM e le applicazioni KDE equivalenti
- `desktop_sway_packages` e `desktop_hyprland_packages` per i binari specifici di ciascuna sessione
- `turnstile` per i servizi utente, inclusi `emacs` e `ssh-agent`
@@ -355,7 +358,7 @@ Allo stato attuale questo comando:
- per `workstation_host_linux` applica il layer host Linux GNOME
- per `workstation_dev_wsl` applica pacchetti Ubuntu, servizi systemd, profilo dev comune e tweak WSL dedicati
- per gli host `ubuntu_server` applica pacchetti Ubuntu, servizi systemd, profilo server, UFW, dotfiles e template dedicati
- non riavvia automaticamente `emptty`; le modifiche al display manager vanno applicate manualmente da SSH o da una TTY separata
- non riavvia automaticamente il display manager; i passaggi tra `emptty`, LightDM e SDDM vanno applicati da SSH o da una TTY separata
- carica `secrets/vault.yml` solo se presente
- carica `secrets/vault.local.yml` solo se presente, dopo `vault.yml`, cosi gli override locali hanno precedenza
@@ -397,13 +400,13 @@ Per vedere l'elenco reale aggiornato dei tag disponibili:
ansible-playbook ansible/site.yml --list-tags
```
Per attivare KDE su un host, impostare `desktop_environment: kde` nei relativi `host_vars` ed eseguire prima un dry run. Il primo play configura KDE ma, se `emptty` e ancora attivo, rinvia il cambio del display manager. Da una TTY o sessione SSH separata, applicare quindi il passaggio esplicito:
Per attivare XFCE o KDE su un host, impostare rispettivamente `desktop_environment: xfce` o `desktop_environment: kde` nei relativi `host_vars` ed eseguire prima un dry run. Il primo play configura il profilo ma, se un altro display manager e ancora attivo, rinvia il cambio. Da una TTY o sessione SSH separata, con la sessione grafica chiusa, applicare quindi il passaggio esplicito:
```bash
ansible-playbook ansible/site.yml --limit <host> -e desktop_allow_display_manager_switch=true
```
La stessa procedura vale in senso inverso per tornare a `minimal`.
La stessa procedura vale per ogni passaggio tra `minimal`, `xfce` e `kde`. Gli XML XFCE sono autorevoli: applicare i relativi aggiornamenti mentre XFCE e disconnesso evita che `xfconfd` ripristini lo stato in memoria.
Allo stato attuale `ansible/site.yml` espone questi tag:
@@ -417,8 +420,9 @@ Allo stato attuale `ansible/site.yml` espone questi tag:
| `dotfiles:server` | dotfiles dedicati al profilo server | server |
| `dotfiles:workstation` | dotfiles dedicati alle workstation | workstation Linux, WSL |
| `emptty` | gestione display manager `emptty` | desktop Void |
| `display-manager` | selezione protetta tra `emptty` e SDDM | desktop Void |
| `display-manager` | selezione protetta tra `emptty`, LightDM e SDDM | desktop Void |
| `kde` | profilo KDE Plasma e relativa pulizia | desktop Void |
| `xfce` | profilo XFCE, LightDM e relativa pulizia | desktop Void |
| `gnome` | configurazione host GNOME | workstation host Linux, parte desktop |
| `sway` | sessione/configurazione sway / SwayFX (Wayland) | desktop Void |
| `hyprland` | sessione/configurazione Hyprland (Wayland) | desktop Void |

View File

@@ -4,6 +4,11 @@ desktop_protonmail_bridge_cert_path: ~/.var/app/ch.protonmail.protonmail-bridge/
desktop_environment: minimal
desktop_allow_display_manager_switch: false
desktop_display_manager_by_environment:
minimal: emptty
xfce: lightdm
kde: sddm
desktop_sessions_enabled:
- sway
- hyprland
@@ -236,6 +241,30 @@ desktop_hyprland_dotfiles:
dest: .config/foot/
mode: preserve
desktop_xfce_dotfiles:
- name: XFCE configuration
src: .config/xfce4/
dest: .config/xfce4/
mode: preserve
- name: XFCE Thunar custom actions
src: .config/Thunar/uca.xfce.xml
dest: .config/Thunar/uca.xml
mode: "0644"
- name: XFCE dark desktop background
src: .local/share/backgrounds/xfce-dark.svg
dest: .local/share/backgrounds/xfce-dark.svg
mode: "0644"
desktop_xfce_managed_paths:
- .config/xfce4
- .local/share/backgrounds/xfce-dark.svg
xfce_theme_gtk: Yaru-blue-dark
xfce_theme_icons: Papirus-Dark
xfce_theme_wm: Greybird-dark
xfce_font_ui: Liberation Sans 10
xfce_font_monospace: Liberation Mono 11
desktop_flatpak_packages:
- be.alexandervanhee.gradia
- ch.protonmail.protonmail-bridge

View File

@@ -157,6 +157,29 @@ desktop_kde_packages:
- skanpage
- spectacle
desktop_xfce_packages:
- blueman
- gnome-keyring
- greybird-themes
- gvfs
- gvfs-cdda
- gvfs-mtp
- gvfs-smb
- lightdm
- lightdm-gtk-greeter
- network-manager-applet
- papirus-icon-theme
- seahorse
- thunar-archive-plugin
- xarchiver
- xdg-desktop-portal-gtk
- xfce4
- xfce4-clipman-plugin
- xfce4-pulseaudio-plugin
- xfce4-screenshooter
- xfce4-whiskermenu-plugin
- xorg
desktop_sway_packages:
- cliphist
- dunst

View File

@@ -6,6 +6,7 @@ workstation_dev_wsl_packages:
- lazygit
- pinentry-curses
- python3-pip
- tmux
workstation_dev_wsl_excluded_packages:
- pcscd
- pinentry-gnome3
@@ -25,3 +26,6 @@ workstation_dev_wsl_dotfiles:
- src: .gnupg/gpg-agent.conf
dest: .gnupg/gpg-agent.conf
mode: "0600"
- src: .tmux.conf
dest: .tmux.conf
mode: "0644"

View File

@@ -46,21 +46,20 @@
update_cache: false
upgrade: true
- name: Install packages on Void Linux
- name: Select packages for the configured desktop environment
tags: [packages]
community.general.xbps:
name: >-
ansible.builtin.set_fact:
packages_void_selected_desktop_packages: >-
{{
(
(common_packages | default([]))
+ (void_packages_base | default([]))
+ (profile_packages | default([]))
+ (desktop_common_packages | default([]))
+ (
(desktop_minimal_packages | default([]))
if (desktop_environment | default('minimal')) == 'minimal'
(desktop_minimal_packages | default([]))
if (desktop_environment | default('minimal')) == 'minimal'
else (
(desktop_xfce_packages | default([]))
if (desktop_environment | default('minimal')) == 'xfce'
else (desktop_kde_packages | default([]))
)
)
+ (
(desktop_sway_packages | default([]))
if (
@@ -77,6 +76,37 @@
)
else []
)
| unique
}}
- name: Calculate packages owned only by inactive desktop environments
tags: [packages]
ansible.builtin.set_fact:
packages_void_inactive_desktop_packages: >-
{{
(
(desktop_minimal_packages | default([]))
+ (desktop_sway_packages | default([]))
+ (desktop_hyprland_packages | default([]))
+ (desktop_xfce_packages | default([]))
+ (desktop_kde_packages | default([]))
)
| unique
| difference(packages_void_selected_desktop_packages)
| difference(desktop_display_manager_by_environment.values() | list)
}}
- name: Install packages on Void Linux
tags: [packages]
community.general.xbps:
name: >-
{{
(
(common_packages | default([]))
+ (void_packages_base | default([]))
+ (profile_packages | default([]))
+ (desktop_common_packages | default([]))
+ (packages_void_selected_desktop_packages | default([]))
+ (host_packages | default([]))
)
| unique
@@ -87,36 +117,20 @@
- name: Check whether the selected display manager is active
tags: [packages, display-manager]
ansible.builtin.stat:
path: >-
/var/service/{{ 'sddm' if (desktop_environment | default('minimal')) == 'kde' else 'emptty' }}
path: "/var/service/{{ desktop_display_manager_by_environment[desktop_environment | default('minimal')] }}"
register: packages_void_selected_display_manager
- name: Remove packages managed by the inactive desktop environment
tags: [packages]
community.general.xbps:
name: >-
{{
(
(
(desktop_minimal_packages | default([]))
| reject('equalto', 'emptty')
| list
)
+ (desktop_sway_packages | default([]))
+ (desktop_hyprland_packages | default([]))
)
if (desktop_environment | default('minimal')) == 'kde'
else (
(desktop_kde_packages | default([]))
| reject('equalto', 'sddm')
| list
)
}}
name: "{{ packages_void_inactive_desktop_packages }}"
state: absent
update_cache: false
when: >-
packages_void_selected_display_manager.stat.exists
or (desktop_allow_display_manager_switch | default(false))
when:
- (packages_void_inactive_desktop_packages | default([])) | length > 0
- >-
packages_void_selected_display_manager.stat.exists
or (desktop_allow_display_manager_switch | default(false))
- name: Remove host-absent packages on Void Linux
tags: [packages]

View File

@@ -3,18 +3,18 @@
tags: [always]
ansible.builtin.assert:
that:
- (desktop_environment | default('minimal')) in ['minimal', 'kde']
- (desktop_environment | default('minimal')) in ['minimal', 'xfce', 'kde']
- >-
(desktop_environment | default('minimal')) == 'kde'
(desktop_environment | default('minimal')) != 'minimal'
or (desktop_sessions_enabled | default([]) | length > 0)
- >-
(desktop_environment | default('minimal')) == 'kde'
(desktop_environment | default('minimal')) != 'minimal'
or (desktop_sessions_enabled | default([]) | difference(['sway', 'hyprland']) | length == 0)
- >-
(desktop_environment | default('minimal')) == 'kde'
(desktop_environment | default('minimal')) != 'minimal'
or desktop_default_session in (desktop_sessions_enabled | default([]))
fail_msg: >-
desktop_environment must be minimal or kde. Minimal desktops also require
desktop_environment must be minimal, xfce, or kde. Minimal desktops also require
desktop_default_session to be included in desktop_sessions_enabled.
- name: Configure elogind to suspend on lid close
@@ -475,7 +475,7 @@
owner: root
group: root
mode: "0644"
when: (desktop_environment | default('minimal')) == 'minimal'
when: (desktop_environment | default('minimal')) in ['minimal', 'xfce']
- name: Remove minimal Qt theme override for KDE
tags: [theme]

View File

@@ -21,7 +21,11 @@
ansible.builtin.file:
path: "{{ user_home }}/{{ item }}"
state: absent
loop: "{{ desktop_minimal_managed_paths | default([]) }}"
loop: >-
{{
(desktop_minimal_managed_paths | default([]))
+ (desktop_xfce_managed_paths | default([]))
}}
loop_control:
label: "{{ item }}"
when:
@@ -36,6 +40,7 @@
loop:
- /etc/xdg/xdg-desktop-portal/hyprland-portals.conf
- /etc/xdg/xdg-desktop-portal/sway-portals.conf
- /etc/xdg/xdg-desktop-portal/xfce-portals.conf
when:
- (desktop_environment | default('minimal')) == 'kde'
- profile_desktop_kde_sddm_service.stat.exists
@@ -47,6 +52,7 @@
state: absent
loop:
- /etc/emptty
- /etc/lightdm/lightdm.conf.d/50-xfce.conf
- /usr/local/bin/start-hyprland-session
- /usr/local/bin/start-sway
when:

View File

@@ -0,0 +1,223 @@
---
- name: Inspect configured desktop display manager for XFCE cleanup gates
tags: [always, packages, services, xfce, display-manager]
ansible.builtin.stat:
path: "/var/service/{{ desktop_display_manager_by_environment[desktop_environment | default('minimal')] }}"
register: profile_desktop_xfce_selected_display_manager
- name: Ensure XFCE user configuration directories exist
tags: [dotfiles, dotfiles:desktop, xfce]
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0755"
loop:
- "{{ user_home }}/.config/xfce4"
- "{{ user_home }}/.config/xfce4/terminal"
- "{{ user_home }}/.config/xfce4/xfconf"
- "{{ user_home }}/.config/xfce4/xfconf/xfce-perchannel-xml"
- "{{ user_home }}/.config/Thunar"
- "{{ user_home }}/.local/share/backgrounds"
when: (desktop_environment | default('minimal')) == 'xfce'
- name: Copy XFCE desktop dotfiles
tags: [dotfiles, dotfiles:desktop, xfce]
ansible.builtin.copy:
src: "{{ playbook_dir }}/../dotfiles/desktop/{{ item.src }}"
dest: "{{ user_home }}/{{ item.dest }}"
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "{{ item.mode }}"
loop: "{{ desktop_xfce_dotfiles | default([]) }}"
loop_control:
label: "{{ item.dest }}"
when: (desktop_environment | default('minimal')) == 'xfce'
- name: Render XFCE themed configuration
tags: [dotfiles, dotfiles:desktop, xfce]
ansible.builtin.template:
src: "{{ item.src }}"
dest: "{{ user_home }}/{{ item.dest }}"
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0644"
loop:
- src: xsettings.xml.j2
dest: .config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
- src: xfwm4.xml.j2
dest: .config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml
- src: xfce4-desktop.xml.j2
dest: .config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
- src: terminalrc.j2
dest: .config/xfce4/terminal/terminalrc
loop_control:
label: "{{ item.dest }}"
when: (desktop_environment | default('minimal')) == 'xfce'
- name: Copy XFCE MIME application defaults
tags: [dotfiles, dotfiles:desktop, xfce]
ansible.builtin.copy:
src: "{{ playbook_dir }}/../dotfiles/desktop/.config/mimeapps.list"
dest: "{{ user_home }}/.config/mimeapps.list"
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0644"
when: (desktop_environment | default('minimal')) == 'xfce'
- name: Make Thunderbird the XFCE mail handler
tags: [dotfiles, dotfiles:desktop, xfce]
community.general.ini_file:
path: "{{ user_home }}/.config/mimeapps.list"
section: "{{ item.section }}"
option: x-scheme-handler/mailto
value: "{{ item.value }}"
no_extra_spaces: true
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0644"
loop:
- section: Default Applications
value: org.mozilla.Thunderbird.desktop
- section: Added Associations
value: org.mozilla.Thunderbird.desktop;
when: (desktop_environment | default('minimal')) == 'xfce'
- name: Ensure LightDM configuration directories exist
tags: [packages, services, xfce, display-manager]
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: root
group: root
mode: "0755"
loop:
- /etc/lightdm
- /etc/lightdm/lightdm.conf.d
when: (desktop_environment | default('minimal')) == 'xfce'
- name: Configure LightDM for the XFCE session
tags: [packages, services, xfce, display-manager]
ansible.builtin.template:
src: lightdm-xfce.conf.j2
dest: /etc/lightdm/lightdm.conf.d/50-xfce.conf
owner: root
group: root
mode: "0644"
register: profile_desktop_xfce_lightdm_config
when: (desktop_environment | default('minimal')) == 'xfce'
- name: Configure the LightDM GTK greeter
tags: [packages, services, xfce, display-manager]
ansible.builtin.template:
src: lightdm-gtk-greeter.conf.j2
dest: /etc/lightdm/lightdm-gtk-greeter.conf
owner: root
group: root
mode: "0644"
register: profile_desktop_xfce_lightdm_greeter_config
when: (desktop_environment | default('minimal')) == 'xfce'
- name: Report deferred LightDM configuration activation
tags: [packages, services, xfce, display-manager]
ansible.builtin.debug:
msg: >-
LightDM configuration changed. Apply the display-manager switch or restart
LightDM from a TTY or SSH session; it is not restarted automatically.
when:
- (desktop_environment | default('minimal')) == 'xfce'
- >-
profile_desktop_xfce_lightdm_config is changed
or profile_desktop_xfce_lightdm_greeter_config is changed
- name: Manage gnome-keyring auth hook for LightDM
tags: [packages, services, xfce]
ansible.builtin.lineinfile:
path: /etc/pam.d/lightdm
insertafter: EOF
line: "auth optional pam_gnome_keyring.so"
state: present
when: (desktop_environment | default('minimal')) == 'xfce'
- name: Manage gnome-keyring session hook for LightDM
tags: [packages, services, xfce]
ansible.builtin.lineinfile:
path: /etc/pam.d/lightdm
insertafter: EOF
line: "session optional pam_gnome_keyring.so auto_start"
state: present
when: (desktop_environment | default('minimal')) == 'xfce'
- name: Ensure XFCE portal configuration directory exists
tags: [packages, services, xfce, portal]
ansible.builtin.file:
path: /etc/xdg/xdg-desktop-portal
state: directory
owner: root
group: root
mode: "0755"
when: (desktop_environment | default('minimal')) == 'xfce'
- name: Configure xdg-desktop-portal preferences for XFCE
tags: [packages, services, xfce, portal]
ansible.builtin.copy:
dest: /etc/xdg/xdg-desktop-portal/xfce-portals.conf
content: |
[preferred]
default=gtk
owner: root
group: root
mode: "0644"
when: (desktop_environment | default('minimal')) == 'xfce'
- name: Remove minimal desktop user configuration after switching to XFCE
tags: [dotfiles, dotfiles:desktop, xfce]
ansible.builtin.file:
path: "{{ user_home }}/{{ item }}"
state: absent
loop: "{{ desktop_minimal_managed_paths | default([]) | difference(['.config/Thunar']) }}"
loop_control:
label: "{{ item }}"
when:
- (desktop_environment | default('minimal')) == 'xfce'
- profile_desktop_xfce_selected_display_manager.stat.exists
- name: Remove minimal portal preferences and session launchers after switching to XFCE
tags: [packages, services, xfce, portal, display-manager]
ansible.builtin.file:
path: "{{ item }}"
state: absent
loop:
- /etc/xdg/xdg-desktop-portal/hyprland-portals.conf
- /etc/xdg/xdg-desktop-portal/sway-portals.conf
- /etc/emptty
- /usr/local/bin/start-hyprland-session
- /usr/local/bin/start-sway
when:
- (desktop_environment | default('minimal')) == 'xfce'
- profile_desktop_xfce_selected_display_manager.stat.exists
- name: Remove XFCE user configuration after switching to another profile
tags: [dotfiles, dotfiles:desktop, xfce]
ansible.builtin.file:
path: "{{ user_home }}/{{ item }}"
state: absent
loop: "{{ desktop_xfce_managed_paths | default([]) }}"
loop_control:
label: "{{ item }}"
when:
- (desktop_environment | default('minimal')) != 'xfce'
- profile_desktop_xfce_selected_display_manager.stat.exists
- name: Remove inactive XFCE portal and LightDM profile configuration
tags: [packages, services, xfce, portal, display-manager]
ansible.builtin.file:
path: "{{ item }}"
state: absent
loop:
- /etc/xdg/xdg-desktop-portal/xfce-portals.conf
- /etc/lightdm/lightdm.conf.d/50-xfce.conf
when:
- (desktop_environment | default('minimal')) != 'xfce'
- profile_desktop_xfce_selected_display_manager.stat.exists

View File

@@ -0,0 +1,7 @@
[greeter]
theme-name={{ xfce_theme_gtk }}
icon-theme-name={{ xfce_theme_icons }}
font-name={{ xfce_font_ui }}
background=#050505
clock-format=%a %d %b, %H:%M
indicators=~host;~spacer;~clock;~spacer;~session;~power

View File

@@ -0,0 +1,3 @@
[Seat:*]
greeter-session=lightdm-gtk-greeter
user-session=xfce

View File

@@ -0,0 +1,15 @@
[Configuration]
FontName={{ xfce_font_monospace }}
MiscUseSystemFont=FALSE
MiscMenubarDefault=FALSE
MiscToolbarDefault=FALSE
MiscBordersDefault=TRUE
ScrollingLines=10000
BackgroundMode=TERMINAL_BACKGROUND_SOLID
ColorForeground=#d8d8d8
ColorBackground=#050505
ColorCursor=#d8d8d8
ColorSelection=#d8d8d8
ColorSelectionUseDefault=FALSE
ColorSelectionBackground=#3a5f7f
ColorPalette=#050505;#8f3f3f;#5f7f5f;#8f7f3f;#3a5f7f;#6f4f7f;#3f7f7f;#d8d8d8;#777777;#bf5f5f;#7f9f7f;#af9f5f;#5f7f9f;#8f6f9f;#5f9f9f;#ffffff

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<channel name="xfce4-desktop" version="1.0">
<property name="backdrop" type="empty">
<property name="screen0" type="empty">
<property name="monitor0" type="empty">
<property name="workspace0" type="empty">
<property name="color-style" type="int" value="0"/>
<property name="image-style" type="int" value="5"/>
<property name="last-image" type="string" value="{{ user_home }}/.local/share/backgrounds/xfce-dark.svg"/>
</property>
</property>
</property>
</property>
<property name="desktop-icons" type="empty">
<property name="style" type="int" value="0"/>
</property>
</channel>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<channel name="xfwm4" version="1.0">
<property name="general" type="empty">
<property name="theme" type="string" value="{{ xfce_theme_wm }}"/>
<property name="title_font" type="string" value="{{ xfce_font_ui }}"/>
<property name="workspace_count" type="int" value="6"/>
<property name="workspace_names" type="array">
<value type="string" value="term"/>
<value type="string" value="web"/>
<value type="string" value="code"/>
<value type="string" value="mail"/>
<value type="string" value="ops"/>
<value type="string" value="misc"/>
</property>
<property name="use_compositing" type="bool" value="false"/>
<property name="click_to_focus" type="bool" value="true"/>
<property name="focus_delay" type="int" value="250"/>
<property name="raise_delay" type="int" value="250"/>
</property>
</channel>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<channel name="xsettings" version="1.0">
<property name="Net" type="empty">
<property name="ThemeName" type="string" value="{{ xfce_theme_gtk }}"/>
<property name="IconThemeName" type="string" value="{{ xfce_theme_icons }}"/>
</property>
<property name="Gtk" type="empty">
<property name="FontName" type="string" value="{{ xfce_font_ui }}"/>
<property name="MonospaceFontName" type="string" value="{{ xfce_font_monospace }}"/>
<property name="CursorThemeName" type="string" value="Yaru"/>
<property name="DecorationLayout" type="string" value="menu:minimize,maximize,close"/>
</property>
<property name="Xft" type="empty">
<property name="Antialias" type="int" value="1"/>
<property name="Hinting" type="int" value="1"/>
<property name="HintStyle" type="string" value="hintslight"/>
<property name="RGBA" type="string" value="rgb"/>
</property>
</channel>

View File

@@ -19,47 +19,70 @@
tags: [services, packages, display-manager]
ansible.builtin.set_fact:
services_runit_desktop_display_manager_service: >-
{{ 'sddm' if (desktop_environment | default('minimal')) == 'kde' else 'emptty' }}
services_runit_inactive_display_manager_service: >-
{{ 'emptty' if (desktop_environment | default('minimal')) == 'kde' else 'sddm' }}
{{ desktop_display_manager_by_environment[desktop_environment | default('minimal')] }}
services_runit_inactive_display_manager_services: >-
{{
desktop_display_manager_by_environment.values()
| list
| difference([desktop_display_manager_by_environment[desktop_environment | default('minimal')]])
}}
when: "'desktop' in group_names"
- name: Inspect desktop display manager services
- name: Inspect selected desktop display manager service
tags: [services, packages, display-manager]
ansible.builtin.stat:
path: "/var/service/{{ services_runit_desktop_display_manager_service }}"
register: services_runit_selected_display_manager_link
when: "'desktop' in group_names"
- name: Inspect inactive desktop display manager services
tags: [services, packages, display-manager]
ansible.builtin.stat:
path: "/var/service/{{ item }}"
loop:
- "{{ services_runit_desktop_display_manager_service }}"
- "{{ services_runit_inactive_display_manager_service }}"
loop: "{{ services_runit_inactive_display_manager_services }}"
loop_control:
label: "{{ item }}"
register: services_runit_display_manager_links
register: services_runit_inactive_display_manager_links
when: "'desktop' in group_names"
- name: Record active inactive desktop display managers
tags: [services, packages, display-manager]
ansible.builtin.set_fact:
services_runit_active_inactive_display_managers: >-
{{
services_runit_inactive_display_manager_links.results
| selectattr('stat.exists')
| map(attribute='item')
| list
}}
when: "'desktop' in group_names"
- name: Report deferred desktop display manager switch
tags: [services, packages, display-manager]
ansible.builtin.debug:
msg: >-
{{ desktop_environment }} is configured, but {{ services_runit_inactive_display_manager_service }}
is still active. Re-run from a TTY or SSH session with
{{ desktop_environment }} is configured, but
{{ services_runit_active_inactive_display_managers | join(', ') }} is still active.
Re-run from a TTY or SSH session with
-e desktop_allow_display_manager_switch=true to switch safely to
{{ services_runit_desktop_display_manager_service }}.
when:
- "'desktop' in group_names"
- services_runit_display_manager_links.results[1].stat.exists
- not (services_runit_display_manager_links.results[0].stat.exists)
- (services_runit_active_inactive_display_managers | length) > 0
- not (desktop_allow_display_manager_switch | default(false))
- name: Disable inactive desktop display manager
- name: Disable inactive desktop display managers
tags: [services, packages, display-manager]
ansible.builtin.file:
path: "/var/service/{{ services_runit_inactive_display_manager_service }}"
path: "/var/service/{{ item }}"
state: absent
loop: "{{ services_runit_active_inactive_display_managers }}"
loop_control:
label: "{{ item }}"
register: services_runit_display_manager_disabled
when:
- "'desktop' in group_names"
- services_runit_display_manager_links.results[1].stat.exists
- not (services_runit_display_manager_links.results[0].stat.exists)
- (services_runit_active_inactive_display_managers | length) > 0
- desktop_allow_display_manager_switch | default(false)
- name: Enable selected desktop display manager
@@ -71,22 +94,25 @@
register: services_runit_display_manager_enabled
when:
- "'desktop' in group_names"
- not (services_runit_display_manager_links.results[0].stat.exists)
- not services_runit_selected_display_manager_link.stat.exists
- >-
not (services_runit_display_manager_links.results[1].stat.exists)
(services_runit_active_inactive_display_managers | length) == 0
or (desktop_allow_display_manager_switch | default(false))
- name: Remove inactive desktop display manager package after switching
- name: Remove inactive desktop display manager packages after switching
tags: [services, packages, display-manager]
community.general.xbps:
name: "{{ services_runit_inactive_display_manager_service }}"
name: "{{ item }}"
state: absent
update_cache: false
loop: "{{ services_runit_inactive_display_manager_services }}"
loop_control:
label: "{{ item }}"
when:
- "'desktop' in group_names"
- >-
services_runit_display_manager_links.results[0].stat.exists
services_runit_selected_display_manager_link.stat.exists
or (services_runit_display_manager_enabled is defined and services_runit_display_manager_enabled is changed)
- >-
not (services_runit_display_manager_links.results[1].stat.exists)
or (services_runit_display_manager_disabled is defined and services_runit_display_manager_disabled is changed)
(services_runit_active_inactive_display_managers | length) == 0
or (desktop_allow_display_manager_switch | default(false))

View File

@@ -27,6 +27,7 @@
- profile_desktop_sway
- profile_desktop_hyprland
- profile_desktop_kde
- profile_desktop_xfce
- profile_desktop_host
- hosts: workstation_dev_fedora

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<icon>utilities-terminal</icon>
<name>Open Terminal Here</name>
<submenu></submenu>
<unique-id>xfce-open-terminal-here</unique-id>
<command>xfce4-terminal --working-directory %f</command>
<description>Open xfce4-terminal in this directory</description>
<range></range>
<patterns>*</patterns>
<startup-notify/>
<directories/>
</action>
</actions>

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<channel name="xfce4-keyboard-shortcuts" version="1.0">
<property name="commands" type="empty">
<property name="custom" type="empty">
<property name="&lt;Super&gt;Return" type="string" value="xfce4-terminal"/>
<property name="&lt;Super&gt;b" type="string" value="firefox"/>
<property name="&lt;Super&gt;e" type="string" value="emacsclient -c -a emacs"/>
<property name="&lt;Super&gt;m" type="string" value="flatpak run org.mozilla.Thunderbird"/>
<property name="&lt;Super&gt;d" type="string" value="xfce4-appfinder"/>
<property name="&lt;Super&gt;l" type="string" value="xflock4"/>
<property name="Print" type="string" value="xfce4-screenshooter"/>
</property>
</property>
<property name="xfwm4" type="empty">
<property name="custom" type="empty">
<property name="&lt;Super&gt;q" type="string" value="close_window_key"/>
<property name="&lt;Super&gt;f" type="string" value="fullscreen_key"/>
<property name="&lt;Super&gt;1" type="string" value="workspace_1_key"/>
<property name="&lt;Super&gt;2" type="string" value="workspace_2_key"/>
<property name="&lt;Super&gt;3" type="string" value="workspace_3_key"/>
<property name="&lt;Super&gt;4" type="string" value="workspace_4_key"/>
<property name="&lt;Super&gt;5" type="string" value="workspace_5_key"/>
<property name="&lt;Super&gt;6" type="string" value="workspace_6_key"/>
<property name="&lt;Shift&gt;&lt;Super&gt;1" type="string" value="move_window_workspace_1_key"/>
<property name="&lt;Shift&gt;&lt;Super&gt;2" type="string" value="move_window_workspace_2_key"/>
<property name="&lt;Shift&gt;&lt;Super&gt;3" type="string" value="move_window_workspace_3_key"/>
<property name="&lt;Shift&gt;&lt;Super&gt;4" type="string" value="move_window_workspace_4_key"/>
<property name="&lt;Shift&gt;&lt;Super&gt;5" type="string" value="move_window_workspace_5_key"/>
<property name="&lt;Shift&gt;&lt;Super&gt;6" type="string" value="move_window_workspace_6_key"/>
</property>
</property>
</channel>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<channel name="xfce4-notifyd" version="1.0">
<property name="do-not-disturb" type="bool" value="false"/>
<property name="expire-timeout" type="int" value="10"/>
<property name="initial-opacity" type="double" value="0.92"/>
<property name="notification-log" type="bool" value="true"/>
<property name="notify-location" type="uint" value="2"/>
<property name="primary-monitor" type="uint" value="0"/>
<property name="theme" type="string" value="Default"/>
</channel>

View File

@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<channel name="xfce4-panel" version="1.0">
<property name="configver" type="int" value="2"/>
<property name="panels" type="array">
<value type="int" value="1"/>
<property name="dark-mode" type="bool" value="true"/>
<property name="panel-1" type="empty">
<property name="position" type="string" value="p=6;x=0;y=0"/>
<property name="position-locked" type="bool" value="true"/>
<property name="size" type="uint" value="28"/>
<property name="length" type="uint" value="100"/>
<property name="length-adjust" type="bool" value="true"/>
<property name="mode" type="uint" value="0"/>
<property name="autohide-behavior" type="uint" value="0"/>
<property name="background-style" type="uint" value="0"/>
<property name="plugin-ids" type="array">
<value type="int" value="1"/>
<value type="int" value="2"/>
<value type="int" value="3"/>
<value type="int" value="4"/>
<value type="int" value="5"/>
<value type="int" value="6"/>
<value type="int" value="7"/>
<value type="int" value="8"/>
</property>
</property>
</property>
<property name="plugins" type="empty">
<property name="plugin-1" type="string" value="whiskermenu"/>
<property name="plugin-2" type="string" value="pager">
<property name="rows" type="uint" value="1"/>
<property name="miniature-view" type="bool" value="false"/>
</property>
<property name="plugin-3" type="string" value="tasklist">
<property name="grouping" type="uint" value="0"/>
<property name="show-handle" type="bool" value="false"/>
<property name="show-labels" type="bool" value="true"/>
</property>
<property name="plugin-4" type="string" value="separator">
<property name="expand" type="bool" value="true"/>
<property name="style" type="uint" value="0"/>
</property>
<property name="plugin-5" type="string" value="systray">
<property name="square-icons" type="bool" value="true"/>
</property>
<property name="plugin-6" type="string" value="clipman"/>
<property name="plugin-7" type="string" value="pulseaudio">
<property name="enable-keyboard-shortcuts" type="bool" value="true"/>
</property>
<property name="plugin-8" type="string" value="clock">
<property name="mode" type="uint" value="2"/>
<property name="digital-format" type="string" value="%a %d %b %H:%M"/>
<property name="tooltip-format" type="string" value="%A %d %B %Y"/>
</property>
</property>
</channel>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<channel name="xfce4-power-manager" version="1.0">
<property name="xfce4-power-manager" type="empty">
<property name="show-tray-icon" type="bool" value="true"/>
<property name="lock-screen-suspend-hibernate" type="bool" value="true"/>
<property name="logind-handle-lid-switch" type="bool" value="true"/>
</property>
</channel>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<channel name="xfce4-session" version="1.0">
<property name="general" type="empty">
<property name="SaveOnExit" type="bool" value="false"/>
<property name="PromptOnLogout" type="bool" value="true"/>
<property name="LockCommand" type="string" value="xflock4"/>
</property>
<property name="splash" type="empty">
<property name="Engine" type="string" value=""/>
</property>
</channel>

View File

@@ -12,6 +12,7 @@
'core/performance
'core/editor
'core/keybindings
'core/modal
'core/buffer
;; Tools

View File

@@ -0,0 +1,16 @@
;;; modal.el --- Vim motions for the desktop Emacs profile -*- lexical-binding: t; -*-
(use-package evil
:ensure t
:init
(setq evil-want-C-u-scroll t
evil-want-C-i-jump nil
evil-undo-system 'undo-redo)
:config
(evil-mode 1)
(evil-define-key '(normal visual motion) 'global
(kbd "SPC") fscotto/leader-map))
(provide 'modal)
;;; modal.el ends here

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="1920" height="1080" viewBox="0 0 1920 1080">
<rect width="1920" height="1080" fill="#050505"/>
</svg>

After

Width:  |  Height:  |  Size: 190 B

View File

@@ -0,0 +1,27 @@
# Prefix and Emacs-style key handling
unbind C-b
set -g prefix C-x
bind C-x send-prefix
set -g status-keys emacs
setw -g mode-keys emacs
# General behavior
set -g mouse on
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
set -g history-limit 10000
set -s escape-time 0
set -g focus-events on
# Keep the current directory when creating windows and panes
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# Reload the configuration with C-x r
bind r source-file ~/.tmux.conf \; display-message "tmux configuration reloaded"
# Terminal capabilities
set -g default-terminal "tmux-256color"
set -as terminal-features ",xterm-256color:RGB"