50 lines
3.2 KiB
Markdown
50 lines
3.2 KiB
Markdown
# What's this?
|
|
Swaymux aims at making navigation in sway easier. To achieve this, swaymux provides a main interface listing the full tree of outputs, workspaces, containers, as well as the scratchpad.
|
|
This main interface is primarily inspired by tmux.
|
|
Swaymux can be navigated using the keyboard, with keybindings that closely follow the tmux bindings.
|
|
|
|
This project is *not* feature-complete, far from it. So far swaymux supports listing and navigating into outputs, workspaces and containers, creating a new workspace, or creating a workspace with all currently marked containers. The user can close applications without first focusing their windows, as well as view debug information (e.g. whether a window uses native wayland or xwayland). The scratchpad is supported too, both for dumping and retrieving windows from swaymux.
|
|
|
|
Planned features and fixes include a closer look at performance tweaking, as well as maybe iconification of containers where applicable.
|
|
|
|
|
|
# Installing
|
|
## Requirements
|
|
This system expects the `$SWAY_SOCK` environment variable to be set and the associated socket to be bindable. If that isn't the case, this program will fail to launch.
|
|
Further, on Nix and NixOS the runtime dependencies should already be packaged. For any other system i currently do not have a good way to test, but a valid QT QPA platform plugin should be all that is needed runtime.
|
|
|
|
## Nix and NixOS
|
|
Swaymux is packaged as a nix flake. It can be tested using `nix run git+https://git.grimmauld.de/Grimmauld/swaymux`, this will build and launch swaymux in a temporary environment that will be removed at next garbage collect in store.
|
|
|
|
To install swaymux permanently, add the flake input, e.g. using the following snippet:
|
|
```nix
|
|
swaymux = {
|
|
url = "git+https://git.grimmauld.de/Grimmauld/swaymux";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
```
|
|
Make sure you can request inputs as part of where you install it.
|
|
Adding swaymux to the actual system then is as easy as putting it into your packages:
|
|
```nix
|
|
environment.systemPackages = [
|
|
inputs.swaymux.packages."${system}".default
|
|
];
|
|
```
|
|
If you want to directly copy this, keep in mind you'll need to make the system and inputs constants available, e.g. by setting `specialArgs = { inherit inputs system; };` as part of your nixosSystem definition in your systems flake.
|
|
|
|
## Other systems
|
|
This project uses cmake and requires the [nlohman json library](https://github.com/nlohmann/json) as well as QT6.
|
|
Last time I tested, both GCC and clang compilers worked. Therefore, the classic installation process with cmake, make and make install should just work, though I currently do not have a good way to test.
|
|
|
|
|
|
## Integrating with sway
|
|
Once the package is available, it can be made available in sway by keybinding. Setting swaymux to be floating is recommended.
|
|
```sway
|
|
for_window [app_id="swaymux"] floating enable
|
|
bindsym $mod+c exec swaymux
|
|
```
|
|
Available key bindings can be viewed in-App.
|
|
|
|
# Developing
|
|
On Nix, the flake makes `nix develop` available, which provides a development environment with all the required dependencies. It does however not provide an IDE by itself.
|
|
On any other system, or if you don't like `nix develop`, the standard way of developing cmake based c++ projects should work. Just make sure both compile and runtime dependencies are available. |