2023-04-19 02:56:11 -07:00
|
|
|
# hy3
|
|
|
|
i3 / sway like layout for [hyprland](https://github.com/hyprwm/hyprland).
|
|
|
|
|
|
|
|
### Features
|
|
|
|
- [x] i3 like tiling
|
|
|
|
- [x] Window splits
|
|
|
|
- [x] Window movement
|
|
|
|
- [x] Window resizing
|
2023-04-26 00:57:24 -07:00
|
|
|
- [x] Selecting a group of windows at once (and related movement)
|
2023-06-04 20:29:54 -07:00
|
|
|
- [x] Tabbed groups
|
2023-04-19 02:56:11 -07:00
|
|
|
- [ ] Some convenience dispatchers not found in i3 or sway
|
|
|
|
|
|
|
|
### Stability
|
2023-04-19 21:38:55 -07:00
|
|
|
As of now hy3 is stable enough to use normally.
|
2023-04-19 02:56:11 -07:00
|
|
|
If you encounter any crashes or bugs please report them in the issue tracker.
|
|
|
|
|
|
|
|
When reporting bugs, please include:
|
|
|
|
- Commit hash of the version you are running.
|
|
|
|
- Steps to reproduce (if you can figure them out)
|
|
|
|
- backtrace of the crash
|
|
|
|
|
|
|
|
If you don't know how to reproduce it or can't, or you can't take a backtrace please still report the issue.
|
|
|
|
|
|
|
|
## Configuration
|
2023-04-19 03:07:05 -07:00
|
|
|
Set your `general:layout` to `hy3` in hyprland.conf.
|
|
|
|
|
2023-04-19 02:56:11 -07:00
|
|
|
hy3 requires using a few custom dispatchers for normal operation.
|
|
|
|
In your hyprland config replace the following dispatchers:
|
|
|
|
- `movefocus` -> `hy3:movefocus`
|
|
|
|
- `movewindow` -> `hy3:movewindow`
|
|
|
|
|
|
|
|
You can use `hy3:makegroup` to create a new split.
|
|
|
|
|
2023-05-26 20:13:32 -07:00
|
|
|
### Config fields
|
|
|
|
```conf
|
|
|
|
plugin {
|
|
|
|
hy3 {
|
|
|
|
# disable gaps when only one window is onscreen
|
|
|
|
no_gaps_when_only = <bool>
|
2023-06-02 01:32:24 -07:00
|
|
|
|
2023-06-04 22:05:21 -07:00
|
|
|
# offset from group split direction when only one window is in a group
|
|
|
|
group_inset = <int>
|
|
|
|
|
2023-06-04 17:37:27 -07:00
|
|
|
# tab group settings
|
|
|
|
tabs {
|
|
|
|
# height of the tab bar
|
|
|
|
height = <int>
|
2023-06-02 01:32:24 -07:00
|
|
|
|
2023-06-04 17:37:27 -07:00
|
|
|
# padding between the tab bar and its focused node
|
|
|
|
padding = <int>
|
2023-06-02 01:32:24 -07:00
|
|
|
|
2023-06-04 17:37:27 -07:00
|
|
|
# the tab bar should animate in/out from the top instead of below the window
|
|
|
|
from_top = <bool>
|
2023-06-02 01:32:24 -07:00
|
|
|
|
2023-06-04 17:37:27 -07:00
|
|
|
# render the window title on the bar
|
|
|
|
render_text = <bool>
|
2023-06-03 02:00:50 -07:00
|
|
|
|
2023-06-04 17:37:27 -07:00
|
|
|
# rounding of tab bar corners
|
|
|
|
rounding = <int>
|
2023-06-02 01:32:24 -07:00
|
|
|
|
2023-06-04 17:37:27 -07:00
|
|
|
# font to render the window title with
|
|
|
|
text_font = <string>
|
2023-06-02 01:32:24 -07:00
|
|
|
|
2023-06-04 17:37:27 -07:00
|
|
|
# height of the window title
|
|
|
|
text_height = <int>
|
|
|
|
|
|
|
|
# left padding of the window title
|
|
|
|
text_padding = <int>
|
|
|
|
|
|
|
|
# active tab bar segment color
|
|
|
|
col.active = <color>
|
|
|
|
|
|
|
|
# urgent tab bar segment color
|
|
|
|
col.urgent = <color>
|
|
|
|
|
|
|
|
# inactive tab bar segment color
|
|
|
|
col.inactive = <color>
|
|
|
|
|
|
|
|
# active tab bar text color
|
|
|
|
col.text.active = <color>
|
|
|
|
|
|
|
|
# urgent tab bar text color
|
|
|
|
col.text.urgent = <color>
|
|
|
|
|
|
|
|
# inactive tab bar text color
|
|
|
|
col.text.inactive = <color>
|
|
|
|
}
|
2023-05-26 20:13:32 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2023-04-19 02:56:11 -07:00
|
|
|
### Dispatcher list
|
2023-06-02 01:32:24 -07:00
|
|
|
- `hy3:makegroup, <h | v | opposite | tab>` - make a vertical / horizontal split or tab group
|
2023-06-15 00:27:02 -07:00
|
|
|
- `hy3:movefocus, <l | u | d | r | left | down | up | right>, [visible]` - move the focus left, up, down, or right
|
2023-06-11 23:00:24 -07:00
|
|
|
- `visible` - only move between visible nodes, not hidden tabs
|
2023-06-15 00:27:02 -07:00
|
|
|
- `hy3:movewindow, <l | u | d | r | left | down | up | right>, [once]` - move a window left, up, down, or right
|
2023-05-10 00:42:53 -07:00
|
|
|
- `once` - only move directly to the neighboring group, without moving into any of its subgroups
|
2023-06-25 15:29:02 -07:00
|
|
|
- `hy3:killactive` - close all windows in the focused node
|
2023-06-11 23:00:24 -07:00
|
|
|
- `hy3:changefocus, <top | bottom | raise | lower | tab | tabnode>`
|
2023-06-11 22:19:43 -07:00
|
|
|
- `top` - focus all nodes in the workspace
|
|
|
|
- `bottom` - focus the single root selection window
|
|
|
|
- `raise` - raise focus one level
|
|
|
|
- `lower` - lower focus one level
|
|
|
|
- `tab` - raise focus to the nearest tab
|
|
|
|
- `tabnode` - raise focus to the nearest node under the tab
|
2023-06-15 00:27:02 -07:00
|
|
|
- `hy3:focustab <mouse | [l | r | left | right], [prioritize_hovered | require_hovered], [wrap]>`
|
|
|
|
- `mouse` - focus the tab under the mouse, works well with a non consuming bind, e.g.
|
|
|
|
```conf
|
|
|
|
# binds hy3:focustab to lmb and still allows windows to receive clicks
|
|
|
|
bindn = , mouse:272, hy3:focustab, mouse
|
|
|
|
```
|
|
|
|
- `l | r | left | right` - direction to change tabs in
|
|
|
|
- `prioritize_hovered` - prioritize the tab group under the mouse when multiple are stacked. use the lowest group if none is under the mouse.
|
|
|
|
- `require_hovered` - affect the tab group under the mouse. do nothing if none are hovered.
|
|
|
|
- `wrap` - wrap to the opposite size of the tab bar if moving off the end
|
2023-04-19 02:56:11 -07:00
|
|
|
- `hy3:debugnodes` - print the node tree into the hyprland log
|
|
|
|
|
|
|
|
## Installing
|
|
|
|
|
|
|
|
### Nix
|
2023-06-17 02:42:22 -07:00
|
|
|
#### Hyprland home manager module
|
2023-05-03 12:05:14 -07:00
|
|
|
Assuming you use hyprland's home manager module, you can easily integrate hy3 by adding it to the plugins array.
|
2023-04-28 01:11:58 -07:00
|
|
|
|
|
|
|
```nix
|
|
|
|
# flake.nix
|
|
|
|
|
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
hyprland.url = "github:hyprwm/Hyprland";
|
|
|
|
|
|
|
|
hy3 = {
|
|
|
|
url = "github:outfoxxed/hy3";
|
|
|
|
inputs.hyprland.follows = "hyprland";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { nixpkgs, home-manager, hyprland, hy3, ... }: {
|
|
|
|
homeConfigurations."user@hostname" = home-manager.lib.homeManagerConfiguration {
|
|
|
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
|
|
|
|
|
|
|
modules = [
|
|
|
|
hyprland.homeManagerModules.default
|
|
|
|
|
|
|
|
{
|
|
|
|
wayland.windowManager.hyprland = {
|
|
|
|
enable = true;
|
2023-05-03 12:05:14 -07:00
|
|
|
plugins = [ hy3.packages.x86_64-linux.hy3 ];
|
2023-04-28 01:11:58 -07:00
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2023-06-17 02:42:22 -07:00
|
|
|
#### Manual (Nix)
|
2023-04-28 01:11:58 -07:00
|
|
|
hy3's binary is availible as `${hy3.packages.<system>.hy3}/lib/libhy3.so`, so you can also
|
|
|
|
directly use it in your hyprland config like so:
|
|
|
|
|
|
|
|
```nix
|
|
|
|
# ...
|
|
|
|
wayland.windowManager.hyprland = {
|
|
|
|
# ...
|
|
|
|
extraConfig = ''
|
2023-05-03 12:05:14 -07:00
|
|
|
plugin = ${hy3.packages.x86_64-linux.hy3}/lib/libhy3.so
|
2023-04-28 01:11:58 -07:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
```
|
2023-04-19 02:56:11 -07:00
|
|
|
|
2023-06-17 02:42:22 -07:00
|
|
|
### Arch (AUR)
|
|
|
|
There is an unofficial [hy3-git](https://aur.archlinux.org/packages/hy3-git) package.
|
2023-04-19 02:56:11 -07:00
|
|
|
|
2023-06-17 02:42:22 -07:00
|
|
|
As of writing, the `hyprland-git` AUR package does not properly handle hyprland headers,
|
|
|
|
which are required for hy3 to build. I have been informed that there is a
|
|
|
|
[fixed version](https://gist.githubusercontent.com/eclairevoyant/0007c44a52c715f243452d17362104b3/raw/9b834290ac75bef2f3bb1364d1380832c65ed6bf/PKGBUILD)
|
|
|
|
that places the headers in the correct location.
|
2023-04-19 02:56:11 -07:00
|
|
|
|
|
|
|
### Manual
|
2023-06-17 02:42:22 -07:00
|
|
|
Install hyprland, including its headers and pkg-config file, then run the following commands:
|
2023-04-19 02:56:11 -07:00
|
|
|
|
|
|
|
```sh
|
2023-04-19 10:51:30 -07:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=Debug -B build
|
|
|
|
cmake --build build
|
2023-04-19 02:56:11 -07:00
|
|
|
```
|
|
|
|
|
2023-04-28 01:11:58 -07:00
|
|
|
The plugin will be located at `build/libhy3.so`, and you can load it normally
|
|
|
|
(See [the hyprland wiki](https://wiki.hyprland.org/Plugins/Using-Plugins/#installing--using-plugins) for details.)
|
2023-06-17 02:42:22 -07:00
|
|
|
|
|
|
|
Note that the hyprland headers and pkg-config file **MUST be installed correctly, for the target version of hyprland**.
|