Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 46 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ strip = true
argh = "0.1"
anyhow = "1.0"
miniserde = "0.1"
regex = "1"
42 changes: 40 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,54 @@ it will launch new window.

```
$ raise
Usage: raise -c <class> -e <launch>
Usage: raise [-c <class>] [--tag <tag>] [--xdgtag <tag>] -e <launch> [-m <field[:method]=pattern>...]

Raise window if it exists, otherwise launch new window.

Options:
-c, --class class to focus
-c, --class class to focus (shorthand for `--match class=...`)
--tag window tag to match (repeatable; shorthand for `--match tag=...`)
--xdgtag XDG surface tag to match (repeatable; shorthand for `--match xdgtag=...`)
-e, --launch command to launch
-m, --match additional matcher in the form field[:method]=pattern
--help display usage information
```

### Matching

The `--match` flag allows choosing how a window should be selected. Each
matcher uses the format `field[:method]=pattern` and multiple matchers can be
combined; they all have to match for a window to qualify.

Supported fields:
- `class` — current window class reported by Hyprland
- `initial-class` — class when the window was first created
- `title` — current window title
- `initial-title` — original title assigned on window creation
- `tag` — window tag assigned via dynamic tags
- `xdgtag` — XDG surface tag (`xdgTag` in `hyprctl clients`)

Aliases: you can also use the short forms `c`, `initialClass`, `initialTitle`, and `xdg-tag`.

Supported methods (default is `equals`):
- `equals` / `eq`
- `contains` / `substr`
- `prefix` / `starts-with`
- `suffix` / `ends-with`
- `regex` / `re`

Examples:

```
raise --launch firefox --match class=firefox
raise --launch alacritty --match title:contains=notes
raise --launch slack --match class=Slack --match title:regex="(?i)daily"
# Shorthands for tags:
raise --launch floorp --tag web
raise --launch mpv --tag vid
raise --launch obsidian --tag notes
```

## Install `raise`

There are multiple ways to install this:
Expand Down
58 changes: 49 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading