From 6c1c029e9858f8331be8e4d8fabbba4fbf62588d Mon Sep 17 00:00:00 2001 From: Qball Date: Tue, 7 Jan 2025 19:12:21 +0100 Subject: [PATCH 01/10] [CI] Bump upload action to v4 --- .github/actions/autotools/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/autotools/action.yml b/.github/actions/autotools/action.yml index 3161607c..b0b9fff4 100644 --- a/.github/actions/autotools/action.yml +++ b/.github/actions/autotools/action.yml @@ -45,7 +45,7 @@ runs: make make check - id: upload - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: tarballs path: | From ff56b4b954d6c15b6b64002a447e5ea0dcc50aeb Mon Sep 17 00:00:00 2001 From: Qball Date: Tue, 7 Jan 2025 19:19:03 +0100 Subject: [PATCH 02/10] [CI] Fix identical name? --- .github/actions/autotools/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/autotools/action.yml b/.github/actions/autotools/action.yml index b0b9fff4..3896066b 100644 --- a/.github/actions/autotools/action.yml +++ b/.github/actions/autotools/action.yml @@ -47,7 +47,7 @@ runs: - id: upload uses: actions/upload-artifact@v4 with: - name: tarballs + name: tarballs ${{ matrix.machine }}-${{ matrix.cloud }}-${{ matrix.region }}-${{ matrix.arch }}-${{ matrix.distro }}-${{ matrix.stage }}-${{ matrix.theater }} path: | builddir/*.tar.gz builddir/*.tar.xz From 53fd39b6eee69375410c525aa073b598eedfa28e Mon Sep 17 00:00:00 2001 From: Qball Date: Tue, 7 Jan 2025 19:34:56 +0100 Subject: [PATCH 03/10] [CI] Only make dist on one build. --- .github/actions/autotools/action.yml | 6 +++++- .github/workflows/build.yml | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/actions/autotools/action.yml b/.github/actions/autotools/action.yml index 3896066b..2121e454 100644 --- a/.github/actions/autotools/action.yml +++ b/.github/actions/autotools/action.yml @@ -2,6 +2,9 @@ name: Autotools Build description: Builds Rofi using Autotools inputs: + do-release: + description: Do a make dist and upload + required: true cc: description: Compiler to use required: true @@ -45,9 +48,10 @@ runs: make make check - id: upload + if: ${{ inputs.dorelease }} uses: actions/upload-artifact@v4 with: - name: tarballs ${{ matrix.machine }}-${{ matrix.cloud }}-${{ matrix.region }}-${{ matrix.arch }}-${{ matrix.distro }}-${{ matrix.stage }}-${{ matrix.theater }} + name: tarballs ${{ github.sha }} path: | builddir/*.tar.gz builddir/*.tar.xz diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b93ce1cd..c7f40f19 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,7 @@ jobs: with: cc: gcc windowmode: enable + do-release: true build-autotools-gcc-no-window: runs-on: ubuntu-latest steps: @@ -57,6 +58,7 @@ jobs: with: cc: gcc windowmode: disable + do-release: false build-autotools-clang: runs-on: ubuntu-latest steps: @@ -68,3 +70,4 @@ jobs: with: cc: clang windowmode: enable + do-release: false From 829310b2906ce2d479dd4e4fd1cf808b0e4f01c7 Mon Sep 17 00:00:00 2001 From: Qball Date: Tue, 7 Jan 2025 19:42:46 +0100 Subject: [PATCH 04/10] [CI] Fix typo in conditional. --- .github/actions/autotools/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/autotools/action.yml b/.github/actions/autotools/action.yml index 2121e454..53719aa1 100644 --- a/.github/actions/autotools/action.yml +++ b/.github/actions/autotools/action.yml @@ -48,7 +48,7 @@ runs: make make check - id: upload - if: ${{ inputs.dorelease }} + if: ${{ inputs.do-release }} uses: actions/upload-artifact@v4 with: name: tarballs ${{ github.sha }} From b8932b36ce3d7fa7b097c5e904b6237901fdc2af Mon Sep 17 00:00:00 2001 From: Qball Date: Tue, 7 Jan 2025 19:54:04 +0100 Subject: [PATCH 05/10] [CI] Do explicit compare with 'true'? Why is CI a pain like this. --- .github/actions/autotools/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/autotools/action.yml b/.github/actions/autotools/action.yml index 53719aa1..e226fe0d 100644 --- a/.github/actions/autotools/action.yml +++ b/.github/actions/autotools/action.yml @@ -48,7 +48,7 @@ runs: make make check - id: upload - if: ${{ inputs.do-release }} + if: ${{ inputs.do-release == 'true' }} uses: actions/upload-artifact@v4 with: name: tarballs ${{ github.sha }} From 4287ff444ac81ba9755f747f5735eb77e12cd9b5 Mon Sep 17 00:00:00 2001 From: Qball Cow Date: Thu, 9 Jan 2025 12:53:37 +0100 Subject: [PATCH 06/10] [DRun] Reduce DBus timeout to 1500ms add option to disable DBusActivatable. Issue: #2077 --- doc/rofi.1.markdown | 2 ++ source/modes/drun.c | 25 +++++++++++++++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/doc/rofi.1.markdown b/doc/rofi.1.markdown index b740ea33..79f342b8 100644 --- a/doc/rofi.1.markdown +++ b/doc/rofi.1.markdown @@ -1001,6 +1001,8 @@ configuration { parse-user: true; /** Parse system desktop files. */ parse-system: false; + /** Disable DBusActivatable */ + DBusActivatable: false; } } ``` diff --git a/source/modes/drun.c b/source/modes/drun.c index edd27162..848f1a16 100644 --- a/source/modes/drun.c +++ b/source/modes/drun.c @@ -226,6 +226,8 @@ struct _DRunModePrivateData { char *old_completer_input; uint32_t selected_line; char *old_input; + + gboolean disable_dbusactivate; }; struct RegexEvalArg { @@ -396,9 +398,10 @@ static gboolean exec_dbus_entry(DRunModeEntry *e, const char *path) { &files, g_variant_new_take_string(g_file_get_uri(file))); g_object_unref(file); } + // Wait 1500ms, otherwise assume failed. result = g_dbus_connection_call_sync( session, e->app_id, object_path, "org.freedesktop.Application", method, - params, G_VARIANT_TYPE_UNIT, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error); + params, G_VARIANT_TYPE_UNIT, G_DBUS_CALL_FLAGS_NONE, 1500, NULL, &error); g_free(object_path); @@ -415,7 +418,8 @@ static gboolean exec_dbus_entry(DRunModeEntry *e, const char *path) { return TRUE; } -static void exec_cmd_entry(DRunModeEntry *e, const char *path) { +static void exec_cmd_entry(DRunModePrivateData *pd, DRunModeEntry *e, + const char *path) { GError *error = NULL; GRegex *reg = g_regex_new("%[a-zA-Z%]", 0, 0, &error); if (error != NULL) { @@ -488,8 +492,12 @@ static void exec_cmd_entry(DRunModeEntry *e, const char *path) { * If its required to launch via dbus, do that. */ gboolean launched = FALSE; - if (g_key_file_get_boolean(e->key_file, e->action, "DBusActivatable", NULL)) { - launched = exec_dbus_entry(e, path); + if (!(pd->disable_dbusactivate)) { + if (g_key_file_get_boolean(e->key_file, e->action, "DBusActivatable", + NULL)) { + printf("DBus launch\n"); + launched = exec_dbus_entry(e, path); + } } if (launched == FALSE) { /** Fallback to old style if not set. */ @@ -1167,6 +1175,11 @@ static void get_apps(DRunModePrivateData *pd) { } TICK_N("Get Desktop apps (system dirs)"); } + pd->disable_dbusactivate = FALSE; + p = rofi_theme_find_property(wid, P_BOOLEAN, "DBusActivatable", TRUE); + if (p != NULL && (p->type == P_BOOLEAN && p->value.b == FALSE)) { + pd->disable_dbusactivate = TRUE; + } get_apps_history(pd); g_qsort_with_data(pd->entry_list, pd->cmd_list_length, @@ -1300,7 +1313,7 @@ static ModeMode drun_mode_result(Mode *sw, int mretv, char **input, retv = mode_completer_result(rmpd->completer, mretv, input, selected_line, &path); if (retv == MODE_EXIT) { - exec_cmd_entry(&(rmpd->entry_list[rmpd->selected_line]), path); + exec_cmd_entry(rmpd, &(rmpd->entry_list[rmpd->selected_line]), path); } g_free(path); } @@ -1310,7 +1323,7 @@ static ModeMode drun_mode_result(Mode *sw, int mretv, char **input, switch (rmpd->entry_list[selected_line].type) { case DRUN_DESKTOP_ENTRY_TYPE_SERVICE: case DRUN_DESKTOP_ENTRY_TYPE_APPLICATION: - exec_cmd_entry(&(rmpd->entry_list[selected_line]), NULL); + exec_cmd_entry(rmpd, &(rmpd->entry_list[selected_line]), NULL); break; case DRUN_DESKTOP_ENTRY_TYPE_LINK: launch_link_entry(&(rmpd->entry_list[selected_line])); From 329a5dd6a550c2c8a27cc8fff9726d60b9fe41b1 Mon Sep 17 00:00:00 2001 From: Qball Date: Mon, 13 Jan 2025 19:21:05 +0100 Subject: [PATCH 07/10] [Doc] Add first version of 1.7.8 releasenotes. --- releasenotes/1.7.8/release-1.7.8.markdown | 51 +++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 releasenotes/1.7.8/release-1.7.8.markdown diff --git a/releasenotes/1.7.8/release-1.7.8.markdown b/releasenotes/1.7.8/release-1.7.8.markdown new file mode 100644 index 00000000..0ad6d9c6 --- /dev/null +++ b/releasenotes/1.7.8/release-1.7.8.markdown @@ -0,0 +1,51 @@ +# 1.7.8 + +## Fix drawing issue + +In the last release we had some code that hit a bug in some graphics drivers. +The fix that went in had a side-effect causing borders not to be drawn as +expected. This release should fix that. + +Issue: #2076 + +## DBusActivatable + +The previously introduced DBusActivatable seems to cause some issues and +confusion. First if the application (dconf-editor looking at you) does not +acknowledge it launched rofi stays open until it times out. By default this is +15 seconds. We reduced the timeout to 1.5 seconds and added an option to +disable DBusActivatable. + +The 2nd point is, that if you launch an application via DBusActivatable it is +not launched by rofi and does not inherits rofi's environment, but the one +systemd is configured to use for that user. +The archlinux documentation explains this and how to fix this [here](https://wiki.archlinux.org/title/Systemd/User#Environment_variables). + +Issue: #2077 + +## CI Fixes + +Because of some deprecation, the CI scripts are updated. It might be useful for +people who want to help to test the latest rofi that for every commit an +artifact is build with a 'source package' you can install. + +You can find them +[here](https://github.com/davatorium/rofi/actions/workflows/build.yml) by +clicking on the commit you want and scrolling to the bottom of the page. This +contains a zip with the two normal source tarballs. + +## Changelog + +* [DRun] Reduce DBus timeout to 1500ms add option to disable DBusActivatable. + Issue: #2077 +* [CI] Do explicit compare with 'true'? +* [CI] Fix typo in conditional. +* [CI] Only make dist on one build. +* [CI] Fix identical name? +* [CI] Bump upload action to v4 +* [Widget] Actually remove ADD operator from border drawing. + Issue: #2076 +* [widget] Remove the ADD operator. + Issue: #2076 +* Add 1.7.7 docs to README. +* Mark as dev version From 4cdca24995ece77bab6cc02e26f9d4174cb63866 Mon Sep 17 00:00:00 2001 From: Faule Socke <3109602+faulesocke@users.noreply.github.com> Date: Thu, 16 Jan 2025 18:22:28 +0100 Subject: [PATCH 08/10] Fix buffer overflow in rofi -e after reading from stdin (#2082) --- source/rofi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/rofi.c b/source/rofi.c index a88cb973..58cd6873 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -823,6 +823,8 @@ static gboolean startup(G_GNUC_UNUSED gpointer data) { msg = realloc(msg, length * sizeof(char)); } + msg[index] = 0; + if (!rofi_view_error_dialog(msg, markup)) { g_main_loop_quit(main_loop); } From 40a084949d4c2666bcc2e7968cbbc3fb77dc7c49 Mon Sep 17 00:00:00 2001 From: Qball Date: Thu, 16 Jan 2025 18:36:04 +0100 Subject: [PATCH 09/10] [Doc] Update releasenotes. --- releasenotes/1.7.8/release-1.7.8.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/releasenotes/1.7.8/release-1.7.8.markdown b/releasenotes/1.7.8/release-1.7.8.markdown index 0ad6d9c6..2a3f3db2 100644 --- a/releasenotes/1.7.8/release-1.7.8.markdown +++ b/releasenotes/1.7.8/release-1.7.8.markdown @@ -36,6 +36,8 @@ contains a zip with the two normal source tarballs. ## Changelog +* Fix buffer overflow in rofi -e after reading from stdin (#2082) (Thanks to +Faule Socke) * [DRun] Reduce DBus timeout to 1500ms add option to disable DBusActivatable. Issue: #2077 * [CI] Do explicit compare with 'true'? From 68a27ff317ca0ea51d51530ebfe3df8fc0c33513 Mon Sep 17 00:00:00 2001 From: Qball Date: Sun, 19 Jan 2025 10:41:47 +0100 Subject: [PATCH 10/10] Release 1.7.8 --- configure.ac | 2 +- meson.build | 2 +- mkdocs/docs/1.7.8/rofi-debugging.5.markdown | 177 ++ mkdocs/docs/1.7.8/rofi-dmenu.5.markdown | 245 +++ mkdocs/docs/1.7.8/rofi-keys.5.markdown | 576 ++++++ mkdocs/docs/1.7.8/rofi-script.5.markdown | 216 +++ .../1.7.8/rofi-sensible-terminal.1.markdown | 50 + .../docs/1.7.8/rofi-theme-selector.1.markdown | 40 + mkdocs/docs/1.7.8/rofi-theme.5.markdown | 1669 +++++++++++++++++ mkdocs/docs/1.7.8/rofi-thumbnails.5.markdown | 85 + mkdocs/docs/1.7.8/rofi.1.markdown | 1188 ++++++++++++ mkdocs/mkdocs.yml | 8 + 12 files changed, 4256 insertions(+), 2 deletions(-) create mode 100644 mkdocs/docs/1.7.8/rofi-debugging.5.markdown create mode 100644 mkdocs/docs/1.7.8/rofi-dmenu.5.markdown create mode 100644 mkdocs/docs/1.7.8/rofi-keys.5.markdown create mode 100644 mkdocs/docs/1.7.8/rofi-script.5.markdown create mode 100644 mkdocs/docs/1.7.8/rofi-sensible-terminal.1.markdown create mode 100644 mkdocs/docs/1.7.8/rofi-theme-selector.1.markdown create mode 100644 mkdocs/docs/1.7.8/rofi-theme.5.markdown create mode 100644 mkdocs/docs/1.7.8/rofi-thumbnails.5.markdown create mode 100644 mkdocs/docs/1.7.8/rofi.1.markdown diff --git a/configure.ac b/configure.ac index c8565ad2..e6e4d26a 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([rofi], [1.7.7-dev], [https://github.com/davatorium/rofi/],[],[https://github.com/davatorium/rofi/discussions]) +AC_INIT([rofi], [1.7.8], [https://github.com/davatorium/rofi/],[],[https://github.com/davatorium/rofi/discussions]) AC_CONFIG_SRCDIR([source/rofi.c]) AC_CONFIG_HEADER([config.h]) diff --git a/meson.build b/meson.build index 57a5c970..1dea4fb8 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('rofi', 'c', - version: '1.7.7-dev', + version: '1.7.8', meson_version: '>=0.59.0', license: [ 'MIT' ], default_options: [ diff --git a/mkdocs/docs/1.7.8/rofi-debugging.5.markdown b/mkdocs/docs/1.7.8/rofi-debugging.5.markdown new file mode 100644 index 00000000..4df15d52 --- /dev/null +++ b/mkdocs/docs/1.7.8/rofi-debugging.5.markdown @@ -0,0 +1,177 @@ +# 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 diff --git a/mkdocs/docs/1.7.8/rofi-dmenu.5.markdown b/mkdocs/docs/1.7.8/rofi-dmenu.5.markdown new file mode 100644 index 00000000..27e484b3 --- /dev/null +++ b/mkdocs/docs/1.7.8/rofi-dmenu.5.markdown @@ -0,0 +1,245 @@ +# 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://developer.gnome.org/pygtk/stable/pango-markup-language.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. diff --git a/mkdocs/docs/1.7.8/rofi-keys.5.markdown b/mkdocs/docs/1.7.8/rofi-keys.5.markdown new file mode 100644 index 00000000..8aeefacc --- /dev/null +++ b/mkdocs/docs/1.7.8/rofi-keys.5.markdown @@ -0,0 +1,576 @@ +# 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-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 + +## 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