Add wallust support
This commit is contained in:
parent
032547c46e
commit
37c3dacff4
11 changed files with 126 additions and 135 deletions
|
|
@ -1,26 +0,0 @@
|
||||||
{
|
|
||||||
"backgroundPrimary": "{{ background }}",
|
|
||||||
"backgroundSecondary": "{{ background | lighten(0.05) }}",
|
|
||||||
"backgroundTertiary": "{{ background | lighten(0.1) }}",
|
|
||||||
|
|
||||||
"surface": "{{ background | lighten(0.08) }}",
|
|
||||||
"surfaceVariant": "{{ background | lighten(0.15) }}",
|
|
||||||
|
|
||||||
"textPrimary": "{{ foreground }}",
|
|
||||||
"textSecondary": "{{ foreground | darken(0.1) }}",
|
|
||||||
"textDisabled": "{{ foreground | darken(0.4) }}",
|
|
||||||
|
|
||||||
"accentPrimary": "{{ color4 }}",
|
|
||||||
"accentSecondary": "{{ color4 | lighten(0.2) }}",
|
|
||||||
"accentTertiary": "{{ color4 | darken(0.2) }}",
|
|
||||||
|
|
||||||
"error": "{{ color5 | lighten(0.1) }}",
|
|
||||||
"warning": "{{ color5 | lighten(0.3) }}",
|
|
||||||
|
|
||||||
"highlight": "{{ color4 | lighten(0.4) }}",
|
|
||||||
"onAccent": "{{ background }}",
|
|
||||||
"outline": "{{ background | lighten(0.3) }}",
|
|
||||||
|
|
||||||
"shadow": "{{ background }}",
|
|
||||||
"overlay": "{{ background }}"
|
|
||||||
}
|
|
||||||
26
Assets/Wallust/templates/noctalia.json
Normal file
26
Assets/Wallust/templates/noctalia.json
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"backgroundPrimary": "{{ background }}",
|
||||||
|
"backgroundSecondary": "{{ background | lighten(0.03) }}",
|
||||||
|
"backgroundTertiary": "{{ background | lighten(0.06) }}",
|
||||||
|
|
||||||
|
"surface": "{{ background | lighten(0.04) }}",
|
||||||
|
"surfaceVariant": "{{ background | lighten(0.08) }}",
|
||||||
|
|
||||||
|
"textPrimary": "{{ foreground | darken(0.1) }}",
|
||||||
|
"textSecondary": "{{ foreground | darken(0.3) }}",
|
||||||
|
"textDisabled": "{{ foreground | darken(0.5) }}",
|
||||||
|
|
||||||
|
"accentPrimary": "{{ color4 | darken(0.3) | saturate(0.4) }}",
|
||||||
|
"accentSecondary": "{{ color1 | darken(0.4) | saturate(0.3) }}",
|
||||||
|
"accentTertiary": "{{ color3 | darken(0.35) | saturate(0.35) }}",
|
||||||
|
|
||||||
|
"error": "{{ color5 | darken(0.25) | saturate(0.5) }}",
|
||||||
|
"warning": "{{ color6 | darken(0.3) | saturate(0.4) }}",
|
||||||
|
|
||||||
|
"hover": "{{ color4 | darken(0.2) | saturate(0.3) }}",
|
||||||
|
"onAccent": "{{ background }}",
|
||||||
|
"outline": "{{ background | lighten(0.15) }}",
|
||||||
|
|
||||||
|
"shadow": "{{ background }}",
|
||||||
|
"overlay": "{{ background }}"
|
||||||
|
}
|
||||||
|
|
@ -44,4 +44,4 @@ check_contrast = true
|
||||||
# target: ABSOLUTE path in which to place a file with generated templated values.
|
# target: ABSOLUTE path in which to place a file with generated templated values.
|
||||||
# ¡ If either one is a directory, then both SHOULD be one. !
|
# ¡ If either one is a directory, then both SHOULD be one. !
|
||||||
# zathura = { template = 'zathura', target = '~/.config/zathura/zathurarc' }
|
# zathura = { template = 'zathura', target = '~/.config/zathura/zathurarc' }
|
||||||
Quickshell = { template = 'quickshell.json', target = '~/.config/Noctalia/Theme.json' }
|
Noctalia = { template = 'noctalia.json', target = '~/.config/noctalia/Theme.json' }
|
||||||
|
|
@ -15,9 +15,9 @@ Variants {
|
||||||
// Force update when SWWW setting changes
|
// Force update when SWWW setting changes
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
if (visible) {
|
if (visible) {
|
||||||
console.log("Background: Showing wallpaper:", wallpaperSource)
|
|
||||||
} else {
|
} else {
|
||||||
console.log("Background: Hiding wallpaper (SWWW enabled)")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ ColumnLayout {
|
||||||
|
|
||||||
NText {
|
NText {
|
||||||
text: "Path to your wallpaper folder"
|
text: "Path to your wallpaper folder"
|
||||||
font.pointSize: Style.fontSizeSmall * scaling
|
font.pointSize: 12
|
||||||
color: Colors.textSecondary
|
color: Colors.textSecondary
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ Singleton {
|
||||||
vol = 0
|
vol = 0
|
||||||
}
|
}
|
||||||
root._volume = vol
|
root._volume = vol
|
||||||
console.log("[Audio] onVolumeChanged: " + root._volume.toFixed(2))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMutedChanged() {
|
function onMutedChanged() {
|
||||||
|
|
|
||||||
|
|
@ -9,47 +9,113 @@ Singleton {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
// Backgrounds
|
// Backgrounds
|
||||||
property color backgroundPrimary: themeData.backgroundPrimary
|
property color backgroundPrimary: useWallust ? wallustTheme.backgroundPrimary : defaultTheme.backgroundPrimary
|
||||||
property color backgroundSecondary: themeData.backgroundSecondary
|
property color backgroundSecondary: useWallust ? wallustTheme.backgroundSecondary : defaultTheme.backgroundSecondary
|
||||||
property color backgroundTertiary: themeData.backgroundTertiary
|
property color backgroundTertiary: useWallust ? wallustTheme.backgroundTertiary : defaultTheme.backgroundTertiary
|
||||||
|
|
||||||
// Surfaces & Elevation
|
// Surfaces & Elevation
|
||||||
property color surface: themeData.surface
|
property color surface: useWallust ? wallustTheme.surface : defaultTheme.surface
|
||||||
property color surfaceVariant: themeData.surfaceVariant
|
property color surfaceVariant: useWallust ? wallustTheme.surfaceVariant : defaultTheme.surfaceVariant
|
||||||
|
|
||||||
// Text Colors
|
// Text Colors
|
||||||
property color textPrimary: themeData.textPrimary
|
property color textPrimary: useWallust ? wallustTheme.textPrimary : defaultTheme.textPrimary
|
||||||
property color textSecondary: themeData.textSecondary
|
property color textSecondary: useWallust ? wallustTheme.textSecondary : defaultTheme.textSecondary
|
||||||
property color textDisabled: themeData.textDisabled
|
property color textDisabled: useWallust ? wallustTheme.textDisabled : defaultTheme.textDisabled
|
||||||
|
|
||||||
// Accent Colors
|
// Accent Colors
|
||||||
property color accentPrimary: themeData.accentPrimary
|
property color accentPrimary: useWallust ? wallustTheme.accentPrimary : defaultTheme.accentPrimary
|
||||||
property color accentSecondary: themeData.accentSecondary
|
property color accentSecondary: useWallust ? wallustTheme.accentSecondary : defaultTheme.accentSecondary
|
||||||
property color accentTertiary: themeData.accentTertiary
|
property color accentTertiary: useWallust ? wallustTheme.accentTertiary : defaultTheme.accentTertiary
|
||||||
|
|
||||||
// Error/Warning
|
// Error/Warning
|
||||||
property color error: themeData.error
|
property color error: useWallust ? wallustTheme.error : defaultTheme.error
|
||||||
property color warning: themeData.warning
|
property color warning: useWallust ? wallustTheme.warning : defaultTheme.warning
|
||||||
|
|
||||||
// Hover
|
// Hover
|
||||||
property color hover: themeData.hover
|
property color hover: useWallust ? wallustTheme.hover : defaultTheme.hover
|
||||||
|
|
||||||
// Additional Theme Properties
|
// Additional Theme Properties
|
||||||
property color onAccent: themeData.onAccent
|
property color onAccent: useWallust ? wallustTheme.onAccent : defaultTheme.onAccent
|
||||||
property color outline: themeData.outline
|
property color outline: useWallust ? wallustTheme.outline : defaultTheme.outline
|
||||||
|
|
||||||
// Shadows & Overlays
|
// Shadows & Overlays
|
||||||
property color shadow: applyOpacity(themeData.shadow, "B3")
|
property color shadow: applyOpacity(useWallust ? wallustTheme.shadow : defaultTheme.shadow, "B3")
|
||||||
property color overlay: applyOpacity(themeData.overlay, "66")
|
property color overlay: applyOpacity(useWallust ? wallustTheme.overlay : defaultTheme.overlay, "66")
|
||||||
|
|
||||||
|
// Check if we should use Wallust theme
|
||||||
|
property bool useWallust: Settings.data.wallpaper.generateTheme && wallustFile.loaded
|
||||||
|
|
||||||
function applyOpacity(color, opacity) {
|
function applyOpacity(color, opacity) {
|
||||||
return color.replace("#", "#" + opacity)
|
// Convert color to string and apply opacity
|
||||||
|
return color.toString().replace("#", "#" + opacity)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FileView to load theme data from JSON file
|
// Default theme colors
|
||||||
|
QtObject {
|
||||||
|
id: defaultTheme
|
||||||
|
|
||||||
|
property color backgroundPrimary: "#191724"
|
||||||
|
property color backgroundSecondary: "#1f1d2e"
|
||||||
|
property color backgroundTertiary: "#26233a"
|
||||||
|
|
||||||
|
property color surface: "#1f1d2e"
|
||||||
|
property color surfaceVariant: "#37354c"
|
||||||
|
|
||||||
|
property color textPrimary: "#e0def4"
|
||||||
|
property color textSecondary: "#908caa"
|
||||||
|
property color textDisabled: "#6e6a86"
|
||||||
|
|
||||||
|
property color accentPrimary: "#ebbcba"
|
||||||
|
property color accentSecondary: "#31748f"
|
||||||
|
property color accentTertiary: "#9ccfd8"
|
||||||
|
|
||||||
|
property color error: "#eb6f92"
|
||||||
|
property color warning: "#f6c177"
|
||||||
|
|
||||||
|
property color hover: "#c4a7e7"
|
||||||
|
|
||||||
|
property color onAccent: "#191724"
|
||||||
|
property color outline: "#44415a"
|
||||||
|
|
||||||
|
property color shadow: "#191724"
|
||||||
|
property color overlay: "#191724"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wallust theme colors (loaded from Theme.json)
|
||||||
|
QtObject {
|
||||||
|
id: wallustTheme
|
||||||
|
|
||||||
|
property color backgroundPrimary: wallustData.backgroundPrimary
|
||||||
|
property color backgroundSecondary: wallustData.backgroundSecondary
|
||||||
|
property color backgroundTertiary: wallustData.backgroundTertiary
|
||||||
|
|
||||||
|
property color surface: wallustData.surface
|
||||||
|
property color surfaceVariant: wallustData.surfaceVariant
|
||||||
|
|
||||||
|
property color textPrimary: wallustData.textPrimary
|
||||||
|
property color textSecondary: wallustData.textSecondary
|
||||||
|
property color textDisabled: wallustData.textDisabled
|
||||||
|
|
||||||
|
property color accentPrimary: wallustData.accentPrimary
|
||||||
|
property color accentSecondary: wallustData.accentSecondary
|
||||||
|
property color accentTertiary: wallustData.accentTertiary
|
||||||
|
|
||||||
|
property color error: wallustData.error
|
||||||
|
property color warning: wallustData.warning
|
||||||
|
|
||||||
|
property color hover: wallustData.hover
|
||||||
|
|
||||||
|
property color onAccent: wallustData.onAccent
|
||||||
|
property color outline: wallustData.outline
|
||||||
|
|
||||||
|
property color shadow: wallustData.shadow
|
||||||
|
property color overlay: wallustData.overlay
|
||||||
|
}
|
||||||
|
|
||||||
|
// FileView to load Wallust theme data from Theme.json
|
||||||
FileView {
|
FileView {
|
||||||
id: themeFile
|
id: wallustFile
|
||||||
path: Settings.colorsFile
|
path: Settings.configDir + "Theme.json"
|
||||||
watchChanges: true
|
watchChanges: true
|
||||||
onFileChanged: reload()
|
onFileChanged: reload()
|
||||||
onAdapterUpdated: writeAdapter()
|
onAdapterUpdated: writeAdapter()
|
||||||
|
|
@ -60,7 +126,7 @@ Singleton {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
JsonAdapter {
|
JsonAdapter {
|
||||||
id: themeData
|
id: wallustData
|
||||||
|
|
||||||
// Backgrounds
|
// Backgrounds
|
||||||
property string backgroundPrimary: "#191724"
|
property string backgroundPrimary: "#191724"
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ Singleton {
|
||||||
onLoaded: function () {
|
onLoaded: function () {
|
||||||
Qt.callLater(function () {
|
Qt.callLater(function () {
|
||||||
if (adapter.wallpaper.current !== "") {
|
if (adapter.wallpaper.current !== "") {
|
||||||
console.log("Settings: Initializing wallpaper to:", adapter.wallpaper.current)
|
|
||||||
Wallpapers.setCurrentWallpaper(adapter.wallpaper.current, true)
|
Wallpapers.setCurrentWallpaper(adapter.wallpaper.current, true)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ Singleton {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setCurrentWallpaper(path, isInitial) {
|
function setCurrentWallpaper(path, isInitial) {
|
||||||
console.log("Wallpapers: Setting wallpaper to:", path, "isInitial:", isInitial)
|
|
||||||
currentWallpaper = path
|
currentWallpaper = path
|
||||||
if (!isInitial) {
|
if (!isInitial) {
|
||||||
Settings.data.wallpaper.current = path
|
Settings.data.wallpaper.current = path
|
||||||
|
|
@ -50,7 +50,7 @@ Singleton {
|
||||||
} else {
|
} else {
|
||||||
transitionType = Settings.data.wallpaper.swww.transitionType
|
transitionType = Settings.data.wallpaper.swww.transitionType
|
||||||
}
|
}
|
||||||
console.log("SWWW: Changing wallpaper with transition type:", transitionType)
|
|
||||||
changeWallpaperProcess.running = true
|
changeWallpaperProcess.running = true
|
||||||
} else {
|
} else {
|
||||||
// Fallback: update the settings directly for non-SWWW mode
|
// Fallback: update the settings directly for non-SWWW mode
|
||||||
|
|
@ -140,11 +140,11 @@ Singleton {
|
||||||
running: false
|
running: false
|
||||||
|
|
||||||
onStarted: {
|
onStarted: {
|
||||||
console.log("SWWW: Process started with command:", command.join(" "))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onExited: function(exitCode, exitStatus) {
|
onExited: function(exitCode, exitStatus) {
|
||||||
console.log("SWWW: Process finished with exit code:", exitCode, "status:", exitStatus)
|
|
||||||
if (exitCode !== 0) {
|
if (exitCode !== 0) {
|
||||||
console.log("SWWW: Process failed. Make sure swww-daemon is running with: swww-daemon")
|
console.log("SWWW: Process failed. Make sure swww-daemon is running with: swww-daemon")
|
||||||
console.log("SWWW: You can start it with: swww-daemon --format xrgb")
|
console.log("SWWW: You can start it with: swww-daemon --format xrgb")
|
||||||
|
|
@ -154,7 +154,7 @@ Singleton {
|
||||||
|
|
||||||
Process {
|
Process {
|
||||||
id: generateThemeProcess
|
id: generateThemeProcess
|
||||||
command: ["wallust", "run", currentWallpaper, "-u", "-k", "-d", "Templates"]
|
command: ["wallust", "run", currentWallpaper, "-u", "-k", "-d", "Assets/Wallust"]
|
||||||
workingDirectory: Quickshell.shellDir
|
workingDirectory: Quickshell.shellDir
|
||||||
running: false
|
running: false
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
{
|
|
||||||
"backgroundPrimary": "{{ background }}",
|
|
||||||
"backgroundSecondary": "{{ background | lighten(0.05) }}",
|
|
||||||
"backgroundTertiary": "{{ background | lighten(0.1) }}",
|
|
||||||
|
|
||||||
"surface": "{{ background | lighten(0.08) }}",
|
|
||||||
"surfaceVariant": "{{ background | lighten(0.15) }}",
|
|
||||||
|
|
||||||
"textPrimary": "{{ foreground }}",
|
|
||||||
"textSecondary": "{{ foreground | darken(0.1) }}",
|
|
||||||
"textDisabled": "{{ foreground | darken(0.4) }}",
|
|
||||||
|
|
||||||
"accentPrimary": "{{ color4 }}",
|
|
||||||
"accentSecondary": "{{ color4 | lighten(0.2) }}",
|
|
||||||
"accentTertiary": "{{ color4 | darken(0.2) }}",
|
|
||||||
|
|
||||||
"error": "{{ color5 | lighten(0.1) }}",
|
|
||||||
"warning": "{{ color5 | lighten(0.3) }}",
|
|
||||||
|
|
||||||
"highlight": "{{ color4 | lighten(0.4) }}",
|
|
||||||
"rippleEffect": "{{ color4 | lighten(0.1) }}",
|
|
||||||
|
|
||||||
"onAccent": "{{ background }}",
|
|
||||||
"outline": "{{ background | lighten(0.3) }}",
|
|
||||||
|
|
||||||
"shadow": "{{ background }}",
|
|
||||||
"overlay": "{{ background }}"
|
|
||||||
}
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
# wallust v3.4
|
|
||||||
#
|
|
||||||
# You can copy this file to ~/.config/wallust/wallust.toml (keep in mind is a sample config)
|
|
||||||
|
|
||||||
# SIMPLE TUTORIAL, or `man wallust.5`:
|
|
||||||
# https://explosion-mental.codeberg.page/wallust/
|
|
||||||
#
|
|
||||||
# If comming from v2: https://explosion-mental.codeberg.page/wallust/v3.html#wallusttoml
|
|
||||||
|
|
||||||
# Global section - values below can be overwritten by command line flags
|
|
||||||
|
|
||||||
# How the image is parse, in order to get the colors:
|
|
||||||
# full - resized - wal - thumb - fastresize - kmeans
|
|
||||||
backend = "fastresize"
|
|
||||||
|
|
||||||
# What color space to use to produce and select the most prominent colors:
|
|
||||||
# lab - labmixed - lch - lchmixed
|
|
||||||
color_space = "lch"
|
|
||||||
|
|
||||||
# Use the most prominent colors in a way that makes sense, a scheme color palette:
|
|
||||||
# dark - dark16 - darkcomp - darkcomp16
|
|
||||||
# light - light16 - lightcomp - lightcomp16
|
|
||||||
# harddark - harddark16 - harddarkcomp - harddarkcomp16
|
|
||||||
# softdark - softdark16 - softdarkcomp - softdarkcomp16
|
|
||||||
# softlight - softlight16 - softlightcomp - softlightcomp16
|
|
||||||
palette = "dark"
|
|
||||||
|
|
||||||
# Ensures a "readable contrast" (OPTIONAL, disabled by default)
|
|
||||||
# Should only be enabled when you notice an unreadable contrast frequently happening
|
|
||||||
# with your images. The reference color for the contrast is the background color.
|
|
||||||
#check_contrast = true
|
|
||||||
|
|
||||||
# Color saturation, between [1% and 100%] (OPTIONAL, disabled by default)
|
|
||||||
# usually something higher than 50 increases the saturation and below
|
|
||||||
# decreases it (on a scheme with strong and vivid colors)
|
|
||||||
#saturation = 35
|
|
||||||
|
|
||||||
# Alpha value for templating, by default 100 (no other use whatsoever)
|
|
||||||
#alpha = 100
|
|
||||||
|
|
||||||
[templates]
|
|
||||||
# NOTE: prefer '' over "" for paths, avoids escaping.
|
|
||||||
# template: A RELATIVE path that points to `~/.config/wallust/template` (depends on platform)
|
|
||||||
# target: ABSOLUTE path in which to place a file with generated templated values.
|
|
||||||
# ¡ If either one is a directory, then both SHOULD be one. !
|
|
||||||
# zathura = { template = 'zathura', target = '~/.config/zathura/zathurarc' }
|
|
||||||
Noctalia = { template = 'noctalia.json', target = '~/.config/noctalia/Theme.json' }
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue