Skip to content

Commit

Permalink
Add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
NomisIV committed Jul 28, 2021
1 parent 542e203 commit 38a2c54
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version = "0.1.0"
authors = ["NomisIV <simon@nomisiv.com>"]
edition = "2018"
description = "A window swallower for swaywm"
# readme = "README.md"
repository = "https://github.com/NomisIV/swayhide/"
readme = "README.md"
license = "GPL-3.0-or-later"
keywords = [ "sway", "swayipc", "window-swallower", "hide" ]
categories = [ "command-line-utilities" ]
Expand Down
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# swayhide - A window swallower for sway

## Description

`swayhide` hides the currently active terminal (by moving it to the scratchpad),
then it executes the supplied command.
When the child process has finished, the terminal is moved back.
This is incredibly useful if your workflow includes opening graphical programs from the terminal,
as the "locked" terminal won't have to take up any space.

Ideally this would be done using wlroots instead of swayipc,
but I'm too lazy to figure out how that works.

This project will be deprecated when I find/build a wlroots alternative,
since that would make it wm-independent and thus more future proof.

This project is heavily inspired by [jamesofarrell/i3-swallow](https://github.com/jamesofarrell/i3-swallow)

## Usage

```sh
$ swayhide firefox
$ alias hide="swayhide"
$ hide zathura document.pdf
$ hide "imv image.jpg"
```

## Installation

```sh
$ cargo install swayhide
```

## Building from source

```sh
$ git clone https://github.com/NomisIV/swayhide
$ cd swayhide
$ cargo install --path .
```

## TODO

- Usage menu (triggered by `--help` or no command)
- Shell completions (how to bundle completion files?)

Contributions are very welcome :)

0 comments on commit 38a2c54

Please sign in to comment.