Code Monkey home page Code Monkey logo

swayfx's Introduction

swayfx logo


Sway is an incredible window manager, and certainly one of the most well established wayland window managers. However, it is restricted to only include the functionality that existed in i3. This fork ditches the simple wlr_renderer, and replaces it with our fx_renderer, capable of rendering with fancy GLES2 effects. This, along with a couple of minor changes, expands sway's featureset to include the following:

  • Blur
  • Anti-aliased rounded corners, borders, and titlebars
  • Shadows
  • Dim unfocused windows
  • Per application saturation control: Allows the user to set the saturation (Digital Vibrance) for specific applications. Great for some FPS games!
  • Scratchpad treated as minimize: Allows docks, or panels with a taskbar, to correctly interpret minimize / unminimize requests (thanks to LCBCrion)
  • nixify the repo: Allows nixos users to easily contribute to and test this project

SwayFX is also available on the Fedora copr

Join our Discord

New Configuration Options

  • Window blur:
    • blur enable|disable
    • blur_xray enable|disable: this will set floating windows to blur based on the background, not the windows below. You probably want to set this to disable :)
    • blur_passes <integer value 0 - 10>
    • blur_radius <integer value 0 - 10>
    • blur_noise <float value 0 - 1>
    • blur_brightness <float value 0 - 2>
    • blur_contrast <float value 0 - 2>
    • blur_saturation <float value 0 - 2>
  • Corner radius: corner_radius <val>
  • Window shadows:
    • shadows enable|disable
    • shadows_on_csd enable|disable (Note: The shadow might not fit some windows)
    • shadow_blur_radius <integer value 0 - 100>
    • shadow_color <hex color with alpha> ex, #0000007F
    • shadow_offset <x offset> <y offset>
    • shadow_inactive_color <hex color with alpha> ex, #0000007F
  • LayerShell effects (to blur panels / notifications etc):
    • layer_effects <layer namespace> <effects>
    • The current layer namespaces can be shown with swaymsg -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'"
    • Available Effects:
      • blur <enable|disable>
      • blur_ignore_transparent <enable|disable>
      • shadows <enable|disable>
      • corner_radius <int>
  • Dim unfocused windows:
    • default_dim_inactive <float value 0.0 - 1.0>
    • for_window [CRITERIA_HERE] dim_inactive <float value 0.0 - 1.0>
    • dim_inactive_colors.unfocused <hex color> ex, #000000FF
    • dim_inactive_colors.urgent <hex color> ex, #900000FF
  • Application saturation: for_window [CRITERIA HERE] saturation <set|plus|minus> <val 0.0 <-> 2.0>
  • Keep/remove separator border between titlebar and content: titlebar_separator enable|disable
  • Treat Scratchpad as minimized: scratchpad_minimize enable|disable: we recommend keeping this setting off, as there are many kinks to iron out here

Roadmap

  • fade in / out animations
  • window movement animations

Compiling From Source

Nix

If you have Nix installed, you can build and run SwayFX easily:

nix build
./result/bin/sway

You can also bring up a development shell and follow the build instructions below, without installing all of the dependencies manually:

nix develop

Debian

Check INSTALL-deb.md

Manual Steps

Install dependencies:

  • meson *
  • wlroots
  • wayland
  • wayland-protocols *
  • pcre2
  • json-c
  • pango
  • cairo
  • gdk-pixbuf2 (optional: additional image formats for system tray)
  • [swaybg] (optional: wallpaper)
  • [scdoc] (optional: man pages) *
  • git (optional: version info) *

* Compile-time dep

Run these commands:

meson build/
ninja -C build/
sudo ninja -C build/ install

On systems without logind nor seatd, you need to suid the sway binary:

sudo chmod a+s /usr/local/bin/sway

SwayFX will drop root permissions shortly after startup.

Contributing

SwayFX would love to receive any new features that you're willing to build! Generally, we'd like to focus on eye-candy type improvements to keep our scope appropriate. If you'd like to build something that you think may be out of that focus, please raise an issue and we can discuss whether or not it will fit within this project.

Here's a quick outline of where most of our changes lie vs the main sway repository:

  • sway/desktop/render.c: the file that handles calling fx_renderer to render to the screen, handles damage tracking and scaling
  • sway/desktop/fx_renderer/fx_renderer.c: the meat and potatoes of this project, structured as similarly to wlr_renderer as possible
  • sway/desktop/fx_renderer/shaders: where all of the shaders that fx_renderer uses live

Acknowledgements

