Repository: davatorium/rofi Branch: next Commit: 92f19220ddbd Files: 299 Total size: 2.9 MB Directory structure: gitextract__m24situ/ ├── .build.yml ├── .clang-tidy ├── .gitattributes ├── .github/ │ ├── CONTRIBUTING.md │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.yml │ │ ├── config.yml │ │ ├── documentation_report.yml │ │ └── feature_request.yml │ ├── actions/ │ │ ├── doxycheck/ │ │ │ └── action.yml │ │ ├── meson/ │ │ │ └── action.yml │ │ ├── release/ │ │ │ └── action.yml │ │ └── setup/ │ │ └── action.yml │ ├── pull_request_template.md │ └── workflows/ │ ├── build.yml │ ├── codeql.yml │ ├── lock.yml │ ├── main.yml │ ├── mkdocs.yml │ └── publish-release.yml ├── .gitignore ├── .gitlab-ci.yml ├── .gitmodules ├── .mailmap ├── AUTHORS ├── CODE_OF_CONDUCT.md ├── CONFIG.md ├── COPYING ├── Changelog ├── Examples/ │ ├── i3_empty_workspace.sh │ ├── i3_switch_workspaces.sh │ ├── rofi-file-browser.sh │ ├── test_script_env.sh │ ├── test_script_mode.sh │ ├── test_script_mode_color.sh │ └── test_script_mode_delim.sh ├── INSTALL.md ├── README.md ├── config/ │ └── config.c ├── data/ │ ├── rofi-theme-selector.desktop │ └── rofi.desktop ├── doc/ │ ├── README.md │ ├── default_configuration.rasi │ ├── default_theme.rasi │ ├── man_filter.lua │ ├── meson.build │ ├── rofi-actions.5.markdown │ ├── rofi-debugging.5.markdown │ ├── rofi-dmenu.5.markdown │ ├── rofi-keys.5.markdown │ ├── rofi-script.5.markdown │ ├── rofi-sensible-terminal.1.markdown │ ├── rofi-theme-selector.1.markdown │ ├── rofi-theme.5.markdown │ ├── rofi-thumbnails.5.markdown │ ├── rofi.1.markdown │ └── rofi.doxy.in ├── include/ │ ├── css-colors.h │ ├── display-internal.h │ ├── display.h │ ├── helper-theme.h │ ├── helper.h │ ├── history.h │ ├── input-codes.h │ ├── keyb.h │ ├── mode-private.h │ ├── mode.h │ ├── modes/ │ │ ├── combi.h │ │ ├── dmenu.h │ │ ├── dmenuscriptshared.h │ │ ├── drun.h │ │ ├── filebrowser.h │ │ ├── help-keys.h │ │ ├── modes.h │ │ ├── recursivebrowser.h │ │ ├── run.h │ │ ├── script.h │ │ ├── ssh.h │ │ ├── wayland-window.h │ │ └── window.h │ ├── rofi-icon-fetcher.h │ ├── rofi-types.h │ ├── rofi.h │ ├── settings.h │ ├── theme.h │ ├── timings.h │ ├── view-internal.h │ ├── view.h │ ├── wayland-internal.h │ ├── wayland.h │ ├── widgets/ │ │ ├── box.h │ │ ├── container.h │ │ ├── icon.h │ │ ├── listview.h │ │ ├── scrollbar.h │ │ ├── textbox.h │ │ ├── widget-internal.h │ │ └── widget.h │ ├── xcb-dummy.h │ ├── xcb-internal.h │ ├── xcb.h │ └── xrmoptions.h ├── lexer/ │ ├── theme-lexer.l │ └── theme-parser.y ├── meson-dist-script ├── meson.build ├── meson_options.txt ├── mkdocs/ │ ├── docs/ │ │ ├── 1.7.0/ │ │ │ ├── rofi-script.5.markdown │ │ │ ├── rofi-theme.5.markdown │ │ │ └── rofi.1.markdown │ │ ├── 1.7.1/ │ │ │ ├── rofi-script.5.markdown │ │ │ ├── rofi-theme.5.markdown │ │ │ └── rofi.1.markdown │ │ ├── 1.7.2/ │ │ │ ├── rofi-script.5.markdown │ │ │ ├── rofi-theme.5.markdown │ │ │ └── rofi.1.markdown │ │ ├── 1.7.3/ │ │ │ ├── rofi-debugging.5.markdown │ │ │ ├── rofi-dmenu.5.markdown │ │ │ ├── rofi-keys.5.markdown │ │ │ ├── rofi-script.5.markdown │ │ │ ├── rofi-theme.5.markdown │ │ │ └── rofi.1.markdown │ │ ├── 1.7.4/ │ │ │ ├── rofi-debugging.5.markdown │ │ │ ├── rofi-dmenu.5.markdown │ │ │ ├── rofi-keys.5.markdown │ │ │ ├── rofi-script.5.markdown │ │ │ ├── rofi-theme.5.markdown │ │ │ └── rofi.1.markdown │ │ ├── 1.7.5/ │ │ │ ├── rofi-debugging.5.markdown │ │ │ ├── rofi-dmenu.5.markdown │ │ │ ├── rofi-keys.5.markdown │ │ │ ├── rofi-script.5.markdown │ │ │ ├── rofi-theme.5.markdown │ │ │ └── rofi.1.markdown │ │ ├── 1.7.6/ │ │ │ ├── rofi-debugging.5.markdown │ │ │ ├── rofi-dmenu.5.markdown │ │ │ ├── rofi-keys.5.markdown │ │ │ ├── rofi-script.5.markdown │ │ │ ├── rofi-sensible-terminal.1.markdown │ │ │ ├── rofi-theme-selector.1.markdown │ │ │ ├── rofi-theme.5.markdown │ │ │ ├── rofi-thumbnails.5.markdown │ │ │ └── rofi.1.markdown │ │ ├── 1.7.7/ │ │ │ ├── rofi-debugging.5.markdown │ │ │ ├── rofi-dmenu.5.markdown │ │ │ ├── rofi-keys.5.markdown │ │ │ ├── rofi-script.5.markdown │ │ │ ├── rofi-sensible-terminal.1.markdown │ │ │ ├── rofi-theme-selector.1.markdown │ │ │ ├── rofi-theme.5.markdown │ │ │ ├── rofi-thumbnails.5.markdown │ │ │ └── rofi.1.markdown │ │ ├── 1.7.8/ │ │ │ ├── rofi-debugging.5.markdown │ │ │ ├── rofi-dmenu.5.markdown │ │ │ ├── rofi-keys.5.markdown │ │ │ ├── rofi-script.5.markdown │ │ │ ├── rofi-sensible-terminal.1.markdown │ │ │ ├── rofi-theme-selector.1.markdown │ │ │ ├── rofi-theme.5.markdown │ │ │ ├── rofi-thumbnails.5.markdown │ │ │ └── rofi.1.markdown │ │ ├── 1.7.9/ │ │ │ ├── rofi-actions.5.markdown │ │ │ ├── rofi-debugging.5.markdown │ │ │ ├── rofi-dmenu.5.markdown │ │ │ ├── rofi-keys.5.markdown │ │ │ ├── rofi-script.5.markdown │ │ │ ├── rofi-theme.5.markdown │ │ │ ├── rofi-thumbnails.5.markdown │ │ │ └── rofi.1.markdown │ │ ├── 2.0.0/ │ │ │ ├── rofi-actions.5.markdown │ │ │ ├── rofi-debugging.5.markdown │ │ │ ├── rofi-dmenu.5.markdown │ │ │ ├── rofi-keys.5.markdown │ │ │ ├── rofi-script.5.markdown │ │ │ ├── rofi-sensible-terminal.1.markdown │ │ │ ├── rofi-theme-selector.1.markdown │ │ │ ├── rofi-theme.5.markdown │ │ │ ├── rofi-thumbnails.5.markdown │ │ │ └── rofi.1.markdown │ │ ├── downloads.md │ │ ├── guides/ │ │ │ ├── DynamicThemes/ │ │ │ │ └── dynamic_themes.md │ │ │ ├── Plugins/ │ │ │ │ └── 2017-04-19-rofi-140-sneak-preview-plugins.md │ │ │ ├── Positioning/ │ │ │ │ └── theme3-positioning.markdown │ │ │ └── Transparency/ │ │ │ └── theme3-transparency.markdown │ │ ├── index.md │ │ └── themes/ │ │ ├── capture.sh │ │ └── themes.md │ └── mkdocs.yml ├── pkgconfig/ │ └── rofi.pc.in ├── protocols/ │ ├── wlr-foreign-toplevel-management-unstable-v1.xml │ └── wlr-layer-shell-unstable-v1.xml ├── releasenotes/ │ ├── 0.15.12/ │ │ └── release-0.15.12.markdown │ ├── 1.0.0/ │ │ └── release-1.0.0.markdown │ ├── 1.1.0/ │ │ └── release-1.1.0.markdown │ ├── 1.2.0/ │ │ └── release-1.2.0.markdown │ ├── 1.3.0/ │ │ └── release-1.3.0.markdown │ ├── 1.3.1/ │ │ └── release-1.3.1.markdown │ ├── 1.4.0/ │ │ └── release-1.4.0.markdown │ ├── 1.5.0/ │ │ └── release-1.5.0.markdown │ ├── 1.5.2/ │ │ └── release-1.5.2.markdown │ ├── 1.5.3/ │ │ └── release-1.5.3.markdown │ ├── 1.6.0/ │ │ └── release-1.6.0.markdown │ ├── 1.6.1/ │ │ └── release-1.6.1.markdown │ ├── 1.7.0/ │ │ └── release-1.7.0.markdown │ ├── 1.7.1/ │ │ └── release-1.7.1.markdown │ ├── 1.7.2/ │ │ └── release-1.7.2.markdown │ ├── 1.7.3/ │ │ └── release-1.7.3.markdown │ ├── 1.7.4/ │ │ └── release-1.7.4.markdown │ ├── 1.7.5/ │ │ └── release-1.7.5.markdown │ ├── 1.7.6/ │ │ └── release-1.7.6.markdown │ ├── 1.7.7/ │ │ └── release-1.7.7.markdown │ ├── 1.7.8/ │ │ └── release-1.7.8.markdown │ ├── 1.7.9/ │ │ └── release-1.7.9.markdown │ └── 2.0.0/ │ └── release-2.0.0.markdown ├── resources/ │ └── resources.xml ├── script/ │ ├── get_git_rev.sh │ ├── rofi-sensible-terminal │ └── rofi-theme-selector ├── source/ │ ├── css-colors.c │ ├── display.c │ ├── helper.c │ ├── history.c │ ├── keyb.c │ ├── mode.c │ ├── modes/ │ │ ├── combi.c │ │ ├── dmenu.c │ │ ├── drun.c │ │ ├── filebrowser.c │ │ ├── help-keys.c │ │ ├── recursivebrowser.c │ │ ├── run.c │ │ ├── script.c │ │ ├── ssh.c │ │ ├── wayland-window.c │ │ └── window.c │ ├── rofi-icon-fetcher.c │ ├── rofi-types.c │ ├── rofi.c │ ├── theme.c │ ├── timings.c │ ├── view.c │ ├── wayland/ │ │ ├── display.c │ │ └── view.c │ ├── widgets/ │ │ ├── box.c │ │ ├── container.c │ │ ├── icon.c │ │ ├── listview.c │ │ ├── scrollbar.c │ │ ├── textbox.c │ │ └── widget.c │ ├── xcb/ │ │ ├── display.c │ │ └── view.c │ └── xrmoptions.c ├── test/ │ ├── box-test.c │ ├── helper-config-cmdline-parser.c │ ├── helper-expand.c │ ├── helper-pidfile.c │ ├── helper-test.c │ ├── helper-tokenize.c │ ├── history-test.c │ ├── mode-test.c │ ├── scrollbar-test.c │ ├── textbox-test.c │ ├── theme-parser-test.c │ └── widget-test.c └── themes/ ├── Adapta-Nokto.rasi ├── Arc-Dark.rasi ├── Arc.rasi ├── DarkBlue.rasi ├── Indego.rasi ├── Monokai.rasi ├── Paper.rasi ├── android_notification.rasi ├── arthur.rasi ├── blue.rasi ├── breaking-themes/ │ ├── 2076.rasi │ └── readme.md ├── c64.rasi ├── dmenu.rasi ├── docu.rasi ├── fancy.rasi ├── fancy2.rasi ├── fullscreen-preview.rasi ├── glue_pro_blue.rasi ├── gruvbox-common.rasinc ├── gruvbox-dark-hard.rasi ├── gruvbox-dark-soft.rasi ├── gruvbox-dark.rasi ├── gruvbox-light-hard.rasi ├── gruvbox-light-soft.rasi ├── gruvbox-light.rasi ├── iggy.rasi ├── lb.rasi ├── material.rasi ├── paper-float.rasi ├── purple.rasi ├── sidebar-v2.rasi ├── sidebar.rasi ├── solarized.rasi └── solarized_alternate.rasi ================================================ FILE CONTENTS ================================================ ================================================ FILE: .build.yml ================================================ image: ubuntu/lts packages: - meson - ninja-build - autoconf - automake - build-essential - libpango1.0-dev - libstartup-notification0-dev - libxcb-ewmh-dev - libxcb-icccm4-dev - libxcb-randr0-dev - libxcb-util0-dev - libxcb-xinerama0-dev - libxcb-xkb-dev - libxcb-xrm-dev - libxcb-cursor-dev - libxcb-imdkit-dev - libxcb-keysyms1 - libxkbcommon-dev - libxkbcommon-dev - libxkbcommon-x11-dev - libgdk-pixbuf2.0-dev - ninja-build - pandoc - check - flex - bison - libglib2.0-dev-bin - doxygen sources: - https://sr.ht/~qball/rofi/ tasks: - setup: | cd rofi meson setup builddir . -Db_lto=true - build: | ninja -C rofi/builddir - test: | ninja -C rofi/builddir test - doxygen: | ninja -C rofi/builddir/ doc/html > doxygen.log 2>&1 if [ $(grep -c warnings doxygen.log) -gt 0 ]; then exit 1; fi - dist: | ninja -C rofi/builddir dist artifacts: - rofi/builddir/meson-dist/rofi-1.7.8-dev.tar.xz ================================================ FILE: .clang-tidy ================================================ Checks: -clang-analyzer-optin.core.EnumCastOutOfRange ================================================ FILE: .gitattributes ================================================ .build.yml export-ignore .gitattributes export-ignore .gitignore export-ignore .mailmap export-ignore .github export-ignore .gitlab-ci.yml export-ignore .gitmodules export-ignore .travis.yml export-ignore releasenotes export-ignore doc/*.png export-ignore doc/help-output.txt export-ignore doc/sizing.svg export-ignore doc/Notes export-ignore doc/old-theme-convert-output.rasi export-ignore doc/test_xr.txt export-ignore doc/create_screenshot.sh export-ignore mkdocs export-ignore script/*.jpg export-ignore ================================================ FILE: .github/CONTRIBUTING.md ================================================ When reporting bugs keep in mind that the people working on it do this unpaid, in their free time and as a hobby. So be polite and helpful. Reports that demand, contain insults to this or other projects, or have a general unfriendly tone will be closed without discussion. Everybody has it own way of working; What might be the norm for you, might not be for others. Therefore be verbose in your description. **The issue tracker is for bugs only.** This is an attempt to keep the issue tracker clean and searchable. Questions or discussions about new features belong on [GITHUB Discussions](https://github.com/davatorium/rofi/discussions) or [FORUM](https://reddit.com/r/qtools/), [IRC](https://webchat.freenode.net/?channels=#rofi), frequently asked questions will be added to the [F.A.Q](https://github.com/DaveDavenport/rofi/wiki#faq) on the [wiki](https://github.com/DaveDavenport/rofi/wiki). Questions filled in on the bug tracker will be marked `question`, locked and closed. It is preferred to have feature requests discussed via [GITHUB Discussions](https://github.com/davatorium/rofi/discussions) or [FORUM](https://reddit.com/r/qtools/) or [IRC](https://webchat.freenode.net/?channels=#rofi) first. # Creating a bug report Please write your bug reports in clear English. Before creating a bug report: * Update to the latest version. Check if problem still exists. * Check existing bug reports, see if it is already reported. * Read the documentation. Make sure the behaviour you are seeing is a bug. When reporting bugs include the following information: * Rofi version. rofi -v * Rofi configuration. rofi -help (in a [gist](https://gist.github.com/)) * Steps to reproduce. * What behaviour you see. * What behaviour you expect to see. * A proper title for others to search for. * Be exact. When adding comments to an issue make sure: * It is relevant to the issue. * It contributes to solving the issue. * Use :+1: :-1: emojis instead of replying 'me too' or 'I also have this.' * Do **NOT** ask for an update. Asking does not contribute to solving the issue and just annoys people with a notification. The answer is already available; if there is an update it will be linked/mentioned in the issue, otherwise there is no update. Issue high-jacking, e.g. adding a request/issue to an existing issue, is very disruptive. Please create a new issue, if it is similar it will be marked duplicate. # Creating a feature request Before creating a feature request: * First check the *next* branch, to see if the feature has already been implemented. * Check existing reports, see if it is already requested. When reporting a feature request include the following information: * Rofi version and other information. (rofi -info) * A clear description of the feature you want added. * A use-case for the feature. If possible try to explain how you would expect to use feature. For example, should it be a configuration option or a hot-key. Requesting a feature is no guarantee it will be added. ================================================ FILE: .github/ISSUE_TEMPLATE/bug_report.yml ================================================ name: Bug Report description: Report a problem in Rofi labels: [bug] title: "[BUG] " body: - type: markdown attributes: value: | First read the [guidelines](https://github.com/DaveDavenport/rofi/blob/next/.github/CONTRIBUTING.md)! This is not optional for any report. People must be able to understand the full context of the report when reading it, at any time. If you feel like you “it is simple and requires no explanation”, please consider you’re wrong and still fill the full report. What is clear to you might not be clear to somebody else. Any report missing required informations will be labeled as “Incomplete Report - Please follow the guidelines” and will be closed. If you ask a question, enter dummy information in required fields to get past the checks or in general completely ignore the guidelines, the issue will be closed and locked as spam. This includes filling in 'Distro X defaults', we don't know and cannot keep track of what each distribution ships as a default. If you are unsure, please use the [discussion](https://github.com/davatorium/rofi/discussions) forum first. It is easy to upgrade a question to an issue in github. If you report problems with speed in rofi, please attach a [timing trace](https://github.com/davatorium/rofi/blob/next/doc/rofi-debugging.5.markdown#timing-traces). If you have a problem that only occurs when launching rofi from a keybinding. First check that the environment the keybinding passes to rofi is correct. - type: input attributes: label: "Rofi version (rofi -v or git commit in case of build issue)" placeholder: "Version: 1.7.5" validations: required: true - type: input attributes: label: "Configuration" description: | Please use https://gist.github.com and include output of `rofi -info` and `rofi -dump-config`. Anything that is not a link to valid output, will not be accepted. placeholder: "Gist URL" validations: required: true - type: input attributes: label: "Theme" description: | Please use https://gist.github.com and include output of `rofi -dump-theme`. Anything that is not a link to valid output, will not be accepted. placeholder: "Gist URL" validations: required: true - type: input attributes: label: "Timing report" description: | Please use https://gist.github.com and include output of your command with G_MESSAGES_DEBUG=Timings set. placeholder: "Gist URL" validations: required: false - type: input attributes: label: "Launch command" placeholder: "rofi -show drun" validations: required: true - type: textarea attributes: label: "Step to reproduce" placeholder: | * Step 1 * Step 2 * ... validations: required: true - type: textarea attributes: label: "Expected behavior" description: "Describe the behavior you expect. May include logs, images, or videos." validations: required: true - type: textarea attributes: label: "Actual behavior" validations: required: true - type: textarea attributes: label: "Additional information" validations: required: false - type: checkboxes id: latestversion attributes: label: I've checked if the issue exists in the latest stable release description: I confirm that I verified the issue still exists in the latest stable release. options: - label: "Yes, I have checked the problem exists in the latest stable version" required: false ================================================ FILE: .github/ISSUE_TEMPLATE/config.yml ================================================ blank_issues_enabled: false contact_links: - name: discussion forum url: https://github.com/davatorium/rofi/discussions about: Please ask and answer questions here. - name: Rofi IRC channel url: https://web.libera.chat/?channels=#rofi about: Please ask and answer question in real time here. ================================================ FILE: .github/ISSUE_TEMPLATE/documentation_report.yml ================================================ name: Documentation Bug Report description: Report a problem in Rofi Documentation labels: [Documentation] title: "[Doc] " body: - type: markdown attributes: value: | First read the [guidelines](https://github.com/DaveDavenport/rofi/blob/next/.github/CONTRIBUTING.md)! This is not optional for any report. People must be able to understand the full context of the report when reading it, at any time. If you feel like you “it is simple and requires no explanation”, please consider you’re wrong and still fill the full report. Any report missing required informations will be labeled as “Incomplete Report - Please follow the guidelines” and will be closed. If you ask a question, enter dummy information in required fields to get passed the checks or in general completely ignore the guidelines, the issue will be closed and locked as spam. If you are unsure, please use the [discussion](https://github.com/davatorium/rofi/discussions) forum first. It is easy to upgrade a question to an issue in github. **Please do not submit reports related to wayland, see [here](https://github.com/DaveDavenport/rofi/wiki/Wayland) for more information.** - type: input attributes: label: "Rofi version (rofi -v)" placeholder: "Version: 1.7.5" validations: required: true - type: input attributes: label: "URL" description: "Please provide a link to the relevant documentation." placeholder: "link to page on https://davatorium.github.io/rofi/ or file on https://github.com/davatorium/rofi/" validations: required: true - type: textarea attributes: label: "Explain the issue with the documentation, please be verbose." placeholder: | * What am I trying to achieve .. * What instructions are unclear, wrong or missing .. * Suggestions for improving the current documentation .. validations: required: true - type: textarea attributes: label: "Optional fixed text" description: "Suggested new and or improved text for documentation." validations: required: false - type: checkboxes id: wayland attributes: label: Using wayland display server protocol description: I have checked and confirm that my issue is not related to running rofi using wayland as display server protocol. See [here](https://github.com/DaveDavenport/rofi/wiki/Wayland) for more information. options: - label: "No, my documentation issue is not about running rofi using the wayland display server protocol" required: true - type: checkboxes id: latestversion attributes: label: I've checked if the issue exists in the latest stable release description: I confirm that I verified the issue still exists in the latest stable release. options: - label: "Yes, I have checked the problem exists in the latest stable version" required: false ================================================ FILE: .github/ISSUE_TEMPLATE/feature_request.yml ================================================ name: Feature Request description: It'd be cool if rofi did/had/would... labels: Feature Request title: "[REQUEST] " body: - type: markdown attributes: value: | First read the [guidelines](https://github.com/DaveDavenport/rofi/blob/next/.github/CONTRIBUTING.md)! 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. If you are unsure, please use the [discussion](https://github.com/davatorium/rofi/discussions) forum first. It is easy to upgrade a question to an issue in github. **Requesting a feature is no guarantee it will be added.** - type: checkboxes id: before-feature-request attributes: label: Before opening a feature request options: - label: I checked the *next* branch to see if the feature has already been implemented required: true - label: I searched existing reports to see if it is already requested. required: true - type: textarea attributes: label: "What is the user problem or growth opportunity you want to see solved?" validations: required: true - type: textarea attributes: label: "How do you know that this problem exists today? Why is this important?" validations: required: true - type: textarea attributes: label: "Who will benefit from it?" validations: required: true - type: input attributes: label: "Rofi version (rofi -v)" placeholder: "Version: 1.6.0" validations: required: true - type: input attributes: label: "Configuration & Information" description: "Please use https://gist.github.com and include output of `rofi -info`, `rofi -dump-config` and `rofi -dump-theme`." placeholder: "Gist URL" validations: required: true - type: textarea attributes: label: "Additional information" validations: required: false ================================================ FILE: .github/actions/doxycheck/action.yml ================================================ name: Doxygen Check description: Checks for Doxygen warnings runs: using: composite steps: - id: doxy run: ninja -C builddir doc/html > builddir/doxygen.log 2>&1 shell: bash - id: check run: | if [[ "$(grep -c warning: builddir/doxygen.log)" != 0 ]]; then echo echo Doxygen warnings found: grep warning builddir/doxygen.log echo exit 1 fi python ./doxy-coverage/doxy-coverage.py builddir/doc/html/xml/ shell: bash ================================================ FILE: .github/actions/meson/action.yml ================================================ name: Meson Build description: Builds Rofi using Meson inputs: cc: description: Compiler to use required: true xcb: description: Enable xcb backend default: enabled wayland: description: Enable wayland backend default: enabled runs: using: composite steps: - id: pip run: pip install meson ninja shell: bash - id: setup run: meson setup builddir -Dxcb=${{ inputs.xcb }} -Dwayland=${{ inputs.wayland }} shell: bash env: CC: ${{ inputs.cc }} - id: build run: ninja -C builddir shell: bash - id: test run: ninja -C builddir test shell: bash ================================================ FILE: .github/actions/release/action.yml ================================================ name: Upload dist description: Create distribution file and upload to release runs: using: composite steps: - id: dist run: meson dist -C builddir --include-subprojects --formats xztar,gztar --no-tests shell: bash - id: upload uses: actions/upload-artifact@v4 with: name: release_tarballs-${{ github.ref_name }} path: | builddir/meson-dist/*.tar.xz builddir/meson-dist/*.tar.gz - id: create_release uses: softprops/action-gh-release@v2 with: draft: true files: | builddir/meson-dist/*.tar.xz builddir/meson-dist/*.tar.gz ================================================ FILE: .github/actions/setup/action.yml ================================================ name: CI Build Setup description: Sets up build dependencies inputs: xcb: description: Install xcb dependencies default: 'true' wayland: description: Install wayland dependencies default: 'true' runs: using: composite steps: - id: python uses: actions/setup-python@v4 with: python-version: '3.x' - id: apt run: | sudo apt-get update sudo apt-get install -y \ discount \ doxygen \ fluxbox \ gdb \ graphviz \ jq \ lcov \ libpango1.0-dev \ libxkbcommon-dev \ libxkbcommon-dev \ libxkbcommon-x11-dev \ libgdk-pixbuf-2.0-dev \ ninja-build \ pandoc \ python3-pip \ python3-setuptools \ python3-wheel \ texi2html \ texinfo \ xdotool \ xfonts-base \ xterm \ xutils-dev shell: bash - id: doxy run: git clone https://github.com/davatorium/doxy-coverage shell: bash - id: apt-wayland if: ${{ inputs.wayland == 'true' }} run: | sudo apt-get install -y \ libwayland-dev \ wayland-protocols shell: bash - id: apt-xcb if: ${{ inputs.xcb == 'true' }} run: | sudo apt-get install -y \ libstartup-notification0-dev \ libxcb-ewmh-dev \ libxcb-icccm4-dev \ libxcb-randr0-dev \ libxcb-util0-dev \ libxcb-xinerama0-dev \ libxcb-xkb-dev \ libxcb-xrm-dev \ libxcb-cursor-dev \ libxcb-imdkit-dev shell: bash - id: check run: | curl -L https://github.com/libcheck/check/releases/download/0.15.2/check-0.15.2.tar.gz | tar xzf - cd check-0.15.2 ./configure make sudo make install sudo ldconfig shell: bash ================================================ FILE: .github/pull_request_template.md ================================================ > Please follow these steps before submitting your PR: > > - [ ] This PR targets the `next` branch and not `master` > - [ ] If your PR is a work in progress, include [WIP] in its title > - [ ] Its commits' summaries are reasonably descriptive > - [ ] You've described what this PR addresses below > - [ ] You've included links to relevant issues, if any with `#issue_num` > - [ ] You've deleted this template > > Thank you for contributing to rofi! <3 Your description here... ================================================ FILE: .github/workflows/build.yml ================================================ name: CI Build on: push: branches: - next paths-ignore: - "**.md" - "**.markdown" - "**.rasi" pull_request: paths-ignore: - "**.md" - "**.markdown" - "**.rasi" jobs: build-gcc: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: submodules: recursive - uses: ./.github/actions/setup - uses: ./.github/actions/meson with: cc: gcc - uses: ./.github/actions/doxycheck build-clang: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: submodules: recursive - uses: ./.github/actions/setup - uses: ./.github/actions/meson with: cc: clang build-gcc-wayland-only: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: submodules: recursive - uses: ./.github/actions/setup with: xcb: false - uses: ./.github/actions/meson with: cc: gcc xcb: disabled build-gcc-xcb-only: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: submodules: recursive - uses: ./.github/actions/setup with: wayland: false - uses: ./.github/actions/meson with: cc: gcc wayland: disabled ================================================ FILE: .github/workflows/codeql.yml ================================================ name: "CodeQL" on: push: branches: [ 'next', 'master' ] pull_request: # The branches below must be a subset of the branches above branches: [ 'next' ] schedule: - cron: '59 13 * * 3' jobs: analyze: name: Analyze runs-on: ubuntu-latest permissions: actions: read contents: read security-events: write strategy: fail-fast: false matrix: language: [ 'cpp' ] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] # Use only 'java' to analyze code written in Java, Kotlin or both # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support steps: - name: Checkout repository uses: actions/checkout@v3 with: submodules: recursive - uses: ./.github/actions/setup # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs # queries: security-extended,security-and-quality - uses: ./.github/actions/meson with: cc: gcc - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 with: category: "/language:${{matrix.language}}" ================================================ FILE: .github/workflows/lock.yml ================================================ name: 'Lock Threads' on: schedule: - cron: '0 0 * * *' workflow_dispatch: permissions: issues: write pull-requests: write discussions: write concurrency: group: lock-threads jobs: action: runs-on: ubuntu-latest steps: - uses: dessant/lock-threads@v5 with: process-only: 'issues' github-token: ${{ github.token }} issue-inactive-days: '31' exclude-issue-created-before: '' exclude-issue-created-after: '' exclude-issue-created-between: '' exclude-issue-closed-before: '' exclude-issue-closed-after: '' exclude-issue-closed-between: '' include-any-issue-labels: '' include-all-issue-labels: '' exclude-any-issue-labels: '' add-issue-labels: '' remove-issue-labels: '' issue-comment: > This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. issue-lock-reason: 'resolved' log-output: false ================================================ FILE: .github/workflows/main.yml ================================================ on: issues: types: [opened, edited] jobs: auto_close_issues: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v1 - name: Automatically close issues that don't follow the issue template uses: davatorium/auto-close-issues@v1.0.4 with: github-token: ${{ secrets.GITHUB_TOKEN }} issue-close-message: "@${issue.user.login}: hello! :wave:\n\nThis issue is being automatically closed because it does not follow the issue template." # optional property closed-issues-label: "Incomplete Report - Please follow the guidelines" # optional property ================================================ FILE: .github/workflows/mkdocs.yml ================================================ name: Publish docs via GitHub Pages on: push: branches: - sphinx - next jobs: build: name: Deploy docs runs-on: ubuntu-latest steps: - name: Checkout master uses: actions/checkout@v1 - name: Deploy docs uses: mhausenblas/mkdocs-deploy-gh-pages@master env: CONFIG_FILE: mkdocs/mkdocs.yml GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ================================================ FILE: .github/workflows/publish-release.yml ================================================ name: Publish release on: push: tags: - '*' jobs: publish-tarball: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: submodules: recursive - uses: ./.github/actions/setup - uses: ./.github/actions/meson with: cc: gcc - uses: ./.github/actions/release ================================================ FILE: .gitignore ================================================ /build*/ /.cache/ /.vscode/ # I want to ignore log files *.log # Core files should never be checked in core # ignore patches too, the code is either checked in or branch. *.patch* # backup files *.swp *.*~ *.unc-backup~ *.unc-backup.md5~ ================================================ FILE: .gitlab-ci.yml ================================================ before_script: - apt-get update - apt-get install --force-yes -y software-properties-common apt-transport-https - add-apt-repository -y 'deb http://debian.jpleau.ca/ jessie-backports main contrib non-free' - apt-get update -qq - apt-get install --force-yes -y autoconf automake make libx11-dev libpango1.0-dev libcairo2-dev libstartup-notification0-dev libxcb-icccm4-dev libxcb-util0-dev libxcb-xinerama0-dev libxcb-xkb-dev libx11-xcb-dev - apt-get install --force-yes -y libxcb1-dev xvfb discount xdotool fluxbox libxkbcommon-dev libxkbcommon-x11-dev libxcb-ewmh-dev xutils-dev libtool lcov libxcb-randr0-dev doxygen python flex bison librsvg2-dev texinfo - git clone --recursive https://github.com/Airblader/xcb-util-xrm.git - cd xcb-util-xrm - ./autogen.sh --prefix=/usr - make - sudo make install - cd - - git clone https://github.com/libcheck/check/ -b 0.11.0 - cd check - autoreconf -i - TEX="false" ./configure --prefix=/usr/ - make - sudo make install - cd - - git clone https://github.com/alobbs/doxy-coverage build-rofi: script: - git submodule update --init - autoreconf -i - ./configure --enable-gcov - make - make check - make distcheck - make coverage - make doxy - python2 doxy-coverage/doxy-coverage.py doc/html/xml/ artifacts: expire_in: 2 weeks paths: - coverage - doc/html ================================================ FILE: .gitmodules ================================================ [submodule "libgwater"] path = subprojects/libgwater url = https://github.com/sardemff7/libgwater [submodule "libnkutils"] path = subprojects/libnkutils url = https://github.com/sardemff7/libnkutils ================================================ FILE: .mailmap ================================================ Morgane Glidic ================================================ FILE: AUTHORS ================================================ Aaron Ash Adrià Farrés Anton Löfgren Avatar bendem Benjamin Cremer Benjamin R. Haskell Bruno Braga Buglloc Chris Salzberg daemoni Dan Beste Daniel Hahler DanteFireX Dave Davenport Deiwin Sarjas Dimitar Yordanov Edwin Pujols eigengrau Eric Engeström Fangrui Song fice-t Florian Franzen Gabriel Holodak Gareth Poole Georgios Bitzes Greg Fitzgerald Guy Hughes Hexchain Tong Ian Remmler James Vaughan Jason Pleau Jasper Lievisse Adriaanse Klemens Schölhorn koppa lbonn Marcin Sedlak marduk Michael Vetter Moritz Maxeiner Nick87720z Niklas Haas N. Izumi Paulo Flabiano Smorigo Peter Cannici qedi Morgane Glidic Rasmus Steinke RaZ0rr-Two Roomcays seanpringle Sebastian Reuße Simon Hanna Stanislav Seletskiy Thomas Adam Thorsten Wißmann Tilman Blumenbach Tobias Kortkamp Tom Hinton TonCherAmi vimeitor Wieland Hoffmann Yaroslav ================================================ FILE: CODE_OF_CONDUCT.md ================================================ # Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at qball@gmpclient.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org [version]: http://contributor-covenant.org/version/1/4/ ================================================ FILE: CONFIG.md ================================================ > This page does not describe all of **ROFI**'s configuration options, just the > most common usecase. For the full configuration options, check the manpages.
## Where does the configuration live Rofi's configurations, custom themes live in `${XDG_CONFIG_HOME}/rofi/`, on most systems this is `~/.config/rofi/`. The name of the main configuration file is `config.rasi`. (`~/.config/rofi/config.rasi`). ## Create an empty configuration file Open `~/.config/rofi/config.rasi` in your favorite text editor and add the following block: ```css configuration { } ``` You can now set the options in the `configuration` block. ## Create a configuration file from current setup If you do not want to start from scratch, or want to migrate from older configuration format, you can get tell rofi to dumps it configuration: ```bash rofi -dump-config > ~/.config/rofi/config.rasi ``` This will have all the possible settings and their current value. If a value is the default value, the entry will be commented. For example: ```css configuration { /* modes: "window,run,ssh,drun";*/ /* font: "mono 12";*/ /* location: 0;*/ /* yoffset: 0;*/ /* xoffset: 0;*/ /* fixed-num-lines: true;*/ ... cut ... /* ml-row-down: "ScrollDown";*/ /* me-select-entry: "MousePrimary";*/ /* me-accept-entry: "MouseDPrimary";*/ /* me-accept-custom: "Control+MouseDPrimary";*/ } ``` To create a copy of the current theme, you can run: ```bash rofi -dump-theme > ~/.config/rofi/current.rasi ``` ## Configuration file format ### Encoding The encoding of the file is utf-8. Both Unix (`\n`) and windows (`\r\n`) newlines format are supported. But Unix is preferred. ### Comments C and C++ file comments are supported. - Anything after `//` and before a newline is considered a comment. - Everything between `/*` and `*/` is a comment. Comments can be nested and the C comments can be inline. The following is valid: ```css // Magic comment. property: /* comment */ value; ``` However, this is not: ```css prop/*comment*/erty: value; ``` ### White space White space and newlines, like comments, are ignored by the parser. This: ```css property: name; ``` Is identical to: ```css property : name ; ``` ### Data types **ROFI**'s configuration supports several data formats: #### String A string is always surrounded by double quotes (`"`). Between the quotes there can be any printable character. For example: ```css ml-row-down: "ScrollDown"; ``` #### Number An integer may contain any full number. For example: ```css eh: 2; ``` #### Boolean Boolean value is either `true` or `false`. This is case-sensitive. For example: ```css show-icons: true; ``` This is equal to the `-show-icons` option on the commandline, and `show-icons: false;` is equal to `-no-show-icons`. #### List This is not supported by the old configuration system, but can be used in the **rasi** format. A list starts with a '[' and ends with a ']'. The entries in the list are comma-separated. The entry in the list single ASCII words. ```css combi-modes: [window,drun]; ``` For older versions you have : ```css combi-modes: "window,drun"; ``` ## Get a list of all possible options There are 2 ways to get a list of all options: 1. Dump the configuration file explained above. (`rofi -dump-config`) 1. Look at output of `rofi -h`. To see what values an option support check the manpage, it describes most of them. NOTE: not all options might be in the manpage, as options can be added at run-time. (f.e. by plugins). ## Splitting configuration over multiple files It is possible to split configuration over multiple files using imports. For example in `~/.config/rofi/config.rasi` ```css configuration { } @import "myConfig" @theme "MyTheme" ``` Rofi will first parse the config block in `~/.config/rofi/config.rasi`, then parse `~/.config/rofi/myConfig.rasi` and then load the theme `myTheme`. More information can be obtained from the **rofi-theme(5)** manpage. Imports can be nested. ================================================ FILE: COPYING ================================================ MIT/X11 License Modified 2013-2024 Qball Cow Copyright (c) 2012 Sean Pringle Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: Changelog ================================================ For newer release ChangeLogs please see the releasenotes. v1.7.3: Sturtled! - [Help] Print out the parsed config/theme files in -help output. - [Keybindings] Fix keybindings being modified by -theme-str - [Doc] Add rofi-dmenu manpage. - [XCB] Cache lookup of monitor. - Add -replace option (#568) - Fix memory leak. - [1566] Add extra debug for resolving monitors. - [Theme] Add round,floor,ceil function in @calc (#1569) - [Doc] Explain icon lookup. - [Combi] Add -combi-display-format (#1570) (thanks to Jakub) - [Theme] Expand list type ([]) for more data types. - [Theme] Add support for tab-stops on textbox. (#1571) (thanks to Jakub) - [Theme] Testing direct access to widgets via cmdline option (-theme+widget+property value) v1.7.2: Shellebrations! - [Build] Fix building without window mode enabled. - [Config] Do not print out the 'theme' field in configuration on dump. - [CI] test window mode less build. - Allow configuration block in theme again. v1.7.1: Turtley amazing! - [Theme] Fix highlight with only theme. - Updated documentation and landing page (Thanks to RaZ0rr-Two) - [Combi] Fix nesting combi modi (#1510) - [DMenu] Fix crash dmenu mode when no entry is available. (#1504) - [Run|Drun] Only initialize file-completer on first use. - [FileBrowser] Reduce number of re-allocs. - [Readme] Remove generating readme.html for dist. - [Dmenu] Fix uninitialized memory (non-selectable) - [FileBrowser] Try to convert invalid encoded text. (#1471) - [FileBrowser] Don't crash on invalid file filenames. (#1471) - [Theme] print known colors as its color name. - [CMD] If failed to convert commandline to new option, do not stop. (#1425) - [Theme] Fix parsing of nested media blocks. (#1442) - [Widgets] Fix sizing logic widgets. (#1437) - [Window] Try to fix auto-sizing of desktop names for non-i3 desktops. (#1439) - [Window] Fix broken close-on-delete. (#1421) - [Listview] Correctly check if selected item is highlighted. (#1423) - [Entry] Allow action to be taken on input change. (#1405) - [Theme] Don't truncate double values. (#1419) - [Grammar] Add support for env(ENV,default). - [Documentation] documentation fixes. - [Theme] fix dmenu theme ( #1396). v1.7.0: Iggy 2024 - ADD: -steal-focus option. - ADD: [Config] Add nested configuration option support. - ADD: [Config] Support for handling dynamic config options. - ADD: [IconFetcher] Find images shipped with the theme. - ADD: [DRun] Add support for passing file (using file-browser) completer for desktop files that support his. - ADD: [DRun] Support for service files. - ADD: [FileBrowser] Allow setting startup directory (#1325) - ADD: [FileBrowser]: Add sorting-method. (#1340) - ADD: [FileBrowser] Add option to group directories ahead of files. (#1352) - ADD: [Filtering] Add prefix matching method. (#1237) - ADD: [Icon] Add option to square the widget. - ADD: [Icon|Button] Make action available on icon, button and keybinding name. - ADD: [KeyBinding] Add Ctrl-Shift-Enter option. (#874) - ADD: [ListView]-hover-select option. (#1234) - ADD: [Run] Add support for passing file (using file-browser) completer. - ADD: [Textbox] Allow theme to force markup on text widget. - ADD: [Theme] theme validation option. (`-rasi-validate`) - ADD: [View] Add support for user timeout and keybinding action. - ADD: [Widget] Add cursor property (#1313) - ADD: [Widget] Add scaling option to background-image. - ADD: [Widget] Add support background-image and lineair gradient option. - ADD: [Window] Add pango markup for window format (#1288) - ADD: [Window] Allow rofi to stay open after closing window. - FIX: [DSL] Move theme reset into grammar parser from lexer. - FIX: [Drun]: fix sorting on broken desktop files. (thanks to nick87720z) - FIX: [File Browser]: Fix escaping of paths. - FIX: [ListView] Fix wrong subwidget name. - FIX: [Script] Don't enable custom keybindings by default. - FIX: [TextBox] Fix height estimation. - FIX: [Theme] widget state and inherited properties. This should help fixing some old themes with changes from 1.6.1. - FIX: [Widget] Fix rendering of border and dashes. (Thanks to nick87720z) - FIX: [Build] Fix CI. - FIX: [Theme] Discard old theme, when explicitly passing one on command line. - REMOVE: -dump-xresources - REMOVE: -fullscreen - REMOVE: -show-match - REMOVE: Old xresources based configuration file. - REMOVE: fake transparency/background option, part of theme now. - REMOVE: xresources parsing via Xserver - Remove: [Theme] Remove backwards compatiblity hack. - DOC: Update changes to manpages v1.6.1: Tortoise Power - Use GdkPixbuf for Icon parsing. - Add FileBrowser to default mode. - Fix parsing dicts in config file (with " in middle of string.) - Add -normalize-match option, that tries to o match ö, é match e. (#1119) - [Theme] Add min/max operator support to calc() (#1172) - Show error message and return to list instead of closing (#1187) - [Theme] Add nested media support. (#1189) - [Textbox] Try to fix estimated font height. (#1190) - [DRun] Fix broken caching mechanism. v1.6.0: The Masked Launcher - Add `themes/` directory in the users rofi config directory to the theme search path. (#1001) - Split listview element into box widget holding icon and textbox. Supporting more dynamic themes. (#949) - Fix default theme. - Add -upgrade-config option. - Add `ROFI_PLUGIN_PATH` variable. - Add check for running rofi inside a Script mode. - Remove gnome-terminal from rofi-sensible-terminal (#1074) - Set window title based on mode name. (#969) - Subpixel rendering workaround. (#303) - Support character type in configuration {} block . (#1131) - Use `XDG_CONFIG_DIRS` (#1133) - [Box] Bug fix update propagation. - [Build] Fix meson build with meson 0.55. - [DMenu] Add `-keep-right` flag. (#1089) - [DMenu] Don't match markup when filtering. (#579,#1128) - [DRUN] Support Type=Link (#1166) - [DRun] Add % to escape variable. - [DRun] Add an optional cache for desktop files. (#1040) - [DRun] Add keywords as default match item. (#1061) - [DRun] Don't run custom commands. - [DRun] Match keywords field. - [DRun] Only show selected categories. (#817) - [Dmenu|Script] Add non-selectable entries. (#1024) - [Doc] Update documentation. - [IconFetcher] Add jpeg support. - [Icon] Set default size to 1.2 CH. - [Icon] support distance for size. - [Listview] Add widget to show keybinding index. (#1050) - [Listview] Fix distribution of remaining space. - [Listview] Fix left-to-right scrolling. (#1028) - [Listview] Fix updating elements. (#1032) - [Matching] Make Fuzzy matching non greedy. - [Script] Add delimiter option. (#1041) - [Script] Add environment variable indicating state. - [Script] Add extra matchign field (meta). (#1052) - [Script] Add info option, hidden field that gets passed to script via `ROFI_INFO` environment. - [Script] Add no-custom option. - [Textbox] Add cursor blinking option. - [Textbox] Add placeholder. (#1020) - [Theme] Add `calc()` support. (#1105) - [Theme] Add alpha channel to highlight color. (#1033) - [Theme] Add sidebar as mode-switcher alias. - [Theme] Add some initial @media support. (#893) - [Theme] Support buttons in the UI. - [View] Add two widgets. One showing number of rows, other number of filtered rows. (#1026) - [Window] Add window thumbnail option. - [Window] Remove arbitrary # window limit. (#1047) - [Window] check buffer overflow. v1.5.5: v1.5.4: Painful tardiness - SSH: Fix wrong malloc size, causing crash. v1.5.3: Time delayed progress - Update manpage with missing entry. (#937) - Rename sidebar widget to mode-switcher and allow configuration from theme. - Timing: Moving timing output to glib debug system. - SSH: Fix unitialized variable issue. - SSH: resolve ':' conflict in history entries. - RASI Lexer: Fix nested () in variable default field. - USABILITY: When mode not found, show in gui not just on commandline. - ICON: Allow aligning image in icon widget. - Meson build system: cleanups and improvements. - Meson build system: add documentation (#943) - Window: Fix default formatting and remove (invalid) deprecation warning. - DMenu: Add support for showing icons infront of displayed list. - Overlay: Fix overlay widget to correctly integrate in new theme format. - Update libnkutils, libgwater. - SSH: be case-insensitive when parsing keywords. - DMENU: Add format option to strip pango markup from return value. - ListView: allow user to change ellipsizing displayed value at run-time. v1.5.2: Procrastination in progress - Clearify Check dependency. (#879) - Add option to change negate character. (#877) - Fix assert and update test. (#875) - Add missing example Script (#869) - Add drun-display-format option. (#858) - Fixing typos (#867,#837,#831,#804) - Fix loading icons that are in cache (#860) - Improve ssh known_host parser. (#820) - Add terminals to rofi-sensible-terminal (#808) - Lexer Fix several ambiguity and handling of empty input. - IconFetcher preload the user set icon theme. - IconFetcher use generic threadpool. - Lexer support environment variables. - Cleanup syntax for sorting. (#816) - Documents update. - Fix how borders are drawn. (#792, #783) v1.5.1: - Egor Zvorykin: Fix typos in theme manpage. (#760) - Ben: Fix README config file location. (#761) - [SSH] Reload when ssh entry is deleted. - Add support for randr 1.5 monitors. (#749) - Diki Anata: Fix border layout structure. - Remove duplicate tests. (#543) - Fix make test in libnkutils. v1.5.0: - [Theme] Accept integer notation for double properties. (#752) - [View] Theme textboxes are vertically sized and horizontal wrapped. (#754) - Rofi 1.4.2 doesn't capture ←, ↑, →, ↓ binding to keys to work in combination with Mode_switch (#744) - Add konsole to list of sensible terminals. (#739) - Allow drun to filter based on comment field. (#733) - Add prompt widget to default theme. - Add manpage for rofi-theme-selector. - Dump theme without # prefix and separator . - Fix issue with xnomad and -4 placing. (#683) - DRun obey OnlyShowIn and NotShowIn properties. - Store default theme in rofi binary using GResources. - Add extra margin between prompt and entry. - Remove colon from prompt. (#637) - Add support for passing extra properties in script mode. - Better error message on invalid argb syntax. - Fix default theme border. - Make '#' in the parser optional. - Update themes. - Add -drun/window-match-fields option (thx to Askrenteam) for drun/window menu. (#690/#656) - Implement negated match. (#665) - Fix parsing of non-existing fields. (#700) - rofi-theme-selector fixes. - Fix spelling error (thx to jmkjaer) - Fix test on i686/arm. (#692) - Fix error in theme manpage. (#686) - Allow history size to be specified. (#613) - Fix drun history implementation. (#579) - Add gentoo install instruction. (#685) v1.4.2: - Add sort to manpage. (#682) - Add tranaparent to theme manpage. (#688) - Re-add theme headers. (#679) - Fix super key. (#684) - Unknown option libnkutils:uuid. (#677) - Mode window is not found. (#686) - Fix meson build in dist file. v1.4.1: All Hail Rasi - Bump meson release version v1.4.0: I reject your truth and substitute my own New Features: - FZF style sorting for fuzzy matching (thanks to MaskRay) (#533) - Improve error messages. - Theme parsing. - Keybinding. - invalid commandline options. - etc. - Customizable highlight. - Give up when keyboard is not grabbed in first 5 seconds. - Improved manpage - rofi (1) - rofi-themes (5) - Super-{1..10} hotkey for first 10 rows. - Allow x-align/y-align for textbox. - Support matching bangs on multiple characters in combi mode. (#542) - Set WM_CLASS (#549) - Async pre-read 25 rows for improving user experience. (#550) - Improve handling in floating window manager by always setting window size. - DRun speedup. - Make lazy-grab defualt. - Remove extra layer in textbox. (#553) - Ignore fonts that result in a family name or size 0. (#554) - [Combi] Allow bang to match multiple modes. (#552) - Add detection of window manager and work around quirks. - Support dynamic plugins. - DMENU tty detection. - Support for icons in drun, combi and window mode. - Startup notification of launched application support. - Meson support. - Fuzzy matching with fzf based sorting algorithm. - Auto-detect DPI. - Set cursor at the end of the input field. (#662) - Meson support (thx to SardemFF7). - [Script] parse the command as if it was commandline. (#650) - Don't enable asan by meson. (#642) - Allow text widgets to be added in theme and string to be set. - [Dmenu] Support the -w flag. - Allow window (via window id) to be location for rofi window. - [Dmenu] Allow multi-select mode in `-no-custom` mode. v1.3.1: Dan vs. Greg: The never ending story, reloaded. New Features - [DRun] Search categories. (#449) Improvements - Fix exit when failed to grab keyboard. (#524) - Introduce lazy keyboard grab mode for people who want rofi to show on key-down in i3. - Add copyrights to theme (needed for debian packaging). - DMENU: Correctly detect end-of-file (#518) - Directly queue redraw on overlay change. - Remove pango markup from workspace names in I3. (#507) v1.3.0: Dan vs. Greg: The never ending story. New Features - Use randr for getting monitor layout. Fallback to xinerama if not available. - Re-add fuzzy matcher. - Restructure internal code to use dynamic sizing widgets. (hbox, vbox and lists) - Async mode for dmenu. - Add theme selector script. - Include 21 themes. - Dynamically sizing window with content. - When placed at bottom of screen re-order screen to have entry at bottom. Improvements - Fix pasting secondary clipboard. (#516) - By default use all cores to filter entries. - Make sure drawing priority is higher then reading input data. - Improve resizing of window, don't make X whipe background. - Improve close window (shift-delete) action, by sending NET_WM_CLOSE instead of destroying window. - Create cache and run directory on startup. (#497) - Fix uneeded redraws on cursor blinking. (#491) - Improve time till grabbing keyboard. (#494) - Better error message when failing to parse keybindings, also continue parsing on error. - Fix problem with custom layouts (#485) - Speedup drawing of screen. Works well now for 4k and 8k screens. (factor 1000+ speedup for the flipping of buffer) (#496) - DRun mode more compatible with specification. - Debug output via g_log. - Fix password entry cursor position. - Use bash instead of sh for get_git_rev.sh (#445) - Add Control+G for cancel (#452) - Add padding option to textbox (#449) - Ctrl-click does alternate accept entry. (#429) - Hide window decoration in normal window mode. - Click to exit option. (#460) - Fix cursor blinking on moving. (#462) - Remove entry from history if fails to execute (#466) - Fix margins. (#467) - Improved documentation of functions in code. - DRun: Set work directory when executing file. (#482) - Memory leak fixes. - Improve scrollbar behaviour. Removals - opacity option. The transparency support in the theme can do the same and more. v1.2.0 New Features - Highlight matched part of the string. - Make window switcher string customizable. Improvements - Improved selection mode in dmenu with selection counter. - Improved selection mode with 'dot' indicator. - Fix Current Desktop window switcher. - Fix launching in terminal. - Supports include in config. - Add Control+k remove till eol keybinding. - Change clear line to Control+w and make Control+u remove till sol (matching readline) - Track origin of option value e.g. who set the option. - Comment default values in dump-xresources. - Fix displaying on 30bit 10bpc X setup. Removals: - Remove xlib dependency (xcb-xrm) - Remove fuzzy option - Remove i3 workaround as it no longer needed since I3 v4.9. (Feb. 2015) v1.1.0 New Features - Keys mode, showing keybindings. - Stop cycling option (#407) (Thx to Yaroslav) - Kill window on delete entry (#316) Improvements - Add Control+Backspace as remove word back keybinding. - Allow user to use X11 background for fake transparency (#390) - Allow user to specify background image. - Improved keybinding handling, allowing on-release and modifier only (#384). - Use display name for prompt (#409) - Parse subdirectories in drun parser (#416) - Switch to stop cycling (#407) Bug fixes - Grab mouse pointer with keyboard 1.0.1 Bug fixes - Fix typo in manpage. - Return old behaviour for rofi placement (#395, #389) - Switch desktop when switching window (#393) - Remove unneeded use of bash (#391) - Make history parser more robust against corrupted files. (#388) - Fix desktop number (#386) 1.0.0 New Features - Blinking cursor - BliSeparate configuration file - BliHistory in drun mode (#343) - BliContext menu mode, show rofi at the mouse pointer Improvement - auto select and single item on dmenu mode (#281) - Unlimited window title length. - Correctly follow the active desktop, instead of active window. - If requesting modi that is not enabled, show it anyway. - DMenu password mode. (#315) - Levenshtein sort is now UTF-8 aware. - Use xcb instead of large xlib library. - Use GLib mainloop for cleaner code and easier external event based - handling in future. - Run dialog: Try to convert between locale, fs encoding and utf8. - Fixing problems with non-utf8 filesystem encodings. - Try to display non-utf8 strings as good as possible. - Autocomplete bang hint in combi mode (#380) - Remove magic line length limits by switching to getline - from fgets. - Print git version for git builds in version string. Bug fixes - Fix subpixel rendering. (#303) - Fix basic tests on OpenBSD (#272) - Fix wrong use of memcpy (thx to Jasperia). - Work around for sigwaitinfo on OpenBSD. - Ignore invalid entries (non-utf8) in dmenu mode. - Glib signal handling. - Fix connecting to i3 on bsd. - Be able to distinguish between empty and cancel in dmenu mode. (#323) - Fix memcpy on single memory region. (#312) - Fix opening file with mode a+ and using fseek to overwrite on bsd. 0.15.12: New features: - Initial `-dump` command for dmenu mode. (#216) - Threading support. - Parallel checking for ASCII. - Parallel string matching. - Autodetect number of HW-threads. - Disabled by default. - Highlight multiple selected rows (#287,#293) - Dmenu can read from file instead of stdin. - Regex matching (#113) - Take Screenshot of rofi using keybinding. - Hotkey for sorting: (#298) - Option to set scrollbar width. Improvements: - Fix return code of multi-select. - Update manpage (#289, #291) - Improve speed of reading stdin in dmenu mode. - Correctly handle modifier keys now. Should now support most weird keyboard layouts and switching between them. (#268, #265, #286) - Correctly set locale, fixing issues with entering special characters. (#282) - DRun mode support `NoDisplay` setting (#283) - Pango markup is matched when filtering. (#273) Bug fixes: - Improve error message (#290) - Correctly switch to next entry on multi-select when list is filtered (#292) - Switch __FUNCTION__ for __func__. (#288) - Fix segfault on empty list and moving through it. (#256,#275) - Fix one off of colors (#269) - Drun fix uninitialized memory (#285) 0.15.11: New features: - (Experimental) Desktop file support Improvement: - Add xdg-terminal to rofi-sensible-terminal Bug fixes: - manpage fixes (#261) - Crash in error mesg on invalid config - Fix urgent and active being activated at same time - Fix crasher on empty list 0.15.10: New feature: - Support for Startup Notification - Standalone mode in dmenu - ssh: known_hosts parsing - Full screen support - Glob style matching - Cairo drawing - Fast ascii filtering (thx to Tom Hinton) - Combi bang support - normal window mode for dmenu - Startup notification support - Current desktop window mode Improvements: - Keep same line selected - Cleanup menu code by re-using Switcher - Fix drawing on resize - Fix rofi -h output - allow disabling of tokenizing - Dragging scrollbar - Allow none type on separator - Dmenu support markup in fields Bug fixes: - dmenu use switcher system - release keyboard on focus out event, regrab it on focus in event - Support `\0` separator 0.15.8: New feature: - Scrollbar. - More custom keybindings. Improvements: - dmenu compatibility. - Don't refilter on all keypresses. - Hide Docks and desktops from the window list. (remove i3bar hack) Bug fixes: - Fix Desktop numbering. - Mis-alignment of arrow down box with message (#189) - Fix issue with mouse interaction needing keyboard press to complete. - Fix -no-custom still allows escape to quit. - Fix compiler warnings. - Fix dmenu mode. (#200) - Break CMD AI to have dmenu compatibility. - Fix processing of signals. 0.15.7: Bug fixes: - Auto-wrap text in message dialog. - Fix ellipsiziing in entry box. - Fix crash on empty list with custom input (#175). - SSH: Ignore comments in Host line (#178). - Fix issues with BSD (#180) New feature: - Markup support error message. - Implement -no-custom as alternative to -only-select (#176). - Fuzzy match option. (#133) Improvements: - Make more keys user-configurable. (#66) 0.15.5: Bug fixes: - Reduce time waiting for keyboard grab (#153) - Also grab Key Release on exit. (#167) - Fix failing font size estimation code. New feature: - [DMENU] Allow to select line matching pattern from cmdline.(#165) - [DMENU] Allow to set filter from cmdline. (#164) - [DMENU] Allow output to be formatted (string, filter, index, index 1 based) - [DMENU] Only match input lines mode. - [DMENU] Custom keybinding for return value.(#154,#156) - [DMENU] Allow additional message line. (#166) Improvements: - (Start) adding keybinding support (#131) - Cleanup warnings from clang checkers. - Fix keybindings on Russian layout (#169) Open bugs: - Urgency hint not always working (#162) 0.15.4: New feature: - Number mode for dmenu. allows user to get index back instead of content. - Combi mode. Combine multiple views into one. - Highlight current window. - Highlight urgent and active row in window view. - DMenu allow rows to be highlighted. (single, multiple, ranges) - New color specification based on I3. (Can be enabled by settings) (#147) - /etc/hosts support for ssh mode. (#137) Bug fixes: - On a single item in list disable auto-select. - Fix cursor position (#140) - Resolving manpage. (#142) - Fix pasting cursor one off. (#150) - Fix grave key -> ctrl+grave (#151) Improvements: - Better handle input methods.. Now international keyboard layout works as expected: `e ->è - Be more verbose about starting in daemon mode. - Print a user-understandable error when launching in daemon mode without a key bound. - Add Ctrl(Shift)Tab to switch modi's. - Auto size number of columns based on available columns. - Better way to determine font height. - Fix font vertical centering. - One-off when pasting text. - Improve rendering of boxes (fixed height and margins) - Fix modi switcher boxes size+layout. - Reduce work on redraws (do not always calculate new size/position), set text, etc. - OO-ify the switchers. - Remove unneeded filtered array. Cleanup: - Do not lug argc,argv around everywhere. 0.15.2: Removed features: - Remove (broken) hmode - Old style key binding and mode launcher. - Old TIMING code. New features: - Word movement in entry box. (#126) - PID file to avoid duplicate Rofi. - Generic keybinding and launching for modi. (#128) - Auto select mode (previously called zeltak mode) Bug fixes: - Shift left/right movement between modi (#125) - Document updates (#123,#116,#124,etc.) - DMenu mode based on executable name with full path (#119) - Fix missing keystrokes. - On broken UTF-8 show everything up to the broken character. (#121) Others: - Significant code refactoring. - Rewriting of config parser, Commandline Parser uses structure from Xresource parser. Avoiding duplication and making it easier to maintain. Performance improvements: - Fix blocking on grabbing keyboard. 0.15.1: New features: - Improved transparency - Changelog - Case sensitivity support, with indicator. (Edwin Pujols) - Mouse scroll wheel support - Alternate Row colors - Run-list command for adding entries to run-dialog - Dmenu: preselect line. Bug fixes: - Manpage fixes - SSH viewer, support lists of hostnames (Tblue) - SSH improve parsing of odly indented host files - Do not loose keypresses when system under load - Cleanups, small fixes. (Edwin Pujols, blueyed ) Performance improvements: - Lazy refilter for large lists ================================================ FILE: Examples/i3_empty_workspace.sh ================================================ #!/usr/bin/env bash MAX_DESKTOPS=20 WORKSPACES=$(seq -s '\n' 1 1 "${MAX_DESKTOPS}") EMPTY_WORKSPACE=$( (i3-msg -t get_workspaces | tr ',' '\n' | grep num | awk -F: '{print int($2)}' ; \ echo -e "${WORKSPACES}" ) | sort -n | uniq -u | head -n 1) i3-msg workspace "${EMPTY_WORKSPACE}" ================================================ FILE: Examples/i3_switch_workspaces.sh ================================================ #!/usr/bin/env bash if [ -z $@ ] then gen_workspaces() { i3-msg -t get_workspaces | tr ',' '\n' | grep "name" | sed 's/"name":"\(.*\)"/\1/g' | sort -n } echo empty; gen_workspaces else WORKSPACE=$@ if [ "${WORKSPACE}" = "empty" ] then i3_empty_workspace.sh >/dev/null elif [ -n "${WORKSPACE}" ] then i3-msg workspace "${WORKSPACE}" >/dev/null fi fi ================================================ FILE: Examples/rofi-file-browser.sh ================================================ #!/usr/bin/env bash # Various options for the file browser script: ROFI_FB_GENERIC_FO="xdg-open" # command used for opening the selection ROFI_FB_PREV_LOC_FILE=~/.local/share/rofi/rofi_fb_prevloc ROFI_FB_HISTORY_FILE=~/.local/share/rofi/rofi_fb_history ROFI_FB_HISTORY_MAXCOUNT=5 # maximum number of history entries # Comment the next variable to always start in the last visited directory, # otherwise rofi_fb will start in the specified directory: ROFI_FB_START_DIR=$HOME # starting directory # Uncomment the following line to disable history: # ROFI_FB_NO_HISTORY=1 # Beginning of the script: # Create the directory for the files of the script if [ ! -d "$(dirname "${ROFI_FB_PREV_LOC_FILE}")" ] then mkdir -p "$(dirname "${ROFI_FB_PREV_LOC_FILE}")" fi if [ ! -d "$(dirname "${ROFI_FB_HISTORY_FILE}")" ] then mkdir -p "$(dirname "${ROFI_FB_HISTORY_FILE}")" fi # Initialize $ROFI_FB_CUR_DIR if [ -d "${ROFI_FB_START_DIR}" ] then ROFI_FB_CUR_DIR="${ROFI_FB_START_DIR}" else ROFI_FB_CUR_DIR="$PWD" fi # Read last location, otherwise we default to $ROFI_FB_START_DIR or $PWD. if [ -f "${ROFI_FB_PREV_LOC_FILE}" ] then ROFI_FB_CUR_DIR=$(cat "${ROFI_FB_PREV_LOC_FILE}") fi # Handle argument. if [ -n "$@" ] then if [[ "$@" == /* ]] then ROFI_FB_CUR_DIR="$@" else ROFI_FB_CUR_DIR="${ROFI_FB_CUR_DIR}/$@" fi fi # If argument is no directory. if [ ! -d "${ROFI_FB_CUR_DIR}" ] then if [ -x "${ROFI_FB_CUR_DIR}" ] then coproc ( "${ROFI_FB_CUR_DIR}" >/dev/null 2>&1 ) exec 1>&- exit; elif [ -f "${ROFI_FB_CUR_DIR}" ] then if [[ "${ROFI_FB_NO_HISTORY}" -ne 1 ]] then # Append selected entry to history and remove exceeding entries sed -i "s|${ROFI_FB_CUR_DIR}|##deleted##|g" "${ROFI_FB_HISTORY_FILE}" sed -i '/##deleted##/d' "${ROFI_FB_HISTORY_FILE}" echo "${ROFI_FB_CUR_DIR}" >> "${ROFI_FB_HISTORY_FILE}" if [ "$( wc -l < "${ROFI_FB_HISTORY_FILE}" )" -gt "${ROFI_FB_HISTORY_MAXCOUNT}" ] then sed -i 1d "${ROFI_FB_HISTORY_FILE}" fi fi # Open the selected entry with $ROFI_FB_GENERIC_FO coproc ( "${ROFI_FB_GENERIC_FO}" "${ROFI_FB_CUR_DIR}" >/dev/null 2>&1 ) if [ -d "${ROFI_FB_START_DIR}" ] then echo "${ROFI_FB_START_DIR}" > "${ROFI_FB_PREV_LOC_FILE}" fi exit; fi exit; fi # Process current dir. if [ -n "${ROFI_FB_CUR_DIR}" ] then ROFI_FB_CUR_DIR=$(readlink -e "${ROFI_FB_CUR_DIR}") echo "${ROFI_FB_CUR_DIR}" > "${ROFI_FB_PREV_LOC_FILE}" pushd "${ROFI_FB_CUR_DIR}" >/dev/null fi # Output to rofi if [[ "${ROFI_FB_NO_HISTORY}" -ne 1 ]] then tac "${ROFI_FB_HISTORY_FILE}" | grep "${ROFI_FB_CUR_DIR}" fi echo ".." ls # vim:sw=4:ts=4:et: ================================================ FILE: Examples/test_script_env.sh ================================================ #!/usr/bin/env bash if [ -z "${ROFI_OUTSIDE}" ] then echo "run this script in rofi". exit fi echo -en "\x00no-custom\x1ffalse\n" echo -en "\x00data\x1fmonkey do, monkey did\n" echo -en "\x00use-hot-keys\x1ftrue\n" echo -en "${ROFI_RETV}\x00icon\x1ffirefox\x1finfo\x1ftest\n" if [ -n "${ROFI_INFO}" ] then echo "my info: ${ROFI_INFO} " fi if [ -n "${ROFI_DATA}" ] then echo "my data: ${ROFI_DATA} " fi ================================================ FILE: Examples/test_script_mode.sh ================================================ #!/usr/bin/env bash if [ "$*" = "quit" ]; then exit 0 fi if [ "$@" ]; then # Override the previously set prompt. echo -en "\x00prompt\x1fChange prompt\n" for a in {1..10}; do echo "$a" done echo "quit" else echo -en "\x00prompt\x1ftesting\n" echo -en "\0urgent\x1f0,2\n" echo -en "\0active\x1f1\n" echo -en "\0markup-rows\x1ftrue\n" echo -en "\0message\x1fSpecial boldmessage\n" echo -en "aap\0icon\x1ffolder\n" echo -en "blob\0icon\x1ffolder\x1fdisplay\x1fblub\n" echo "noot" echo "mies" echo -en "-------------\0nonselectable\x1ftrue\x1fpermanent\x1ftrue\n" echo "testing" echo "Bold" echo "quit" fi ================================================ FILE: Examples/test_script_mode_color.sh ================================================ #!/usr/bin/env bash if [ "$*" = "quit" ] then exit 0 fi if [ "$@" ] then # Override the previously set prompt. echo -en "\0theme\x1felement-text { background-color: $@;}\n" echo -en "\0keep-selection\x1ftrue\n" # echo -en "\0new-selection\x1f2\n" echo "red" echo "lightgreen" echo "lightblue" echo "lightyellow" echo "quit" else echo -en "\x00prompt\x1ftesting\n" echo -en "\0urgent\x1f0,2\n" echo -en "\0active\x1f1\n" echo -en "\0keep-selection\x1ftrue\n" echo -en "\0message\x1fSpecial boldmessage\n" echo "red" echo "lightgreen" echo "lightblue" echo "lightyellow" echo "pink" echo "green" echo "blue" echo "gold" echo "quit" fi ================================================ FILE: Examples/test_script_mode_delim.sh ================================================ #!/usr/bin/env bash if [[ "$@" = "quit" ]] then exit 0 fi # Override the previously set prompt. # We only want to do this on first call of script. if [[ $ROFI_RETV = 0 ]] then echo -en "\x00delim\x1f\\x1\n" fi echo -en "\x00message\x1fmy line1\nmyline2\nmy line3\x1" echo -en "\x00prompt\x1fChange prompt\x1" for a in {1..10} do echo -en "$a\x1" done echo -en "newline\ntest\x1" echo -en "quit" ================================================ FILE: INSTALL.md ================================================ # Installation guide This guide explains how to install rofi using its build system and how you can make debug builds. Rofi uses [Meson](https://mesonbuild.com/) as build system. Be default rofi builds with both backends (x11 and wayland) if available on the system. If no backend is found, it will give an error. You can force the build system to disable the [wayland](#disable-wayland-support) or [x11](#disable-x11-support) backend. ## DEPENDENCY ### For building - C compiler that supports the c99 standard. (gcc or clang) - meson - ninja - pkg-config - flex 2.5.39 or higher - bison - check (Can be disabled using the `--disable-check` configure flag) check is used for build-time tests and does not affect functionality. - Developer packages of the external libraries - glib-compile-resources ### External libraries - libpango >= 1.50 - libpangocairo - libcairo - libcairo-xcb - libglib2.0 >= 2.72 - gmodule-2.0 - gio-unix-2.0 - libgdk-pixbuf-2.0 - libstartup-notification-1.0 - libxkbcommon >= 0.4.1 - libxkbcommon-x11 - libxcb (sometimes split, you need libxcb, libxcb-xkb and libxcb-randr libxcb-xinerama) - xcb-util - xcb-util-wm (sometimes split as libxcb-ewmh and libxcb-icccm) - xcb-util-cursor - xcb-imdkit (optional, 1.0.3 or up preferred) On debian based systems, the developer packages are in the form of: `-dev` on rpm based `-devel`. For wayland support: - wayland - wayland-protocols >= 1.17 ## Install from a release When downloading from the github release page, make sure to grab the archive `rofi-{version}.tar.[g|x]z`. The auto-attached files `source code (zip|tar.gz)` by github do not contain a valid release. It misses a setup build system and includes irrelevant files. ### Meson Check dependencies and configure build system: ```bash meson setup build ``` Build Rofi: ```bash ninja -C build ``` The actual install, execute as root (if needed): ```bash ninja -C build install ``` The default installation prefix is: `/usr/local/` use `meson setup build --prefix={prefix}` to install into another location. ## Install a checkout from git The GitHub Pages version of these directions may be out of date. Please use [INSTALL.md from the online repo][master-install] or your local repository. If you don't have a checkout: ```bash git clone --recursive https://github.com/DaveDavenport/rofi cd rofi/ ``` If you already have a checkout: ```bash cd rofi/ git pull git submodule update --init ``` From this point, use the same steps you use for a release. ## Options for building When you run the configure step there are several options you can configure. For Meson, before the initial setup, you can see rofi options in `meson_options.txt` and Meson options with `meson setup --help`. Meson's built-in options can be set using regular command line arguments, like so: `meson setup build --option=value`. Rofi-specific options can be set using the `-D` argument, like so: `meson setup build -Doption=value`. After the build dir is set up by `meson setup build`, the `meson configure build` command can be used to configure options, by the same means. The most useful one to set is the installation prefix: ```bash # Meson meson setup build --prefix ``` f.e. ```bash # Meson meson setup build --prefix /usr ``` ### Disable x11 support ```bash meson setup build -Dxcb=disabled ``` ### Disable wayland support ```bash meson setup build -Dwayland=disabled ``` ### Install locally or to install locally: ```bash # Meson meson setup build --prefix ${HOME}/.local ``` ### Verbose build output Show the commands called (when using ninja): ```bash # Meson ninja -C build -v ``` ### Debug build Compile with debug symbols and no optimization, this is useful for making backtraces: ```bash # Meson meson configure build --debug ninja -C build ``` ### Get a backtrace Getting a backtrace using GDB is not very handy. Because if rofi get stuck, it grabs keyboard and mouse. So if it crashes in GDB you are stuck. The best way to go is to enable core file. (ulimit -c unlimited in bash) then make rofi crash. You can then load the core in GDB. ```bash # Meson (because it uses a separate build directory) gdb build/rofi core ``` > Where the core file is located and what its exact name is different on each > distributions. Please consult the relevant documentation. For more information see the rofi-debugging(5) manpage. ## Install distribution ### Debian or Ubuntu ```bash apt install rofi ``` ### Fedora ```bash dnf install rofi ``` ### ArchLinux ```bash pacman -S rofi ``` ### Gentoo An ebuild is available, `x11-misc/rofi`. It's up to date, but you may need to enable ~arch to get the latest release: ```bash echo 'x11-misc/rofi ~amd64' >> /etc/portage/package.accept_keywords ``` for amd64 or: ```bash echo 'x11-misc/rofi ~x86' >> /etc/portage/package.accept_keywords ``` for i386. To install it, simply issue `emerge rofi`. ### openSUSE On both openSUSE Leap and openSUSE Tumbleweed rofi can be installed using: ```bash sudo zypper install rofi ``` ### FreeBSD ```bash sudo pkg install rofi ``` ### macOS On macOS rofi can be installed via [MacPorts](https://www.macports.org): ```bash sudo port install rofi ``` [master-install]: https://github.com/DaveDavenport/rofi/blob/master/INSTALL.md#install-a-checkout-from-git ================================================ FILE: README.md ================================================

