Sway/I3 inspired tiling window manager for Wayfire

Overview

Swayfire

Sway/I3 inspired tiling window manager for Wayfire.

This project aims to emulate and improve upon sway/i3wm features as a plugin for the Wayfire compositor.

Currently, Swayfire implements most basic tiling features such as splits and window movement and navigation keys. Swayfire also supports mouse resizing and moving of windows/tiled parents.

NOTE: Swayfire is currently still in early development and not meant to be used yet.

Notable planned features:

  • Sway/i3-like Window decorations (borders, titles, and tabbed and stacked titles as in Sway/i3)
  • Sway/i3 ipc (wherever is makes sense)
  • Option for rounded corners for floating windows and window groups
  • Scratchpad

Installation

To build and install from source:

# Swayfire is developped using clang, but should compile with gcc as
# well at least. The following exports are optional:
export CC=clang
export CXX=clang++

# Generate the build directory:
meson setup --prefix /usr build

# To compile Swayfire:
meson compile -C build

# To install Swayfire:
meson install -C build

Alternatively, Swayfire has been packaged for the following distros:

Arch Linux

swayfire-git is available in the AUR.

yay -S swayfire-git

Contributing

Contributions are welcome.

Swayfire uses the c++17 standard and a modified llvm coding style defined in .clang_format. Please run meson compile format -C build to run the formatter before every commit.

