28 Commits

Author SHA1 Message Date
Fabio Scotto di Santolo
fb81d1082c Enable JSON LSP support in Emacs 2026-05-01 21:19:02 +02:00
Fabio Scotto di Santolo
cd8c775630 Add i3 session to nymph and cleanup script for sway 2026-04-30 12:12:36 +02:00
Fabio Scotto di Santolo
dab66bda47 Add linux-mainline kernel packages to Void and nymph 2026-04-30 11:53:09 +02:00
Fabio Scotto di Santolo
e0fe207771 Add hugo to Void base packages 2026-04-29 19:27:29 +02:00
Fabio Scotto di Santolo
eaf1a7f182 Change gpg key for encrypt 2026-04-29 18:47:12 +02:00
Fabio Scotto di Santolo
4b5879a67e Add task for extract templates for desktop 2026-04-29 09:02:49 +02:00
Fabio Scotto di Santolo
46b6bcd62c Add gist and github-cli to Void base packages 2026-04-28 20:53:48 +02:00
Fabio Scotto di Santolo
d48d2db0ba Color ap command output in cyan
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 18:00:09 +02:00
Fabio Scotto di Santolo
18ea0a02ad Fix Alacritty keyboard bindings 2026-04-28 17:50:02 +02:00
Fabio Scotto di Santolo
fa6b082381 Add Claude to Emacs project agent picker 2026-04-28 17:40:43 +02:00
Fabio Scotto di Santolo
e2a66c623f Add Claude Code agent configuration 2026-04-28 17:29:52 +02:00
Fabio Scotto di Santolo
164b11bb73 Add speech dispatcher to Void packages 2026-04-28 16:19:27 +02:00
Fabio Scotto di Santolo
10b0a6225b Update desktop SSH defaults 2026-04-28 16:14:19 +02:00
Fabio Scotto di Santolo
bcd8635d9e Disable Nextcloud AIO on server 2026-04-28 16:07:34 +02:00
Fabio Scotto di Santolo
aa0f787d00 Skip AI agent dotfiles on servers 2026-04-28 14:55:32 +02:00
Fabio Scotto di Santolo
949ae2c47f Add Nextcloud AIO service 2026-04-28 14:48:21 +02:00
Fabio Scotto di Santolo
16850eba53 Update agent operating notes 2026-04-28 12:12:50 +02:00
Fabio Scotto di Santolo
e0869e72d6 Change i3 and i3lock backgrounds 2026-04-27 21:48:37 +02:00
Fabio Scotto di Santolo
e9af0bd1af Template Codex instructions path 2026-04-27 20:48:18 +02:00
Fabio Scotto di Santolo
763bbd8b9f Gemini: configure CLI and update workstation/wsl inventory 2026-04-27 19:22:20 +02:00
Fabio Scotto di Santolo
950cbff85c Ansible: implement selective AI agent deployment across profiles 2026-04-27 19:17:18 +02:00
Fabio Scotto di Santolo
003679f499 Refactor: centralize AI instructions and opencode config into common dotfiles 2026-04-27 19:17:14 +02:00
Fabio Scotto di Santolo
ab294f4cb7 Add NTFS support to Void desktops 2026-04-27 08:37:56 +02:00
Fabio Scotto di Santolo
325a405012 Add Gemini CLI agent support with robust session parsing 2026-04-27 08:27:34 +02:00
Fabio Scotto di Santolo
c9fa536bb5 Add Gemini CLI to npm packages 2026-04-26 20:43:13 +02:00
Fabio Scotto di Santolo
a108957ba4 Add Codex CLI agent support to project launcher 2026-04-26 19:39:14 +02:00
Fabio Scotto di Santolo
0eba6aa9c8 Add OpenAI Codex CLI to npm packages 2026-04-26 16:11:43 +02:00
Fabio Scotto di Santolo
d036eee00a Move nordic-night-theme load into :config block 2026-04-26 15:58:01 +02:00
70 changed files with 469 additions and 512 deletions

0
.codex Normal file
View File

View File

@@ -6,7 +6,9 @@ Ansible-driven personal infrastructure repo for Void desktops, Linux workstation
- Main orchestration: `ansible/site.yml`
- Inventory and layering inputs: `ansible/inventory/hosts.yml`, `ansible/inventory/group_vars/*.yml`, `ansible/inventory/host_vars/*.yml`
- Dotfiles live under `dotfiles/`
- OpenCode loads global instructions from `dotfiles/desktop/.config/opencode/opencode.json`
- AI agent instructions (bootstrap, rules, knowledge) are centralized in `dotfiles/common/.config/ai/` and shared between OpenCode, Codex, and Gemini CLI.
- OpenCode loads its entrypoint configuration from `dotfiles/common/.config/opencode/opencode.json`.
- Codex config is rendered from `dotfiles/common/.codex/config.toml.j2` so `model_instructions_file` points to the deployed `~/.config/ai/bootstrap.md`.
## Topology
- Void desktops: `ikaros`, `nymph`
@@ -38,7 +40,7 @@ Ansible-driven personal infrastructure repo for Void desktops, Linux workstation
- WSL dev: `ansible-playbook ansible/site.yml --limit deadalus-wsl --check --diff`
- 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`
- Emacs dotfiles only: `ansible-playbook ansible/site.yml --limit ikaros --tags emacs --check --diff` or `--limit nymph --tags emacs --check --diff`
- Sway/Noctalia bootstrap on nymph: `ansible-playbook ansible/site.yml --limit nymph --tags packages,dotfiles:desktop,sway --check --diff`
- 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)"`
@@ -55,6 +57,7 @@ Ansible-driven personal infrastructure repo for Void desktops, Linux workstation
## Desktop Void Notes
- `profile_desktop_common` owns the shared desktop bootstrap.
- `.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`.
- User services are managed by `turnstile` and live under `dotfiles/desktop/.config/service/`.
- `ssh-agent` runs under `turnstile` with stable socket `~/.local/state/ssh-agent/socket`.
- Critical session entrypoints:
@@ -73,6 +76,13 @@ Ansible-driven personal infrastructure repo for Void desktops, Linux workstation
- `workstation_host_windows` runs with `gather_facts: false` and validates PSRP settings plus `windows_package_backend` before role execution.
- Windows taskbar pins are driven by `windows_taskbar_pins` in `ansible/inventory/group_vars/workstation_host_windows.yml`; validate identifiers from a real Windows session before changing them.
## Coding Agent Notes
- Shared agent packages live in `ai_agents_npm_packages` in `ansible/inventory/group_vars/all.yml`.
- Shared agent dotfiles live in `ai_agents_dotfiles`; rendered configs live in `ai_agents_templates`.
- Desktop, native workstation, and WSL profiles consume the shared agent package list; do not duplicate package entries in profile-specific vars.
- `dotfiles_common` copies common dotfiles plus `ai_agents_dotfiles`, then renders `ai_agents_templates`.
- Keep `.config/ai/` as the common instruction source; update agent-specific entrypoints to reference it rather than duplicating instruction text.
## Tooling Notes
- Install local tooling with:
- `python3 -m pip install ansible ansible-lint yamllint shellcheck-py`