The SwayFX team would like to first and foremost thank the maintainers and contributors of the Sway window manager. We are but a humble group of Sway enthusiasts who wanted to expand upon your creation.

We would also like to thank the talented artists in our community for contibuting the visual assets that give this project charm:

Lastly, we would like to thank you, the community, for enjoying and using window manager that we have spent so much time maintaining.

swayfx's People

Contributors

1ace avatar acrisci avatar ammgws avatar cedws avatar christophgysin avatar ddevault avatar deathlyfrantic avatar deklov avatar emantor avatar emersion avatar erikreider avatar frsfnrrg avatar hummer12007 avatar ianyfan avatar kennylevinsen avatar lbonn avatar luminarys avatar martinetd avatar mikkeloscar avatar minus7 avatar mstoeckl avatar progandy avatar redsoxfan avatar ryandwyer avatar sce avatar taiyu-len avatar thuck avatar willakat avatar willpower3309 avatar xyene avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swayfx's Issues

Won't build with GCC 12.2.0

Please fill out the following:

  • Swayfx Version: 0.1 (and also latest)

  • Description:

    • New warnings were introduced with newer gcc versions. in default_options werror is set to true (meson.build line 10). this means warning are treated as errors as such trying to build swayfx will fail.

    • You can still compile swayfx anyway by simply switching werror to false, but it will be more productive to address the compiler warnings.

Ignore dim on certain windows

With dim_inactive, some windows get dimmed that I would like to not be dimmed, like my browser for example. I would propose that you can use for_window to set the dim for certain windows. For example:

for_window [app_id="LibreWolf"] dim_inactive 0

Experimenting with this, I found a bug. When I set the for_window like this, and I open a new tab, dim_inactive gets ignored globally until I reload sway. So I am not sure if this is a bug or not implemented yet.

PKGBUILD for us Arch users

  • 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

Some menus don't respect the theme applied

Swayfx Version:
0.1-1 from AUR

Description of the issue:
Opening some gtk apps, both gtk4 and gtk3, i.e.: Nautilus, Evince, Firefox....., some menus appear with a different color than the theme applied.

This doesn't happen with the default Sway.

I'm using adw-gtk3 theme for gtk3 app with custom colors in:

  • gtk3 apps: ~/.config/gtk-3.0/gtk.css;
  • gtk4 apps: ~/.config/gtk-4.0/gtk.css;

Here some examples:

Nautilus with Swayfx
image

Nautilus with Sway
image

Firefox with Swayfx
image

Change color saturation per application

Please fill out the following:

  • Description:
    Please describe in plain English what the enhancement is and what the use case is.

To be able to change the color saturation of a container through the config. This will make it easier to see enemies in games like CSGO or any other competitive game.

Example:

# Just like the opacity cmd
for_window [class="csgo_linux64"] saturation set 2.0

Rebase to swaywm:master

  • Rebase to swaywm:master for the latest bug fixes and improvements

While I am excited for the new features swayfx brings, I am concerned with the growing list of commits you are behind on from swaywm.

Will there be a regular cadence to catch up with bugs fixed in swaywm?

Render rounded borders

Currently when a rounded window is rendered with a titlebar or border, it looks like this:
2022-08-21_17-08-1661116412

Obviously this is not optimal! We should render rounded borders!

Borders: ability to configure a border color around windows when using title bars, without a line inbetween

Currently, it is not possible in Sway to add a singular border around the entire view when using title bars without getting an extra line between the title bar and application window.
Sway provides the following config options: (man 5 sway)

border
               The border around the title bar.
child_border
               The border around the view itself.

When using this, the result ends up like this, and as you can see by the arrow pointing at it, there is now also a line between the border and the application view. I personally really don't want this, and it would be nicer to have a singular border around the entire window (application + title bar).

2022-12-11T23:13:58,593641661+01:00

I think we should think of a way to provide a config option to do this, without breaking Sway's original functionality. Maybe with a double border? When setting a double border, and disabling Sway's original borders, we would get this result, plus would be nice for the users who want double borders anyways

Advanced window decorations

Please fill out the following:

  • Description:

The ability to add button decorations to Sway's title bars. This can currently be:

  • Minimize
  • Close

Of course the usefulness of this would increase if a full floating layout was added, or basically just don't use any tiling layout. In that case maximizing windows could also be something to think about. That would turn Sway more into a dynamic window manager.

Here's some inspiration from Wayfire, though in this screenshot the buttons used are horrible. It would nice if you could provide button images in the config (and have some good default ones for fallback).
2022-09-08_19:49:03

Unfortunately I'm unable to work on this myself currently, but I think it's nice to put this out here at least for future reference.

Compilation error on Ubuntu Kinetic

Please fill out the following:

  • Swayfx Version: 0.1

    • sway -v
  • Debug Log:
    n/a

  • Configuration File:
    n/a

  • Stack Trace:
    n/a

  • Description:
    I'm trying to compile swayfx on Ubuntu Kinetic against wlroots 0.15:

[262/296] Compiling C object sway/sway.p/commands_output_background.c.o
FAILED: sway/sway.p/commands_output_background.c.o 
cc -Isway/sway.p -Isway -I../sway -Iinclude -I../include -Isway/desktop/shaders -Iprotocols -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libdrm -I/usr/include/json-c -I/usr/include/libevdev-1.0/ -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/local/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O0 -g -DWLR_USE_UNSTABLE -Wno-unused-parameter -Wno-unused-result -Wno-missing-braces -Wundef -Wvla '-DSYSCONFDIR="//usr/local/etc"' '-DSWAY_VERSION="0.1-6c1a3ec2 (" __DATE__ ", branch '"'"'HEAD'"'"')"' -fmacro-prefix-map=../= -pthread -MD -MQ sway/sway.p/commands_output_background.c.o -MF sway/sway.p/commands_output_background.c.o.d -o sway/sway.p/commands_output_background.c.o -c ../sway/commands/output/background.c
../sway/commands/output/background.c: In function ‘output_cmd_background’:
../sway/commands/output/background.c:115:25: error: ‘sprintf’ argument 4 overlaps destination object ‘src’ [-Werror=restrict]
  115 |                         sprintf(src, "%s/%s", conf_path, rel_path);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../sway/commands/output/background.c:81:23: note: destination object referenced by ‘restrict’-qualified argument 1 was declared here
   81 |                 char *src = join_args(argv, j);
      |                       ^~~
cc1: all warnings being treated as errors
[271/296] Compiling C object sway/sway.p/commands_output_subpixel.c.o
ninja: build stopped: subcommand failed.
ninja: Entering directory `build'
[1/27] Compiling C object sway/sway.p/commands_output_background.c.o
FAILED: sway/sway.p/commands_output_background.c.o 
cc -Isway/sway.p -Isway -I../sway -Iinclude -I../include -Isway/desktop/shaders -Iprotocols -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libdrm -I/usr/include/json-c -I/usr/include/libevdev-1.0/ -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/local/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O0 -g -DWLR_USE_UNSTABLE -Wno-unused-parameter -Wno-unused-result -Wno-missing-braces -Wundef -Wvla '-DSYSCONFDIR="//usr/local/etc"' '-DSWAY_VERSION="0.1-6c1a3ec2 (" __DATE__ ", branch '"'"'HEAD'"'"')"' -fmacro-prefix-map=../= -pthread -MD -MQ sway/sway.p/commands_output_background.c.o -MF sway/sway.p/commands_output_background.c.o.d -o sway/sway.p/commands_output_background.c.o -c ../sway/commands/output/background.c
../sway/commands/output/background.c: In function ‘output_cmd_background’:
../sway/commands/output/background.c:115:25: error: ‘sprintf’ argument 4 overlaps destination object ‘src’ [-Werror=restrict]
  115 |                         sprintf(src, "%s/%s", conf_path, rel_path);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../sway/commands/output/background.c:81:23: note: destination object referenced by ‘restrict’-qualified argument 1 was declared here
   81 |                 char *src = join_args(argv, j);
      |                       ^~~
cc1: all warnings being treated as errors
[10/27] Compiling C object sway/sway.p/tree_view.c.o
ninja: build stopped: subcommand failed.
make[1]: *** [Makefile:234: meson-ninja-build] Error 1
make[1]: Leaving directory '/home/luis/Projects/sway_build'
make: *** [Makefile:258: sway-build] Error 2

Part of window disappears on vertical monitor

Swayfx Version: 0.1-1 from AUR

Using Default Config file but with monitors arranged how I need them.

The bottom corner of any application gets removed, more of that corner disappears when multiple windows are opened and it only affects the bottom-most window. Also affects context menus in Firefox and Chrome. None of these happen on my other two monitors, only my vertical one.

Alacritty

2022-11-15T18:43:56,017473247-06:00

Firefox

2022-11-15T18:44:20,288487318-06:00

Multiple Windows

2022-11-15T18:44:31,823462145-06:00

Chromium

2022-11-15T18:55:07,826845375-06:00

PCManFM-GTK3

2022-11-15T18:57:01,282353951-06:00

Rounded corners behave like gaps when smart_gaps on, i.e. no rounded corners when only one tiled window

  • Description:
    When smart_gaps is set to on, but rounded corners are added to all windows with and without gaps. When there are no gaps, it creates a small triangle of background (see screenshot bellow), which is quite ugly.
    It would be better if the rounded corners behave like gaps when smart_corners is set to on, i.e. no rounded corners when there is only one window.
    Alternatively, a new command like smart_corners could be used for this.

Screenshot_2022-11-16T12:27:55+01:00

Dim inactive windows?

Was wondering if it'd be possible/planned to add a function to either dim or blur inactive (aka, unfocused) windows, similar to what picom can do. I was thinking this might be a nice enhancement for floating windows, effectively mimicking a "monocle" view: one floating window front and center while all the other windows are dimmed/blurred

HiDPI fork support on Arch

  • Description:
    Currently, the PKGBUILD for swayfx depends both on libwlroots.so and wlroots<0.16.

Is there a specific reason for it to depend on both the library and specifically wlroots? This is preventing me from using wlroots-hidpi-git with swayfx.

build failure in voidlinux

Tried to build swayfx/master and getting this error:
[void@mnbvcxz swayfx]$ ninja -C build/
ninja: Entering directory `build/'
[78/285] Compiling C object sway/sway.p/desktop_render.c.o
FAILED: sway/sway.p/desktop_render.c.o

../sway/desktop/render.c: In function 'output_render':
../sway/desktop/render.c:1269:2: error: a label can only be part of a statement and a declaration is not a statement
1269 | struct wlr_renderer *wlr_renderer = output->server->wlr_renderer;
| ^~~~~~
[80/285] Compiling C object sway/sway.p/desktop_output.c.o
ninja: build stopped: subcommand failed.

Add Fedora copr

Please fill out the following:

  • Description:
    I would like for there to be an officially sanctioned copr repo for swayfx, to allow for easier installation and updates on Fedora systems.

Take a look at the .builds files

Please fill out the following:

  • Description:
    It looks like the sway project makes use of the .builds directory to store some build information. We should use these in our deployment actions!

Let's aim to take a look at these for the 0.2 release.

CC @ErikReider

Error: Transaction test error when trying to install swayfx on Fedora Linux 37

  • Swayfx Version:

    • 0.1-1.fc37
  • Debug Log:

➜  sudo dnf install swayfx                                            
Dependencies resolved.
==========================================================================================
 Package                    Arch   Version       Repository                          Size
==========================================================================================
Installing:
 swayfx                     x86_64 0.1-1.fc37    copr:copr.fedorainfracloud.org:swayfx:swayfx
                                                                                    365 k
Installing dependencies:
 fcft                       x86_64 3.1.5-1.fc37  fedora                              72 k
 libseat                    x86_64 0.7.0-2.fc37  fedora                              28 k
 python3-dbus-next          noarch 0.2.3-4.fc37  fedora                             154 k
 python3-i3ipc              noarch 2.2.1-6.fc37  fedora                              71 k
 python3-psutil             x86_64 5.9.1-1.fc37  fedora                             271 k
 python3-tenacity           noarch 8.0.1-6.fc37  fedora                              60 k
 python3-xlib               noarch 0.31-5.fc37   fedora                             351 k
 sway                       x86_64 1.7-3.fc37    fedora                             366 k
 swaybg                     x86_64 1.1.1-2.fc37  fedora                              24 k
 utf8proc                   x86_64 2.7.0-3.fc37  fedora                              80 k
 wlroots                    x86_64 0.15.1-4.fc37 fedora                             319 k
Installing weak dependencies:
 desktop-backgrounds-compat noarch 37.0.0-4.fc37 updates                            9.0 k
 dmenu                      x86_64 5.1-2.fc37    fedora                              31 k
 foot                       x86_64 1.13.1-1.fc37 fedora                             305 k
 foot-terminfo              x86_64 1.13.1-1.fc37 fedora                              12 k
 sway-systemd               noarch 0.2.2-2.fc37  fedora                              18 k
 swayidle                   x86_64 1.7.1-2.fc37  fedora                              27 k
 swaylock                   x86_64 1.6-2.fc37    fedora                              42 k

Transaction Summary
==========================================================================================
Install  19 Packages

