fix(apps): improve Thunar and Mako integration
Some checks failed
Check / eval-and-lint (push) Has been cancelled

This commit is contained in:
Bernardo Magri
2026-05-31 20:58:10 +01:00
parent 878c11bd41
commit ea34a7ac1f
5 changed files with 52 additions and 6 deletions

View File

@@ -22,12 +22,15 @@ layer=overlay
[summary~="Setup Wi-Fi"]
on-button-left=exec sh -c 'nomarchy-notification-dismiss "Setup Wi-Fi"; nomarchy-launch-wifi'
on-click=exec sh -c 'nomarchy-notification-dismiss "Setup Wi-Fi"; nomarchy-launch-wifi'
[summary~="Update System"]
on-button-left=exec sh -c 'nomarchy-notification-dismiss "Update System"; nomarchy-launch-floating-terminal-with-presentation nomarchy-update'
on-click=exec sh -c 'nomarchy-notification-dismiss "Update System"; nomarchy-launch-floating-terminal-with-presentation nomarchy-update'
[summary~="Learn Keybindings"]
on-button-left=exec sh -c 'nomarchy-notification-dismiss "Learn Keybindings"; nomarchy-menu-keybindings'
on-click=exec sh -c 'nomarchy-notification-dismiss "Learn Keybindings"; nomarchy-menu-keybindings'
[summary~="Screenshot copied & saved"]
max-icon-size=80

View File

@@ -18,6 +18,7 @@
./network.nix
./impermanence.nix
./browser.nix
./file-manager.nix
# Tier 1 system features (all opt-in via nomarchy.system.*).
./snapper.nix
./laptop.nix

View File

@@ -0,0 +1,29 @@
{ pkgs, lib, ... }:
{
# Core system-side support for file management.
# This provides the backend services required by Thunar (and other file
# managers) to function correctly on a standalone compositor.
services.gvfs.enable = lib.mkDefault true; # Mount, trash, and other file system operations
services.tumbler.enable = lib.mkDefault true; # Thumbnail support for images/videos/etc.
# Explicitly enable Thunar for D-Bus integration
programs.thunar.enable = lib.mkDefault true;
# Allow Thunar to use gvfs (trash, network mounts, etc.)
programs.thunar.plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
thunar-media-tags-plugin
];
# Supporting utilities for Thunar and general file management
environment.systemPackages = with pkgs; [
ffmpegthumbnailer # Video thumbnails
libgsf # ODF thumbnails
poppler-utils # PDF thumbnails
xfce.exo # Required for "Open Terminal Here" and other associations
shared-mime-info # Standard MIME database
];
}

View File

@@ -19,12 +19,13 @@ Guardrails (apply when adding anything):
### Now (ready to pick up)
_(empty — all entries shipped or moved to Later)_
- **Deep Runtime Polish: App Integration.** Verify deeper NixOS integration for core apps in a live VM. Check **Thunar** (thumbnails, "Open Terminal Here"), **VSCode** (font propagation, extension loading), and **Mako** (clickable notification actions).
- **Deep Runtime Polish: Interactive Script Audit (Round 2).** Run complex `nomarchy-*` commands inside a real Alacritty window in the VM. Identify and fix failures caused by TTY expectations, `$TERM` mismatches, or `gum` layout issues on specific themes.
- **Deep Runtime Polish: State-Sync Stress Test.** Verify the robustness of the hybrid declarative state system (`nomarchy-state.nix`). Run automated "chaos" cycles (rapid theme/font/scaling changes) to catch race conditions or Nix generation errors.
- **Deep Runtime Polish: Keybinding vs. Tooltip Reconciliation.** Ensure that `docs/KEYBINDINGS.md`, Waybar tooltips, and live Hyprland behavior are in perfect sync. Identify and fix stale references or conflicts with app-specific defaults.
### Next (bigger lifts that build on Now)
_(empty — all entries shipped or moved to Later)_
### Later (speculative or research-shaped)
- **Rolling vs pinned channel choice in the installer.**

View File

@@ -9,8 +9,20 @@ if (($# == 0)); then
fi
# Find the first notification whose 'summary' matches the regex in $1
notification_id=$(makoctl list | grep -F "$1" | head -n1 | sed -E 's/^Notification ([0-9]+):.*/\1/')
output=$(makoctl list)
if [[ -n $notification_id ]]; then
makoctl dismiss -n $notification_id
if [[ $output == "["* ]] || [[ $output == "{"* ]]; then
# JSON format (mako 1.8+)
# Structure is usually an array of notifications or a wrapper object
notification_id=$(echo "$output" | jq -r --arg pat "$1" '
if type == "array" then .
else .notifications // .data[0] // [] end
| .[] | select((.summary // .["summary-text"] // "") | contains($pat)) | .id' | head -n1)
else
# Human format (older mako)
notification_id=$(echo "$output" | grep -F "$1" | head -n1 | sed -E 's/^Notification ([0-9]+):.*/\1/')
fi
if [[ "$notification_id" =~ ^[0-9]+$ ]]; then
makoctl dismiss -n "$notification_id"
fi