View File

@@ -91,7 +91,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
- shell Noctalia su Sway su `nymph`, con plugin ufficiali per clipboard (`clipper`, `clipboard`), polkit (`polkit-agent`) e gestione USB (`usb-drive-manager`); config condivisa in `dotfiles/desktop/.config/noctalia/` e `settings.json` renderizzato da template Ansible con variabili host-specifiche
- shell Noctalia su Sway su `nymph`, con plugin ufficiali per clipboard (`clipper`), polkit (`polkit-agent`), screenshot (`screenshot`) e gestione USB (`usb-drive-manager`); config condivisa in `dotfiles/desktop/.config/noctalia/` e `settings.json` renderizzato da template Ansible con variabili host-specifiche
- `udiskie` come backend per automount/LUKS su Sway, senza tray; la UI dei dispositivi removibili è demandata a `usb-drive-manager`
- `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`
- monitor Noctalia e `screenOverrides` dichiarati in inventory (`noctalia_bar_monitors`, `noctalia_screen_overrides`) per host `nymph`

View File

@@ -50,6 +50,42 @@ common_dotfiles:
dest: .vimrc
mode: "0644"
- name: bat config
src: .config/bat/.config/bat/
src: .config/bat/
dest: .config/bat/
mode: preserve
ai_agents_npm_packages:
- name: "opencode-ai"
state: latest
- name: "@anthropic-ai/claude-code"
state: latest
- name: "@openai/codex"
state: latest
- name: "@google/gemini-cli"
state: latest
ai_agents_enabled: true
ai_agents_dotfiles:
- name: AI common config
src: .config/ai/
dest: .config/ai/
mode: preserve
- name: Gemini CLI config
src: .gemini/
dest: .gemini/
mode: preserve
- name: OpenCode config
src: .config/opencode/
dest: .config/opencode/
mode: preserve
- name: Claude Code memory
src: .claude/
dest: .claude/
mode: preserve
ai_agents_templates:
- name: Codex config
src: .codex/config.toml.j2
dest: .codex/config.toml
mode: "0644"

View File

@@ -9,16 +9,6 @@ desktop_default_session_env: xorg
desktop_restart_emptty_automatically: false
desktop_emptty_session_error_logging: disabled
desktop_ui_font_family: Noto Sans
desktop_ui_font_size: 10
desktop_fixed_font_family: Hack Nerd Font
desktop_sway_font_size: 10
desktop_alacritty_font_size: 12
desktop_emacs_font_size: 14
desktop_cursor_theme: Yaru
desktop_cursor_size: 24
desktop_icon_theme: Yaru-orange-dark
desktop_common_packages:
- brightnessctl
- dex
@@ -57,18 +47,12 @@ desktop_i3_packages:
- xss-lock
desktop_sway_packages:
- adw-gtk-theme
- flameshot
- grim
- kanshi
- qt5ct
- qt6ct
- slurp
- swayfx
- wl-clipboard
- xhost
- xdg-desktop-portal-wlr
- xorg-server-xwayland
profile_packages:
- alacritty
@@ -162,9 +146,7 @@ desktop_source_tools:
desktop_binary_tools: []
desktop_npm_packages:
- name: "opencode-ai"
state: latest
desktop_npm_packages: "{{ ai_agents_npm_packages + [] }}"
desktop_common_dotfiles:
- name: XDG autostart entries
@@ -199,10 +181,6 @@ desktop_common_dotfiles:
src: .config/yt-dlp/
dest: .config/yt-dlp/
mode: preserve
- name: OpenCode config
src: .config/opencode/
dest: .config/opencode/
mode: preserve
- name: MPV config
src: .config/mpv/
dest: .config/mpv/
@@ -247,18 +225,10 @@ desktop_common_dotfiles:
src: .local/bin/update-turnstile-env
dest: .local/bin/update-turnstile-env
mode: "0755"
- name: Gufw Sway wrapper
src: .local/bin/run-gufw
dest: .local/bin/run-gufw
mode: "0755"
- name: Udiskie password helper
src: .local/bin/udiskie-password
dest: .local/bin/udiskie-password
mode: "0755"
- name: Desktop application overrides
src: .local/share/applications/
dest: .local/share/applications/
mode: preserve
- name: SSH config
src: .ssh/config
dest: .ssh/config
@@ -301,10 +271,6 @@ desktop_sway_dotfiles:
src: .config/i3/wallpapers/
dest: .config/sway/wallpapers/
mode: preserve
- name: Noctalia wallpaper library
src: Pictures/Wallpapers/
dest: Pictures/Wallpapers/
mode: preserve
- name: Sway session wrapper
src: .local/bin/start-sway-session
dest: .local/bin/start-sway-session
@@ -327,8 +293,6 @@ noctalia_bar_monitors:
noctalia_screen_overrides: []
noctalia_wallpaper: "{{ user_home }}/Pictures/Wallpapers/star-wars-trio.jpg"
desktop_flatpak_packages:
- be.alexandervanhee.gradia
- ch.protonmail.protonmail-bridge
@@ -340,14 +304,4 @@ desktop_flatpak_packages:
- org.telegram.desktop
desktop_flatpak_extensions:
- org.gtk.Gtk3theme.Yaru-Orange-dark//3.22
desktop_flatpak_global_filesystems:
- xdg-config/gtk-3.0:ro
- xdg-config/gtk-4.0:ro
- xdg-config/qt5ct:ro
- xdg-config/qt6ct:ro
desktop_flatpak_global_env:
- QT_QPA_PLATFORM=wayland
- QT_QPA_PLATFORMTHEME=qt6ct
- org.gtk.Gtk3theme.Yaru-Blue-dark//stable