Total download size: 2.5 M
Installed size: 8.0 M
Is this ok [Y/n]: 
Downloading Packages:
(1/19): dmenu-5.1-2.fc37.x86_64.rpm                       133 kB/s |  31 kB     00:00    
(2/19): fcft-3.1.5-1.fc37.x86_64.rpm                      238 kB/s |  72 kB     00:00    
(3/19): foot-terminfo-1.13.1-1.fc37.x86_64.rpm            156 kB/s |  12 kB     00:00    
(4/19): libseat-0.7.0-2.fc37.x86_64.rpm                   370 kB/s |  28 kB     00:00    
(5/19): swayfx-0.1-1.fc37.x86_64.rpm                      685 kB/s | 365 kB     00:00    
(6/19): foot-1.13.1-1.fc37.x86_64.rpm                     1.0 MB/s | 305 kB     00:00    
(7/19): python3-dbus-next-0.2.3-4.fc37.noarch.rpm         999 kB/s | 154 kB     00:00    
(8/19): python3-tenacity-8.0.1-6.fc37.noarch.rpm          780 kB/s |  60 kB     00:00    
(9/19): python3-psutil-5.9.1-1.fc37.x86_64.rpm            1.7 MB/s | 271 kB     00:00    
(10/19): sway-1.7-3.fc37.x86_64.rpm                       3.9 MB/s | 366 kB     00:00    
(11/19): python3-i3ipc-2.2.1-6.fc37.noarch.rpm            236 kB/s |  71 kB     00:00    
(12/19): python3-xlib-0.31-5.fc37.noarch.rpm              2.1 MB/s | 351 kB     00:00    
(13/19): sway-systemd-0.2.2-2.fc37.noarch.rpm             235 kB/s |  18 kB     00:00    
(14/19): swaybg-1.1.1-2.fc37.x86_64.rpm                   319 kB/s |  24 kB     00:00    
(15/19): swayidle-1.7.1-2.fc37.x86_64.rpm                 356 kB/s |  27 kB     00:00    
(16/19): swaylock-1.6-2.fc37.x86_64.rpm                   538 kB/s |  42 kB     00:00    
(17/19): utf8proc-2.7.0-3.fc37.x86_64.rpm                 1.0 MB/s |  80 kB     00:00    
(18/19): wlroots-0.15.1-4.fc37.x86_64.rpm                 3.8 MB/s | 319 kB     00:00    
(19/19): desktop-backgrounds-compat-37.0.0-4.fc37.noarch. 122 kB/s | 9.0 kB     00:00    
------------------------------------------------------------------------------------------
Total                                                     911 kB/s | 2.5 MB     00:02     
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction test error:
  file /etc/sway/config conflicts between attempted installs of swayfx-0.1-1.fc37.x86_64 and sway-1.7-3.fc37.x86_64
  file /usr/bin/sway conflicts between attempted installs of swayfx-0.1-1.fc37.x86_64 and sway-1.7-3.fc37.x86_64
  file /usr/bin/swaybar conflicts between attempted installs of swayfx-0.1-1.fc37.x86_64 and sway-1.7-3.fc37.x86_64
  file /usr/bin/swaymsg conflicts between attempted installs of swayfx-0.1-1.fc37.x86_64 and sway-1.7-3.fc37.x86_64
  file /usr/bin/swaynag conflicts between attempted installs of swayfx-0.1-1.fc37.x86_64 and sway-1.7-3.fc37.x86_64
  file /usr/share/man/man1/sway.1.gz conflicts between attempted installs of swayfx-0.1-1.fc37.x86_64 and sway-1.7-3.fc37.x86_64
  file /usr/share/man/man1/swaymsg.1.gz conflicts between attempted installs of swayfx-0.1-1.fc37.x86_64 and sway-1.7-3.fc37.x86_64
  file /usr/share/man/man1/swaynag.1.gz conflicts between attempted installs of swayfx-0.1-1.fc37.x86_64 and sway-1.7-3.fc37.x86_64
  file /usr/share/man/man5/sway-bar.5.gz conflicts between attempted installs of swayfx-0.1-1.fc37.x86_64 and sway-1.7-3.fc37.x86_64
  file /usr/share/man/man5/sway-input.5.gz conflicts between attempted installs of swayfx-0.1-1.fc37.x86_64 and sway-1.7-3.fc37.x86_64
  file /usr/share/man/man5/sway-output.5.gz conflicts between attempted installs of swayfx-0.1-1.fc37.x86_64 and sway-1.7-3.fc37.x86_64
  file /usr/share/man/man5/sway.5.gz conflicts between attempted installs of swayfx-0.1-1.fc37.x86_64 and sway-1.7-3.fc37.x86_64
  file /usr/share/man/man5/swaynag.5.gz conflicts between attempted installs of swayfx-0.1-1.fc37.x86_64 and sway-1.7-3.fc37.x86_64
  file /usr/share/man/man7/sway-ipc.7.gz conflicts between attempted installs of swayfx-0.1-1.fc37.x86_64 and sway-1.7-3.fc37.x86_64
  file /usr/share/man/man7/swaybar-protocol.7.gz conflicts between attempted installs of swayfx-0.1-1.fc37.x86_64 and sway-1.7-3.fc37.x86_64
  • Description:
    • I enabled the copr repo doing sudo yum copr enable swayfx/swayfx then I did sudo dnf update --refresh followed by sudo dnf install swayfx. Seems that I can't install swayfx because two packages are providing the same file names?

error: undefined symbol: eglGetProcAddress

meson build -Dsd-bus-provider=libsystemd -Dwerror=false

ninja -C build

Output:

/usr/bin/ld: sway/sway.p/desktop_fx_renderer.c.o: undefined reference to symbol 'eglGetProcAddress'
/usr/bin/ld: /usr/lib/libEGL.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Am I missing something?

Execute command on focus/unfocus

Please fill out the following:

  • Description:
    I would love to be able to execute a shell command/script whenever I focus/unfocus a certain window.

This can be implemented into for_window. maybe for example:
for_window [Criteria] on_focus_exec "command1" on_unfocus_exec "command2"

I know this can be done with sway-ipc and swaymsg but not everyone has the knowledge and experience to write a script

Improve rounded border corners

  • Description:
    There are some improvements that could be made in how we handle rendering rounded corners. Currently, rounded borders are done by drawing circles and removing the parts that are not along the corner we are currently rendering, and rounded titlebars will be blended with a window's rounded corners through its fragment shader, which is less than ideal for keeping things simple. I'll be working on making these things cleaner (and hopefully more performant), once we get an initial release out.

Render rect with fx_renderer

  • Description:
    The last bit of wlr_renderer (that actually renders to screen) left in the repo is in the render_rect function in render.c, which is used to round borders + titlebars. This needs to be done in fx_renderer!

Build Error With Ninja When Building Shadow Branch

Please read the following before submitting:

  • Proprietary graphics drivers, including nvidia, are not supported. Please use the open source equivalents, such as nouveau, if you would like to use Sway.
  • Please do NOT submit issues for information from the github wiki. The github wiki is community maintained and therefore may contain outdated information, scripts that don't work or obsolete workarounds.
    If you fix a script or find outdated information, don't hesitate to adjust the wiki page.

Please fill out the following:

  • Swayfx Version: 0.1.1 branch shadows

  • Description:]
    When building the shadows branch from the repo, I am getting a error from ninja which is not allowing me to build from source.

Says wlroots is missing but i have it installed on my machine on the lastest version on arch (not git)

This is the error I am getting

ninja: Entering directory build
[3/19] Compiling C object sway/sway.p/commands_output_background.c.o
FAILED: sway/sway.p/commands_output_background.c.o 
cc -Isway/sway.p -Isway -I../sway -Iinclude -I../include -Isway/desktop/shaders -Iprotocols -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/json-c -I/usr/include/libevdev-1.0 -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O0 -g -DWLR_USE_UNSTABLE -Wno-unused-parameter -Wno-unused-result -Wno-missing-braces -Wundef -Wvla '-DSYSCONFDIR="//usr/local/etc"' '-DSWAY_VERSION="0.1.1-6703d9e5 (" __DATE__ ", branch '"'"'master'"'"')"' -fmacro-prefix-map=../= -pthread -MD -MQ sway/sway.p/commands_output_background.c.o -MF sway/sway.p/commands_output_background.c.o.d -o sway/sway.p/commands_output_background.c.o -c ../sway/commands/output/background.c
../sway/commands/output/background.c: In function ‘output_cmd_background’:
../sway/commands/output/background.c:115:25: error: ‘sprintf’ argument 4 overlaps destination object ‘src’ [-Werror=restrict]
  115 |                         sprintf(src, "%s/%s", conf_path, rel_path);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../sway/commands/output/background.c:81:23: note: destination object referenced by ‘restrict’-qualified argument 1 was declared here
   81 |                 char *src = join_args(argv, j);
      |                       ^~~
cc1: all warnings being treated as errors
[12/19] Compiling C object swaybar/swaybar.p/tray_item.c.o
ninja: build stopped: subcommand failed.

