Coder Social home page Coder Social logo

lbonn / rofi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from davatorium/rofi

893.0 15.0 36.0 28.98 MB

Rofi: A window switcher, run dialog and dmenu replacement - fork with wayland support

License: Other

Makefile 1.33% C 89.99% M4 1.41% Lex 2.46% Yacc 2.84% Shell 0.57% Meson 1.41%

rofi's Introduction

Rofi

A window switcher, Application launcher and dmenu replacement.

vid-2021-10-29-165650.mp4

This is a fork of Rofi with added support for Wayland via the layer shell protocol. For more information, see the Wayland support section

Rofi started as a clone of simpleswitcher, written by Sean Pringle - a popup window switcher roughly based on superswitcher. Simpleswitcher laid the foundations, and therefore Sean Pringle deserves most of the credit for this tool. Rofi (renamed, as it lost the simple property) has been extended with extra features, like an application launcher and ssh-launcher, and can act as a drop-in dmenu replacement, making it a very versatile tool.

Rofi, like dmenu, will provide the user with a textual list of options where one or more can be selected. This can either be running an application, selecting a window, or options provided by an external script.

What is rofi not?

Rofi is not:

  • A UI toolkit.

  • A library to be used in other applications.

  • An application that can support every possible use-case. It tries to be generic enough to be usable by everybody.

    • Specific functionality can be added using scripts or plugins, many exists.
  • Just a dmenu replacement. The dmenu functionality is a nice 'extra' to rofi, not its main purpose.

Table of Contents

Features

