danyspin97 / wpaperd

Modern wallpaper daemon for Wayland
GNU General Public License v3.0
332 stars 26 forks source link

Add IPC to get info and control wpaperd daemon #12

Closed danyspin97 closed 1 year ago

danyspin97 commented 2 years ago

The IPC is needed to change the current wallpaper and to get the information about the current ones.

1995parham commented 2 years ago

What do you think about using TCP socket for IPC? wpaperd listens on specific port which is configurable with config file and the wpaperd-cli use it for gathering information or changing the wallpaper?

danyspin97 commented 2 years ago

I would use a unix socket since it's slightly easier to handle and I don't think there is any need to control wpaperd remotely. What do you think?

1995parham commented 2 years ago

Yes, Unix socket is better for inner system communication. I will try to create a PR for this.

danyspin97 commented 2 years ago

I'd wait for wayland-rs 0.30 to come out, because wpaperd will be refactored to use it.

murlakatamenka commented 1 year ago

I'd say the easiest way would be to use signals, like show/hide on SIGUSR1 and reload (pick another wallpaper) on SIGUSR2. This is how waybar works.

danyspin97 commented 1 year ago

Using signals is not really user friendly, I personally prefer to have an IPC. In this case wpaperd could have more granular control and an IPC allows that.

An IPC along with a control cli command (wpaperctl) have been added in add9072, closing this issue.

murlakatamenka commented 1 year ago

Using signals is not really user friendly, I personally prefer to have an IPC. In this case wpaperd could have more granular control and an IPC allows that.

signals are good for something really simple, works fine for a few commands. As for user-friendliness, binding pgrep/killall command with a hotkey is very easy in sway or Hyprland, so can't agree on that point.

Anyway, thanks a lot for working on this feature :+1: