Skip to content

feat: add timer to bar clock#1498

Draft
FoxlikeCreature wants to merge 10 commits into
caelestia-dots:mainfrom
FoxlikeCreature:feat/timer
Draft

feat: add timer to bar clock#1498
FoxlikeCreature wants to merge 10 commits into
caelestia-dots:mainfrom
FoxlikeCreature:feat/timer

Conversation

@FoxlikeCreature

@FoxlikeCreature FoxlikeCreature commented May 26, 2026

Copy link
Copy Markdown
Contributor

Adds a countdown timer to the bar.

How it works

Hover over the clock - a popout slides out with hour/minute/second inputs. You can type values directly or use the arrow buttons. Hit Start. While the timer runs a small indicator shows up under the clock with the remaining time. When it finishes, the popout reopens automatically with a bongo cat and a Dismiss button. An optional sound plays on finish.

The timer survives shell reloads - if you restart Quickshell mid-timer it picks back up where it left off.

image image image image

Config (shell.json under bar.clock.timer):
enabled (bool, default true) - enable or disable the whole feature
soundFile (string) - path to a wav/ogg file to play on finish, defaults to the included assets/timer-done.wav

Optional: timer as a status icon

There's also bar.status.showTimer (default false), togglable from the Taskbar settings pane (Status Icons row, after Capslock). When on, a dedicated timer icon appears in the status icons column instead of the clock being interactive - the icon shows remaining time while running, and hovering it opens the same popout.

Files changed
services/TimerService.qml - new singleton, handles state + persistence
modules/bar/popouts/TimerPopout.qml - new popout UI
modules/bar/popouts/PopoutState.qml - added locked property to prevent hover from closing the done notification
modules/bar/popouts/Wrapper.qml - keyboard focus + locked alias
modules/bar/popouts/Content.qml - register TimerPopout
modules/bar/Bar.qml - wire up clock hover + timer finish handler
modules/bar/components/Clock.qml - running indicator under clock
modules/bar/components/StatusIcons.qml - optional timer status icon
modules/drawers/Interactions.qml - respect locked when mouse leaves bar
modules/controlcenter/taskbar/TaskbarPane.qml - Timer toggle in settings
plugin/src/Caelestia/Config/barconfig.hpp - new config properties
assets/timer-done.wav - default sound (three beeps)

Note: this PR will be rebased after caelestia v2.0 releases.

Adds a timer accessible from the bar. Hovering over the clock slides out
a popout where you can set hours, minutes, seconds and start the countdown.
While running, a small indicator appears under the clock showing the time
left. When the timer finishes, the popout reopens automatically with a
bongo cat animation and a dismiss button. An optional sound plays on
finish - configurable via bar.clock.timer.soundFile in shell.json, defaults
to the included timer-done.wav.

The timer persists across shell reloads (uses PersistentProperties).

Also adds an optional "Timer" status icon (bar.status.showTimer) - when
enabled, a dedicated icon appears in the status icons column instead of
the clock interaction. Shows the timer icon when idle and remaining time
when running. Toggled from the Taskbar settings pane.

New config options:
- bar.clock.timer.enabled (bool, default true) - enable/disable the feature
- bar.clock.timer.soundFile (string) - path to sound file played on finish
- bar.status.showTimer (bool, default false) - show as status icon instead
@FoxlikeCreature FoxlikeCreature force-pushed the feat/timer branch 2 times, most recently from a465a0d to 319ece5 Compare May 26, 2026 01:00
@FoxlikeCreature FoxlikeCreature marked this pull request as draft May 26, 2026 01:31
@FoxlikeCreature

Copy link
Copy Markdown
Contributor Author

There is a bug found with timer dedicated button isn't turning off. I'll mark PR as a draft till I fix it.

FoxlikeCreature added 9 commits May 26, 2026 17:58
- Replaced StackLayout with animated Items using y-offset bindings
- Each tab uses y: (n - timerPanelTab) * parent.height with Anim.DefaultSpatial
- Moved back button into each tab as BackBtn component so it slides with content
- Removed static back button from DateTime.qml
Reminder functionality was already implemented in a separate commit
by another contributor. Removed all reminder-specific code:
- deleted ReminderService.qml
- removed Reminder tab from DashTimerPanel (now 2 tabs: Timer + Alarm)
- stripped reminder properties and views from Calendar.qml
- removed reminderPickedDate from DashboardState
- cleaned up FiringOverlay, Wrapper, Bar references to ReminderService
LockState singleton propagates WlSessionLock state. Wrapper.qml checks
LockState.locked before opening fire overlay - defers until session unlocks.
SpinGroup was breaking its value binding via internal assignment (spinGroup.value = v).
When the timer started, the binding to TimerService.remainingSeconds was already broken
from previous user input. Now SpinGroup only emits valueModified - value is always
controlled by the external binding, which ticks correctly.
root._store is not a valid property reference - _store is a child
object accessible by ID directly, not as a property of root.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant