Commit graph

101 commits

Author SHA1 Message Date
Ilya Zlobintsev
a1a6caf5e5
feat(battery): add option to show charge percentage next to the icon (#994)
* feat(battery): add option to show charge percentage next to the icon

* feat: proper padding and text sizing

* chore: use from_vec instead of from_children

* chore: remove battery percentage setting from applet dropdown

* chore: move config config definition to cosmic-applets-config

* feat: add subscription for config

* chore: revert unnecessary config module change

* fix: correctly scale battery icon size

* chore: change battery applet id

* feat: better battery text sizing

---------

Co-authored-by: Levi Portenier <levi@system76.com>
2026-02-02 14:47:38 -07:00
Ian Douglas Scott
d3eeccfef1 Run cargo fmt 2025-12-08 13:11:49 -08:00
Michael Aaron Murphy
a3fb55a2b8 feat(audio): share cosmic-settings' new sound library 2025-11-26 11:54:00 -05:00
Subhojeet Roy
226c50e233
fix(battery): align brightness reporting with cosmic-osd 2025-11-18 20:39:02 +01:00
Ashley Wulber
836c0e378b applet overlap
chore: mpris dep

fix: dock buttons

improv: battery and audio improvements

feat: overlapping padding

fix: input source text button

fix: apply panel spacing to app tray

chore: update libcosmic

fix: spacing and padding

fix(minimize): hide when empty
2025-11-11 16:49:48 -05:00
Ashley Wulber
ba1e379a75 fix(battery): start and end threshold check
end limits should be greater than start and end should be < 100 for it to be considered enabled
2025-11-05 13:25:17 -05:00
Ashley Wulber
3ba34931e7 fix(battery): restore defaults if unsetting charge limits 2025-11-05 10:09:39 -05:00
Cheong Lau
5369b4eb29
perf: use rustc-hash for HashMap and HashSet 2025-10-22 04:33:30 +02:00
Cheong Lau
dd0158d8f0 perf: refactor to reduce memory allocations and cpu work 2025-10-07 17:04:51 +02:00
Cheong Lau
8e0f1c4a09
chore: apply recommendations from clippy 2025-10-04 02:51:18 +02:00
Victoria Brekenfeld
7fdba2f933 battery: Ignore GPUs without rendering capabilities 2025-09-05 20:42:58 +02:00
Victoria Brekenfeld
84cbfe0d86 battery: Only consider connected built-in ports for primary-gpu logic 2025-09-04 09:59:11 -04:00
Victoria Brekenfeld
e5c89939a7 battery: Align primary gpu detection with cosmic-comp 2025-09-03 12:37:40 -04:00
Victoria Brekenfeld
94646f0124 battery: Trigger dgpu refresh on toggle 2025-09-03 12:37:40 -04:00
Victoria Brekenfeld
8fc0733f73 battery: Autosize applet for dgpu dot 2025-09-03 12:37:40 -04:00
Vukašin Vojinović
2b7b4cba56 chore: update to Rust 2024 edition 2025-08-18 16:44:50 +02:00
Vukašin Vojinović
c3fafd3910 chore: use std::sync::LazyLock
Removes `once_cell` as a direct dependency.
2025-08-18 16:44:50 +02:00
Ashley Wulber
65b8376a40 fix: hide the charge limit toggle on unsupported devices 2025-07-28 14:51:43 -04:00
Ian Douglas Scott
417f43a0f5 Update to zbus 5.x 2025-05-28 13:40:23 -04:00
Ashley Wulber
171afc8be4 chore: cargo fmt 2025-05-20 17:00:56 +02:00
19MisterX98
98aa83893b
fix: text disappearing when moving sliders 2025-05-12 16:15:06 +02:00
Ashley Wulber
619550cf61 fix: handling of surface action 2025-03-18 08:13:03 -04:00
Jonathan Capps
e55d59ed94 fix: prevent time remaining showing 0 after unplugging 2025-03-17 21:27:27 +01:00
Ashley Wulber
25064dff8a fix: battery indicator height 2025-03-17 19:29:21 +01:00
Ashley Wulber
c54ddeb38a chore: udpate libcosmic 2025-03-14 14:26:42 -04:00
Ashley Wulber
61d1d1b91d fix: use fixed window width for all applets 2025-03-14 14:26:42 -04:00
Ashley Wulber
0de336d0d7 update libcosmic: adds tooltip support 2025-03-14 14:26:42 -04:00
Pavol Žáčik
726c8288da fix(battery): default to the balanced profile with PPD backend
TuneD provides a compatibility daemon (tuned-ppd) which replaces
power-profiles-daemon in Fedora 41 [1]. However, the new daemon
can report an "unknown" profile in case the user manipulates with
underlying TuneD profiles directly; see [2].

Before this change, the "unknown" profile makes the battery applet
panic. With this change, the applet reports the balanced profile.
This is in line with the behavior of cosmic-settings [3].

[1] https://pagure.io/fesco/issue/3222
[2] https://github.com/redhat-performance/tuned/pull/669
[3] 6f05e9e/cosmic-settings/src/pages/power/backend/mod.rs (L65)
2025-01-24 12:32:43 +01:00
Ashley Wulber
104a608cf1 fix(battery): fix brightness slider lag 2024-12-04 16:52:49 +01:00
Vukašin Vojinović
6b740c59be fix(app-list): use context menu radius from theme 2024-11-04 08:47:36 -05:00
Ashley Wulber
5b5cd77e7c update iced 2024-10-31 17:52:33 -04:00
Grooble
3670f124fb
fix: show empty dropdown menu when no app uses dGPU 2024-09-24 15:52:53 +02:00
Vukašin Vojinović
941cbf546b
fix: padding, spacing, context menu style, and settings buttons 2024-09-24 15:52:17 +02:00
Piotr
cf06e14545
feat(battery): support charging limits with system76-power 2024-09-06 17:56:11 +02:00
Vukašin Vojinović
02b3fbdb11 fix: use cosmic::widget::text instead of cosmic::iced::widget::text 2024-09-03 16:52:59 +02:00
patrulhasirius
f9c01f54d2
fix(battery): too many decimals in battery percent
Co-authored-by: Lucas Ribeiro <estg-lnr@tce.rs.gov.br>
2024-08-29 20:59:54 +02:00
lazytanuki
e51ca81f7d
feat: toggle popups on press down 2024-08-13 19:03:34 +02:00
Ian Douglas Scott
293a91e8b1 Update for spawn_desktop_exec that calls SpawnTransientUnit
Allows `xdg-desktop-portal` to get app id from PID.

Also updates calls to `cosmic::process::spawn` to spawn in future.
2024-07-28 20:25:23 -07:00
Ashley Wulber
6661598839 feat: misc overflow 2024-07-24 08:51:46 -04:00
Vukašin Vojinović
d9d864f14f fix(battery): settings button 2024-07-09 16:26:27 +02:00
Vukašin Vojinović
f206a55194 cargo fmt 2024-07-09 16:26:27 +02:00
Vukašin Vojinović
46e1fdd9f0 feat(battery): add settings button 2024-07-09 16:26:27 +02:00
Vukašin Vojinović
0640e88412 chore: merge imports 2024-07-09 16:26:27 +02:00
Ian Douglas Scott
a0145bf106 battery: Fix display brightness slider 2024-07-01 20:07:39 -07:00
Ian Douglas Scott
3beda52c1c battery: Make screen brightness Option; hide if none 2024-07-01 20:07:39 -07:00
Ian Douglas Scott
61a9102fce battery: Exit on NoBattery instead of letting subscription handle it 2024-07-01 20:07:39 -07:00
Ian Douglas Scott
0ef2393288 battery: Use max_kbd_brightness as slider range
This makes sure we can listen to brightness subscription and set the
brightness without conflicts or weird workarounds.
2024-07-01 20:07:39 -07:00
Ian Douglas Scott
00e34f4eba battery: Use max_screen_brightness as range of slider
Being able to define sliders this way seems like an advantage of using a
seperate `brightness`/`max_brightness` instead of a float.

Now the `step` of the slider is a single unit as supported by the
display.
2024-07-01 20:07:39 -07:00
Ian Douglas Scott
4b83609ee8 battery: Use settings_daemon for display brightness
This shares a subscription with cosmic-osd, avoiding some duplication.
It's also important that things like selection of the display brightness
device are done consistency, and handling this in cosmic-settings-daemon
is one way to ensure consistency.
2024-07-01 20:07:39 -07:00
Ian Douglas Scott
901a70d7a1 battery: Use cosmic-settings-subscriptions for upower subscriptions
These should be useful in `cosmic-osd` as well.
2024-07-01 20:07:39 -07:00