-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best way to start foot
socket?
#13
Comments
The user can always do this by themselves, by either In fact I utilize systemd unit overrides to make Otherwise, something like a |
Right. But the user can also set up the entire Sway/systemd integration by themselves, but there's value making things easier to or automatic.
As far as I'm aware, it isn't possible to reference a dynamic unit name in in a
The value of |
AFAIR, my last attempt on a similar feature for foot-server was in vain. Systemd wasn't flexible enough to use dependencies based on the environment variable, and generators - an alternative way of achieving that - run only on daemon startup or reload.
Will continue looking into that and maybe ask one of our systemd maintainers if they have any suggestions. I'd love to have some solution before I need to update the |
So... export XDG_CURRENT_DESKTOP=sway
export XDG_SESSION_TYPE=wayland
VARIABLES="DISPLAY I3SOCK SWAYSOCK WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE"
-SESSION_TARGET="sway-session.target"
+SESSION_TARGET="sway-session@$WAYLAND_DISPLAY.target"
WITH_CLEANUP=""
print_usage() { $ systemctl --user cat [email protected]
# /usr/lib/systemd/user/[email protected]
[Unit]
Description=sway session (display: %i)
Documentation=man:systemd.special(7)
BindsTo=sway-session.target
RefuseManualStart=no
$ systemctl --user cat [email protected]
# /home/alebastr/.config/systemd/user/[email protected]
[Socket]
ListenStream=%t/foot-%i.sock
$ systemctl --user add-wants [email protected] [email protected] The
|
See #15 for the final solution. I'm already hesitant about the idea. If that looks good for you, I'll add the documentation and merge. |
I'm noting that while I got As I described in the related https://codeberg.org/dnkl/foot/pulls/890#issuecomment-379233 Before any features are added here to support the "foot --server" use case, it would be good to understand this problem as an example. For now, I've returned to using |
Related to this issue : systemd/systemd#22500 (Not sure if you're already aware of that, but I know it was not clear for me |
Yep, I'm aware of that and #15 exists. But the problem is that we'd want a generic As |
So I abandoned the whole multi-session ordeal with footserver.socket and reworked the feature so it will work as other user unit, using graphical-session.target. (see https://codeberg.org/dnkl/foot/pulls/1281 ) Still needs some last details, but I think it's pretty close to be merged. |
The
foot
terminal is adding systemd socket activation:https://codeberg.org/dnkl/foot/pulls/890
What's the best way to set up the socket? Note that it's a template unit, so one socket can be set up per Wayland display (relating to #12).
Since it's a template unit, it doesn't seem like an
[Install]
block will work. It seems thatstart
needs to explicitly be called on the socket file, likesystemctl start foot-server@$WAYLAND_DISPLAY.socket
.This is something that this project could potentially take care of, but this project is otherwise agnostic towards specific systemd services, so maybe that's not a feature that's desirable to add here.
If starting the foot socket were to be handled here, I see a couple options:
Given the somewhat unique case, I think it's worth considering attempting to start the foot socket file.
As a side note on fast
foot
can launch in client server mode, it's about 10x faster than Alacritty for this test, taking only 10 ms to run!The text was updated successfully, but these errors were encountered: