-
Notifications
You must be signed in to change notification settings - Fork 47
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
Change all sway references to swayfx #257
base: master
Are you sure you want to change the base?
Conversation
I'm thinking maybe it would be a good idea to rename
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits, hopefully the "same here" comments are in the correct order.
Kudos for rewriting some of the texts too! :)
@@ -12,5 +12,5 @@ exec systemctl --user import-environment DISPLAY \ | |||
exec hash dbus-update-activation-environment 2>/dev/null && \ | |||
dbus-update-activation-environment --systemd DISPLAY \ | |||
SWAYSOCK \ | |||
XDG_CURRENT_DESKTOP=sway \ | |||
XDG_CURRENT_DESKTOP="swayfx:sway:wlroots" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does having it colon separated actually work? Will it be detected by the portals conf?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Portals work fine on my end. If I initiate screen sharing from Firefox/Discord, it calls xdp-wlr. Everything else calls xdp-gtk (as defined in swayfx-portals.conf
).
The colon-separated list is used by NotShowIn=
/OnlyShowIn=
in .desktop
files: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
If
$XDG_CURRENT_DESKTOP
is set then it contains a colon-separated list of strings. In order, each string is considered. If a matching entry is found inOnlyShowIn
then the desktop file is shown. If an entry is found inNotShowIn
then the desktop file is not shown. If none of the strings match then the default action is taken (as above).
$XDG_CURRENT_DESKTOP
should have been set by the login manager, according to the value of theDesktopNames
found in the session file. The entry in the session file has multiple values separated in the usual way: with a semicolon.
|
||
_sway() | ||
_swayfx() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't these file names be renamed to swayfx? (all completion files)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't rename any files to avoid creating unnecessary conflicts when pulling from upstream.
The files get renamed by meson at install time (see the changes in meson.build
).
e.g completions/bash/sway
gets deployed to /usr/share/bash-completion/completions/swayfx
swayfx_zsh_files = [ | ||
'_swayfx', | ||
'_swayfxmsg', | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be here? Shouldn't zsh_files
also be removed then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swayfx_zsh_files
is passed to install_data()
a couple lines below. It's used for renaming purposes.
Marking as draft until the review is done. Edit: nevermind, draft PRs can't be reviewed. I thought it just blocked merging lol pokes @WillPower3309 |
Could we provide distro packages like |
024aa4b
to
a06a4ab
Compare
I've squashed the fixup commits and added a new subpackage to alias swayfx's versions of |
We usually use |
Thanks! I'll look into it. BTW, if we go forward with the
|
a06a4ab
to
7c6545f
Compare
I rebased against the latest changes and got rid of most packaging-related commits. |
Breaking changes: - path: /etc/sway -> /etc/swayfx - path: /etc/swaynag -> /etc/swayfxnag - path: $XDG_CONFIG_HOME/sway -> $XDG_CONFIG_HOME/swayfx - path: $XDG_CONFIG_HOME/swaynag -> $XDG_CONFIG_HOME/swayfxnag - bin: sway -> swayfx - bin: swaymsg -> swayfxmsg - bin: swaynag -> swayfxnag - bin: swaybar -> swayfxbar Other changes: - meson option: swaybar -> swayfxbar - meson option: swaynag -> swayfxnag - XDG_CURRENT_DESKTOP: sway -> swayfx:sway
7c6545f
to
5c87702
Compare
Hey peelz! Thanks a ton for all the work here and apologies on my end for the delays. I think it's a good call to save the swaysock change for a separate PR as I'd like to have more of a conversation there on if this is something we'd want |
- The current layer namespaces can be shown with `swaymsg -r -t get_outputs | jq '.[0].layer_shell_surfaces | .[] | .namespace'` | ||
- The current layer namespaces can be shown with `swayfxmsg -r -t get_outputs | jq '.[0].layer_shell_surfaces | .[] | .namespace'` | ||
- Example: `layer_effects "waybar" blur enable; shadows enable; corner_radius 6` | ||
- Note: If an application uses gtk, its namespace is likely to be "gtk-layer-shell" | ||
- SwayIPC Example: `swaymsg "layer_effects 'waybar' 'blur enable; shadows enable; corner_radius 6'"` | ||
- SwayIPC Example: `swayfxmsg "layer_effects 'waybar' 'blur enable; shadows enable; corner_radius 6'"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure how I feel about this one. Do you mind if we save the IPC changes for a follow-up PR? I think we need some more discussion there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. I have scripts using the Sway IPC that i can now use in both Sway and SwayFX. The change would mean that i need to change all of them to be only SwayFX compatible. However, if I do want to run Sway instead (development etc) none of my scripts will work and I feel like those negatives are gonna outweigh the (possible) positives.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That defeats the whole point of #191.
There's two options:
- we close this PR and keep SwayFX as a drop-in replacement for Sway
- we go forward with the rename and make SwayFX independent, allowing it to be installed side-by-side with Sway
If we go forward with the rename, we can't have any packaged files conflicting with upstream.
Splitting up the changes into more PRs is only going to make it harder to complete the migration.
When it comes to "IPC compatibility", you can temporarily symlink the binaries, e.g.: ~/.local/bin/swaymsg
-> /usr/bin/swayfxmsg
As I stated in my earlier comments, I had started working on the packaging side of things. Before the rebase, I had a commit (a06a4ab) that added a subpackage to create those symlinks. This would alleviate the friction when switching between SwayFX and Sway.
From what I understand both @RicArch97 and @WillPower3309 use Nix/NixOS, in which case you can create those symlinks in the postInstall
step, i.e:
postInstall = (old.postInstall or "") + ''
for f in "" msg nag bar; do
ln -sT "swayfx$f" "$out/bin/sway$f"
done
'';
@@ -12,5 +12,5 @@ exec systemctl --user import-environment DISPLAY \ | |||
exec hash dbus-update-activation-environment 2>/dev/null && \ | |||
dbus-update-activation-environment --systemd DISPLAY \ | |||
SWAYSOCK \ | |||
XDG_CURRENT_DESKTOP=sway \ | |||
XDG_CURRENT_DESKTOP="swayfx:sway" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: does this env var play well with having multiple values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. Erik asked the same question (see previous review).
Just a minor comment and a question |
Allowing side-by-side installing (where no binaries are named the same) with sway would also really ease packaging for debian and in consequence, ubuntu |
Notes:
SWAYSOCK
wasn't renamed because it would break e.g python scripts using i3ipcswaynag_command
are unchangedsway(1)
) was updated, hopefully you will find it adequate :)CONTRIBUTING.md
was updated to reflect the direction of this projectPackages:
AUR: I've tested the AUR packages and use the PKGBUILD on my own machine as a daily driver. I have sway installed side-by-side with swayfx with no conflicts.
RPM: I'm not familiar with RPM. I've updated the spec file to the best of my ability. Untested.
Nix: Unchanged. I don't have a Nix/NixOS environment to test with.
Fixes #191