Skip to content

feat: add wallpaper picker popup with script and hyprpaper support#5

Open
defliez wants to merge 1 commit intodiinki:mainfrom
defliez:wallpaper-picker
Open

feat: add wallpaper picker popup with script and hyprpaper support#5
defliez wants to merge 1 commit intodiinki:mainfrom
defliez:wallpaper-picker

Conversation

@defliez
Copy link
Copy Markdown

@defliez defliez commented Aug 22, 2025

I hacked together a wallpaper picker in the taskbar :)
Supports hyprpaper and user-defined scripts

Features

  • Thumbnail scroller that lists wallpapers from settings.wallpaperDir
  • Clicking a wallpaper applies it:
    • If wallpaperScriptPath is set in settings.json, that script is used
    • Otherwise falls back to hyprpaper with a regenerated config
  • Current wallpaper is displayed in the info row

Implementation

  • Added WallpaperMenu.qml (new popup)
  • Integrated in Bar.qml with a new taskbar button
  • Extended Config.qml and settings.json with:
    • wallpaperDir
    • currentWallpaper
    • wallpaperScriptPath
2025-08-22-234536_hyprshot

- Added WallpaperMenu.qml for browsing and selecting wallpapers from
  user-defined directory
- Integrated wallpaper picker into taskbar (Bar.qml) with new button
- Extended Config.qml and settings.json for defining wallpaper
  directory, current wallpaper, and optionally custom script

- Default behavior: run user script if set, otherwise fallback to
  hyprpaper
@code-apeman
Copy link
Copy Markdown

To be fair, this (and the theme picker) belongs more to the settings window IMO

@code-apeman
Copy link
Copy Markdown

code-apeman commented Jan 12, 2026

OK, so there were a couple of issues with the popup:

  • The hardcoded /bin/bash path is incompatible with NixOS, as the only binaries stored in their default FHS locations are /bin/sh and /usr/bin/env
  • As of right now, the hyprpaper syntax has changed

So, my suggestion is to change WallpaperMenu.qml:

176,177c176
<         printf 'preload = %s\n' "$wp" > "$cfg"
<         printf 'wallpaper = ,%s\n' "$wp" >> "$cfg"
---
> 	printf 'wallpaper {\n  monitor = \n  path = %s\n}' "$wp" > "$cfg"
182c181
<         startCmd(["/bin/bash", "-lc", sh, "qs", filePath]);
---
>         startCmd(["/bin/sh", "-lc", sh, "qs", filePath]);  // no such thing as a /bin/bash in nixos
188c187
<         startCmd(["/bin/bash", sp, filePath]);
---
>         startCmd(["/bin/sh", sp, filePath]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants