Files
hyprland-toggle-tiling/README.md

97 lines
3.5 KiB
Markdown
Raw Permalink Normal View History

2025-06-25 19:29:52 +02:00
<div align="center">
<img src="assets/icon.svg" alt="HTT logo" width="120" height="120"/>
2025-06-25 19:29:52 +02:00
2025-06-25 19:29:52 +02:00
# HTT - Hyprland Toggle Tiling
2025-06-25 20:24:19 +02:00
Logo taken from [Papirus](https://github.com/PapirusDevelopmentTeam/papirus-icon-theme). I'm not a designer, don't judge me.
2025-06-25 19:29:52 +02:00
[![C++](https://img.shields.io/badge/Built_with_C%2B%2B-a?style=for-the-badge&logo=cplusplus&labelColor=%230062A1&color=black)](https://cplusplus.com/)
2025-06-25 19:29:52 +02:00
[![Hyprland](https://img.shields.io/badge/Hyprland-a?style=for-the-badge&logo=hyprland&labelColor=black&color=%2367E8F9)](https://hyprland.org/)
[![GPL3 License](https://img.shields.io/badge/GPL3_License-a?style=for-the-badge&logo=gnu&logoColor=black&labelColor=white&color=black)](https://typofelho.ddns.net/TypoMustakes/hyprland-toggle-tiling/src/branch/master/LICENSE)
[![Maintenance](https://img.shields.io/badge/Maintained-a?style=for-the-badge&logo=ticktick&logoColor=white&labelColor=black&color=white
2025-06-25 19:29:52 +02:00
)](https://typofelho.ddns.net/TypoMustakes/hyprland-toggle-tiling/graph)
2025-06-25 19:29:52 +02:00
A simple program to toggle tiling and floating modes for windows in the Hyprland Wayland compositor.
2025-06-26 00:46:43 +02:00
Check out [the demo](https://typofelho.ddns.net/TypoMustakes/hyprland-toggle-tiling/src/commit/da423421aaa99f906962e3fd0330d0d88b5b1aa2/assets/demo.webm)!
2025-06-26 00:41:25 +02:00
[Features](#features) •
[Installation](#installation) •
[Usage](#usage) •
[Integration with Hyprland](#integration-with-hyprland)
2025-06-25 19:29:52 +02:00
</div>
2025-06-25 19:29:52 +02:00
2025-06-25 19:29:52 +02:00
## Features
2025-06-25 19:29:52 +02:00
- Quickly switch between tiling and floating modes for all windows on the active workspace.
- After switching, the program creates a hyprland config file to respect the new windowing mode.
Let's say you switched to tiling mode. From that point on, new windows will open in tiling mode as well.
Switch to floating mode again and newly opened windows will be in floating mode.
- Floating/tiling window rules are isolated between workspaces. You can set one workspace to be floating, and all the rest to tiling for example.
- Useful for workflows that require both tiling and floating window management.
- Lightweight and easy to integrate with your Hyprland setup.
2025-06-25 19:29:52 +02:00
## Installation
2025-06-25 19:29:52 +02:00
2025-06-25 20:24:19 +02:00
You have a few options of obtainting the program.
2025-06-25 19:29:52 +02:00
### Install from AUR
2025-06-25 19:29:52 +02:00
2025-06-25 19:52:47 +02:00
You may install this program [from the AUR.](https://aur.archlinux.org/packages/hyprland-toggle-tiling-git)
2025-06-25 19:29:52 +02:00
2025-06-25 19:29:52 +02:00
### Download the release
2025-06-25 19:29:52 +02:00
2025-06-25 20:24:19 +02:00
You can also [download the release binary.](https://typofelho.ddns.net/TypoMustakes/hyprland-toggle-tiling/releases/tag/1.1.0)
or go nuts and...
2025-06-25 19:29:52 +02:00
2025-06-25 19:29:52 +02:00
### Compile from source
2025-06-25 19:29:52 +02:00
1. Clone this repository:
2025-06-25 19:46:14 +02:00
```shell
2025-06-25 19:29:52 +02:00
git clone https://typofelho.ddns.net/TypoMustakes/hyprland-toggle-tiling.git
2025-06-25 19:46:14 +02:00
```
2025-06-25 19:29:52 +02:00
2. Enter project directory:
2025-06-25 19:46:14 +02:00
```shell
2025-06-25 19:29:52 +02:00
cd hyprland-toggle-tiling/
2025-06-25 19:46:14 +02:00
```
2025-06-25 19:29:52 +02:00
3. Create build directory:
2025-06-25 19:46:14 +02:00
```shell
2025-06-25 19:29:52 +02:00
cmake -S . -B build/
2025-06-25 19:46:14 +02:00
```
2025-06-25 19:29:52 +02:00
4. Enter build directory:
2025-06-25 19:46:14 +02:00
```shell
2025-06-25 19:29:52 +02:00
cd build/
2025-06-25 19:46:14 +02:00
```
2025-06-25 19:29:52 +02:00
5. Build the projects:
2025-06-25 19:46:14 +02:00
```shell
2025-06-25 19:29:52 +02:00
cmake --build .
2025-06-25 19:46:14 +02:00
```
2025-06-25 19:29:52 +02:00
2025-06-25 19:29:52 +02:00
# Usage
2025-06-25 19:46:14 +02:00
```shell
2025-06-25 19:29:52 +02:00
./htt <config-file-path>
2025-06-25 19:46:14 +02:00
```
2025-06-25 19:29:52 +02:00
- If the specified configuration file does not exist, it will be created.
- If the configuration contains existing rules, this should still work, but your existing configuration will probably get a bit messy, syntax-wise. I advise against it.
2025-06-25 19:29:52 +02:00
# Integration with Hyprland
2025-06-25 19:29:52 +02:00
1. Whatever configuration path you specify, include it in your Hyprland config, like so:
2025-06-25 20:24:19 +02:00
`/path/to/your/hyprland.conf`:
2025-06-25 19:46:14 +02:00
```conf
2025-06-25 19:29:52 +02:00
source = ~/path/to/specified/config/file.conf
2025-06-25 19:46:14 +02:00
```
2025-06-25 19:29:52 +02:00
2. Bind the script to a key in your Hyprland config:
2025-06-25 19:46:14 +02:00
```conf
2025-06-25 19:29:52 +02:00
bind = $mod + t, exec, /path/to/htt <config-file-path>
2025-06-25 19:46:14 +02:00
```
2025-06-25 19:29:52 +02:00
Or not. Do whatever you want.