Issues
  • build: don't use wayfire's pkgconfig metadata_dir var

    build: don't use wayfire's pkgconfig metadata_dir var

    Hi! Before commenting about this PR, thank you for this nice plugin.

    I've been trying NixOS with Wayfire and wanted to install a plugin outside of the default ones. The problem occurrs during the installation of the .xml metadata files because Nix won't let me doing it on the Wayfire's prefix. This PR has a more complete explanation and a half part of my solution.

    Looking around other external plugins, I've found this commit by the same author of the mentioned PR and it clicked with me. So, I forked this repo, commited almost the same changes, set the WAYFIRE_PLUGIN_* env variables, and currently it works very well!

    I've never used meson before, but I hope it's the solution I'm looking for.

    opened by EzequielRamis 5
  • deco: split decoration and surface, improve performances when decoration is hidden

    deco: split decoration and surface, improve performances when decoration is hidden

    Split the Surface from the Decoration to make it compatible with the wayfire 0.8 API. Remove the surface of a window if its decoration is meant to be hidden (either toggled manually or when in fullscreen). It should improve performances by allowing Wayfire to perform a scan out when possible (on fullscreen windows, for example).

    opened by aruhier 5
  • deco: Implement

    deco: Implement "should corner be rounded" detection

    Currently, corner radii >0 are pretty ugly and useless since it is blindly applied to every corner. We need to detect whether a corner should be rounded or not so as to avoid "holes" as described in https://github.com/Javyre/swayfire/issues/19#issuecomment-847123760

    opened by Javyre 4
  • Added PKGBUILD for easy installation on Arch

    Added PKGBUILD for easy installation on Arch

    Hello there!

    First, thanks for the work you've done on this! Since this module is relatively new, there isn't an AUR submission for this. I thought I might want to contribute the PKGBUILD file that I've made to install this module on my Arch system, in the hope that it helps potential users, and when this module is ready for prime time, this file can be submitted to the Arch User Repository, or even packaged in the official distro!

    opened by WaseemAlkurdi 3
  • build fail with latest wayfire

    build fail with latest wayfire

    [2/8] Compiling C++ object src/core/libswayfire.so.p/grab.cpp.o FAILED: src/core/libswayfire.so.p/grab.cpp.o c++ -Isrc/core/libswayfire.so.p -Isrc/core -I../src/core -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/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/libdrm -I/usr/include/libevdev-1.0 -I/usr/include/libxml2 -fdiagnostics-color=always -fpch-preprocess -include prefix.hpp -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -std=c++17 -O0 -g -DWLR_USE_UNSTABLE -DWAYFIRE_PLUGIN -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -fPIC -pthread -MD -MQ src/core/libswayfire.so.p/grab.cpp.o -MF src/core/libswayfire.so.p/grab.cpp.o.d -o src/core/libswayfire.so.p/grab.cpp.o -c ../src/core/grab.cpp

    opened by Whernog 2
  • Fails to build with latest Wayfire

    Fails to build with latest Wayfire

    Regressed by https://github.com/wayfirewm/wayfire/commit/a79978b20b0d.

    In file included from src/core/binding.cpp:2:
    src/core/core.hpp:1182:34: error: no type named 'view_change_viewport_signal' in namespace 'wf'; did you mean 'view_change_workspace_signal'?
                    dynamic_cast<wf::view_change_viewport_signal *>(data_);
                                 ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
                                     view_change_workspace_signal
    /usr/include/wayfire/signal-definitions.hpp:604:8: note: 'view_change_workspace_signal' declared here
    struct view_change_workspace_signal : public _view_signal
           ^
    
    opened by jbeich 2
  • Build fails

    Build fails

    After following the directions in the README, the build fails with this output:

    FAILED: src/deco/libswayfire-deco.so.p/deco.cpp.o
    ccache c++ -Isrc/deco/libswayfire-deco.so.p -Isrc/deco -I../src/deco -I/usr/lib64/libffi/include -I/usr/include/libdrm -I/usr/include/pixman-1 -I/usr/include/elogind -I/usr/include/uuid -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -std=c++17 -O3 -DWLR_USE_UNSTABLE -DWAYFIRE_PLUGIN -fPIC -fpch-preprocess -include prefix.hpp -MD -MQ src/deco/libswayfire-deco.so.p/deco.cpp.o -MF src/deco/libswayfire-deco.so.p/deco.cpp.o.d -o src/deco/libswayfire-deco.so.p/deco.cpp.o -c ../src/deco/deco.cpp
    ../src/deco/deco.cpp: In member function 'void ViewDecoration::detach_surface()':
    ../src/deco/deco.cpp:57:56: error: no match for 'operator=' (operand types are 'std::unique_ptr<wf::surface_interface_t ' and 'void')
    
    opened by wrkzk 2
  • Decorations: segfault when closing a window

    Decorations: segfault when closing a window

    Wayfire segfaults a bit randomly when closing a window with Swayfire-decorations enabled:

    Log: wayfire_segv.log Trace: wayfire_strace.log

    How to reproduce

    After starting Wayfire, open 2 windows in tiled mode, close one of it, Wayfire crashes. Doing other actions like changing workspace seem to inhibit the issue.

    opened by aruhier 2
  • core: Fullscreening views not picked up by GeoEnforcer

    core: Fullscreening views not picked up by GeoEnforcer

    Open a view. Fullscreen it with the WMActions plugin. The view is not resized but instead weirdly squished in place by the geoenforcer.

    reported by @aruhier

    opened by Javyre 2
  • Unbreak build on non-glibc systems

    Unbreak build on non-glibc systems

    Found on FreeBSD but Alpine Linux (musl) maybe affected as well.

    $ meson setup /tmp/swayfire_build && meson compile -C /tmp/swayfire_build
    src/pch/prefix.hpp:10:10: fatal error: 'bits/stdint-intn.h' file not found
    #include <bits/stdint-intn.h>
             ^~~~~~~~~~~~~~~~~~~~
    $ meson setup -Db_pch=false /tmp/swayfire_build && meson compile -C /tmp/swayfire_build
    src/core/core.hpp:4:10: fatal error: 'bits/stdint-intn.h' file not found
    #include <bits/stdint-intn.h>
             ^~~~~~~~~~~~~~~~~~~~
    
    opened by jbeich 1
  • answer to question from IRC

    answer to question from IRC

    Hi, I just saw your question on IRC but you've disconnected :)

    I'm having some trouble implementing interactive resizing using the mouse. The views seem to lag behind when their geometry is set it doesnt apply it right away and so getting their geometry with get_wm_geometry is unreliable as well using set_resizing only solves this lag in a few simple cases where only a single view is being resized, but it still happens when resizing multiple views at the same time when theyre tiled together

    The problem is the following: Wayfire does not resize the views directly. Instead, the Wayland compositor sends a request to the client to resize to the new size. The client needs to submit a new buffer (which might not even have the requested size). So, when you set_geometry() or similar, the view does not really resize, it will resize when the client submits a new buffer.

    There are two main ways to fix this issue. One of these is the transaction system sway and river use. They try to ensure every frame is perfect by waiting for all clients to resize and then updating the contents on the screen. This approach is a bit complicated, requires synchronizing the state, timeouts when a client is not responsive, etc. It might be possible to implement in Wayfire once https://github.com/WayfireWM/wayfire/issues/995 is done.

    The another way is much more hacky, but IMO it works well enough in practice. The idea is to force the position of the views with a transformer (scaling and translating them), and then waiting for their size to change, in which case we just remove the transformers. This is what simple-tile does. https://github.com/WayfireWM/wayfire/blob/master/plugins/tile/tree.cpp#L261

    I hope this answers your question.

    opened by ammen99 1
  • swayfire keybinding acting on  applications in windows

    swayfire keybinding acting on applications in windows

    For the border window, the focus movement behavior is performed. The key is captured by the application in the window, and so is the window movement behavior. it is different from i3/sway 's behavior,this will cause the characters bound by the keys to be printed on my terminal during the layout process

    expect: The key binding of window movement will not be captured by the application in the window

    opened by shenweijiekdel 0
  • swayfire_deco causes Wayfire to crush

    swayfire_deco causes Wayfire to crush

    hi,

    I tried swayfire as a possible replacement for sway. I tries to load both modules, but when I add swayfire_deco in wayfire.ini, wayfire does not start. I tried to load it dynamically from wcm and while wayfire session crushed.

    DD 28-02-22 08:13:07.126 - [src/output/plugin-loader.cpp:135] Loaded plugin /usr/lib/wayfire/libswayfire-deco.so DD 28-02-22 08:13:07.126 - [src/deco/deco.cpp:529] === deco init === DD 28-02-22 08:13:07.126 - [src/output/output.cpp:432] output DP-1: activate plugin swayfire-deco DD 28-02-22 08:13:07.126 - [src/deco/deco.cpp:417] Decorating split-node-9 EE 28-02-22 08:13:07.126 - [src/main.cpp:132] Fatal error: Segmentation fault EE 28-02-22 08:13:07.144 - #1 wf::print_trace(bool) ??:? EE 28-02-22 08:13:07.158 - #2 __restore_rt libc_sigaction.c:? EE 28-02-22 08:13:07.170 - #3 set_outer_corners(nonstd::observer_ptr<INode>, unsigned char) ??:? EE 28-02-22 08:13:07.181 - #4 set_outer_corners(nonstd::observer_ptr<INode>, unsigned char) ??:? EE 28-02-22 08:13:07.195 - #5 wf::signal_connection_t::emit(wf::signal_data_t*) ??:? EE 28-02-22 08:13:07.210 - #6 wf::compositor_core_impl_t::add_view(std::unique_ptr<wf::view_interface_t, std::default_delete<wf::view_interface_t> >) ??:? EE 28-02-22 08:13:07.221 - #7 SwayfireDeco::decorate_node(nonstd::observer_ptr<INode>) ??:? EE 28-02-22 08:13:07.232 - #8 SplitNode::for_each_node(std::function<void (nonstd::observer_ptr<INode>)> const&) ??:? EE 28-02-22 08:13:07.244 - #9 non-virtual thunk to DecorationSurface::get_offset() ??:? EE 28-02-22 08:13:07.256 - #10 Workspaces::for_each(std::function<void (nonstd::observer_ptr<Workspace>)> const&) ??:? EE 28-02-22 08:13:07.267 - #11 SwayfireDeco::swf_init() ??:? EE 28-02-22 08:13:07.281 - #12 wf::signal_connection_t::emit(wf::signal_data_t*) ??:? EE 28-02-22 08:13:07.294 - #13 SwayfirePlugin::init() ??:? EE 28-02-22 08:13:07.309 - #14 plugin_manager::reload_dynamic_plugins() ??:? EE 28-02-22 08:13:07.320 - #15 wl_event_loop_dispatch_idle ??:? EE 28-02-22 08:13:07.332 - #16 wl_event_loop_dispatch ??:? EE 28-02-22 08:13:07.343 - #17 wl_display_run ??:? EE 28-02-22 08:13:07.359 - #18 main ??:? EE 28-02-22 08:13:07.373 - #19 __libc_start_call_main libc-start.c:? EE 28-02-22 08:13:07.386 - #20 __libc_start_main_alias_2 :? EE 28-02-22 08:13:07.401 - #21 _start ??:?

    Swayfire package is built from https://aur.archlinux.org/packages/swayfire-git so it should be rather fresh,

    opened by struthio 1
  • core: Floating node placed on new workspace not immediately removed from old workspace

    core: Floating node placed on new workspace not immediately removed from old workspace

    Open two views. make one float and drag it to another workspace in expo. exit from expo back into the original workspace. use the "toggle float focus" binding to focus the floating window even though it's on another workspace now.

    opened by Javyre 0
  • core: Wrong active node when switching back to workspace with sticky view last focused.

    core: Wrong active node when switching back to workspace with sticky view last focused.

    open a view on ws 1. open a view on ws 2. open another view on ws 2 and make it sticky, floating and focused. focus the non-sticky view. switch to workspace 1 and the sticky view will be focused by wayfire but swayfire thinks the other view on ws is focused.

    opened by Javyre 0
  • core: allow to set a direction for a horizontal/vertical split

    core: allow to set a direction for a horizontal/vertical split

    Currently, a ViewNode can take a prefered_split_type which changes the behavior of the split when upgraded into a SplitNode (horizontal, vertical, tabbed, etc.).

    However it should be possible to indicate a direction for horizontal and vertical splits: left/right or top/bottom of the node.

    Idea of implementation

    A new field in the ViewNode indicating if the next node is to be added before or after the current node in the children list could solve this issue. Before/After for a horizontal split would mean top/down, and left/right for a horizontal split.

    opened by aruhier 0
Owner
Javier Pollak
Love rust, most work on @Snowlabs in collaboration with @CherryMan. Also upload some random projects I work on when I'm bored at school.
Javier Pollak
x11 window manager

viru - Yet Another WM

zbj 15 Dec 6, 2021
tabbed window manager that can tile windows inside floating containers

tabbed window manager that can tile windows inside floating containers

Seninha 83 Jun 24, 2022
WMBar is a window manager agnostic status bar that aims to be lightweight, simple, extensible/modular and fast.

WMBar is a window manager agnostic status bar that aims to be lightweight, simple, extensible/modular and fast.

WMBar 1 Nov 27, 2021
Modern Window Sitter for X11 based Desktop Environments

Modern Window Sitter for X11 based Desktop Environments (Coming to Wayland, Windows and Mac soon-ish). But using with a terminal emulator is recommended.

Antony Jr 33 May 7, 2022
GUI for calibrating the wacom tablet to a screen or window

wacom-settings GUI for calibrating the wacom tablet to a screen or window. Learning project for writing in C. Uses GTK4 library for the GUI and X11 li

null 21 Apr 30, 2022
Window and GUI system based on Dear ImGui from OCornut

ImWindow Window and GUI system based on ImGui from OCornut. Include docking/floating window, multi window and multi render support. Platform Actually

