README: split for each tool

README: add table with tools, descriptions and maintainers
This commit is contained in:
Mihai Fufezan 2023-12-09 13:32:09 +02:00
parent 65e567a811
commit 29d6c2a537
No known key found for this signature in database
6 changed files with 96 additions and 80 deletions

View file

@ -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
@ -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 = {
@ -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 {
@ -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
@ -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
grimblast/README.md Normal file
View file

@ -0,0 +1,6 @@
# Grimblast
A Hyprland version of Grimshot.
Install by running the Makefile or just copying the `grimblast` script in your
`~/.bin`.

37
hdrop/README.md Normal file
View file

@ -0,0 +1,37 @@
# 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:
```console
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.

21
scratchpad/README.md Normal file
View file

@ -0,0 +1,21 @@
# 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.
Usage:
To send the window to scratchpad
```ini
bind = SUPER, s, exec, scratchpad
```
To get back the window
```ini
bind = SUPERSHIFT, s, exec, scratchpad -g
```
use `-h` flag to get help.

6
shellevents/README.md Normal file
View file

@ -0,0 +1,6 @@
# shellevents
Invoke shell functions in response to Hyprland socket2 events.
See `shellevents_default.sh` for the supported function names. Example event
files can be found in `submaps.sh` and `notifywindow.sh`.

View file

@ -0,0 +1,13 @@
# 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