improve doc
This commit is contained in:
parent
0ca65cae81
commit
cde9951101
7 changed files with 94 additions and 80 deletions
90
README.md
90
README.md
|
@ -3,8 +3,22 @@
|
|||
Worf is yet another style launcher, heavily inspired by wofi, rofi and walker.
|
||||
Worf is written in Rust on top of GTK4.
|
||||
|
||||
It aims to be a drop in replacement for wofi in most part, so it is (almost) compatible with its
|
||||
configuration and css files. See below for differences
|
||||
It started out as a drop in replacement for wofi, so styles and config in most part (should) be compatible,
|
||||
with a few exception documented below.
|
||||
Worf has more features than wofi though, so there won't be 100% compatibility.
|
||||
|
||||
It supports various modes:
|
||||
* Math
|
||||
* DRun
|
||||
* File
|
||||
* Ssh
|
||||
* // WebSearch
|
||||
* // Emoji
|
||||
* // Run
|
||||
* Auto
|
||||
|
||||
Auto mode tries to detect the desired mode automatically, i.e. `ssh`, `?` (for web search), `emoji`, `/` or `~` (for file).
|
||||
|
||||
|
||||
## Not finished
|
||||
* [ ] run
|
||||
|
@ -15,37 +29,6 @@ configuration and css files. See below for differences
|
|||
* [ ] publish library
|
||||
|
||||
|
||||
## Showcases
|
||||
|
||||
You will find all showcases in the styles folder with a corresponding subfolder.
|
||||
|
||||
### Compact
|
||||
|
||||
Please note that the car in the background is just my wallpaper at the time and this project is not endorsed or affiliated with my employer.
|
||||
|
||||

|
||||
|
||||
### Fullscreen / Launcher
|
||||
|
||||
Only difference is that one is fullscreen the other is not
|
||||
|
||||

|
||||
|
||||
### Relaxed
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
## Setup
|
||||
|
||||
### Hyprland
|
||||
|
||||
Allow blur for Worf
|
||||
```
|
||||
layerrule = blur, worf
|
||||
```
|
||||
|
||||
## Additional functionality compared to Wofi
|
||||
* Support passing 'hidden' parameters that are not visible in the launcher but will be returned to the application
|
||||
* Window switcher for hyprland
|
||||
|
@ -57,25 +40,56 @@ layerrule = blur, worf
|
|||
* configurable animation time
|
||||
|
||||
### New Styling options
|
||||
* `label`: Allows styling the label
|
||||
* `row`: Allows styling to row, mainly used to disable hover effects
|
||||
|
||||
## Styling
|
||||
|
||||
Styling names and classes are inspired by wofi, so most of the documentation and styling is the same
|
||||
|
||||
### Selectors
|
||||
|
||||
|name|description|
|
||||
window|Entire main window|
|
||||
|outer-box|A box that everything else sits inside of|
|
||||
|input|Text box for filtering items|
|
||||
|scroll|Scroll window containing inner-box|
|
||||
|inner-box|Box containing the menu entries|
|
||||
|entry|Box containing the text and optionally the image of an entry|
|
||||
|text|Name of the program/option inserted|
|
||||
|img|Images displayed in entries|
|
||||
|row|The row containing the entry, i.e. used to control hover effects|
|
||||
|
||||
Checkout more showcases in the styles directory of this repo.
|
||||
|
||||