Thibault Hennequin 681 Jun 20, 2022
An addon of imgui for supporting docks in the imgui's window

An addon of imgui for support dock in the window

BB 193 Jun 23, 2022
Hypr is a tiling window manager written in modern C++.

Hypr is a Linux tiling window manager for Xorg. It's written in XCB with modern C++ and aims to provide easily readable and expandable code. !WARNING:

vaxerski 589 Jun 27, 2022
Utility to enable workspace switching with touchpad gestures in Sway.

sway-gest [WIP - Not in usable state yet] Utility to enable workspace switching with touchpad gestures in Sway. Touchpad gestures are supposed to be i

Alexandr Řehulka 1 Dec 23, 2021
Lua as an advanced configuration language for wayfire

wf-lua Experiment to use Lua as an advanced configuration language for wayfire. wf-lua is meant for use-cases where writing an actual wayfire plugin s

Javier Pollak 12 Feb 23, 2022
Wayfire plugin for handling touchpad gestures globally in a layer-shell surface

wf-globalgestures Global touchpad gestures plugin for Wayfire: implements a special protocol (also in this repo) that lets clients request that a part

null 4 Jan 18, 2022
Maintained fork of the Openbox WM with support for tiling and others

Maintained fork of the Openbox WM with support for tiling and others

null 10 Jun 27, 2022
A C++ port of Wave Function Collapse Tiling

