docs: add README.md

This commit is contained in:
Patryk Hegenberg 2024-12-25 09:04:19 +01:00
parent f7e621abe0
commit a47bed174f

101
README.md Normal file
View file

@ -0,0 +1,101 @@
# tmux_popup
`tmux_popup` is a command-line tool that allows you to open various programs inside floating popups in tmux. It supports opening tmux, lazygit, harlequin, and postings programs within a tmux session as popups. This tool helps streamline your workflow by launching and interacting with these tools directly in tmux, without leaving your terminal environment.
## Features
- Open tmux in a floating popup.
- Open lazygit, harlequin, and postings inside tmux popups.
- Check if the required dependencies are installed.
- Customizable popup width and height.
## Installation
Ensure you have the following tools installed:
- `tmux`
- `lazygit`
- `harlequin`
- `posting`
To install the `tmux_popup` CLI tool, you can build it from source or use pre-built binaries, if available.
### Build from Source
1. Clone the repository:
```bash
git clone https://github.com/yourusername/tmux_popup.git
cd tmux_popup
2. Build the application using Go:
```bash
go build -o tmux_popup
````
3. Add the binary to your system's PATH for easier access.
## Usage
Once installed, you can use the tmux_popup tool from your terminal. The basic command syntax is:
```bash
tmux_popup <command> [options]
````
### Commands
- tmux: Opens a tmux popup.
```bash
tmux_popup tmux [--width=<width>] [--height=<height>]
````
- lazygit: Opens lazygit in a tmux popup.
```bash
tmux_popup lazygit [--width=<width>] [--height=<height>]
````
- harlequin: Opens harlequin in a tmux popup.
```bash
tmux_popup harlequin [--width=<width>] [--height=<height>]
````
- postings: Opens postings in a tmux popup.
```bash
tmux_popup postings [--width=<width>] [--height=<height>]
````
- check: Checks if the required dependencies are installed.
```bash
tmux_popup check
````
### Options
- --width: The width of the popup (e.g., 80% or 100).
- --height: The height of the popup (e.g., 80% or 100).
If you don't specify these options, default values (80% for both width and height) will be used.
Example Usage
Open a tmux session in a floating popup:
```bash
tmux_popup tmux
````
Open lazygit in a floating popup with custom width and height:
```bash
tmux_popup lazygit --width=100 --height=70
````
Check if dependencies are correctly installed:
``` bash
tmux_popup check
````
### Error Handling
If you run into issues with tmux_popup, check that:
- You have tmux, lazygit, harlequin, and posting installed and accessible in your PATH.
- You have a running tmux session.
## License
tmux_popup is released under the MIT License.