Its main features are:

  • Fully configurable keyboard navigation

  • Type to filter

    • Tokenized: type any word in any order to filter
    • Case insensitive (togglable)
    • Support for fuzzy-, regex-, prefix-, and glob-matching
  • UTF-8 enabled

    • UTF-8-aware string collating
    • International keyboard support (`e -> è)
  • RTL language support

  • Cairo drawing and Pango font rendering

  • Built-in modes:

    • Window switcher mode

      • EWMH compatible WM
      • Work arounds for i3,bspwm
    • Application launcher

    • Desktop file application launcher

    • SSH launcher mode

    • File browser

    • Combi mode, allowing several modes to be merged into one list

  • History-based ordering — last 25 choices are ordered on top based on use (optional)

  • Levenshtein distance or fzf like sorting of matches (optional)

  • Drop-in dmenu replacement

    • Many added improvements
  • Easily extensible using scripts and plugins

  • Advanced Theming

Modes

Rofi has several built-in modes implementing common use cases and can be extended by scripts (either called from Rofi or calling Rofi) or plugins.

Below is a list of the different modes:

  • run: launch applications from $PATH, with option to launch in terminal.

  • drun: launch applications based on desktop files. It tries to be compliant to the XDG standard.

  • window: Switch between windows on an EWMH compatible window manager.

  • ssh: Connect to a remote host via ssh.

  • filebrowser: A basic file-browser for opening files.

  • keys: list internal keybindings.

  • script: Write (limited) custom mode using simple scripts.

  • combi: Combine multiple modes into one.

Rofi is known to work on Linux and BSD.

Wayland support

Build

Please follow the meson build instructions to build this fork, as autotools builds are not yet supported.

Wayland support is enabled by default in this fork, along with X11/xcb.

rofi can also be built without XCB:

meson build -Dxcb=disabled

Usage

Rofi options an configurations are compatible with this fork. It should automatically select the xcb or wayland backend depending on the environment it is run on.

To force the use of the xcb backend (if enabled during build), the -x11 option can be used:

rofi -x11 ...

Missing features in Wayland mode

Due to the different architecture and available APIs in Wayland mode, some original rofi features are difficult or impossible to replicate

  • -normal-window flag. Though it is also considered as a toy/deprecated feature in Upstream rofi. Not impossible but would require some work.
  • -monitor -n for fine-grained selection of monitor to display rofi on
  • some window locations parameters work partially, x-offset and y-offset are only working from screen edges
  • fake transparency
  • window mode on KWin which implements different protocols than the wlr familiy

Manpage

For more up to date information, please see the manpages. The other sections and links might have outdated information as they have relatively less maintainance than the manpages. So, if you come across any issues please consult manpages, discussion from upstream rofi and issue tracker before filing new issue.

Installation

Please see the installation guide for instructions on how to install Rofi.

Quickstart

Usage

This section just gives a brief overview of the various options. To get the full set of options see the manpages section above

Running rofi

To launch rofi directly in a certain mode, specify a mode with rofi -show <mode>. To show the run dialog:

    rofi -show run

Or get the options from a script:

    ~/my_script.sh | rofi -dmenu

Specify an ordered, comma-separated list of modes to enable. Enabled modes can be changed at runtime. Default key is Ctrl+Tab. If no modes are specified, all configured modes will be enabled. To only show the run and ssh launcher:

    rofi -modes "run,ssh" -show run

The modes to combine in combi mode. For syntax to -combi-modes , see -modes. To get one merge view, of window,run, and ssh:

	rofi -show combi -combi-modes "window,run,ssh" -modes combi

Configuration

Generate a default configuration file

mkdir -p ~/.config/rofi
rofi -dump-config > ~/.config/rofi/config.rasi

This creates a file called config.rasi in the ~/.config/rofi/ folder. You can modify this file to set configuration settings and modify themes. config.rasi is the file rofi looks to by default.

Please see the configuration guide for a summary of configuration options. More detailed options are provided in the manpages.

Themes

Please see the themes manpages for a detailed description.

The latest bundled themes can be found here.

Screenshots

Rezlooks:

screenshot

Arthur:

screenshot2

Default theme:

default

Wiki

❗ **The upstream rofi Wiki is currently unmaintained and might contain outdated data **

Go to upstream rofi wiki .

Contents

rofi's People

Contributors

a1346054 avatar alebastr avatar blueyed avatar carnager avatar dannycolin avatar davedavenport avatar gbitzes avatar jasperla avatar jirutka avatar jpleau avatar jubalh avatar larkery avatar lbonn avatar martijnktue avatar mcepl avatar moetayuko avatar nick87720z avatar nomoo avatar patricol avatar refacto avatar sainnhe avatar sardemff7 avatar seanpringle avatar seletskiy avatar shade-of-noon avatar t-wissmann avatar tblue avatar toncherami avatar ve5li avatar vimeitor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rofi's Issues

[BUG] rofi show on wrong monitor

Version

Version: 1.7.0-41-g1520a4a5 (next)

Configuration

Monitor layout:
              ID: 0
            name: XWAYLAND1
        position: 1920,0
            size: 2560,1440
            size: 600mm,340mm  dpi: 108,108

              ID: 1
            name: XWAYLAND0
        position: 0,0
            size: 1920,1080
            size: 340mm,190mm  dpi: 143,144


Detected modi:
        * +window
        * windowcd
        * +run
        * +ssh
        * drun
        * combi
        * keys
        * filebrowser

Compile time options:
        * window  enabled
        * drun    enabled
        * gcov    disabled
        * asan    disabled

For more information see: man rofi
                 Version: 1.7.0-41-g1520a4a5 (next)
              Bugreports: https://github.com/davatorium/rofi/
                 Support: https://reddit.com/r/qtools/
                          #rofi @ libera.chat
      Configuration file: /home/kwiesmueller/.config/rofi/config.rasi

swaymsg -t get_outputs

Output eDP-1 'Unknown 0x4141 0x00000000'
  Current mode: 3840x2160 @ 59.999001 Hz
  Position: 0,0
  Scale factor: 2.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 1
  Max render time: off
  Adaptive sync: disabled
  Available modes:
    3840x2160 @ 59.999001 Hz

Output HDMI-A-1 'Dell Inc. Dell S2716DG Y44M571P0CAQ' (focused)
  Current mode: 2560x1440 @ 59.951000 Hz
  Position: 1920,0
  Scale factor: 1.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 10
  Max render time: off
  Adaptive sync: disabled
  Available modes:
    640x480 @ 59.939999 Hz
    640x480 @ 60.000000 Hz
    720x480 @ 59.939999 Hz
    720x480 @ 60.000000 Hz
    720x576 @ 50.000000 Hz
    800x600 @ 60.317001 Hz
    1024x768 @ 60.004002 Hz
    1280x720 @ 50.000000 Hz
    1280x720 @ 59.939999 Hz
    1280x720 @ 60.000000 Hz
    1920x1080 @ 50.000000 Hz
    1920x1080 @ 59.939999 Hz
    1920x1080 @ 60.000000 Hz
    2560x1440 @ 59.951000 Hz

Launch Command

set $menu "~/.local/bin/rofi -i -combi-modi run,drun -modi drun,run -show run -terminal foot -m -5 | xargs swaymsg exec --"

Steps to reproduce

  • Place cursor on Screen 1
  • Launch Rofi
  • See Rofi on Screen 2
  • Place cursor on Screen 2
  • Launch Rofi
  • See Rofi on Screen 1

What behaviour you see

Depending on the value for -m rofi shows on the wrong screen.
When on -5 (default) it always shows on the HDMI-A-1.
When on -4 it always shows on the opposite screen of the focused window.

It seems like the monitors detected by Rofi are kind of wrong or at least don't match sway.
I'm fairly certain the 4k screen is running in 4k and the other one in 1440p. Don't know why they identify so differently in rofi.
And why their IDs and Names in Rofi are mixed up.

What behaviour you expect to see

Rofi to consistently show on the right screen.

[BUG] Can't get window switcher to work under Wayland

Rofi version (rofi -v)

1.7.2+wayland1-1-g07c801cd

Configuration

https://gist.github.com/justinesmithies/4ce697cfad31c993125f3cdc89541003#file-config-rasi

Launch command

rofi -modi combi,window -show combi -combi-modi drun

Step to reproduce

I just cannot get the window switcher to show up. No matter what command options or config I use it always says:

Mode window is not found.

I used to use the X version of Rofi no problems with the window switcher.

Expected behavior

I expected to see the application menu and the window switcher

Actual behavior

Errors

Additional information

No response

[BUG] rofi window squeezed when disabling fixed height

Rofi version (rofi -v)

1.7.5+wayland1

Configuration

not needed

Theme

Not needed

Timing report

https://gist.github.com/Aleksanaa/893dfeae15f36693010f1efc3a57b62e

Launch command

rofi -show drun -theme-str 'listview { fixed-height: false; }' -no-config

Step to reproduce

  1. run the command.
  2. type something to search and make the list shorter

Expected behavior

The list looks like normal but entries decrease.

Actual behavior

The rofi window seems squeezed.

image

Additional information

It seems to occur after hyprland update. Not sure if it is caused by hyprland side.

[BUG] The released tarball doesn't allow build (missing submodules)

Rofi version (rofi -v)

1.7.1.-wayland1

Configuration

N/A

Theme

N/A

Timing report

N/A

Launch command

N/A

Step to reproduce

stitny~/b/h/rofi-wayland (4A)$ tar tvf rofi-1.7.1+wayland1.tar.gz|grep subproject
drwxrwxr-x root/root         0 2021-11-28 15:50 rofi-1.7.1-wayland1/subprojects/
drwxrwxr-x root/root         0 2021-11-28 15:50 rofi-1.7.1-wayland1/subprojects/libgwater/
lrwxrwxrwx root/root         0 2021-11-28 15:50 rofi-1.7.1-wayland1/subprojects/libgwater-wayland -> libgwater/wayland
lrwxrwxrwx root/root         0 2021-11-28 15:50 rofi-1.7.1-wayland1/subprojects/libgwater-xcb -> libgwater/xcb
drwxrwxr-x root/root         0 2021-11-28 15:50 rofi-1.7.1-wayland1/subprojects/libnkutils/
stitny~/b/h/rofi-wayland (4A)$ 

The tarball from https://github.com/lbonn/rofi/archive/refs/tags/1.7.5+wayland1.tar.gz doesn’t include content of the git submodules, which leads to:

[    4s] + /usr/bin/meson --buildtype=plain --prefix=/usr --libdir=/usr/lib64 --libexecdir=/usr/libexec --bindir=/usr/bin --sbindir=/usr/sbin --includedir=/usr/include --datadir=/usr/share --mandir=/usr/share/man --infodir=/usr/share/info --localedir=/usr/share/locale --sysconfdir=/etc --localstatedir=/var --sharedstatedir=/var/lib --wrap-mode=nodownload --auto-features=enabled . x86_64-suse-linux
[    4s] The Meson build system
[    4s] Version: 0.63.3
[    4s] Source dir: /home/abuild/rpmbuild/BUILD/rofi-1.7.1-wayland1
[    4s] Build dir: /home/abuild/rpmbuild/BUILD/rofi-1.7.1-wayland1/x86_64-suse-linux
[    4s] Build type: native build
[    4s] Project name: rofi
[    4s] Project version: 1.7.1+wayland1
[    4s] C compiler for the host machine: cc (gcc 12.2.1 "cc (SUSE Linux) 12.2.1 20221020 [revision 0aaef83351473e8f4eb774f8f999bbe87a4866d7]")
[    4s] C linker for the host machine: cc ld.bfd 2.39.0.20220810-1
[    4s] Host machine cpu family: x86_64
[    4s] Host machine cpu: x86_64
[    4s] Compiler for C supports arguments -Wparentheses: YES 
[    4s] Compiler for C supports arguments -Winline: YES 
[    4s] Compiler for C supports arguments -Wunreachable-code: YES 
[    4s] Compiler for C supports arguments -Werror=missing-prototypes: YES 
[    4s] Compiler for C supports arguments -Wno-inline: YES 
[    4s] Found pkg-config: /usr/bin/pkg-config (1.8.0)
[    4s] Run-time dependency glib-2.0 found: YES 2.74.0
[    4s] Run-time dependency gmodule-2.0 found: YES 2.74.0
[    4s] Run-time dependency cairo found: YES 1.17.6
[    4s] Library m found: YES
[    4s] Run-time dependency gio-unix-2.0 found: YES 2.74.0
[    4s] Run-time dependency pango found: YES 1.50.11
[    4s] Run-time dependency pangocairo found: YES 1.50.11
[    4s] Run-time dependency xkbcommon found: YES 1.4.1
[    4s] Run-time dependency gdk-pixbuf-2.0 found: YES 2.42.10
[    4s] 
[    4s] meson.build:62:0: ERROR: Subproject exists but has no meson.build file
[    4s] 

Expected behavior

Package builds just with the code from the tarball.

Actual behavior

It doesn’t (see above).

Additional information

meson-log.txt

[BUG] dmenu mode broken

Rofi version (rofi -v)

1.7.5 and latest commit on wayland branch

Configuration

https://gist.github.com/Yaroslav-95/f48adff91924cb2b2cea8d7ed396e49c

Launch command

rofi dmenu

Step to reproduce

Launch a script that makes use of the dmenu mode, e.g. https://github.com/firecat53/networkmanager-dmenu

Expected behavior

Normal rofi window.

Actual behavior

Rofi window that cuts off before the list, therefore, not showing the elements from the list, can still type and enter-guess the options.

Additional information

Tested under Artix Linux with Sway 1.7, if it's of any use.

[BUG] icons are half-sized

I tested this vs X11 rofi on 4k 27" display.

On X11 rofi, icons are the expected size.

On Wayland Rofi, the icons appear perhaps half the size-- very small and hard to make out.

It this a high DPI issue?

[CLOSED, USER ERROR ]Unresponsive to Touchscreen Interaction (wlroots)

Rofi version (rofi -v)

1.7.5+wayland1-38-gfd0ef6bc (makepkg)

Configuration

https://gist.github.com/taylor85345/669b8b6f1121fa81a1b479279ebcce03

Theme

https://gist.github.com/taylor85345/71d616a5a1c7f5cb0eb6200c1c84d0bf

Timing report

No response

Launch command

rofi -show drun

Step to reproduce

  1. Install the lbonn fork of Rofi on a device with a touchscreen, running any wlroots-compositor with touchscreen functionality.
  2. Launch any Rofi interface in your wlroots compositor of choice, for example via rofi -show drun, ensuring that the application does NOT launch in X11 mode.
  3. Attempt to interact with the Rofi interface via the touchscreen.

Expected behavior

Rofi interface should respond to touch input similarly to mouse input.

Actual behavior

Touch input is captured by the Rofi layer (i.e. not passed through to a window below), but the input is ignored entirely.

Additional information

Tested on MS Surface Book running Arch Linux with linux-surface kernel and drivers.

Sway, River and Hyprland compositors tested, KDE and Gnome untested.

Successful touchscreen interaction is observed in other layersurface applications (eww, waybar, dunst) when running under compositors with touchscreen support, so the protocol does support it.

[BUG] Window resizing glitch with height in percentage

Rofi version (rofi -v)

1.7.3+wayland1-1-g9efa6504

Configuration

(none, no config)

Launch command

rofi -no-config -show-icons -show drun -theme-str 'window { height: 80%;}'

Step to reproduce

rofi -no-config -show-icons -show drun -theme-str 'window { height: 80%;}'

Expected behavior

Window height 80% of screen height, no glitches.

Actual behavior

The 80% window flashes together with the blinking cursor (visually) behind the default height one, and when I type something, every key press results in the rofi window shrinking vertically some more (by the percent amount?), leaving previous "images" of it on screen.
This only happens when both show-icons is true and height is in percents but not 100% (that works).

Additional information

davatorium#1587

I am running on Arch derived distro with Sway.
wayland 1.20.0-1
sway 1:1.7-1

I built rofi from sources, updating the rofi-lbonn-wayland AUR PKGBUILD to 1.7.3+wayland1 which according to git describe --long is 1.7.3+wayland1-1-g9efa6504. Behavior was the same with 1.7.1.
I tried with xcb enabled and disabled -- not that it should make any difference on wayland, but just in case.

Workaround without using percents is easy, I just thought I'd report the weirdness.

Not sure if I can provide a PR, probably not.

`-normal-window` does not work on Sway

Version

1.5.4-dev

Configuration

/nix/store/cvrslyvvcyriyjjmxnvikp1sajx36pmv-rofi-wayland-unwrapped-2020-09-29/bin/rofi usage:
	/nix/store/cvrslyvvcyriyjjmxnvikp1sajx36pmv-rofi-wayland-unwrapped-2020-09-29/bin/rofi [-options ...]

Command line only options:
	-no-config                             Do not load configuration, use default values.
	-v,-version                            Print the version number and exit.
	-dmenu                                 Start in dmenu mode.
	-display [string]                      X server to contact.
		${DISPLAY}
	-h,-help                               This help message.
	-dump-xresources                       Dump the current configuration in Xresources format and exit.
	-e [string]                            Show a dialog displaying the passed message and exit.
	-markup                                Enable pango markup where possible.
	-normal-window                         Behave as a normal window. (experimental)
	-show [mode]                           Show the mode 'mode' and exit. The mode has to be enabled.
	-no-lazy-grab                          Disable lazy grab that, when fail to grab keyboard, does not block but retry later.
	-no-plugins                            Disable loading of external plugins.
	-plugin-path                           Directory used to search for rofi plugins. *DEPRECATED*
	-dump-config                           Dump the current configuration in rasi format and exit.
	-upgrade-config                        Upgrade the old-style configuration file in the new rasi format and exit.
	-dump-theme                            Dump the current theme in rasi format and exit.
DMENU command line options:
	-mesg [string]                         Print a small user message under the prompt (uses pango markup)
	-p [string]                            Prompt to display left of entry field
	-selected-row [integer]                Select row
	-format [string]                       Output format string
		s
	-u [list]                              List of row indexes to mark urgent
	-a [list]                              List of row indexes to mark active
	-l [integer]                           Number of rows to display
	-window-title [string]                 Set the dmenu window title
	-i                                     Set filter to be case insensitive
	-only-match                            Force selection to be given entry, disallow no match
	-no-custom                             Don't accept custom entry, allow no match
	-select [string]                       Select the first row that matches
	-password                              Do not show what the user inputs. Show '*' instead.
	-markup-rows                           Allow and render pango markup as input data.
	-sep [char]                            Element separator.
		'\n'
	-input [filename]                      Read input from file instead from standard input.
	-sync                                  Force dmenu to first read all input data, then show dialog.
	-async-pre-read [number]               Read several entries blocking before switching to async mode
		25
	-w windowid                            Position over window with X11 windowid.
	-keep-right                            Set ellipsize to end.
Global options:
	-modi [string]                          Enabled modi
		run,ssh (Default)
	-width [number]                         Window width
		50 (Default)
	-lines [number]                         Number of lines
		15 (Default)
	-columns [number]                       Number of columns
		1 (Default)
	-font [string]                          Font to use
		mono 12 (Default)
	-bw [number]                            Border width
		1 (Default)
	-location [number]                      Location on screen
		0 (File)
	-padding [number]                       Padding
		5 (Default)
	-yoffset [number]                       Y-offset relative to location
		0 (File)
	-xoffset [number]                       X-offset relative to location
		0 (File)
	-[no-]fixed-num-lines                   Always show number of lines
		True (Default)
	-[no-]show-icons                        Whether to load and show icons
		False (Default)
	-terminal [string]                      Terminal to use
		rofi-sensible-terminal (Default)
	-ssh-client [string]                    Ssh client to use
		ssh (Default)
	-ssh-command [string]                   Ssh command to execute
		{terminal} -e {ssh-client} {host} [-p {port}] (Default)
	-run-command [string]                   Run command to execute
		{cmd} (Default)
	-run-list-command [string]              Command to get extra run targets
		 (Default)
	-run-shell-command [string]             Run command to execute that runs in shell
		{terminal} -e {cmd} (Default)
	-window-command [string]                Command to executed when -kb-accept-alt binding is hit on selected window 
		wmctrl -i -R {window} (Default)
	-window-match-fields [string]           Window fields to match in window mode
		all (Default)
	-icon-theme [string]                    Theme to use to look for icons
		(unset) (Default)
	-drun-match-fields [string]             Desktop entry fields to match in drun
		name,generic,exec,categories,keywords (Default)
	-drun-categories [string]               Only show Desktop entry from these categories
		(unset) (Default)
	-[no-]drun-show-actions                 Desktop entry show actions.
		False (Default)
	-drun-display-format [string]           DRUN format string. (Supports: generic,name,comment,exec,categories)
		{name} [<span weight='light' size='small'><i>({generic})</i></span>] (Default)
	-drun-url-launcher [string]             Command to open an Desktop Entry that is a Link.
		xdg-open (Default)
	-[no-]disable-history                   Disable history in run/ssh
		False (Default)
	-ignored-prefixes [string]              Programs ignored for history
		 (Default)
	-[no-]sort                              Use sorting
		False (Default)
	-sorting-method [string]                Choose the strategy used for sorting: normal (levenshtein) or fzf.
		normal (Default)
	-[no-]case-sensitive                    Set case-sensitivity
		False (Default)
	-[no-]cycle                             Cycle through the results list
		True (Default)
	-[no-]sidebar-mode                      Enable sidebar-mode
		False (Default)
	-eh [number]                            Row height (in chars)
		1 (Default)
	-[no-]auto-select                       Enable auto select mode
		False (Default)
	-[no-]parse-hosts                       Parse hosts file for ssh mode
		False (Default)
	-[no-]parse-known-hosts                 Parse known_hosts file for ssh mode
		True (Default)
	-combi-modi [string]                    Set the modi to combine in combi mode
		window,run (Default)
	-matching [string]                      Set the matching algorithm. (normal, regex, glob, fuzzy)
		normal (Default)
	-[no-]tokenize                          Tokenize input string
		True (Default)
	-m [string]                             Monitor id to show on
		-5 (Default)
	-line-margin [number]                   Margin between rows *DEPRECATED*
		2 (Default)
	-line-padding [number]                  Padding within rows *DEPRECATED*
		1 (Default)
	-filter [string]                        Pre-set filter
		(unset) (Default)
	-separator-style [string]               Separator style (none, dash, solid) *DEPRECATED*
		dash (Default)
	-[no-]hide-scrollbar                    Hide scroll-bar *DEPRECATED*
		False (Default)
	-[no-]fullscreen                        Fullscreen
		False (Default)
	-[no-]fake-transparency                 Fake transparency *DEPRECATED*
		False (Default)
	-dpi [number]                           DPI
		-1 (Default)
	-threads [number]                       Threads to use for string matching
		0 (Default)
	-scrollbar-width [number]               Scrollbar width *DEPRECATED*
		8 (Default)
	-scroll-method [number]                 Scrolling method. (0: Page, 1: Centered)
		0 (Default)
	-fake-background [string]               Background to use for fake transparency. (background or screenshot) *DEPRECATED*
		screenshot (Default)
	-window-format [string]                 Window Format. w (desktop name), t (title), n (name), r (role), c (class)
		{w}    {c}   {t} (Default)
	-[no-]click-to-exit                     Click outside the window to exit
		True (Default)
	-[no-]show-match                        Indicate how it match by underlining it.
		True (Default)
	-theme [string]                         New style theme file
		(unset) (Default)
	-color-normal [string]                  Color scheme for normal row
		#0a0a0a, #f8f8f8, #333333, #f8f8f8, #0a0a0a (File)
	-color-urgent [string]                  Color scheme for urgent row
		#0a0a0a, #ed8484, #333333, #ed8484, #0a0a0a (File)
	-color-active [string]                  Color scheme for active row
		#0a0a0a, #8a8ae8, #333333, #8a8ae8, #0a0a0a (File)
	-color-window [string]                  Color scheme window
		#0a0a0a, #333333, #f8f8f8 (File)
	-max-history-size [number]              Max history size (WARNING: can cause slowdowns when set to high).
		25 (Default)
	-[no-]combi-hide-mode-prefix            Hide the prefix mode prefix on the combi view.
		False (Default)
	-matching-negate-char [character]          Set the character used to negate the matching. ('\0' to disable)
		- (Default)
	-cache-dir [string]                     Directory where history and temporary files are stored.
		(unset) (Default)
	-[no-]window-thumbnail                  Show window thumbnail (if available) as icon in window switcher.
		False (Default)
	-[no-]drun-use-desktop-cache            DRUN: build and use a cache with desktop file content.
		False (Default)
	-[no-]drun-reload-desktop-cache         DRUN: If enabled, reload the cache with desktop file content.
		False (Default)
	-pid [string]                           Pidfile location
		/run/user/1000/rofi.pid (Default)
	-display-run [string]                   The display name of this browser
		(unset) (Default)
	-display-ssh [string]                   The display name of this browser
		(unset) (Default)
	-display-drun [string]                  The display name of this browser
		(unset) (Default)
	-display-combi [string]                 The display name of this browser
		(unset) (Default)
	-display-keys [string]                  The display name of this browser
		(unset) (Default)
	-kb-primary-paste [string]              Paste primary selection
		Control+V,Shift+Insert (Default)
	-kb-secondary-paste [string]            Paste clipboard
		Control+v,Insert (Default)
	-kb-clear-line [string]                 Clear input line
		Control+w (Default)
	-kb-move-front [string]                 Beginning of line
		Control+a (Default)
	-kb-move-end [string]                   End of line
		Control+e (Default)
	-kb-move-word-back [string]             Move back one word
		Alt+b,Control+Left (Default)
	-kb-move-word-forward [string]          Move forward one word
		Alt+f,Control+Right (Default)
	-kb-move-char-back [string]             Move back one char
		Left,Control+b (Default)
	-kb-move-char-forward [string]          Move forward one char
		Right,Control+f (Default)
	-kb-remove-word-back [string]           Delete previous word
		Control+Alt+h,Control+BackSpace (Default)
	-kb-remove-word-forward [string]        Delete next word
		Control+Alt+d (Default)
	-kb-remove-char-forward [string]        Delete next char
		Delete,Control+d (Default)
	-kb-remove-char-back [string]           Delete previous char
		BackSpace,Shift+BackSpace,Control+h (Default)
	-kb-remove-to-eol [string]              Delete till the end of line
		Control+k (Default)
	-kb-remove-to-sol [string]              Delete till the start of line
		Control+u (Default)
	-kb-accept-entry [string]               Accept entry
		Control+j,Control+m,Return,KP_Enter (Default)
	-kb-accept-custom [string]              Use entered text as command (in ssh/run modi)
		Control+Return (Default)
	-kb-accept-alt [string]                 Use alternate accept command.
		Shift+Return (Default)
	-kb-delete-entry [string]               Delete entry from history
		Shift+Delete (Default)
	-kb-mode-next [string]                  Switch to the next mode.
		Shift+Right,Control+Tab (Default)
	-kb-mode-previous [string]              Switch to the previous mode.
		Shift+Left,Control+ISO_Left_Tab (Default)
	-kb-row-left [string]                   Go to the previous column
		Control+Page_Up (Default)
	-kb-row-right [string]                  Go to the next column
		Control+Page_Down (Default)
	-kb-row-up [string]                     Select previous entry
		Up,Control+p,ISO_Left_Tab (Default)
	-kb-row-down [string]                   Select next entry
		Down,Control+n (Default)
	-kb-row-tab [string]                    Go to next row, if one left, accept it, if no left next mode.
		Tab (Default)
	-kb-page-prev [string]                  Go to the previous page
		Page_Up (Default)
	-kb-page-next [string]                  Go to the next page
		Page_Down (Default)
	-kb-row-first [string]                  Go to the first entry
		Home,KP_Home (Default)
	-kb-row-last [string]                   Go to the last entry
		End,KP_End (Default)
	-kb-row-select [string]                 Set selected item as input text
		Control+space (Default)
	-kb-screenshot [string]                 Take a screenshot of the rofi window
		Alt+S (Default)
	-kb-ellipsize [string]                  Toggle between ellipsize modes for displayed data
		Alt+period (Default)
	-kb-toggle-case-sensitivity [string]    Toggle case sensitivity
		grave,dead_grave (Default)
	-kb-toggle-sort [string]                Toggle sort
		Alt+grave (Default)
	-kb-cancel [string]                     Quit rofi
		Escape,Control+g,Control+bracketleft (Default)
	-kb-custom-1 [string]                   Custom keybinding 1
		Alt+1 (Default)
	-kb-custom-2 [string]                   Custom keybinding 2
		Alt+2 (Default)
	-kb-custom-3 [string]                   Custom keybinding 3
		Alt+3 (Default)
	-kb-custom-4 [string]                   Custom keybinding 4
		Alt+4 (Default)
	-kb-custom-5 [string]                   Custom Keybinding 5
		Alt+5 (Default)
	-kb-custom-6 [string]                   Custom keybinding 6
		Alt+6 (Default)
	-kb-custom-7 [string]                   Custom Keybinding 7
		Alt+7 (Default)
	-kb-custom-8 [string]                   Custom keybinding 8
		Alt+8 (Default)
	-kb-custom-9 [string]                   Custom keybinding 9
		Alt+9 (Default)
	-kb-custom-10 [string]                  Custom keybinding 10
		Alt+0 (Default)
	-kb-custom-11 [string]                  Custom keybinding 11
		Alt+exclam (Default)
	-kb-custom-12 [string]                  Custom keybinding 12
		Alt+at (Default)
	-kb-custom-13 [string]                  Custom keybinding 13
		Alt+numbersign (Default)
	-kb-custom-14 [string]                  Custom keybinding 14
		Alt+dollar (Default)
	-kb-custom-15 [string]                  Custom keybinding 15
		Alt+percent (Default)
	-kb-custom-16 [string]                  Custom keybinding 16
		Alt+dead_circumflex (Default)
	-kb-custom-17 [string]                  Custom keybinding 17
		Alt+ampersand (Default)
	-kb-custom-18 [string]                  Custom keybinding 18
		Alt+asterisk (Default)
	-kb-custom-19 [string]                  Custom Keybinding 19
		Alt+parenleft (Default)
	-kb-select-1 [string]                   Select row 1
		Super+1 (Default)
	-kb-select-2 [string]                   Select row 2
		Super+2 (Default)
	-kb-select-3 [string]                   Select row 3
		Super+3 (Default)
	-kb-select-4 [string]                   Select row 4
		Super+4 (Default)
	-kb-select-5 [string]                   Select row 5
		Super+5 (Default)
	-kb-select-6 [string]                   Select row 6
		Super+6 (Default)
	-kb-select-7 [string]                   Select row 7
		Super+7 (Default)
	-kb-select-8 [string]                   Select row 8
		Super+8 (Default)
	-kb-select-9 [string]                   Select row 9
		Super+9 (Default)
	-kb-select-10 [string]                  Select row 10
		Super+0 (Default)
	-ml-row-left [string]                   Go to the previous column
		ScrollLeft (Default)
	-ml-row-right [string]                  Go to the next column
		ScrollRight (Default)
	-ml-row-up [string]                     Select previous entry
		ScrollUp (Default)
	-ml-row-down [string]                   Select next entry
		ScrollDown (Default)
	-me-select-entry [string]               Select hovered row
		MousePrimary (Default)
	-me-accept-entry [string]               Accept hovered row
		MouseDPrimary (Default)
	-me-accept-custom [string]              Accept hovered row with custom action
		Control+MouseDPrimary (Default)


Detected modi:
        * +run
        * +ssh
        * drun
        * combi
        * keys

Compile time options:
	* window  enabled
	* drun    enabled
	* gcov    disabled
	* asan    disabled

For more information see: man rofi
                 Version: 1.5.4-dev
              Bugreports: https://github.com/davatorium/rofi/
                 Support: https://reddit.com/r/qtools/
                          #rofi @ freenode.net
      Configuration file: /home/jlv/.config/rofi/config

Launch Command

rofi -normal-window -show run

Steps to reproduce

See above.

What behaviour you see

Rofi starts in its usual overlay.

What behaviour you expect to see

Rofi starts in a normal window.

[BUG] Erroneous character-encoding in default dumped theme

Rofi version (rofi -v)

1.7.3+wayland1

Configuration

https://gist.github.com/xsbee/5ddf3db9f37bcbfbddda78a8cbee7def

Launch command

rofi -no-config -dump-theme > ~/.config/rofi/theme.rasi

Step to reproduce

  • Run rofi -no-config -dump-theme > ~/.config/rofi/theme.rasi
  • Open with a text editor (e.g helix, nano).

Expected behavior

Should be in ASCII format.

Actual behavior

Includes random Unicode characters in places of numbers.

Additional information

The command outputs the following in STDOUT:

(process:26911): GLib-CRITICAL **: 13:04:28.913: g_ascii_formatd: assertion 'strpbrk (format + 1, "'l%") == NULL' failed

(process:26911): GLib-CRITICAL **: 13:04:28.913: g_ascii_formatd: assertion 'strpbrk (format + 1, "'l%") == NULL' failed

(process:26911): GLib-CRITICAL **: 13:04:28.913: g_ascii_formatd: assertion 'strpbrk (format + 1, "'l%") == NULL' failed

(process:26911): GLib-CRITICAL **: 13:04:28.913: g_ascii_formatd: assertion 'strpbrk (format + 1, "'l%") == NULL' failed

[BUG] Crash with mouse scrolling

Rofi crashes when scrolling with mouse. This crash seems to be reproducible on the latest sway/wlroots git but version 1.5 is likely affected as well.

Steps to reproduce

  • Keep scrolling rofi menu with the mouse (it may not initially crash)
  • Rofi crashes

Backtrace

Core was generated by `rofi -show drun'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000055608fd9e5f8 in rofi_view_handle_mouse_motion (state=0x0, x=296, y=200) at ../source/view.c:866
866	../source/view.c: No such file or directory.
[Current thread is 1 (Thread 0x7f5cc1f202c0 (LWP 9653))]
(gdb) bt full
#0  0x000055608fd9e5f8 in rofi_view_handle_mouse_motion (state=0x0, x=296, y=200) at ../source/view.c:866
No locals.
#1  0x000055608fd8d721 in wayland_pointer_send_events (self=0x556090150490) at ../source/wayland/display.c:531
        state = 0x0
        button = 4294967295
#2  0x00007f5cc2f8ce6d in ?? () from /usr/lib/libffi.so.7
No symbol table info available.
#3  0x00007f5cc2f8c2aa in ?? () from /usr/lib/libffi.so.7
No symbol table info available.
#4  0x00007f5cc39f6a1f in wl_closure_invoke (closure=closure@entry=0x55609042af10, target=<optimized out>, target@entry=0x556090173aa0, opcode=opcode@entry=5, data=<optimized out>, flags=1) at ../src/connection.c:1018
        count = <optimized out>
        cif = {abi = FFI_UNIX64, nargs = 2, arg_types = 0x7ffc19db8fc0, rtype = 0x7f5cc2f8e180 <ffi_type_void>, bytes = 0, flags = 0}
        ffi_types = {0x7f5cc2f8e060 <ffi_type_pointer>, 0x7f5cc2f8e060 <ffi_type_pointer>, 0x7f5cc2f8e0e0 <ffi_type_uint32>, 0x7f5cc2f8e0e0 <ffi_type_uint32>, 0x7f5cc2f8e0e0 <ffi_type_uint32>, 0x7f5cc2f8e0e0 <ffi_type_uint32>, 
          0x5560901507c0, 0x7f5cc39f6775 <wl_closure_clear_fds+53>, 0x7f5cc39fee78 <wl_pointer_events+120>, 0xbdbdc82d13438500, 0x8, 0x55609042af10, 0x5560901494f0, 0x8, 0x7ffc19db90d0, 0x7f5cc39fb72f, 0x0, 
          0x7f5cc39f844d <wl_display_read_events+157>, 0x7ffc19db90a0, 0x7ffc00000000, 0x5560901495d8, 0x556090173aa0}
        ffi_args = {0x7ffc19db8f90, 0x7ffc19db8f98, 0x5560901730a8, 0x5560901730b0, 0x5560901730b8, 0x5560901730c0, 0x55609042afe0, 0x0, 0x7ffc19db90e0, 0x1, 0x0, 0x0, 0x75, 0x0, 0x7ffc19db9110, 0xbdbdc82d13438500, 0x19db9175, 
          0x7ffc19db9130, 0x7f5cc39fb705, 0x5560901730c8, 0x556090173090, 0x5560901730c8}
        implementation = <optimized out>
#5  0x00007f5cc39f7ed3 in dispatch_event (display=display@entry=0x5560901494f0, queue=<optimized out>) at ../src/wayland-client.c:1445
        closure = 0x55609042af10
        proxy = 0x556090173aa0
        opcode = 5
        proxy_destroyed = <optimized out>
#6  0x00007f5cc39f826c in dispatch_queue (queue=0x5560901495c0, display=0x5560901494f0) at ../src/wayland-client.c:1591
        count = 3
        count = <optimized out>
#7  wl_display_dispatch_queue_pending (display=0x5560901494f0, queue=0x5560901495c0) at ../src/wayland-client.c:1833
        ret = <optimized out>
#8  0x00007f5cc39f82cc in wl_display_dispatch_pending (display=<optimized out>) at ../src/wayland-client.c:1896
No locals.
#9  0x000055608fd8755d in _g_water_wayland_source_dispatch (source=0x5560901490f0, callback=0x55608fd879f0 <wayland_error>, user_data=0x0) at ../subprojects/libgwater-wayland/libgwater-wayland.c:107
        self = 0x5560901490f0
        revents = <optimized out>
#10 0x00007f5cc5292e4e in g_main_dispatch (context=0x556090147a80) at ../glib/gmain.c:3309
        dispatch = 0x55608fd87500 <_g_water_wayland_source_dispatch>
        prev_source = 0x0
        was_in_call = 0
        user_data = 0x0
        callback = 0x55608fd879f0 <wayland_error>
        cb_funcs = 0x7f5cc534d300 <g_source_callback_funcs>
        cb_data = 0x556090148fb0
        need_destroy = <optimized out>
        source = 0x5560901490f0
        current = 0x556090262ec0
        i = 0
        current = <optimized out>
        i = <optimized out>
        __func__ = <optimized out>
        source = <optimized out>
        _g_boolean_var_ = <optimized out>
        was_in_call = <optimized out>
        user_data = <optimized out>
        callback = <optimized out>
        cb_funcs = <optimized out>
        cb_data = <optimized out>
        need_destroy = <optimized out>
        dispatch = <optimized out>
        prev_source = <optimized out>
        _g_boolean_var_ = <optimized out>
#11 g_main_context_dispatch (context=context@entry=0x556090147a80) at ../glib/gmain.c:3974
No locals.
#12 0x00007f5cc5294d90 in g_main_context_iterate (context=0x556090147a80, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4047
--Type <RET> for more, q to quit, c to continue without paging--
        max_priority = 2147483647
        timeout = 1193
        some_ready = 1
        nfds = <optimized out>
        allocated_nfds = <optimized out>
        fds = 0x556090191f80
#13 0x00007f5cc5295d13 in g_main_loop_run (loop=0x556090147ba0) at ../glib/gmain.c:4241
        self = <optimized out>
        __func__ = "g_main_loop_run"
#14 0x000055608fd85b68 in main (argc=<optimized out>, argv=<optimized out>)
    at ../source/rofi.c:1159
        path = <optimized out>
        proxy = <optimized out>
        windowid = 0x0
        theme_str = 0x0
        interval = 1
        pfd = 6
        __func__ = "main"
(gdb) 

[BUG] Font configuration doesn't seem to work

Maybe I'm missing something, but it seems to me that font configuration just doesn't work on wayland.

Steps to reproduce

# Running this with Xwayland gives a big DejaVu font:
rofi -theme-str 'window { font: "DejaVu Sans 30"; }' -show run -x11
# Running this doesn't give a big DejaVu font:
rofi -theme-str 'window { font: "DejaVu Sans 30"; }' -show run

[BUG] Icons & Cursor Low-Res on Hi-DPI Wayland

Rofi version (rofi -v)

1.7.2+wayland1

Configuration

https://gist.github.com/applesud/5abee19a4f85e86ed463b529b577ba7b

Launch command

rofi -no-config -show-icons -show drun

Step to reproduce

  1. Open sway with an output which has scale set to 2.
  2. Run the launch command so that rofi opens on the scaled display.

Expected behavior

Icons & cursor are shown at the correct resolution.

Actual behavior

Icons & cursor are shown at a lower resolution (notice how they are less sharp than the text in the attached image).
image

Additional information

Papirus icon theme.
Icons and cursor were sharp when display was manually scaled (ie. rofi config was adjusted to increase size).
Possibly relevant: cursor seems to be slightly too small on unscaled display, and too large on scaled display.

[BUG] rofi doesn't start on wayland (1.18.0) with sway (1.5.1) and wlroots (0.12.0)

Version

Version: 1.6.0-23-gf0139710 (makepkg)

Configuration

rofi config

Launch Command

rofi

Steps to reproduce

  • just run rofi on wayland

What behaviour you see

What behavior you expect to see

  • The rofi window opens as expected

Additional details:

[REQUEST] Releases with tarballs

Until now, this fork is just a git branch, synced with upstream at irregular intervals (mostly official releases)

There may be the need for more robust packaings, as requested here: #24.

Please explain here your use case(s) to motivate this work.

[BUG] text-color ignored and always black

Version

Version: 1.7.0-33-ga97ba40b (makepkg)

Configuration

https://gist.github.com/kepi/8cb7b0b75dbf9a6db7003dcd93902037

Launch Command

It is same for all modes. But i.e.

rofi -show drun

Steps to reproduce

  1. Launch rofi

What behaviour you see

  • black text in every line

What behaviour you expect to see

Additional details:

rofi

[REQUEST] Style With GTK Named Colors


First read the guidelines!
This is not optional for any report/question. People must be able to understand the full context of the report when reading it, at any time.
If you feel like you “just have a simple question”, please consider you’re wrong and still fill the full report.
Any report missing these informations will be labeled as “Incomplete Report - Please follow the guidelines” and may not be answered in a timely fashion.

Before creating a feature request

  • I checked the next branch to see if the feature has already been
    implemented
  • I searched existing reports to see if it is already requested.

What is the user problem or growth opportunity you want to see solved?

In order to support a seamless experience across applications, it would be great if rofi honored global GTK colors defined in https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-22/gtk/theme/Adwaita/_colors-public.scss

How do you know that this problem exists today? Why is this important?

Currently specifying colors via the foreground: @theme_fg_color; results in parse errors upon rofi launch.

Who will benefit from it?

Theme creation will be able to inherit the user's environment

Version

Version: 1.6.1-wayland

Configuration

N/A

[BUG] cant compile rofi with makedeb because gdk-pixbuf 2.0 is missing even though this dependency is already installed

Rofi version (rofi -v)

1.7.5

Configuration

none

Theme

none

Timing report

none

Launch command

none

Step to reproduce

  1. install a debian testing distrobox container or a vm
  2. install makedeb stable
  3. run the modified arch PKGBUILD i made (https://controlc.com/6ddbbf4b)
    cant share via pastebin since its offensiv 😡
  4. get the compilation issue

Expected behavior

i expect rofiwl to compile into a nice debian package

Actual behavior

rofiwl fails to compile into a debian package

Additional information

i copied the PKGBUILD from AUR and modified it to have debian dependencies but i encountered this issue.

dont know how to solve it

if its not the rofi issue then i will report it to makedeb github https://github.com/makedeb/makedeb

screenshots
vmware_n5uloy4AZJ
vmware_m4188VTvbS

[BUG] incorrect mouse click behaviour

Version

Version: 1.6.1-wayland

Configuration

gist

Launch Command

rofi -dmenu -p "How to make a screenshot?" << EOF
 Screenshot Fullscreen
 Screenshot Focused
 Screenshot Selected Window
 Screenshot Selected Output
 Screenshot Region
 Record Focused
 Record Selected Window
 Record Selected Output
 Record Region
 Screenshare
EOF

link to full script

Steps to reproduce

  • Run rofi
  • Double click on menu item

What behaviour you see

I can't choose output/window, when I double click on menu item (for example "Screenshot Selected Window"), looks like it registers my double click as I'm choose window.
Everything works fine when I'm using keyboard.
Watch video if you don't understand.

What behaviour you expect to see

Not register click after clicking menu option.

Additional details:

  • Link to my config.
  • Video
    First time I'm taking screenshot using my keyboard, I can choose window, everything work as intended. Second time I'm double clicking same option, and it registered my double click as I'm choose window.
    Same thing happen if I'm running rofi with "-me-select-entry ' ' -me-accept-entry MousePrimary" options.
recording.mp4

Update tags from upstream

I package this Wayland fork as an AUR package for Arch Linux, and it would be nice if the auto-generated package version will show correctly that the fork is incorporating the latest release and this requires that the fork will have the latest (relevant) tags in the git repo.

git fetch davatorium-rofi
git push --tags origin

The command that I use for generating the package version is git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' and its current output is 1.3.1.r1349.gf0139710.
With the tags in the repo, it will generate 1.6.0.r23.gf0139710.

Screenshot function

Rofi version (rofi -v)

Version 1.7.3

Configuration

https://gist.github.com/carnager/e335b7bed63bb8dceb399e2ad92e87ce

Launch command

rofi -show run -kb-screenshot "Alt+s"

Step to reproduce

Run rofi like above
Hit Alt+s

Expected behavior

rofi should save a picture of its own window and print the path to stdout.

Actual behavior

rofi does not even react to the hotkey, even though it's an internal hotkey which should work on wayland?

Additional information

Also tried vanilla rofi without the lbonn patches. There it works as expected.

[BUG] dpi calculation error on rotated displays (wayland)

Rofi version (rofi -v)

1.7.3 (davatorium/rofi)
1.7.2-29-g50b85ba9 (next) (lbonn/rofi)

Configuration

https://gist.github.com/qodo-io/36623f90c03ae96204b0d9d1748102e7

Launch command

rofi --help

Step to reproduce

prerequisites:

  • rotated wayland display (i.e.swaymsg output DP-1 transform 90)
    optional: physically rotate your display to get your neck into a healthy debugging position)

steps:

  • run rofi --help and identify the Monitor layout: section
  • optional: filter the output to see it immediatelty:
rofi --help | sed -r -e '/^\s*(ID:|name:|position:|size:|size:)/!d;s/^\s*/  /;s/  ID: ([0-9]*$)/\1:/;s/dpi:/\n  dpi:/;s/size: ([0-9]*),([0-9]*)/width: \1\n  height: \2/;s/position: ([0-9]*),([0-9]*)/x: \1\n  y: \2/'

Expected behavior

0:
  name: XWAYLAND15
  x: 3840
  y: 0
  width: 1440
  height: 2560
  size: 530mm,300mm  
  dpi: 123,123             # <-------- correct

correct dpi would be 123,123 in this example, as:

 ~   calc                                                                                                                                                                      
   precision: e^-8
   2560/(53/2.54)
   2560/(53/2.54):  122.68679246

Actual behavior

0:
  name: XWAYLAND15
  x: 3840
  y: 0
  width: 1440
  height: 2560
  size: 530mm,300mm  
  dpi: 69,217             # <-------- incorrect

dpi is 69,217, as width and height are flipped

 ~   calc                                                                                                                                                                      
   precision: e^-8
   1440/(53/2.54):  69.01132076
   2560/(30/2.54):  216.74666670

Additional information

[posted this on the wrong issue tracker before, at https://github.com/davatorium/issues/1590 - sorry for that]

probable root cause: the dpi calculation does not take wayland display rotation into account (sway example from CLI: swaymsg -t get_outputs | jq '.[]|.transform')

[BUG] rofi wayland is using the deprecated `wl_shell` protocol, should use `xdg_shell`

Rofi version (rofi -v)

Version: 1.7.5+wayland1

Configuration

no config (but anyway: https://gist.github.com/bew/c1729d2a381ee4b0b86fca3c63a1c557)

Launch command

rofi

Step to reproduce

Hello,

I'm maintaining rofi and rofi-wayland for the Nix package manager (for use in NixOS or any linux distributions with Nix installed).

I've successfully built rofi-wayland from the latest release: https://github.com/lbonn/rofi/releases/tag/1.7.5%2Bwayland1

I tried to test it by running weston, opening a terminal and running the built rofi, but received a number of errors due to the use of the deprecated wl_shell.

Expected behavior

Open without error in weston nor rofi

Actual behavior

Excerpt of the output of weston:

[20:34:34.236] Loading module '/usr/lib/weston/desktop-shell.so'
[20:34:34.239] launching '/usr/lib/weston/weston-keyboard'
[20:34:34.240] Note: support for the deprecated wl_shell interface is disabled. If a legacy client still needs it, it can be re-enabled by passing -Ddeprecated-wl-shell=true to Meson when building Weston.
[20:34:34.240] Old Xwayland module loading detected: Please use --xwayland command line option or set xwayland=true in the [core] section in weston.ini
[20:34:34.241] Loading module '/usr/lib/libweston-10/xwayland.so'
[20:34:34.250] Registered plugin API 'weston_xwayland_v1' of size 32
[20:34:34.250] Registered plugin API 'weston_xwayland_surface_v1' of size 16
[20:34:34.251] xserver listening on display :1
[20:34:34.251] launching '/usr/lib/weston/weston-desktop-shell'
[20:34:34.252] Chosen EGL config details: id:  10 rgba: 8 8 8 0 buf: 24 dep:  0 stcl: 0 int: 0-1000 type: win|pix|pbf vis_id: 0x21

And the output of rofi:

(process:195228): Wayland-ERROR **: 20:36:25.089: Rofi on wayland requires support for the layer shell protocol

Additional information

More official docs about wl_shell being deprecated:
https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_shell

Note! This protocol is deprecated and not intended for production use. For desktop-style user interfaces, use xdg_shell. Compositors and clients should not implement this interface.

[BUG] Fullscreen (with waybar)

Rofi version (rofi -v)

Version: 1.7.5+wayland1-37-ge861df39 (makepkg)

Configuration

https://gist.github.com/niksingh710/55c15cef4d66463baded78e6e637297e

Theme

https://gist.github.com/niksingh710/0feacf1205ea3b3844243220412712a2

Timing report

No response

Launch command

/usr/bin/ls | rofi -dmenu -theme-str 'window{fullscreen:true;}prompt{enabled:false;}'

Step to reproduce

Just execute the command in terminal.

Expected behavior

Should Take the entire Screen.

Actual behavior

Does not go over the waybar.
Is there any way by which I can specify which layer to use? any way

Additional information

Using Hyland as wm.

[BUG] Rofi appears over lock screens

Rofi appears over lock screens which might be a security risk for some people. For now, the suggested fix for this is to use the TOP layer instead of the OVERLAY layer, which is what bemenu and wofi both do.

See: swaywm/swaylock#107

Suggested patch:

diff --git a/source/wayland/display.c b/source/wayland/display.c
index 6412fdb..b2ad51a 100644
--- a/source/wayland/display.c
+++ b/source/wayland/display.c
@@ -1013,7 +1013,7 @@ wayland_display_setup(GMainLoop *main_loop, NkBindings *bindings)
 
     wayland->bindings_seat = nk_bindings_seat_new ( bindings, XKB_CONTEXT_NO_FLAGS );
 
-    wayland->wlr_surface = zwlr_layer_shell_v1_get_layer_surface(wayland->layer_shell, wayland->surface, NULL, ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY, "rofi");
+    wayland->wlr_surface = zwlr_layer_shell_v1_get_layer_surface(wayland->layer_shell, wayland->surface, NULL, ZWLR_LAYER_SHELL_V1_LAYER_TOP, "rofi");
 
     // ANCHOR_LEFT is needed to get the full screen width
     zwlr_layer_surface_v1_set_anchor( wayland->wlr_surface, ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP | ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT );

[BUG] doc/meson.build:3:4: ERROR: Program 'meson_build_manpages.sh' not found or not executable

Rofi version (rofi -v)

Version 1.7.5+Wayland1

Configuration

Launch command

Step to reproduce

Can't install rofi - I just unzip the release, cd into the directory, and do meson setup build.

Expected behavior

Meson should compile as usual and I should be able to build, which was how it was on Ubuntu.

Actual behavior

I get the following error: doc/meson.build:3:4: ERROR: Program 'meson_build_manpages.sh' not found or not executable.

Additional information

No response

[BUG] cannot change layout in rofi wayland

Rofi version (rofi -v)

1.7.3+wayland1

Configuration

https://gist.github.com/Tahvok/8d571e4a33ddc736c25b97fa7a3f5d81

Launch command

rofi -show run

Step to reproduce

I'm using sway, so I setup my layout configuration as follows:

input * {
    xkb_layout "us,us"
    xkb_variant ",colemak"
    xkb_options "grp:shift_toggle,caps:backspace"
}

All apps work fine, I can change the layout.

However, sway work only using qwerty - no matter if I launch rofi before changing the layout, or trying to change the layout when rofi is running.

Expected behavior

rofi supports different keyboard layouts

Actual behavior

Rofi always types in qwerty

Additional information

No response

[BUG] wlroots 0.12

zwlr_layer_surface_v1@12: error 1: width 0 requested without setting left and right anchors

Please fix with wlroots 0.12

[BUG] Crash when disconnecting screen

Rofi version (rofi -v)

1.7.3+wayland1

Configuration

any

Launch command

rofi -show run

Step to reproduce

  • Set up a dual screen on sway (screen 1 and 2)
  • Launch sway on screen 2
  • Disconnect screen 2

Expected behavior

Rofi appears on screen 1

Actual behavior

Crash

Thread 1 "rofi" received signal SIGSEGV, Segmentation fault.
wl_proxy_marshal (proxy=0x0, opcode=2) at src/wayland-client.c:792
792		va_start(ap, opcode);
#0  wl_proxy_marshal (proxy=0x0, opcode=2) at src/wayland-client.c:792
#1  0x00005555555bc162 in wl_surface_damage (wl_surface=0x0, x=0, y=0, width=1280, height=907) at /usr/local/include/wayland-client-protocol.h:3733
#2  0x00005555555bd00e in display_surface_commit (surface=0x5555558da1d0) at ../source/wayland/display.c:277
#3  0x00005555555bb9ff in wayland_rofi_view_update (state=0x5555557a8b00, qr=1) at ../source/wayland/view.c:322
#4  0x00005555555bba7d in wayland_rofi_view_maybe_update (state=0x5555557a8b00) at ../source/wayland/view.c:355
#5  0x00005555555bb215 in wayland_rofi_view_repaint (data=0x0) at ../source/wayland/view.c:106
#6  0x00007ffff7eb17ef in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007ffff7f04d28 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007ffff7eb0e53 in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x0000555555585c77 in main (argc=7, argv=0x7fffffffdcb8) at ../source/rofi.c:1103

Additional information

No response

[BUG] Missing "width" and "lines"options

Rofi version (rofi -v)

1.7.3+wayland1-2-g396b13f5 (wayland)

Configuration

https://gist.github.com/luispabon/f42ed198f973f9d71ab021dec98e88b0

Launch command

rofi -show drun -width 10 -lines 3

Step to reproduce

Basically as per launch command.

Expected behavior

A rofi window 20px by 3 lines should appear.

Actual behavior

The window has the same size as merely running rofi -show drun

Additional information

The options don't seem to have any effect, like they do on original rofi. They also don't show on rofi -h or the man page either.

[BUG] -click-to-exit not working

Version

Output of rofi -v
1.6.1-wayland

Configuration

Output of rofi -help (in a gist, please paste the full output)
https://gist.github.com/ram02z/07c7888924bbe35068d7c3883b308c55

Launch Command

The commandline used to launch **rofi**
rofi -show

Steps to reproduce

  • Step 1: run rofi -click-to-exit -show
  • Step 2: Press outside of the rofi window

What behaviour you see

Nothing happens. Excuse my ignorance, but is this expected due to how wayland works?

What behaviour you expect to see

The rofi window closes.

Additional details:
The issue persists with the default config.

Please do not submit reports related to wayland, see
here for more
information.

[BUG] Rofi faulting after updating to KDE 5.26

Rofi version (rofi -v)

e861df3

Configuration

N/A

Theme

N/A

Timing report

No response

Launch command

rofi

Step to reproduce

Launch rofi

Expected behavior

Does not crash

Actual behavior

Crashes with

$ build/rofi                                                                                         
listener function for opcode 1 of wl_data_offer is NULL
[1]    203080 IOT instruction (core dumped)  build/rofi

Additional information

I've run into an issue where rofi crashes when launched after updating to the recently released KDE 5.26, I've managed to fix the issue temporarily with these changes to the code waicool20@5f207ae
I'm not sure if this is the right change to be making since I'm not familiar with wayland (eg. might not work if I revert back to older KDE or other DEs) hence I've not put up a PR.

[BUG]


First read the guidelines!
This is not optional for any report/question. People must be able to understand the full context of the report when reading it, at any time.
If you feel like you “just have a simple question”, please consider you’re wrong and still fill the full report.
Any report missing these informations will be labeled as “Incomplete Report - Please follow the guidelines” and may not be answered in a timely fashion.

Version

Output of rofi -v

Version: 1.6.0-23-gf0139710 (makepkg)

Configuration

Output of rofi -help (in a gist, please paste the full output)
rofi config

Launch Command

The commandline used to launch **rofi**
rofi

Steps to reproduce

  • Just run rofi on wayland

What behaviour you see

What behaviour you expect to see

  • The rofi window opens as expected

Additional details:

Please do not submit reports related to wayland, see
here for more
information.

[REQUEST] Implement window switching using wlr_foreign_toplevel_management_unstable_v1

Before opening a feature request

  • I checked the next branch to see if the feature has already been implemented
  • I searched existing reports to see if it is already requested.

What is the user problem or growth opportunity you want to see solved?

I would like to switch windows in rofi

How do you know that this problem exists today? Why is this important?

Switching windows is supported in mainline rofi

Who will benefit from it?

Users without a dock or another way to switch windows. I am on wayfire which means I can have an overview of all windows using the scale plugin but sometimes I forget I have an app open and try to open it again using rofi and wonder why it doesn't work.

Rofi version (rofi -v)

1.7.5

Configuration

https://gist.github.com/FriederHannenheim/0fabc001a2caa54460bf53132661ed9d

Additional information

No response

[BUG] fullscreen: true;

version: latest from aur.
If use in theme fullscreen: true; like this:

window {
  transparency: "real";
  fullscreen: true;
  background-color: #282c34dd;
}

it's not working out very well.
screenshot

[BUG] Installing from any release on Ubuntu fails at the `make` step

Rofi version (rofi -v)

Latest release 1.7.2+wayland1 (reproducible on all three releases)

Configuration

https://gist.github.com/Gleland/517864371010824dbbf58cfe62faed3d

Launch command

make

Step to reproduce

On the latest Ubuntu release (21.10, Impish Indri), with all the listed packages installed (they are typically -dev as described) , download rofi-1.7.2+wayland1.tar.gz locally and place in desired directory.
Then follow the steps to build from source:

tar xvf  rofi-1.7.2+wayland1.tar.gz
cd rofi-1.7.2+wayland1/
mkdir build
autoreconf -i
cd build/
make

Expected behavior

make and make install should produce a working version of rofi in /usr/local/bin.

Actual behavior

See this gist for the full output, the make command fails due to two undefined references:

/usr/bin/ld: source/rofi-rofi.o: in function `main':
/home/thogarre/workplace/rofi-1.7.2+wayland1/build/../source/rofi.c:897: undefined reference to `display_init'
/usr/bin/ld: source/rofi-view.o: in function `rofi_view_create':
/home/thogarre/workplace/rofi-1.7.2+wayland1/build/../source/view.c:1355: undefined reference to `display_set_input_focus'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:2418: rofi] Error 1
make[1]: Leaving directory '/home/thogarre/workplace/rofi-1.7.2+wayland1/build'
make: *** [Makefile:1983: all] Error 2`

Additional information

If there's any additional information that would be helpful, please let me know. Thank you for your time!

[BUG] fails to build: libgwater/xcb.wrap file not found

Versions

  • git 2.25.1
  • meson 0.55.0

Steps to reproduce

What behaviour you see

The Meson build system
Version: 0.55.0
Source dir: /home/mark/git/rofi
Build dir: /home/mark/git/rofi/build
Build type: native build
WARNING: Unknown options: "xwayland"
The value of new options can be set with:
meson setup <builddir> --reconfigure -Dnew_option=new_value ...
Project name: rofi
Project version: 1.5.4-dev
C compiler for the host machine: cc (gcc 9.3.0 "cc (Ubuntu 9.3.0-10ubuntu2) 9.3.0")
C linker for the host machine: cc ld.bfd 2.34
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -Wparentheses: YES
Compiler for C supports arguments -Winline: YES
Compiler for C supports arguments -Wunreachable-code: YES
Compiler for C supports arguments -Werror=missing-prototypes: YES
Compiler for C supports arguments -Wno-inline -Winline: YES
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Run-time dependency glib-2.0 found: YES 2.64.3
Run-time dependency gmodule-2.0 found: YES 2.64.3
Run-time dependency cairo found: YES 1.16.0
Run-time dependency gio-unix-2.0 found: YES 2.64.3
Run-time dependency pango found: YES 1.44.7
Run-time dependency pangocairo found: YES 1.44.7
Run-time dependency xkbcommon found: YES 0.10.0
Run-time dependency librsvg-2.0 found: YES 2.48.7
Run-time dependency libjpeg found: YES 2.0.3
Library m found: YES
meson.build:56: WARNING: Subproject name has a path separator. This may cause unexpected behaviour.

meson.build:55:0: ERROR: Subproject directory not found and libgwater/xcb.wrap file not found

What behaviour you expect to see

  • ...

Additional details:

There is not a libgwater directory, but there is subprojects/libgwater folder, but it does not contain an "xcb.wrap" file.

[BUG] -monitor -1 does't behave as it should

Rofi version (rofi -v)

1.7.5

Configuration

https://pastebin.com/GCeK1v8k

Theme

https://pastebin.com/vQYnTn6D

Timing report

No response

Launch command

rofi -show drun -monitor -1

Step to reproduce

On sway, run 'rofi -show drun' having at least 2 monitors. → (I have 6)

Expected behavior

Rofi opens in the active monitor.

Actual behavior

Rofi will fail to detect the active monitor, and it will display on a different one.

Additional information

No response

[BUG] - Private desktop files not shown in run

Version

Output of rofi -v
Version: 1.6.0-65-g87b48ce7 (makepkg)

Configuration

Output of rofi -help (in a gist, please paste the full output)
gist

Launch Command

The commandline used to launch **rofi**
rofi -show

Steps to reproduce

Just run rofi

What behaviour you see

Desktop files under ~/.config/autostart/ are not shown in the drun output.

What behaviour you expect to see

All files should be present

Cant install from AUR - some libnkutils/format-string error [BUG]

Rofi version (rofi -v)

1.7.3.wayland1.r51.g1e8c22b4-1 (from AUR)

Configuration

Irrelevant (can't install)

Launch command

yay -S rofi-lbonn-wayland-git

Step to reproduce

yay -S rofi-lbonn-wayland-git

Expected behavior

Install on the system

Actual behavior

3/18 libnkutils:format-string / libnkutils format-string module tests ERROR 0.04s exit status 1
MALLOC_PERTURB_=185 /home/erlonbie/.cache/yay/rofi-lbonn-wayland-git/src/build/subprojects/libnkutils/nk-format-string.test --tap

image

Additional information

I installed this package in a very similar machine (almost same programs installed) and had no issue.

[BUG] Rofi-lbonn doesn't respect cursor theme & size in sway

Version

Output of rofi -v
Version: 1.6.1-wayland

Launch Command

The commandline used to launch **rofi**
rofi -modi drun -show drun

Steps to reproduce

run sway
run rofi-lbonn variant in sway

What behaviour you see

  • mouse cursor changes size when hovered over rofi
  • mouse cursor theme also changes

What behaviour you expect to see

  • mouse cursor size remains constant
  • mouse cursor theme is correctly applied

Additional details:

2021-01-26.mp4

[REQUEST] docs for window switching in sway

The docs say "Window mode when running in Wayland mode." doesn't work "though it can be emulated in dmenu mode on some compositors (ie: Sway IPC)"

How does the emulation with dmenu mode work on Sway? What's the syntax to use it. It could be helpful to add that to the docs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.