**Please match the documentation and scripts to the version of rofi used** - [next version](https://github.com/davatorium/rofi) - [2.0.0](https://github.com/davatorium/rofi/tree/2.0.0) - [1.7.9](https://github.com/davatorium/rofi/tree/1.7.9) - [1.7.8](https://github.com/davatorium/rofi/tree/1.7.8) - [1.7.7](https://github.com/davatorium/rofi/tree/1.7.7) - [1.7.6](https://github.com/davatorium/rofi/tree/1.7.6) - [1.7.5](https://github.com/davatorium/rofi/tree/1.7.5) - [1.7.4](https://github.com/davatorium/rofi/tree/1.7.4) - [1.7.3](https://github.com/davatorium/rofi/tree/1.7.3) - [1.7.2](https://github.com/davatorium/rofi/tree/1.7.2) - [1.7.1](https://github.com/davatorium/rofi/tree/1.7.1) - [1.7.0](https://github.com/davatorium/rofi/tree/1.7.0) Also see the locally installed documentation (manpages).

Rofi

A window switcher, Application launcher and dmenu replacement.

**Rofi** started as a clone of simpleswitcher, written by [Sean Pringle](http://github.com/seanpringle/simpleswitcher) - a popup window switcher roughly based on [superswitcher](http://code.google.com/p/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. Thanks to the great work of [lbonn](https://github.com/lbonn), who added Wayland support in his fork and maintained it for years, **Rofi** now officially supports Wayland (since 2025). **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](#features) - [Modes](#modes) - [Manpages](#manpage) - [Installation](#installation) - [Quickstart](#quickstart) - [Usage](#usage) - [Configuration](#configuration) - [Themes](#themes) - [Screenshots](#screenshots) - [Wiki](#wiki) - [Discussion places](#discussion-places) ## Features Its main features are: - Fully configurable keyboard navigation - Type to filter - Tokenized: type any word in any order to filter - Case insensitive (togglable) or SmartCase - 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 - Wayland based WMs that follow the wlr family - 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 [build instructions](INSTALL.md) to build rofi. Wayland support is enabled by default, along with X11/xcb. rofi can also be built *without* X11/xcb or wayland, but atleast one backend should be enabled: meson build -Dxcb=disabled meson build -Dwayland=disabled ### Usage **Rofi** 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 family ### Wayland DPI On wayland, the output is only known after the first surface is shown. This makes sizing rofi windows in absolute size (mm) very difficult, a problem unique for rofi, as the actual DPI is unknown before hand. This can be worked around by manually passing the right DPI via configuration system. If the `dpi` config option is set to `0` and only one monitor is connected rofi will use the DPI of the only connected monitor or if you have multiple monitors and you specify a monitor name, it will use the DPI of that monitor. ## 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](https://github.com/davatorium/rofi/discussions) and [issue tracker](https://github.com/davatorium/rofi/issues?q=) before filing new issue. - Manpages: - [rofi](doc/rofi.1.markdown) - [rofi-theme](doc/rofi-theme.5.markdown) - [rofi-debugging](doc/rofi-debugging.5.markdown) - [rofi-script](doc/rofi-script.5.markdown) - [rofi-theme-selector](doc/rofi-theme-selector.1.markdown) - [rofi-thumbnails](doc/rofi-thumbnails.5.markdown) - [rofi-keys](doc/rofi-keys.5.markdown) - [rofi-dmenu](doc/rofi-dmenu.5.markdown) ## Installation Please see the [installation guide](INSTALL.md) 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](#manpage) section above** #### Running rofi To launch **rofi** directly in a certain mode, specify a mode with `rofi -show `. To show the `run` dialog: ```bash rofi -show run ``` Or get the options from a script: ```bash ~/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: ```bash 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`: ```bash rofi -show combi -combi-modes "window,run,ssh" -modes combi ``` ### Configuration Generate a default configuration file ```bash 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](https://github.com/davatorium/rofi/blob/next/CONFIG.md) for a summary of configuration options. More detailed options are provided in the manpages. ### Themes Please see the [themes manpages](https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown) for a detailed description. The latest bundled themes can be found [here](https://github.com/davatorium/rofi/tree/next/themes). ## Screenshots Rezlooks: ![screenshot](https://raw.githubusercontent.com/davatorium/rofi/next/releasenotes/1.6.0/icons.png) Arthur: ![screenshot2](https://raw.githubusercontent.com/davatorium/rofi/next/releasenotes/1.6.0/icons2.png) Default theme: ![default](https://raw.githubusercontent.com/davatorium/rofi/next/releasenotes/1.4.0/rofi-no-fzf.png) ## Wiki | ❗ **The Wiki is currently unmaintained and might contain outdated data** | | --- | [Go to wiki](https://github.com/davatorium/rofi/wiki) . ### Contents - [User scripts](https://github.com/davatorium/rofi/wiki/User-scripts) - [Examples](https://github.com/davatorium/rofi/wiki#examples) - [dmenu Specs](https://github.com/davatorium/rofi/wiki/dmenu_specs) - [mode Specs](https://github.com/davatorium/rofi/wiki/mode-Specs) - [F.A.Q.](https://github.com/davatorium/rofi/wiki/Frequently-Asked-Questions). - [Script mode](https://github.com/davatorium/rofi/wiki/rfc-script-mode) - [Creating an issue](https://github.com/davatorium/rofi/blob/master/.github/CONTRIBUTING.md) - [Creating a Pull request](https://github.com/davatorium/rofi/wiki/Creating-a-pull-request) ## Discussion places The [GitHub Discussions](https://github.com/davatorium/rofi/discussions) is the preferred location for discussions. - [GitHub Discussions](https://github.com/davatorium/rofi/discussions) - IRC (#rofi on irc.libera.chat) ### Stargazers over time [![Stargazers over time](https://starchart.cc/davatorium/rofi.svg)](https://starchart.cc/davatorium/rofi) ================================================ FILE: config/config.c ================================================ /* * rofi * * MIT/X11 License * Copyright © 2013-2023 Qball Cow * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ #include "config.h" #include "rofi-types.h" #include "settings.h" #include #include #include Settings config = { /** List of enabled modes. */ /** -modes */ #ifdef WINDOW_MODE .modes = "window,drun,run,ssh", #else .modes = "drun,run,ssh", #endif /** Font */ .menu_font = "mono 12", /** Whether to load and show icons */ .show_icons = FALSE, /** Custom command to generate preview icons */ .preview_cmd = NULL, /** Custom command to call when menu selection changes */ .on_selection_changed = NULL, /** Custom command to call when menu mode changes */ .on_mode_changed = NULL, /** Custom command to call when menu entry is accepted */ .on_entry_accepted = NULL, /** Custom command to call when menu is canceled */ .on_menu_canceled = NULL, /** Custom command to call when menu finds errors */ .on_menu_error = NULL, /** Custom command to call when menu screenshot is taken */ .on_screenshot_taken = NULL, /** Terminal to use. (for ssh and open in terminal) */ .terminal_emulator = "rofi-sensible-terminal", .ssh_client = "ssh", /** Command when executing ssh. */ .ssh_command = "{terminal} -e {ssh-client} {host} [-p {port}]", /** Command when running */ .run_command = "{cmd}", /** Command used to list executable commands. empty -> internal */ .run_list_command = "", /** Command executed when running application in terminal */ .run_shell_command = "{terminal} -e {cmd}", /** Command executed on accep-entry-custom for window modus */ .window_command = "wmctrl -i -R {window}", /** No default icon theme, we search Adwaita and gnome as fallback */ .icon_theme = NULL, /** * Location of the window. * Enumeration indicating location or gravity of window. * * WL_NORTH_WEST WL_NORTH WL_NORTH_EAST * * WL_EAST WL_CENTER WL_EAST * * WL_SOUTH_WEST WL_SOUTH WL_SOUTH_EAST * */ .location = WL_CENTER, /** * On Wayland, specifies the layer where rofi is rendered. Available layers are * `background`, `bottom`, `top`, `overlay`. The default layer is `overlay`. */ .wayland_layer = "overlay", /** Y offset */ .y_offset = 0, /** X offset */ .x_offset = 0, /** Always show config.menu_lines lines, even if less lines are available */ .fixed_num_lines = TRUE, /** Do not use history */ .disable_history = FALSE, /** Programs ignored for history */ .ignored_prefixes = "", /** Sort the displayed list */ .sort = FALSE, /** Use levenshtein sorting when matching */ .sorting_method = "normal", /** Case sensitivity of the search */ .case_sensitive = FALSE, /** Case smart of the search */ .case_smart = FALSE, /** Cycle through in the element list */ .cycle = TRUE, /** Height of an element in #chars */ .element_height = 1, /** Sidebar mode, show the modes */ .sidebar_mode = FALSE, /** auto select */ .auto_select = FALSE, /** Parse /etc/hosts file in ssh view. */ .parse_hosts = FALSE, /** Parse ~/.ssh/known_hosts file in ssh view. */ .parse_known_hosts = TRUE, /** Modes to combine into one view. */ .combi_modes = "window,run", .tokenize = TRUE, .matching = "normal", .matching_method = MM_NORMAL, /** Desktop entries to match in drun */ .drun_match_fields = "name,generic,exec,categories,keywords", /** Only show entries in this category */ .drun_categories = NULL, /** Exclude entries in this category */ .drun_exclude_categories = NULL, /** Desktop entry show actions */ .drun_show_actions = FALSE, /** Desktop format display */ .drun_display_format = "{name} [({generic})]", /** Desktop Link launch command */ .drun_url_launcher = "xdg-open", /** Window fields to match in window mode*/ .window_match_fields = "all", /** Monitor */ .monitor = "-5", /** Set filter */ .filter = NULL, .dpi = -1, .threads = 0, .scroll_method = 0, .window_format = "{w} {c} {t}", .click_to_exit = TRUE, .global_kb = FALSE, .theme = NULL, .plugin_path = PLUGIN_PATH, .max_history_size = 25, .combi_hide_mode_prefix = FALSE, .combi_display_format = "{mode} {text}", .matching_negate_char = '-', .cache_dir = NULL, .window_thumbnail = FALSE, /** drun cache */ .drun_use_desktop_cache = FALSE, .drun_reload_desktop_cache = FALSE, /** Benchmarks */ .benchmark_ui = FALSE, /** normalize match */ .normalize_match = FALSE, /** steal focus */ .steal_focus = FALSE, /** fallback icon */ .application_fallback_icon = NULL, /** refilter limit in ms*/ .refilter_timeout_limit = 300, /** workaround for broken xserver (#300 on xserver, #611) */ .xserver_i300_workaround = FALSE, /** What browser to use for completion */ .completer_mode = "filebrowser", /** Whether to enable imdkit, see #2123 */ .enable_imdkit = TRUE, }; ================================================ FILE: data/rofi-theme-selector.desktop ================================================ [Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Terminal=false Exec=rofi-theme-selector Name=Rofi Theme Selector Icon=rofi ================================================ FILE: data/rofi.desktop ================================================ [Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Terminal=false Exec=rofi -show Name=Rofi Icon=rofi ================================================ FILE: doc/README.md ================================================ Manpages are build using [pandoc](https://pandoc.org/) Manpages can be updated using the following make command: ``` make generate-manpage ``` ================================================ FILE: doc/default_configuration.rasi ================================================ configuration { // Timeout from user input. timeout { // The delay after inactivity to execute action. delay: 0; // The action to execute once the delay expires. action: "kb-cancel"; } // File browser mode. filebrowser { sorting-method: "name"; directories-first: true; } } @theme "default" ================================================ FILE: doc/default_theme.rasi ================================================ /** * rofi -dump-theme output. **/ * { red: rgba ( 220, 50, 47, 100 % ); selected-active-foreground: var(background); lightfg: rgba ( 88, 104, 117, 100 % ); separatorcolor: var(foreground); urgent-foreground: var(red); alternate-urgent-background: var(lightbg); lightbg: rgba ( 238, 232, 213, 100 % ); spacing: 2; border-color: var(foreground); normal-background: var(background); background-color: rgba ( 0, 0, 0, 0 % ); alternate-active-background: var(lightbg); active-foreground: var(blue); blue: rgba ( 38, 139, 210, 100 % ); urgent-background: var(background); alternate-normal-foreground: var(foreground); selected-active-background: var(blue); background: rgba ( 253, 246, 227, 100 % ); selected-normal-foreground: var(lightbg); active-background: var(background); alternate-active-foreground: var(blue); alternate-normal-background: var(lightbg); foreground: rgba ( 0, 43, 54, 100 % ); selected-urgent-background: var(red); selected-urgent-foreground: var(background); normal-foreground: var(foreground); alternate-urgent-foreground: var(red); selected-normal-background: var(lightfg); } element { padding: 1px ; spacing: 5px ; border: 0; cursor: pointer; } element normal.normal { background-color: var(normal-background); text-color: var(normal-foreground); } element normal.urgent { background-color: var(urgent-background); text-color: var(urgent-foreground); } element normal.active { background-color: var(active-background); text-color: var(active-foreground); } element selected.normal { background-color: var(selected-normal-background); text-color: var(selected-normal-foreground); } element selected.urgent { background-color: var(selected-urgent-background); text-color: var(selected-urgent-foreground); } element selected.active { background-color: var(selected-active-background); text-color: var(selected-active-foreground); } element alternate.normal { background-color: var(alternate-normal-background); text-color: var(alternate-normal-foreground); } element alternate.urgent { background-color: var(alternate-urgent-background); text-color: var(alternate-urgent-foreground); } element alternate.active { background-color: var(alternate-active-background); text-color: var(alternate-active-foreground); } element-text { background-color: rgba ( 0, 0, 0, 0 % ); text-color: inherit; highlight: inherit; cursor: inherit; } element-icon { background-color: rgba ( 0, 0, 0, 0 % ); size: 1.0000em ; text-color: inherit; cursor: inherit; } window { padding: 5; background-color: var(background); border: 1; } mainbox { padding: 0; border: 0; } message { padding: 1px ; border-color: var(separatorcolor); border: 2px dash 0px 0px ; } textbox { text-color: var(foreground); } listview { padding: 2px 0px 0px ; scrollbar: true; border-color: var(separatorcolor); spacing: 2px ; fixed-height: 0; border: 2px dash 0px 0px ; } scrollbar { width: 4px ; padding: 0; handle-width: 8px ; border: 0; handle-color: var(normal-foreground); } sidebar { border-color: var(separatorcolor); border: 2px dash 0px 0px ; } button { spacing: 0; text-color: var(normal-foreground); cursor: pointer; } button selected { background-color: var(selected-normal-background); text-color: var(selected-normal-foreground); } num-filtered-rows, num-rows { text-color: grey; expand: false; } textbox-num-sep { text-color: grey; expand: false; str: "/"; } inputbar { padding: 1px; spacing: 0px; text-color: var(normal-foreground); children: [ prompt,textbox-prompt-colon,entry, overlay,num-filtered-rows, textbox-num-sep, num-rows, case-indicator ]; } overlay { background-color: var(normal-foreground); foreground-color: var(normal-background); text-color: var(normal-background); padding: 0 0.2em; margin: 0 0.2em; } case-indicator { spacing: 0; text-color: var(normal-foreground); } entry { spacing: 0; text-color: var(normal-foreground); placeholder-color: grey; placeholder: "Type to filter"; cursor: text; } prompt { spacing: 0; text-color: var(normal-foreground); } textbox-prompt-colon { margin: 0px 0.3000em 0.0000em 0.0000em ; expand: false; str: ":"; text-color: inherit; } ================================================ FILE: doc/man_filter.lua ================================================ local Def = {} function Def:new(d) -- init with empty def if d == nil then d = { start_idx = nil, end_idx = nil, def_par = nil, content = {}, } end setmetatable(d, self) self.__index = self return d end function Def:init(start_idx, el) self.start_idx = start_idx self.def_par = el end function Def:append(el) if self.start_idx ~= nil then table.insert(self.content, el) end end function Def:stop(end_idx) if self.start_idx == nil then return nil end local out = self:new({ start_idx = self.start_idx, end_idx = end_idx, def_par = self.def_par, content = self.content, }) self.start_idx = nil self.end_idx = nil self.def_par = nil self.content = {} return out end function Def:to_string() return string.format("start: %d, end: %d, def_par: %s", self.start_idx, self.end_idx, self.def_par) end function find_defs(doc) local defs = {} local idx = 0 local def = Def:new() -- find defintions: -- * start at paragraphs with `word` ... -- * stop at next definition or next header local filter = { traverse = "topdown", Para = function(el) idx = idx + 1 local new_def_start = #el.content >= 1 and el.content[1].tag == "Code" if new_def_start then local newd = def:stop(idx - 1) table.insert(defs, newd) def:init(idx, el.content) else def:append(el) end return nil, false end, Block = function(el) idx = idx + 1 def:append(el) -- stop exploring after one nesting level return nil, false end, Header = function(el) idx = idx + 1 local newd = def:stop(idx - 1) table.insert(defs, newd) return nil, false end, } doc:walk(filter) local newd = def:stop(idx - 1) table.insert(defs, newd) return defs end function convert_defs(doc, defs) local idx = 0 local out_blocks = {} local convert_defs = { traverse = "topdown", Block = function(el) idx = idx + 1 for _, d in ipairs(defs) do if idx == d.end_idx then local dl = pandoc.DefinitionList({ { d.def_par, { d.content } } }) table.insert(out_blocks, dl:walk()) return {}, false end if idx >= d.start_idx and idx < d.end_idx then -- drop return {}, false end end table.insert(out_blocks, el:walk()) return nil, false end, } doc:walk(convert_defs) return pandoc.Pandoc(out_blocks, doc.meta) end -- for <2.17 compatibility -- equivalent to `doc:walk(filter)` local function walk_doc(doc, filter) local div = pandoc.Div(doc.blocks) local blocks = pandoc.walk_block(div, filter).content return pandoc.Pandoc(blocks, doc.meta) end local function extract_title(doc) local title = {} local section local filter = { Header = function(el) local f = { Str = function(el) if el.text:find("%(1%)") ~= nil then section = "General Commands Manual" elseif el.text:find("%(5%)") ~= nil then section = "File Formats Manual" end table.insert(title, el) end, Inline = function(el) table.insert(title, el) end, } if el.level == 1 then pandoc.walk_block(el, f) return {} -- drop end return nil end, } doc = walk_doc(doc, filter) local to_inline = function(s) local r = {} for w in s:gmatch("%S+") do table.insert(r, pandoc.Str(w)) table.insert(r, pandoc.Space()) end table.remove(r, #r) return r end if section ~= nil then for _, e in ipairs({ pandoc.Space(), pandoc.Str("rofi"), pandoc.Space(), pandoc.Str("|"), table.unpack(to_inline(section)), }) do table.insert(title, e) end end doc.meta = pandoc.Meta({ title = pandoc.MetaInlines(title), }) return doc end local function decrement_heading(doc) local filter = { Header = function(el) if el.level > 1 then el.level = el.level - 1 return el end return nil end, } doc = walk_doc(doc, filter) return doc end local function code_in_strong(doc) local filter = { Code = function(el) return pandoc.Strong(el.text) end, } doc = walk_doc(doc, filter) return doc end --- Run filtering function through whole document -- -- * find argument definitions: paragraph starting with inline code (`-arg`) -- * replace the paragraphs until the end of the definition with a DefinitionList -- * extract metadata title from main heading -- * decrement heading from 1 for better display -- * convert inline code text to Strong as usual in man pages function Pandoc(doc) if PANDOC_VERSION >= pandoc.types.Version("2.17.0") then -- 2.17 is required for topdown traversal local defs = find_defs(doc) doc = convert_defs(doc, defs) end doc = extract_title(doc) doc = decrement_heading(doc) doc = code_in_strong(doc) return doc end ================================================ FILE: doc/meson.build ================================================ man_files = [ 'rofi.1', 'rofi-sensible-terminal.1', 'rofi-theme-selector.1', 'rofi-actions.5', 'rofi-debugging.5', 'rofi-dmenu.5', 'rofi-keys.5', 'rofi-script.5', 'rofi-theme.5', 'rofi-thumbnails.5', ] fs = import('fs') pandoc = find_program('pandoc', required: false, version: '>=2.9') if pandoc.found() man_targets = [] cp_cmds = [] foreach f: man_files section_number = f.split('.')[1] install_dest = join_paths(get_option('prefix'), get_option('mandir'), 'man' + section_number) man_targets += custom_target(f, input: ['.'.join([f, 'markdown']), 'man_filter.lua'], output: f, command: [ 'pandoc', '--standalone', '--to=man', '--lua-filter', '@INPUT1@', '-f', 'markdown-tex_math_dollars', '@INPUT0@', '-o', '@OUTPUT@' ], install: true, install_dir: install_dest, build_by_default: true, ) endforeach run_target('generate-manpage', command: ['true'], depends: man_targets) else man_missing = false foreach f: man_files if not fs.is_file(f) man_missing = true endif endforeach if man_missing warning('Man files cannot be generated and not present in source directory, they will not be installed') else install_man(man_files) endif endif doxy_conf = configuration_data() doxy_conf.set('PACKAGE', meson.project_name()) doxy_conf.set('VERSION', meson.project_version()) doxy_conf.set('abs_builddir', join_paths(meson.project_build_root(), meson.current_build_dir())) doxy_conf.set('abs_top_srcdir', meson.project_source_root()) doxyfile = configure_file( input: 'rofi.doxy.in', output: 'rofi.doxy', configuration: doxy_conf, ) doxygen = find_program('doxygen', required: false) if doxygen.found() html_target = custom_target('doxy', input: doxyfile, output: 'html', command: [doxygen, doxyfile], install: false, ) endif ================================================ FILE: doc/rofi-actions.5.markdown ================================================ # rofi-actions(5) ## NAME **rofi-actions** - Custom commands following interaction with rofi menus ## DESCRIPTION **rofi** allows to set custom commands or scripts to be executed when some actions are performed in the menu, such as changing selection, accepting an entry or canceling. This makes it possible for example to play sound effects or read aloud menu entries on selection. ## USAGE Following is the list of rofi flags for specifying custom commands or scripts to execute on supported actions: `-on-selection-changed` *cmd* Command or script to run when the current selection changes. Selected text is forwarded to the command replacing the pattern *{entry}*. `-on-entry-accepted` *cmd* Command or script to run when a menu entry is accepted. Accepted text is forwarded to the command replacing the pattern *{entry}*. `-on-mode-changed` *cmd* Command or script to run when the menu mode (e.g. drun,window,ssh...) is changed. `-on-menu-canceled` *cmd* Command or script to run when the menu is canceled. `-on-menu-error` *cmd* Command or script to run when an error menu is shown (e.g. `rofi -e "error message"`). Error text is forwarded to the command replacing the pattern *{error}*. `-on-screenshot-taken` *cmd* Command or script to run when a screenshot of rofi is taken. Screenshot path is forwarded to the command replacing the pattern *{path}*. ### Example usage Rofi command line: ```bash rofi -on-selection-changed "/path/to/select.sh {entry}" \ -on-entry-accepted "/path/to/accept.sh {entry}" \ -on-menu-canceled "/path/to/exit.sh" \ -on-mode-changed "/path/to/change.sh" \ -on-menu-error "/path/to/error.sh {error}" \ -on-screenshot-taken "/path/to/camera.sh {path}" \ -show drun ``` Rofi config file: ```css configuration { on-selection-changed: "/path/to/select.sh {entry}"; on-entry-accepted: "/path/to/accept.sh {entry}"; on-menu-canceled: "/path/to/exit.sh"; on-mode-changed: "/path/to/change.sh"; on-menu-error: "/path/to/error.sh {error}"; on-screenshot-taken: "/path/to/camera.sh {path}"; } ``` ### Play sound effects Here's an example bash script that plays a sound effect using `aplay` when the current selection is changed: ```bash #!/bin/bash coproc aplay -q $HOME/Music/selecting_an_item.wav ``` The use of `coproc` for playing sounds is suggested, otherwise the rofi process will wait for sounds to end playback before exiting. ### Read aloud Here's an example bash script that reads aloud currently selected entries using `espeak`: ```bash #!/bin/bash killall espeak echo "selected: $@" | espeak ``` ================================================ FILE: doc/rofi-debugging.5.markdown ================================================ # rofi-debugging(5) ## NAME Debugging rofi. When reporting an issue with rofi crashing, or misbehaving. It helps to do some small test to help pin-point the problem. First try disabling your custom configuration: `-no-config` This disables the parsing of the configuration files. This runs rofi in *stock* mode. If you run custom C plugins, you can disable the plugins using: `-no-plugins` ## Get the relevant information for an issue Please pastebin the output of the following commands: ```bash rofi -help rofi -dump-config rofi -dump-theme ``` `rofi -help` provides us with the configuration files parsed, the exact version, monitor layout and more useful information. The `rofi -dump-config` and `rofi -dump-theme` output gives us `rofi` interpretation of your configuration and theme. Please check the output for identifiable information and remove this. ## Timing traces To get a timing trace, enable the **Timings** debug domain. ```bash G_MESSAGES_DEBUG=Timings rofi -show drun ``` It will show a trace with (useful) timing information at relevant points during the execution. This will help debugging when rofi is slow to start. Example trace: ```text (process:14942): Timings-DEBUG: 13:47:39.335: 0.000000 (0.000000): Started (process:14942): Timings-DEBUG: 13:47:39.335: 0.000126 (0.000126): ../source/rofi.c:main:786 (process:14942): Timings-DEBUG: 13:47:39.335: 0.000163 (0.000037): ../source/rofi.c:main:819 (process:14942): Timings-DEBUG: 13:47:39.336: 0.000219 (0.000056): ../source/rofi.c:main:826 Setup Locale (process:14942): Timings-DEBUG: 13:47:39.337: 0.001235 (0.001016): ../source/rofi.c:main:828 Collect MODI (process:14942): Timings-DEBUG: 13:47:39.337: 0.001264 (0.000029): ../source/rofi.c:main:830 Setup MODI (process:14942): Timings-DEBUG: 13:47:39.337: 0.001283 (0.000019): ../source/rofi.c:main:834 Setup mainloop (process:14942): Timings-DEBUG: 13:47:39.337: 0.001369 (0.000086): ../source/rofi.c:main:837 NK Bindings (process:14942): Timings-DEBUG: 13:47:39.337: 0.001512 (0.000143): ../source/xcb.c:display_setup:1177 Open Display (process:14942): Timings-DEBUG: 13:47:39.337: 0.001829 (0.000317): ../source/xcb.c:display_setup:1192 Setup XCB (process:14942): Timings-DEBUG: 13:47:39.346: 0.010650 (0.008821): ../source/rofi.c:main:844 Setup Display (process:14942): Timings-DEBUG: 13:47:39.346: 0.010715 (0.000065): ../source/rofi.c:main:848 Setup abe (process:14942): Timings-DEBUG: 13:47:39.350: 0.015101 (0.004386): ../source/rofi.c:main:883 Load cmd config (process:14942): Timings-DEBUG: 13:47:39.351: 0.015275 (0.000174): ../source/rofi.c:main:907 Setup Modi (process:14942): Timings-DEBUG: 13:47:39.351: 0.015291 (0.000016): ../source/view.c:rofi_view_workers_initialize:1922 Setup Threadpool, start (process:14942): Timings-DEBUG: 13:47:39.351: 0.015349 (0.000058): ../source/view.c:rofi_view_workers_initialize:1945 Setup Threadpool, done (process:14942): Timings-DEBUG: 13:47:39.367: 0.032018 (0.016669): ../source/rofi.c:main:1000 Setup late Display (process:14942): Timings-DEBUG: 13:47:39.367: 0.032080 (0.000062): ../source/rofi.c:main:1003 Theme setup (process:14942): Timings-DEBUG: 13:47:39.367: 0.032109 (0.000029): ../source/rofi.c:startup:668 Startup (process:14942): Timings-DEBUG: 13:47:39.367: 0.032121 (0.000012): ../source/rofi.c:startup:677 Grab keyboard (process:14942): Timings-DEBUG: 13:47:39.368: 0.032214 (0.000093): ../source/view.c:__create_window:701 xcb create window (process:14942): Timings-DEBUG: 13:47:39.368: 0.032235 (0.000021): ../source/view.c:__create_window:705 xcb create gc (process:14942): Timings-DEBUG: 13:47:39.368: 0.033136 (0.000901): ../source/view.c:__create_window:714 create cairo surface (process:14942): Timings-DEBUG: 13:47:39.369: 0.033286 (0.000150): ../source/view.c:__create_window:723 pango cairo font setup (process:14942): Timings-DEBUG: 13:47:39.369: 0.033351 (0.000065): ../source/view.c:__create_window:761 configure font (process:14942): Timings-DEBUG: 13:47:39.381: 0.045896 (0.012545): ../source/view.c:__create_window:769 textbox setup (process:14942): Timings-DEBUG: 13:47:39.381: 0.045944 (0.000048): ../source/view.c:__create_window:781 setup window attributes (process:14942): Timings-DEBUG: 13:47:39.381: 0.045955 (0.000011): ../source/view.c:__create_window:791 setup window fullscreen (process:14942): Timings-DEBUG: 13:47:39.381: 0.045966 (0.000011): ../source/view.c:__create_window:797 setup window name and class (process:14942): Timings-DEBUG: 13:47:39.381: 0.045974 (0.000008): ../source/view.c:__create_window:808 setup startup notification (process:14942): Timings-DEBUG: 13:47:39.381: 0.045981 (0.000007): ../source/view.c:__create_window:810 done (process:14942): Timings-DEBUG: 13:47:39.381: 0.045992 (0.000011): ../source/rofi.c:startup:679 Create Window (process:14942): Timings-DEBUG: 13:47:39.381: 0.045999 (0.000007): ../source/rofi.c:startup:681 Parse ABE (process:14942): Timings-DEBUG: 13:47:39.381: 0.046113 (0.000114): ../source/rofi.c:startup:684 Config sanity check (process:14942): Timings-DEBUG: 13:47:39.384: 0.048229 (0.002116): ../source/dialogs/run.c:get_apps:216 start (process:14942): Timings-DEBUG: 13:47:39.390: 0.054626 (0.006397): ../source/dialogs/run.c:get_apps:336 stop (process:14942): Timings-DEBUG: 13:47:39.390: 0.054781 (0.000155): ../source/dialogs/drun.c:get_apps:634 Get Desktop apps (start) (process:14942): Timings-DEBUG: 13:47:39.391: 0.055264 (0.000483): ../source/dialogs/drun.c:get_apps:641 Get Desktop apps (user dir) (process:14942): Timings-DEBUG: 13:47:39.418: 0.082884 (0.027620): ../source/dialogs/drun.c:get_apps:659 Get Desktop apps (system dirs) (process:14942): Timings-DEBUG: 13:47:39.418: 0.082944 (0.000060): ../source/dialogs/drun.c:get_apps_history:597 Start drun history (process:14942): Timings-DEBUG: 13:47:39.418: 0.082977 (0.000033): ../source/dialogs/drun.c:get_apps_history:617 Stop drun history (process:14942): Timings-DEBUG: 13:47:39.419: 0.083638 (0.000661): ../source/dialogs/drun.c:get_apps:664 Sorting done. (process:14942): Timings-DEBUG: 13:47:39.419: 0.083685 (0.000047): ../source/view.c:rofi_view_create:1759 (process:14942): Timings-DEBUG: 13:47:39.419: 0.083700 (0.000015): ../source/view.c:rofi_view_create:1783 Startup notification (process:14942): Timings-DEBUG: 13:47:39.419: 0.083711 (0.000011): ../source/view.c:rofi_view_create:1786 Get active monitor (process:14942): Timings-DEBUG: 13:47:39.420: 0.084693 (0.000982): ../source/view.c:rofi_view_refilter:1028 Filter start (process:14942): Timings-DEBUG: 13:47:39.421: 0.085992 (0.001299): ../source/view.c:rofi_view_refilter:1132 Filter done (process:14942): Timings-DEBUG: 13:47:39.421: 0.086090 (0.000098): ../source/view.c:rofi_view_update:982 (process:14942): Timings-DEBUG: 13:47:39.421: 0.086123 (0.000033): ../source/view.c:rofi_view_update:1002 Background (process:14942): Timings-DEBUG: 13:47:39.428: 0.092864 (0.006741): ../source/view.c:rofi_view_update:1008 widgets ``` ## Debug domains To further debug the plugin, you can get a trace with (lots of) debug information. This debug output can be enabled for multiple parts in rofi using the glib debug framework. Debug domains can be enabled by setting the G\_MESSAGES\_DEBUG environment variable. At the time of creation of this page, the following debug domains exist: - all: Show debug information from all domains. - X11Helper: The X11 Helper functions. - View: The main window view functions. - Widgets.Box: The Box widget. - Modes.DMenu: The dmenu mode. - Modes.Run: The run mode. - Modes.DRun: The desktop file run mode. - Modes.Window: The window mode. - Modes.Script: The script mode. - Modes.Combi: The script mode. - Modes.Ssh: The ssh mode. - Rofi: The main application. - Timings: Get timing output. - Theme: Theme engine debug output. (warning lots of output). - Widgets.Icon: The Icon widget. - Widgets.Box: The box widget. - Widgets.Container: The container widget. - Widgets.Window: The window widget. - Helpers.IconFetcher: Information about icon lookup. For full list see `man rofi`. Example: `G_MESSAGES_DEBUG=Dialogs.DRun rofi -show drun` To get specific output from the Desktop file run dialog. To redirect the debug output to a file (`~/rofi.log`) add: ```bash rofi -show drun -log ~/rofi.log ``` Specifying the logfile automatically enabled all log domains. This can be useful when rofi is launched from a window manager. ## Creating a backtrace First make sure you compile **rofi** with debug symbols: ```bash make CFLAGS="-O0 -g3" clean rofi ``` Getting a backtrace using GDB is not very handy. Because if rofi get stuck, it grabs keyboard and mouse. So if it crashes in GDB you are stuck. The best way to go is to enable core file. (ulimit -c unlimited in bash) then make rofi crash. You can then load the core in GDB. ```bash gdb rofi core ``` Then type inside gdb: ```bash thread apply all bt ``` The output trace is useful when reporting crashes. Some distribution have `systemd-coredump`, this way you can easily get a backtrace via `coredumpctl`. ## SEE ALSO rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5), rofi-keys(5),rofi-theme-selector(1) ## AUTHOR * Qball Cow ================================================ FILE: doc/rofi-dmenu.5.markdown ================================================ # rofi-dmenu(5) ## NAME **rofi dmenu mode** - Rofi dmenu emulation ## DESCRIPTION To integrate **rofi** into scripts as simple selection dialogs, **rofi** supports emulating **dmenu(1)** (A dynamic menu for X11). The website for `dmenu` can be found [here](http://tools.suckless.org/dmenu/). **rofi** does not aim to be 100% compatible with `dmenu`. There are simply too many flavors of `dmenu`. The idea is that the basic usage command-line flags are obeyed, theme-related flags are not. Besides, **rofi** offers some extended features (like multi-select, highlighting, message bar, extra key bindings). ## BASIC CONCEPT In `dmenu` mode, **rofi** reads data from standard in, splits them into separate entries and displays them. If the user selects a row, this is printed out to standard out, allowing the script to process it further. By default separation of rows is done on new lines, making it easy to pipe the output a one application into **rofi** and the output of rofi into the next. ## USAGE By launching **rofi** with the `-dmenu` flag it will go into dmenu emulation mode. ```bash ls | rofi -dmenu ``` ### DMENU DROP-IN REPLACEMENT If `argv[0]` (calling command) is dmenu, **rofi** will start in dmenu mode. This way, it can be used as a drop-in replacement for dmenu. Just copy or symlink **rofi** to dmenu in `$PATH`. ```bash ln -s /usr/bin/rofi /usr/bin/dmenu ``` ### DMENU VS SCRIPT MODE Script mode is used to extend **rofi**, dmenu mode is used to extend a script. The two do share much of the same input format. Please see the **rofi-script(5)** manpage for more information. ### DMENU SPECIFIC COMMANDLINE FLAGS A lot of these options can also be modified by the script using special input. See the **rofi-script(5)** manpage for more information about this syntax. `-sep` *separator* Separator for `dmenu`. Example: To show a list of 'a' to 'e' with '|' as a separator: ```bash echo "a|b|c|d|e" | rofi -sep '|' -dmenu ``` `-p` *prompt* Specify the prompt to show in `dmenu` mode. For example, select 'monkey', a,b,c,d, or e. ```bash echo "a|b|c|d|e" | rofi -sep '|' -dmenu -p "monkey" ``` Default: *dmenu* `-l` *number of lines to show* Maximum number of lines the menu may show before scrolling. ```bash rofi -dmenu -l 25 ``` Default: *15* `-i` Makes `dmenu` searches case-insensitive `-a` *X* Active row, mark *X* as active. Where *X* is a comma-separated list of python(1)-style indices and ranges, e.g. indices start at 0, -1 refers to the last row with -2 preceding it, ranges are left-open and right-close, and so on. You can specify: - A single row: '5' - A range of (last 3) rows: '-3:' - 4 rows starting from row 7: '7:11' (or in legacy notation: '7-10') - A set of rows: '2,0,-9' - Or any combination: '5,-3:,7:11,2,0,-9' `-u` *X* Urgent row, mark *X* as urgent. See `-a` option for details. `-only-match` Only return a selected item, do not allow custom entry. This mode always returns an entry. It will not return if no matching entry is selected. `-no-custom` Only return a selected item, do not allow custom entry. This mode returns directly when no entries given. `-format` *format* Allows the output of dmenu to be customized (N is the total number of input entries): - 's' selected string - 'i' index (0 - (N-1)) - 'd' index (1 - N) - 'q' quote string - 'p' Selected string stripped from Pango markup (Needs to be a valid string) - 'f' filter string (user input) - 'F' quoted filter string (user input) Default: 's' `-select` *string* Select first line that matches the given string `-mesg` *string* Add a message line below the filter entry box. Supports Pango markup. For more information on supported markup, see [here](https://docs.gtk.org/Pango/pango_markup.html) `-dump` Dump the filtered list to stdout and quit. This can be used to get the list as **rofi** would filter it. Use together with `-filter` command. `-input` *file* Reads from *file* instead of stdin. `-password` Hide the input text. This should not be considered secure! `-markup-rows` Tell **rofi** that DMenu input is Pango markup encoded, and should be rendered. See [here](https://docs.gtk.org/Pango/pango_markup.html) for details about Pango markup. `-multi-select` Allow multiple lines to be selected. Adds a small selection indicator to the left of each entry. `-sync` Force **rofi** mode to first read all data from stdin before showing the selection window. This is original dmenu behavior. Note: the default asynchronous mode will also be automatically disabled if used with conflicting options, such as `-dump`, `-only-match` or `-auto-select`. `-window-title` *title* Set name used for the window title. Will be shown as Rofi - *title* `-w` *windowid* Position **rofi** over the window with the given X11 window ID. `-keep-right` Set ellipsize mode to start. So, the end of the string is visible. `-display-columns` A comma seperated list of columns to show. `-display-column-separator` The column separator. This is a regex. *default*: '\t' `-ballot-selected-str` *string* When multi-select is enabled, prefix this string when element is selected. *default*: "☑ " `-ballot-unselected-str` *string* When multi-select is enabled, prefix this string when element is not selected. *default*: "☐ " `-ellipsize-mode` (start|middle|end) Set ellipsize mode on the listview. *default* "end" ## PARSING ROW OPTIONS Extra options for individual rows can be also set. See the **rofi-script(5)** manpage for details; the syntax and supported features are identical. ## RETURN VALUE - **0**: Row has been selected accepted by user. - **1**: User cancelled the selection. - **10-28**: Row accepted by custom keybinding. ## SEE ALSO rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5), rofi-theme-selector(1), ascii(7) ## AUTHOR Qball Cow Rasmus Steinke Morgane Glidic Original code based on work by: Sean Pringle For a full list of authors, check the AUTHORS file. ================================================ FILE: doc/rofi-keys.5.markdown ================================================ # rofi-keys(5) ## NAME **rofi keys** - Rofi Key and Mouse bindings ## DESCRIPTION **rofi** supports overriding of any of it key and mouse binding. ## Setting binding Bindings can be done on the commandline (-{bindingname}): ```bash rofi -show run -kb-accept-entry 'Control+Shift+space' ``` or via the configuration file: ```css configuration { kb-accept-entry: "Control+Shift+space"; } ``` The key can be set by its name (see above) or its keycode: ```css configuration { kb-accept-entry: "Control+Shift+[65]"; } ``` An easy way to look up keycode is xev(1). Multiple keys can be specified for an action as a comma separated list: ```css configuration { kb-accept-entry: "Control+Shift+space,Return"; } ``` By Default **rofi** reacts on pressing, to act on the release of all keys prepend the binding with `!`: ```css configuration { kb-accept-entry: "!Control+Shift+space,Return"; } ``` ## Unsetting a binding To unset a binding, pass an empty string. ```css configuration { kb-clear-line: ""; } ``` ## Keyboard Bindings `kb-primary-paste` Paste primary selection Default: Control+V,Shift+Insert `kb-secondary-paste` Paste clipboard Default: Control+v,Insert `kb-secondary-copy` Copy current selection to clipboard Default: Control+c `kb-clear-line` Clear input line Default: Control+w `kb-move-front` Beginning of line Default: Control+a `kb-move-end` End of line Default: Control+e `kb-move-word-back` Move back one word Default: Alt+b,Control+Left `kb-move-word-forward` Move forward one word Default: Alt+f,Control+Right `kb-move-char-back` Move back one char Default: Left,Control+b `kb-move-char-forward` Move forward one char Default: Right,Control+f `kb-remove-word-back` Delete previous word Default: Control+Alt+h,Control+BackSpace `kb-remove-word-forward` Delete next word Default: Control+Alt+d `kb-remove-char-forward` Delete next char Default: Delete,Control+d `kb-remove-char-back` Delete previous char Default: BackSpace,Shift+BackSpace,Control+h `kb-remove-to-eol` Delete till the end of line Default: Control+k `kb-remove-to-sol` Delete till the start of line Default: Control+u `kb-transpose-chars` Transpose (swap) the two characters before the cursor Default: Control+t `kb-accept-entry` Accept entry Default: Control+j,Control+m,Return,KP\_Enter `kb-accept-custom` Use entered text as command (in ssh/run modes) Default: Control+Return `kb-accept-custom-alt` Use entered text as command (in ssh/run modes) Default: Control+Shift+Return `kb-accept-alt` Use alternate accept command. Default: Shift+Return `kb-delete-entry` Delete entry from history Default: Shift+Delete `kb-mode-next` Switch to the next mode. Default: Shift+Right,Control+Tab `kb-mode-previous` Switch to the previous mode. Default: Shift+Left,Control+ISO\_Left\_Tab `kb-mode-complete` Start completion for mode. Default: Control+l `kb-row-left` Go to the previous column Default: Control+Page\_Up `kb-row-right` Go to the next column Default: Control+Page\_Down `kb-row-up` Select previous entry Default: Up,Control+p `kb-row-down` Select next entry Default: Down,Control+n `kb-row-tab` Go to next row, if one left, accept it, if no left next mode. Default: `kb-element-next` Go to next row. Default: Tab `kb-element-prev` Go to previous row. Default: ISO\_Left\_Tab `kb-page-prev` Go to the previous page Default: Page\_Up `kb-page-next` Go to the next page Default: Page\_Down `kb-row-first` Go to the first entry Default: Home,KP\_Home `kb-row-last` Go to the last entry Default: End,KP\_End `kb-row-select` Set selected item as input text Default: Control+space `kb-screenshot` Take a screenshot of the rofi window Default: Alt+S `kb-ellipsize` Toggle between ellipsize modes for displayed data Default: Alt+period `kb-toggle-case-sensitivity` Toggle case sensitivity Default: grave,dead\_grave `kb-toggle-sort` Toggle filtered menu sort Default: Alt+grave `kb-cancel` Quit rofi Default: Escape,Control+g,Control+bracketleft `kb-custom-1` Custom keybinding 1 Default: Alt+1 `kb-custom-2` Custom keybinding 2 Default: Alt+2 `kb-custom-3` Custom keybinding 3 Default: Alt+3 `kb-custom-4` Custom keybinding 4 Default: Alt+4 `kb-custom-5` Custom Keybinding 5 Default: Alt+5 `kb-custom-6` Custom keybinding 6 Default: Alt+6 `kb-custom-7` Custom Keybinding 7 Default: Alt+7 `kb-custom-8` Custom keybinding 8 Default: Alt+8 `kb-custom-9` Custom keybinding 9 Default: Alt+9 `kb-custom-10` Custom keybinding 10 Default: Alt+0 `kb-custom-11` Custom keybinding 11 Default: Alt+exclam `kb-custom-12` Custom keybinding 12 Default: Alt+at `kb-custom-13` Custom keybinding 13 Default: Alt+numbersign `kb-custom-14` Custom keybinding 14 Default: Alt+dollar `kb-custom-15` Custom keybinding 15 Default: Alt+percent `kb-custom-16` Custom keybinding 16 Default: Alt+dead\_circumflex `kb-custom-17` Custom keybinding 17 Default: Alt+ampersand `kb-custom-18` Custom keybinding 18 Default: Alt+asterisk `kb-custom-19` Custom Keybinding 19 Default: Alt+parenleft `kb-select-1` Select row 1 Default: Super+1 `kb-select-2` Select row 2 Default: Super+2 `kb-select-3` Select row 3 Default: Super+3 `kb-select-4` Select row 4 Default: Super+4 `kb-select-5` Select row 5 Default: Super+5 `kb-select-6` Select row 6 Default: Super+6 `kb-select-7` Select row 7 Default: Super+7 `kb-select-8` Select row 8 Default: Super+8 `kb-select-9` Select row 9 Default: Super+9 `kb-select-10` Select row 10 Default: Super+0 `kb-entry-history-up` Go up in the entry history. Default: Control+Up `kb-entry-history-down` Go down in the entry history. Default: Control+Down `kb-matcher-up` Select the next matcher. Default: Super+equal `kb-matcher-down` Select the previous matcher. Default: Super+minus ## Mouse Bindings `ml-row-left` Go to the previous column Default: ScrollLeft `ml-row-right` Go to the next column Default: ScrollRight `ml-row-up` Select previous entry Default: ScrollUp `ml-row-down` Select next entry Default: ScrollDown `me-select-entry` Select hovered row Default: MousePrimary `me-accept-entry` Accept hovered row Default: MouseDPrimary `me-accept-custom` Accept hovered row with custom action Default: Control+MouseDPrimary ## Mouse key bindings The following mouse buttons can be bound: * `Primary`: Primary (Left) mouse button click. * `Secondary`: Secondary (Right) mouse button click. * `Middle`: Middle mouse button click. * `Forward`: The forward mouse button. * `Back`: The back mouse button. * `ExtraN`: The N'the mouse button. (Depending on mouse support). The Identifier is constructed as follow: `Mouse