View File

@@ -6,6 +6,7 @@ effective_username: "{{ server_username }}"
effective_user_group: "{{ server_user_group }}"
effective_user_home: "{{ server_user_home }}"
server_container_stack_dir: /opt/docker/server
ai_agents_enabled: false
profile_packages:
- avahi-daemon
@@ -92,6 +93,14 @@ server_directories:
owner: "1000"
group: "1000"
mode: "0755"
- path: /srv/nextcloud
owner: root
group: root
mode: "0755"
- path: /srv/nextcloud/data
owner: root
group: root
mode: "0755"
server_ufw_rules:
- rule: allow

View File

@@ -18,18 +18,23 @@ void_packages_base:
- fuse3
- gcc
- gdb
- gist
- github-cli
- gnome-keyring
- go
- gvfs
- hugo
- ImageMagick
- isync
- libsecret
- libtool
- linux-mainline
- lm_sensors
- msmtp
- mu4e
- network-manager-applet
- nodejs
- ntfs-3g
- pavucontrol
- pipewire
- pkg-config
@@ -42,6 +47,7 @@ void_packages_base:
- simple-scan
- socklog
- socklog-void
- speech-dispatcher
- syncthing
- system-config-printer
- tmux

View File

@@ -1,6 +1,4 @@
---
workstation_manage_opencode: true
workstation_npm_packages:
- name: "opencode-ai"
state: latest
workstation_npm_packages: "{{ ai_agents_npm_packages + [] }}"

View File

@@ -2,10 +2,10 @@
hostname: nymph
desktop_sessions_enabled:
- sway
- i3
desktop_default_session: sway
desktop_default_session_env: wayland
desktop_default_session: i3
desktop_default_session_env: xorg
desktop_emptty_session_error_logging: rotate
host_xbps_repositories:
@@ -16,6 +16,7 @@ host_packages:
- cliphist
- grimshot
- nvidia
- linux-mainline-headers
- noctalia-shell
- power-profiles-daemon
- mesa-dri

View File

@@ -16,6 +16,15 @@
loop: "{{ xdg_user_directories | default([]) }}"
when: "'void' in group_names"
- name: Extract templates kit to Templates directory
tags: [dotfiles, dotfiles:common]
ansible.builtin.unarchive:
src: "{{ playbook_dir }}/../dotfiles/common/templates_kit.zip"
dest: "{{ effective_user_home }}/Templates"
owner: "{{ effective_username }}"
group: "{{ effective_user_group }}"
when: "'void' in group_names"
- name: Ensure SSH socket directory exists
tags: [dotfiles, dotfiles:common]
ansible.builtin.file:
@@ -33,10 +42,41 @@
owner: "{{ effective_username }}"
group: "{{ effective_user_group }}"
mode: "{{ item.mode }}"
loop: "{{ common_dotfiles | default([]) }}"
loop: >-
{{
(common_dotfiles | default([]))
+ ((ai_agents_dotfiles | default([])) if (ai_agents_enabled | default(false)) else [])
}}
loop_control:
label: "{{ item.dest }}"
- name: Ensure AI config directories exist
tags: [dotfiles, dotfiles:common]
ansible.builtin.file:
path: "{{ effective_user_home }}/{{ item }}"
state: directory
owner: "{{ effective_username }}"
group: "{{ effective_user_group }}"
mode: "0755"
loop:
- .codex
when:
- ai_agents_enabled | default(false)
- (ai_agents_templates | default([])) | length > 0
- name: Render AI agent templates
tags: [dotfiles, dotfiles:common]
ansible.builtin.template:
src: "{{ playbook_dir }}/../dotfiles/common/{{ item.src }}"
dest: "{{ effective_user_home }}/{{ item.dest }}"
owner: "{{ effective_username }}"
group: "{{ effective_user_group }}"
mode: "{{ item.mode }}"
loop: "{{ ai_agents_templates | default([]) }}"
loop_control:
label: "{{ item.dest }}"
when: ai_agents_enabled | default(false)
- name: Refresh bat cache
tags: [dotfiles, dotfiles:common]
ansible.builtin.command:

View File

@@ -18,10 +18,10 @@
loop:
- "{{ user_home }}/.config"
- "{{ user_home }}/.config/autostart"
- "{{ user_home }}/.config/dunst"
- "{{ user_home }}/.config/alacritty"
- "{{ user_home }}/.config/Thunar"
- "{{ user_home }}/.local/share"
- "{{ user_home }}/.local/share/applications"
- "{{ user_home }}/.config/rofi"
- "{{ user_home }}/.tmux"
- "{{ user_home }}/.tmux/bin"
- "{{ user_home }}/.tmux/plugins"

View File

@@ -10,10 +10,6 @@
loop:
- "{{ user_home }}/.config/sway"
- "{{ user_home }}/.config/kanshi"
- "{{ user_home }}/.config/qt5ct"
- "{{ user_home }}/.config/qt5ct/colors"
- "{{ user_home }}/.config/qt6ct"
- "{{ user_home }}/.config/qt6ct/colors"
when: "'sway' in (desktop_sessions_enabled | default([]))"
- name: Ensure Noctalia config directories exist
@@ -73,26 +69,6 @@
mode: "0644"
when: "'sway' in (desktop_sessions_enabled | default([]))"
- name: Render qt5ct config
tags: [dotfiles, dotfiles:desktop, sway, noctalia]
ansible.builtin.template:
src: qt5ct.conf.j2
dest: "{{ user_home }}/.config/qt5ct/qt5ct.conf"
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0644"
when: "'sway' in (desktop_sessions_enabled | default([]))"
- name: Render qt6ct config
tags: [dotfiles, dotfiles:desktop, sway, noctalia]
ansible.builtin.template:
src: qt6ct.conf.j2
dest: "{{ user_home }}/.config/qt6ct/qt6ct.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
@@ -107,37 +83,3 @@
group: "{{ user_group }}"
mode: "0644"
when: "'sway' in (desktop_sessions_enabled | default([]))"
- name: Allow Flatpak apps to read shared theme configs
tags: [packages, dotfiles, dotfiles:desktop, sway, noctalia]
ansible.builtin.command:
argv:
- flatpak
- override
- --user
- "--filesystem={{ item }}"
become_user: "{{ username }}"
environment:
HOME: "{{ user_home }}"
changed_when: false
loop: "{{ desktop_flatpak_global_filesystems | default([]) }}"
when:
- "'sway' in (desktop_sessions_enabled | default([]))"
- (desktop_flatpak_packages | default([])) | length > 0
- name: Export global Flatpak environment for theme integration
tags: [packages, dotfiles, dotfiles:desktop, sway, noctalia]
ansible.builtin.command:
argv:
- flatpak
- override
- --user
- "--env={{ item }}"
become_user: "{{ username }}"
environment:
HOME: "{{ user_home }}"
changed_when: false
loop: "{{ desktop_flatpak_global_env | default([]) }}"
when:
- "'sway' in (desktop_sessions_enabled | default([]))"
- (desktop_flatpak_packages | default([])) | length > 0

