Merge pull request #189 from lonerOrz/feat/wallpaper

Added a toggle for Noctalia-shell wallpaper management
This commit is contained in:
Lemmy 2025-09-01 19:34:47 -04:00 committed by GitHub
commit e6a1bc6e27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 12 additions and 3 deletions

View file

@ -170,6 +170,7 @@ Singleton {
// wallpaper
property JsonObject wallpaper: JsonObject {
property bool enabled: true
property string directory: "/usr/share/wallpapers"
property bool enableMultiMonitorDirectories: false
property bool setWallpaperOnAllMonitors: true

View file

@ -12,7 +12,7 @@ Variants {
required property ShellScreen modelData
active: Settings.isLoaded && modelData
active: Settings.isLoaded && modelData && Settings.data.wallpaper.enabled
sourceComponent: PanelWindow {
id: root

View file

@ -12,7 +12,7 @@ Variants {
delegate: Loader {
required property ShellScreen modelData
active: Settings.isLoaded && CompositorService.isNiri && modelData
active: Settings.isLoaded && CompositorService.isNiri && modelData && Settings.data.wallpaper.enabled
property string wallpaper: ""

View file

@ -10,7 +10,15 @@ import qs.Widgets
ColumnLayout {
id: root
NToggle {
label: "Enable Wallpaper Management"
description: "Let Quickshell manage your wallpaper. Disable this if you use an external wallpaper daemon like swww."
checked: Settings.data.wallpaper.enabled
onToggled: checked => Settings.data.wallpaper.enabled = checked
}
ColumnLayout {
enabled: Settings.data.wallpaper.enabled
spacing: Style.marginL * scaling
Layout.fillWidth: true
NTextInput {

View file

@ -59,7 +59,7 @@ void main() {
int stripeIndex = int(floor(stripePos));
// Determine if this is an odd or even stripe
bool isOddStripe = (stripeIndex % 2) == 1;
bool isOddStripe = mod(float(stripeIndex), 2.0) != 0.0;
// Calculate the progress for this specific stripe with wave delay
// Use absolute stripe position for consistent delay across all stripes