The First Time When Being Built

ninja: Entering directory build
[0/1] Regenerating build files.
The Meson build system
Version: 1.0.0
Source dir: /home/eric/swayfx
Build dir: /home/eric/swayfx/build
Build type: native build
Project name: sway
Project version: 0.1.1
C compiler for the host machine: cc (gcc 12.2.0 "cc (GCC) 12.2.0")
C linker for the host machine: cc ld.bfd 2.39.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Dependency json-c found: YES 0.16 (cached)
Dependency libpcre found: YES 8.45 (cached)
Dependency wayland-server found: YES 1.21.0 (cached)
Dependency wayland-client found: YES 1.21.0 (cached)
Dependency wayland-cursor found: YES 1.21.0 (cached)
Dependency wayland-egl found: YES 18.1.0 (cached)
Dependency egl found: YES 1.5 (cached)
Dependency wayland-protocols found: YES 1.31 (cached)
Dependency xkbcommon found: YES 1.4.1 (cached)
Dependency cairo found: YES 1.17.6 (cached)
Dependency pango found: YES 1.50.12 (cached)
Dependency pangocairo found: YES 1.50.12 (cached)
Dependency gdk-pixbuf-2.0 found: YES 2.42.10 (cached)
Dependency pixman-1 found: YES 0.42.2 (cached)
Dependency glesv2 found: YES 3.2 (cached)
Dependency libevdev found: YES 1.13.0 (cached)
Dependency libinput found: YES 1.22.0 (cached)
Dependency xcb found: YES 1.15 (cached)
Dependency libdrm found: YES 2.4.114 (cached)
Dependency libudev found: YES 252 (cached)
Dependency bash-completion found: YES 2.11 (cached)
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Found CMake: /usr/bin/cmake (3.25.1)
Run-time dependency fish found: NO (tried pkgconfig and cmake)
Library m found: YES
Library rt found: YES
Neither a subproject directory nor a wlroots.wrap file was found.
Subproject  wlroots is buildable: NO (disabling)
Dependency wlroots found: YES 0.15.1 (cached)
Dependency libsystemd found: YES 252 (cached)
Dependency scdoc found: YES 1.11.2 (cached)
Program /usr/bin/scdoc found: YES (/usr/bin/scdoc)
Program git found: YES (/usr/bin/git)
Compiler for C supports arguments -fmacro-prefix-map=/prefix/to/hide=: YES (cached)
Configuring config.h using configuration
Dependency wayland-scanner found: YES 1.21.0 (cached)
Program /usr/bin/wayland-scanner found: YES (/usr/bin/wayland-scanner)
Program ./embed.sh found: YES (/bin/sh -eu /home/eric/swayfx/sway/desktop/shaders/./embed.sh)
Configuring config using configuration
Build targets in project: 50

sway 0.1.1

    xwayland  : YES
    gdk-pixbuf: YES
    tray      : YES
    man-pages : YES

  Subprojects
    wlroots   : NO Neither a subproject directory nor a wlroots.wrap file was found.

Found ninja-1.11.1 at /usr/bin/ninja
Cleaning... 0 files.
[227/262] Compiling C object sway/sway.p/commands_output_background.c.o
FAILED: sway/sway.p/commands_output_background.c.o 
cc -Isway/sway.p -Isway -I../sway -Iinclude -I../include -Isway/desktop/shaders -Iprotocols -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/json-c -I/usr/include/libevdev-1.0 -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O0 -g -DWLR_USE_UNSTABLE -Wno-unused-parameter -Wno-unused-result -Wno-missing-braces -Wundef -Wvla '-DSYSCONFDIR="//usr/local/etc"' '-DSWAY_VERSION="0.1.1-6703d9e5 (" __DATE__ ", branch '"'"'master'"'"')"' -fmacro-prefix-map=../= -pthread -MD -MQ sway/sway.p/commands_output_background.c.o -MF sway/sway.p/commands_output_background.c.o.d -o sway/sway.p/commands_output_background.c.o -c ../sway/commands/output/background.c
../sway/commands/output/background.c: In function ‘output_cmd_background’:
../sway/commands/output/background.c:115:25: error: ‘sprintf’ argument 4 overlaps destination object ‘src’ [-Werror=restrict]
  115 |                         sprintf(src, "%s/%s", conf_path, rel_path);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../sway/commands/output/background.c:81:23: note: destination object referenced by ‘restrict’-qualified argument 1 was declared here
   81 |                 char *src = join_args(argv, j);
      |                       ^~~
