Migrate nymph desktop to SwayFX and Noctalia

This commit is contained in:
Fabio Scotto di Santolo
2026-04-21 23:04:52 +02:00
parent 3ef9356737
commit 4632f20c87
15 changed files with 170 additions and 419 deletions

View File

@@ -39,7 +39,6 @@ Ansible-driven personal infrastructure repo for Void desktops, Linux workstation
- Server: `ansible-playbook ansible/site.yml --limit prometheus --check --diff`
- Focused checks:
- Emacs dotfiles only: `ansible-playbook ansible/site.yml --limit ikaros --tags emacs --check --diff` or `--limit nymph --tags emacs --check --diff`
- Waybar JSON: `python3 -m json.tool dotfiles/desktop/.config/waybar/config-sway.jsonc >/dev/null`
- Mail bootstrap: `sh -n scripts/bootstrap_mail.sh` and `shellcheck scripts/bootstrap_mail.sh`
- Windows bootstrap parse: `pwsh -NoProfile -Command "[void][System.Management.Automation.Language.Parser]::ParseFile('scripts/bootstrap_windows_workstation.ps1', [ref]$null, [ref]$null)"`
- Server compose render: `docker compose -f /opt/docker/server/docker-compose.yml config`

View File

@@ -70,7 +70,7 @@ Sistema operativo:
Sessioni desktop:
- `ikaros`: i3
- `nymph`: i3 + Sway con scelta sessione a login
- `nymph`: SwayFX
Macchine:
@@ -82,8 +82,8 @@ Queste macchine condividono la stessa configurazione base desktop e vengono mant
Lo stato attuale del profilo desktop include, tra le altre cose:
- dotfiles comuni e desktop
- sessione i3 su tutti i desktop Void e sessione Sway opzionale su `nymph`
- `emptty` con scelta sessione a login su `nymph` e default host-specific sugli altri desktop
- sessione i3 su `ikaros` e sessione SwayFX su `nymph`
- `emptty` con default host-specific per il desktop attivo su ogni host
- pacchetti Void Linux e servizi runit
- `turnstile` per i servizi utente, inclusi `emacs` e `ssh-agent`
- `ssh-agent` con socket stabile condiviso tra shell, SSH ed Emacs in `~/.local/state/ssh-agent/socket`
@@ -92,7 +92,7 @@ Lo stato attuale del profilo desktop include, tra le altre cose:
- `tmux` con plugin gestiti da TPM al bootstrap del profilo desktop
- Flatpak con remoto Flathub
- GNOME Keyring e bootstrap della posta via script dedicato
- `Waybar` per Sway con `style.css` condiviso
- shell Noctalia per SwayFX su `nymph`, con plugin per clipboard, polkit e screenshot
- `kanshi` su `nymph` per il profilo monitor Wayland, con workspace Sway deterministici: in dual monitor `1` resta su `eDP-1` e `2-10` vanno su `DP-1`, mentre in laptop-only tutti tornano su `eDP-1`
---
@@ -450,13 +450,7 @@ ansible-playbook ansible/site.yml --limit deadalus-fedora --tags packages,vscode
ansible-playbook ansible/site.yml --limit prometheus --tags services,dotfiles:server --check --diff
```
Se tocchi `Waybar`, valida anche i config JSONC con:
```bash
python3 -m json.tool dotfiles/desktop/.config/waybar/config-sway.jsonc >/dev/null
```
---
---
# Bootstrap di una nuova macchina

View File

@@ -13,15 +13,11 @@ desktop_ollama_enabled: false
desktop_common_packages:
- brightnessctl
- dex
- dunst
- emptty
- network-manager-applet
- pinentry-emacs
- pinentry-gtk
- rofi
- turnstile
- udiskie
- xfce-polkit
- xdg-desktop-portal
- xdg-desktop-portal-gtk
- xdg-user-dirs
@@ -35,10 +31,15 @@ desktop_i3_packages:
- i3blocks-blocklets
- i3lock-color
- i3status
- dunst
- network-manager-applet
- rofi
- scrot
- setxkbmap
- blueman
- volumeicon
- xclip
- xfce-polkit
- xfce4-clipman-plugin
- xfce4-screenshooter
- xkbutils
@@ -50,20 +51,13 @@ desktop_sway_packages:
- grim
- kanshi
- slurp
- SwayOSD
- sway
- swayidle
- swaylock
- Waybar
- swayfx
- wl-clipboard
- xfce4-clipman-plugin
- xfce4-screenshooter
- xdg-desktop-portal-wlr
profile_packages:
- alacritty
- bluez
- blueman
- bridge-utils
- celluloid
- ctags
@@ -168,10 +162,6 @@ desktop_common_dotfiles:
src: .config/autostart/
dest: .config/autostart/
mode: preserve
- name: dunst config
src: .config/dunst/
dest: .config/dunst/
mode: preserve
- name: alacritty config
src: .config/alacritty/
dest: .config/alacritty/
@@ -180,10 +170,6 @@ desktop_common_dotfiles:
src: .config/Thunar/
dest: .config/Thunar/
mode: preserve
- name: rofi config
src: .config/rofi/
dest: .config/rofi/
mode: preserve
- name: MIME application defaults
src: .config/mimeapps.list
dest: .config/mimeapps.list
@@ -248,14 +234,6 @@ desktop_common_dotfiles:
src: .local/bin/setup-gtk-theme
dest: .local/bin/setup-gtk-theme
mode: "0755"
- name: Lock session script
src: .local/bin/lock-session
dest: .local/bin/lock-session
mode: "0755"
- name: Powermenu script
src: .local/bin/powermenu
dest: .local/bin/powermenu
mode: "0755"
- name: Turnstile environment update script
src: .local/bin/update-turnstile-env
dest: .local/bin/update-turnstile-env
@@ -280,10 +258,18 @@ desktop_i3_dotfiles:
src: .config/i3/
dest: .config/i3/
mode: preserve
- name: dunst config
src: .config/dunst/
dest: .config/dunst/
mode: preserve
- name: i3blocks config
src: .config/i3blocks/
dest: .config/i3blocks/
mode: preserve
- name: rofi config
src: .config/rofi/
dest: .config/rofi/
mode: preserve
- name: .xinitrc
src: .xinitrc
dest: .xinitrc
@@ -294,10 +280,6 @@ desktop_sway_dotfiles:
src: .config/sway/
dest: .config/sway/
mode: preserve
- name: Waybar config
src: .config/waybar/
dest: .config/waybar/
mode: preserve
- name: Sway wallpaper assets
src: .config/i3/wallpapers/
dest: .config/sway/wallpapers/
@@ -306,10 +288,6 @@ desktop_sway_dotfiles:
src: .local/bin/start-sway-session
dest: .local/bin/start-sway-session
mode: "0755"
- name: Wayland screenshot script
src: .local/bin/screenshot-wayland
dest: .local/bin/screenshot-wayland
mode: "0755"
desktop_flatpak_packages:
- be.alexandervanhee.gradia

View File

@@ -2,29 +2,58 @@
hostname: nymph
desktop_sessions_enabled:
- i3
- sway
desktop_prompt_for_session: true
desktop_default_session: sway
desktop_default_session_env: wayland
desktop_emptty_session_error_logging: rotate
host_xbps_repositories:
- name: noctalia
url: https://universalrepo.r1xelelo.workers.dev/void
host_packages:
- cliphist
- grimshot
- nvidia
- noctalia-shell
- power-profiles-daemon
- mesa-dri
- vulkan-loader
- mesa-vulkan-intel
- intel-video-accel
- tlp
- tlp-rdw
- upower
host_remove_packages:
- arandr
- autorandr
- feh
- i3
- i3blocks
- i3blocks-blocklets
- i3lock-color
- i3status
- dunst
- network-manager-applet
- rofi
- scrot
- setxkbmap
- blueman
- volumeicon
- xclip
- xfce-polkit
- xfce4-clipman-plugin
- xfce4-screenshooter
- xkbutils
- xorg-fonts
- xorg-minimal
- xss-lock
host_enabled_services:
- tlp
host_i3_dotfiles:
- src: .config/autorandr/
dest: .config/autorandr/
mode: preserve
host_sway_dotfiles:
- src: .config/sway/host.conf
dest: .config/sway/host.conf

View File

@@ -67,7 +67,16 @@
else []
)
+ (host_packages | default([]))
) | unique
)
| unique
}}
state: present
update_cache: false
- name: Remove host-specific packages on Void Linux
tags: [packages]
community.general.xbps:
name: "{{ (host_remove_packages | default([])) | unique }}"
state: absent
update_cache: false
when: (host_remove_packages | default([])) | length > 0

View File

@@ -9,10 +9,23 @@
mode: "0755"
loop:
- "{{ user_home }}/.config/sway"
- "{{ user_home }}/.config/waybar"
- "{{ user_home }}/.config/kanshi"
when: "'sway' in (desktop_sessions_enabled | default([]))"
- name: Ensure Noctalia config directories exist
tags: [dotfiles, dotfiles:desktop, sway, noctalia]
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0755"
loop:
- "{{ user_home }}/.config/noctalia"
- "{{ user_home }}/.config/noctalia/plugins"
- "{{ user_home }}/.local/share/noctalia-plugins"
when: "'sway' in (desktop_sessions_enabled | default([]))"
- name: Install Sway emptty session entry
tags: [packages, services, emptty, sway]
ansible.builtin.template:
@@ -35,3 +48,18 @@
loop_control:
label: "{{ item.dest }}"
when: "'sway' in (desktop_sessions_enabled | default([]))"
- name: Render Sway shell config
tags: [dotfiles, dotfiles:desktop, sway]
ansible.builtin.template:
src: shell.conf.j2
dest: "{{ user_home }}/.config/sway/shell.conf"
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0644"
when: "'sway' in (desktop_sessions_enabled | default([]))"
- name: Manage Noctalia shell plugins
tags: [dotfiles, dotfiles:desktop, sway, noctalia]
ansible.builtin.include_tasks: noctalia.yml
when: "'sway' in (desktop_sessions_enabled | default([]))"

View File

@@ -0,0 +1,32 @@
---
- name: Bootstrap official Noctalia plugins checkout
ansible.builtin.git:
repo: https://github.com/noctalia-dev/noctalia-plugins.git
dest: "{{ user_home }}/.local/share/noctalia-plugins/official"
version: main
update: true
become_user: "{{ username }}"
environment:
HOME: "{{ user_home }}"
- name: Bootstrap Clipper plugin checkout
ansible.builtin.git:
repo: https://github.com/blackbartblues/noctalia-clipper.git
dest: "{{ user_home }}/.config/noctalia/plugins/clipper"
version: master
update: true
become_user: "{{ username }}"
environment:
HOME: "{{ user_home }}"
- name: Link official Noctalia plugins
ansible.builtin.file:
src: "{{ user_home }}/.local/share/noctalia-plugins/official/{{ item }}"
dest: "{{ user_home }}/.config/noctalia/plugins/{{ item }}"
state: link
force: true
owner: "{{ username }}"
group: "{{ user_group }}"
loop:
- polkit-agent
- screenshot

View File

@@ -0,0 +1,29 @@
set $menu qs -c noctalia-shell ipc call launcher toggle
set $audio_panel qs -c noctalia-shell ipc call volume openPanel
set $locker qs -c noctalia-shell ipc call lockScreen lock
set $powermenu qs -c noctalia-shell ipc call sessionMenu toggle
set $screenshot_full qs -c noctalia-shell ipc call plugin:screenshot takeScreenshot output
set $screenshot_region qs -c noctalia-shell ipc call plugin:screenshot takeScreenshot region
set $screenshot_window qs -c noctalia-shell ipc call plugin:screenshot takeScreenshot window
set $audio_raise qs -c noctalia-shell ipc call volume increase
set $audio_lower qs -c noctalia-shell ipc call volume decrease
set $audio_mute qs -c noctalia-shell ipc call volume muteOutput
set $audio_mic_mute qs -c noctalia-shell ipc call volume muteInput
set $brightness_up qs -c noctalia-shell ipc call brightness increase
set $brightness_down qs -c noctalia-shell ipc call brightness decrease
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE XCURSOR_THEME XCURSOR_SIZE
exec systemctl --user import-environment WAYLAND_DISPLAY DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE XCURSOR_THEME XCURSOR_SIZE
exec ~/.local/bin/update-turnstile-env
exec dex --autostart --environment sway
exec gnome-keyring-daemon --start --components=secrets
exec ~/.local/bin/setup-gtk-theme
exec pipewire
exec pipewire-pulse
exec wireplumber
exec kanshi
exec udiskie
exec wl-paste --watch cliphist store
exec qs -c noctalia-shell
bindsym $mod+c exec qs -c noctalia-shell ipc call launcher clipboard

View File

@@ -1,46 +1,16 @@
set $mod Mod4
set $terminal alacritty
set $fallback_terminal st
set $menu rofi -show drun -theme ~/.config/rofi/config.rasi
set $locker ~/.local/bin/lock-session
set $powermenu ~/.local/bin/powermenu
set $screenshot ~/.local/bin/screenshot-wayland
# Host-specific overrides
include ~/.config/sway/host.conf
include ~/.config/sway/shell.conf
font pango:Liberation Mono 10
# Session bootstrap
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE XCURSOR_THEME XCURSOR_SIZE
exec systemctl --user import-environment WAYLAND_DISPLAY DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE XCURSOR_THEME XCURSOR_SIZE
exec ~/.local/bin/update-turnstile-env
exec dex --autostart --environment sway
exec gnome-keyring-daemon --start --components=secrets
exec ~/.local/bin/setup-gtk-theme
exec waybar -c ~/.config/waybar/config-sway.jsonc -s ~/.config/waybar/style.css
# Session services
exec pipewire
exec pipewire-pulse
exec wireplumber
exec kanshi
exec swayidle -w timeout 600 '~/.local/bin/lock-session' timeout 900 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep '~/.local/bin/lock-session'
# Tray and desktop applets
exec dunst
exec swayosd-server
exec /usr/libexec/xfce-polkit
exec nm-applet
exec blueman-applet
exec udiskie
exec xfce4-clipman
# Input and output defaults
seat seat0 xcursor_theme Yaru 24
output * bg ~/.config/sway/wallpapers/dont_like_wallpapers.jpg fill
input type:keyboard {
xkb_layout us
xkb_variant intl
@@ -74,15 +44,15 @@ bindsym $mod+Return exec $terminal
bindsym $mod+Shift+Return exec $fallback_terminal
bindsym $mod+Shift+e exec emacsclient -c -n
bindsym $mod+d exec $menu
bindsym $mod+Shift+v exec pavucontrol
bindsym $mod+Shift+v exec $audio_panel
bindsym $mod+Shift+f exec thunar
bindsym $mod+Shift+x exec $locker
bindsym $mod+Shift+q kill
# Screenshots
bindsym Print exec sh -c 'xfce4-screenshooter -f || ~/.local/bin/screenshot-wayland full'
bindsym Shift+Print exec sh -c 'xfce4-screenshooter -r || ~/.local/bin/screenshot-wayland region'
bindsym Alt+Print exec sh -c 'xfce4-screenshooter -w || ~/.local/bin/screenshot-wayland output'
bindsym Print exec $screenshot_full
bindsym Shift+Print exec $screenshot_region
bindsym Alt+Print exec $screenshot_window
# Focus
bindsym $mod+$left focus left
@@ -122,13 +92,13 @@ bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
# Volume and brightness OSD
bindsym XF86AudioRaiseVolume exec swayosd-client --output-volume raise
bindsym XF86AudioLowerVolume exec swayosd-client --output-volume lower
bindsym XF86AudioMute exec swayosd-client --output-volume mute-toggle
bindsym XF86AudioMicMute exec swayosd-client --input-volume mute-toggle
bindsym XF86AudioRaiseVolume exec $audio_raise
bindsym XF86AudioLowerVolume exec $audio_lower
bindsym XF86AudioMute exec $audio_mute
bindsym XF86AudioMicMute exec $audio_mic_mute
bindsym XF86MonBrightnessUp exec swayosd-client --brightness raise
bindsym XF86MonBrightnessDown exec swayosd-client --brightness lower
bindsym XF86MonBrightnessUp exec $brightness_up
bindsym XF86MonBrightnessDown exec $brightness_down
# Media keys
bindsym XF86AudioPlay exec playerctl play-pause

View File

@@ -1,104 +0,0 @@
{
"layer": "top",
"position": "bottom",
"height": 28,
"spacing": 4,
"modules-left": [
"sway/workspaces"
],
"modules-right": [
"pulseaudio",
"backlight",
"network",
"battery",
"temperature",
"memory",
"clock",
"tray",
"custom/powermenu"
],
"sway/workspaces": {
"disable-scroll": true,
"format": "{name}",
"sort-by-number": true
},
"pulseaudio": {
"scroll-step": 1,
"format": "󰕾 {volume}%",
"format-bluetooth": "󰂯 {volume}%",
"format-muted": "󰖁",
"on-click": "pavucontrol",
"tooltip": false
},
"backlight": {
"device": "intel_backlight",
"on-scroll-up": "brightnessctl set +5%",
"on-scroll-down": "brightnessctl set 5%-",
"format": "󰃠 {percent}%"
},
"network": {
"interval": 1,
"tooltip": true,
"format-wifi": "󰖩",
"format-ethernet": "󰈀",
"format-linked": "󰈀",
"format-disconnected": "󰖪",
"tooltip-format": "{ifname}",
"tooltip-format-wifi": "{essid} ({signalStrength}%)",
"tooltip-format-ethernet": "{ifname}",
"tooltip-format-disconnected": "Disconnected",
"on-click": "nm-connection-editor"
},
"battery": {
"interval": 10,
"states": {
"warning": 20,
"critical": 10
},
"format": "{icon} {capacity}%",
"format-charging": "󰂄 {capacity}%",
"format-plugged": "󰂄 {capacity}%",
"format-alt": "{time}"
,"format-icons": ["󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"]
},
"temperature": {
"critical-threshold": 80,
"format": "󰔏 {temperatureC}C",
"tooltip": false
},
"memory": {
"interval": 5,
"format": "󰍛 {percentage}%",
"states": {
"warning": 85
}
},
"clock": {
"interval": 60,
"timezone": "Europe/Rome",
"format": "󰥔 {:%Y-%m-%d %H:%M}",
"format-alt": "{:%A %d/%m/%Y}",
"tooltip-format": "{:%A %d %B %Y\n%H:%M:%S %Z}"
},
"custom/powermenu": {
"format": "⏻",
"on-click": "~/.local/bin/powermenu",
"tooltip": false
},
"tray": {
"icon-size": 15,
"spacing": 4
}
}

View File

@@ -1,103 +0,0 @@
* {
border: none;
border-radius: 0;
min-height: 0;
padding: 0;
margin: 0;
}
window#waybar {
background: #1f1f28;
color: #d0d0d0;
border-top: 2px solid #3a3a46;
font-family: "Liberation Mono", "Symbols Nerd Font", monospace;
font-size: 12px;
}
window#waybar * {
font-family: inherit;
font-size: inherit;
}
#workspaces,
#pulseaudio,
#backlight,
#network,
#bluetooth,
#battery,
#temperature,
#memory,
#clock,
#custom-powermenu,
#tray {
padding: 0 8px;
margin: 3px 0;
}
#workspaces {
padding-left: 10px;
}
#workspaces button {
background: transparent;
color: #9a9a9a;
padding: 0 7px;
margin: 0 2px;
border-top: 2px solid transparent;
}
#workspaces button:hover {
color: #d0d0d0;
background: transparent;
}
#workspaces button.active,
#workspaces button.focused {
background: #4a90d9;
color: #ffffff;
border-top: 2px solid #6daeea;
}
#workspaces button.urgent {
color: #ffffff;
background: #c7162b;
}
#pulseaudio,
#backlight,
#network,
#bluetooth,
#battery,
#temperature,
#memory {
color: #d0d0d0;
}
#clock,
#custom-powermenu {
color: #ffffff;
}
#clock {
padding: 0 12px;
}
#custom-powermenu {
padding: 0 12px;
}
#tray {
padding: 0 8px;
}
menu,
menuitem {
font-family: "Liberation Sans", sans-serif;
font-size: 11px;
}
tooltip {
background: #1f1f28;
border: 1px solid #4a90d9;
color: #d0d0d0;
}

View File

@@ -1,39 +0,0 @@
#!/bin/sh
set -eu
case "${XDG_CURRENT_DESKTOP:-}" in
*sway*|*Sway*)
exec swaylock -f \
--color 000000ff \
--inside-color 1f1f28ff \
--ring-color 2f4058ff \
--separator-color 3a3a46ff \
--line-color 00000000 \
--key-hl-color 6daeeaff \
--bs-hl-color c7162bff \
--inside-ver-color 1f1f28ff \
--inside-wrong-color 1f1f28ff \
--ring-ver-color 4a90d9ff \
--ring-wrong-color c7162bff \
--text-color d0d0d0ff \
--text-ver-color d0d0d0ff \
--text-wrong-color d0d0d0ff \
--indicator \
--clock
;;
*i3*|*I3*)
exec "$HOME/.config/i3/scripts/lockscreen"
;;
esac
if command -v swaylock >/dev/null 2>&1; then
exec swaylock -f
fi
if [ -x "$HOME/.config/i3/scripts/lockscreen" ]; then
exec "$HOME/.config/i3/scripts/lockscreen"
fi
printf '%s\n' 'No supported lock command found.' >&2
exit 1

View File

@@ -1,42 +0,0 @@
#!/bin/sh
set -eu
choice="$(printf 'Shutdown\nReboot\nLogout\nLock\nSuspend' \
| rofi -dmenu \
-i \
-p 'Power' \
-theme ~/.config/rofi/config.rasi \
-theme-str 'window { width: 20%; location: center; anchor: center; } listview { columns: 1; spacing: 6px; }')"
[ -n "$choice" ] || exit 0
case "$choice" in
Lock)
"$HOME/.local/bin/lock-session"
;;
Logout)
case "${XDG_CURRENT_DESKTOP:-}" in
*sway*|*Sway*)
swaymsg exit
;;
*i3*|*I3*)
i3-msg exit
;;
*)
printf '%s\n' 'Unsupported desktop session for logout.' >&2
exit 1
;;
esac
;;
Suspend)
"$HOME/.local/bin/lock-session" || true
loginctl suspend
;;
Reboot)
loginctl reboot
;;
Shutdown)
loginctl poweroff
;;
esac

View File

@@ -1,33 +0,0 @@
#!/bin/sh
set -eu
mode=${1:-full}
target_dir="$HOME/Pictures/Screenshots"
target_file="$target_dir/$(date +%Y-%m-%d-%H%M%S).png"
mkdir -p "$target_dir"
case "$mode" in
full)
grim "$target_file"
;;
region)
grim -g "$(slurp)" "$target_file"
;;
output)
grim -g "$(slurp -o)" "$target_file"
;;
*)
printf 'Usage: %s [full|region|output]\n' "$0" >&2
exit 1
;;
esac
if command -v wl-copy >/dev/null 2>&1; then
wl-copy < "$target_file"
fi
if command -v notify-send >/dev/null 2>&1; then
notify-send "Screenshot saved" "$target_file"
fi

View File

@@ -1,5 +1,9 @@
set $terminal ~/.local/bin/prime-run /usr/bin/alacritty
gaps inner 10
gaps outer 5
corner_radius 10
workspace 1 output eDP-1
workspace 2 output DP-1
workspace 3 output DP-1