|
||||
|
||||
|
||||
## Setup
|
||||
|
||||
### Hyprland
|
||||
|
||||
Allow blur for Worf
|
||||
```
|
||||
layerrule = blur, worf
|
||||
```
|
||||
|
||||
|
||||
## Library
|
||||
|
||||
The launcher and UI can be used to build any launcher, as the ui, config and run logic is available as a separate crate.
|
||||
This library is not available publicly yet as the interface is not stable enough.
|
||||
|
||||
## Wofi compatibility
|
||||
|
||||
## Breaking changes to Wofi
|
||||
### Breaking changes
|
||||
* Runtime behaviour is not guaranteed to be the same and won't ever be, this includes error messages and themes.
|
||||
* Themes in general are mostly compatible. Worf is using the same entity ids,
|
||||
because worf is build on GTK4 instead of GTK3 there will be differences in the look and feel.
|
||||
* Configuration files are not 100% compatible, Worf is using toml files instead, for most part this only means strings have to be quoted
|
||||
* Color files are not supported
|
||||
* `line_wrap` is now called `line-wrap`
|
||||
* Wofi has a C-API, that is not and won't be supported.
|
||||
* Wofi has a C-API, that is not and won't be supported, but Worf can be used as a rust library.
|
||||
|
||||
## Dropped arguments
|
||||
### Dropped arguments
|
||||
* `mode`, use show
|
||||
* `dmenu`, use show
|
||||
* `D`, arguments are the same as config in worf, no need to have this flag.
|
||||
|
|
|
@ -174,10 +174,10 @@ pub struct Config {
|
|||
prompt: Option<String>,
|
||||
|
||||
#[clap(short = 'x', long = "xoffset")]
|
||||
xoffset: Option<i32>,
|
||||
xoffset: Option<i32>, // todo support this
|
||||
|
||||
#[clap(short = 'y', long = "yoffset")]
|
||||
yoffset: Option<i32>,
|
||||
yoffset: Option<i32>, // todo support this
|
||||
|
||||
/// If true a normal window instead of a layer shell will be used
|
||||
#[clap(short = 'n', long = "normal-window")]
|
||||
|
@ -188,10 +188,10 @@ pub struct Config {
|
|||
allow_images: Option<bool>,
|
||||
|
||||
#[clap(short = 'm', long = "allow-markup")]
|
||||
allow_markup: Option<bool>,
|
||||
allow_markup: Option<bool>, // todo support this
|
||||
|
||||
#[clap(short = 'k', long = "cache-file")]
|
||||
cache_file: Option<String>,
|
||||
cache_file: Option<String>, // todo support this
|
||||
|
||||
/// Defines which terminal to use. defaults to the first one found:
|
||||
/// * kitty
|
||||
|
@ -209,10 +209,10 @@ pub struct Config {
|
|||
term: Option<String>,
|
||||
|
||||
#[clap(short = 'P', long = "password")]
|
||||
password: Option<String>,
|
||||
password: Option<String>, // todo support this
|
||||
|
||||
#[clap(short = 'e', long = "exec-search")]
|
||||
exec_search: Option<bool>,
|
||||
exec_search: Option<bool>, // todo support this
|
||||
|
||||
/// Defines whether the scrollbar is visible
|
||||
#[clap(short = 'b', long = "hide-scroll")]
|
||||
|
@ -223,10 +223,10 @@ pub struct Config {
|
|||
matching: Option<MatchMethod>,
|
||||
|
||||
#[clap(short = 'i', long = "insensitive")]
|
||||
insensitive: Option<bool>,
|
||||
insensitive: Option<bool>, // todo support this
|
||||
|
||||
#[clap(short = 'q', long = "parse-search")]
|
||||
parse_search: Option<bool>,
|
||||
parse_search: Option<bool>, // todo support this
|
||||
|
||||
/// set where the window is displayed.
|
||||
/// can be used to anchor a window to an edge by
|
||||
|
@ -236,28 +236,28 @@ pub struct Config {
|
|||
location: Option<Vec<Anchor>>,
|
||||
|
||||
#[clap(short = 'a', long = "no-actions")]
|
||||
no_actions: Option<bool>,
|
||||
no_actions: Option<bool>, // todo support this
|
||||
|
||||
#[clap(short = 'L', long = "lines")]
|
||||
lines: Option<u32>,
|
||||
lines: Option<u32>, // todo support this
|
||||
|
||||
#[clap(short = 'w', long = "columns")]
|
||||
columns: Option<u32>,
|
||||
|
||||
#[clap(short = 'O', long = "sort-order")]
|
||||
#[clap(short = 'O', long = "sort-order")] // todo support this
|
||||
sort_order: Option<String>,
|
||||
|
||||
#[clap(short = 'G', long = "gtk-dark")]
|
||||
gtk_dark: Option<bool>,
|
||||
gtk_dark: Option<bool>, // todo support this
|
||||
|
||||
#[clap(short = 'Q', long = "search")]
|
||||
search: Option<String>,
|
||||
search: Option<String>, // todo support this
|
||||
|
||||
#[clap(short = 'o', long = "monitor")]
|
||||
monitor: Option<String>,
|
||||
monitor: Option<String>, // todo support this
|
||||
|
||||
#[clap(short = 'r', long = "pre-display-cmd")]
|
||||
pre_display_cmd: Option<String>,
|
||||
pre_display_cmd: Option<String>, // todo support this
|
||||
|
||||
#[clap(long = "orientation")]
|
||||
orientation: Option<Orientation>,
|
||||
|
@ -274,36 +274,36 @@ pub struct Config {
|
|||
#[clap(long = "valign")]
|
||||
valign: Option<Align>,
|
||||
|
||||
filter_rate: Option<u32>,
|
||||
filter_rate: Option<u32>, // todo support this
|
||||
|
||||
/// Defines the image size in pixels
|
||||
#[clap(long = "image-size")]
|
||||
image_size: Option<i32>,
|
||||
|
||||
key_up: Option<String>,
|
||||
key_down: Option<String>,
|
||||
key_left: Option<String>,
|
||||
key_right: Option<String>,
|
||||
key_forward: Option<String>,
|
||||
key_backward: Option<String>,
|
||||
key_submit: Option<String>,
|
||||
key_exit: Option<String>,
|
||||
key_pgup: Option<String>,
|
||||
key_pgdn: Option<String>,
|
||||
key_expand: Option<String>,
|
||||
key_hide_search: Option<String>,
|
||||
key_copy: Option<String>,
|
||||
key_up: Option<String>, // todo support this
|
||||
key_down: Option<String>, // todo support this
|
||||
key_left: Option<String>, // todo support this
|
||||
key_right: Option<String>, // todo support this
|
||||
key_forward: Option<String>, // todo support this
|
||||
key_backward: Option<String>, // todo support this
|
||||
key_submit: Option<String>, // todo support this
|
||||
key_exit: Option<String>, // todo support this
|
||||
key_pgup: Option<String>, // todo support this
|
||||
key_pgdn: Option<String>, // todo support this
|
||||
key_expand: Option<String>, // todo support this
|
||||
key_hide_search: Option<String>, // todo support this
|
||||
key_copy: Option<String>, // todo support this
|
||||
|
||||
// todo re-add this
|
||||
// #[serde(flatten)]
|
||||
// key_custom: Option<HashMap<String, String>>,
|
||||
global_coords: Option<bool>,
|
||||
hide_search: Option<bool>,
|
||||
dynamic_lines: Option<bool>,
|
||||
layer: Option<String>,
|
||||
copy_exec: Option<String>,
|
||||
single_click: Option<bool>,
|
||||
pre_display_exec: Option<bool>,
|
||||
global_coords: Option<bool>, // todo support this
|
||||
hide_search: Option<bool>, // todo support this
|
||||
dynamic_lines: Option<bool>,// todo support this
|
||||
layer: Option<String>, // todo support this
|
||||
copy_exec: Option<String>,// todo support this
|
||||
single_click: Option<bool>,// todo support this
|
||||
pre_display_exec: Option<bool>,// todo support this
|
||||
|
||||
/// Minimum score for a fuzzy search to be shown
|
||||
#[clap(long = "fuzzy-min-score")]
|
||||
|
|
|
@ -787,7 +787,7 @@ fn create_menu_row<T: Clone + 'static>(
|
|||
|
||||
label.set_natural_wrap_mode(meta.config.line_wrap().into());
|
||||
label.set_hexpand(true);
|
||||
label.set_widget_name("label");
|
||||
label.set_widget_name("text");
|
||||
label.set_wrap(true);
|
||||
row_box.append(&label);
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
outline: inherit;
|
||||
}
|
||||
|
||||
#label {
|
||||
#text {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
outline: inherit;
|
||||
}
|
||||
|
||||
#label {
|
||||
#text {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
outline: inherit;
|
||||
}
|
||||
|
||||
#label {
|
||||
#text {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
outline: inherit;
|
||||
}
|
||||
|
||||
#label {
|
||||
#text {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue