Xbindkeys as systemd user unit on Debian Testing/Bookworm

Before all this, you may want to see how to set up graphical-session.target systemd unit for WindowMaker, in case you are not using Gnome or so. After that, first, install xbindkeys.

$ sudo apt install xbindkeys

Then create file /etc/systemd/user/xbindkeys.service (or $HOME/.config/systemd/user/xbindkeys.service) with contents:

[Unit]
Description=XBindKeys
ConditionUser=users

[Service]
ExecStart=/usr/bin/xbindkeys -n -f "${HOME}/.config/xbindkeys/xbindkeysrc"
Restart=always
RestartSec=1

[Install]
WantedBy=graphical-session.target

Then, you will need to create the xbindkeys configuration file, unless you already had it (remember to move it or change the path in the service file.)

mkdir -p "${HOME}/.config/xbindkeys/"
xbindkeys -d > "${HOME}/.config/xbindkeys/xbindkeysrc"

Now, edit the configuration as needed and then, enable the service file. If you created the service file in /etc globally, do:

sudo systemctl --global enable xbindkeys.service
sudo systemctl daemon-reload

Or if in $HOME/.config/systemd/user/

systemctl --user enable xbindkeys.service
systemctl --user daemon-reload

At this point you will need to restart your session. If everything worked right, you should have xbindkeys running in background and 'systemctl --user status xbindkeys' should show it also.

If the unit is not starting, check 'systemctl --user list-dependencies graphical-session.target' to see if it is properly listed in the dependencies. If you did the stated steps, it should be there. If not, try rebooting first, though daemon-reload SHOULD work in theory ...