~markstos


#45 Support "index mode" for more beautiful menus 4 months ago

Comment by ~markstos on ~tsdh/swayr

Tested to work now. Thanks!

#45 Support "index mode" for more beautiful menus 4 months 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 4 months 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 4 months 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 10 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/

#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 3 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 3 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 3 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.

#180 Online help should document the possible modes for "--show" 3 years ago

Ticket created by ~markstos on ~scoopta/wofi

It's not clear how find out what the possible valid values for --show are.

If you don't want to embed the list modes so it appears in the online help, these diagnostic messages could at least say. "The complete list of modes is documented in man 7 wofi."

❯ wofi
I need a mode, please give me a mode, that's what --show is for

❯ wofi --show
wofi: option '--show' requires an argument
I need a mode, please give me a mode, that's what --show is for

❯ wofi --show boom
I would love to show boom but Idk what it is

❯ wofi --help
wofi [options]
Options:
--help		-h	Displays this help message
--fork		-f	Forks the menu so you can close the terminal
--conf		-c	Selects a config file to use
--style		-s	Selects a stylesheet to use
--color		-C	Selects a colors file to use
--dmenu		-d	Runs in dmenu mode
--show		-S	Specifies the mode to run in
--width		-W	Specifies the surface width
--height	-H	Specifies the surface height
--prompt	-p	Prompt to display
--xoffset	-x	The x offset
--yoffset	-y	The y offset
--normal-window	-n	Render to a normal window
--allow-images	-I	Allows images to be rendered
--allow-markup	-m	Allows pango markup
--cache-file	-k	Sets the cache file to use
--term		-t	Specifies the terminal to use when running in a term
--password	-P	Runs in password mode
--exec-search	-e	Makes enter always use the search contents not the first result
--hide-scroll	-b	Hides the scroll bars
--matching	-M	Sets the matching method, default is contains
--insensitive	-i	Allows case insensitive searching
--parse-search	-q	Parses the search text removing image escapes and pango
--version	-v	Prints the version and then exits
--location	-l	Sets the location
--no-actions	-a	Disables multiple actions for modes that support it
--define	-D	Sets a config option
--lines		-L	Sets the height in number of lines
--columns	-w	Sets the number of columns to display
--sort-order	-O	Sets the sort order
--gtk-dark	-G	Uses the dark variant of the current GTK theme
--search	-Q	Search for something immediately on open
--monitor	-o	Sets the monitor to open on