View File

@@ -137,22 +137,6 @@
owner: "{{ username }}"
group: "{{ user_group }}"
loop:
- clipboard
- polkit-agent
- screenshot
- usb-drive-manager
- name: Ensure Noctalia cache directory exists
ansible.builtin.file:
path: "{{ user_home }}/.cache/noctalia"
state: directory
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0755"
- name: Deploy Noctalia wallpapers cache
ansible.builtin.template:
src: wallpapers.json.j2
dest: "{{ user_home }}/.cache/noctalia/wallpapers.json"
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0644"

View File

@@ -203,18 +203,6 @@
"middleClickCommand": "pwvucontrol || pavucontrol",
"textColor": "none"
},
{
"displayMode": "onhover",
"iconColor": "none",
"id": "Network",
"textColor": "none"
},
{
"displayMode": "onhover",
"iconColor": "none",
"id": "Bluetooth",
"textColor": "none"
},
{
"applyToAllMonitors": false,
"displayMode": "onhover",
@@ -573,17 +561,15 @@
{"enabled": true, "id": "alacritty"},
{"enabled": true, "id": "gtk"},
{"enabled": true, "id": "emacs"},
{"enabled": true, "id": "telegram"},
{"enabled": true, "id": "qt"},
{"enabled": true, "id": "sway"}
{"enabled": true, "id": "telegram"}
],
"enableUserTheming": false
},
"ui": {
"boxBorderEnabled": false,
"fontDefault": "{{ desktop_ui_font_family | default('Noto Sans') }}",
"fontDefault": "Sans Serif",
"fontDefaultScale": 1,
"fontFixed": "{{ desktop_fixed_font_family | default('Hack Nerd Font') }}",
"fontFixed": "monospace",
"fontFixedScale": 1,
"panelBackgroundOpacity": 0.93,
"panelsAttachedToBar": true,

View File

@@ -1,6 +0,0 @@
[Appearance]
color_scheme_path={{ user_home }}/.config/qt5ct/colors/noctalia.conf
custom_palette=true
icon_theme={{ desktop_icon_theme | default('Yaru-orange-dark') }}
standard_dialogs=default
style=Fusion

View File

@@ -1,6 +0,0 @@
[Appearance]
color_scheme_path={{ user_home }}/.config/qt6ct/colors/noctalia.conf
custom_palette=true
icon_theme={{ desktop_icon_theme | default('Yaru-orange-dark') }}
standard_dialogs=default
style=Fusion

View File

@@ -2,9 +2,9 @@ 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 sh -c 'QT_QPA_PLATFORM=wayland flameshot full --clipboard'
set $screenshot_region sh -c 'QT_QPA_PLATFORM=wayland flameshot gui'
set $screenshot_window sh -c 'QT_QPA_PLATFORM=wayland flameshot gui'
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
@@ -22,11 +22,8 @@ exec pipewire
exec pipewire-pulse
exec wireplumber
exec kanshi
exec flameshot
exec udiskie --no-tray
exec wl-paste --watch cliphist store
exec qs -c noctalia-shell
bindsym $mod+c exec qs -c noctalia-shell ipc call launcher clipboard
bindsym $mod+Ctrl+v exec qs -c noctalia-shell ipc call plugin:clipboard toggle
bindsym $mod+Ctrl+Shift+v exec qs -c noctalia-shell ipc call plugin:clipboard wipe

View File

@@ -1,18 +0,0 @@
{
"defaultWallpaper": "/etc/xdg/quickshell/noctalia-shell/Assets/Wallpaper/noctalia.png",
"usedRandomWallpapers": {},
"wallpapers": {
"": {
"dark": "{{ noctalia_wallpaper }}",
"light": "{{ noctalia_wallpaper }}"
},
"DP-1": {
"dark": "{{ noctalia_wallpaper }}",
"light": "{{ noctalia_wallpaper }}"
},
"eDP-1": {
"dark": "{{ noctalia_wallpaper }}",
"light": "{{ noctalia_wallpaper }}"
}
}
}

View File

@@ -36,6 +36,25 @@ services:
- web
- gitea
# Disabled: prometheus does not have enough resources to run Nextcloud AIO.
# nextcloud-aio-mastercontainer:
# image: ghcr.io/nextcloud-releases/all-in-one:latest
# container_name: nextcloud-aio-mastercontainer
# init: true
# restart: always
# ports:
# - "127.0.0.1:8080:8080"
# environment:
# APACHE_PORT: "11000"
# APACHE_IP_BINDING: "0.0.0.0"
# APACHE_ADDITIONAL_NETWORK: "server_web"
# NEXTCLOUD_DATADIR: "/srv/nextcloud/data"
# volumes:
# - "nextcloud_aio_mastercontainer:/mnt/docker-aio-config"
# - "/var/run/docker.sock:/var/run/docker.sock:ro"
# networks:
# - web
navidromedb:
image: postgres:13
container_name: navidromedb
@@ -87,6 +106,11 @@ services:
networks:
web:
name: server_web
external: false
gitea:
external: false
# volumes:
# nextcloud_aio_mastercontainer:
# name: nextcloud_aio_mastercontainer

View File

@@ -0,0 +1,5 @@
# Claude Code Global Context
Import the shared coding agent bootstrap context:
@~/.config/ai/bootstrap.md

View File

@@ -0,0 +1,16 @@
model = "gpt-5.5"
model_reasoning_effort = "medium"
model_instructions_file = "{{ effective_user_home }}/.config/ai/bootstrap.md"
[projects."/home/fscotto/AnsiblePlaybook"]
trust_level = "trusted"
[tui]
theme = "coldark-dark"
[tui.model_availability_nux]
"gpt-5.5" = 3
[features]
memories = true

View File

@@ -0,0 +1,7 @@
{
"$schema": "https://opencode.ai/config.json",
"instructions": [
"~/.config/ai/bootstrap.md",
"~/.config/ai/rules/safety.md"
]
}

View File

@@ -0,0 +1,14 @@
{
"security": {
"auth": {
"selectedType": "oauth-personal"
}
},
"context": {
"fileName": [
"~/.config/ai/bootstrap.md",
"~/.config/ai/rules/safety.md",
"~/.config/ai/AGENTS.md"
]
}
}

Binary file not shown.

Binary file not shown.

View File

@@ -12,7 +12,7 @@ ap() {
cmd+=(--tag "$1")
fi
printf '+ %s\n' "${cmd[*]}"
printf '\033[0;36m+ %s\033[0m\n' "${cmd[*]}"
"${cmd[@]}"
)
}