Wave Function Collapse in C++ This is a C++ port of https://github.com/mxgmn/WaveFunctionCollapse. All sample images come from https://github.com/mxgm

Emil Ernerfeldt 280 Jun 28, 2022
NWM is a simple window manager for linux which uses Xlib for managing windows

NWM is a simple window manager for linux which uses Xlib for managing windows.

Kumar Gaurav Pandey 17 Jun 19, 2022
dwm is an extremely fast, small, and dynamic window manager for X.

dwm - dynamic window manager dwm is an extremely fast, small, and dynamic window manager for X. My Patches This is in the order that I patched everyth

Christian Chiarulli 31 Jun 15, 2022
x11 window manager

viru - Yet Another WM

zbj 15 Dec 6, 2021
A very stupid window manager.

vswm - very stupid window manager ================================= Probably the most stupid window manager ever created, written over an ancient rel

Felix Hägglund Wennergren 31 Jun 14, 2022
tabbed window manager that can tile windows inside floating containers

tabbed window manager that can tile windows inside floating containers

Seninha 83 Jun 24, 2022
WMBar is a window manager agnostic status bar that aims to be lightweight, simple, extensible/modular and fast.

WMBar is a window manager agnostic status bar that aims to be lightweight, simple, extensible/modular and fast.

WMBar 1 Nov 27, 2021
Small Header-Only Window and OpenGL Manager.

LxDemOWin Linux Demo OpenGL and Window manager A small header-Only Window and OpenGL manager made in C, written in about 2 hours. With some basic code

PipeWarp 5 Jun 4, 2022
A window manager for GNOME, with rounded corners patch

Tested in gnome-shell 40.5, should works in gnome 40 and 41. integrate the blur effects with rounded corners.The source code can be found here. Issues

Yi 385 Jun 26, 2022
A simple X11 window manager

Devoid WM A simple x11 tiling window manager Devoid tries to abide by the principle - "Do one thing, do it well". All it is is a window manager which

Murtaza Udaipurwala 25 Jun 14, 2022
Small Header-Only Window and OpenGL Manager.

LxDemOWin Linux Demo OpenGL and Window manager A small header-Only Window and OpenGL manager made in C, written in about 2 hours. With some basic code

pipewarp 4 Dec 11, 2021
tabbed window manager that can tile windows inside floating containers

shod ┌───────────────────────┐ │ │ ┌─────┼────

Seninha 84 Jun 27, 2022
My perfect build of suckless's dynamic window manager

perfectwm My perfect build of suckless's dynamic window manager. patches dwm-alwayscenter-20200625-f04cac6.diff dwm-fancybar-20200423-ed3ab6b.diff dwm

Madeleine 3 May 30, 2022
Quite powerful window manager for X

qpwm quite powerful window manager for X It's small floating window manager from not a programmer ?? Some features ?? Floating only. Fullscreen toggle

unxsh 71 Jun 27, 2022
A fwakin floating window manager, that just works perfectly.

ewm ( Elite optimized* Window Manager ) + ewm is a very simple and lightweight floating window manager. + I will try to stay under 400 SLOC. Features

Nabeen Tiwaree 12 May 31, 2022
"Sigma File Manager" is a free, open-source, quickly evolving, modern file manager (explorer / finder) app for Windows, MacOS, and Linux.

"Sigma File Manager" is a free, open-source, quickly evolving, modern file manager (explorer / finder) app for Windows, MacOS, and Linux.

Aleksey Hoffman 892 Jun 27, 2022
PMM - The C++ Package Manager Manager

PMM - The Package Manager Manager PMM is a module for CMake that manages... package managers. Wha- Why? People hate installing new software. Especiall

Edgar 11 Apr 18, 2022