Skip to content

Commit

Permalink
Make appearance namespace const public
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz committed Nov 10, 2024
1 parent 7bfab1c commit 9a32628
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion settings/appearance/appearance.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Package appearance is a helper package for reading appearance settings.
package appearance

const appearanceNamespace = "org.freedesktop.appearance"
// Namespace defines the namespace of the appearance portal.
const Namespace = "org.freedesktop.appearance"
4 changes: 2 additions & 2 deletions settings/appearance/color.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const (

// GetColorScheme returns the currently set color scheme.
func GetColorScheme() (ColorScheme, error) {
value, err := settings.ReadOne(appearanceNamespace, "color-scheme")
value, err := settings.ReadOne(Namespace, "color-scheme")
if err != nil {
return NoPreference, err
}
Expand All @@ -37,7 +37,7 @@ func GetColorScheme() (ColorScheme, error) {
// GetAccentColor returns the currently set accent color.
// If not set, the ErrorNotSet will be returned.
func GetAccentColor() (*color.RGBA, error) {
value, err := settings.ReadOne(appearanceNamespace, "accent-color")
value, err := settings.ReadOne(Namespace, "accent-color")
if err != nil {
return nil, ErrNotSet
}
Expand Down
2 changes: 1 addition & 1 deletion settings/appearance/contrast.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const (

// GetContrast returns the currently set contrast setting.
func GetContrast() (Contrast, error) {
value, err := settings.ReadOne(appearanceNamespace, "color-scheme")
value, err := settings.ReadOne(Namespace, "color-scheme")
if err != nil {
return NormalContrast, err
}
Expand Down

0 comments on commit 9a32628

Please sign in to comment.