Made default config more spatious and added comments, made README reference the default config
This commit is contained in:
40
README.md
40
README.md
@@ -47,26 +47,7 @@ cargo build --release # Build all the packages
|
|||||||
cargo install --path anyrun/ # Install the anyrun binary
|
cargo install --path anyrun/ # Install the anyrun binary
|
||||||
mkdir -p ~/.config/anyrun/plugins # Create the config directory and the plugins subdirectory
|
mkdir -p ~/.config/anyrun/plugins # Create the config directory and the plugins subdirectory
|
||||||
cp target/release/*.so ~/.config/anyrun/plugins # Copy all of the built plugins to the correct directory
|
cp target/release/*.so ~/.config/anyrun/plugins # Copy all of the built plugins to the correct directory
|
||||||
```
|
cp examples/config.ron ~/.config/anyrun/config.ron # Copy the default config file
|
||||||
|
|
||||||
After that you need to create the configuration file and place it in `~/.config/anyrun/config.ron`. A config file with all of the included plugins is as follows:
|
|
||||||
|
|
||||||
```ron
|
|
||||||
Config(
|
|
||||||
width: Absolute(800),
|
|
||||||
position: Top,
|
|
||||||
vertical_offset: Absolute(0), // How much the runner is shifted vertically
|
|
||||||
hide_icons: false,
|
|
||||||
ignore_exclusive_zones: false, // ignore exclusive zones, f.e. Waybar
|
|
||||||
layer: Overlay, // GTK Layer: Bottom, Top, Background, Overlay
|
|
||||||
hide_plugin_info: false,
|
|
||||||
plugins: [
|
|
||||||
"libapplications.so",
|
|
||||||
"libsymbols.so",
|
|
||||||
"libshell.so",
|
|
||||||
"libtranslate.so",
|
|
||||||
],
|
|
||||||
)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Plugins
|
## Plugins
|
||||||
@@ -99,24 +80,7 @@ The default configuration directory is `$HOME/.config/anyrun` the structure of t
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The config file has the following structure, and as seen in the name uses the `ron` language:
|
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.
|
||||||
|
|
||||||
```ron
|
|
||||||
Config(
|
|
||||||
width: Absolute(800), // The width of the window
|
|
||||||
position: Top,
|
|
||||||
vertical_offset: Absolute(0), // How much the runner is shifted vertically
|
|
||||||
hide_icons: false,
|
|
||||||
ignore_exclusive_zones: false, // ignore exclusive zones, f.e. Waybar
|
|
||||||
layer: Overlay, // GTK Layer: Bottom, Top, Background, Overlay
|
|
||||||
hide_plugin_info: false,
|
|
||||||
plugins: [
|
|
||||||
"libapplications.so", // Relative paths are looked up in the <config dir>/plugins/ directory
|
|
||||||
"/home/kirottu/Projects/anyrun/target/debug/libsymbols.so", // Absolute paths are well, asbolute and loaded as is. Useful for development.
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
## Styling
|
## Styling
|
||||||
|
|
||||||
|
@@ -1,11 +1,31 @@
|
|||||||
Config(
|
Config(
|
||||||
|
// `width` and `vertical_offset` use an enum for the value it can be either:
|
||||||
|
// Absolute(n): The absolute value in pixels
|
||||||
|
// Fraction(n): A fraction of the width or height of the full screen (depends on exclusive zones and the settings related to them) window respectively
|
||||||
|
|
||||||
|
// How wide the input box and results are.
|
||||||
width: Absolute(800),
|
width: Absolute(800),
|
||||||
|
|
||||||
|
// Where Anyrun is located on the screen: Top, Center
|
||||||
position: Top,
|
position: Top,
|
||||||
vertical_offset: Absolute(0), // How much the runner is shifted vertically
|
|
||||||
|
// How much the runner is shifted vertically
|
||||||
|
vertical_offset: Absolute(0),
|
||||||
|
|
||||||
|
// Hide match and plugin info icons
|
||||||
hide_icons: false,
|
hide_icons: false,
|
||||||
ignore_exclusive_zones: false, // ignore exclusive zones, f.e. Waybar
|
|
||||||
layer: Overlay, // GTK Layer: Bottom, Top, Background, Overlay
|
// ignore exclusive zones, f.e. Waybar
|
||||||
|
ignore_exclusive_zones: false,
|
||||||
|
|
||||||
|
// Layer shell layer: Background, Bottom, Top, Overlay
|
||||||
|
layer: Overlay,
|
||||||
|
|
||||||
|
// Hide the plugin info panel
|
||||||
hide_plugin_info: false,
|
hide_plugin_info: false,
|
||||||
|
|
||||||
|
// List of plugins to be loaded by default, can be specified with a relative path to be loaded from the
|
||||||
|
// `<anyrun config dir>/plugins` directory or with an absolute path to just load the file the path points to.
|
||||||
plugins: [
|
plugins: [
|
||||||
"libapplications.so",
|
"libapplications.so",
|
||||||
"libsymbols.so",
|
"libsymbols.so",
|
||||||
|
Reference in New Issue
Block a user