Commit Graph
645 Commits
Author SHA1 Message Date
bbedward a665ba8ca5 theme: write desktop settings through dconf instead of gsettings
fixes #3280
port 1.6
2026-09-04 10:37:31 -04:00
bbedward d57e32c5cb matugen: give dry runs their own config file
fixes #3279
port 1.6
2026-09-04 10:37:31 -04:00
usoaraway0 ec22e9e594 brightness: retry initial ddc read (#3287)
port 1.6
2026-09-04 09:51:37 -04:00
Marlon Kranz 4693178345 feat(theme): add a selectable source color mode for wallpaper palettes (#3020)
* feat(theme): add a selectable source color mode for wallpaper palettes

DMS always seeds the palette from matugen's most dominant candidate
(--source-color-index 0, hardcoded at both call sites). When a large
muted region outvotes a smaller vivid one, a visibly warm wallpaper
produces a cold palette: one image here goes to #8ad0ee where the warm
subject is at hue 46.

Adds a Source Color setting with seven values. Dominant is the default
and is byte-identical to today. Colorful is computed in Go before
matugen runs: quantize the image (Wu for the starting clusters, then a
weighted k-means in Lab), score the result the way caelestia-cli does,
and hand matugen the resulting hex. Its scoring walks a chroma/tone bar
down from 20 until something clears it, which biases the pick toward a
colorful, well-lit color rather than whichever muted color covers the
most pixels. The remaining five map to matugen's --prefer.

- core/internal/matugen/sourcecolor.go: extraction, scoring, and the
  one helper both matugen call sites now share
- buildOnce resolves the seed once, before the StockColors branch, so
  the dry run and the real run cannot disagree about it
- extraction failure logs a warning and falls through to matugen's own
  extraction; it never fails a theme build
- --prefer arrived in matugen 4.1, so it is gated separately from the
  existing isV4 check; on 4.0.x those five modes degrade to the
  dominant color instead of aborting on an unknown argument
- --source-mode on generate and queue, plus sourceMode on the socket
  handler
- Source Color dropdown in Theme & Colors, defaulting to Dominant

Adds github.com/Nadim147c/material/v3 (Apache-2.0, no dependencies) for
HCT conversions, Wu quantization and the dislike analyzer. Its
QuantizeCelebi is not used: it returns after one unconverged iteration
and its Lab.DistanceSquared is a dot product rather than a distance, so
it collapses most of an image into a single cluster.

* fix(theme): address review feedback on source color mode

Two points from review on #3020.

The quantize comment pointed at a FOLLOWUPS file that does not exist in
this repository. Replaced the reference with the measurement it was
standing in for, so the claim is self-contained.

setMatugenSourceMode called Theme.generateSystemThemesFromCurrentTheme()
directly on top of the regenSystemThemes onChange hook that Spec.set
already dispatches. Both feed a 100ms debounce so it was one generation
either way, but the direct call was redundant and is gone.

* fix(theme): keep {{image}} resolvable in colorful mode

Colorful resolves the seed itself and calls matugen with a hex source, which
leaves matugen's {{image}} unset: the builtin pywalfox template and any user
template using the keyword render the literal string "Null".

Pass the wallpaper path alongside dank16 in --import-json-string, as suggested
in review, so those templates keep working unedited. The path is made absolute
to match what matugen renders for {{image}} in the other modes.

* fix(theme): cut translator terms on the source color dropdown

Per-mode descriptions were seven of the fifteen new terms this branch adds,
and five of them differed by a single adjective. Drop them: the dropdown row
already describes what the setting does, and the docs cover each mode.
2026-09-03 09:07:21 -04:00
Huỳnh Thiện Lộc 0fc4aac964 feat(screenshot): add --geometry flag to selection coordinates (#3274)
* feat(screenshot): add -g/--geometry flag to print selection coordinates

- Add -g/--geometry persistent flag to print region geometry (X,Y WxH) to stdout.
- Skip image buffer allocation, cropping, and file/clipboard/notification actions when in geometry mode.
- Support standard Enter/Space confirmation or mouse release via --no-confirm.
- Exit with code 1 when selection is cancelled, matching slurp behavior for script integrations.
- Support printing geometry across last, window, output, full, and all modes.
- Add unit tests in region_geometry_test.go.

* refactor(screenshot): deduplicate output bounds and clean geometry result helpers

- Add bounds() method on WaylandOutput to deduplicate Hyprland geometry lookup across output capture and search.
- Add geometryResult() helper in screenshot package to eliminate redundant CaptureResult literals.
- Add GeometryString() method on Region to unify geometry formatting.
- Refactor selectedLogicalGeometry() to return Region directly.
- Clean up flag validation in runScreenshot.

* fix(screenshot): address PR review on geometry coordinates and JSON output

- Derive selectedLogicalGeometry from selectionExtent and ext.logical to keep geometry in sync with inclusive selection bounds.
- Use pointer int for X and Y in screenshotMetadata so (0,0) origins are preserved in JSON output.
- Divide output dimensions by effectiveScale in bounds() for non-Hyprland compositors and handle transform rotation.
- Convert stored device coordinates to logical units in captureLastRegion geometry mode.
- Update and expand unit tests for inclusive bounds, preselection, and scaled outputs.

* fix(screenshot): prevent geometry query from clobbering last region and handle niri window geometry

- Guard SaveLastRegion in captureRegion with !s.config.Geometry to prevent overwriting saved region with logical coordinates.
- Return explicit error when attempting window -g on niri instead of printing bogus 0,0 0x0 rect.
- Populate Region dimensions in captureNiriWindow.
2026-09-03 08:45:36 -04:00
Huỳnh Thiện Lộc 99e2368b1c feat(screenshot): add live preview panel for scroll capture (#3269)
* feat(screenshot): add live preview panel for scroll capture

- Port scrolling live preview from dms-quick-capture backend to native screenshot.
- Calculate dynamic preview panel geometry placed beside the capture hole on the side with most available space.
- Render downscaled live stitched canvas with dark translucent background and white border in drawScrollOverlay.
- Include preview panel in Wayland input regions and allow completing capture by clicking the preview panel.
- Update cursor shape to pointer hand when hovering over preview or control buttons.
- Add unit tests for layout, hit testing, and canvas rendering.

* fix(screenshot): bound scroll preview aspect ratio to recent canvas tail

- Derive preview aspect ratio from a bounded tail window of the canvas (maxPreviewRows = frameW * maxHeight / minImageW).
- Prevent preview panel width from collapsing below minImageW and disappearing when stitched rows exceed ~4.5x width.
- Render the recent window rows in drawScrollPreview to maintain a stable panel size and display live incoming content.
- Add unit test for long scrolling capture preview bounds.
2026-09-02 21:28:29 -04:00
bbedward 875d32176d wayland/gamma: expose contrasta and gamma settings
fixes #3255
2026-09-02 09:50:47 -04:00
Huỳnh Thiện Lộc 95ee917e37 feat(screenshot): support 4-corner resizing while holding Ctrl (#3259)
* feat(screenshot): support 4-corner resizing while holding Ctrl

- Hit-test selection corners when Ctrl is held to allow resizing.
- Set opposite corner as fixed anchor and update dynamic cursor shape
  (NwseResize/NeswResize).
- Draw corner handle indicators when Ctrl is held or during active resize.
- Add 'Ctrl resize/move' to overlay HUD and provide complete glyph
  coverage for HUD labels.
- Add comprehensive unit tests covering hit testing, inverted dragging,
  incremental handle damage, and glyph coverage.

* fix(screenshot): invalidate background cache on handle and shift modifier changes

- Track backgroundHandles and backgroundShift in RenderSlot.cacheValid.
- Rebuild background slot and HUD when handle or shift modifier states
  change with an existing selection, preventing incremental re-dimming
  from punching holes in the HUD.
- Fix trailing newline in region_resize_test.go for golangci-lint.

* fix(screenshot): gate redraw and handle dimming on render modifier changes

- Only trigger redrawSurface when Shift or Ctrl modifier states actually
  change, preventing redundant redraws when tapping Alt, Super, or Locks.
- Only re-dim and damage corner handle bounding boxes in overlayDelta and
  overlayDamage when handles move or their visibility changes, preventing
  unnecessary re-dimming of stationary handles over the HUD.
- Add TestOverlayDeltaIdenticalOverlayNoHandleDimming test.

* fix(screenshot): measure hud text advance accurately to prevent pill overflow

- Use (1+len(item.desc))*(charW+1) when calculating totalW in drawHUD,
  matching the full 9px advance used when drawing space and description.
- Add TestHUDDimensionsContainText to verify HUD pill dimensions enclose
  all text items with correct padding across all variant combinations.

* fix(screenshot): compare handle rect sets in overlay delta and damage

- Use slices.Equal to compare prev and cur handleRects in overlayDelta
  and overlayDamage instead of interior equality.
- Properly re-dim and damage handles when selection corners cross monitor
  boundaries where clamped interior is unchanged but top/bottom/left/right
  flags change.
- Add TestOverlayDeltaHandlesClampedMonitorEdge test.

* test(screenshot): verify drawHUD output buffer pixels stay within pill bounds

- Extract hudDimensions helper on RegionSelector used by drawHUD.
- Update TestHUDDimensionsContainText to drive drawHUD directly into a
  zeroed buffer and assert no lit pixel falls outside the computed
  HUD pill boundary across all configuration variants.
2026-09-02 09:23:37 -04:00
bbedward 881cfd2fd3 core: bump dankgo 2026-09-01 20:59:03 -04:00
bbedward 4f6841d8d2 core: load only the mesa egl vendor when the compositor renders on it 2026-09-01 20:42:21 -04:00
purian23 c0135b11e5 core: update dankgo dep 2026-09-01 20:10:25 -04:00
purian23 5bb6058751 feat(clipboard): add a copy-as-text action for entries with a text alternates
- New Entries captured from a mixed image+text offer keep the image as the primary mime i.e. bitmap
- Copy Text context-menu item on atlernates

Closes #2849
2026-09-01 19:33:23 -04:00
bbedward ef63de44b4 core: bump dankgo 2026-09-01 19:24:46 -04:00
Bernardo Gomesandclaude[bot] 16c098d09b fix(doctor): validate QT_QPA_PLATFORMTHEME instead of trusting its presence (#3240)
* fix(doctor): validate QT_QPA_PLATFORMTHEME instead of trusting its presence

dms doctor reported any non-empty QT_QPA_PLATFORMTHEME as healthy, so a
wrong value passed with "All checks passed!" while every Qt app silently
ran without a platform theme: palettes stayed unstyled and QIcon lookups
returned nothing, which is how Quickshell ends up drawing its missing-
icon placeholder for every icon an SNI app such as blueman publishes in
tray menus. The real-world trap is qt6ct-kde — the AUR package name —
set as the theme value; the settings UI toast already documents that
only the qt6ct theme requires the qt6ct-kde package, but the doctor,
the tool meant to catch exactly this, blessed the broken value.

- checkQtPlatformThemePlugin validates both QT_QPA_PLATFORMTHEME and
  QT_QPA_PLATFORMTHEME_QT6 (the latter was not reported at all):
  qt6ct-kde gets a targeted warning naming the fix, and any other value
  has its plugin probed the way the qtengine check does — qmake/qtpaths
  are asked for QT_INSTALL_PLUGINS and the conventional file names are
  looked up, warning with the exact expected path on a miss
- a miss never warns when it cannot be sure: no Qt build tools and the
  version-dependent plasma-integration file name both degrade to info,
  mirroring the qtengine check's no-false-alarm policy
- the plugin-root interrogation moves into qtPluginRoots, shared with
  the qtengine check

On an affected system:

  before: ○ QT_QPA_PLATFORMTHEME · qt6ct-kde
          ✓ All checks passed!

  after:  ○ QT_QPA_PLATFORMTHEME · qt6ct-kde
          ● qt6ct-kde            Package name, not a theme

* fix(doctor): probe qtengine plugin with a bare file name

qtenginePluginFile("", major) returns a path with a directory
component, and qtPluginPath joins platformthemes/ again, so the
qtengine check stat'd
<root>/platformthemes/platformthemes/libqt6engine-plugin.so and warned
"Not found" on every correctly installed system. Pass the bare file
name instead, and pin the resolved path with a regression test that
fails on the double join.

Found in review by claude[bot].

* Update core/cmd/dms/commands_doctor.go

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
2026-08-31 21:04:56 -04:00
bbedward 99c5f96575 bluetooth: toggle power from the adapter's live state,
fixes #3242
2026-08-31 19:55:31 -04:00
Mario Mohar 887509548b fix(theme): take sun times from the local calendar day, not the UTC one (#3237)
* fix(theme): take sun times from the local calendar day, not the UTC one

CalculateSunTimesWithTwilight read its reference day off date.UTC(). The
event seconds it computes are local mean solar time and lonOffset converts
them to UTC, so the instant of a local day's sunrise lands on the previous
UTC day east of Greenwich and a local sunset on the next one west of it.
Whenever the local and UTC calendars disagree, the function therefore
returned a neighbouring day's times.

Everything around it already works in local calendar days: the polar
branches of CalculateSunTimes build their day from date.Year/Month/Day,
thememode's startOfNextDay uses next.Location(), and the gamma scheduler
keys its calcDay cache on now.Location(). Only the reference day inside
the calculation disagreed.

Effect at UTC+8 (Kunming, 25.04N 102.72E): between local sunrise and 08:00
local, computeLocationSchedule got yesterday's sunrise and sunset, both
already past, fell through to the next-day branch and got today's sunrise,
also past. It reported dark with nextTransition in the past, which
schedulerLoop clamps to a one-second wait, so it re-evaluated every second
until 08:00 local and then flipped to light on its own. West of UTC the
mirror image: at UTC-7 the mode went dark from 17:00 local, when the UTC
date rolls over, until the real sunset.

The same SunTimes drive the gamma/night-light scheduler, so night light
shifted by a day the same way.

Fix: derive the reference day from date's own calendar day, keeping
dayStart anchored at UTC midnight so the lonOffset arithmetic is
unchanged, and take the orbit angle from the same day. Callers whose date
is already in UTC are unaffected.

Tests: suncalc_refday_test.go covers the reference day east and west of
UTC, stability across UTC midnight, and that UTC callers do not move.
manager_location_test.go is new to the thememode package and covers
computeLocationSchedule at both offsets, including that nextTransition is
never in the past.

* fix(theme): pick the reference day from the solar day, not the civil one

Taking the reference day straight off the caller's calendar day is right
for nearly every zone, but not for one shifted a full day away from its
own meridian. Apia, Kiritimati, Tongatapu and the Chathams all sit on
west longitudes while keeping a UTC+12:45..+14 offset, so their mean
solar time and their civil time are a day apart. Every sun event landed
on the following local day there, and the location schedule reported
dark around the clock.

Anchor on the caller's local noon and convert that to mean solar time to
pick the reference day. For every other zone this resolves to the same
date as before, so Kunming, Los Angeles and London are unchanged to the
second. dateOrbitAngle now takes the same reference day, so declination
and the equation of time no longer belong to a different day than the
events computed from them.

Covered at both levels: three antimeridian zones in the suncalc test,
and two cases in the location schedule test for the symptom itself.
Both fail without this change.
2026-08-31 13:26:39 -04:00
Mario Mohar e1b2279a70 fix(keybinds): show hl.unbind + hl.bind overrides from user Lua modules (#3238)
In Hyprland a second bind on an already bound key does not replace the
first, both stay live, which is why an override is written as hl.unbind
followed by hl.bind. The parser dropped that pair on the floor when it
came from a user's own Lua module:

- parseLuaLines discarded the unbind whenever the same file rebound the
  key, so the DMS default was never removed
- addBind then treated the rebind as a config bind conflicting with a DMS
  bind, counted it in bindsAfterDMS and returned false, so it never
  reached the section

The keybinds modal therefore showed the DMS default for that key and the
user's actual action was nowhere, which is what #3145 reports.

The discard existed to protect dms/binds-user.lua, the file the settings
modal writes, which uses the same unbind+bind pair: recording its unbind
would have deleted its own rebind too, since that file is also a DMS bind
source. The guard was just too coarse, suppressing the unbind entirely
instead of exempting the one bind it belongs to.

Now the unbind is always recorded, and rebindSources remembers which file
unbound and rebound a key so removeUnboundDMSBinds spares that file's own
bind. addBind treats a bind as an override, not a conflict, when the same
file unbound the key earlier — tracked per file in fileUnbinds, saved and
restored around each parsed file so an include cannot leak into its
parent.

A config bind without a preceding unbind is unchanged: both binds really
are live in Hyprland, so it stays a conflict and keeps counting towards
"Some DMS binds may be overridden by config binds".

No other provider has an unbind concept; mangowc, niri and sway parse
formats without one, so this is Hyprland-only.

Tests: hyprland_parser_override_test.go covers the reported case, the
conflict case without an unbind, a bare unbind with no rebind, and the
dms/binds-user.lua round trip. Only the first fails without the fix; the
other three pass either way and guard against over-correcting.
2026-08-31 10:40:41 -04:00
Mario Moharandbbedward 9eaaed3203 feat(clipboard): clear only the filtered entries (#3235)
* feat(clipboard): clear only the filtered entries

With a search query or type filter active, the clear button deleted
every unpinned entry regardless of what the list was showing, so
pruning a subset meant deleting entries one by one from the context
menu.

When the recents list is filtered, the button now clears exactly the
entries it shows and the modal stays open on that filter; with no
filter the previous behaviour is untouched. A filter that matches
nothing does nothing at all, rather than falling back to clearing
everything. The tooltip says "Clear Filtered" while a filter is
active, and the confirmation names the count.

Deleting one id at a time would have cost a round trip and a full
state broadcast per entry, so this adds clipboard.deleteEntries: one
bolt transaction, one state update, and it skips pinned entries
server-side so a bulk delete can never take out saved items.

Fixes #3198

* fix(clipboard): add translator context and list deleteEntries in IPC help

Review follow-up.

The two strings this branch adds carried no translator context: the
"Clear Filtered" tooltip in ClipboardHeader and the confirmation body for
a filtered clear in ClipboardHistoryContent. Both now say where they
appear, and the second one names what %1 is, per CONTRIBUTING.

"Clear All" on the same line is deliberately left alone. It is an
existing shared term with four other call sites, so a context there would
attach a clipboard-specific comment to a term the printer tab also uses.

clipboard.deleteEntries was handled but absent from the IPC method
listing that `dms debug-srv` prints, which left it undiscoverable right
next to clipboard.deleteEntry.

Catalogs untouched.

* chore: re-trigger CI

The lint-and-test failure on 21cefbf is an unrelated flake:
TestStoreEntry_CorruptDBReturnsErrorNotPanic died with SIGBUS in the
bbolt mmap. That test comes from master (c68b7e5) and passes there;
this branch only adds TestDeleteEntries_*/TestHandleDeleteEntries_*
and touches manager.go additively.

* clipboard: survive mmap faults from corrupted db pages

---------

Co-authored-by: bbedward <[email protected]>
2026-08-31 10:04:26 -04:00
bbedward 905726547d setup: add headless subcommand for non-interactive installs
ref #2851
2026-08-31 09:15:59 -04:00
bbedward ac46c7dd1b dankinstall: refactor tui package, single-source selection state 2026-08-30 21:13:53 -04:00
bbedward c68b7e5333 clipboard: survive corrupted bbolt db
fixes #3232
2026-08-30 11:16:36 -04:00
bbedward b8cceb7b3a gamma: configurable transition duration for time-based night mode 2026-08-29 16:23:48 -04:00
bbedward e99813b07d network: classify AP security by the privacy bit
fixes #3218
2026-08-29 15:40:53 -04:00
08dde7f79a add: Cellular Network support (rebase of #2765) (#3096)
* feat: add cellular support

* fix(settings): resolve cellular tab index collision

* fix: address review feedback for cellular support

Bump the network API version, drop the deleted term freeze file,
regenerate the settings search index, and reuse existing translation
terms where they already cover the new cellular UI.

* fix: do not assign readonly userPreference when switching network type

Assigning SettingsData.networkPreference through the readonly alias
threw on click, so the Cellular segment in Control Center did nothing.

* fix: make Cellular selectable and the modem row clickable

The Control Center type switcher was bound only to preference, so
Cellular snapped back to Ethernet. The settings modem row highlighted
on hover but had no click handler. Show the modem as a connect target
when no APN profiles exist.

* fix: create a GSM profile when connecting cellular with none saved

Clicking Mobile broadband only activated an existing profile, so a
modem with no APN did nothing useful. Fall back to AddAndActivate
like ethernet connect.

* fix: address second round of cellular review feedback

- Guard cellularDevices map with devMutex via snapshot/by-iface/set/remove
  helpers, mirroring the existing ethernet and wifi accessors
- Regenerate mocks with mockery v3 instead of hand-editing mock_Backend.go
- Reuse refreshCellularState() in SetCellularEnabled, DisconnectCellular,
  DisconnectCellularDevice, ActivateCellularConnection and device removal
- Wrap retryErr rather than the first error when the auto-config retry fails
- Use Theme.surfaceTextSecondary/primaryHover/primaryHoverLight in the
  cellular-off state instead of hand-rolled Qt.rgba values
- Drop the duplicate "No devices found" label so it can no longer render
  twice with no modem and no saved config

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* fix: address remaining cellular review comments

- Toast "Failed to toggle cellular" instead of always "enable"
- Remove unused enableCellularRadio() wrappers
- Store Control Center network type as a value, not a list index

* fix: pass nmcli connection selector as separate argument

`nmcli con mod uuid:<UUID>` is not valid syntax -- nmcli expects the
selector keyword as its own argument, so every priority update failed
with "no such connection profile". Because practically every NM profile
has a UUID, this silently disabled autoconnect-priority and route-metric
updates for ethernet and WiFi as well as cellular.

Also fix the Cellular settings status text, which said "Connecting..."
for a flag that only tracks radio enable/disable, and add the seven
cellular terms that were missing from the translation catalogs.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* apply review comments

* fix lints

* update debug doc

* fix style inconsistencies

---------

Co-authored-by: Yechiel Worenklein <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Co-authored-by: bbedward <[email protected]>
2026-08-29 15:37:36 -04:00
bbedward d272e7d9da greetd: re-add embedded greeter for archinstall compatibility 2026-08-29 12:28:05 -04:00
purian23 104bbebbc2 ipc: stop cups capability churn from re-dialing the subscribe socket
ref #3140
2026-08-29 00:46:50 -04:00
JDKamalakar f0867798e6 dankinstall: add non-interactive install script (#3063)
fixes #3043
2026-08-28 15:23:46 -04:00
bbedward 9f136da2e1 network: disconnect wifi from the associated adapter
ref #1921

looks like the rest of 1921 is more or less addressed on master, just
fixed a dissconnect gap
2026-08-28 14:03:40 -04:00
bbedward 618ad1135d perf(screenshot): add parallel JPEG encoder 2026-08-28 12:02:14 -04:00
bbedward 3604fc83a2 brightness/ddc: add an option to disable DDC probing 2026-08-28 10:17:26 -04:00
purian23 95e617fa95 fix(matugen): detect nix profile bins & write pywalfox colors.json
Closes #2821
2026-08-27 23:57:39 -04:00
bbedward 030974ce75 config: write hyprland session target when deploying systemd configs
fixes #3110
2026-08-27 16:19:56 -04:00
bbedward 460013a77d gtk: copy adw-gtk3 into user themes for dynamic theming
ref #2523
i with '#' will be ignored, and an empty message aborts the commit.
2026-08-27 12:28:05 -04:00
bbedward dca1bd3591 network: report wifi state from the associated adapter
fixes #2460
2026-08-27 10:37:57 -04:00
bbedward 35aa1329e8 network: treat link aggregates as ethernet in the status mapping
fixes #1581
2026-08-27 10:28:13 -04:00
bbedward ed60fb7e4f trayrecovery: rescan when the StatusNotifierWatcher changes hands
fixes #1142
2026-08-27 10:07:27 -04:00
bbedward 2e8257661c doctor: flag config files that fail to parse 2026-08-27 10:01:12 -04:00
bbedward 12df4bdb8f feat(screenshot): allow dragging region across outputs, add alt modifier
to restrict to one output
2026-08-27 09:49:31 -04:00
bbedward 422dd2c9b0 auth: write the "other" PAM fallback
fixes #3062
2026-08-27 09:49:31 -04:00
bbedward 9ed4acd4f8 network: connect to OWE and OWE transition-mode networks
fixes #2458
2026-08-27 09:49:31 -04:00
haikalllp 42080db61b feat(theme): add support for matugen smart mode and type (#3109)
* feat(theme): add support for matugen smart mode and type

* add another dry run to get smart type preview

* fix too much keywords in search index

* revert dont extract translations

* feat gate "Auto From Wallpaper" toggle row and the available matugen scheme for the pallete drop down

* re-extract settings search index

* make portal sync no longer disables matugen smart mode

* make sure cosmic theme mode also follow change from smart mode

* add translator context for Auto (Light Mode) / Auto (Dark Mode) / Auto From Wallpaper

* fix: gate matugen smart mode checks on the dynamic theme so stock themes keep portal sync and fix tile labels in control center
2026-08-27 09:40:23 -04:00
elel-code d01a6d87d5 fix(matugen): honor config dir for qtengine sync (#3195) 2026-08-27 09:14:10 -04:00
2934188296 fix(suncalc): parenthesise the sunrise-equation denominator (up to 24 min error at high latitude) (#3192)
* fix(suncalc): parenthesise the sunrise-equation denominator

`sunHourAngle` computed

    cos(z) / cos(lat) * cos(dec) - tan(lat) * tan(dec)

but the sunrise equation is

    cos(H) = cos(z) / (cos(lat) * cos(dec)) - tan(lat) * tan(dec)

In Go `a / b * c` is `(a / b) * c`, so `cos(dec)` multiplied where it should divide.

The new test asserts a property rather than a formula: feeding the returned hour
angle back through the definition of the zenith angle,

    cos(z) = sin(lat)*sin(dec) + cos(lat)*cos(dec)*cos(H)

has to reproduce the zenith angle that was requested. It fails on the old expression
and passes on the corrected one, over a grid of latitudes from the equator to the
polar circle, declinations across a full year, and both zenith targets the callers
use (elevTwilight -6, elevDaylight 3).

Worst-case error before the fix, in clock time:

    Singapore    lat  1.35     285 s
    Mexico City  lat 19.43     312 s
    Cairo        lat 30.04     354 s
    New York     lat 40.71     439 s
    Trieste      lat 45.69     512 s
    London       lat 51.51     671 s
    Oslo         lat 59.91     654 s
    Tromso       lat 69.65    1443 s

The error grows with latitude and with |declination|, and is largest at the civil
twilight zenith — which is where the gamma ramp starts and ends.

It also moves the boundary at which Acos leaves its domain, i.e. where the code
decides midnight sun / polar night. Swept over 505062 (lat, dec, zenith) points, the
classification differs at 961 of them (0.190%), all beyond 88 degrees of latitude.

The existing suncalc tests keep passing: they assert sunrise and sunset to the hour,
which is two orders of magnitude coarser than this error.

* fix(suncalc): classify each solar threshold independently

---------

Co-authored-by: Mark2Mac <[email protected]>
Co-authored-by: bbedward <[email protected]>
2026-08-27 09:13:58 -04:00
purian23 c653378db7 imp(systemd): support successful managed restarts
- Improve overall systemd handling and add further BSD support

Fixes #3193
2026-08-26 23:43:18 -04:00
bbedward 662dffc141 core: drop curl dependencies, weather: bump API timeouts (#2430) 2026-08-26 14:58:17 -04:00
Huỳnh Thiện Lộcandbbedward 0bee6a2844 feat(screenshot): drag region with ctrl (#3157)
* feat(screenshot): drag region with ctrl

* fix(screenshot): rehome moved regions

* fix(screenshot): clamp region to active output

* fix(screenshot): fall back to output union when moved region exceeds active output

---------

Co-authored-by: bbedward <[email protected]>
2026-08-24 18:49:29 -04:00
bbedward fb96661092 fix(network): repair 802.1x credential persistence, add EAP method selection 2026-08-24 14:31:59 -04:00
Huỳnh Thiện Lộc 4d9d3422d2 feat(screenshot): use native cursor shapes (#3155)
* feat(screenshot): use native cursor shapes

* fix(screenshot): reuse cursor shape device

* refactor(proto): generate cursor shape binding
2026-08-23 13:49:02 -04:00
bbedward 8bff5eb4fc core: use dankgo go-wayland-scanner and update README for proto
generation
2026-08-23 12:51:33 -04:00
Peter Fern 60a8310002 feat(dank16): Support full matugen color format output (#3148) 2026-08-23 00:24:17 -04:00