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
106 changes: 82 additions & 24 deletions Cargo.lock

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

24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ A wayland native krunner-like runner, made with customizability in mind.
documentation of the [anyrun-plugin](anyrun-plugin) crate.
- Responsive
- Asynchronous running of plugin functions
- State persistence
- Optional saving and restoring of input text between sessions
- Automatically clears state when selecting a match
- Can be configured to automatically discard state after a certain time
- Wayland native
- GTK layer shell for overlaying the window
- data-control for managing the clipboard
Expand Down Expand Up @@ -117,6 +121,8 @@ You may use it in your system like this:
hidePluginInfo = false;
closeOnClick = false;
showResultsImmediately = false;
persistState = false;
stateTtlSecs = null;
maxEntries = null;

plugins = [
Expand Down Expand Up @@ -220,7 +226,7 @@ list of plugins in this repository is as follows:

## Configuration

The default configuration directory is `$HOME/.config/anyrun` the structure of
The default configuration directory in the config dir (`$XDG_CONFIG_HOME/anyrun` or `$HOME/.config/anyrun`), the structure of
the config directory is as follows and should be respected by plugins:

```
Expand All @@ -236,6 +242,22 @@ The [default config file](examples/config.ron) contains the default values, and
annotates all configuration options with comments on what they are and how to
use them.

### State Saving

When `persist_state` is set to `true` in the config, Anyrun will:
- Save the input text to a state file (`$XDG_STATE_HOME/anyrun` or `$HOME/.local/state/anyrun`), when the window is closed
- Restore this text when Anyrun is launched again
- Clear the saved state when a match is selected or copied

You can optionally set `state_ttl_secs` to automatically discard saved state after a certain time. For example:
```ron
// Enable state persistence with 2-minute TTL
persist_state: true,
state_ttl_secs: Some(120)
```

This is useful for preserving your input between sessions, especially for longer queries or calculations.

## Styling

Anyrun supports [GTK+ CSS](https://docs.gtk.org/gtk3/css-overview.html) styling.
Expand Down
2 changes: 2 additions & 0 deletions anyrun/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ serde = { version = "1.0.210", features = ["derive"] }
anyrun-interface = { path = "../anyrun-interface" }
wl-clipboard-rs = "0.9.1"
nix = { version = "0.29", default-features = false, features = ["process"] }
signal-hook = "0.3.17"
clap = { version = "4.2.7", features = ["derive"] }
chrono = { version = "0.4.38", default-features = false, features = ["clock"] }
dirs = "5.0.1"
Loading