View File

@@ -1,6 +1,3 @@
[general]
import = ["~/.config/alacritty/themes/noctalia.toml"]
[window]
padding = { x = 8, y = 8 }
opacity = 1.0
@@ -16,8 +13,33 @@ multiplier = 3
[cursor]
style = { shape = "Beam", blinking = "Off" }
[colors.primary]
background = "#000000"
foreground = "#c8c8c8"
[colors.normal]
black = "#1f1f28"
red = "#c7162b"
green = "#4caf50"
yellow = "#e95420"
blue = "#4a90d9"
magenta = "#7e57c2"
cyan = "#6daeea"
white = "#eeeeee"
[colors.bright]
black = "#3a3a46"
red = "#ff5c5c"
green = "#7ad97a"
yellow = "#ff8f40"
blue = "#6daeea"
magenta = "#9575cd"
cyan = "#8bd6ff"
white = "#ffffff"
[keyboard]
bindings = [
{ key = "V", mods = "Control|Shift", action = "Paste" },
{ key = "C", mods = "Control|Shift", action = "Copy" }
{ key = "C", mods = "Control|Shift", action = "Copy" },
{ key = "Return", mods = "Shift", chars = "\u001B\r" }
]

View File

@@ -9,7 +9,7 @@ font pango:Liberation Mono 10
exec --no-startup-id dex --autostart --environment i3
exec --no-startup-id gnome-keyring-daemon --start --components=secrets
exec_always --no-startup-id setxkbmap -layout us -variant intl
exec_always --no-startup-id feh --bg-fill ~/.config/i3/wallpapers/void-minimalist2.png
exec_always --no-startup-id feh --bg-center ~/.config/i3/wallpapers/wallpaper-161664.jpg
exec_always --no-startup-id ~/.config/i3/scripts/setup-gtk-theme.sh
exec --no-startup-id /usr/libexec/xdg-desktop-portal

View File

@@ -1,6 +1,6 @@
#!/bin/sh
wallpaper="$HOME/.config/i3/wallpapers/void-minimalist.png"
wallpaper="$HOME/.config/i3/wallpapers/maxresdefault.jpg"
cached="$HOME/.cache/i3lock/wallpaper.png"
dims_cache="$HOME/.cache/i3lock/dims.txt"
dims=$(xdotool getdisplaygeometry | tr ' ' 'x')

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

View File

@@ -7,10 +7,6 @@
}
],
"states": {
"clipboard": {
"enabled": true,
"sourceUrl": "https://github.com/noctalia-dev/noctalia-plugins"
},
"clipper": {
"enabled": true,
"sourceUrl": "https://github.com/noctalia-dev/noctalia-plugins"
@@ -19,6 +15,10 @@
"enabled": true,
"sourceUrl": "https://github.com/noctalia-dev/noctalia-plugins"
},
"screenshot": {
"enabled": true,
"sourceUrl": "https://github.com/noctalia-dev/noctalia-plugins"
},
"usb-drive-manager": {
"enabled": true,
"sourceUrl": "https://github.com/noctalia-dev/noctalia-plugins"

View File

@@ -38,7 +38,43 @@
"fg": "mOnError"
}
},
"customColors": {},
"customColors": {
"Text": {
"bg": "#555555",
"separator": "#000000",
"fg": "#e9e4f0"
},
"Image": {
"bg": "#e0b7c9",
"separator": "#000000",
"fg": "#20161f"
},
"Link": {
"bg": "#c7a1d8",
"separator": "#000000",
"fg": "#1a151f"
},
"Code": {
"bg": "#a984c4",
"separator": "#000000",
"fg": "#f3edf7"
},
"Color": {
"bg": "#a984c4",
"separator": "#000000",
"fg": "#f3edf7"
},
"Emoji": {
"bg": "#e0b7c9",
"separator": "#000000",
"fg": "#20161f"
},
"File": {
"bg": "#e9899d",
"separator": "#000000",
"fg": "#1e1418"
}
},
"enableTodoIntegration": true,
"autoOpenPinnedPanel": false,
"pincardsEnabled": true,

View File

@@ -1,7 +0,0 @@
{
"$schema": "https://opencode.ai/config.json",
"instructions": [
"~/.config/opencode/bootstrap.md",
"~/.config/opencode/rules/safety.md"
]
}

View File

