~markstos


#45 Support "index mode" for more beautiful menus 6 days ago

Comment by ~markstos on ~tsdh/swayr

Tested to work now. Thanks!

#45 Support "index mode" for more beautiful menus 6 days ago

Comment by ~markstos on ~tsdh/swayr

I have tested this, and can't confirm that it is working as intended. I used this window format and then tried the window switcher:

window_format = "{app_name:{:<11.11}} “{title:{:<60.60}...}” on {workspace_name:{:<13.13}}\u0000icon\u001f{app_icon}"

I then carefully made sure I was using the newly built binaries and restarted the swayrd service.

I launched two fish shells in terminals on the same workspace and confirmed that they had the same string displayed my picker, Fuzzel-- I expected one of the entries to have the unique string added to them, but neither one did.

#45 Support "index mode" for more beautiful menus 6 days ago

Comment by ~markstos on ~tsdh/swayr

Thanks for the reply.

Your suggestion to include an ID only when necessary to uniquely identify a window would also be welcome and would address the goal in most cases.

Good idea!

#45 Support "index mode" for more beautiful menus 7 days ago

Ticket created by ~markstos on ~tsdh/swayr

In pickers the window ID is only there for Swayr's benefit-- it is visual clutter for the user, but there's a way to remove it.

A number of pickers support an "index mode" that returns the index of the item selected rather than the text selected. The feature exists for tools like swayr to build more attractive menus. It would be used like this:

  1. Swayr's config is set to use index mode
  2. Swayr holds an array in memory of all the window IDS.
  3. Swayr sends the list of lines to display to the picker in index mode without displaying the window ID.
  4. The picker sends back the index of the line selected (0-indexed).
  5. Swayr uses the index to lookup the window ID in the in-memory array.

Here's the syntax to use the feature in some common pickers:

  • fuzzel --dmenu --index
  • rofi -dmenu -format i
  • dmenu --index

Bemenu and wofi don't seem to support this option.

The current behavior can remain as option for pickers without index mode.

#169 prompt text not shown without selection options 6 months ago

Comment by ~markstos on ~scoopta/wofi

Fuzzel added this feature.

See an example here in the window anchoring section: https://mark.stosberg.com/fuzzel-1-10/

#79 wish: Document the default refresh rate used if one is not specified. 2 years ago

Ticket created by ~markstos on ~emersion/kanshi

#29 Small fix for Rofi icon docs 2 years ago

Ticket created by ~markstos on ~tsdh/swayr

There's a hint about Rofi icons:

"rofi supports icons with the syntax "\u0000icon\u00001f", so a suitable window_format with application icon should end with "\u0000icon\u001f".


There, conflicting escape codes are used (\u00001f the first time \u001f the second). Also, it's confusing to use when the actual syntax is {app_icon}. So the fixed hint is:

"rofi supports icons with the syntax "\u0000icon\u001f", so a suitable window_format with application icon should end with "\u0000icon\u001f{app_icon}".

Also, "fuzzel" now supports supports the same syntax in dmenu mode as well if you want to mention that.

#23 0.19.0 fails to build on Arch Linux 2 years ago

on ~tsdh/swayr

"~markstos" outgoing@sr.ht writes:

Hi!

This after attempting to install using the AUR:

==> Starting build()... Compiling proc-macro2 v1.0.39 ... Compiling swayr v0.19.0 (/home/mark/.cache/paru/clone/swayr/src/swayr-0.19.0) Finished release [optimized] target(s) in 27.31s

Ok, so the build succeeds.

==> Starting check()... Updating crates.io index Downloaded cfg-if v1.0.0 thread 'main' panicked at './.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-1.0.0/./.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-1.0.0/src/lib.rs is not absolute', src/tools/cargo/src/cargo/core/manifest.rs:252:9

So the check() function of the PKGBUILD fails. That's defined as (see [1]):

check() {
   cd $pkgname-$pkgver
   RUSTUP_TOOLCHAIN=stable HOME=. cargo test --release --locked --target-dir=target
}

The error message indicates that cargo wants absolute paths but by the virtue of the PKGBUILD setting HOME=. (i.e., a relative path specifying the current directory), it fails. You could try modifying the PKGBUILD and replace HOME=. with HOME=pwd which should probably have the same effect but specifies the current directory as absolute path.

In any case, that's a bug of the AUR package, not swayr itself. I don't maintain the AUR package myself. I'll report it there.

Bye, Tassilo

[1] https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=swayr

#23 0.19.0 fails to build on Arch Linux 2 years ago

Ticket created by ~markstos on ~tsdh/swayr

This after attempting to install using the AUR:

==> Starting build()...
   Compiling proc-macro2 v1.0.39
   Compiling unicode-ident v1.0.0
   Compiling syn v1.0.95
   Compiling libc v0.2.126
   Compiling version_check v0.9.4
   Compiling serde_derive v1.0.137
   Compiling cfg-if v1.0.0
   Compiling serde v1.0.137
   Compiling memchr v2.5.0
   Compiling serde_json v1.0.81
   Compiling autocfg v1.1.0
   Compiling ryu v1.0.10
   Compiling log v0.4.17
   Compiling itoa v1.0.2
   Compiling ppv-lite86 v0.2.16
   Compiling heck v0.4.0
   Compiling lazy_static v1.4.0
   Compiling termcolor v1.1.3
   Compiling hashbrown v0.11.2
   Compiling os_str_bytes v6.1.0
   Compiling regex-syntax v0.6.26
   Compiling textwrap v0.15.0
   Compiling bitflags v1.3.2
   Compiling strsim v0.10.0
   Compiling humantime v2.1.0
   Compiling once_cell v1.12.0
   Compiling proc-macro-error-attr v1.0.4
   Compiling proc-macro-error v1.0.4
   Compiling clap_lex v0.2.0
   Compiling indexmap v1.8.2
   Compiling aho-corasick v0.7.18
   Compiling quote v1.0.18
   Compiling getrandom v0.2.6
   Compiling atty v0.2.14
   Compiling dirs-sys v0.3.7
   Compiling rand_core v0.6.3
   Compiling env_logger v0.9.0
   Compiling directories v4.0.1
   Compiling rand_chacha v0.3.1
   Compiling regex v1.5.6
   Compiling rand v0.8.5
   Compiling rt-format v0.3.1
   Compiling thiserror-impl v1.0.31
   Compiling clap_derive v3.1.18
   Compiling thiserror v1.0.31
   Compiling clap v3.1.18
   Compiling toml v0.5.9
   Compiling swayipc-types v1.1.0
   Compiling swayipc v3.0.0
   Compiling swayr v0.19.0 (/home/mark/.cache/paru/clone/swayr/src/swayr-0.19.0)
    Finished release [optimized] target(s) in 27.31s
==> Starting check()...
    Updating crates.io index
  Downloaded cfg-if v1.0.0
thread 'main' panicked at '`./.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-1.0.0/./.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-1.0.0/src/lib.rs` is not absolute', src/tools/cargo/src/cargo/core/manifest.rs:252:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
==> ERROR: A failure occurred in check().
    Aborting...
error: failed to build 'swayr-0.19.0-1': 
error: packages failed to build: swayr-0.19.0-1
==> Starting build()...
   Compiling proc-macro2 v1.0.39
   Compiling unicode-ident v1.0.0
   Compiling syn v1.0.95
   Compiling libc v0.2.126
   Compiling version_check v0.9.4
   Compiling serde_derive v1.0.137
   Compiling cfg-if v1.0.0
   Compiling serde v1.0.137
   Compiling memchr v2.5.0
   Compiling serde_json v1.0.81
   Compiling autocfg v1.1.0
   Compiling ryu v1.0.10
   Compiling log v0.4.17
   Compiling itoa v1.0.2
   Compiling ppv-lite86 v0.2.16
   Compiling heck v0.4.0
   Compiling lazy_static v1.4.0
   Compiling termcolor v1.1.3
   Compiling hashbrown v0.11.2
   Compiling os_str_bytes v6.1.0
   Compiling regex-syntax v0.6.26
   Compiling textwrap v0.15.0
   Compiling bitflags v1.3.2
   Compiling strsim v0.10.0
   Compiling humantime v2.1.0
   Compiling once_cell v1.12.0
   Compiling proc-macro-error-attr v1.0.4
   Compiling proc-macro-error v1.0.4
   Compiling clap_lex v0.2.0
   Compiling indexmap v1.8.2
   Compiling aho-corasick v0.7.18
   Compiling quote v1.0.18
   Compiling getrandom v0.2.6
   Compiling atty v0.2.14
   Compiling dirs-sys v0.3.7
   Compiling rand_core v0.6.3
   Compiling env_logger v0.9.0
   Compiling directories v4.0.1
   Compiling rand_chacha v0.3.1
   Compiling regex v1.5.6
   Compiling rand v0.8.5
   Compiling rt-format v0.3.1
   Compiling thiserror-impl v1.0.31
   Compiling clap_derive v3.1.18
   Compiling thiserror v1.0.31
   Compiling clap v3.1.18
   Compiling toml v0.5.9
   Compiling swayipc-types v1.1.0
   Compiling swayipc v3.0.0
   Compiling swayr v0.19.0 (/home/mark/.cache/paru/clone/swayr/src/swayr-0.19.0)
    Finished release [optimized] target(s) in 27.31s
==> Starting check()...
    Updating crates.io index
  Downloaded cfg-if v1.0.0
thread 'main' panicked at '`./.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-1.0.0/./.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-1.0.0/src/lib.rs` is not absolute', src/tools/cargo/src/cargo/core/manifest.rs:252:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
==> ERROR: A failure occurred in check().
    Aborting...
