Commit graph

36 commits

Author SHA1 Message Date
Victoria Brekenfeld
fdfd80f8b1 chore: Update ron to 0.9 2025-01-22 15:50:44 +01:00
Ashley Wulber
3f2ba11d56 refactor: send initial config after watching for changes 2024-12-31 11:23:28 -05:00
Ashley Wulber
0491c4baaa libcosmic updates 2024-10-18 14:04:39 -04:00
Victoria Brekenfeld
61760f8e4e cosmic-config: Update calloop 2024-06-26 16:16:31 +02:00
Michael Aaron Murphy
0d4c3db162
chore(doc): inline re-exported API docs 2024-05-20 17:19:42 +02:00
Ashley Wulber
78a137214d chore: update zbus 2024-05-17 00:00:24 +02:00
Ashley Wulber
6a97435263 fix(cosmic-config): attempt to reconnect to the settings daemon 2024-05-12 21:27:22 +02:00
Ashley Wulber
dd952bbfdb feat: custom config path 2024-04-09 22:36:18 +02:00
Victoria Brekenfeld
cc439b2cea chore: Update calloop 2024-03-26 14:51:33 +01:00
Ashley Wulber
d6b87a0222 chore: update gtk4-output for the theme to set adwaita named colors
This is still a bit incomplete, and some apps use their own custom variables as well, for example the text editor.
2024-03-18 14:49:40 -06:00
Ashley Wulber
52491e08ee fix(config): check default_path if key_path fails 2024-03-08 14:15:25 -07:00
Ashley Wulber
3e6f314c6b refactor: support loading a Config exclusively for reading the system settings 2024-03-08 12:23:54 -05:00
Gary Guo
3aef16bf9e improv(cosmic-config): remove hardcoded paths
This commit changes the hardcoded /usr/share paths in cosmic-config to
become performed via XDG lookups using the `xdg` crate.

This allows the installed files to be discovered on non-FHS Linux, e.g.
NixOS.

Hardcoded /var/lib/ is removed entirely because
1. nothing installs to it yet (only user of new_state is cosmic_bg
   currently and it does not install to /var/lib)
2. it's intended for system states, not template for user state.
3. it's not part of XDG spec.

On Windows the known folder crate is used.

