Skip to content

Add screen argument to IPC wallpaper random#1697

Merged
ItsLemmy merged 2 commits intonoctalia-dev:mainfrom
fboulay:feature/add-option-to-choose-monitor-for-ipc-random-wallpaper
Mar 1, 2026
Merged

Add screen argument to IPC wallpaper random#1697
ItsLemmy merged 2 commits intonoctalia-dev:mainfrom
fboulay:feature/add-option-to-choose-monitor-for-ipc-random-wallpaper

Conversation

@fboulay
Copy link
Copy Markdown
Contributor

@fboulay fboulay commented Feb 5, 2026

Pull Request

Motivation

I wanted to map a keybinding to change randomly the wallpaper of the current screen.

Implementation

Add argument to specify on which screen to apply a random wallpaper.
if all is provided, the old behavior is kept: a random wallpaper is applied to all screen.

Type of Change

Mark the relevant option with an "x".

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring

I don't know how to add an optional argument to the function IpcHandler.random. So the feature is not backward compatible. To have the previous behavior, we can pass all as screen name.

Related Issue

N/A

Testing

Describe how you tested your changes and mark the relevant items.

  • Tested on niri
  • Tested on Hyprland
  • Tested on sway
  • Tested with different bar positions and density settings
  • Tested at different interface scaling values
  • Tested with multiple monitors (if applicable)

Test the IPC with the command line. I tested with different directories for each screen as well.

Screenshots / Videos

N/A

Checklist

  • Code follows project style guidelines
  • Self-reviewed my code
  • No new warnings or errors
  • Documentation or comments updated (if relevant)

How to update the IPC documentation ?

Additional Notes

Is it better to keep the feature as is (and break backward compatibility) ? Or should I create a new function in IpcHandler to keep the backward compatibility ?

fboulay and others added 2 commits February 5, 2026 13:22
* Add argument to specify on which screen to apply a random wallpaper
* if `all` is provided, the old behavior is kept: a random wallpaper is
applied to all screen.
@ItsLemmy
Copy link
Copy Markdown
Collaborator

ItsLemmy commented Mar 1, 2026

Thanks for the PR, There are a couple things I need to fix, as stuff have evolved + some dangerous null != undefined.

@ItsLemmy ItsLemmy merged commit 109f810 into noctalia-dev:main Mar 1, 2026
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