Skip to content

Commit

Permalink
README: split for each tool
Browse files Browse the repository at this point in the history
README: add table with tools, descriptions and maintainers
  • Loading branch information
fufexan committed Dec 9, 2023
1 parent 65e567a commit f8d6aba
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 80 deletions.
93 changes: 13 additions & 80 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,82 +4,13 @@ Community scripts and utilities for Hypr projects

# Tools

## Grimblast

A Hyprland version of Grimshot.

Install by running the Makefile or just copying the `grimblast` script in your `~/.bin`.

## shellevents

Invoke shell functions in response to Hyprland socket2 events. Install with `make install`.

See `shellevents_default.sh` for the supported function names. Example event files can be found in `submaps.sh` and `notifywindow.sh`.

## try_swap_workspace

Inspired from [this discussion on the hyprland repository](https://github.com/hyprwm/Hyprland/discussions/835) try_swap_workspace is a binding to mimic the 'arbitrary workspace on arbitrary monitor' on arbitrary monitor behavior known from may window managers.
This means:
- if a workspace is not displayed on any monitor and should be displayed, it gets displayed on the currently focused monitor
- if a workspace is already displayed on another monitor and should displayed on the currently focused monitor, the displayed workspace on the focused monitor will be swapped with the workspace on the monitor that should be displayed on the focused monitor

Install by running the Makefile `sudo make install`
Uninstall by running the Makefile `sudo make uninstall`

Usage:

To send the window to scratchpad
> bind= ALT,1,exec, try_swap_workspace 1
use `-h` flag to get help.
use `-c` flag to check dependencies

## Scratchpad
A Bash script that instantly sends focused window to a special workspace named `scratchpad`
and makes it easier to retrieve the window back to the current workspace.

Install by running the Makefile `sudo make install`
Uninstall by running the Makefile `sudo make uninstall`

Usage:

To send the window to scratchpad
> bind = SUPER, s, exec, scratchpad
To get back the window
>bind = SUPERSHIFT, s, exec, scratchpad -g
use `-h` flag to get help.

## hdrop

This script emulates the main features of [tdrop](https://github.com/noctuid/tdrop) in Hyprland:

- if the specified program is not running: launch it and bring it to the foreground.
- if the specified program is already running on another workspace: bring it to the current workspace and focus it.
- if the specified program is already on the current workspace: move it to workspace 'special:hdrop', thereby hiding it until called up again by hdrop.

#### Usage:

> hdrop [OPTIONS] [COMMAND]
#### Arguments:

> [COMMAND]
> The usual command you would run to start the desired program
#### Options:

> -b, --background
> changes the default behaviour: if the specified program is not running, launch it in the background instead of foreground. Thereafter 'hdrop -b' will work the same as without this flag.
>
> -h, --help
> Print this help message
>
> -V, --version
> Print version
See man page for further information.
| Name | Description | Maintainer(s) |
| ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| [grimblast](./grimblast) | A Hyprland version of Grimshot | @fufexan, @Misterio77 |
| [shellevents](./shellevents) | Invoke shell functions in response to Hyprland socket2 events | @trippwill |
| [try_swap_workspace](./try_swap_workspace) | Binding to mimic the 'arbitrary workspace on arbitrary monitor' behavior | @schievel1 |
| [scratchpad](./scratchpad) | A Bash script that instantly sends focused window to a special workspace named `scratchpad` and makes it easier to retrieve the window back to the current workspace | @niksingh710 |
| [hdrop](./hdrop) | [tdrop](https://github.com/noctuid/tdrop) for Hyprland | @Schweber |

# Installing

Expand All @@ -91,6 +22,7 @@ Clone the repo, cd to your desired tool, run `make` to build. To install, run
## Nix

In your configuration flake, add

```nix
{
inputs.hyprland-contrib = {
Expand All @@ -103,6 +35,7 @@ In your configuration flake, add
```

To make `inputs` available in your configurations, add this

```nix
# for Home Manager
homeConfigurations.YOURCONFIG = inputs.home-manager.lib.homeManagerConfiguration {
Expand All @@ -123,6 +56,7 @@ nixosConfigurations.YOURHOSTNAME = inputs.nixpkgs.nixosSystem {

For the final step, add packages to your `environment.systemPackages` or
`home.packages` in this format:

```nix
{pkgs, inputs, ...}: {
environment.systemPackages = [ # or home.packages
Expand All @@ -135,8 +69,7 @@ For the final step, add packages to your `environment.systemPackages` or

Contributions are welcome! Please open a PR with your utility and describe how
it helps the Hypr ecosystem. Also provide a screen recording if possible,
demonstrating its usage.
While developing bash scripts, it is recommended to use `shellcheck` for
idiomatic ways to write them.
If your utility is written in bash, please add it to the
demonstrating its usage. While developing bash scripts, it is recommended to use
`shellcheck` for idiomatic ways to write them. If your utility is written in
bash, please add it to the
[checks matrix](https://github.com/hyprwm/contrib/blob/main/.github/workflows/check.yml).
6 changes: 6 additions & 0 deletions grimblast/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Grimblast

A Hyprland version of Grimshot.

Install by running the Makefile or just copying the `grimblast` script in your
`~/.bin`.
35 changes: 35 additions & 0 deletions hdrop/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# hdrop

This script emulates the main features of
[tdrop](https://github.com/noctuid/tdrop) in Hyprland:

- if the specified program is not running: launch it and bring it to the
foreground.
- if the specified program is already running on another workspace: bring it to
the current workspace and focus it.
- if the specified program is already on the current workspace: move it to
workspace 'special:hdrop', thereby hiding it until called up again by hdrop.

#### Usage:

> hdrop [OPTIONS] [COMMAND]
#### Arguments:

> [COMMAND]\
> The usual command you would run to start the desired program
#### Options:

> -b, --background\
> changes the default behaviour: if the specified program is not running, launch
> it in the background instead of foreground. Thereafter 'hdrop -b' will work
> the same as without this flag.
>
> -h, --help\
> Print this help message
>
> -V, --version\
> Print version
See man page for further information.
18 changes: 18 additions & 0 deletions scratchpad/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Scratchpad

A Bash script that instantly sends focused window to a special workspace named
`scratchpad` and makes it easier to retrieve the window back to the current
workspace.

Install by running the Makefile `sudo make install` Uninstall by running the
Makefile `sudo make uninstall`

Usage:

To send the window to scratchpad

> bind = SUPER, s, exec, scratchpad
To get back the window >bind = SUPERSHIFT, s, exec, scratchpad -g

use `-h` flag to get help.
7 changes: 7 additions & 0 deletions shellevents/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# shellevents

Invoke shell functions in response to Hyprland socket2 events. Install with
`make install`.

See `shellevents_default.sh` for the supported function names. Example event
files can be found in `submaps.sh` and `notifywindow.sh`.
16 changes: 16 additions & 0 deletions try_swap_workspace/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# try_swap_workspace

Inspired from
[this discussion on the hyprland repository](https://github.com/hyprwm/Hyprland/discussions/835)
try_swap_workspace is a binding to mimic the 'arbitrary workspace on arbitrary
monitor' behavior known from may window managers. This means:

- if a workspace is not displayed on any monitor and should be displayed, it
gets displayed on the currently focused monitor
- if a workspace is already displayed on another monitor and should displayed on
the currently focused monitor, the displayed workspace on the focused monitor
will be swapped with the workspace on the monitor that should be displayed on
the focused monitor

Install by running the Makefile `sudo make install` Uninstall by running the
Makefile `sudo make uninstall`

0 comments on commit f8d6aba

Please sign in to comment.