Signed-off-by: Gary Guo <gary@garyguo.net>
2024-01-24 19:08:19 +01:00
Ashley Wulber
efe4ce2f5b refactor: config improvements 2024-01-18 20:19:32 -07:00
Jeremy Soller
94a1bbdaa5 cosmic-config: pretty print config file data 2024-01-12 09:57:08 -07:00
Ashley Wulber
eff22fdb34 chore(cosmic-config): update to include state and remove ping/pong 2024-01-02 15:12:14 +01:00
Ashley Wulber
e1c53277d9 cleanup 2024-01-02 15:12:14 +01:00
Ashley Wulber
06c33dcf06 refactor: optional config subscriptions using dbus 2024-01-02 15:12:14 +01:00
Ashley Wulber
a4d1b1b651 refactor: cosmic-config granular key updates and remove unused generics from cosmic-theme 2024-01-02 15:12:14 +01:00
Ashley Wulber
9202383596 chore: update to 0.12 2023-12-04 17:53:24 -05:00
danieleades
8e99406a8b
chore: fixing linter warnings 2023-11-28 20:02:08 +01:00
Jeremy Soller
be62ed4a7d Add config_state_subscription for watching config states 2023-11-27 15:09:57 -07:00
Jeremy Soller
afdac36219 Use forked atomicwrites for Redox support 2023-11-16 08:06:07 -07:00
Ashley Wulber
7cc791a3f5
feat: add support for dark / light mode switching (#178)
* feat: add support for dark / light mode switching and simultaneouscustom light / dark mode themes

* refactor(color-picker): optional initial color and fallback color

* refactor: used FixedPortion for layout of the settings item

This makes sure that the control always has at least the specified portion of the available space

* refactor: make all members of the ThemeBuilder public

* refactor: add and update palette colors

* fix(theme): typo and derive PartialEq for ThemeBuilder

* fix: update color picker usage

* feat: add more variables to the theme

* fix: radius on headerbar

* fix: Theme CosmicConfigEntry impl

* chore: specify rev of taffy

* fix: theme CosmicConfigEntry missing variables

* fix: apply theme type when theme mode changes

* wip: add plus icon to empty color picker button

* chore: fix rev and imports

* refactor(color-picker): allow custom size for the icon

* refactor(color_picker): make color_button public

* update iced
2023-10-16 16:19:04 -04:00
Michael Aaron Murphy
32eafb0c48 chore(config): apply rustfmt 2023-10-12 16:37:38 +02:00
Jeremy Soller
f0005165f3 cosmic-config: Add new_state constructor for storing state 2023-10-09 09:27:03 -06:00
Victoria Brekenfeld
f91287dec2
chore: Update calloop (#173)
* chore: Update calloop

* chore: Allow compiling without windowing system

* CI: Add test without any features
2023-10-02 17:51:33 +02:00
Ashley Wulber
7e286d0953 update iced 2023-10-02 10:24:43 -04:00
Ashley Wulber
70077ca985 feat: color picker 2023-10-02 10:24:43 -04:00
Ashley Wulber
40efcbbe31 refactor: use channel subscription for config subscriptions 2023-08-14 12:31:16 -04:00
Ian Douglas Scott
4895b0c9bd
config: Implement fmt::Display and std::error::Error for Error (#136) 2023-07-28 12:44:57 -07:00
Ian Douglas Scott
456b2ddcd5
config: Ignore some filesystem events (#125)
APIs like inotify can provide notification for some events that don't
change the contents of a file. It makes sense to ignore those here, even
if the expected way to write is through the config API.

This reduces the number of events on the directory received by a single
`:w` in vim from 12 to 8. And reduces a `touch` from 2 events to 1.

Atomic writes through the config API only result in 1 event per-setting,
before and after this change.
2023-07-03 14:33:25 -07:00
Victoria Brekenfeld
cf2818c4a1
cosmic-config: Don't pull all of iced (#111) 2023-06-02 14:52:40 +02:00
Ashley Wulber
e056e8c830
Cosmic advanced text (#103)
* wip: update to use cosmic-advanced-text

* use cosmic-advanced-text branch of iced

* fix: line height and spacing for segmented button and update to get svg fix

* fix: spin button styling & spacing

* update iced to fix segmented button border radius

* feat: example improvements

* feat: helper for loading fonts

* feat: add focus style to button

* fix: slider height and iced fixed

* feat: hash icon width and height

* cleanup

* update ci

* refactor: always use lazy feature of iced

* update iced

* update iced

* cleanup & update iced

* update iced: new slider & tiny-skia quad updates

* update iced: fixes for tiny-skia quad rendering with edge case border radius

* re-export iced_runtime & iced_widget

* merge master

* udpate iced

* update iced

* update iced

* update iced

* fix: make rectangle_tracker subscription only return update if there is some

* feat: derive macro for loading a cosmic-config

* feat (cosmic-config): iced subscription

* fix (example): update to rectangle tracker subscription

* fix (cosmic-config)

* refactor(cosmic-config-derive): add support for types with generic parameters

* fix (cosmic-config): feature gate updates for subscription helpers

* feat: support for custom & system themes + move cosmic-theme to libcosmic

* feat: sorta hacky way of creating header bars for libcosmic + update iced to get support for resizable windows in iced-sctk

* update iced

* update and reexport sctk

* fix: applet border radius

* feat (cosmic-theme): add id and name methods

* fix(cosmic-theme): reexport palette from cosmic-theme

* fix(cosmic-config-derive): allow use with reexported cosmic-config

* feat: update iced with fix and refactor applet env vars

* update iced
2023-05-30 12:03:15 -04:00
Ian Douglas Scott
355e5a9715
config: Add calloop feature to provide a calloop source (#102)
This should be useful for integrating cosmic-config into things using
calloop, like cosmic-comp.
2023-05-09 08:45:21 -07:00
Jeremy Soller
e3ec7e3b7d WIP: Config API 2023-03-10 09:39:33 -07:00