Skip to content
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

PKGBUILD for us Arch users #12

Closed
ErikReider opened this issue Aug 17, 2022 · 10 comments · Fixed by #31
Closed

PKGBUILD for us Arch users #12

ErikReider opened this issue Aug 17, 2022 · 10 comments · Fixed by #31
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@ErikReider
Copy link
Collaborator

  • Description:
    A regular PKGBUILD would be cool for us who want to easily test this cool fork :)

Editing the regular sway-git PKGBUILD would also work.

Btw, kinda unrelated but what's the difference between this and sway-borders? Both of these projects want to achieve the same goal

@ErikReider ErikReider added the enhancement New feature or request label Aug 17, 2022
@WillPower3309
Copy link
Owner

WillPower3309 commented Aug 18, 2022

Thanks for raising the issue! A PKGBUILD will be supplied once rounded corners is merged and blur is implemented (which should be a half week or so), I'll add this to the initial release milestone. The majority of the work done so far was in making the renderer itself which is complete, however functionally near identical to the original wlr_renderer used in sway (so if this fork was to be packaged it would be almost identical to sway).

sway-borders is a fantastic repo, which takes a different type approach to rounded corners and borders. I wanted this repo to focus on rendering the rounded corners within the window itself, instead of applying them around the window. The sway-borders implementation is likely faster and allows for more customization, but rounding windows "internally" is much easier to make look good on a number of windows regardless of their color (as in sway-borders, you must match the corner / border colors), as well as being simpler to configure. I had this repo handy for the minimize scratchpad patch, and hadn't wanted to work around the existing rounded corner implementation in sway-borders.

The sway-borders maintainer and I are actually in talks now of collaboration, as they were also working on "internal" rounded corners. Stay tuned!

@WillPower3309 WillPower3309 added this to the 0.1 milestone Aug 18, 2022
@ErikReider
Copy link
Collaborator Author

ErikReider commented Aug 21, 2022

These PKGBUILD changes worked for me:

diff --git a/PKGBUILD b/PKGBUILD
index ccba678..0123b22 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,9 +19,9 @@ depends=(
 	"pango"
 	"polkit"
 	"pcre2"
-	"swaybg-git"
+	"swaybg"
 	"ttf-font"
-	"wlroots-git"
+	"wlroots"
 	"xorg-server-xwayland"
 )
 optdepends=(
@@ -39,7 +39,7 @@ optdepends=(
 backup=(etc/sway/config)
 arch=("i686" "x86_64")
 url="https://swaywm.org"
-source=("${pkgname%-*}::git+https://github.com/swaywm/sway.git"
+source=("${pkgname%-*}::git+https://github.com/WillPower3309/swayfx.git"
 	50-systemd-user.conf)
 sha512sums=('SKIP'
             '57590bc0d14c87289a4a9cd67991c6a841e54244d2a6186b5da5a08e633de2e8631959fa8c77ede211b0a5f315d920f2c1350951a53d6f2e9e81859056cb3c9e')

Edited the regular sway-git PKGBUILD before installing

@WillPower3309
Copy link
Owner

These PKGBUILD changes worked for me:

diff --git a/PKGBUILD b/PKGBUILD
index ccba678..0123b22 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,9 +19,9 @@ depends=(
 	"pango"
 	"polkit"
 	"pcre2"
-	"swaybg-git"
+	"swaybg"
 	"ttf-font"
-	"wlroots-git"
+	"wlroots"
 	"xorg-server-xwayland"
 )
 optdepends=(
@@ -39,7 +39,7 @@ optdepends=(
 backup=(etc/sway/config)
 arch=("i686" "x86_64")
 url="https://swaywm.org"
-source=("${pkgname%-*}::git+https://github.com/swaywm/sway.git"
+source=("${pkgname%-*}::git+https://github.com/WillPower3309/swayfx.git"
 	50-systemd-user.conf)
 sha512sums=('SKIP'
             '57590bc0d14c87289a4a9cd67991c6a841e54244d2a6186b5da5a08e633de2e8631959fa8c77ede211b0a5f315d920f2c1350951a53d6f2e9e81859056cb3c9e')

Edited the regular sway-git PKGBUILD before installing

Great work! Rounded corners are now merged, once blur is done I'll use this PKGBUILD!

@ErikReider
Copy link
Collaborator Author

The rounded corners seem to work just fine! :)

The only issues that I'm experiencing is the lack of AA (mentioned before by sway-borders maintainer) and the border radius which is mentioned in another issue

@WillPower3309
Copy link
Owner

WillPower3309 commented Aug 21, 2022

The rounded corners seem to work just fine! :)

The only issues that I'm experiencing is the lack of AA (mentioned before by sway-borders maintainer) and the border radius which is mentioned in another issue

Good to hear! AA will be added, I'll make an issue for it now! I'm going to implement blur first (just because I'm too excited about it to wait haha), but will add AA prior to release

@WillPower3309
Copy link
Owner

I lied, blur is frustrating. AA implementation in #18

The corners seem a little off so I'll give it another look over prior to merging

@WillPower3309
Copy link
Owner

@ErikReider once 0.1 is released, would you be comfortable maintaining this PKGBUILD on the AUR?

@ErikReider
Copy link
Collaborator Author

I'd be happy to :)

@ErikReider
Copy link
Collaborator Author

What distro are you running? I'm running Arch on my desktop and I've been testing Fedora on my laptop so a RPM spec file would also be a good to have :)

I've managed to automate the upload and building of SwayNotificationCenters spec file on every release so I could do the same here. I'd also like to do the same with the PKGBUILD to make my life easier

@WillPower3309
Copy link
Owner

WillPower3309 commented Oct 21, 2022

That's huge, sounds like a great idea! Thanks a ton for the work there. I'm using nixOS, and already have a build working there! Looks like we'll have good coverage upon release

@WillPower3309 WillPower3309 mentioned this issue Nov 5, 2022
6 tasks
BrianCArnold pushed a commit to BrianCArnold/swayfx that referenced this issue Nov 25, 2023
In case a display is unplugged, the sway output may be removed from the
userdata before the gamma_control can be reset. In this case we can't
schedule a commit on the output, simply return within the function.

backtrace full:

  #0  handle_gamma_control_set_gamma (listener=0x4856a8 <server+616>, data=0x7ffce1ed59c0) at ../sway/desktop/output.c:1105
          server = 0x485440 <server>
          event = 0x7ffce1ed59c0
          output = 0x0
  WillPower3309#1  0x00007f430d1dca0c in wl_signal_emit_mutable ()
     from /nix/store/ky1g6ylzr2m4bq8fy0gzrnqmjr6948k5-wayland-1.22.0/lib/libwayland-server.so.0
  No symbol table info available.
  WillPower3309#2  0x00007f430d142370 in gamma_control_destroy (gamma_control=0x29eb9b0) at ../types/wlr_gamma_control_v1.c:37
          manager = 0x27e33e0
          output = 0x2a10770
          event = {output = 0x2a10770, control = 0x0}
  WillPower3309#3  0x00007f430d14239b in gamma_control_handle_output_destroy (listener=<optimized out>, data=<optimized out>)
      at ../types/wlr_gamma_control_v1.c:59
          gamma_control = <optimized out>
  WillPower3309#4  0x00007f430d1dca0c in wl_signal_emit_mutable ()
     from /nix/store/ky1g6ylzr2m4bq8fy0gzrnqmjr6948k5-wayland-1.22.0/lib/libwayland-server.so.0
  No symbol table info available.
  WillPower3309#5  0x00007f430d12a0e0 in wlr_output_destroy (output=output@entry=0x2a10770) at ../types/output/output.c:384
          cursor = <optimized out>
          tmp_cursor = <optimized out>
          layer = <optimized out>
          tmp_layer = <optimized out>
  WillPower3309#6  0x00007f430d114ecf in disconnect_drm_connector (conn=conn@entry=0x2a10770) at ../backend/drm/drm.c:1757
          __PRETTY_FUNCTION__ = "disconnect_drm_connector"
  WillPower3309#7  0x00007f430d117078 in scan_drm_connectors (drm=drm@entry=0x1eebab0, event=event@entry=0x7ffce1ed5c1c) at ../backend/drm/drm.c:1597
          c = <optimized out>
          wlr_conn = 0x2a10770
          drm_conn = 0x2e760d0
          conn_id = <optimized out>
          index = 4
          i = 4
          res = 0x2e761f0
          seen_len = 5
          seen = {true, true, true, true, true, false}
          new_outputs_len = 0
          new_outputs = 0x7ffce1ed5ab0
          conn = <optimized out>
          tmp_conn = <optimized out>
          index = <optimized out>
  WillPower3309#8  0x00007f430d113425 in handle_dev_change (listener=0x1eebbb0, data=0x7ffce1ed5c18) at ../backend/drm/backend.c:157
          drm = 0x1eebab0
          change = 0x7ffce1ed5c18
  WillPower3309#9  0x00007f430d1dca0c in wl_signal_emit_mutable ()
     from /nix/store/ky1g6ylzr2m4bq8fy0gzrnqmjr6948k5-wayland-1.22.0/lib/libwayland-server.so.0
  No symbol table info available.
  WillPower3309#10 0x00007f430d111696 in handle_udev_event (fd=<optimized out>, mask=<optimized out>, data=<optimized out>)
      at ../backend/session/session.c:213
          event = {type = WLR_DEVICE_HOTPLUG, {hotplug = {connector_id = 0, prop_id = 0}}}
          devnum = <optimized out>
          dev = 0x1ed9460
          session = <optimized out>
          udev_dev = 0x2e70db0
          sysname = 0x2e73c60 "card0"
          devnode = <optimized out>
          action = 0x7f430d6677b5 "change"
          seat = <optimized out>
          __PRETTY_FUNCTION__ = "handle_udev_event"
  WillPower3309#11 0x00007f430d1de8e2 in wl_event_loop_dispatch ()
     from /nix/store/ky1g6ylzr2m4bq8fy0gzrnqmjr6948k5-wayland-1.22.0/lib/libwayland-server.so.0
  No symbol table info available.
  WillPower3309#12 0x00007f430d1dc445 in wl_display_run () from /nix/store/ky1g6ylzr2m4bq8fy0gzrnqmjr6948k5-wayland-1.22.0/lib/libwayland-server.so.0
  No symbol table info available.
  WillPower3309#13 0x000000000041daa5 in server_run (server=server@entry=0x485440 <server>) at ../sway/server.c:338
  No locals.
  WillPower3309#14 0x000000000041cf4d in main (argc=<optimized out>, argv=0x7ffce1ed5fe8) at ../sway/main.c:415
          verbose = false
          debug = false
          validate = false
          allow_unsupported_gpu = false
          config_path = 0x0
        c = <optimized out>

where event->output->data is NULL:

  (gdb) p event->output->data
  $5 = (void *) 0x0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants