Skip to content

Commit

Permalink
Add note to docs about cfg(rofi_next)
Browse files Browse the repository at this point in the history
  • Loading branch information
SabrinaJewson committed Oct 31, 2023
1 parent 82ece11 commit 5df9011
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ You can then run your mode from Rofi's command line:
rofi -modi an-example-mode -show an-example-mode
```

Build with `RUSTFLAGS="--cfg rofi_next"` to support unreleased Rofi versions,
and drop support for released Rofi versions.
This will turn on semver-exempt features, so use with caution.

## Examples

- See [examples/basic] for a basic example of a non-trivial Rofi mode,
Expand Down
4 changes: 3 additions & 1 deletion examples/basic/run.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/bin/sh
set -eu

ROFI_PREFIX="${ROFI_PREFIX:-}"

cd "$(dirname "$0")"
cargo build
cd ../..

# DEBUGGER can be e.g. "gdb --args"
ROFI_PLUGIN_PATH=target/debug ${DEBUGGER:-} rofi \
ROFI_PLUGIN_PATH=target/debug ${DEBUGGER:-} "$ROFI_PREFIX"/bin/rofi \
-modi run,plugin-example-basic \
-show plugin-example-basic \
"$@"
4 changes: 3 additions & 1 deletion examples/file-browser/run.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/bin/sh
set -eu

ROFI_PREFIX="${ROFI_PREFIX:-}"

cd "$(dirname "$0")"
cargo build
cd ../..

# DEBUGGER can be e.g. "gdb --args"
ROFI_PLUGIN_PATH=target/debug ${DEBUGGER:-} rofi \
ROFI_PLUGIN_PATH=target/debug ${DEBUGGER:-} "$ROFI_PREFIX"/bin/rofi \
-modi plugin-example-file-browser \
-show plugin-example-file-browser \
"$@"
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
//! rofi -modi an-example-mode -show an-example-mode
//! ```
//!
//! Build with `RUSTFLAGS="--cfg rofi_next"` to support unreleased Rofi versions,
//! and drop support for released Rofi versions.
//! This will turn on semver-exempt features, so use with caution.
//!
//! # Examples
//!
//! - See [examples/basic] for a basic example of a non-trivial Rofi mode,
Expand Down

0 comments on commit 5df9011

Please sign in to comment.