error: failed to build 'swayr-0.19.0-1': 
error: packages failed to build: swayr-0.19.0-1==> Starting build()...
   Compiling proc-macro2 v1.0.39
   Compiling unicode-ident v1.0.0
   Compiling syn v1.0.95
   Compiling libc v0.2.126
   Compiling version_check v0.9.4
   Compiling serde_derive v1.0.137
   Compiling cfg-if v1.0.0
   Compiling serde v1.0.137
   Compiling memchr v2.5.0
   Compiling serde_json v1.0.81
   Compiling autocfg v1.1.0
   Compiling ryu v1.0.10
   Compiling log v0.4.17
   Compiling itoa v1.0.2
   Compiling ppv-lite86 v0.2.16
   Compiling heck v0.4.0
   Compiling lazy_static v1.4.0
   Compiling termcolor v1.1.3
   Compiling hashbrown v0.11.2
   Compiling os_str_bytes v6.1.0
   Compiling regex-syntax v0.6.26
   Compiling textwrap v0.15.0
   Compiling bitflags v1.3.2
   Compiling strsim v0.10.0
   Compiling humantime v2.1.0
   Compiling once_cell v1.12.0
   Compiling proc-macro-error-attr v1.0.4
   Compiling proc-macro-error v1.0.4
   Compiling clap_lex v0.2.0
   Compiling indexmap v1.8.2
   Compiling aho-corasick v0.7.18
   Compiling quote v1.0.18
   Compiling getrandom v0.2.6
   Compiling atty v0.2.14
   Compiling dirs-sys v0.3.7
   Compiling rand_core v0.6.3
   Compiling env_logger v0.9.0
   Compiling directories v4.0.1
   Compiling rand_chacha v0.3.1
   Compiling regex v1.5.6
   Compiling rand v0.8.5
   Compiling rt-format v0.3.1
   Compiling thiserror-impl v1.0.31
   Compiling clap_derive v3.1.18
   Compiling thiserror v1.0.31
   Compiling clap v3.1.18
   Compiling toml v0.5.9
   Compiling swayipc-types v1.1.0
   Compiling swayipc v3.0.0
   Compiling swayr v0.19.0 (/home/mark/.cache/paru/clone/swayr/src/swayr-0.19.0)
    Finished release [optimized] target(s) in 27.31s
==> Starting check()...
    Updating crates.io index
  Downloaded cfg-if v1.0.0
thread 'main' panicked at '`./.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-1.0.0/./.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-1.0.0/src/lib.rs` is not absolute', src/tools/cargo/src/cargo/core/manifest.rs:252:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
==> ERROR: A failure occurred in check().
    Aborting...
error: failed to build 'swayr-0.19.0-1': 
error: packages failed to build: swayr-0.19.0-1==> Starting build()...
   Compiling proc-macro2 v1.0.39
   Compiling unicode-ident v1.0.0
   Compiling syn v1.0.95
   Compiling libc v0.2.126
   Compiling version_check v0.9.4
   Compiling serde_derive v1.0.137
   Compiling cfg-if v1.0.0
   Compiling serde v1.0.137
   Compiling memchr v2.5.0
   Compiling serde_json v1.0.81
   Compiling autocfg v1.1.0
   Compiling ryu v1.0.10
   Compiling log v0.4.17
   Compiling itoa v1.0.2
   Compiling ppv-lite86 v0.2.16
   Compiling heck v0.4.0
   Compiling lazy_static v1.4.0
   Compiling termcolor v1.1.3
   Compiling hashbrown v0.11.2
   Compiling os_str_bytes v6.1.0
   Compiling regex-syntax v0.6.26
   Compiling textwrap v0.15.0
   Compiling bitflags v1.3.2
   Compiling strsim v0.10.0
   Compiling humantime v2.1.0
   Compiling once_cell v1.12.0
   Compiling proc-macro-error-attr v1.0.4
   Compiling proc-macro-error v1.0.4
   Compiling clap_lex v0.2.0
   Compiling indexmap v1.8.2
   Compiling aho-corasick v0.7.18
   Compiling quote v1.0.18
   Compiling getrandom v0.2.6
   Compiling atty v0.2.14
   Compiling dirs-sys v0.3.7
   Compiling rand_core v0.6.3
   Compiling env_logger v0.9.0
   Compiling directories v4.0.1
   Compiling rand_chacha v0.3.1
   Compiling regex v1.5.6
   Compiling rand v0.8.5
   Compiling rt-format v0.3.1
   Compiling thiserror-impl v1.0.31
   Compiling clap_derive v3.1.18
   Compiling thiserror v1.0.31
   Compiling clap v3.1.18
   Compiling toml v0.5.9
   Compiling swayipc-types v1.1.0
   Compiling swayipc v3.0.0
   Compiling swayr v0.19.0 (/home/mark/.cache/paru/clone/swayr/src/swayr-0.19.0)
    Finished release [optimized] target(s) in 27.31s
==> Starting check()...
    Updating crates.io index
  Downloaded cfg-if v1.0.0
thread 'main' panicked at '`./.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-1.0.0/./.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-1.0.0/src/lib.rs` is not absolute', src/tools/cargo/src/cargo/core/manifest.rs:252:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
==> ERROR: A failure occurred in check().
    Aborting...
error: failed to build 'swayr-0.19.0-1': 
error: packages failed to build: swayr-0.19.0-1

#169 prompt text not shown without selection options 2 years ago

Comment by ~markstos on ~scoopta/wofi

I miss these features from Rofi as well.

The primary one this issue is about is the one in the title.

The second issue which could be split into a separate issue report is that --lines 0 should display only the input box, like Rofi.