cc1: all warnings being treated as errors
[236/262] Compiling C object sway/sway.p/commands_output_scale_filter.c.o
ninja: build stopped: subcommand failed.

I want to try out the shadows branch and would like some help if I am going wrong anywhere.

~ Bcez

Option to only round edge corners in tabbed layout

  • Description:
    Only render rounded corners on the two tabs on the right and left edge.
    Could be toggled on or off with a config option.

Mock-up:

Off (How it looks like right now):
tabbed-layout

On (How it would look like if you toggle it on):
tabbed-layout-onlyedgecorners

Package for NixOS repos

We should allow NixOS users to install swayfx, especially considering we make use of a flake.nix in this repo!

Per Container Border & Titlebar Colors

Please fill out the following:

  • Description:
    We should extend swayfx to support per container color schemes (applying to borders and titlebars), akin to:
for_window [CRITERIA HERE] client.focused <COLORS>

Documentation of new config variables in readme

EDIT: I just realized that there is a "New Configuration Options" sections, but it's unclear if it's a comprehensive list of new options compared to sway, or new to the latest swayfx update. I assumed the latter but I now realize it's the former.

**Add a brief summary and description of new variables that swayfx has to the README **

Currently the new variables are found in the example config document. This isn't immediately obvious and might take some people a few minutes to find. There should be a brief list of new variables to use in swayfx that don't exist in sway, or a line in the readme guiding users to consult the included example config file. It doesn't seem like there are a lot of new variables just yet so it would probably save some time and headache to add the documentation now and update it as the project grows :)

Thank you for your work on this!

Add vulkan renderer

  • Description:
    Super stretch goal: add a vulkan renderer and allow fx_renderer to work like wlr_renderer with an opengl and vulkan implementation.

This is not likely to be something I'll personally pursue unless I randomly get the itch to learn vulkan, in which case I'll add a comment to this issue. PRs more than welcome, and likely will be how this gets added.

This issue will not be added to a milestone unless it's something I decide I want to personally take on because it would then result in the milestone potentially never being reached. If anyone is able to implement this and make a PR, it will result in a major version bump.

When there are two windows open in one workspace, pressing CTRL+Q to kill one will crash SwayFX

Please read the following before submitting:

  • Proprietary graphics drivers, including nvidia, are not supported. Please use the open source equivalents, such as nouveau, if you would like to use Sway.
  • Please do NOT submit issues for information from the github wiki. The github wiki is community maintained and therefore may contain outdated information, scripts that don't work or obsolete workarounds.
    If you fix a script or find outdated information, don't hesitate to adjust the wiki page.

Since I had to crash SwayFX several times for this report, I'm writing the actual report from a different computer. Some information that's not in a gist may have typos, as I can't just copy-paste between two computers 😅 . Apologies in advance if such typos occur.

Please fill out the following:

  • Swayfx Version: 0.1.1

    • sway -v sway version 0.1-e8fa6cd (Dec 14 2022, branch 'master')
  • Debug Log:

    • Run sway -d 2> ~/sway.log from a TTY and upload it to a pastebin, such as gist.github.com.
    • This will record information about sway's activity. Please try to keep the reproduction as brief as possible and exit sway.
    • Attach the full file, do not truncate it.
      Since I could not reproduce with a minimal config, I also added in a quick test using my regular config. Here is the gist containing the logs of both regular and minimal.
  • Configuration File:

    • Please try to produce with the default configuration.
    • If you cannot reproduce with the default configuration, please try to find the minimal configuration to reproduce.
    • Upload the config to a pastebin such as gist.github.com.
      For this testing, I used the default configuration with two changes: I changed $term to kitty, and $menu to wofi, as I use these over the defaults, and needed a way to open application windows. Here are the configs used, both regular and minimal.
  • Stack Trace:

    • This is only needed if sway crashes.
    • If you use systemd, you should be able to open the coredump of the most recent crash with gdb with
      coredumpctl gdb sway and then bt full to obtain the stack trace.
    • If the lines mentioning sway or wlroots have ?? for the location, your binaries were built without debug symbols. Please compile both sway and wlroots from source and try to reproduce.
      Here is the gist of the last core dump.
  • Description:

    • The steps you took in plain English to reproduce the problem.
      Step 1: Open SwayFX
      Step 2: Open two applications that can be closed with CTRL+Q (did not test on more than two)
      Step 3: Press CTRL+Q to kill one
      Step 4: Witness crash.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.