@@ -6,7 +6,7 @@ set $fallback_terminal st
include ~/.config/sway/host.conf
include ~/.config/sway/shell.conf
font pango:Hack Nerd Font 10
font pango:Liberation Mono 10
# Input and output defaults
seat seat0 xcursor_theme Yaru 24
@@ -166,4 +166,9 @@ mode "resize" {
bindsym $mod+r mode "resize"
include ~/.config/sway/noctalia
client.focused #4a90d9 #4a90d9 #ffffff #4a90d9 #4a90d9
client.focused_inactive #3a3a46 #2b2b36 #eeeeee #3a3a46 #3a3a46
client.unfocused #2b2b36 #1f1f28 #bcbcbc #2b2b36 #2b2b36
client.urgent #c7162b #c7162b #ffffff #c7162b #c7162b
client.placeholder #1f1f28 #1f1f28 #bcbcbc #1f1f28 #1f1f28
client.background #1f1f28

View File

@@ -105,8 +105,8 @@
(define-key projectile-command-map (kbd "v") #'fscotto/project-multi-vterm)
(define-key projectile-command-map (kbd "V") nil)
(define-key projectile-command-map (kbd "x") #'fscotto/project-external-terminal)
(define-key projectile-command-map (kbd "a") #'fscotto/project-opencode-dwim)
(define-key projectile-command-map (kbd "A") #'fscotto/project-opencode-session)
(define-key projectile-command-map (kbd "a") #'fscotto/project-agent-dwim)
(define-key projectile-command-map (kbd "A") #'fscotto/project-agent-session)
(define-key projectile-command-map (kbd "g") #'fscotto/project-magit-status))
;;;; LSP

View File

@@ -1,14 +1,16 @@
;;; core-ui.el -*- lexical-binding: t; -*-
;; Load generated Noctalia theme.
(add-to-list 'custom-theme-load-path (expand-file-name "themes" user-emacs-directory))
(load-theme 'noctalia t)
;; Load default theme
(use-package nordic-night-theme
:ensure t
:config
(load-theme 'nordic-night t))
;; Setting default font
(set-frame-font "Hack Nerd Font 14" nil t)
(set-frame-font "Liberation Mono 14" nil t)
(add-to-list 'default-frame-alist
'(font . "Hack Nerd Font-14"))
'(font . "Liberation Mono-14"))
;; Remove toolbar
(tool-bar-mode -1)

View File

@@ -1,6 +1,23 @@
;;; json.el -*- lexical-binding: t -*-
(defun fscotto/json-maybe-start-lsp ()
"Start LSP for JSON buffers when lsp-mode is available."
(when (fboundp 'lsp-deferred)
(lsp-deferred)))
(use-package json-mode
:ensure t)
:ensure t
:mode
(("\\.json\\'" . json-mode)
("\\.jsonc\\'" . json-mode))
:hook
(json-mode . fscotto/json-maybe-start-lsp))
(with-eval-after-load 'json-ts-mode
(add-hook 'json-ts-mode-hook #'fscotto/json-maybe-start-lsp))
(with-eval-after-load 'jsonc-mode
(add-hook 'jsonc-mode-hook #'fscotto/json-maybe-start-lsp))
(provide 'json)

View File

@@ -1,4 +1,5 @@
;;functions to support syncing .elfeed between machines
(require 'seq)
(require 'subr-x)
;;makes sure elfeed reads index from disk before launching
(defvar fscotto/elfeed-initial-update-done nil
"Non-nil once Elfeed has triggered its first automatic update this session.")
@@ -128,16 +129,24 @@ Each entry is a cons cell of display string and session id."
"Return the latest saved OpenCode session id for the current project."
(cdr (car (fscotto/opencode-session-candidates (fscotto/project-root)))))
(defun fscotto/project-opencode-dwim ()
"Open the most useful OpenCode session for the current project.
Resume the latest saved session when available, otherwise create a new one."
(defun fscotto/project-agent-dwim ()
"Choose an agent for the current project and launch it externally."
(interactive)
(let ((session-id (fscotto/project-opencode-latest-session-id)))
(if session-id
(fscotto/launch-external-terminal (list "opencode" "--session" session-id)
(fscotto/project-root))
(fscotto/project-opencode))))
(let ((agent (completing-read "Agent: " '("Claude" "Codex" "Gemini" "OpenCode") nil t)))
(pcase agent
("Claude"
(fscotto/launch-external-terminal '("claude" "--continue")))
("OpenCode"
(let ((session-id (fscotto/project-opencode-latest-session-id)))
(if session-id
(fscotto/launch-external-terminal (list "opencode" "--session" session-id)
(fscotto/project-root))
(fscotto/project-opencode))))
("Codex"
(fscotto/launch-external-terminal '("codex" "resume" "--last")))
("Gemini"
(fscotto/launch-external-terminal '("gemini" "--resume" "latest")
(fscotto/project-root))))))
(defun fscotto/project-opencode-session ()
"Resume a saved OpenCode session for the current project."
@@ -151,6 +160,78 @@ Resume the latest saved session when available, otherwise create a new one."
(fscotto/launch-external-terminal (list "opencode" "--session" session-id)
project-directory))))
(defun fscotto/gemini-session-candidates (directory)
"Return Gemini session candidates for DIRECTORY.
Each entry is a cons cell of display string and session index.
Tries JSON output first, falls back to text parsing if unavailable."
(let* ((default-directory (file-name-as-directory directory))
(json-output (shell-command-to-string
"gemini --list-sessions --output-format json 2>/dev/null")))
(cond
((string-match "^{" json-output)
(ignore-errors
(require 'json)
(let* ((parsed (json-parse-string json-output))
(sessions (gethash "sessions" parsed)))
(when (vectorp sessions)
(seq-map-indexed
(lambda (s idx)
(let* ((idx-str (number-to-string (1+ idx)))
(msg (if (hash-table-p s)
(or (gethash "firstUserMessage" s) "Session")
"Session"))
(ts (and (hash-table-p s)
(ignore-errors (gethash "lastUpdated" s))
(when (stringp it) (string-trim it))))
(label (if ts (format "%s [%s]" msg ts) msg)))
(cons label idx-str)))
sessions)))))
(t
(let* ((output (shell-command-to-string "gemini --list-sessions"))
(lines (seq-filter (lambda (s) (string-match "\\S-" s))
(split-string output "\n" t)))
(data-lines (seq-drop lines 1))
(candidates nil))
(dolist (line data-lines)
(let ((trimmed (string-trim line)))
(when (string-match
(rx (group (one-or-more digit))
(one-or-more whitespace)
(group (one-or-more nonl)))
trimmed)
(push (cons (match-string 2 trimmed)
(match-string 1 trimmed))
candidates))))
(nreverse candidates))))))
(defun fscotto/project-gemini-session ()
"Choose and resume a Gemini session for the current project."
(interactive)
(let* ((project-directory (fscotto/project-root))
(candidates (fscotto/gemini-session-candidates project-directory)))
(unless candidates
(user-error "No Gemini sessions found for %s" project-directory))
(let* ((selection (completing-read "Gemini session: " candidates nil t))
(session-idx (cdr (assoc selection candidates))))
(fscotto/launch-external-terminal
(list "gemini" "--resume" session-idx)
project-directory))))
(defun fscotto/project-agent-session ()
"Choose an agent and resume a saved session for the current project."
(interactive)
(let ((agent (completing-read "Agent session: " '("Claude" "Codex" "Gemini" "OpenCode") nil t)))
(pcase agent
("Claude"
(fscotto/launch-external-terminal '("claude" "--resume")))
("OpenCode"
(fscotto/project-opencode-session))
("Codex"
(fscotto/launch-external-terminal '("codex" "resume")))
("Gemini"
(fscotto/project-gemini-session)))))
(defun fscotto/project-external-terminal ()
"Open the external terminal in project root."
(interactive)

View File

@@ -145,8 +145,8 @@
"C-c p t" "Test"
"C-c p v" "Open multi-vterm in project"
"C-c p x" "Open external term"
"C-c p a" "OpenCode (dwim)"
"C-c p A" "Choose OpenCode session"
"C-c p a" "Choose agent"
"C-c p A" "Choose agent session"
"C-c p e" "Edit project config"
"C-c p g" "Project Git status"
"C-c p 4" "Other Window"

View File

@@ -1,22 +0,0 @@
#!/usr/bin/env sh
set -eu
if [ -z "${DISPLAY:-}" ]; then
printf 'Error: DISPLAY is not set; cannot launch gufw under Xwayland.\n' >&2
exit 1
fi
if ! command -v xhost >/dev/null 2>&1; then
printf 'Error: xhost is required to launch gufw from a Wayland session.\n' >&2
exit 1
fi
cleanup() {
xhost -si:localuser:root >/dev/null 2>&1 || true
}
trap cleanup EXIT INT TERM HUP
xhost si:localuser:root >/dev/null
exec gufw "$@"

View File

@@ -1,13 +1,15 @@
#!/bin/sh
ICONS="Yaru-orange-dark"
THEME="Yaru-blue-dark"
ICONS="Yaru-blue-dark"
CURSOR="Yaru"
FONT_UI="Noto Sans 10"
FONT_UI="Liberation Sans 10"
mkdir -p "$HOME/.config/gtk-3.0"
mkdir -p "$HOME/.config/gtk-4.0"
cat > "$HOME/.gtkrc-2.0" <<EOF
gtk-theme-name="$THEME"
gtk-icon-theme-name="$ICONS"
gtk-cursor-theme-name="$CURSOR"
gtk-font-name="$FONT_UI"
@@ -17,6 +19,7 @@ EOF
cat > "$HOME/.config/gtk-3.0/settings.ini" <<EOF
[Settings]
gtk-theme-name=$THEME
gtk-icon-theme-name=$ICONS
gtk-cursor-theme-name=$CURSOR
gtk-font-name=$FONT_UI
@@ -29,6 +32,7 @@ EOF
cat > "$HOME/.config/gtk-4.0/settings.ini" <<EOF
[Settings]
gtk-theme-name=$THEME
gtk-icon-theme-name=$ICONS
gtk-cursor-theme-name=$CURSOR
gtk-font-name=$FONT_UI
@@ -36,8 +40,8 @@ gtk-application-prefer-dark-theme=1
EOF
if command -v gsettings >/dev/null 2>&1; then
gsettings set org.gnome.desktop.interface gtk-theme "$THEME" >/dev/null 2>&1 || true
gsettings set org.gnome.desktop.interface icon-theme "$ICONS" >/dev/null 2>&1 || true
gsettings set org.gnome.desktop.interface cursor-theme "$CURSOR" >/dev/null 2>&1 || true
gsettings set org.gnome.desktop.interface font-name "$FONT_UI" >/dev/null 2>&1 || true
gsettings set org.gnome.desktop.interface color-scheme prefer-dark >/dev/null 2>&1 || true
fi

View File

@@ -1,13 +0,0 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Firewall Configuration
Comment=An easy way to configure your firewall
Keywords=gufw;security;firewall;network;
Categories=GNOME;GTK;Settings;Security;X-GNOME-Settings-Panel;X-GNOME-SystemSettings;X-Unity-Settings-Panel;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;
Exec=/home/fscotto/.local/bin/run-gufw
Icon=gufw
Terminal=false
X-GNOME-Settings-Panel=gufw
X-Unity-Settings-Panel=gufw
X-Ubuntu-Gettext-Domain=gufw

View File

@@ -1,4 +1,8 @@
Host vps
IdentityFile ~/.ssh/id_rsa_vps
Host *
IdentityFile ~/.ssh/id_ed25519
ControlMaster auto
ControlPath ~/.local/state/ssh/sockets/%r@%h-%p
ControlPersist 600

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

View File

@@ -1,6 +1,4 @@
export LIBVA_DRIVER_NAME=iHD
export QT_QPA_PLATFORM=wayland
export QT_QPA_PLATFORMTHEME=qt6ct
export SWAY_UNSUPPORTED_GPU=1
export WLR_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1
export WLR_NO_HARDWARE_CURSORS=1

View File

@@ -1,242 +0,0 @@
#!/usr/bin/env sh
set -eu
APPLY=0
AGGRESSIVE=0
SAFE_PACKAGES="
arandr
autorandr
feh
i3
i3blocks
i3blocks-blocklets
i3lock-color
i3status
scrot
setxkbmap
volumeicon
xclip
xkbutils
xorg-fonts
xorg-minimal
xss-lock
"
AGGRESSIVE_PACKAGES="
dunst
rofi
blueman
network-manager-applet
xfce-polkit
xfce4-clipman-plugin
xfce4-screenshooter
"
SAFE_PATHS="
$HOME/.config/i3
$HOME/.config/i3blocks
$HOME/.config/autorandr
$HOME/.xinitrc
"
AGGRESSIVE_PATHS="
$HOME/.config/dunst
$HOME/.config/rofi
"
usage() {
cat <<'EOF'
Usage: cleanup_i3_after_sway_migration.sh [--apply] [--aggressive]
One-shot cleanup for removing i3/X11-only packages and dotfiles after a host
has already migrated to SwayFX + Noctalia.
Options:
--apply perform the cleanup for real
--aggressive also remove extra desktop apps/configs that were mainly useful
in the old i3 setup (dunst, rofi, blueman, etc.)
-h, --help show this help
Default mode is dry-run.
EOF
}
have_command() {
command -v "$1" >/dev/null 2>&1
}
require_sway_noctalia() {
if [ ! -f "$HOME/.config/sway/config" ]; then
printf 'Error: Sway config not found at %s\n' "$HOME/.config/sway/config" >&2
exit 1
fi
if [ ! -f "$HOME/.config/noctalia/settings.json" ]; then
printf 'Error: Noctalia settings not found at %s\n' "$HOME/.config/noctalia/settings.json" >&2
exit 1
fi
}
append_lines() {
src_lines=$1
dst_var=$2
for line in $src_lines; do
line=$(printf '%s' "$line" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
[ -n "$line" ] || continue
case "$dst_var" in
PACKAGES)
PACKAGES="$PACKAGES $line"
;;
PATHS)
PATHS="$PATHS $line"
;;
*)
printf 'Error: unsupported destination list: %s\n' "$dst_var" >&2
exit 1
;;
esac
done
}
filter_installed_packages() {
packages=$1
installed=''
for pkg in $packages; do
pkg=$(printf '%s' "$pkg" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
[ -n "$pkg" ] || continue
if xbps-query -s "$pkg" >/dev/null 2>&1; then
installed="$installed $pkg"
fi
done
printf '%s' "$installed"
}
filter_existing_paths() {
paths=$1
existing=''
for path in $paths; do
path=$(printf '%s' "$path" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
[ -n "$path" ] || continue
if [ -e "$path" ] || [ -L "$path" ]; then
existing="$existing $path"
fi
done
printf '%s' "$existing"
}
print_section() {
title=$1
items=$2
printf '%s\n' "$title"
if [ -z "$items" ]; then
printf ' (none)\n'
return
fi
for item in $items; do
item=$(printf '%s' "$item" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
[ -n "$item" ] || continue
printf ' - %s\n' "$item"
done
}
confirm_apply() {
printf 'Proceed with i3 cleanup? [y/N] '
IFS= read -r answer
case "$answer" in
y|Y|yes|YES)
;;
*)
printf 'Aborted.\n'
exit 0
;;
esac
}
run_remove_packages() {
packages=$1
[ -n "$packages" ] || return 0
if [ "$(id -u)" -eq 0 ]; then
xbps-remove -R $packages
elif have_command sudo; then
sudo xbps-remove -R $packages
else
printf 'Error: package removal requires root and sudo was not found.\n' >&2
exit 1
fi
}
run_remove_paths() {
paths=$1
[ -n "$paths" ] || return 0
for path in $paths; do
path=$(printf '%s' "$path" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
[ -n "$path" ] || continue
rm -rf "$path"
done
}
while [ $# -gt 0 ]; do
case "$1" in
--apply)
APPLY=1
;;
--aggressive)
AGGRESSIVE=1
;;
-h|--help)
usage
exit 0
;;
*)
printf 'Error: unknown argument: %s\n\n' "$1" >&2
usage >&2
exit 1
;;
esac
shift
done
require_sway_noctalia
PACKAGES=''
PATHS=''
append_lines "$SAFE_PACKAGES" PACKAGES
append_lines "$SAFE_PATHS" PATHS
if [ "$AGGRESSIVE" -eq 1 ]; then
append_lines "$AGGRESSIVE_PACKAGES" PACKAGES
append_lines "$AGGRESSIVE_PATHS" PATHS
fi
INSTALLED_PACKAGES=$(filter_installed_packages "$PACKAGES")
EXISTING_PATHS=$(filter_existing_paths "$PATHS")
printf 'Mode: %s\n' "$( [ "$APPLY" -eq 1 ] && printf 'apply' || printf 'dry-run' )"
printf 'Aggressive cleanup: %s\n\n' "$( [ "$AGGRESSIVE" -eq 1 ] && printf 'yes' || printf 'no' )"
print_section 'Packages to remove:' "$INSTALLED_PACKAGES"
printf '\n'
print_section 'Paths to remove:' "$EXISTING_PATHS"
if [ "$APPLY" -ne 1 ]; then
printf '\nDry-run only. Re-run with --apply to perform the cleanup.\n'
exit 0
fi
confirm_apply
run_remove_packages "$INSTALLED_PACKAGES"
run_remove_paths "$EXISTING_PATHS"
printf '\nCleanup complete.\n'

73
scripts/cleanup_nymph_sway.sh Executable file
View File

@@ -0,0 +1,73 @@
#!/usr/bin/env sh
set -eu
PACKAGES="
swayfx
kanshi
grim
grimshot
slurp
wl-clipboard
xdg-desktop-portal-wlr
cliphist
noctalia-shell
"
USER_PATHS="
$HOME/.config/sway
$HOME/.config/kanshi
$HOME/.config/noctalia
$HOME/.local/share/noctalia-plugins
$HOME/.local/bin/start-sway-session
"
SYSTEM_FILES="
/etc/emptty/wayland-sessions/Sway.desktop
/etc/xbps.d/noctalia.conf
"
check_host() {
if [ "$(hostname)" != "nymph" ]; then
printf 'Error: questo script è destinato solo a nymph (hostname attuale: %s)\n' "$(hostname)" >&2
exit 1
fi
}
remove_packages() {
printf 'Rimozione pacchetti swayfx+noctalia...\n'
# shellcheck disable=SC2086
sudo xbps-remove -Ry $PACKAGES
printf 'Rimozione dipendenze orfane...\n'
sudo xbps-remove -o
}
remove_user_configs() {
printf 'Rimozione configurazioni utente...\n'
for path in $USER_PATHS; do
if [ -e "$path" ]; then
rm -rf "$path"
printf ' rimosso: %s\n' "$path"
fi
done
}
remove_system_files() {
printf 'Rimozione file di sistema...\n'
for file in $SYSTEM_FILES; do
if [ -e "$file" ]; then
sudo rm -f "$file"
printf ' rimosso: %s\n' "$file"
fi
done
}
main() {
check_host
remove_packages
remove_user_configs
remove_system_files
printf 'Cleanup completato.\n'
}
main "$@"