From f8d6aba0f2d3a073d19666c86b9ee157cdcae0df Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Sat, 9 Dec 2023 13:32:09 +0200 Subject: [PATCH] README: split for each tool README: add table with tools, descriptions and maintainers --- README.md | 93 +++++------------------------------- grimblast/README.md | 6 +++ hdrop/README.md | 35 ++++++++++++++ scratchpad/README.md | 18 +++++++ shellevents/README.md | 7 +++ try_swap_workspace/README.md | 16 +++++++ 6 files changed, 95 insertions(+), 80 deletions(-) create mode 100644 grimblast/README.md create mode 100644 hdrop/README.md create mode 100644 scratchpad/README.md create mode 100644 shellevents/README.md create mode 100644 try_swap_workspace/README.md diff --git a/README.md b/README.md index 38d5093..ab389d1 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/grimblast/README.md b/grimblast/README.md new file mode 100644 index 0000000..0abd039 --- /dev/null +++ b/grimblast/README.md @@ -0,0 +1,6 @@ +# Grimblast + +A Hyprland version of Grimshot. + +Install by running the Makefile or just copying the `grimblast` script in your +`~/.bin`. diff --git a/hdrop/README.md b/hdrop/README.md new file mode 100644 index 0000000..a32fa0b --- /dev/null +++ b/hdrop/README.md @@ -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. diff --git a/scratchpad/README.md b/scratchpad/README.md new file mode 100644 index 0000000..af71de9 --- /dev/null +++ b/scratchpad/README.md @@ -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. diff --git a/shellevents/README.md b/shellevents/README.md new file mode 100644 index 0000000..3549901 --- /dev/null +++ b/shellevents/README.md @@ -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`. diff --git a/try_swap_workspace/README.md b/try_swap_workspace/README.md new file mode 100644 index 0000000..5ab9ac8 --- /dev/null +++ b/try_swap_workspace/README.md @@ -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`