hl-zed-dc-rpc/README.md
2025-07-17 19:37:59 +02:00

1.5 KiB

hl-zed-dc-rpc

A discord rich presence for the Zed Editor using the Hyprland IPC to detect running zed instances. Why? Because the existing extension is extremely broken. Why you need discord rich presence for your stupid editor in the first place is a completely different question.

IMPORTANT: This uses the Hyprland IPC to get events for your activity, which means this only works on Hyprland. Yes, this is sketchy af but works suprisingly well.

Installation

If you are on Arch, you can build a package with the included PKGBUILD.

If you are not on Arch, too bad, you'll have to build yourself:

cargo build --release

Usage

The produced executable is a deamon that should run in the background when you have zed and discord open. Start it in your hyprland config:

exec-once = hl-zed-dc-rpc

The daemon supports a couple of commandline arguments to customize the idle time behaviour:

Usage: hl-zed-dc-rpc [OPTIONS]

Options:
  -i, --idle <IDLE>  idle timeout in minutes [default: 10]
  -r, --reset-idle   whether to reset the elapsed time on idle
  -h, --help         Print help

Credits

The assets shown on Discord, including the application id are blatanly stolen from the existing extension. Thanks! Also tried to steal some more code but that has largely been refactored to non-resemblance.