Release v0.9.0

timeout_old
Tassilo Horn 3 years ago
parent 64052993d4
commit fb515c2af1
  1. 10
      Cargo.lock
  2. 2
      Cargo.toml
  3. 24
      README.md
  4. 26
      src/config.rs

10
Cargo.lock generated

@ -150,9 +150,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libc"
version = "0.2.106"
version = "0.2.107"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a60553f9a9e039a333b4e9b20573b9e9b9c0bb3a11e201ccc48ef4283456d673"
checksum = "fbe5e23404da5b4f555ef85ebed98fb4083e55a00c317800bc2a50ede9f3d219"
[[package]]
name = "memchr"
@ -321,9 +321,9 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.68"
version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8"
checksum = "e466864e431129c7e0d3476b92f20458e5879919a0596c6472738d9fa2d342f8"
dependencies = [
"itoa",
"ryu",
@ -360,7 +360,7 @@ dependencies = [
[[package]]
name = "swayr"
version = "0.9.0-beta.4"
version = "0.9.0"
dependencies = [
"clap",
"directories",

@ -1,6 +1,6 @@
[package]
name = "swayr"
version = "0.9.0-beta.4"
version = "0.9.0"
description = "A LRU window-switcher (and more) for the sway window manager"
homepage = "https://sr.ht/~tsdh/swayr/"
repository = "https://git.sr.ht/~tsdh/swayr"

@ -45,7 +45,8 @@ Right now, there are these subcommands:
`prev-window` otherwise.
* `execute-swaymsg-command` displays most swaymsg which don't require
additional input and executes the selected one. That's handy especially for
less often used commands not bound to a key.
less often used commands not bound to a key. Non-matching input will be
executed executed as-is with `swaymsg`.
* `execute-swayr-command` displays all commands above and executes the selected
one. (This is useful for accessing swayr commands which are not bound to a
key.)
@ -72,6 +73,27 @@ Right now, there are these subcommands:
between a tabbed and tiled layout, i.e., it calls `shuffle-tile-workspace` if
it is currently tabbed, and calls `shuffle-tile-workspace` if it is currently
tiled.
* `move-focused-to-workspace` moves the currently focused window or container
to another workspace selected with the menu program. Non-matching input of
the form `#w:<workspace>` where the hash and `w:` shortcut are optional can
be used to move it to a new workspace.
### Menu shortcuts for non-matching input
All menu switching commands (`switch-window`, `switch-workspace`, and
`switch-workspace-or-window`) now handle non-matching input instead of doing
nothing. The input should start with any number of `#` (in order to be able to
force a non-match), a shortcut followed by a colon, and some string as required
by the shortcut. The following shortcuts are supported.
- `w:<workspace>`: Switches to a possibly non-existing workspace.
`<workspace>` must be a digit, a name, or `<digit>:<name>`. The
`<digit>:<name>` format is explained in `man 5 sway`. If that format is
given, `swayr` will create the workspace using `workspace number
<digit>:<name>`. If just a digit or name is given, the `number` argument is
not used.
- `s:<cmd>`: Executes the sway command `<cmd>` using `swaymsg`.
- Any other input is assumed to be a workspace name and thus handled as
`w:<input>` would do.
## Screenshots

@ -79,13 +79,13 @@ impl Config {
.expect("No format.workspace_format defined.")
}
pub fn get_format_container_format(&self) -> String {
self.format
.as_ref()
.and_then(|f| f.container_format.clone())
.or_else(|| Format::default().container_format)
.expect("No format.container_format defined.")
}
// pub fn get_format_container_format(&self) -> String {
// self.format
// .as_ref()
// .and_then(|f| f.container_format.clone())
// .or_else(|| Format::default().container_format)
// .expect("No format.container_format defined.")
// }
pub fn get_format_urgency_start(&self) -> String {
self.format
@ -155,7 +155,7 @@ pub struct Menu {
pub struct Format {
window_format: Option<String>,
workspace_format: Option<String>,
container_format: Option<String>,
//container_format: Option<String>,
urgency_start: Option<String>,
urgency_end: Option<String>,
html_escape: Option<bool>,
@ -216,11 +216,11 @@ impl Default for Format {
<span alpha=\"20000\">({id})</span>"
.to_string(),
),
container_format: Some(
"<i>Container {name}</i> \
<span alpha=\"20000\">({id})</span>"
.to_string(),
),
// container_format: Some(
// "<i>Container {name}</i> \
// <span alpha=\"20000\">({id})</span>"
// .to_string(),
// ),
html_escape: Some(true),
urgency_start: Some(
"<span background=\"darkred\" foreground=\"yellow\">"

Loading…
Cancel
Save