From 524d80466362ed247afdf36e053f5ceb6b919f5f Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Tue, 11 Oct 2022 09:19:35 +0200 Subject: [PATCH 001/139] [Doc] Update rofi-keys manpage with unset section --- doc/rofi-debugging.5 | 139 ++++++----- doc/rofi-dmenu.5 | 125 +++++----- doc/rofi-keys.5 | 358 ++++++++++++++------------- doc/rofi-keys.5.markdown | 9 + doc/rofi-script.5 | 55 +++-- doc/rofi-sensible-terminal.1 | 21 +- doc/rofi-theme-selector.1 | 25 +- doc/rofi-theme.5 | 348 +++++++++++++------------- doc/rofi.1 | 456 ++++++++++++++++++----------------- subprojects/libnkutils | 2 +- 10 files changed, 794 insertions(+), 744 deletions(-) diff --git a/doc/rofi-debugging.5 b/doc/rofi-debugging.5 index dc0eb01b..01a64932 100644 --- a/doc/rofi-debugging.5 +++ b/doc/rofi-debugging.5 @@ -1,4 +1,3 @@ -.nh .TH ROFI DEBUGGING 5 rofi debugging .SH NAME .PP @@ -6,16 +5,16 @@ Debugging rofi. .PP When reporting an issue with rofi crashing, or misbehaving. It helps to do some small test -to help pin-point the problem. +to help pin\-point the problem. .PP -First try disabling your custom configuration: \fB\fC-no-config\fR +First try disabling your custom configuration: \fB\fC\-no\-config\fR .PP This disables the parsing of the configuration files. This runs rofi in \fIstock\fP mode. .PP -If you run custom C plugins, you can disable the plugins using: \fB\fC-no-plugins\fR +If you run custom C plugins, you can disable the plugins using: \fB\fC\-no\-plugins\fR .SH Get the relevant information for an issue .PP @@ -25,19 +24,19 @@ Please pastebin the output of the following commands: .RS .nf -rofi -help -rofi -dump-config -rofi -dump-theme +rofi \-help +rofi \-dump\-config +rofi \-dump\-theme .fi .RE .PP -\fB\fCrofi -help\fR provides us with the configuration files parsed, the exact version, monitor layout +\fB\fCrofi \-help\fR provides us with the configuration files parsed, the exact version, monitor layout and more useful information. .PP -The \fB\fCrofi -dump-config\fR and \fB\fCrofi -dump-theme\fR output gives us \fB\fCrofi\fR +The \fB\fCrofi \-dump\-config\fR and \fB\fCrofi \-dump\-theme\fR output gives us \fB\fCrofi\fR interpretation of your configuration and theme. .PP @@ -51,7 +50,7 @@ To get a timing trace, enable the \fBTimings\fP debug domain. .RS .nf -G_MESSAGES_DEBUG=Timings rofi -show drun +G\_MESSAGES\_DEBUG=Timings rofi \-show drun .fi .RE @@ -67,56 +66,56 @@ Example trace: .RS .nf -(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 +(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 .fi .RE @@ -124,7 +123,7 @@ Example trace: .SH Debug domains .PP 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 +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: .RS @@ -173,16 +172,16 @@ Helpers.IconFetcher: Information about icon lookup. For full list see \fB\fCman rofi\fR\&. .PP -Example: \fB\fCG_MESSAGES_DEBUG=Dialogs.DRun rofi -show drun\fR To get specific output from the Desktop file run dialog. +Example: \fB\fCG\_MESSAGES\_DEBUG=Dialogs.DRun rofi \-show drun\fR To get specific output from the Desktop file run dialog. .PP -To redirect the debug output to a file (\fB\fC~/rofi.log\fR) add: +To redirect the debug output to a file (\fB\fC\~/rofi.log\fR) add: .PP .RS .nf -rofi -show drun -log ~/rofi.log +rofi \-show drun \-log \~/rofi.log .fi .RE @@ -199,7 +198,7 @@ First make sure you compile \fBrofi\fP with debug symbols: .RS .nf -make CFLAGS="-O0 -g3" clean rofi +make CFLAGS="\-O0 \-g3" clean rofi .fi .RE @@ -207,7 +206,7 @@ make CFLAGS="-O0 -g3" clean rofi .PP 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 +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. .PP @@ -235,16 +234,16 @@ thread apply all bt The output trace is useful when reporting crashes. .PP -Some distribution have \fB\fCsystemd-coredump\fR, this way you can easily get a backtrace via \fB\fCcoredumpctl\fR\&. +Some distribution have \fB\fCsystemd\-coredump\fR, this way you can easily get a backtrace via \fB\fCcoredumpctl\fR\&. .SH SEE ALSO .PP -\fBrofi-sensible-terminal(1)\fP, \fBdmenu(1)\fP, \fBrofi-debugging(5)\fP, \fBrofi-theme(5)\fP, \fBrofi-script(5)\fP, \fBrofi-keys(5)\fP,\fBrofi-theme-selector(1)\fP +\fBrofi\-sensible\-terminal(1)\fP, \fBdmenu(1)\fP, \fBrofi\-debugging(5)\fP, \fBrofi\-theme(5)\fP, \fBrofi\-script(5)\fP, \fBrofi\-keys(5)\fP,\fBrofi\-theme\-selector(1)\fP .SH AUTHOR .RS .IP \(bu 2 -Qball Cow qball@blame.services -\[la]mailto:qball@blame.services\[ra] +Qball Cow +\[la]qball@blame.services\[ra] .RE diff --git a/doc/rofi-dmenu.5 b/doc/rofi-dmenu.5 index 9a873c48..999bb739 100644 --- a/doc/rofi-dmenu.5 +++ b/doc/rofi-dmenu.5 @@ -1,8 +1,7 @@ -.nh -.TH ROFI-DMENU 5 rofi-dmenu +.TH ROFI\-DMENU 5 rofi\-dmenu .SH NAME .PP -\fBrofi dmenu mode\fP - Rofi dmenu emulation +\fBrofi dmenu mode\fP \- Rofi dmenu emulation .SH DESCRIPTION .PP @@ -15,8 +14,8 @@ The website for \fB\fCdmenu\fR can be found here .PP \fBrofi\fP does not aim to be 100% compatible with \fB\fCdmenu\fR\&. There are simply too many flavors of \fB\fCdmenu\fR\&. -The idea is that the basic usage command-line flags are obeyed, theme-related flags are not. -Besides, \fBrofi\fP offers some extended features (like multi-select, highlighting, message bar, extra key bindings). +The idea is that the basic usage command\-line flags are obeyed, theme\-related flags are not. +Besides, \fBrofi\fP offers some extended features (like multi\-select, highlighting, message bar, extra key bindings). .SH BASIC CONCEPT .PP @@ -29,27 +28,27 @@ By default separation of rows is done on new lines, making it easy to pipe the o .SH USAGE .PP -By launching \fBrofi\fP with the \fB\fC-dmenu\fR flag it will go into dmenu emulation mode. +By launching \fBrofi\fP with the \fB\fC\-dmenu\fR flag it will go into dmenu emulation mode. .PP .RS .nf -ls | rofi -dmenu +ls | rofi \-dmenu .fi .RE -.SS DMENU DROP-IN REPLACEMENT +.SS DMENU DROP\-IN REPLACEMENT .PP If \fB\fCargv[0]\fR (calling command) is dmenu, \fBrofi\fP will start in dmenu mode. -This way, it can be used as a drop-in replacement for dmenu. Just copy or symlink \fBrofi\fP to dmenu in \fB\fC$PATH\fR\&. +This way, it can be used as a drop\-in replacement for dmenu. Just copy or symlink \fBrofi\fP to dmenu in \fB\fC$PATH\fR\&. .PP .RS .nf -ln -s /usr/bin/rofi /usr/bin/dmenu +ln \-s /usr/bin/rofi /usr/bin/dmenu .fi .RE @@ -57,15 +56,15 @@ ln -s /usr/bin/rofi /usr/bin/dmenu .SS DMENU VS SCRIPT MODE .PP Script mode is used to extend \fBrofi\fP, dmenu mode is used to extend a script. -The two do share much of the same input format. Please see the \fBrofi-script(5)\fP manpage for more information. +The two do share much of the same input format. Please see the \fBrofi\-script(5)\fP manpage for more information. .SS DMENU SPECIFIC COMMANDLINE FLAGS .PP -A lot of these options can also be modified by the script using special input. See the \fBrofi-script(5)\fP manpage +A lot of these options can also be modified by the script using special input. See the \fBrofi\-script(5)\fP manpage for more information about this syntax. .PP -\fB\fC-sep\fR \fIseparator\fP +\fB\fC\-sep\fR \fIseparator\fP .PP Separator for \fB\fCdmenu\fR\&. Example: To show a list of 'a' to 'e' with '|' as a separator: @@ -74,13 +73,13 @@ Separator for \fB\fCdmenu\fR\&. Example: To show a list of 'a' to 'e' with '|' a .RS .nf -echo "a|b|c|d|e" | rofi -sep '|' -dmenu +echo "a|b|c|d|e" | rofi \-sep '|' \-dmenu .fi .RE .PP -\fB\fC-p\fR \fIprompt\fP +\fB\fC\-p\fR \fIprompt\fP .PP Specify the prompt to show in \fB\fCdmenu\fR mode. For example, select 'monkey', a,b,c,d, or e. @@ -89,7 +88,7 @@ Specify the prompt to show in \fB\fCdmenu\fR mode. For example, select 'monkey', .RS .nf -echo "a|b|c|d|e" | rofi -sep '|' -dmenu -p "monkey" +echo "a|b|c|d|e" | rofi \-sep '|' \-dmenu \-p "monkey" .fi .RE @@ -98,7 +97,7 @@ echo "a|b|c|d|e" | rofi -sep '|' -dmenu -p "monkey" Default: \fIdmenu\fP .PP -\fB\fC-l\fR \fInumber of lines to show\fP +\fB\fC\-l\fR \fInumber of lines to show\fP .PP Maximum number of lines the menu may show before scrolling. @@ -107,7 +106,7 @@ Maximum number of lines the menu may show before scrolling. .RS .nf -rofi -dmenu -l 25 +rofi \-dmenu \-l 25 .fi .RE @@ -116,39 +115,39 @@ rofi -dmenu -l 25 Default: \fI15\fP .PP -\fB\fC-i\fR +\fB\fC\-i\fR .PP -Makes \fB\fCdmenu\fR searches case-insensitive +Makes \fB\fCdmenu\fR searches case\-insensitive .PP -\fB\fC-a\fR \fIX\fP +\fB\fC\-a\fR \fIX\fP .PP -Active row, mark \fIX\fP as active. Where \fIX\fP 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: +Active row, mark \fIX\fP as active. Where \fIX\fP 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: .RS .IP \(bu 2 A single row: '5' .IP \(bu 2 -A range of (last 3) rows: '-3:' +A range of (last 3) rows: '\-3:' .IP \(bu 2 -4 rows starting from row 7: '7:11' (or in legacy notation: '7-10') +4 rows starting from row 7: '7:11' (or in legacy notation: '7\-10') .IP \(bu 2 -A set of rows: '2,0,-9' +A set of rows: '2,0,\-9' .IP \(bu 2 -Or any combination: '5,-3:,7:11,2,0,-9' +Or any combination: '5,\-3:,7:11,2,0,\-9' .RE .PP -\fB\fC-u\fR \fIX\fP +\fB\fC\-u\fR \fIX\fP .PP -Urgent row, mark \fIX\fP as urgent. See \fB\fC-a\fR option for details. +Urgent row, mark \fIX\fP as urgent. See \fB\fC\-a\fR option for details. .PP -\fB\fC-only-match\fR +\fB\fC\-only\-match\fR .PP Only return a selected item, do not allow custom entry. @@ -156,14 +155,14 @@ This mode always returns an entry. It will not return if no matching entry is selected. .PP -\fB\fC-no-custom\fR +\fB\fC\-no\-custom\fR .PP Only return a selected item, do not allow custom entry. This mode returns directly when no entries given. .PP -\fB\fC-format\fR \fIformat\fP +\fB\fC\-format\fR \fIformat\fP .PP Allows the output of dmenu to be customized (N is the total number of input entries): @@ -172,9 +171,9 @@ Allows the output of dmenu to be customized (N is the total number of input entr .IP \(bu 2 \&'s' selected string .IP \(bu 2 -\&'i' index (0 - (N-1)) +\&'i' index (0 \-\& (N\-\&1)) .IP \(bu 2 -\&'d' index (1 - N) +\&'d' index (1 \-\& N) .IP \(bu 2 \&'q' quote string .IP \(bu 2 @@ -190,13 +189,13 @@ Allows the output of dmenu to be customized (N is the total number of input entr Default: 's' .PP -\fB\fC-select\fR \fIstring\fP +\fB\fC\-select\fR \fIstring\fP .PP Select first line that matches the given string .PP -\fB\fC-mesg\fR \fIstring\fP +\fB\fC\-mesg\fR \fIstring\fP .PP Add a message line below the filter entry box. Supports Pango markup. @@ -204,27 +203,27 @@ For more information on supported markup, see here \[la]https://docs.gtk.org/Pango/pango_markup.html\[ra] .PP -\fB\fC-dump\fR +\fB\fC\-dump\fR .PP Dump the filtered list to stdout and quit. This can be used to get the list as \fBrofi\fP would filter it. -Use together with \fB\fC-filter\fR command. +Use together with \fB\fC\-filter\fR command. .PP -\fB\fC-input\fR \fIfile\fP +\fB\fC\-input\fR \fIfile\fP .PP Reads from \fIfile\fP instead of stdin. .PP -\fB\fC-password\fR +\fB\fC\-password\fR .PP Hide the input text. This should not be considered secure! .PP -\fB\fC-markup-rows\fR +\fB\fC\-markup\-rows\fR .PP Tell \fBrofi\fP that DMenu input is Pango markup encoded, and should be rendered. @@ -232,47 +231,47 @@ See here \[la]https://developer.gnome.org/pygtk/stable/pango-markup-language.html\[ra] for details about Pango markup. .PP -\fB\fC-multi-select\fR +\fB\fC\-multi\-select\fR .PP Allow multiple lines to be selected. Adds a small selection indicator to the left of each entry. .PP -\fB\fC-sync\fR +\fB\fC\-sync\fR .PP Force \fBrofi\fP mode to first read all data from stdin before showing the selection window. This is original dmenu behavior. .PP Note: the default asynchronous mode will also be automatically disabled if used with conflicting options, -such as \fB\fC-dump\fR, \fB\fC-only-match\fR or \fB\fC-auto-select\fR\&. +such as \fB\fC\-dump\fR, \fB\fC\-only\-match\fR or \fB\fC\-auto\-select\fR\&. .PP -\fB\fC-window-title\fR \fItitle\fP +\fB\fC\-window\-title\fR \fItitle\fP .PP -Set name used for the window title. Will be shown as Rofi - \fItitle\fP +Set name used for the window title. Will be shown as Rofi \- \fItitle\fP .PP -\fB\fC-w\fR \fIwindowid\fP +\fB\fC\-w\fR \fIwindowid\fP .PP Position \fBrofi\fP over the window with the given X11 window ID. .PP -\fB\fC-keep-right\fR +\fB\fC\-keep\-right\fR .PP Set ellipsize mode to start. So, the end of the string is visible. .PP -\fB\fC-display-columns\fR +\fB\fC\-display\-columns\fR .PP A comma seperated list of columns to show. .PP -\fB\fC-display-column-separator\fR +\fB\fC\-display\-column\-separator\fR .PP The column separator. This is a regex. @@ -281,19 +280,19 @@ The column separator. This is a regex. \fIdefault\fP: '\\t' .PP -\fB\fC-ballot-selected-str\fR \fIstring\fP +\fB\fC\-ballot\-selected\-str\fR \fIstring\fP .PP -When multi-select is enabled, prefix this string when element is selected. +When multi\-select is enabled, prefix this string when element is selected. .PP \fIdefault\fP: "☑ " .PP -\fB\fC-ballot-unselected-str\fR \fIstring\fP +\fB\fC\-ballot\-unselected\-str\fR \fIstring\fP .PP -When multi-select is enabled, prefix this string when element is not selected. +When multi\-select is enabled, prefix this string when element is not selected. .PP \fIdefault\fP: "☐ " @@ -305,30 +304,30 @@ When multi-select is enabled, prefix this string when element is not selected. .IP \(bu 2 \fB1\fP: User cancelled the selection. .IP \(bu 2 -\fB10-28\fP: Row accepted by custom keybinding. +\fB10\-28\fP: Row accepted by custom keybinding. .RE .SH SEE ALSO .PP -rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5), rofi-theme-selector(1), ascii(7) +rofi(1), rofi\-sensible\-terminal(1), dmenu(1), rofi\-theme(5), rofi\-script(5), rofi\-theme\-selector(1), ascii(7) .SH AUTHOR .PP -Qball Cow qball@gmpclient.org -\[la]mailto:qball@gmpclient.org\[ra] +Qball Cow +\[la]qball@gmpclient.org\[ra] .PP -Rasmus Steinke rasi@xssn.at -\[la]mailto:rasi@xssn.at\[ra] +Rasmus Steinke +\[la]rasi@xssn.at\[ra] .PP -Morgane Glidic sardemff7+rofi@sardemff7.net -\[la]mailto:sardemff7+rofi@sardemff7.net\[ra] +Morgane Glidic +\[la]sardemff7+rofi@sardemff7.net\[ra] .PP -Original code based on work by: Sean Pringle sean.pringle@gmail.com -\[la]mailto:sean.pringle@gmail.com\[ra] +Original code based on work by: Sean Pringle +\[la]sean.pringle@gmail.com\[ra] .PP For a full list of authors, check the AUTHORS file. diff --git a/doc/rofi-keys.5 b/doc/rofi-keys.5 index 593f2f74..9555edc8 100644 --- a/doc/rofi-keys.5 +++ b/doc/rofi-keys.5 @@ -1,8 +1,7 @@ -.nh -.TH ROFI-KEYS 5 rofi-keys +.TH ROFI\-KEYS 5 rofi\-keys .SH NAME .PP -\fBrofi keys\fP - Rofi Key and Mouse bindings +\fBrofi keys\fP \- Rofi Key and Mouse bindings .SH DESCRIPTION .PP @@ -10,13 +9,13 @@ .SH Setting binding .PP -Bindings can be done on the commandline (-{bindingname}): +Bindings can be done on the commandline (\-{bindingname}): .PP .RS .nf -rofi -show run -kb-accept-entry 'Control+Shift+space' +rofi \-show run \-kb\-accept\-entry 'Control+Shift+space' .fi .RE @@ -29,7 +28,7 @@ or via the configuration file: .nf configuration { - kb-accept-entry: "Control+Shift+space"; + kb\-accept\-entry: "Control+Shift+space"; } .fi @@ -43,7 +42,7 @@ The key can be set by its name (see above) or its keycode: .nf configuration { - kb-accept-entry: "Control+Shift+[65]"; + kb\-accept\-entry: "Control+Shift+[65]"; } .fi @@ -60,7 +59,7 @@ Multiple keys can be specified for an action as a comma separated list: .nf configuration { - kb-accept-entry: "Control+Shift+space,Return"; + kb\-accept\-entry: "Control+Shift+space,Return"; } .fi @@ -75,573 +74,588 @@ prepend the binding with \fB\fC!\fR: .nf configuration { - kb-accept-entry: "!Control+Shift+space,Return"; + kb\-accept\-entry: "!Control+Shift+space,Return"; +} + +.fi +.RE + +.SH Unsetting a binding +.PP +To unset a binding, pass an empty string. + +.PP +.RS + +.nf +configuration { + kb\-clear\-line: ""; } .fi .RE .SH Keyboard Bindings -.SS \fBkb-primary-paste\fP: +.SS \fBkb\-primary\-paste\fP: .PP Paste primary selection .PP -\fBDefault\fP: Control+V,Shift+Insert +\fBDefault\fP: Control+V,Shift+Insert -.SS \fBkb-secondary-paste\fP +.SS \fBkb\-secondary\-paste\fP .PP Paste clipboard .PP -\fBDefault\fP: Control+v,Insert +\fBDefault\fP: Control+v,Insert -.SS \fBkb-secondary-copy\fP +.SS \fBkb\-secondary\-copy\fP .PP Copy current selection to clipboard .PP -\fBDefault\fP: Control+c +\fBDefault\fP: Control+c -.SS \fBkb-clear-line\fP +.SS \fBkb\-clear\-line\fP .PP Clear input line .PP -\fBDefault\fP: Control+w +\fBDefault\fP: Control+w -.SS \fBkb-move-front\fP +.SS \fBkb\-move\-front\fP .PP Beginning of line .PP -\fBDefault\fP: Control+a +\fBDefault\fP: Control+a -.SS \fBkb-move-end\fP +.SS \fBkb\-move\-end\fP .PP End of line .PP -\fBDefault\fP: Control+e +\fBDefault\fP: Control+e -.SS \fBkb-move-word-back\fP +.SS \fBkb\-move\-word\-back\fP .PP Move back one word .PP -\fBDefault\fP: Alt+b,Control+Left +\fBDefault\fP: Alt+b,Control+Left -.SS \fBkb-move-word-forward\fP +.SS \fBkb\-move\-word\-forward\fP .PP Move forward one word .PP -\fBDefault\fP: Alt+f,Control+Right +\fBDefault\fP: Alt+f,Control+Right -.SS \fBkb-move-char-back\fP +.SS \fBkb\-move\-char\-back\fP .PP Move back one char .PP -\fBDefault\fP: Left,Control+b +\fBDefault\fP: Left,Control+b -.SS \fBkb-move-char-forward\fP +.SS \fBkb\-move\-char\-forward\fP .PP Move forward one char .PP -\fBDefault\fP: Right,Control+f +\fBDefault\fP: Right,Control+f -.SS \fBkb-remove-word-back\fP +.SS \fBkb\-remove\-word\-back\fP .PP Delete previous word .PP -\fBDefault\fP: Control+Alt+h,Control+BackSpace +\fBDefault\fP: Control+Alt+h,Control+BackSpace -.SS \fBkb-remove-word-forward\fP +.SS \fBkb\-remove\-word\-forward\fP .PP Delete next word .PP -\fBDefault\fP: Control+Alt+d +\fBDefault\fP: Control+Alt+d -.SS \fBkb-remove-char-forward\fP +.SS \fBkb\-remove\-char\-forward\fP .PP Delete next char .PP -\fBDefault\fP: Delete,Control+d +\fBDefault\fP: Delete,Control+d -.SS \fBkb-remove-char-back\fP +.SS \fBkb\-remove\-char\-back\fP .PP Delete previous char .PP -\fBDefault\fP: BackSpace,Shift+BackSpace,Control+h +\fBDefault\fP: BackSpace,Shift+BackSpace,Control+h -.SS \fBkb-remove-to-eol\fP +.SS \fBkb\-remove\-to\-eol\fP .PP Delete till the end of line .PP -\fBDefault\fP: Control+k +\fBDefault\fP: Control+k -.SS \fBkb-remove-to-sol\fP +.SS \fBkb\-remove\-to\-sol\fP .PP Delete till the start of line .PP -\fBDefault\fP: Control+u +\fBDefault\fP: Control+u -.SS \fBkb-accept-entry\fP +.SS \fBkb\-accept\-entry\fP .PP Accept entry .PP -\fBDefault\fP: Control+j,Control+m,Return,KP_Enter +\fBDefault\fP: Control+j,Control+m,Return,KP\_Enter -.SS \fBkb-accept-custom\fP +.SS \fBkb\-accept\-custom\fP .PP Use entered text as command (in ssh/run modes) .PP -\fBDefault\fP: Control+Return +\fBDefault\fP: Control+Return -.SS \fBkb-accept-custom-alt\fP +.SS \fBkb\-accept\-custom\-alt\fP .PP Use entered text as command (in ssh/run modes) .PP -\fBDefault\fP: Control+Shift+Return +\fBDefault\fP: Control+Shift+Return -.SS \fBkb-accept-alt\fP +.SS \fBkb\-accept\-alt\fP .PP Use alternate accept command. .PP -\fBDefault\fP: Shift+Return +\fBDefault\fP: Shift+Return -.SS \fBkb-delete-entry\fP +.SS \fBkb\-delete\-entry\fP .PP Delete entry from history .PP -\fBDefault\fP: Shift+Delete +\fBDefault\fP: Shift+Delete -.SS \fBkb-mode-next\fP +.SS \fBkb\-mode\-next\fP .PP Switch to the next mode. .PP -\fBDefault\fP: Shift+Right,Control+Tab +\fBDefault\fP: Shift+Right,Control+Tab -.SS \fBkb-mode-previous\fP +.SS \fBkb\-mode\-previous\fP .PP Switch to the previous mode. .PP -\fBDefault\fP: Shift+Left,Control+ISO_Left_Tab +\fBDefault\fP: Shift+Left,Control+ISO\_Left\_Tab -.SS \fBkb-mode-complete\fP +.SS \fBkb\-mode\-complete\fP .PP Start completion for mode. .PP -\fBDefault\fP: Control+l +\fBDefault\fP: Control+l -.SS \fBkb-row-left\fP +.SS \fBkb\-row\-left\fP .PP Go to the previous column .PP -\fBDefault\fP: Control+Page_Up +\fBDefault\fP: Control+Page\_Up -.SS \fBkb-row-right\fP +.SS \fBkb\-row\-right\fP .PP Go to the next column .PP -\fBDefault\fP: Control+Page_Down +\fBDefault\fP: Control+Page\_Down -.SS \fBkb-row-up\fP +.SS \fBkb\-row\-up\fP .PP Select previous entry .PP -\fBDefault\fP: Up,Control+p +\fBDefault\fP: Up,Control+p -.SS \fBkb-row-down\fP +.SS \fBkb\-row\-down\fP .PP Select next entry .PP -\fBDefault\fP: Down,Control+n +\fBDefault\fP: Down,Control+n -.SS \fBkb-row-tab\fP +.SS \fBkb\-row\-tab\fP .PP Go to next row, if one left, accept it, if no left next mode. .PP -\fBDefault\fP: +\fBDefault\fP: -.SS \fBkb-element-next\fP +.SS \fBkb\-element\-next\fP .PP Go to next row. .PP -\fBDefault\fP: Tab +\fBDefault\fP: Tab -.SS \fBkb-element-prev\fP +.SS \fBkb\-element\-prev\fP .PP Go to previous row. .PP -\fBDefault\fP: ISO_Left_Tab +\fBDefault\fP: ISO\_Left\_Tab -.SS \fBkb-page-prev\fP +.SS \fBkb\-page\-prev\fP .PP Go to the previous page .PP -\fBDefault\fP: Page_Up +\fBDefault\fP: Page\_Up -.SS \fBkb-page-next\fP +.SS \fBkb\-page\-next\fP .PP Go to the next page .PP -\fBDefault\fP: Page_Down +\fBDefault\fP: Page\_Down -.SS \fBkb-row-first\fP +.SS \fBkb\-row\-first\fP .PP Go to the first entry .PP -\fBDefault\fP: Home,KP_Home +\fBDefault\fP: Home,KP\_Home -.SS \fBkb-row-last\fP +.SS \fBkb\-row\-last\fP .PP Go to the last entry .PP -\fBDefault\fP: End,KP_End +\fBDefault\fP: End,KP\_End -.SS \fBkb-row-select\fP +.SS \fBkb\-row\-select\fP .PP Set selected item as input text .PP -\fBDefault\fP: Control+space +\fBDefault\fP: Control+space -.SS \fBkb-screenshot\fP +.SS \fBkb\-screenshot\fP .PP Take a screenshot of the rofi window .PP -\fBDefault\fP: Alt+S +\fBDefault\fP: Alt+S -.SS \fBkb-ellipsize\fP +.SS \fBkb\-ellipsize\fP .PP Toggle between ellipsize modes for displayed data .PP -\fBDefault\fP: Alt+period +\fBDefault\fP: Alt+period -.SS \fBkb-toggle-case-sensitivity\fP +.SS \fBkb\-toggle\-case\-sensitivity\fP .PP Toggle case sensitivity .PP -\fBDefault\fP: grave,dead_grave +\fBDefault\fP: grave,dead\_grave -.SS \fBkb-toggle-sort\fP +.SS \fBkb\-toggle\-sort\fP .PP Toggle sort .PP -\fBDefault\fP: Alt+grave +\fBDefault\fP: Alt+grave -.SS \fBkb-cancel\fP +.SS \fBkb\-cancel\fP .PP Quit rofi .PP -\fBDefault\fP: Escape,Control+g,Control+bracketleft +\fBDefault\fP: Escape,Control+g,Control+bracketleft -.SS \fBkb-custom-1\fP +.SS \fBkb\-custom\-1\fP .PP Custom keybinding 1 .PP -\fBDefault\fP: Alt+1 +\fBDefault\fP: Alt+1 -.SS \fBkb-custom-2\fP +.SS \fBkb\-custom\-2\fP .PP Custom keybinding 2 .PP -\fBDefault\fP: Alt+2 +\fBDefault\fP: Alt+2 -.SS \fBkb-custom-3\fP +.SS \fBkb\-custom\-3\fP .PP Custom keybinding 3 .PP -\fBDefault\fP: Alt+3 +\fBDefault\fP: Alt+3 -.SS \fBkb-custom-4\fP +.SS \fBkb\-custom\-4\fP .PP Custom keybinding 4 .PP -\fBDefault\fP: Alt+4 +\fBDefault\fP: Alt+4 -.SS \fBkb-custom-5\fP +.SS \fBkb\-custom\-5\fP .PP Custom Keybinding 5 .PP -\fBDefault\fP: Alt+5 +\fBDefault\fP: Alt+5 -.SS \fBkb-custom-6\fP +.SS \fBkb\-custom\-6\fP .PP Custom keybinding 6 .PP -\fBDefault\fP: Alt+6 +\fBDefault\fP: Alt+6 -.SS \fBkb-custom-7\fP +.SS \fBkb\-custom\-7\fP .PP Custom Keybinding 7 .PP -\fBDefault\fP: Alt+7 +\fBDefault\fP: Alt+7 -.SS \fBkb-custom-8\fP +.SS \fBkb\-custom\-8\fP .PP Custom keybinding 8 .PP -\fBDefault\fP: Alt+8 +\fBDefault\fP: Alt+8 -.SS \fBkb-custom-9\fP +.SS \fBkb\-custom\-9\fP .PP Custom keybinding 9 .PP -\fBDefault\fP: Alt+9 +\fBDefault\fP: Alt+9 -.SS \fBkb-custom-10\fP +.SS \fBkb\-custom\-10\fP .PP Custom keybinding 10 .PP -\fBDefault\fP: Alt+0 +\fBDefault\fP: Alt+0 -.SS \fBkb-custom-11\fP +.SS \fBkb\-custom\-11\fP .PP Custom keybinding 11 .PP -\fBDefault\fP: Alt+exclam +\fBDefault\fP: Alt+exclam -.SS \fBkb-custom-12\fP +.SS \fBkb\-custom\-12\fP .PP Custom keybinding 12 .PP -\fBDefault\fP: Alt+at +\fBDefault\fP: Alt+at -.SS \fBkb-custom-13\fP +.SS \fBkb\-custom\-13\fP .PP Custom keybinding 13 .PP -\fBDefault\fP: Alt+numbersign +\fBDefault\fP: Alt+numbersign -.SS \fBkb-custom-14\fP +.SS \fBkb\-custom\-14\fP .PP Custom keybinding 14 .PP -\fBDefault\fP: Alt+dollar +\fBDefault\fP: Alt+dollar -.SS \fBkb-custom-15\fP +.SS \fBkb\-custom\-15\fP .PP Custom keybinding 15 .PP -\fBDefault\fP: Alt+percent +\fBDefault\fP: Alt+percent -.SS \fBkb-custom-16\fP +.SS \fBkb\-custom\-16\fP .PP Custom keybinding 16 .PP -\fBDefault\fP: Alt+dead_circumflex +\fBDefault\fP: Alt+dead\_circumflex -.SS \fBkb-custom-17\fP +.SS \fBkb\-custom\-17\fP .PP Custom keybinding 17 .PP -\fBDefault\fP: Alt+ampersand +\fBDefault\fP: Alt+ampersand -.SS \fBkb-custom-18\fP +.SS \fBkb\-custom\-18\fP .PP Custom keybinding 18 .PP -\fBDefault\fP: Alt+asterisk +\fBDefault\fP: Alt+asterisk -.SS \fBkb-custom-19\fP +.SS \fBkb\-custom\-19\fP .PP Custom Keybinding 19 .PP -\fBDefault\fP: Alt+parenleft +\fBDefault\fP: Alt+parenleft -.SS \fBkb-select-1\fP +.SS \fBkb\-select\-1\fP .PP Select row 1 .PP -\fBDefault\fP: Super+1 +\fBDefault\fP: Super+1 -.SS \fBkb-select-2\fP +.SS \fBkb\-select\-2\fP .PP Select row 2 .PP -\fBDefault\fP: Super+2 +\fBDefault\fP: Super+2 -.SS \fBkb-select-3\fP +.SS \fBkb\-select\-3\fP .PP Select row 3 .PP -\fBDefault\fP: Super+3 +\fBDefault\fP: Super+3 -.SS \fBkb-select-4\fP +.SS \fBkb\-select\-4\fP .PP Select row 4 .PP -\fBDefault\fP: Super+4 +\fBDefault\fP: Super+4 -.SS \fBkb-select-5\fP +.SS \fBkb\-select\-5\fP .PP Select row 5 .PP -\fBDefault\fP: Super+5 +\fBDefault\fP: Super+5 -.SS \fBkb-select-6\fP +.SS \fBkb\-select\-6\fP .PP Select row 6 .PP -\fBDefault\fP: Super+6 +\fBDefault\fP: Super+6 -.SS \fBkb-select-7\fP +.SS \fBkb\-select\-7\fP .PP Select row 7 .PP -\fBDefault\fP: Super+7 +\fBDefault\fP: Super+7 -.SS \fBkb-select-8\fP +.SS \fBkb\-select\-8\fP .PP Select row 8 .PP -\fBDefault\fP: Super+8 +\fBDefault\fP: Super+8 -.SS \fBkb-select-9\fP +.SS \fBkb\-select\-9\fP .PP Select row 9 .PP -\fBDefault\fP: Super+9 +\fBDefault\fP: Super+9 -.SS \fBkb-select-10\fP +.SS \fBkb\-select\-10\fP .PP Select row 10 .PP -\fBDefault\fP: Super+0 +\fBDefault\fP: Super+0 .SH Mouse Bindings -.SS \fBml-row-left\fP +.SS \fBml\-row\-left\fP .PP Go to the previous column .PP -\fBDefault\fP: ScrollLeft +\fBDefault\fP: ScrollLeft -.SS \fBml-row-right\fP +.SS \fBml\-row\-right\fP .PP Go to the next column .PP -\fBDefault\fP: ScrollRight +\fBDefault\fP: ScrollRight -.SS \fBml-row-up\fP +.SS \fBml\-row\-up\fP .PP Select previous entry .PP -\fBDefault\fP: ScrollUp +\fBDefault\fP: ScrollUp -.SS \fBml-row-down\fP +.SS \fBml\-row\-down\fP .PP Select next entry .PP -\fBDefault\fP: ScrollDown +\fBDefault\fP: ScrollDown -.SS \fBme-select-entry\fP +.SS \fBme\-select\-entry\fP .PP Select hovered row .PP -\fBDefault\fP: MousePrimary +\fBDefault\fP: MousePrimary -.SS \fBme-accept-entry\fP +.SS \fBme\-accept\-entry\fP .PP Accept hovered row .PP -\fBDefault\fP: MouseDPrimary +\fBDefault\fP: MouseDPrimary -.SS \fBme-accept-custom\fP +.SS \fBme\-accept\-custom\fP .PP Accept hovered row with custom action .PP -\fBDefault\fP: Control+MouseDPrimary +\fBDefault\fP: Control+MouseDPrimary .SH SEE ALSO .PP -rofi(1), rofi-sensible-terminal(1), rofi-theme(5), rofi-script(5) +rofi(1), rofi\-sensible\-terminal(1), rofi\-theme(5), rofi\-script(5) .SH AUTHOR .PP -Qball Cow qball@gmpclient.org -\[la]mailto:qball@gmpclient.org\[ra] +Qball Cow +\[la]qball@gmpclient.org\[ra] .PP -Rasmus Steinke rasi@xssn.at -\[la]mailto:rasi@xssn.at\[ra] +Rasmus Steinke +\[la]rasi@xssn.at\[ra] .PP -Morgane Glidic sardemff7+rofi@sardemff7.net -\[la]mailto:sardemff7+rofi@sardemff7.net\[ra] +Morgane Glidic +\[la]sardemff7+rofi@sardemff7.net\[ra] .PP -Original code based on work by: Sean Pringle sean.pringle@gmail.com -\[la]mailto:sean.pringle@gmail.com\[ra] +Original code based on work by: Sean Pringle +\[la]sean.pringle@gmail.com\[ra] .PP For a full list of authors, check the AUTHORS file. diff --git a/doc/rofi-keys.5.markdown b/doc/rofi-keys.5.markdown index aef2bd87..c23abb6d 100644 --- a/doc/rofi-keys.5.markdown +++ b/doc/rofi-keys.5.markdown @@ -52,6 +52,15 @@ configuration { } ``` +## Unsetting a binding + +To unset a binding, pass an empty string. + +```css +configuration { + kb-clear-line: ""; +} +``` ## Keyboard Bindings diff --git a/doc/rofi-script.5 b/doc/rofi-script.5 index 6e8b9b17..fd57a067 100644 --- a/doc/rofi-script.5 +++ b/doc/rofi-script.5 @@ -1,8 +1,7 @@ -.nh -.TH ROFI-SCRIPT 5 rofi-script +.TH ROFI\-SCRIPT 5 rofi\-script .SH NAME .PP -\fBrofi script mode\fP - Rofi format for scriptable mode. +\fBrofi script mode\fP \- Rofi format for scriptable mode. .SH DESCRIPTION .PP @@ -21,7 +20,7 @@ For example: .RS .nf -rofi -show fb -modes "fb:file_browser.sh" +rofi \-show fb \-modes "fb:file\_browser.sh" .fi .RE @@ -64,7 +63,7 @@ This shows two entries, reload and quit. When the quit entry is selected, rofi c .PP Rofi sets the following environment variable when executing the script: -.SS \fB\fCROFI_RETV\fR +.SS \fB\fCROFI\_RETV\fR .PP An integer number with the current state: @@ -76,15 +75,15 @@ An integer number with the current state: .IP \(bu 2 \fB2\fP: Selected a custom entry. .IP \(bu 2 -\fB10-28\fP: Custom keybinding 1-19 ( need to be explicitly enabled by script ). +\fB10\-28\fP: Custom keybinding 1\-19 ( need to be explicitly enabled by script ). .RE -.SS \fB\fCROFI_INFO\fR +.SS \fB\fCROFI\_INFO\fR .PP Environment get set when selected entry get set with the property value of the 'info' row option, if set. -.SS \fB\fCROFI_DATA\fR +.SS \fB\fCROFI\_DATA\fR .PP Environment get set when script sets \fB\fCdata\fR option in header. @@ -100,7 +99,7 @@ For example to set the prompt: .RS .nf - echo -en "\\0prompt\\x1fChange prompt\\n" + echo \-en "\\0prompt\\x1fChange prompt\\n" .fi .RE @@ -114,7 +113,7 @@ The following extra options exists: .IP \(bu 2 \fBmessage\fP: Update the message text. .IP \(bu 2 -\fBmarkup-rows\fP: If 'true' renders markup in the row. +\fBmarkup\-rows\fP: If 'true' renders markup in the row. .IP \(bu 2 \fBurgent\fP: Mark rows as urgent. (for syntax see the urgent option in dmenu mode) .IP \(bu 2 @@ -122,15 +121,15 @@ The following extra options exists: .IP \(bu 2 \fBdelim\fP: Set the delimiter for for next rows. Default is '\\n' and this option should finish with this. Only call this on first call of script, it is remembered for consecutive calls. .IP \(bu 2 -\fBno-custom\fP: If set to 'true'; only accept listed entries, ignore custom input. +\fBno\-custom\fP: If set to 'true'; only accept listed entries, ignore custom input. .IP \(bu 2 -\fBuse-hot-keys\fP: If set to true, it enabled the Custom keybindings for script. Warning this breaks the normal rofi flow. +\fBuse\-hot\-keys\fP: If set to true, it enabled the Custom keybindings for script. Warning this breaks the normal rofi flow. .IP \(bu 2 -\fBkeep-selection\fP: If set, the selection is not moved to the first entry, but the current position is maintained. The filter is cleared. +\fBkeep\-selection\fP: If set, the selection is not moved to the first entry, but the current position is maintained. The filter is cleared. .IP \(bu 2 -\fBnew-selection\fP: If \fB\fCkeep-selection\fR is set, this allows you to override the selected entry (absolute position). +\fBnew\-selection\fP: If \fB\fCkeep\-selection\fR is set, this allows you to override the selected entry (absolute position). .IP \(bu 2 -\fBdata\fP: Passed data to the next execution of the script via \fBROFI_DATA\fP\&. +\fBdata\fP: Passed data to the next execution of the script via \fBROFI\_DATA\fP\&. .IP \(bu 2 \fBtheme\fP: Small theme snippet to f.e. change the background color of a widget. @@ -148,7 +147,7 @@ For example: .RS .nf - echo -en "aap\\0icon\\x1ffolder\\n" + echo \-en "aap\\0icon\\x1ffolder\\n" .fi .RE @@ -164,7 +163,7 @@ The following options are supported: .IP \(bu 2 \fBnonselectable\fP: If true the row cannot activated. .IP \(bu 2 -\fBinfo\fP: Info that, on selection, gets placed in the \fB\fCROFI_INFO\fR environment variable. This entry does not get searched. +\fBinfo\fP: Info that, on selection, gets placed in the \fB\fCROFI\_INFO\fR environment variable. This entry does not get searched. .RE @@ -175,7 +174,7 @@ multiple entries can be passed using the \fB\fC\\x1f\fR separator. .RS .nf - echo -en "aap\\0icon\\x1ffolder\\x1finfo\\x1ftest\\n" + echo \-en "aap\\0icon\\x1ffolder\\x1finfo\\x1ftest\\n" .fi .RE @@ -192,7 +191,7 @@ In bash the best way to do this is using \fB\fCcoproc\fR\&. .RS .nf - coproc ( myApp > /dev/null 2>&1 ) + coproc ( myApp > /dev/null 2>\&1 ) .fi .RE @@ -204,24 +203,24 @@ See issue #1201 on github. .SH SEE ALSO .PP -rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1) +rofi(1), rofi\-sensible\-terminal(1), dmenu(1), rofi\-theme(5), rofi\-theme\-selector(1) .SH AUTHOR .PP -Qball Cow qball@gmpclient.org -\[la]mailto:qball@gmpclient.org\[ra] +Qball Cow +\[la]qball@gmpclient.org\[ra] .PP -Rasmus Steinke rasi@xssn.at -\[la]mailto:rasi@xssn.at\[ra] +Rasmus Steinke +\[la]rasi@xssn.at\[ra] .PP -Morgane Glidic sardemff7+rofi@sardemff7.net -\[la]mailto:sardemff7+rofi@sardemff7.net\[ra] +Morgane Glidic +\[la]sardemff7+rofi@sardemff7.net\[ra] .PP -Original code based on work by: Sean Pringle sean.pringle@gmail.com -\[la]mailto:sean.pringle@gmail.com\[ra] +Original code based on work by: Sean Pringle +\[la]sean.pringle@gmail.com\[ra] .PP For a full list of authors, check the AUTHORS file. diff --git a/doc/rofi-sensible-terminal.1 b/doc/rofi-sensible-terminal.1 index 86634e19..30d4a15d 100644 --- a/doc/rofi-sensible-terminal.1 +++ b/doc/rofi-sensible-terminal.1 @@ -1,18 +1,17 @@ -.nh -.TH rofi-sensible-terminal 1 rofi-sensible-terminal +.TH rofi\-sensible\-terminal 1 rofi\-sensible\-terminal .SH NAME .PP -\fBrofi-sensible-terminal\fP - launches $TERMINAL with fallbacks +\fBrofi\-sensible\-terminal\fP \- launches $TERMINAL with fallbacks .SH SYNOPSIS .PP -rofi-sensible-terminal [arguments] +rofi\-sensible\-terminal [arguments] .SH DESCRIPTION .PP -rofi-sensible-terminal is invoked in the rofi default config to start a terminal. This -wrapper script is necessary since there is no distribution-independent terminal launcher -(but for example Debian has x-terminal-emulator). Distribution packagers are responsible for +rofi\-sensible\-terminal is invoked in the rofi default config to start a terminal. This +wrapper script is necessary since there is no distribution\-independent terminal launcher +(but for example Debian has x\-terminal\-emulator). Distribution packagers are responsible for shipping this script in a way which is appropriate for the distribution. .PP @@ -20,9 +19,9 @@ It tries to start one of the following (in that order): .RS .IP \(bu 2 -\fB\fC$TERMINAL\fR (this is a non-standard variable) +\fB\fC$TERMINAL\fR (this is a non\-standard variable) .IP \(bu 2 -x-terminal-emulator +x\-terminal\-emulator .IP \(bu 2 urxvt .IP \(bu 2 @@ -44,9 +43,9 @@ xterm .IP \(bu 2 roxterm .IP \(bu 2 -xfce4-terminal.wrapper +xfce4\-terminal.wrapper .IP \(bu 2 -mate-terminal +mate\-terminal .IP \(bu 2 lxterminal .IP \(bu 2 diff --git a/doc/rofi-theme-selector.1 b/doc/rofi-theme-selector.1 index 96df43df..de076ff4 100644 --- a/doc/rofi-theme-selector.1 +++ b/doc/rofi-theme-selector.1 @@ -1,39 +1,38 @@ -.nh -.TH rofi-theme-selector 1 rofi-theme-selector +.TH rofi\-theme\-selector 1 rofi\-theme\-selector .SH NAME .PP -\fBrofi-theme-selector\fP - Preview and apply themes for \fBrofi\fP +\fBrofi\-theme\-selector\fP \- Preview and apply themes for \fBrofi\fP .SH DESCRIPTION .PP -\fBrofi-theme-selector\fP is a bash/rofi script to preview and apply themes for \fBrofi\fP\&. +\fBrofi\-theme\-selector\fP is a bash/rofi script to preview and apply themes for \fBrofi\fP\&. It's part of any installation of \fBrofi\fP\&. .SH USAGE -.SS Running rofi-theme-selector +.SS Running rofi\-theme\-selector .PP -\fBrofi-theme-selector\fP shows a list of all available themes in a \fBrofi\fP window. +\fBrofi\-theme\-selector\fP shows a list of all available themes in a \fBrofi\fP window. It lets you preview each theme with the Enter key and apply the theme to your \fBrofi\fP configuration file with Alt+a. .SH Theme directories .PP -\fBrofi-theme-selector\fP searches the following directories for themes: +\fBrofi\-theme\-selector\fP searches the following directories for themes: .RS .IP \(bu 2 ${PREFIX}/share/rofi/themes .IP \(bu 2 -$XDG_CONFIG_HOME/rofi/themes +$XDG\_CONFIG\_HOME/rofi/themes .IP \(bu 2 -$XDG_DATA_HOME/share/rofi/themes +$XDG\_DATA\_HOME/share/rofi/themes .RE .PP -${PREFIX} reflects the install location of rofi. In most cases this will be "/usr". -$XDG_CONFIG_HOME is normally unset. Default path is "$HOME/.config". -$XDG_DATA_HOME is normally unset. Default path is "$HOME/.local/share". +${PREFIX} reflects the install location of rofi. In most cases this will be "/usr".
+$XDG\_CONFIG\_HOME is normally unset. Default path is "$HOME/.config".
+$XDG\_DATA\_HOME is normally unset. Default path is "$HOME/.local/share". .SH SEE ALSO .PP @@ -41,5 +40,5 @@ rofi(1) .SH AUTHORS .PP -Qball Cow qball@gmpclient.org +Qball Cow qball@gmpclient.org
Rasmus Steinke rasi@xssn.at diff --git a/doc/rofi-theme.5 b/doc/rofi-theme.5 index c0a229c5..a0fe869a 100644 --- a/doc/rofi-theme.5 +++ b/doc/rofi-theme.5 @@ -1,8 +1,7 @@ -.nh -.TH ROFI-THEME 5 rofi-theme +.TH ROFI\-THEME 5 rofi\-theme .SH NAME .PP -\fBrofi-theme\fP - Rofi theme format files +\fBrofi\-theme\fP \- Rofi theme format files .SH GETTING STARTED WITH THEMING .PP @@ -11,7 +10,7 @@ The easiest way to get started theming rofi is by modifying your existing theme. .PP Themes can be modified/tweaked by adding theming elements to the end of the .br -config file. The default location of this file is \fB\fC~/.config/rofi/config.rasi\fR, +config file. The default location of this file is \fB\fC\~/.config/rofi/config.rasi\fR, if the file does not exists, you can create it. .PP @@ -23,10 +22,10 @@ A basic config: .nf configuration { modes: [ combi ]; - combi-modes: [ window, drun, run ]; + combi\-modes: [ window, drun, run ]; } -@theme "gruvbox-light" +@theme "gruvbox\-light" /* Insert theme modifications after this */ @@ -79,7 +78,7 @@ increase the size. First we start by modifying the \fB\fCelement\fR widget: element { orientation: horizontal; - children: [ element-text, element-icon ]; + children: [ element\-text, element\-icon ]; spacing: 5px; } @@ -106,19 +105,19 @@ Resulting in the following packing: .PP The \fB\fCelement\fR (container) widget hold each entry in the \fB\fClistview\fR, we add the -two pre-defined children in the order we want to show. We also specify the +two pre\-defined children in the order we want to show. We also specify the packing direction (\fB\fCorientation\fR) and the spacing between the children (\fB\fCspacing\fR). We specify the space between the two children in absolute pixels (\fB\fCpx\fR). .PP -To increase the icon-size, we need to modify the \fB\fCelement-icon\fR widget. +To increase the icon\-size, we need to modify the \fB\fCelement\-icon\fR widget. .PP .RS .nf -element-icon { +element\-icon { size: 2.5em; } @@ -146,23 +145,23 @@ In this example we specify the size in the em \[la]https://www.w3.org/Style/LieBos3e/em\[ra] unit. .PP -Now lets change the text color of both the \fB\fCentry\fR and the \fB\fCelement-text\fR widget to red and background to blue. +Now lets change the text color of both the \fB\fCentry\fR and the \fB\fCelement\-text\fR widget to red and background to blue. .PP .RS .nf -entry, element-text { - text-color: red; - background-color: rgb(0,0,255); +entry, element\-text { + text\-color: red; + background\-color: rgb(0,0,255); } .fi .RE .PP -Here we use two different methods of writing down the color, for \fB\fCtext-color\fR -we used a named color, for \fB\fCbackground-color\fR we specify it in \fB\fCrgb\fR\&. +Here we use two different methods of writing down the color, for \fB\fCtext\-color\fR +we used a named color, for \fB\fCbackground\-color\fR we specify it in \fB\fCrgb\fR\&. We also specify the property for multiple widgets by passing a comma separated list of widget names. @@ -173,8 +172,8 @@ If you want to center the text relative to the icon, we can set this: .RS .nf -element-text { - vertical-align: 0.5; +element\-text { + vertical\-align: 0.5; } .fi @@ -188,7 +187,7 @@ element-text { │ element │ │ ┌─────────────────────────────────────────────┐ ┌─────────────────┐ │ │ │ │ │ element │ │ -│ │element-text │ │ ─ │ │ +│ │element\-text │ │ ─ │ │ │ │ │ │ icon │ │ │ └─────────────────────────────────────────────┘ └─────────────────┘ │ └─────────────────────────────────────────────────────────────────────┘ @@ -203,7 +202,7 @@ If you want to see the complete theme, including the modification you can run: .RS .nf -rofi -dump-theme +rofi \-dump\-theme .fi .RE @@ -241,7 +240,7 @@ To see the default theme, run the following command: .RS .nf -rofi -no-config -dump-theme +rofi \-no\-config \-dump\-theme .fi .RE @@ -251,12 +250,12 @@ rofi -no-config -dump-theme The need for a new theme format was motivated by the fact that the way rofi handled widgets has changed. From a very static drawing of lines and text to a nice structured form of packing widgets. This change made it possible to provide a more flexible theme framework. The old theme format and config file are not flexible enough to expose these options in a -user-friendly way. Therefore, a new file format has been created, replacing the old one. +user\-friendly way. Therefore, a new file format has been created, replacing the old one. .SH FORMAT SPECIFICATION .SH Encoding .PP -The encoding of the file is UTF-8. Both unix (\fB\fC\\n\fR) and windows (\fB\fC\\r\\n\fR) newlines format are supported. But unix is +The encoding of the file is UTF\-8. Both unix (\fB\fC\\n\fR) and windows (\fB\fC\\r\\n\fR) newlines format are supported. But unix is preferred. .SH Comments @@ -338,7 +337,7 @@ abbreviation for \fBr\fPofi \fBa\fPdvanced \fBs\fPtyle \fBi\fPnformation. .SH Basic Structure .PP Each element has a section with defined properties. Global properties can be defined in section \fB\fC* { }\fR\&. -Sub-section names begin with an optional hash symbol \fB\fC#\fR\&. +Sub\-section names begin with an optional hash symbol \fB\fC#\fR\&. .PP It is advised to define the \fIglobal properties section\fP on top of the file to @@ -387,7 +386,7 @@ A theme can have multiple element theme sections. .PP The element path can consist of multiple names separated by whitespace or dots. -Each element may contain any number of letters, numbers and \fB\fC-\fR\&'s. +Each element may contain any number of letters, numbers and \fB\fC\-\fR\&'s. The first element in the element path can optionally start with a \fB\fC#\fR (for historic reasons). Multiple elements can be specified by a \fB\fC,\fR\&. @@ -399,10 +398,10 @@ This is a valid element name: .nf element normal.normal { - background-color: blue; + background\-color: blue; } button { - background-color: blue; + background\-color: blue; } .fi @@ -416,7 +415,7 @@ And is identical to: .nf element normal normal, button { - background-color: blue; + background\-color: blue; } .fi @@ -483,7 +482,7 @@ Both fields are mandatory for a property. .PP The \fB\fCidentifier\fR names the specified property. Identifiers can consist of any -combination of numbers, letters and '-'. It must not contain any whitespace. +combination of numbers, letters and '\-'. It must not contain any whitespace. The structure of the \fB\fCvalue\fR defines the type of the property. The current parser does not define or enforce a certain type of a particular \fB\fCidentifier\fR\&. When used, values with the wrong type that cannot be converted are ignored. @@ -559,7 +558,7 @@ font: "Awasome 12"; .RE .PP -The string must be valid UTF-8, special characters can be escaped: +The string must be valid UTF\-8, special characters can be escaped: .PP .RS @@ -578,7 +577,7 @@ The following special characters can be escaped: \fB\fC\\b\fR, \fB\fC\\f\fR, \fB .SH Integer .RS .IP \(bu 2 -Format: \fB\fC[-+]?[:digit:]+\fR +Format: \fB\fC[\-+]?[:digit:]+\fR .RE @@ -600,7 +599,7 @@ lines: 12; .SH Real .RS .IP \(bu 2 -Format: \fB\fC[-+]?[:digit:]+(\\.[:digit:]+)?\fR +Format: \fB\fC[\-+]?[:digit:]+(\\.[:digit:]+)?\fR .RE @@ -620,7 +619,7 @@ real: 3.4; .RE .PP -The following is not valid: \fB\fC\&.3\fR, \fB\fC3.\fR or scientific notation: \fB\fC3.4e-3\fR\&. +The following is not valid: \fB\fC\&.3\fR, \fB\fC3.\fR or scientific notation: \fB\fC3.4e\-3\fR\&. .SH Boolean .RS @@ -630,7 +629,7 @@ Format: \fB\fC(true|false)\fR .RE .PP -Boolean value is either \fB\fCtrue\fR or \fB\fCfalse\fR\&. This is case-sensitive. +Boolean value is either \fB\fCtrue\fR or \fB\fCfalse\fR\&. This is case\-\&sensitive. .PP For example: @@ -646,7 +645,7 @@ dynamic: false; .SH Image .PP -\fBrofi\fP support a limited set of background-image formats. +\fBrofi\fP support a limited set of background\-image formats. .RS .IP \(bu 2 @@ -655,12 +654,12 @@ Format: url("path to image"); Format: url("path to image", scale); where scale is: none, both, width, height .IP \(bu 2 -Format: linear-gradient(stop color,stop1, color, stop2 color, ...); +Format: linear\-gradient(stop color,stop1, color, stop2 color, ...); .IP \(bu 2 -Format: linear-gradient(to direction, stop color,stop1, color, stop2 color, ...); +Format: linear\-gradient(to direction, stop color,stop1, color, stop2 color, ...); where direction is: top,left,right,bottom. .IP \(bu 2 -Format: linear-gradient(angle, stop color,stop1, color, stop2 color, ...); +Format: linear\-gradient(angle, stop color,stop1, color, stop2 color, ...); Angle in deg,rad,grad (as used in color). .RE @@ -692,27 +691,31 @@ Format: \fB\fChwb[a]( {ANGLE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE}])\fR .IP \(bu 2 Format: \fB\fCcmyk( {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE} ])\fR .IP \(bu 2 -Format: \fB\fC{named-color} [ / {PERCENTAGE} ]\fR +Format: \fB\fC{named\-color} [ / {PERCENTAGE} ]\fR .RE .PP -The white-space format proposed in CSS4 is also supported. +The white\-space format proposed in CSS4 is also supported. .PP The different values are: .RS .IP \(bu 2 -\fB\fC{HEX}\fR is a hexadecimal number ('0-9a-f' case insensitive). +\fB\fC{HEX}\fR is a hexadecimal number ('0\-9a\-f' case insensitive). .IP \(bu 2 -\fB\fC{INTEGER}\fR value can be between 0 and 255 or 0-100 when representing percentage. +\fB\fC{INTEGER}\fR value can be between 0 and 255 or 0\-100 when representing percentage. .IP \(bu 2 \fB\fC{ANGLE}\fR is the angle on the color wheel, can be in \fB\fCdeg\fR, \fB\fCrad\fR, \fB\fCgrad\fR or \fB\fCturn\fR\&. When no unit is specified, degrees is assumed. .IP \(bu 2 -\fB\fC{PERCENTAGE}\fR can be between 0-1.0, or 0%-100% +\fB\fC{PERCENTAGE}\fR can be between 0\-1.0, or 0%\-100% .IP \(bu 2 -\fB\fC{named-color}\fR is one of the following colors:AliceBlue, AntiqueWhite, Aqua, Aquamarine, Azure, Beige, Bisque, Black, BlanchedAlmond, Blue, BlueViolet, Brown, + +.PP +\fB\fC{named\-color}\fR is one of the following colors: +.PP +AliceBlue, AntiqueWhite, Aqua, Aquamarine, Azure, Beige, Bisque, Black, BlanchedAlmond, Blue, BlueViolet, Brown, BurlyWood, CadetBlue, Chartreuse, Chocolate, Coral, CornflowerBlue, Cornsilk, Crimson, Cyan, DarkBlue, DarkCyan, DarkGoldenRod, DarkGray, DarkGrey, DarkGreen, DarkKhaki, DarkMagenta, DarkOliveGreen, DarkOrange, DarkOrchid, DarkRed, DarkSalmon, DarkSeaGreen, DarkSlateBlue, DarkSlateGray, DarkSlateGrey, DarkTurquoise, DarkViolet, DeepPink, DeepSkyBlue, @@ -736,9 +739,9 @@ For example: .RS .nf -background-color: #FF0000; -border-color: rgba(0,0,1, 0.5); -text-color: SeaGreen; +background\-color: #FF0000; +border\-color: rgba(0,0,1, 0.5); +text\-color: SeaGreen; .fi .RE @@ -750,8 +753,8 @@ or .RS .nf -background-color: transparent; -text-color: Black; +background\-color: transparent; +text\-color: Black; .fi .RE @@ -792,7 +795,7 @@ The following options are available on pango 1.50.0 and up: .PP The following option is disabled as pango crashes on this if there is eel - upsizing or wrapping. This will be re-enabled once fixed: + upsizing or wrapping. This will be re\-enabled once fixed: .RS .IP \(bu 2 @@ -860,7 +863,7 @@ For example: .RE .PP -On a full-HD (1920x1080) monitor, it defines a padding of 192 pixels on the left +On a full\-HD (1920x1080) monitor, it defines a padding of 192 pixels on the left and right side and 108 pixels on the top and bottom. .SS Calculating sizes @@ -871,7 +874,7 @@ Rofi supports some maths in calculating sizes. For this it uses the CSS syntax: .RS .nf -width: calc( 100% - 37px ); +width: calc( 100% \- 37px ); .fi .RE @@ -892,7 +895,7 @@ It supports the following operations: .IP \(bu 2 \fB\fC+\fR : Add .IP \(bu 2 -\fB\fC-\fR : Subtract +\fB\fC\-\fR : Subtract .IP \(bu 2 \fB\fC/\fR : Divide .IP \(bu 2 @@ -940,9 +943,9 @@ The different number of fields in the formats are parsed like: .IP \(bu 2 1 field: \fB\fCall\fR .IP \(bu 2 -2 fields: \fB\fCtop&bottom\fR \fB\fCleft&right\fR +2 fields: \fB\fCtop\&bottom\fR \fB\fCleft\&right\fR .IP \(bu 2 -3 fields: \fB\fCtop\fR, \fB\fCleft&right\fR, \fB\fCbottom\fR +3 fields: \fB\fCtop\fR, \fB\fCleft\&right\fR, \fB\fCbottom\fR .IP \(bu 2 4 fields: \fB\fCtop\fR, \fB\fCright\fR, \fB\fCbottom\fR, \fB\fCleft\fR @@ -980,7 +983,6 @@ style property. .PP When no unit is specified, pixels are assumed. - .RE .SH Position @@ -1118,7 +1120,7 @@ Format: \fB\fC[ keyword, keyword ]\fR .RE .PP -A list starts with a '[' and ends with a ']'. The entries in the list are comma-separated. +A list starts with a '[' and ends with a ']'. The entries in the list are comma\-separated. The \fB\fCkeyword\fR in the list refers to an widget name. .SH List of values @@ -1129,7 +1131,7 @@ Format: \fB\fC[ value, value, ... ]\fR .RE .PP -An list starts with a '[' and ends with a ']'. The entries in the list are comma-separated. +An list starts with a '[' and ends with a ']'. The entries in the list are comma\-separated. .SH Environment variable .RS @@ -1140,14 +1142,14 @@ Format: \fB\fC${:alnum:}\fR .PP This will parse the environment variable as the property value. (that then can be any of the above types). -The environment variable should be an alphanumeric string without white-space. +The environment variable should be an alphanumeric string without white\-space. .PP .RS .nf * { - background-color: ${BG}; + background\-color: ${BG}; } .fi @@ -1161,7 +1163,7 @@ Format: \fB\fCenv(ENVIRONMENT, default)\fR .PP This will parse the environment variable as the property value. (that then can be any of the above types). -The environment variable should be an alphanumeric string without white-space. +The environment variable should be an alphanumeric string without white\-space. If the environment value is not found, the default value is used. .PP @@ -1193,7 +1195,7 @@ Inherits the property from its parent widget. .nf mainbox { - border-color: inherit; + border\-color: inherit; } .fi @@ -1245,6 +1247,7 @@ The current widgets available in \fBrofi\fP: .RS .IP \(bu 2 \fB\fCwindow\fR + .RS .IP \(bu 2 \fB\fCoverlay\fR: the overlay widget. @@ -1252,66 +1255,65 @@ The current widgets available in \fBrofi\fP: \fB\fCmainbox\fR: The mainbox box. .IP \(bu 2 \fB\fCinputbar\fR: The input bar box. + .RS .IP \(bu 2 \fB\fCbox\fR: the horizontal @box packing the widgets .IP \(bu 2 -\fB\fCcase-indicator\fR: the case/sort indicator @textbox +\fB\fCcase\-indicator\fR: the case/sort indicator @textbox .IP \(bu 2 \fB\fCprompt\fR: the prompt @textbox .IP \(bu 2 \fB\fCentry\fR: the main entry @textbox .IP \(bu 2 -\fB\fCnum-rows\fR: Shows the total number of rows. +\fB\fCnum\-rows\fR: Shows the total number of rows. .IP \(bu 2 -\fB\fCnum-filtered-rows\fR: Shows the total number of rows after filtering. +\fB\fCnum\-filtered\-rows\fR: Shows the total number of rows after filtering. .IP \(bu 2 -\fB\fCtextbox-current-entry\fR: Shows the text of the currently selected entry. +\fB\fCtextbox\-current\-entry\fR: Shows the text of the currently selected entry. .IP \(bu 2 -\fB\fCicon-current-entry\fR: Shows the icon of the currently selected entry. +\fB\fCicon\-current\-entry\fR: Shows the icon of the currently selected entry. .RE - .IP \(bu 2 \fB\fClistview\fR: The listview. + .RS .IP \(bu 2 \fB\fCscrollbar\fR: the listview scrollbar .IP \(bu 2 \fB\fCelement\fR: a box in the listview holding the entries + .RS .IP \(bu 2 -\fB\fCelement-icon\fR: the widget in the listview's entry showing the (optional) icon +\fB\fCelement\-icon\fR: the widget in the listview's entry showing the (optional) icon .IP \(bu 2 -\fB\fCelement-index\fR: the widget in the listview's entry keybindable index (1,2,3..0) +\fB\fCelement\-index\fR: the widget in the listview's entry keybindable index (1,2,3..0) .IP \(bu 2 -\fB\fCelement-text\fR: the widget in the listview's entry showing the text. +\fB\fCelement\-text\fR: the widget in the listview's entry showing the text. .RE - .RE - .IP \(bu 2 -\fB\fCmode-switcher\fR: the main horizontal @box packing the buttons. +\fB\fCmode\-switcher\fR: the main horizontal @box packing the buttons. + .RS .IP \(bu 2 \fB\fCbutton\fR: the buttons @textbox for each mode .RE - .IP \(bu 2 \fB\fCmessage\fR: The container holding the textbox. + .RS .IP \(bu 2 \fB\fCtextbox\fR: the message textbox .RE - .RE - .RE .PP @@ -1365,8 +1367,8 @@ Example: .nf nametotextbox selected.active { - background-color: #003642; - text-color: #008ed4; + background\-color: #003642; + text\-color: #008ed4; } .fi @@ -1399,16 +1401,16 @@ Margin on the outside of the widget \fBborder\fP: border Border around the widget (between padding and margin)/ .IP \(bu 2 -\fBborder-radius\fP: padding +\fBborder\-radius\fP: padding Sets a radius on the corners of the borders. .IP \(bu 2 -\fBbackground-color\fP: color +\fBbackground\-color\fP: color Background color .IP \(bu 2 -\fBbackground-image\fP: image +\fBbackground\-image\fP: image Background image .IP \(bu 2 -\fBborder-color\fP: color +\fBborder\-color\fP: color Color of the border .IP \(bu 2 \fBcursor\fP: cursor @@ -1419,31 +1421,47 @@ Type of mouse cursor that is set when the mouse pointer is hovered over the widg .SS window: .RS .IP \(bu 2 + +.PP \fBfont\fP: string The font used in the window .IP \(bu 2 + +.PP \fBtransparency\fP: string Indicating if transparency should be used and what type: -\fBreal\fP - True transparency. Only works with a compositor. -\fBbackground\fP - Take a screenshot of the background image and use that. -\fBscreenshot\fP - Take a screenshot of the screen and use that. -\fBPath\fP to png file - Use an image. +\fBreal\fP \- True transparency. Only works with a compositor. +\fBbackground\fP \- Take a screenshot of the background image and use that. +\fBscreenshot\fP \- Take a screenshot of the screen and use that. +\fBPath\fP to png file \- Use an image. .IP \(bu 2 + +.PP \fBlocation\fP: position The place of the anchor on the monitor .IP \(bu 2 + +.PP \fBanchor\fP: anchor The anchor position on the window .IP \(bu 2 + +.PP \fBfullscreen\fP: boolean Window is fullscreen. .IP \(bu 2 + +.PP \fBwidth\fP: distance The width of the window .IP \(bu 2 -\fBx-offset\fP: distance + +.PP +\fBx\-offset\fP: distance .IP \(bu 2 -\fBy-offset\fP: distance + +.PP +\fBy\-offset\fP: distance The offset of the window to the anchor point, allowing you to push the window left/right/up/down .RE @@ -1451,13 +1469,13 @@ The offset of the window to the anchor point, allowing you to push the window le .SS scrollbar: .RS .IP \(bu 2 -\fBbackground-color\fP: color +\fBbackground\-color\fP: color .IP \(bu 2 -\fBhandle-width\fP: distance +\fBhandle\-width\fP: distance .IP \(bu 2 -\fBhandle-color\fP: color +\fBhandle\-color\fP: color .IP \(bu 2 -\fBborder-color\fP: color +\fBborder\-color\fP: color .RE @@ -1475,25 +1493,25 @@ The offset of the window to the anchor point, allowing you to push the window le .SS textbox: .RS .IP \(bu 2 -\fBbackground-color\fP: color +\fBbackground\-color\fP: color .IP \(bu 2 -\fBborder-color\fP: the color used for the border around the widget. +\fBborder\-color\fP: the color used for the border around the widget. .IP \(bu 2 \fBfont\fP: the font used by this textbox (string). .IP \(bu 2 \fBstr\fP/\fBcontent\fP: the string to display by this textbox (string). .IP \(bu 2 -\fBvertical-align\fP: Vertical alignment of the text. A number between 0 (top) and 1 (bottom). +\fBvertical\-align\fP: Vertical alignment of the text. A number between 0 (top) and 1 (bottom). .IP \(bu 2 -\fBhorizontal-align\fP: Horizontal alignment of the text. A number between 0 (left) and 1 (right). +\fBhorizontal\-align\fP: Horizontal alignment of the text. A number between 0 (left) and 1 (right). .IP \(bu 2 -\fBtext-color\fP: the text color to use. +\fBtext\-color\fP: the text color to use. .IP \(bu 2 -\fBtext-transform\fP: text style {color} for the whole text. +\fBtext\-transform\fP: text style {color} for the whole text. .IP \(bu 2 \fBhighlight\fP: text style {color}. color is optional, multiple highlight styles can be added like: bold underline italic #000000; -This option is only available on the \fB\fCelement-text\fR widget. +This option is only available on the \fB\fCelement\-text\fR widget. .IP \(bu 2 \fBwidth\fP: override the desired width for the textbox. .IP \(bu 2 @@ -1501,15 +1519,15 @@ This option is only available on the \fB\fCelement-text\fR widget. .IP \(bu 2 \fBplaceholder\fP: Set the displayed text (String) when nothing is entered. .IP \(bu 2 -\fBplaceholder-markup\fP: If true, placeholder text supports pango markup for stylizing. +\fBplaceholder\-markup\fP: If true, placeholder text supports pango markup for stylizing. .IP \(bu 2 -\fBplaceholder-color\fP: Color of the placeholder text. +\fBplaceholder\-color\fP: Color of the placeholder text. .IP \(bu 2 \fBblink\fP: Enable/Disable blinking on an input textbox (Boolean). .IP \(bu 2 \fBmarkup\fP: Force markup on, beware that only valid pango markup strings are shown. .IP \(bu 2 -\fBtab-stops\fP: array of distances +\fBtab\-stops\fP: array of distances Set the location of tab stops by their distance from the beginning of the line. Each distance should be greater than the previous one. The text appears to the right of the tab stop position (other alignments are not supported yet). @@ -1522,7 +1540,7 @@ The text appears to the right of the tab stop position (other alignments are not \fBcolumns\fP: integer Number of columns to show (at least 1) .IP \(bu 2 -\fBfixed-height\fP: boolean +\fBfixed\-height\fP: boolean Always show \fB\fClines\fR rows, even if fewer elements are available. .IP \(bu 2 \fBdynamic\fP: boolean @@ -1531,7 +1549,7 @@ Always show \fB\fClines\fR rows, even if fewer elements are available. \fBscrollbar\fP: boolean If the scrollbar should be enabled/disabled. .IP \(bu 2 -\fBscrollbar-width\fP: distance +\fBscrollbar\-width\fP: distance Width of the scrollbar .IP \(bu 2 \fBcycle\fP: boolean @@ -1552,23 +1570,23 @@ Reverse the ordering (top down to bottom up). \fBflow\fP: orientation The order the elements are layed out. Vertical is the original 'column' view. .IP \(bu 2 -\fBfixed-columns\fP: boolean +\fBfixed\-columns\fP: boolean Do not reduce the number of columns shown when number of visible elements is not enough to fill them all. .IP \(bu 2 -\fBrequire-input\fP: boolean +\fBrequire\-input\fP: boolean Listview requires user input to show up. .RE .PP -Each element is a \fB\fCbox\fR called \fB\fCelement\fR\&. Each \fB\fCelement\fR can contain an \fB\fCelement-icon\fR and \fB\fCelement-text\fR\&. +Each element is a \fB\fCbox\fR called \fB\fCelement\fR\&. Each \fB\fCelement\fR can contain an \fB\fCelement\-icon\fR and \fB\fCelement\-text\fR\&. .SS listview text highlight: .PP -The \fB\fCelement-text\fR widget in the \fB\fClistview\fR is the one used to show the text. +The \fB\fCelement\-text\fR widget in the \fB\fClistview\fR is the one used to show the text. On this widget set the \fB\fChighlight\fR property (only place this property is used) to change the style of highlighting. -The \fB\fChighlight\fR property consist of the \fB\fCtext-style\fR property and a color. +The \fB\fChighlight\fR property consist of the \fB\fCtext\-style\fR property and a color. .PP To disable highlighting: @@ -1577,7 +1595,7 @@ To disable highlighting: .RS .nf - element-text { + element\-text { highlight: None; } @@ -1591,7 +1609,7 @@ To set to red underlined: .RS .nf - element-text { + element\-text { highlight: underline red; } @@ -1664,11 +1682,11 @@ The current layout of \fBrofi\fP is structured as follows: .RS .IP \(bu 2 -ci is the case-indicator +ci is the case\-indicator .IP \(bu 2 -fr is the num-filtered-rows +fr is the num\-filtered\-rows .IP \(bu 2 -ns is the num-rows +ns is the num\-rows .RE @@ -1708,17 +1726,17 @@ entry .IP \(bu 2 overlay .IP \(bu 2 -case-indicator +case\-indicator .IP \(bu 2 message .IP \(bu 2 listview .IP \(bu 2 -mode-switcher +mode\-switcher .IP \(bu 2 -num-rows +num\-rows .IP \(bu 2 -num-filtered-rows +num\-filtered\-rows .RE @@ -1729,10 +1747,10 @@ These are used in the default theme as depicted in the figure above. .RS .IP \(bu 2 mainbox -Packs: \fB\fCinputbar, message, listview, mode-switcher\fR +Packs: \fB\fCinputbar, message, listview, mode\-switcher\fR .IP \(bu 2 inputbar -Packs: \fB\fCprompt,entry,case-indicator\fR +Packs: \fB\fCprompt,entry,case\-indicator\fR .RE @@ -1744,7 +1762,7 @@ There are several special widgets that can be used by prefixing the name of the .SS textbox .PP -This is a read-only textbox widget. The displayed string can be set with \fB\fCcontent\fR\&. +This is a read\-only textbox widget. The displayed string can be set with \fB\fCcontent\fR\&. .PP Example: @@ -1753,7 +1771,7 @@ Example: .RS .nf -textbox-custom { +textbox\-custom { expand: false; content: "My Message"; } @@ -1765,7 +1783,7 @@ textbox-custom { .PP This is an icon widget. The displayed icon can be set with \fB\fCfilename\fR and size with \fB\fCsize\fR\&. If the property \fB\fCaction\fR is set, it acts as a button. -\fB\fCaction\fR can be set to a keybinding name and completes that action. (see rofi -show keys for a list). +\fB\fCaction\fR can be set to a keybinding name and completes that action. (see rofi \-show keys for a list). .PP If the \fB\fCsquared\fR property is set to \fBfalse\fP the widget height and width are not forced to be equal. @@ -1777,12 +1795,12 @@ Example: .RS .nf -icon-paste { +icon\-paste { expand: false; - filename: "gtk-paste"; + filename: "gtk\-paste"; size: 24; - vertical-align: 0.5; - action: "kb-primary-paste"; + vertical\-align: 0.5; + action: "kb\-primary\-paste"; } .fi @@ -1792,17 +1810,17 @@ icon-paste { .PP This is a textbox widget that can have a 'clickable' action. The \fB\fCaction\fR can be set to: -\fB\fCkeybinding\fR: accepts a keybinding name and completes that action. (see rofi -show keys for a list). +\fB\fCkeybinding\fR: accepts a keybinding name and completes that action. (see rofi \-show keys for a list). .PP .RS .nf -button-paste { +button\-paste { expand: false; content: "My Clickable Message"; - vertical-align: 0.5; - action: "kb-primary-paste"; + vertical\-align: 0.5; + action: "kb\-primary\-paste"; } .fi @@ -1818,7 +1836,7 @@ property (this always happens on the \fB\fCbox\fR child, see example below): .nf inputbar { - children: [prompt,entry,overlay,case-indicator]; + children: [prompt,entry,overlay,case\-indicator]; } .fi @@ -1835,9 +1853,9 @@ Below is an example of a theme emulating dmenu: .nf * { - background-color: Black; - text-color: White; - border-color: White; + background\-color: Black; + text\-color: White; + border\-color: White; font: "Times New Roman 12"; } @@ -1869,7 +1887,7 @@ element { padding: 0px 2px; } element selected { - background-color: SteelBlue; + background\-color: SteelBlue; } .fi @@ -1904,15 +1922,15 @@ Explanation of the different parts: .RS .IP \(bu 2 -Content - The content of the widget. +Content \- The content of the widget. .IP \(bu 2 -Padding - Clears an area around the widget. +Padding \- Clears an area around the widget. The padding shows the background color of the widget. .IP \(bu 2 -Border - A border that goes around the padding and content. -The border use the border-color of the widget. +Border \- A border that goes around the padding and content. +The border use the border\-color of the widget. .IP \(bu 2 -Margin - Clears an area outside the border. +Margin \- Clears an area outside the border. The margin is transparent. .RE @@ -1980,7 +1998,7 @@ To get debug information from the parser, run rofi like: .RS .nf -G_MESSAGES_DEBUG=Parser rofi -show run +G\_MESSAGES\_DEBUG=Parser rofi \-show run .fi .RE @@ -1995,19 +2013,19 @@ To see the elements queried during running, run: .RS .nf -G_MESSAGES_DEBUG=Theme rofi -show run +G\_MESSAGES\_DEBUG=Theme rofi \-show run .fi .RE .PP -To test minor changes, part of the theme can be passed on the command line, for example to set it to full-screen: +To test minor changes, part of the theme can be passed on the command line, for example to set it to full\-screen: .PP .RS .nf -rofi -theme-str 'window { fullscreen:true;}' -show run +rofi \-theme\-str 'window { fullscreen:true;}' \-show run .fi .RE @@ -2019,7 +2037,7 @@ Another syntax to modify theme properties is: .RS .nf -rofi -theme+window+fullscreen true -show run +rofi \-theme+window+fullscreen true \-show run .fi .RE @@ -2031,7 +2049,7 @@ To print the current theme, run: .RS .nf -rofi -dump-theme +rofi \-dump\-theme .fi .RE @@ -2044,7 +2062,7 @@ Parts of the theme can be conditionally loaded, like the CSS \fB\fC@media\fR opt .RS .nf -@media ( min-width: 120 ) { +@media ( min\-width: 120 ) { } @@ -2056,19 +2074,19 @@ It supports the following keys as constraint: .RS .IP \(bu 2 -\fB\fCmin-width\fR: load when width is bigger or equal then value. +\fB\fCmin\-width\fR: load when width is bigger or equal then value. .IP \(bu 2 -\fB\fCmax-width\fR: load when width is smaller then value. +\fB\fCmax\-width\fR: load when width is smaller then value. .IP \(bu 2 -\fB\fCmin-height\fR: load when height is bigger or equal then value. +\fB\fCmin\-height\fR: load when height is bigger or equal then value. .IP \(bu 2 -\fB\fCmax-height\fR: load when height is smaller then value. +\fB\fCmax\-height\fR: load when height is smaller then value. .IP \(bu 2 -\fB\fCmin-aspect-ratio\fR load when aspect ratio is over value. +\fB\fCmin\-aspect\-ratio\fR load when aspect ratio is over value. .IP \(bu 2 -\fB\fCmax-aspect-ratio\fR: load when aspect ratio is under value. +\fB\fCmax\-aspect\-ratio\fR: load when aspect ratio is under value. .IP \(bu 2 -\fB\fCmonitor-id\fR: The monitor id, see rofi -help for id's. +\fB\fCmonitor\-id\fR: The monitor id, see rofi \-help for id's. .IP \(bu 2 \fB\fCenabled\fR: Boolean option to enable. Supports environment variable. @@ -2081,7 +2099,7 @@ It supports the following keys as constraint: .RS .nf -@media ( min-width: 120 px ) { +@media ( min\-width: 120 px ) { } @@ -2092,7 +2110,7 @@ It supports the following keys as constraint: .RS .nf -@media ( enabled: env(DO_LIGHT, false ) { +@media ( enabled: env(DO\_LIGHT, false ) { } @@ -2135,7 +2153,7 @@ Rofi supports 3 ways of specifying an icon: .IP \(bu 2 Filename .IP \(bu 2 -icon-name, this is looked up via the icon-theme. +icon\-name, this is looked up via the icon\-theme. .IP \(bu 2 Markup String. It renders a string as an icon. @@ -2154,7 +2172,7 @@ Markup string: .RS .nf -echo -en "testing\\0icon\\x1f" | ./rofi -dmenu +echo \-en "testing\\0icon\\x1f" | ./rofi \-dmenu .fi .RE @@ -2166,7 +2184,7 @@ Getting supported icon formats: .RS .nf -G_MESSAGES_DEBUG=Helpers.IconFetcher rofi +G\_MESSAGES\_DEBUG=Helpers.IconFetcher rofi .fi .RE @@ -2209,11 +2227,11 @@ If a filename is provided, it will try to resolve it in the following order: .RS .IP \(bu 2 -\fB\fC${XDG_CONFIG_HOME}/rofi/themes/\fR +\fB\fC${XDG\_CONFIG\_HOME}/rofi/themes/\fR .IP \(bu 2 -\fB\fC${XDG_CONFIG_HOME}/rofi/\fR +\fB\fC${XDG\_CONFIG\_HOME}/rofi/\fR .IP \(bu 2 -\fB\fC${XDG_DATA_HOME}/rofi/themes/\fR +\fB\fC${XDG\_DATA\_HOME}/rofi/themes/\fR .IP \(bu 2 \fB\fC${INSTALL PREFIX}/share/rofi/themes/\fR @@ -2229,4 +2247,4 @@ Several examples are installed together with \fBrofi\fP\&. These can be found in .SH SEE ALSO .PP -rofi(1), rofi-script(5), rofi-theme-selector(1) +rofi(1), rofi\-script(5), rofi\-theme\-selector(1) diff --git a/doc/rofi.1 b/doc/rofi.1 index b223837b..6f4ca817 100644 --- a/doc/rofi.1 +++ b/doc/rofi.1 @@ -1,16 +1,15 @@ -.nh .TH ROFI 1 rofi .SH NAME .PP -\fBrofi\fP - A window switcher, application launcher, ssh dialog, dmenu replacement and more +\fBrofi\fP \- A window switcher, application launcher, ssh dialog, dmenu replacement and more .SH SYNOPSIS .PP -\fBrofi\fP [ -show \fImode\fP ]|[ -dmenu ]|[ -e \fImsg\fP ] [ CONFIGURATION ] +\fBrofi\fP [ \-show \fImode\fP ]|[ \-dmenu ]|[ \-e \fImsg\fP ] [ CONFIGURATION ] .SH DESCRIPTION .PP -\fBrofi\fP is an X11 pop-up window switcher, run dialog, dmenu replacement, and +\fBrofi\fP is an X11 pop\-up window switcher, run dialog, dmenu replacement, and more. It focuses on being fast to use and have minimal distraction. It supports keyboard and mouse navigation, type to filter, tokenized search and more. @@ -20,19 +19,19 @@ keyboard and mouse navigation, type to filter, tokenized search and more. quickly switch between windows, start applications or log into a remote machine via \fB\fCssh\fR\&. There are different \fImodes\fP for different types of actions. \fBrofi\fP is a standalone application and should not be integrated into scripts. For -integration into scripts it has a special mode that functions as a (drop-in) +integration into scripts it has a special mode that functions as a (drop\-in) replacement for \fBdmenu(1)\fP\&. See emulating dmenu below. .SS Running rofi .PP -To launch \fBrofi\fP directly in a certain mode, specify a mode with \fB\fCrofi -show \fR\&. +To launch \fBrofi\fP directly in a certain mode, specify a mode with \fB\fCrofi \-show \fR\&. To show the \fB\fCdrun\fR dialog: .PP .RS .nf - rofi -show drun + rofi \-show drun .fi .RE @@ -45,7 +44,7 @@ with \fB\fCwindow\fR mode: .RS .nf - rofi -show combi -modes combi -combi-modes "window,drun,run" + rofi \-show combi \-modes combi \-combi\-modes "window,drun,run" .fi .RE @@ -58,10 +57,10 @@ running firefox, or launch it when it is not running. .SS Emulating dmenu .PP \fBrofi\fP can emulate \fBdmenu(1)\fP (a dynamic menu for X11) when launched with -the \fB\fC-dmenu\fR flag. +the \fB\fC\-dmenu\fR flag. .PP -For more information see \fBrofi-dmenu(5)\fP\&. +For more information see \fBrofi\-dmenu(5)\fP\&. .SS Display Error message .PP @@ -71,7 +70,7 @@ For more information see \fBrofi-dmenu(5)\fP\&. .RS .nf -rofi -e "my message" +rofi \-e "my message" .fi .RE @@ -86,23 +85,23 @@ There are currently three methods of setting configuration options (evaluated in .RS .IP \(bu 2 System configuration file (for example \fB\fC/etc/rofi.rasi\fR). -It first checks \fB\fCXDG_CONFIG_DIRS\fR, and then \fB\fCSYSCONFDIR\fR (that is passed at compile time). +It first checks \fB\fCXDG\_CONFIG\_DIRS\fR, and then \fB\fCSYSCONFDIR\fR (that is passed at compile time). It loads the first config file it finds, it does not merge multiple system configuration files. .IP \(bu 2 Rasi theme file: The new \fItheme\fP format can be used to set configuration values. .IP \(bu 2 -Command-line options: Arguments passed to \fBrofi\fP\&. +Command\-line options: Arguments passed to \fBrofi\fP\&. .RE .PP -To get a template config file, run: \fB\fCrofi -dump-config > config.rasi\fR +To get a template config file, run: \fB\fCrofi \-dump\-config > config.rasi\fR .PP This will contain (commented) all current configuration options, modified options are uncommented. .PP -To get a template config file that sets the icon-theme run: \fB\fCrofi -icon-theme hicolor -dump-config\fR\&. +To get a template config file that sets the icon\-theme run: \fB\fCrofi \-icon\-theme hicolor \-dump\-config\fR\&. .PP It is \fBstrongly\fP recommended to use this as a starting point for your configuration. @@ -122,8 +121,8 @@ configuration { .RE .PP -Most of the configuration options mentioned below (beside options like \fB\fC-show\fR, -\fB\fC-dump-config\fR that apply to a single run) can be set here. +Most of the configuration options mentioned below (beside options like \fB\fC\-show\fR, +\fB\fC\-dump\-config\fR that apply to a single run) can be set here. .PP For example to set the dpi value to 72: @@ -157,17 +156,17 @@ lists .RE .PP -For the syntax of these options, see the \fBrofi-theme(5)\fP manpage. +For the syntax of these options, see the \fBrofi\-theme(5)\fP manpage. .PP -For use on the command line, Boolean options have a non-default command-line +For use on the command line, Boolean options have a non\-default command\-line syntax. Example to enable option X: .PP .RS .nf --X +\-X .fi .RE @@ -179,7 +178,7 @@ To disable option X: .RS .nf --no-X +\-no\-X .fi .RE @@ -189,46 +188,46 @@ Below is a list of the most important options: .SS General .PP -\fB\fC-help\fR +\fB\fC\-help\fR .PP -The help option shows the full list of command-line options and the current set -values. These include dynamic (run-time generated) options. +The help option shows the full list of command\-line options and the current set +values. These include dynamic (run\-time generated) options. .PP -\fB\fC-version\fR +\fB\fC\-version\fR .PP Show the \fBrofi\fP version and exit. .PP -\fB\fC-dump-config\fR +\fB\fC\-dump\-config\fR .PP Dump the current active configuration, in rasi format, to stdout and exit. -Information about the rasi format can be found in the \fBrofi-theme(5)\fP manpage. +Information about the rasi format can be found in the \fBrofi\-theme(5)\fP manpage. .PP -\fB\fC-dump-theme\fR +\fB\fC\-dump\-theme\fR .PP Dump the current active theme, in rasi format, to stdout and exit. .PP -\fB\fC-rasi-validate\fR \fIfilename\fP +\fB\fC\-rasi\-validate\fR \fIfilename\fP .PP -Try to parse the file and return 0 when successful, non-zero when failed. +Try to parse the file and return 0 when successful, non\-zero when failed. .PP -\fB\fC-list-keybindings\fR +\fB\fC\-list\-keybindings\fR .PP List all known keybindings without trying to parse them. This can be used to look for duplicate bindings. .PP -\fB\fC-threads\fR \fInum\fP +\fB\fC\-threads\fR \fInum\fP .PP Specify the number of threads \fBrofi\fP should use: @@ -239,29 +238,33 @@ Specify the number of threads \fBrofi\fP should use: .IP \(bu 2 1: Disable threading .IP \(bu 2 -2..n: Specify the maximum number of threads to use in the thread pool.Default: Autodetect + +.PP +2..n: Specify the maximum number of threads to use in the thread pool. +.PP +Default: Autodetect .RE .PP -\fB\fC-display\fR \fIdisplay\fP +\fB\fC\-display\fR \fIdisplay\fP .PP The X server to contact. Default is \fB\fC$DISPLAY\fR\&. .PP -\fB\fC-dmenu\fR +\fB\fC\-dmenu\fR .PP Run \fBrofi\fP in dmenu mode. This allows for interactive scripts. In \fB\fCdmenu\fR mode, \fBrofi\fP reads from STDIN, and output to STDOUT. -A simple example, displaying three pre-defined options: +A simple example, displaying three pre\-defined options: .PP .RS .nf -echo -e "Option #1\\nOption #2\\nOption #3" | rofi -dmenu +echo \-e "Option #1\\nOption #2\\nOption #3" | rofi \-dmenu .fi .RE @@ -273,43 +276,43 @@ Or get the options from a script: .RS .nf -~/my_script.sh | rofi -dmenu +\~/my\_script.sh | rofi \-dmenu .fi .RE .PP -See the \fBrofi-dmenu(5)\fP manpage for more information. +See the \fBrofi\-dmenu(5)\fP manpage for more information. .PP -\fB\fC-show\fR \fImode\fP +\fB\fC\-show\fR \fImode\fP .PP Open \fBrofi\fP in a certain mode. Available modes are \fB\fCwindow\fR, \fB\fCrun\fR, \fB\fCdrun\fR, \fB\fCssh\fR, \fB\fCcombi\fR\&. The special argument \fB\fCkeys\fR can be used to open a searchable list of supported key bindings -(see the \fBrofi-keys(5)\fP manpage) +(see the \fBrofi\-keys(5)\fP manpage) .PP -To show the run-dialog: +To show the run\-dialog: .PP .RS .nf -rofi -show run +rofi \-show run .fi .RE .PP -If \fB\fC-show\fR is the last option passed to rofi, the first enabled modes is shown. +If \fB\fC\-show\fR is the last option passed to rofi, the first enabled modes is shown. .PP -\fB\fC-modes\fR \fImode1,mode2\fP +\fB\fC\-modes\fR \fImode1,mode2\fP .PP -Specify an ordered, comma-separated list of modes to enable. +Specify an ordered, comma\-separated list of modes to enable. Enabled modes can be changed at runtime. Default key is \fB\fCCtrl+Tab\fR\&. If no modes are specified, all configured modes will be enabled. To only show the \fB\fCrun\fR and \fB\fCssh\fR launcher: @@ -318,7 +321,7 @@ To only show the \fB\fCrun\fR and \fB\fCssh\fR launcher: .RS .nf -rofi -modes "run,ssh" -show run +rofi \-modes "run,ssh" \-show run .fi .RE @@ -337,13 +340,13 @@ two parameters: .RE .PP -Example: Have a mode called 'Workspaces' using the \fB\fCi3_switch_workspaces.sh\fR script: +Example: Have a mode called 'Workspaces' using the \fB\fCi3\_switch\_workspaces.sh\fR script: .PP .RS .nf -rofi -modes "window,run,ssh,Workspaces:i3_switch_workspaces.sh" -show Workspaces +rofi \-modes "window,run,ssh,Workspaces:i3\_switch\_workspaces.sh" \-show Workspaces .fi .RE @@ -359,50 +362,50 @@ exec command. For that case, \fB\fC#\fR can be used as a separator. .RS .nf -rofi -modes "My File Browser:fb.sh" -show "My File Browser" +rofi \-modes "My File Browser:fb.sh" \-show "My File Browser" .fi .RE .PP -\fB\fC-case-sensitive\fR +\fB\fC\-case\-sensitive\fR .PP -Start in case-sensitive mode. -This option can be changed at run-time using the \fB\fC-kb-toggle-case-sensitivity\fR key binding. +Start in case\-sensitive mode. +This option can be changed at run\-time using the \fB\fC\-kb\-toggle\-case\-sensitivity\fR key binding. .PP -\fB\fC-cycle\fR +\fB\fC\-cycle\fR .PP Cycle through the result list. Default is 'true'. .PP -\fB\fC-filter\fR \fIfilter\fP +\fB\fC\-filter\fR \fIfilter\fP .PP Filter the list by setting text in input bar to \fIfilter\fP .PP -\fB\fC-config\fR \fIfilename\fP +\fB\fC\-config\fR \fIfilename\fP .PP Load an alternative configuration file. .PP -\fB\fC-cache-dir\fR \fIfilename\fP +\fB\fC\-cache\-dir\fR \fIfilename\fP .PP Directory that is used to place temporary files, like history. .PP -\fB\fC-scroll-method\fR \fImethod\fP +\fB\fC\-scroll\-method\fR \fImethod\fP .PP Select the scrolling method. 0: Per page, 1: continuous. .PP -\fB\fC-normalize-match\fR +\fB\fC\-normalize\-match\fR .PP Normalize the string before matching, so \fB\fCo\fR will match \fB\fCö\fR, and \fB\fCé\fR matches \fB\fCe\fR\&. @@ -410,31 +413,31 @@ Normalize the string before matching, so \fB\fCo\fR will match \fB\fCö\fR, and This is not a perfect implementation, but works. For now, it disables highlighting of the matched part. .PP -\fB\fC-no-lazy-grab\fR +\fB\fC\-no\-lazy\-grab\fR .PP Disables lazy grab, this forces the keyboard being grabbed before gui is shown. .PP -\fB\fC-no-plugins\fR +\fB\fC\-no\-plugins\fR .PP Disable plugin loading. .PP -\fB\fC-plugin-path\fR \fIdirectory\fP +\fB\fC\-plugin\-path\fR \fIdirectory\fP .PP Specify the directory where \fBrofi\fP should look for plugins. .PP -\fB\fC-show-icons\fR +\fB\fC\-show\-icons\fR .PP Show application icons in \fB\fCdrun\fR and \fB\fCwindow\fR modes. .PP -\fB\fC-icon-theme\fR +\fB\fC\-icon\-theme\fR .PP Specify icon theme to be used. @@ -442,25 +445,25 @@ If not specified default theme from DE is used, \fIAdwaita\fP and \fIgnome\fP th fallback themes. .PP -\fB\fC-markup\fR +\fB\fC\-markup\fR .PP Use Pango markup to format output wherever possible. .PP -\fB\fC-normal-window\fR +\fB\fC\-normal\-window\fR .PP Make \fBrofi\fP react like a normal application window. Useful for scripts like Clerk that are basically an application. .PP -\fB\fC-[no-]steal-focus\fR +\fB\fC\-[no\-]steal\-focus\fR .PP Make rofi steal focus on launch and restore close to window that held it when launched. .PP -\fB\fC-refilter-timeout-limit\fR +\fB\fC\-refilter\-timeout\-limit\fR .PP The time (in ms) boundary filter may take before switch from instant to delayed filter mode. @@ -477,7 +480,7 @@ A fallback icon can be specified for each mode: .nf configuration { { - fallback-icon: ""; + fallback\-icon: ""; } } @@ -493,7 +496,7 @@ Example .nf configuration { run,drun { - fallback-icon: "application-x-addon"; + fallback\-icon: "application\-x\-addon"; } } @@ -502,7 +505,7 @@ configuration { .SS Matching .PP -\fB\fC-matching\fR \fImethod\fP +\fB\fC\-matching\fR \fImethod\fP .PP Specify the matching algorithm used. @@ -529,19 +532,19 @@ Default: \fInormal\fP Note: glob matching might be slow for larger lists .PP -\fB\fC-tokenize\fR +\fB\fC\-tokenize\fR .PP Tokenize the input. .PP -\fB\fC-drun-categories\fR \fIcategory1\fP,\fIcategory2\fP +\fB\fC\-drun\-categories\fR \fIcategory1\fP,\fIcategory2\fP .PP Only show desktop files that are present in the listed categories. .PP -\fB\fC-drun-match-fields\fR \fIfield1\fP,\fIfield2\fP,... +\fB\fC\-drun\-match\-fields\fR \fIfield1\fP,\fIfield2\fP,... .PP When using \fB\fCdrun\fR, match only with the specified Desktop entry fields. @@ -559,12 +562,16 @@ The different fields are: .IP \(bu 2 \fBcomment\fP: the application comment .IP \(bu 2 -\fBall\fP: all the aboveDefault: \fIname,generic,exec,categories,keywords\fP + +.PP +\fBall\fP: all the above +.PP +Default: \fIname,generic,exec,categories,keywords\fP .RE .PP -\fB\fC-drun-display-format\fR +\fB\fC\-drun\-display\-format\fR .PP The format string for the \fB\fCdrun\fR dialog: @@ -596,10 +603,10 @@ Default: {name} [({generic})] .RE .PP -Note: Only fields enabled in \fB\fC-drun-match-fields\fR can be used in the format string. +Note: Only fields enabled in \fB\fC\-drun\-match\-fields\fR can be used in the format string. .PP -\fB\fC-[no-]drun-show-actions\fR +\fB\fC\-[no\-]drun\-show\-actions\fR .PP Show actions present in the Desktop files. @@ -614,7 +621,7 @@ Default: false .RE .PP -\fB\fC-window-match-fields\fR \fIfield1\fP,\fIfield2\fP,... +\fB\fC\-window\-match\-fields\fR \fIfield1\fP,\fIfield2\fP,... .PP When using window mode, match only with the specified fields. @@ -632,12 +639,16 @@ The different fields are: .IP \(bu 2 \fBdesktop\fP: window's current desktop .IP \(bu 2 -\fBall\fP: all the aboveDefault: \fIall\fP + +.PP +\fBall\fP: all the above +.PP +Default: \fIall\fP .RE .PP -\fB\fC-matching-negate-char\fR \fIchar\fP +\fB\fC\-matching\-negate\-char\fR \fIchar\fP .PP Set the character used to negate the query (i.e. if it does \fBnot\fP match the next keyword). @@ -647,7 +658,7 @@ Set to '\\x0' to disable. .RS .nf -Default: '-' +Default: '\-' .fi .RE @@ -657,16 +668,16 @@ Default: '-' \fBIMPORTANT:\fP In newer \fBrofi\fP releases, all the theming options have been moved into the new theme format. They are no longer normal \fBrofi\fP options that can be passed directly on the command line (there are too many). - Small snippets can be passed on the command line: \fB\fCrofi -theme-str 'window {width: 50%;}'\fR to override a single + Small snippets can be passed on the command line: \fB\fCrofi \-theme\-str 'window {width: 50%;}'\fR to override a single setting. They are merged into the current theme. They can also be appended at the end of the \fBrofi\fP config file to override parts of the theme. .PP Most of the following options are \fBdeprecated\fP and should not be used. Please use the new theme format to customize -\fBrofi\fP\&. More information about the new format can be found in the \fBrofi-theme(5)\fP manpage. +\fBrofi\fP\&. More information about the new format can be found in the \fBrofi\-theme(5)\fP manpage. .PP -\fB\fC-location\fR +\fB\fC\-location\fR .PP Specify where the window should be located. The numbers map to the following locations on screen: @@ -686,68 +697,68 @@ Specify where the window should be located. The numbers map to the following loc Default: \fI0\fP .PP -\fB\fC-fixed-num-lines\fR +\fB\fC\-fixed\-num\-lines\fR .PP Keep a fixed number of visible lines. .PP -\fB\fC-sidebar-mode\fR +\fB\fC\-sidebar\-mode\fR .PP -Open in sidebar-mode. In this mode, a list of all enabled modes is shown at the bottom. -(See \fB\fC-modes\fR option) +Open in sidebar\-mode. In this mode, a list of all enabled modes is shown at the bottom. +(See \fB\fC\-modes\fR option) To show sidebar, use: .PP .RS .nf -rofi -show run -sidebar-mode +rofi \-show run \-sidebar\-mode .fi .RE .PP -\fB\fC-hover-select\fR +\fB\fC\-hover\-select\fR .PP Automatically select the entry the mouse is hovering over. This option is best combined with custom mouse bindings. -To utilize hover-select and accept an entry in a single click, use: +To utilize hover\-select and accept an entry in a single click, use: .PP .RS .nf -rofi -show run -hover-select -me-select-entry '' -me-accept-entry MousePrimary +rofi \-show run \-hover\-select \-me\-select\-entry '' \-me\-accept\-entry MousePrimary .fi .RE .PP -\fB\fC-eh\fR \fInumber\fP +\fB\fC\-eh\fR \fInumber\fP .PP Set row height (in chars) Default: \fI1\fP .PP -\fB\fC-auto-select\fR +\fB\fC\-auto\-select\fR .PP When one entry is left, automatically select it. .PP -\fB\fC-m\fR \fInum\fP +\fB\fC\-m\fR \fInum\fP .PP -\fB\fC-m\fR \fIname\fP +\fB\fC\-m\fR \fIname\fP .PP -\fB\fC-monitor\fR \fInum\fP +\fB\fC\-monitor\fR \fInum\fP .PP -\fB\fC-monitor\fR \fIname\fP +\fB\fC\-monitor\fR \fIname\fP .PP Select monitor to display \fBrofi\fP on. @@ -756,30 +767,34 @@ detection). Negative numbers are handled differently: .RS .IP \(bu 2 -\fB-1\fP: the currently focused monitor. +\fB\-1\fP: the currently focused monitor. .IP \(bu 2 -\fB-2\fP: the currently focused window (that is, \fBrofi\fP will be displayed on top of the focused window). +\fB\-2\fP: the currently focused window (that is, \fBrofi\fP will be displayed on top of the focused window). .IP \(bu 2 -\fB-3\fP: Position of mouse (overrides the location setting to get normal context menu +\fB\-3\fP: Position of mouse (overrides the location setting to get normal context menu behavior.) .IP \(bu 2 -\fB-4\fP: the monitor with the focused window. +\fB\-4\fP: the monitor with the focused window. .IP \(bu 2 -\fB-5\fP: the monitor that shows the mouse pointer.Default: \fI-5\fP + +.PP +\fB\-5\fP: the monitor that shows the mouse pointer. +.PP +Default: \fI\-5\fP .RE .PP -See \fB\fCrofi -h\fR output for the detected monitors, their position, and size. +See \fB\fCrofi \-h\fR output for the detected monitors, their position, and size. .PP -\fB\fC-theme\fR \fIfilename\fP +\fB\fC\-theme\fR \fIfilename\fP .PP Path to the new theme file format. This overrides the old theme settings. .PP -\fB\fC-theme-str\fR \fIstring\fP +\fB\fC\-theme\-str\fR \fIstring\fP .PP Allow theme parts to be specified on the command line as an override. @@ -791,7 +806,7 @@ For example: .RS .nf -rofi -theme-str '#window { fullscreen: true; }' +rofi \-theme\-str '#window { fullscreen: true; }' .fi .RE @@ -801,21 +816,21 @@ This option can be specified multiple times. This is now the method to tweak the theme via the command line. .PP -\fB\fC-dpi\fR \fInumber\fP +\fB\fC\-dpi\fR \fInumber\fP .PP Override the default DPI setting. .RS .IP \(bu 2 -If set to \fB\fC0\fR, it tries to auto-detect based on X11 screen size (similar to i3 and GTK). +If set to \fB\fC0\fR, it tries to auto\-detect based on X11 screen size (similar to i3 and GTK). .IP \(bu 2 -If set to \fB\fC1\fR, it tries to auto-detect based on the size of the monitor that \fBrofi\fP is displayed on (similar to latest Qt 5). +If set to \fB\fC1\fR, it tries to auto\-detect based on the size of the monitor that \fBrofi\fP is displayed on (similar to latest Qt 5). .RE .PP -\fB\fC-selected-row\fR \fIselected row\fP +\fB\fC\-selected\-row\fR \fIselected row\fP .PP Select a certain row. @@ -825,7 +840,7 @@ Default: \fI0\fP .SS PATTERN setting .PP -\fB\fC-terminal\fR +\fB\fC\-terminal\fR .PP Specify which terminal to start. @@ -834,7 +849,7 @@ Specify which terminal to start. .RS .nf -rofi -terminal xterm +rofi \-terminal xterm .fi .RE @@ -843,36 +858,36 @@ rofi -terminal xterm Pattern: \fI{terminal}\fP .PP -Default: \fIx-terminal-emulator\fP +Default: \fIx\-terminal\-emulator\fP .PP -\fB\fC-ssh-client\fR \fIclient\fP +\fB\fC\-ssh\-client\fR \fIclient\fP .PP Override the used \fB\fCssh\fR client. .PP -Pattern: \fI{ssh-client}\fP +Pattern: \fI{ssh\-client}\fP .PP Default: \fIssh\fP .SS SSH settings .PP -\fB\fC-ssh-command\fR \fIcmd\fP +\fB\fC\-ssh\-command\fR \fIcmd\fP .PP Set the command to execute when starting an ssh session. The pattern \fI{host}\fP is replaced by the selected ssh entry. .PP -Pattern: \fI{ssh-client}\fP +Pattern: \fI{ssh\-client}\fP .PP -Default: \fI{terminal} -e {ssh-client} {host}\fP +Default: \fI{terminal} \-e {ssh\-client} {host}\fP .PP -\fB\fC-parse-hosts\fR +\fB\fC\-parse\-hosts\fR .PP Parse the \fB\fC/etc/hosts\fR file for entries. @@ -881,18 +896,18 @@ Parse the \fB\fC/etc/hosts\fR file for entries. Default: \fIdisabled\fP .PP -\fB\fC-parse-known-hosts\fR -\fB\fC-no-parse-known-hosts\fR +\fB\fC\-parse\-known\-hosts\fR +\fB\fC\-no\-parse\-known\-hosts\fR .PP -Parse the \fB\fC~/.ssh/known_hosts\fR file for entries. +Parse the \fB\fC\~/.ssh/known\_hosts\fR file for entries. .PP Default: \fIenabled\fP .SS Run settings .PP -\fB\fC-run-command\fR \fIcmd\fP +\fB\fC\-run\-command\fR \fIcmd\fP .PP Set command (\fI{cmd}\fP) to execute when running an application. @@ -902,27 +917,27 @@ See \fIPATTERN\fP\&. Default: \fI{cmd}\fP .PP -\fB\fC-run-shell-command\fR \fIcmd\fP +\fB\fC\-run\-shell\-command\fR \fIcmd\fP .PP Set command to execute when running an application in a shell. See \fIPATTERN\fP\&. .PP -Default: \fI{terminal} -e {cmd}\fP +Default: \fI{terminal} \-e {cmd}\fP .PP -\fB\fC-run-list-command\fR \fIcmd\fP +\fB\fC\-run\-list\-command\fR \fIcmd\fP .PP -If set, use an external tool to generate a list of executable commands. Uses \fB\fCrun-command\fR\&. +If set, use an external tool to generate a list of executable commands. Uses \fB\fCrun\-command\fR\&. .PP Default: \fI{cmd}\fP .SS Window switcher settings .PP -\fB\fC-window-format\fR \fIformat\fP +\fB\fC\-window\-format\fR \fIformat\fP .PP Format what is being displayed for windows. @@ -948,25 +963,24 @@ Format what is being displayed for windows. .RE .PP -\fIlen\fP: maximum field length (0 for auto-size). If length is negative, the entry will be unchanged. -.br +\fIlen\fP: maximum field length (0 for auto\-size). If length is negative, the entry will be unchanged. If length is positive, the entry will be truncated or padded to fill that length. .PP default: {w} {c} {t} .PP -\fB\fC-window-command\fR \fIcmd\fP +\fB\fC\-window\-command\fR \fIcmd\fP .PP -Set command to execute on selected window for an alt action (\fB\fC-kb-accept-alt\fR). +Set command to execute on selected window for an alt action (\fB\fC\-kb\-accept\-alt\fR). See \fIPATTERN\fP\&. .PP -Default: \fI"wmctrl -i -R {window}"\fP +Default: \fI"wmctrl \-i \-R {window}"\fP .PP -\fB\fC-window-thumbnail\fR +\fB\fC\-window\-thumbnail\fR .PP Show window thumbnail (if available) as icon in the window switcher. @@ -980,7 +994,7 @@ You can stop rofi from exiting when closing a window (allowing multiple to be cl .nf configuration { window { - close-on-delete: false; + close\-on\-delete: false; } } @@ -988,7 +1002,7 @@ configuration { .RE .PP -You can hide the currently active window with the 'hide-active-window' setting: +You can hide the currently active window with the 'hide\-active\-window' setting: .PP .RS @@ -996,7 +1010,7 @@ You can hide the currently active window with the 'hide-active-window' setting: .nf configuration { window { - hide-active-window: true; + hide\-active\-window: true; } } @@ -1004,22 +1018,22 @@ configuration { .RE .PP -or pass \fB\fC-window-hide-active-window true\fR on command line. +or pass \fB\fC\-window\-hide\-active\-window true\fR on command line. .SS Combi settings .PP -\fB\fC-combi-modes\fR \fImode1\fP,\fImode2\fP +\fB\fC\-combi\-modes\fR \fImode1\fP,\fImode2\fP .PP The modes to combine in combi mode. -For syntax to \fB\fC-combi-modes\fR, see \fB\fC-modes\fR\&. +For syntax to \fB\fC\-combi\-modes\fR, see \fB\fC\-modes\fR\&. To get one merge view, of \fB\fCwindow\fR,\fB\fCrun\fR, and \fB\fCssh\fR: .PP .RS .nf -rofi -show combi -combi-modes "window,run,ssh" -modes combi +rofi \-show combi \-combi\-modes "window,run,ssh" \-modes combi .fi .RE @@ -1029,7 +1043,7 @@ rofi -show combi -combi-modes "window,run,ssh" -modes combi For that case, \fB\fC#\fR can be used as a separator. .PP -\fB\fC-combi-display-format\fR +\fB\fC\-combi\-display\-format\fR .PP The format string for entries in the \fB\fCcombi\fR dialog: @@ -1055,26 +1069,26 @@ Default: {mode} {text} .RE .PP -Note: This setting is ignored if \fB\fCcombi-hide-mode-prefix\fR is enabled. +Note: This setting is ignored if \fB\fCcombi\-hide\-mode\-prefix\fR is enabled. .SS History and Sorting .PP -\fB\fC-disable-history\fR -\fB\fC-no-disable-history\fR (re-enable history) +\fB\fC\-disable\-history\fR +\fB\fC\-no\-disable\-history\fR (re\-enable history) .PP Disable history .PP -\fB\fC-sort\fR to enable -\fB\fC-no-sort\fR to disable +\fB\fC\-sort\fR to enable +\fB\fC\-no\-sort\fR to disable .PP Enable, disable sorting. -This setting can be changed at runtime (see \fB\fC-kb-toggle-sort\fR). +This setting can be changed at runtime (see \fB\fC\-kb\-toggle\-sort\fR). .PP -\fB\fC-sorting-method\fR 'method' to specify the sorting method. +\fB\fC\-sorting\-method\fR 'method' to specify the sorting method. .PP There are 2 sorting methods: @@ -1088,18 +1102,18 @@ fzf sorting. .RE .PP -\fB\fC-max-history-size\fR \fInumber\fP +\fB\fC\-max\-history\-size\fR \fInumber\fP .PP Maximum number of entries to store in history. Defaults to 25. (WARNING: can cause slowdowns when set too high) .SS Message dialog .PP -\fB\fC-e\fR \fImessage\fP +\fB\fC\-e\fR \fImessage\fP .PP Pops up a message dialog (used internally for showing errors) with \fImessage\fP\&. -Message can be multi-line. +Message can be multi\-line. .SS File browser settings .PP @@ -1115,14 +1129,14 @@ configuration { directory: "/some/directory"; /** * Sorting method. Can be set to: - * - "name" - * - "mtime" (modification time) - * - "atime" (access time) - * - "ctime" (change time) + * \- "name" + * \- "mtime" (modification time) + * \- "atime" (access time) + * \- "ctime" (change time) */ - sorting-method: "name"; + sorting\-method: "name"; /** Group directories before files. */ - directories-first: true; + directories\-first: true; } } @@ -1131,40 +1145,40 @@ configuration { .SS Other .PP -\fB\fC-drun-use-desktop-cache\fR +\fB\fC\-drun\-use\-desktop\-cache\fR .PP Build and use a cache with the content of desktop files. Usable for systems with slow hard drives. .PP -\fB\fC-drun-reload-desktop-cache\fR +\fB\fC\-drun\-reload\-desktop\-cache\fR .PP -If \fB\fCdrun-use-desktop-cache\fR is enabled, rebuild a cache with the content of desktop files. +If \fB\fCdrun\-use\-desktop\-cache\fR is enabled, rebuild a cache with the content of desktop files. .PP -\fB\fC-drun-url-launcher\fR \fIcommand\fP +\fB\fC\-drun\-url\-launcher\fR \fIcommand\fP .PP Command to open a Desktop Entry that is a Link. .PP -\fB\fC-pid\fR \fIpath\fP +\fB\fC\-pid\fR \fIpath\fP .PP -Make \fBrofi\fP create a pid file and check this on startup. The pid file prevents multiple \fBrofi\fP instances from running simultaneously. This is useful when running \fBrofi\fP from a key-binding daemon. +Make \fBrofi\fP create a pid file and check this on startup. The pid file prevents multiple \fBrofi\fP instances from running simultaneously. This is useful when running \fBrofi\fP from a key\-binding daemon. .PP -\fB\fC-replace\fR +\fB\fC\-replace\fR .PP If rofi is already running, based on pid file, try to kill that instance. .PP -\fB\fC-display-{mode}\fR \fIstring\fP +\fB\fC\-display\-{mode}\fR \fIstring\fP .PP -Set the name to use for mode. This is used as prompt and in combi-browser. +Set the name to use for mode. This is used as prompt and in combi\-browser. .PP It is now preferred to use the configuration file: @@ -1175,7 +1189,7 @@ It is now preferred to use the configuration file: .nf configuration { {mode} { - display-name: *string*; + display\-name: *string*; } } @@ -1183,8 +1197,8 @@ configuration { .RE .PP -\fB\fC-click-to-exit\fR -\fB\fC-no-click-to-exit\fR +\fB\fC\-click\-to\-exit\fR +\fB\fC\-no\-click\-to\-exit\fR .PP Click the mouse outside the \fBrofi\fP window to exit. @@ -1193,7 +1207,7 @@ Click the mouse outside the \fBrofi\fP window to exit. Default: \fIenabled\fP .PP -\fB\fC-xserver-i300-workaround\fR +\fB\fC\-xserver\-i300\-workaround\fR .PP Workaround for bug in Xserver. See issue #611 and #1642 on the rofi issue tracker. @@ -1203,29 +1217,29 @@ Default: \fIdisabled\fP .SH PATTERN .PP -To launch commands (for example, when using the ssh launcher), the user can enter the used command-line. The following keys can be used that will be replaced at runtime: +To launch commands (for example, when using the ssh launcher), the user can enter the used command\-line. The following keys can be used that will be replaced at runtime: .RS .IP \(bu 2 \fB\fC{host}\fR: the host to connect to .IP \(bu 2 -\fB\fC{terminal}\fR: the configured terminal (see -terminal) +\fB\fC{terminal}\fR: the configured terminal (see \-terminal) .IP \(bu 2 -\fB\fC{ssh-client}\fR: the configured ssh client (see -ssh-client) +\fB\fC{ssh\-client}\fR: the configured ssh client (see \-ssh\-client) .IP \(bu 2 \fB\fC{cmd}\fR: the command to execute .IP \(bu 2 -\fB\fC{window}\fR: the window ID of the selected window (in \fB\fCwindow-command\fR) +\fB\fC{window}\fR: the window ID of the selected window (in \fB\fCwindow\-command\fR) .RE .SH THEMING .PP -Please see \fBrofi-theme(5)\fP manpage for more information on theming. +Please see \fBrofi\-theme(5)\fP manpage for more information on theming. .SH KEY BINDINGS .PP -Please see the \fBrofi-keys(5)\fP manpage for the keybindings and how to set them up. +Please see the \fBrofi\-keys(5)\fP manpage for the keybindings and how to set them up. .PP The keybinding can also be used for actions, when the action is executed the @@ -1244,7 +1258,7 @@ after X seconds. configuration { timeout { delay: 15; - action: "kb-cancel"; + action: "kb\-cancel"; } } @@ -1261,7 +1275,7 @@ When the input of the textbox changes: .nf configuration { inputchange { - action: "kb-row-first"; + action: "kb\-row\-first"; } } @@ -1272,9 +1286,9 @@ configuration { .SS window .PP Show a list of all the windows and allow switching between them. -Pressing the \fB\fCdelete-entry\fR binding (\fB\fCshift-delete\fR) will close the window. -Pressing the \fB\fCaccept-custom\fR binding (\fB\fCcontrol-enter\fR or \fB\fCshift-enter\fR) will run a command on the window. -(See option \fB\fCwindow-command\fR ); +Pressing the \fB\fCdelete\-entry\fR binding (\fB\fCshift\-delete\fR) will close the window. +Pressing the \fB\fCaccept\-custom\fR binding (\fB\fCcontrol\-enter\fR or \fB\fCshift\-enter\fR) will run a command on the window. +(See option \fB\fCwindow\-command\fR ); .PP If there is no match, it will try to launch the input. @@ -1282,9 +1296,9 @@ If there is no match, it will try to launch the input. .SS windowcd .PP Shows a list of the windows on the current desktop and allows switching between them. -Pressing the \fB\fCdelete-entry\fR binding (\fB\fCshift-delete\fR) will kill the window. -Pressing the \fB\fCaccept-custom\fR binding (\fB\fCcontrol-enter\fR or \fB\fCshift-enter\fR) will run a command on the window. -(See option \fB\fCwindow-command\fR ); +Pressing the \fB\fCdelete\-entry\fR binding (\fB\fCshift\-delete\fR) will kill the window. +Pressing the \fB\fCaccept\-custom\fR binding (\fB\fCcontrol\-enter\fR or \fB\fCshift\-enter\fR) will run a command on the window. +(See option \fB\fCwindow\-command\fR ); .PP If there is no match, it will try to launch the input. @@ -1292,24 +1306,24 @@ If there is no match, it will try to launch the input. .SS run .PP Shows a list of executables in \fB\fC$PATH\fR and can launch them (optional in a terminal). -Pressing the \fB\fCdelete-entry\fR binding (\fB\fCshift-delete\fR) will remove this entry from the run history. -Pressing the \fB\fCaccept-custom\fR binding (\fB\fCcontrol-enter\fR) will run the command as entered in the entry box. -Pressing the \fB\fCaccept-alt\fR binding (\fB\fCshift-enter\fR) will run the command in a terminal. +Pressing the \fB\fCdelete\-entry\fR binding (\fB\fCshift\-delete\fR) will remove this entry from the run history. +Pressing the \fB\fCaccept\-custom\fR binding (\fB\fCcontrol\-enter\fR) will run the command as entered in the entry box. +Pressing the \fB\fCaccept\-alt\fR binding (\fB\fCshift\-enter\fR) will run the command in a terminal. .PP -When pressing the \fB\fCmode-complete\fR binding (\fB\fCControl-l\fR), you can use the File Browser mode to launch the application +When pressing the \fB\fCmode\-complete\fR binding (\fB\fCControl\-l\fR), you can use the File Browser mode to launch the application with a file as the first argument. .SS drun .PP Same as the \fBrun\fP launches, but the list is created from the installed desktop files. It automatically launches them in a terminal if specified in the Desktop File. -Pressing the \fB\fCdelete-entry\fR binding (\fB\fCshift-delete\fR) will remove this entry from the run history. -Pressing the \fB\fCaccept-custom\fR binding (\fB\fCcontrol-enter\fR) will run the command as entered in the entry box. -Pressing the \fB\fCaccept-alt\fR binding (\fB\fCshift-enter\fR) will run the command in a terminal. +Pressing the \fB\fCdelete\-entry\fR binding (\fB\fCshift\-delete\fR) will remove this entry from the run history. +Pressing the \fB\fCaccept\-custom\fR binding (\fB\fCcontrol\-enter\fR) will run the command as entered in the entry box. +Pressing the \fB\fCaccept\-alt\fR binding (\fB\fCshift\-enter\fR) will run the command in a terminal. .PP -When pressing the \fB\fCmode-complete\fR binding (\fB\fCControl-l\fR), you can use the File Browser mode to launch the application +When pressing the \fB\fCmode\-complete\fR binding (\fB\fCControl\-l\fR), you can use the File Browser mode to launch the application passing a file as argument if specified in the desktop file. .PP @@ -1330,9 +1344,9 @@ There are two advanced options to tweak the behaviour: configuration { drun { /** Parse user desktop files. */ - parse-user: true; + parse\-user: true; /** Parse system desktop files. */ - parse-system: false; + parse\-system: false; } } @@ -1349,16 +1363,16 @@ Shows a searchable list of key bindings. .SS script .PP -Allows custom scripted Modes to be added, see the \fBrofi-script(5)\fP manpage for more information. +Allows custom scripted Modes to be added, see the \fBrofi\-script(5)\fP manpage for more information. .SS combi .PP -Combines multiple modes in one list. Specify which modes are included with the \fB\fC-combi-modes\fR option. +Combines multiple modes in one list. Specify which modes are included with the \fB\fC\-combi\-modes\fR option. .PP When using the combi mode, a \fI!bang\fP can be used to filter the results by modes. All modes that match the bang as a prefix are included. -For example, say you have specified \fB\fC-combi-modes run,window,windowcd\fR\&. If your +For example, say you have specified \fB\fC\-combi\-modes run,window,windowcd\fR\&. If your query begins with the bang \fB\fC!w\fR, only results from the \fB\fCwindow\fR and \fB\fCwindowcd\fR modes are shown, even if the rest of the input text would match results from \fB\fCrun\fR\&. @@ -1368,11 +1382,11 @@ If no match, the input is handled by the first combined modes. .SH FAQ .SS The text in the window switcher is not nicely aligned. .PP -Try using a mono-space font or tabs + the tab-stops setting.. +Try using a mono\-space font or tabs + the tab\-stops setting.. .SS The window is completely black. .PP -Check quotes used on the command-line: you might have used \fB\fC“\fR ("smart quotes") instead of \fB\fC"\fR ("machine quotes"). +Check quotes used on the command\-line: you might have used \fB\fC“\fR ("smart quotes") instead of \fB\fC"\fR ("machine quotes"). .SS What does the icon in the top right show? .PP @@ -1383,7 +1397,7 @@ The indicator shows: .nf ` ` Case insensitive and no sorting. -`-` Case sensitivity enabled, no sorting. +`\-` Case sensitivity enabled, no sorting. `+` Case insensitive and Sorting enabled `±` Sorting and Case sensitivity enabled" @@ -1416,7 +1430,7 @@ Show the run dialog: .RS .nf -rofi -modes run -show run +rofi \-modes run \-show run .fi .RE @@ -1428,7 +1442,7 @@ Show the run dialog, and allow switching to Desktop File run dialog (\fB\fCdrun\ .RS .nf -rofi -modes run,drun -show run +rofi \-modes run,drun \-show run .fi .RE @@ -1440,7 +1454,7 @@ Combine the run and Desktop File run dialog (\fB\fCdrun\fR): .RS .nf -rofi -modes combi -show combi -combi-modes run,drun +rofi \-modes combi \-show combi \-combi\-modes run,drun .fi .RE @@ -1452,7 +1466,7 @@ Combine the run and Desktop File run dialog (\fB\fCdrun\fR), and allow switching .RS .nf -rofi -modes combi,window -show combi -combi-modes run,drun +rofi \-modes combi,window \-show combi \-combi\-modes run,drun .fi .RE @@ -1464,7 +1478,7 @@ Pop up a text message claiming that this is the end: .RS .nf -rofi -e "This is the end" +rofi \-e "This is the end" .fi .RE @@ -1476,7 +1490,7 @@ Pop up a text message in red, bold font claiming that this is still the end: .RS .nf -rofi -e "This is still the end" -markup +rofi \-e "This is still the end" \-markup .fi .RE @@ -1488,7 +1502,7 @@ Show all key bindings: .RS .nf -rofi -show keys +rofi \-show keys .fi .RE @@ -1502,7 +1516,7 @@ See also the i3 manual .PP Some tools (such as \fB\fCimport\fR or \fB\fCxdotool\fR) might be unable to run upon a KeyPress event, because the keyboard/pointer is -still grabbed. For these situations, the \fB\fC--release\fR flag can be used, as it will execute the command after the keys have +still grabbed. For these situations, the \fB\fC\-\-release\fR flag can be used, as it will execute the command after the keys have been released. .SH LICENSE @@ -1551,7 +1565,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. .SH DEBUGGING .PP -For more information see \fBrofi-debugging(5)\fP manpage. +For more information see \fBrofi\-debugging(5)\fP manpage. .SH ISSUE TRACKER .PP @@ -1565,26 +1579,26 @@ first. .SH SEE ALSO .PP -\fBrofi-sensible-terminal(1)\fP, \fBdmenu(1)\fP, \fBrofi-debugging(5)\fP, \fBrofi-theme(5)\fP, \fBrofi-script(5)\fP, \fBrofi-keys(5)\fP,\fBrofi-theme-selector(1)\fP,\fBrofi-dmenu(5)\fP +\fBrofi\-sensible\-terminal(1)\fP, \fBdmenu(1)\fP, \fBrofi\-debugging(5)\fP, \fBrofi\-theme(5)\fP, \fBrofi\-script(5)\fP, \fBrofi\-keys(5)\fP,\fBrofi\-theme\-selector(1)\fP,\fBrofi\-dmenu(5)\fP .SH AUTHOR .RS .IP \(bu 2 -Qball Cow qball@blame.services -\[la]mailto:qball@blame.services\[ra] +Qball Cow +\[la]qball@blame.services\[ra] .IP \(bu 2 -Rasmus Steinke rasi@xssn.at -\[la]mailto:rasi@xssn.at\[ra] +Rasmus Steinke +\[la]rasi@xssn.at\[ra] .IP \(bu 2 -Morgane Glidic sardemff7+rofi@sardemff7.net -\[la]mailto:sardemff7+rofi@sardemff7.net\[ra] +Morgane Glidic +\[la]sardemff7+rofi@sardemff7.net\[ra] .RE .PP Original code based on work by: Sean Pringle -\[la]https://github.com/seanpringle/simpleswitcher\[ra] sean.pringle@gmail.com -\[la]mailto:sean.pringle@gmail.com\[ra] +\[la]https://github.com/seanpringle/simpleswitcher\[ra] +\[la]sean.pringle@gmail.com\[ra] .PP For a full list of authors, check the \fB\fCAUTHORS\fR file. diff --git a/subprojects/libnkutils b/subprojects/libnkutils index b39df45e..7b3a80a1 160000 --- a/subprojects/libnkutils +++ b/subprojects/libnkutils @@ -1 +1 @@ -Subproject commit b39df45e80fa6bcb40b1be8266d9d9b06854e19b +Subproject commit 7b3a80a1e8b958b8fd42f74d973b28b4eb495fbc From 0ed09e6b5e80d8611a5662673f51b568a0dd3897 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Tue, 11 Oct 2022 09:27:47 +0200 Subject: [PATCH 002/139] gitmodules: fix submodule again. --- subprojects/libnkutils | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/libnkutils b/subprojects/libnkutils index 7b3a80a1..b39df45e 160000 --- a/subprojects/libnkutils +++ b/subprojects/libnkutils @@ -1 +1 @@ -Subproject commit 7b3a80a1e8b958b8fd42f74d973b28b4eb495fbc +Subproject commit b39df45e80fa6bcb40b1be8266d9d9b06854e19b From c1a540c57e19acacb9a1e436da8cc794c4437157 Mon Sep 17 00:00:00 2001 From: Dimitris Triantafyllidis <39795232+dimitris-triantafyllidis@users.noreply.github.com> Date: Tue, 11 Oct 2022 17:04:18 +0300 Subject: [PATCH 003/139] [filebrowser] Add an option to show hidden files. (#1716) Add an option to show hidden files by looking up the "show-hidden" filebrowser property and modifying the relevant logic in "filebrowser.c". Co-authored-by: Dave Davenport --- doc/rofi.1 | 2 ++ doc/rofi.1.markdown | 2 ++ source/modes/filebrowser.c | 15 +++++++++++++-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/doc/rofi.1 b/doc/rofi.1 index 6f4ca817..865510fa 100644 --- a/doc/rofi.1 +++ b/doc/rofi.1 @@ -1137,6 +1137,8 @@ configuration { sorting\-method: "name"; /** Group directories before files. */ directories\-first: true; + /** Show hidden files. */ + show-hidden: false; } } diff --git a/doc/rofi.1.markdown b/doc/rofi.1.markdown index 9cff8e6c..976ca5b5 100644 --- a/doc/rofi.1.markdown +++ b/doc/rofi.1.markdown @@ -691,6 +691,8 @@ configuration { sorting-method: "name"; /** Group directories before files. */ directories-first: true; + /** Show hidden files. */ + show-hidden: false; } } ``` diff --git a/source/modes/filebrowser.c b/source/modes/filebrowser.c index dc793da6..03141777 100644 --- a/source/modes/filebrowser.c +++ b/source/modes/filebrowser.c @@ -112,10 +112,13 @@ struct { enum FBSortingTime sorting_time; /** If we want to display directories above files. */ gboolean directories_first; + /** If we want to show hidden files. */ + gboolean show_hidden; } file_browser_config = { .sorting_method = FB_SORT_NAME, .sorting_time = FB_MTIME, .directories_first = TRUE, + .show_hidden = FALSE, }; static void free_list(FileBrowserModePrivateData *pd) { @@ -247,7 +250,10 @@ static void get_file_browser(Mode *sw) { pd->array_length++; continue; } - if (rd->d_name[0] == '.') { + if (g_strcmp0(rd->d_name, ".") == 0) { + continue; + } + if (rd->d_name[0] == '.' && file_browser_config.show_hidden == FALSE) { continue; } @@ -367,7 +373,12 @@ static void file_browser_mode_init_config(Mode *sw) { if (p != NULL && p->type == P_BOOLEAN) { file_browser_config.directories_first = p->value.b; } - + + p = rofi_theme_find_property(wid, P_BOOLEAN, "show-hidden", TRUE); + if (p != NULL && p->type == P_BOOLEAN) { + file_browser_config.show_hidden = p->value.b; + } + if (found_error) { rofi_view_error_dialog(msg, FALSE); From fedd6be715194b916b041e4eb51f0b7258d5bc47 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Tue, 11 Oct 2022 16:10:48 +0200 Subject: [PATCH 004/139] [DOC] Rerun update-manpages. --- doc/rofi.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/rofi.1 b/doc/rofi.1 index 865510fa..3decbf1e 100644 --- a/doc/rofi.1 +++ b/doc/rofi.1 @@ -1138,7 +1138,7 @@ configuration { /** Group directories before files. */ directories\-first: true; /** Show hidden files. */ - show-hidden: false; + show\-hidden: false; } } From 19de3075e75b360ef21d9b9259df6ddc115e6dfe Mon Sep 17 00:00:00 2001 From: aloispichler <45781387+aloispichler@users.noreply.github.com> Date: Tue, 11 Oct 2022 22:13:07 +0200 Subject: [PATCH 005/139] The mode is filebrowser (not file-browser) (#1723) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b8f34aea..f20b4ed6 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ Below is a list of the different modes: * **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. -* **file-browser**: A basic file-browser for opening files. +* **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. From baba41cbd2e6805b79d1a34f607a1dba6617cf2b Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Thu, 13 Oct 2022 20:26:00 +0200 Subject: [PATCH 006/139] [drun] Only pass path on launch, if one is set --- source/modes/drun.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/modes/drun.c b/source/modes/drun.c index f71e888b..c0bab187 100644 --- a/source/modes/drun.c +++ b/source/modes/drun.c @@ -236,7 +236,9 @@ static gboolean drun_helper_eval_cb(const GMatchInfo *info, GString *res, case 'F': case 'u': case 'U': - g_string_append(res, e->path); + if (e->path) { + g_string_append(res, e->path); + } break; // Unsupported case 'i': From 96a69a54c342fbff8e362023023358a6b51f7ce9 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Sat, 22 Oct 2022 11:03:11 +0200 Subject: [PATCH 007/139] [Window] Add -window-prefer-icon-theme option. Fixes: #1702 --- doc/rofi-debugging.5 | 139 +++++----- doc/rofi-dmenu.5 | 125 ++++----- doc/rofi-keys.5 | 345 ++++++++++++------------- doc/rofi-script.5 | 55 ++-- doc/rofi-sensible-terminal.1 | 21 +- doc/rofi-theme-selector.1 | 25 +- doc/rofi-theme.5 | 350 ++++++++++++-------------- doc/rofi.1 | 476 ++++++++++++++++++----------------- doc/rofi.1.markdown | 11 + include/rofi-icon-fetcher.h | 10 + source/modes/window.c | 63 ++++- source/rofi-icon-fetcher.c | 22 ++ 12 files changed, 858 insertions(+), 784 deletions(-) diff --git a/doc/rofi-debugging.5 b/doc/rofi-debugging.5 index 01a64932..dc0eb01b 100644 --- a/doc/rofi-debugging.5 +++ b/doc/rofi-debugging.5 @@ -1,3 +1,4 @@ +.nh .TH ROFI DEBUGGING 5 rofi debugging .SH NAME .PP @@ -5,16 +6,16 @@ Debugging rofi. .PP When reporting an issue with rofi crashing, or misbehaving. It helps to do some small test -to help pin\-point the problem. +to help pin-point the problem. .PP -First try disabling your custom configuration: \fB\fC\-no\-config\fR +First try disabling your custom configuration: \fB\fC-no-config\fR .PP This disables the parsing of the configuration files. This runs rofi in \fIstock\fP mode. .PP -If you run custom C plugins, you can disable the plugins using: \fB\fC\-no\-plugins\fR +If you run custom C plugins, you can disable the plugins using: \fB\fC-no-plugins\fR .SH Get the relevant information for an issue .PP @@ -24,19 +25,19 @@ Please pastebin the output of the following commands: .RS .nf -rofi \-help -rofi \-dump\-config -rofi \-dump\-theme +rofi -help +rofi -dump-config +rofi -dump-theme .fi .RE .PP -\fB\fCrofi \-help\fR provides us with the configuration files parsed, the exact version, monitor layout +\fB\fCrofi -help\fR provides us with the configuration files parsed, the exact version, monitor layout and more useful information. .PP -The \fB\fCrofi \-dump\-config\fR and \fB\fCrofi \-dump\-theme\fR output gives us \fB\fCrofi\fR +The \fB\fCrofi -dump-config\fR and \fB\fCrofi -dump-theme\fR output gives us \fB\fCrofi\fR interpretation of your configuration and theme. .PP @@ -50,7 +51,7 @@ To get a timing trace, enable the \fBTimings\fP debug domain. .RS .nf -G\_MESSAGES\_DEBUG=Timings rofi \-show drun +G_MESSAGES_DEBUG=Timings rofi -show drun .fi .RE @@ -66,56 +67,56 @@ Example trace: .RS .nf -(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 +(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 .fi .RE @@ -123,7 +124,7 @@ Example trace: .SH Debug domains .PP 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 +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: .RS @@ -172,16 +173,16 @@ Helpers.IconFetcher: Information about icon lookup. For full list see \fB\fCman rofi\fR\&. .PP -Example: \fB\fCG\_MESSAGES\_DEBUG=Dialogs.DRun rofi \-show drun\fR To get specific output from the Desktop file run dialog. +Example: \fB\fCG_MESSAGES_DEBUG=Dialogs.DRun rofi -show drun\fR To get specific output from the Desktop file run dialog. .PP -To redirect the debug output to a file (\fB\fC\~/rofi.log\fR) add: +To redirect the debug output to a file (\fB\fC~/rofi.log\fR) add: .PP .RS .nf -rofi \-show drun \-log \~/rofi.log +rofi -show drun -log ~/rofi.log .fi .RE @@ -198,7 +199,7 @@ First make sure you compile \fBrofi\fP with debug symbols: .RS .nf -make CFLAGS="\-O0 \-g3" clean rofi +make CFLAGS="-O0 -g3" clean rofi .fi .RE @@ -206,7 +207,7 @@ make CFLAGS="\-O0 \-g3" clean rofi .PP 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 +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. .PP @@ -234,16 +235,16 @@ thread apply all bt The output trace is useful when reporting crashes. .PP -Some distribution have \fB\fCsystemd\-coredump\fR, this way you can easily get a backtrace via \fB\fCcoredumpctl\fR\&. +Some distribution have \fB\fCsystemd-coredump\fR, this way you can easily get a backtrace via \fB\fCcoredumpctl\fR\&. .SH SEE ALSO .PP -\fBrofi\-sensible\-terminal(1)\fP, \fBdmenu(1)\fP, \fBrofi\-debugging(5)\fP, \fBrofi\-theme(5)\fP, \fBrofi\-script(5)\fP, \fBrofi\-keys(5)\fP,\fBrofi\-theme\-selector(1)\fP +\fBrofi-sensible-terminal(1)\fP, \fBdmenu(1)\fP, \fBrofi-debugging(5)\fP, \fBrofi-theme(5)\fP, \fBrofi-script(5)\fP, \fBrofi-keys(5)\fP,\fBrofi-theme-selector(1)\fP .SH AUTHOR .RS .IP \(bu 2 -Qball Cow -\[la]qball@blame.services\[ra] +Qball Cow qball@blame.services +\[la]mailto:qball@blame.services\[ra] .RE diff --git a/doc/rofi-dmenu.5 b/doc/rofi-dmenu.5 index 999bb739..9a873c48 100644 --- a/doc/rofi-dmenu.5 +++ b/doc/rofi-dmenu.5 @@ -1,7 +1,8 @@ -.TH ROFI\-DMENU 5 rofi\-dmenu +.nh +.TH ROFI-DMENU 5 rofi-dmenu .SH NAME .PP -\fBrofi dmenu mode\fP \- Rofi dmenu emulation +\fBrofi dmenu mode\fP - Rofi dmenu emulation .SH DESCRIPTION .PP @@ -14,8 +15,8 @@ The website for \fB\fCdmenu\fR can be found here .PP \fBrofi\fP does not aim to be 100% compatible with \fB\fCdmenu\fR\&. There are simply too many flavors of \fB\fCdmenu\fR\&. -The idea is that the basic usage command\-line flags are obeyed, theme\-related flags are not. -Besides, \fBrofi\fP offers some extended features (like multi\-select, highlighting, message bar, extra key bindings). +The idea is that the basic usage command-line flags are obeyed, theme-related flags are not. +Besides, \fBrofi\fP offers some extended features (like multi-select, highlighting, message bar, extra key bindings). .SH BASIC CONCEPT .PP @@ -28,27 +29,27 @@ By default separation of rows is done on new lines, making it easy to pipe the o .SH USAGE .PP -By launching \fBrofi\fP with the \fB\fC\-dmenu\fR flag it will go into dmenu emulation mode. +By launching \fBrofi\fP with the \fB\fC-dmenu\fR flag it will go into dmenu emulation mode. .PP .RS .nf -ls | rofi \-dmenu +ls | rofi -dmenu .fi .RE -.SS DMENU DROP\-IN REPLACEMENT +.SS DMENU DROP-IN REPLACEMENT .PP If \fB\fCargv[0]\fR (calling command) is dmenu, \fBrofi\fP will start in dmenu mode. -This way, it can be used as a drop\-in replacement for dmenu. Just copy or symlink \fBrofi\fP to dmenu in \fB\fC$PATH\fR\&. +This way, it can be used as a drop-in replacement for dmenu. Just copy or symlink \fBrofi\fP to dmenu in \fB\fC$PATH\fR\&. .PP .RS .nf -ln \-s /usr/bin/rofi /usr/bin/dmenu +ln -s /usr/bin/rofi /usr/bin/dmenu .fi .RE @@ -56,15 +57,15 @@ ln \-s /usr/bin/rofi /usr/bin/dmenu .SS DMENU VS SCRIPT MODE .PP Script mode is used to extend \fBrofi\fP, dmenu mode is used to extend a script. -The two do share much of the same input format. Please see the \fBrofi\-script(5)\fP manpage for more information. +The two do share much of the same input format. Please see the \fBrofi-script(5)\fP manpage for more information. .SS DMENU SPECIFIC COMMANDLINE FLAGS .PP -A lot of these options can also be modified by the script using special input. See the \fBrofi\-script(5)\fP manpage +A lot of these options can also be modified by the script using special input. See the \fBrofi-script(5)\fP manpage for more information about this syntax. .PP -\fB\fC\-sep\fR \fIseparator\fP +\fB\fC-sep\fR \fIseparator\fP .PP Separator for \fB\fCdmenu\fR\&. Example: To show a list of 'a' to 'e' with '|' as a separator: @@ -73,13 +74,13 @@ Separator for \fB\fCdmenu\fR\&. Example: To show a list of 'a' to 'e' with '|' a .RS .nf -echo "a|b|c|d|e" | rofi \-sep '|' \-dmenu +echo "a|b|c|d|e" | rofi -sep '|' -dmenu .fi .RE .PP -\fB\fC\-p\fR \fIprompt\fP +\fB\fC-p\fR \fIprompt\fP .PP Specify the prompt to show in \fB\fCdmenu\fR mode. For example, select 'monkey', a,b,c,d, or e. @@ -88,7 +89,7 @@ Specify the prompt to show in \fB\fCdmenu\fR mode. For example, select 'monkey', .RS .nf -echo "a|b|c|d|e" | rofi \-sep '|' \-dmenu \-p "monkey" +echo "a|b|c|d|e" | rofi -sep '|' -dmenu -p "monkey" .fi .RE @@ -97,7 +98,7 @@ echo "a|b|c|d|e" | rofi \-sep '|' \-dmenu \-p "monkey" Default: \fIdmenu\fP .PP -\fB\fC\-l\fR \fInumber of lines to show\fP +\fB\fC-l\fR \fInumber of lines to show\fP .PP Maximum number of lines the menu may show before scrolling. @@ -106,7 +107,7 @@ Maximum number of lines the menu may show before scrolling. .RS .nf -rofi \-dmenu \-l 25 +rofi -dmenu -l 25 .fi .RE @@ -115,39 +116,39 @@ rofi \-dmenu \-l 25 Default: \fI15\fP .PP -\fB\fC\-i\fR +\fB\fC-i\fR .PP -Makes \fB\fCdmenu\fR searches case\-insensitive +Makes \fB\fCdmenu\fR searches case-insensitive .PP -\fB\fC\-a\fR \fIX\fP +\fB\fC-a\fR \fIX\fP .PP -Active row, mark \fIX\fP as active. Where \fIX\fP 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: +Active row, mark \fIX\fP as active. Where \fIX\fP 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: .RS .IP \(bu 2 A single row: '5' .IP \(bu 2 -A range of (last 3) rows: '\-3:' +A range of (last 3) rows: '-3:' .IP \(bu 2 -4 rows starting from row 7: '7:11' (or in legacy notation: '7\-10') +4 rows starting from row 7: '7:11' (or in legacy notation: '7-10') .IP \(bu 2 -A set of rows: '2,0,\-9' +A set of rows: '2,0,-9' .IP \(bu 2 -Or any combination: '5,\-3:,7:11,2,0,\-9' +Or any combination: '5,-3:,7:11,2,0,-9' .RE .PP -\fB\fC\-u\fR \fIX\fP +\fB\fC-u\fR \fIX\fP .PP -Urgent row, mark \fIX\fP as urgent. See \fB\fC\-a\fR option for details. +Urgent row, mark \fIX\fP as urgent. See \fB\fC-a\fR option for details. .PP -\fB\fC\-only\-match\fR +\fB\fC-only-match\fR .PP Only return a selected item, do not allow custom entry. @@ -155,14 +156,14 @@ This mode always returns an entry. It will not return if no matching entry is selected. .PP -\fB\fC\-no\-custom\fR +\fB\fC-no-custom\fR .PP Only return a selected item, do not allow custom entry. This mode returns directly when no entries given. .PP -\fB\fC\-format\fR \fIformat\fP +\fB\fC-format\fR \fIformat\fP .PP Allows the output of dmenu to be customized (N is the total number of input entries): @@ -171,9 +172,9 @@ Allows the output of dmenu to be customized (N is the total number of input entr .IP \(bu 2 \&'s' selected string .IP \(bu 2 -\&'i' index (0 \-\& (N\-\&1)) +\&'i' index (0 - (N-1)) .IP \(bu 2 -\&'d' index (1 \-\& N) +\&'d' index (1 - N) .IP \(bu 2 \&'q' quote string .IP \(bu 2 @@ -189,13 +190,13 @@ Allows the output of dmenu to be customized (N is the total number of input entr Default: 's' .PP -\fB\fC\-select\fR \fIstring\fP +\fB\fC-select\fR \fIstring\fP .PP Select first line that matches the given string .PP -\fB\fC\-mesg\fR \fIstring\fP +\fB\fC-mesg\fR \fIstring\fP .PP Add a message line below the filter entry box. Supports Pango markup. @@ -203,27 +204,27 @@ For more information on supported markup, see here \[la]https://docs.gtk.org/Pango/pango_markup.html\[ra] .PP -\fB\fC\-dump\fR +\fB\fC-dump\fR .PP Dump the filtered list to stdout and quit. This can be used to get the list as \fBrofi\fP would filter it. -Use together with \fB\fC\-filter\fR command. +Use together with \fB\fC-filter\fR command. .PP -\fB\fC\-input\fR \fIfile\fP +\fB\fC-input\fR \fIfile\fP .PP Reads from \fIfile\fP instead of stdin. .PP -\fB\fC\-password\fR +\fB\fC-password\fR .PP Hide the input text. This should not be considered secure! .PP -\fB\fC\-markup\-rows\fR +\fB\fC-markup-rows\fR .PP Tell \fBrofi\fP that DMenu input is Pango markup encoded, and should be rendered. @@ -231,47 +232,47 @@ See here \[la]https://developer.gnome.org/pygtk/stable/pango-markup-language.html\[ra] for details about Pango markup. .PP -\fB\fC\-multi\-select\fR +\fB\fC-multi-select\fR .PP Allow multiple lines to be selected. Adds a small selection indicator to the left of each entry. .PP -\fB\fC\-sync\fR +\fB\fC-sync\fR .PP Force \fBrofi\fP mode to first read all data from stdin before showing the selection window. This is original dmenu behavior. .PP Note: the default asynchronous mode will also be automatically disabled if used with conflicting options, -such as \fB\fC\-dump\fR, \fB\fC\-only\-match\fR or \fB\fC\-auto\-select\fR\&. +such as \fB\fC-dump\fR, \fB\fC-only-match\fR or \fB\fC-auto-select\fR\&. .PP -\fB\fC\-window\-title\fR \fItitle\fP +\fB\fC-window-title\fR \fItitle\fP .PP -Set name used for the window title. Will be shown as Rofi \- \fItitle\fP +Set name used for the window title. Will be shown as Rofi - \fItitle\fP .PP -\fB\fC\-w\fR \fIwindowid\fP +\fB\fC-w\fR \fIwindowid\fP .PP Position \fBrofi\fP over the window with the given X11 window ID. .PP -\fB\fC\-keep\-right\fR +\fB\fC-keep-right\fR .PP Set ellipsize mode to start. So, the end of the string is visible. .PP -\fB\fC\-display\-columns\fR +\fB\fC-display-columns\fR .PP A comma seperated list of columns to show. .PP -\fB\fC\-display\-column\-separator\fR +\fB\fC-display-column-separator\fR .PP The column separator. This is a regex. @@ -280,19 +281,19 @@ The column separator. This is a regex. \fIdefault\fP: '\\t' .PP -\fB\fC\-ballot\-selected\-str\fR \fIstring\fP +\fB\fC-ballot-selected-str\fR \fIstring\fP .PP -When multi\-select is enabled, prefix this string when element is selected. +When multi-select is enabled, prefix this string when element is selected. .PP \fIdefault\fP: "☑ " .PP -\fB\fC\-ballot\-unselected\-str\fR \fIstring\fP +\fB\fC-ballot-unselected-str\fR \fIstring\fP .PP -When multi\-select is enabled, prefix this string when element is not selected. +When multi-select is enabled, prefix this string when element is not selected. .PP \fIdefault\fP: "☐ " @@ -304,30 +305,30 @@ When multi\-select is enabled, prefix this string when element is not selected. .IP \(bu 2 \fB1\fP: User cancelled the selection. .IP \(bu 2 -\fB10\-28\fP: Row accepted by custom keybinding. +\fB10-28\fP: Row accepted by custom keybinding. .RE .SH SEE ALSO .PP -rofi(1), rofi\-sensible\-terminal(1), dmenu(1), rofi\-theme(5), rofi\-script(5), rofi\-theme\-selector(1), ascii(7) +rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5), rofi-theme-selector(1), ascii(7) .SH AUTHOR .PP -Qball Cow -\[la]qball@gmpclient.org\[ra] +Qball Cow qball@gmpclient.org +\[la]mailto:qball@gmpclient.org\[ra] .PP -Rasmus Steinke -\[la]rasi@xssn.at\[ra] +Rasmus Steinke rasi@xssn.at +\[la]mailto:rasi@xssn.at\[ra] .PP -Morgane Glidic -\[la]sardemff7+rofi@sardemff7.net\[ra] +Morgane Glidic sardemff7+rofi@sardemff7.net +\[la]mailto:sardemff7+rofi@sardemff7.net\[ra] .PP -Original code based on work by: Sean Pringle -\[la]sean.pringle@gmail.com\[ra] +Original code based on work by: Sean Pringle sean.pringle@gmail.com +\[la]mailto:sean.pringle@gmail.com\[ra] .PP For a full list of authors, check the AUTHORS file. diff --git a/doc/rofi-keys.5 b/doc/rofi-keys.5 index 9555edc8..7d0ed990 100644 --- a/doc/rofi-keys.5 +++ b/doc/rofi-keys.5 @@ -1,7 +1,8 @@ -.TH ROFI\-KEYS 5 rofi\-keys +.nh +.TH ROFI-KEYS 5 rofi-keys .SH NAME .PP -\fBrofi keys\fP \- Rofi Key and Mouse bindings +\fBrofi keys\fP - Rofi Key and Mouse bindings .SH DESCRIPTION .PP @@ -9,13 +10,13 @@ .SH Setting binding .PP -Bindings can be done on the commandline (\-{bindingname}): +Bindings can be done on the commandline (-{bindingname}): .PP .RS .nf -rofi \-show run \-kb\-accept\-entry 'Control+Shift+space' +rofi -show run -kb-accept-entry 'Control+Shift+space' .fi .RE @@ -28,7 +29,7 @@ or via the configuration file: .nf configuration { - kb\-accept\-entry: "Control+Shift+space"; + kb-accept-entry: "Control+Shift+space"; } .fi @@ -42,7 +43,7 @@ The key can be set by its name (see above) or its keycode: .nf configuration { - kb\-accept\-entry: "Control+Shift+[65]"; + kb-accept-entry: "Control+Shift+[65]"; } .fi @@ -59,7 +60,7 @@ Multiple keys can be specified for an action as a comma separated list: .nf configuration { - kb\-accept\-entry: "Control+Shift+space,Return"; + kb-accept-entry: "Control+Shift+space,Return"; } .fi @@ -74,7 +75,7 @@ prepend the binding with \fB\fC!\fR: .nf configuration { - kb\-accept\-entry: "!Control+Shift+space,Return"; + kb-accept-entry: "!Control+Shift+space,Return"; } .fi @@ -89,573 +90,573 @@ To unset a binding, pass an empty string. .nf configuration { - kb\-clear\-line: ""; + kb-clear-line: ""; } .fi .RE .SH Keyboard Bindings -.SS \fBkb\-primary\-paste\fP: +.SS \fBkb-primary-paste\fP: .PP Paste primary selection .PP -\fBDefault\fP: Control+V,Shift+Insert +\fBDefault\fP: Control+V,Shift+Insert -.SS \fBkb\-secondary\-paste\fP +.SS \fBkb-secondary-paste\fP .PP Paste clipboard .PP -\fBDefault\fP: Control+v,Insert +\fBDefault\fP: Control+v,Insert -.SS \fBkb\-secondary\-copy\fP +.SS \fBkb-secondary-copy\fP .PP Copy current selection to clipboard .PP -\fBDefault\fP: Control+c +\fBDefault\fP: Control+c -.SS \fBkb\-clear\-line\fP +.SS \fBkb-clear-line\fP .PP Clear input line .PP -\fBDefault\fP: Control+w +\fBDefault\fP: Control+w -.SS \fBkb\-move\-front\fP +.SS \fBkb-move-front\fP .PP Beginning of line .PP -\fBDefault\fP: Control+a +\fBDefault\fP: Control+a -.SS \fBkb\-move\-end\fP +.SS \fBkb-move-end\fP .PP End of line .PP -\fBDefault\fP: Control+e +\fBDefault\fP: Control+e -.SS \fBkb\-move\-word\-back\fP +.SS \fBkb-move-word-back\fP .PP Move back one word .PP -\fBDefault\fP: Alt+b,Control+Left +\fBDefault\fP: Alt+b,Control+Left -.SS \fBkb\-move\-word\-forward\fP +.SS \fBkb-move-word-forward\fP .PP Move forward one word .PP -\fBDefault\fP: Alt+f,Control+Right +\fBDefault\fP: Alt+f,Control+Right -.SS \fBkb\-move\-char\-back\fP +.SS \fBkb-move-char-back\fP .PP Move back one char .PP -\fBDefault\fP: Left,Control+b +\fBDefault\fP: Left,Control+b -.SS \fBkb\-move\-char\-forward\fP +.SS \fBkb-move-char-forward\fP .PP Move forward one char .PP -\fBDefault\fP: Right,Control+f +\fBDefault\fP: Right,Control+f -.SS \fBkb\-remove\-word\-back\fP +.SS \fBkb-remove-word-back\fP .PP Delete previous word .PP -\fBDefault\fP: Control+Alt+h,Control+BackSpace +\fBDefault\fP: Control+Alt+h,Control+BackSpace -.SS \fBkb\-remove\-word\-forward\fP +.SS \fBkb-remove-word-forward\fP .PP Delete next word .PP -\fBDefault\fP: Control+Alt+d +\fBDefault\fP: Control+Alt+d -.SS \fBkb\-remove\-char\-forward\fP +.SS \fBkb-remove-char-forward\fP .PP Delete next char .PP -\fBDefault\fP: Delete,Control+d +\fBDefault\fP: Delete,Control+d -.SS \fBkb\-remove\-char\-back\fP +.SS \fBkb-remove-char-back\fP .PP Delete previous char .PP -\fBDefault\fP: BackSpace,Shift+BackSpace,Control+h +\fBDefault\fP: BackSpace,Shift+BackSpace,Control+h -.SS \fBkb\-remove\-to\-eol\fP +.SS \fBkb-remove-to-eol\fP .PP Delete till the end of line .PP -\fBDefault\fP: Control+k +\fBDefault\fP: Control+k -.SS \fBkb\-remove\-to\-sol\fP +.SS \fBkb-remove-to-sol\fP .PP Delete till the start of line .PP -\fBDefault\fP: Control+u +\fBDefault\fP: Control+u -.SS \fBkb\-accept\-entry\fP +.SS \fBkb-accept-entry\fP .PP Accept entry .PP -\fBDefault\fP: Control+j,Control+m,Return,KP\_Enter +\fBDefault\fP: Control+j,Control+m,Return,KP_Enter -.SS \fBkb\-accept\-custom\fP +.SS \fBkb-accept-custom\fP .PP Use entered text as command (in ssh/run modes) .PP -\fBDefault\fP: Control+Return +\fBDefault\fP: Control+Return -.SS \fBkb\-accept\-custom\-alt\fP +.SS \fBkb-accept-custom-alt\fP .PP Use entered text as command (in ssh/run modes) .PP -\fBDefault\fP: Control+Shift+Return +\fBDefault\fP: Control+Shift+Return -.SS \fBkb\-accept\-alt\fP +.SS \fBkb-accept-alt\fP .PP Use alternate accept command. .PP -\fBDefault\fP: Shift+Return +\fBDefault\fP: Shift+Return -.SS \fBkb\-delete\-entry\fP +.SS \fBkb-delete-entry\fP .PP Delete entry from history .PP -\fBDefault\fP: Shift+Delete +\fBDefault\fP: Shift+Delete -.SS \fBkb\-mode\-next\fP +.SS \fBkb-mode-next\fP .PP Switch to the next mode. .PP -\fBDefault\fP: Shift+Right,Control+Tab +\fBDefault\fP: Shift+Right,Control+Tab -.SS \fBkb\-mode\-previous\fP +.SS \fBkb-mode-previous\fP .PP Switch to the previous mode. .PP -\fBDefault\fP: Shift+Left,Control+ISO\_Left\_Tab +\fBDefault\fP: Shift+Left,Control+ISO_Left_Tab -.SS \fBkb\-mode\-complete\fP +.SS \fBkb-mode-complete\fP .PP Start completion for mode. .PP -\fBDefault\fP: Control+l +\fBDefault\fP: Control+l -.SS \fBkb\-row\-left\fP +.SS \fBkb-row-left\fP .PP Go to the previous column .PP -\fBDefault\fP: Control+Page\_Up +\fBDefault\fP: Control+Page_Up -.SS \fBkb\-row\-right\fP +.SS \fBkb-row-right\fP .PP Go to the next column .PP -\fBDefault\fP: Control+Page\_Down +\fBDefault\fP: Control+Page_Down -.SS \fBkb\-row\-up\fP +.SS \fBkb-row-up\fP .PP Select previous entry .PP -\fBDefault\fP: Up,Control+p +\fBDefault\fP: Up,Control+p -.SS \fBkb\-row\-down\fP +.SS \fBkb-row-down\fP .PP Select next entry .PP -\fBDefault\fP: Down,Control+n +\fBDefault\fP: Down,Control+n -.SS \fBkb\-row\-tab\fP +.SS \fBkb-row-tab\fP .PP Go to next row, if one left, accept it, if no left next mode. .PP -\fBDefault\fP: +\fBDefault\fP: -.SS \fBkb\-element\-next\fP +.SS \fBkb-element-next\fP .PP Go to next row. .PP -\fBDefault\fP: Tab +\fBDefault\fP: Tab -.SS \fBkb\-element\-prev\fP +.SS \fBkb-element-prev\fP .PP Go to previous row. .PP -\fBDefault\fP: ISO\_Left\_Tab +\fBDefault\fP: ISO_Left_Tab -.SS \fBkb\-page\-prev\fP +.SS \fBkb-page-prev\fP .PP Go to the previous page .PP -\fBDefault\fP: Page\_Up +\fBDefault\fP: Page_Up -.SS \fBkb\-page\-next\fP +.SS \fBkb-page-next\fP .PP Go to the next page .PP -\fBDefault\fP: Page\_Down +\fBDefault\fP: Page_Down -.SS \fBkb\-row\-first\fP +.SS \fBkb-row-first\fP .PP Go to the first entry .PP -\fBDefault\fP: Home,KP\_Home +\fBDefault\fP: Home,KP_Home -.SS \fBkb\-row\-last\fP +.SS \fBkb-row-last\fP .PP Go to the last entry .PP -\fBDefault\fP: End,KP\_End +\fBDefault\fP: End,KP_End -.SS \fBkb\-row\-select\fP +.SS \fBkb-row-select\fP .PP Set selected item as input text .PP -\fBDefault\fP: Control+space +\fBDefault\fP: Control+space -.SS \fBkb\-screenshot\fP +.SS \fBkb-screenshot\fP .PP Take a screenshot of the rofi window .PP -\fBDefault\fP: Alt+S +\fBDefault\fP: Alt+S -.SS \fBkb\-ellipsize\fP +.SS \fBkb-ellipsize\fP .PP Toggle between ellipsize modes for displayed data .PP -\fBDefault\fP: Alt+period +\fBDefault\fP: Alt+period -.SS \fBkb\-toggle\-case\-sensitivity\fP +.SS \fBkb-toggle-case-sensitivity\fP .PP Toggle case sensitivity .PP -\fBDefault\fP: grave,dead\_grave +\fBDefault\fP: grave,dead_grave -.SS \fBkb\-toggle\-sort\fP +.SS \fBkb-toggle-sort\fP .PP Toggle sort .PP -\fBDefault\fP: Alt+grave +\fBDefault\fP: Alt+grave -.SS \fBkb\-cancel\fP +.SS \fBkb-cancel\fP .PP Quit rofi .PP -\fBDefault\fP: Escape,Control+g,Control+bracketleft +\fBDefault\fP: Escape,Control+g,Control+bracketleft -.SS \fBkb\-custom\-1\fP +.SS \fBkb-custom-1\fP .PP Custom keybinding 1 .PP -\fBDefault\fP: Alt+1 +\fBDefault\fP: Alt+1 -.SS \fBkb\-custom\-2\fP +.SS \fBkb-custom-2\fP .PP Custom keybinding 2 .PP -\fBDefault\fP: Alt+2 +\fBDefault\fP: Alt+2 -.SS \fBkb\-custom\-3\fP +.SS \fBkb-custom-3\fP .PP Custom keybinding 3 .PP -\fBDefault\fP: Alt+3 +\fBDefault\fP: Alt+3 -.SS \fBkb\-custom\-4\fP +.SS \fBkb-custom-4\fP .PP Custom keybinding 4 .PP -\fBDefault\fP: Alt+4 +\fBDefault\fP: Alt+4 -.SS \fBkb\-custom\-5\fP +.SS \fBkb-custom-5\fP .PP Custom Keybinding 5 .PP -\fBDefault\fP: Alt+5 +\fBDefault\fP: Alt+5 -.SS \fBkb\-custom\-6\fP +.SS \fBkb-custom-6\fP .PP Custom keybinding 6 .PP -\fBDefault\fP: Alt+6 +\fBDefault\fP: Alt+6 -.SS \fBkb\-custom\-7\fP +.SS \fBkb-custom-7\fP .PP Custom Keybinding 7 .PP -\fBDefault\fP: Alt+7 +\fBDefault\fP: Alt+7 -.SS \fBkb\-custom\-8\fP +.SS \fBkb-custom-8\fP .PP Custom keybinding 8 .PP -\fBDefault\fP: Alt+8 +\fBDefault\fP: Alt+8 -.SS \fBkb\-custom\-9\fP +.SS \fBkb-custom-9\fP .PP Custom keybinding 9 .PP -\fBDefault\fP: Alt+9 +\fBDefault\fP: Alt+9 -.SS \fBkb\-custom\-10\fP +.SS \fBkb-custom-10\fP .PP Custom keybinding 10 .PP -\fBDefault\fP: Alt+0 +\fBDefault\fP: Alt+0 -.SS \fBkb\-custom\-11\fP +.SS \fBkb-custom-11\fP .PP Custom keybinding 11 .PP -\fBDefault\fP: Alt+exclam +\fBDefault\fP: Alt+exclam -.SS \fBkb\-custom\-12\fP +.SS \fBkb-custom-12\fP .PP Custom keybinding 12 .PP -\fBDefault\fP: Alt+at +\fBDefault\fP: Alt+at -.SS \fBkb\-custom\-13\fP +.SS \fBkb-custom-13\fP .PP Custom keybinding 13 .PP -\fBDefault\fP: Alt+numbersign +\fBDefault\fP: Alt+numbersign -.SS \fBkb\-custom\-14\fP +.SS \fBkb-custom-14\fP .PP Custom keybinding 14 .PP -\fBDefault\fP: Alt+dollar +\fBDefault\fP: Alt+dollar -.SS \fBkb\-custom\-15\fP +.SS \fBkb-custom-15\fP .PP Custom keybinding 15 .PP -\fBDefault\fP: Alt+percent +\fBDefault\fP: Alt+percent -.SS \fBkb\-custom\-16\fP +.SS \fBkb-custom-16\fP .PP Custom keybinding 16 .PP -\fBDefault\fP: Alt+dead\_circumflex +\fBDefault\fP: Alt+dead_circumflex -.SS \fBkb\-custom\-17\fP +.SS \fBkb-custom-17\fP .PP Custom keybinding 17 .PP -\fBDefault\fP: Alt+ampersand +\fBDefault\fP: Alt+ampersand -.SS \fBkb\-custom\-18\fP +.SS \fBkb-custom-18\fP .PP Custom keybinding 18 .PP -\fBDefault\fP: Alt+asterisk +\fBDefault\fP: Alt+asterisk -.SS \fBkb\-custom\-19\fP +.SS \fBkb-custom-19\fP .PP Custom Keybinding 19 .PP -\fBDefault\fP: Alt+parenleft +\fBDefault\fP: Alt+parenleft -.SS \fBkb\-select\-1\fP +.SS \fBkb-select-1\fP .PP Select row 1 .PP -\fBDefault\fP: Super+1 +\fBDefault\fP: Super+1 -.SS \fBkb\-select\-2\fP +.SS \fBkb-select-2\fP .PP Select row 2 .PP -\fBDefault\fP: Super+2 +\fBDefault\fP: Super+2 -.SS \fBkb\-select\-3\fP +.SS \fBkb-select-3\fP .PP Select row 3 .PP -\fBDefault\fP: Super+3 +\fBDefault\fP: Super+3 -.SS \fBkb\-select\-4\fP +.SS \fBkb-select-4\fP .PP Select row 4 .PP -\fBDefault\fP: Super+4 +\fBDefault\fP: Super+4 -.SS \fBkb\-select\-5\fP +.SS \fBkb-select-5\fP .PP Select row 5 .PP -\fBDefault\fP: Super+5 +\fBDefault\fP: Super+5 -.SS \fBkb\-select\-6\fP +.SS \fBkb-select-6\fP .PP Select row 6 .PP -\fBDefault\fP: Super+6 +\fBDefault\fP: Super+6 -.SS \fBkb\-select\-7\fP +.SS \fBkb-select-7\fP .PP Select row 7 .PP -\fBDefault\fP: Super+7 +\fBDefault\fP: Super+7 -.SS \fBkb\-select\-8\fP +.SS \fBkb-select-8\fP .PP Select row 8 .PP -\fBDefault\fP: Super+8 +\fBDefault\fP: Super+8 -.SS \fBkb\-select\-9\fP +.SS \fBkb-select-9\fP .PP Select row 9 .PP -\fBDefault\fP: Super+9 +\fBDefault\fP: Super+9 -.SS \fBkb\-select\-10\fP +.SS \fBkb-select-10\fP .PP Select row 10 .PP -\fBDefault\fP: Super+0 +\fBDefault\fP: Super+0 .SH Mouse Bindings -.SS \fBml\-row\-left\fP +.SS \fBml-row-left\fP .PP Go to the previous column .PP -\fBDefault\fP: ScrollLeft +\fBDefault\fP: ScrollLeft -.SS \fBml\-row\-right\fP +.SS \fBml-row-right\fP .PP Go to the next column .PP -\fBDefault\fP: ScrollRight +\fBDefault\fP: ScrollRight -.SS \fBml\-row\-up\fP +.SS \fBml-row-up\fP .PP Select previous entry .PP -\fBDefault\fP: ScrollUp +\fBDefault\fP: ScrollUp -.SS \fBml\-row\-down\fP +.SS \fBml-row-down\fP .PP Select next entry .PP -\fBDefault\fP: ScrollDown +\fBDefault\fP: ScrollDown -.SS \fBme\-select\-entry\fP +.SS \fBme-select-entry\fP .PP Select hovered row .PP -\fBDefault\fP: MousePrimary +\fBDefault\fP: MousePrimary -.SS \fBme\-accept\-entry\fP +.SS \fBme-accept-entry\fP .PP Accept hovered row .PP -\fBDefault\fP: MouseDPrimary +\fBDefault\fP: MouseDPrimary -.SS \fBme\-accept\-custom\fP +.SS \fBme-accept-custom\fP .PP Accept hovered row with custom action .PP -\fBDefault\fP: Control+MouseDPrimary +\fBDefault\fP: Control+MouseDPrimary .SH SEE ALSO .PP -rofi(1), rofi\-sensible\-terminal(1), rofi\-theme(5), rofi\-script(5) +rofi(1), rofi-sensible-terminal(1), rofi-theme(5), rofi-script(5) .SH AUTHOR .PP -Qball Cow -\[la]qball@gmpclient.org\[ra] +Qball Cow qball@gmpclient.org +\[la]mailto:qball@gmpclient.org\[ra] .PP -Rasmus Steinke -\[la]rasi@xssn.at\[ra] +Rasmus Steinke rasi@xssn.at +\[la]mailto:rasi@xssn.at\[ra] .PP -Morgane Glidic -\[la]sardemff7+rofi@sardemff7.net\[ra] +Morgane Glidic sardemff7+rofi@sardemff7.net +\[la]mailto:sardemff7+rofi@sardemff7.net\[ra] .PP -Original code based on work by: Sean Pringle -\[la]sean.pringle@gmail.com\[ra] +Original code based on work by: Sean Pringle sean.pringle@gmail.com +\[la]mailto:sean.pringle@gmail.com\[ra] .PP For a full list of authors, check the AUTHORS file. diff --git a/doc/rofi-script.5 b/doc/rofi-script.5 index fd57a067..6e8b9b17 100644 --- a/doc/rofi-script.5 +++ b/doc/rofi-script.5 @@ -1,7 +1,8 @@ -.TH ROFI\-SCRIPT 5 rofi\-script +.nh +.TH ROFI-SCRIPT 5 rofi-script .SH NAME .PP -\fBrofi script mode\fP \- Rofi format for scriptable mode. +\fBrofi script mode\fP - Rofi format for scriptable mode. .SH DESCRIPTION .PP @@ -20,7 +21,7 @@ For example: .RS .nf -rofi \-show fb \-modes "fb:file\_browser.sh" +rofi -show fb -modes "fb:file_browser.sh" .fi .RE @@ -63,7 +64,7 @@ This shows two entries, reload and quit. When the quit entry is selected, rofi c .PP Rofi sets the following environment variable when executing the script: -.SS \fB\fCROFI\_RETV\fR +.SS \fB\fCROFI_RETV\fR .PP An integer number with the current state: @@ -75,15 +76,15 @@ An integer number with the current state: .IP \(bu 2 \fB2\fP: Selected a custom entry. .IP \(bu 2 -\fB10\-28\fP: Custom keybinding 1\-19 ( need to be explicitly enabled by script ). +\fB10-28\fP: Custom keybinding 1-19 ( need to be explicitly enabled by script ). .RE -.SS \fB\fCROFI\_INFO\fR +.SS \fB\fCROFI_INFO\fR .PP Environment get set when selected entry get set with the property value of the 'info' row option, if set. -.SS \fB\fCROFI\_DATA\fR +.SS \fB\fCROFI_DATA\fR .PP Environment get set when script sets \fB\fCdata\fR option in header. @@ -99,7 +100,7 @@ For example to set the prompt: .RS .nf - echo \-en "\\0prompt\\x1fChange prompt\\n" + echo -en "\\0prompt\\x1fChange prompt\\n" .fi .RE @@ -113,7 +114,7 @@ The following extra options exists: .IP \(bu 2 \fBmessage\fP: Update the message text. .IP \(bu 2 -\fBmarkup\-rows\fP: If 'true' renders markup in the row. +\fBmarkup-rows\fP: If 'true' renders markup in the row. .IP \(bu 2 \fBurgent\fP: Mark rows as urgent. (for syntax see the urgent option in dmenu mode) .IP \(bu 2 @@ -121,15 +122,15 @@ The following extra options exists: .IP \(bu 2 \fBdelim\fP: Set the delimiter for for next rows. Default is '\\n' and this option should finish with this. Only call this on first call of script, it is remembered for consecutive calls. .IP \(bu 2 -\fBno\-custom\fP: If set to 'true'; only accept listed entries, ignore custom input. +\fBno-custom\fP: If set to 'true'; only accept listed entries, ignore custom input. .IP \(bu 2 -\fBuse\-hot\-keys\fP: If set to true, it enabled the Custom keybindings for script. Warning this breaks the normal rofi flow. +\fBuse-hot-keys\fP: If set to true, it enabled the Custom keybindings for script. Warning this breaks the normal rofi flow. .IP \(bu 2 -\fBkeep\-selection\fP: If set, the selection is not moved to the first entry, but the current position is maintained. The filter is cleared. +\fBkeep-selection\fP: If set, the selection is not moved to the first entry, but the current position is maintained. The filter is cleared. .IP \(bu 2 -\fBnew\-selection\fP: If \fB\fCkeep\-selection\fR is set, this allows you to override the selected entry (absolute position). +\fBnew-selection\fP: If \fB\fCkeep-selection\fR is set, this allows you to override the selected entry (absolute position). .IP \(bu 2 -\fBdata\fP: Passed data to the next execution of the script via \fBROFI\_DATA\fP\&. +\fBdata\fP: Passed data to the next execution of the script via \fBROFI_DATA\fP\&. .IP \(bu 2 \fBtheme\fP: Small theme snippet to f.e. change the background color of a widget. @@ -147,7 +148,7 @@ For example: .RS .nf - echo \-en "aap\\0icon\\x1ffolder\\n" + echo -en "aap\\0icon\\x1ffolder\\n" .fi .RE @@ -163,7 +164,7 @@ The following options are supported: .IP \(bu 2 \fBnonselectable\fP: If true the row cannot activated. .IP \(bu 2 -\fBinfo\fP: Info that, on selection, gets placed in the \fB\fCROFI\_INFO\fR environment variable. This entry does not get searched. +\fBinfo\fP: Info that, on selection, gets placed in the \fB\fCROFI_INFO\fR environment variable. This entry does not get searched. .RE @@ -174,7 +175,7 @@ multiple entries can be passed using the \fB\fC\\x1f\fR separator. .RS .nf - echo \-en "aap\\0icon\\x1ffolder\\x1finfo\\x1ftest\\n" + echo -en "aap\\0icon\\x1ffolder\\x1finfo\\x1ftest\\n" .fi .RE @@ -191,7 +192,7 @@ In bash the best way to do this is using \fB\fCcoproc\fR\&. .RS .nf - coproc ( myApp > /dev/null 2>\&1 ) + coproc ( myApp > /dev/null 2>&1 ) .fi .RE @@ -203,24 +204,24 @@ See issue #1201 on github. .SH SEE ALSO .PP -rofi(1), rofi\-sensible\-terminal(1), dmenu(1), rofi\-theme(5), rofi\-theme\-selector(1) +rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1) .SH AUTHOR .PP -Qball Cow -\[la]qball@gmpclient.org\[ra] +Qball Cow qball@gmpclient.org +\[la]mailto:qball@gmpclient.org\[ra] .PP -Rasmus Steinke -\[la]rasi@xssn.at\[ra] +Rasmus Steinke rasi@xssn.at +\[la]mailto:rasi@xssn.at\[ra] .PP -Morgane Glidic -\[la]sardemff7+rofi@sardemff7.net\[ra] +Morgane Glidic sardemff7+rofi@sardemff7.net +\[la]mailto:sardemff7+rofi@sardemff7.net\[ra] .PP -Original code based on work by: Sean Pringle -\[la]sean.pringle@gmail.com\[ra] +Original code based on work by: Sean Pringle sean.pringle@gmail.com +\[la]mailto:sean.pringle@gmail.com\[ra] .PP For a full list of authors, check the AUTHORS file. diff --git a/doc/rofi-sensible-terminal.1 b/doc/rofi-sensible-terminal.1 index 30d4a15d..86634e19 100644 --- a/doc/rofi-sensible-terminal.1 +++ b/doc/rofi-sensible-terminal.1 @@ -1,17 +1,18 @@ -.TH rofi\-sensible\-terminal 1 rofi\-sensible\-terminal +.nh +.TH rofi-sensible-terminal 1 rofi-sensible-terminal .SH NAME .PP -\fBrofi\-sensible\-terminal\fP \- launches $TERMINAL with fallbacks +\fBrofi-sensible-terminal\fP - launches $TERMINAL with fallbacks .SH SYNOPSIS .PP -rofi\-sensible\-terminal [arguments] +rofi-sensible-terminal [arguments] .SH DESCRIPTION .PP -rofi\-sensible\-terminal is invoked in the rofi default config to start a terminal. This -wrapper script is necessary since there is no distribution\-independent terminal launcher -(but for example Debian has x\-terminal\-emulator). Distribution packagers are responsible for +rofi-sensible-terminal is invoked in the rofi default config to start a terminal. This +wrapper script is necessary since there is no distribution-independent terminal launcher +(but for example Debian has x-terminal-emulator). Distribution packagers are responsible for shipping this script in a way which is appropriate for the distribution. .PP @@ -19,9 +20,9 @@ It tries to start one of the following (in that order): .RS .IP \(bu 2 -\fB\fC$TERMINAL\fR (this is a non\-standard variable) +\fB\fC$TERMINAL\fR (this is a non-standard variable) .IP \(bu 2 -x\-terminal\-emulator +x-terminal-emulator .IP \(bu 2 urxvt .IP \(bu 2 @@ -43,9 +44,9 @@ xterm .IP \(bu 2 roxterm .IP \(bu 2 -xfce4\-terminal.wrapper +xfce4-terminal.wrapper .IP \(bu 2 -mate\-terminal +mate-terminal .IP \(bu 2 lxterminal .IP \(bu 2 diff --git a/doc/rofi-theme-selector.1 b/doc/rofi-theme-selector.1 index de076ff4..96df43df 100644 --- a/doc/rofi-theme-selector.1 +++ b/doc/rofi-theme-selector.1 @@ -1,38 +1,39 @@ -.TH rofi\-theme\-selector 1 rofi\-theme\-selector +.nh +.TH rofi-theme-selector 1 rofi-theme-selector .SH NAME .PP -\fBrofi\-theme\-selector\fP \- Preview and apply themes for \fBrofi\fP +\fBrofi-theme-selector\fP - Preview and apply themes for \fBrofi\fP .SH DESCRIPTION .PP -\fBrofi\-theme\-selector\fP is a bash/rofi script to preview and apply themes for \fBrofi\fP\&. +\fBrofi-theme-selector\fP is a bash/rofi script to preview and apply themes for \fBrofi\fP\&. It's part of any installation of \fBrofi\fP\&. .SH USAGE -.SS Running rofi\-theme\-selector +.SS Running rofi-theme-selector .PP -\fBrofi\-theme\-selector\fP shows a list of all available themes in a \fBrofi\fP window. +\fBrofi-theme-selector\fP shows a list of all available themes in a \fBrofi\fP window. It lets you preview each theme with the Enter key and apply the theme to your \fBrofi\fP configuration file with Alt+a. .SH Theme directories .PP -\fBrofi\-theme\-selector\fP searches the following directories for themes: +\fBrofi-theme-selector\fP searches the following directories for themes: .RS .IP \(bu 2 ${PREFIX}/share/rofi/themes .IP \(bu 2 -$XDG\_CONFIG\_HOME/rofi/themes +$XDG_CONFIG_HOME/rofi/themes .IP \(bu 2 -$XDG\_DATA\_HOME/share/rofi/themes +$XDG_DATA_HOME/share/rofi/themes .RE .PP -${PREFIX} reflects the install location of rofi. In most cases this will be "/usr".
-$XDG\_CONFIG\_HOME is normally unset. Default path is "$HOME/.config".
-$XDG\_DATA\_HOME is normally unset. Default path is "$HOME/.local/share". +${PREFIX} reflects the install location of rofi. In most cases this will be "/usr". +$XDG_CONFIG_HOME is normally unset. Default path is "$HOME/.config". +$XDG_DATA_HOME is normally unset. Default path is "$HOME/.local/share". .SH SEE ALSO .PP @@ -40,5 +41,5 @@ rofi(1) .SH AUTHORS .PP -Qball Cow qball@gmpclient.org
+Qball Cow qball@gmpclient.org Rasmus Steinke rasi@xssn.at diff --git a/doc/rofi-theme.5 b/doc/rofi-theme.5 index a0fe869a..c0a229c5 100644 --- a/doc/rofi-theme.5 +++ b/doc/rofi-theme.5 @@ -1,7 +1,8 @@ -.TH ROFI\-THEME 5 rofi\-theme +.nh +.TH ROFI-THEME 5 rofi-theme .SH NAME .PP -\fBrofi\-theme\fP \- Rofi theme format files +\fBrofi-theme\fP - Rofi theme format files .SH GETTING STARTED WITH THEMING .PP @@ -10,7 +11,7 @@ The easiest way to get started theming rofi is by modifying your existing theme. .PP Themes can be modified/tweaked by adding theming elements to the end of the .br -config file. The default location of this file is \fB\fC\~/.config/rofi/config.rasi\fR, +config file. The default location of this file is \fB\fC~/.config/rofi/config.rasi\fR, if the file does not exists, you can create it. .PP @@ -22,10 +23,10 @@ A basic config: .nf configuration { modes: [ combi ]; - combi\-modes: [ window, drun, run ]; + combi-modes: [ window, drun, run ]; } -@theme "gruvbox\-light" +@theme "gruvbox-light" /* Insert theme modifications after this */ @@ -78,7 +79,7 @@ increase the size. First we start by modifying the \fB\fCelement\fR widget: element { orientation: horizontal; - children: [ element\-text, element\-icon ]; + children: [ element-text, element-icon ]; spacing: 5px; } @@ -105,19 +106,19 @@ Resulting in the following packing: .PP The \fB\fCelement\fR (container) widget hold each entry in the \fB\fClistview\fR, we add the -two pre\-defined children in the order we want to show. We also specify the +two pre-defined children in the order we want to show. We also specify the packing direction (\fB\fCorientation\fR) and the spacing between the children (\fB\fCspacing\fR). We specify the space between the two children in absolute pixels (\fB\fCpx\fR). .PP -To increase the icon\-size, we need to modify the \fB\fCelement\-icon\fR widget. +To increase the icon-size, we need to modify the \fB\fCelement-icon\fR widget. .PP .RS .nf -element\-icon { +element-icon { size: 2.5em; } @@ -145,23 +146,23 @@ In this example we specify the size in the em \[la]https://www.w3.org/Style/LieBos3e/em\[ra] unit. .PP -Now lets change the text color of both the \fB\fCentry\fR and the \fB\fCelement\-text\fR widget to red and background to blue. +Now lets change the text color of both the \fB\fCentry\fR and the \fB\fCelement-text\fR widget to red and background to blue. .PP .RS .nf -entry, element\-text { - text\-color: red; - background\-color: rgb(0,0,255); +entry, element-text { + text-color: red; + background-color: rgb(0,0,255); } .fi .RE .PP -Here we use two different methods of writing down the color, for \fB\fCtext\-color\fR -we used a named color, for \fB\fCbackground\-color\fR we specify it in \fB\fCrgb\fR\&. +Here we use two different methods of writing down the color, for \fB\fCtext-color\fR +we used a named color, for \fB\fCbackground-color\fR we specify it in \fB\fCrgb\fR\&. We also specify the property for multiple widgets by passing a comma separated list of widget names. @@ -172,8 +173,8 @@ If you want to center the text relative to the icon, we can set this: .RS .nf -element\-text { - vertical\-align: 0.5; +element-text { + vertical-align: 0.5; } .fi @@ -187,7 +188,7 @@ element\-text { │ element │ │ ┌─────────────────────────────────────────────┐ ┌─────────────────┐ │ │ │ │ │ element │ │ -│ │element\-text │ │ ─ │ │ +│ │element-text │ │ ─ │ │ │ │ │ │ icon │ │ │ └─────────────────────────────────────────────┘ └─────────────────┘ │ └─────────────────────────────────────────────────────────────────────┘ @@ -202,7 +203,7 @@ If you want to see the complete theme, including the modification you can run: .RS .nf -rofi \-dump\-theme +rofi -dump-theme .fi .RE @@ -240,7 +241,7 @@ To see the default theme, run the following command: .RS .nf -rofi \-no\-config \-dump\-theme +rofi -no-config -dump-theme .fi .RE @@ -250,12 +251,12 @@ rofi \-no\-config \-dump\-theme The need for a new theme format was motivated by the fact that the way rofi handled widgets has changed. From a very static drawing of lines and text to a nice structured form of packing widgets. This change made it possible to provide a more flexible theme framework. The old theme format and config file are not flexible enough to expose these options in a -user\-friendly way. Therefore, a new file format has been created, replacing the old one. +user-friendly way. Therefore, a new file format has been created, replacing the old one. .SH FORMAT SPECIFICATION .SH Encoding .PP -The encoding of the file is UTF\-8. Both unix (\fB\fC\\n\fR) and windows (\fB\fC\\r\\n\fR) newlines format are supported. But unix is +The encoding of the file is UTF-8. Both unix (\fB\fC\\n\fR) and windows (\fB\fC\\r\\n\fR) newlines format are supported. But unix is preferred. .SH Comments @@ -337,7 +338,7 @@ abbreviation for \fBr\fPofi \fBa\fPdvanced \fBs\fPtyle \fBi\fPnformation. .SH Basic Structure .PP Each element has a section with defined properties. Global properties can be defined in section \fB\fC* { }\fR\&. -Sub\-section names begin with an optional hash symbol \fB\fC#\fR\&. +Sub-section names begin with an optional hash symbol \fB\fC#\fR\&. .PP It is advised to define the \fIglobal properties section\fP on top of the file to @@ -386,7 +387,7 @@ A theme can have multiple element theme sections. .PP The element path can consist of multiple names separated by whitespace or dots. -Each element may contain any number of letters, numbers and \fB\fC\-\fR\&'s. +Each element may contain any number of letters, numbers and \fB\fC-\fR\&'s. The first element in the element path can optionally start with a \fB\fC#\fR (for historic reasons). Multiple elements can be specified by a \fB\fC,\fR\&. @@ -398,10 +399,10 @@ This is a valid element name: .nf element normal.normal { - background\-color: blue; + background-color: blue; } button { - background\-color: blue; + background-color: blue; } .fi @@ -415,7 +416,7 @@ And is identical to: .nf element normal normal, button { - background\-color: blue; + background-color: blue; } .fi @@ -482,7 +483,7 @@ Both fields are mandatory for a property. .PP The \fB\fCidentifier\fR names the specified property. Identifiers can consist of any -combination of numbers, letters and '\-'. It must not contain any whitespace. +combination of numbers, letters and '-'. It must not contain any whitespace. The structure of the \fB\fCvalue\fR defines the type of the property. The current parser does not define or enforce a certain type of a particular \fB\fCidentifier\fR\&. When used, values with the wrong type that cannot be converted are ignored. @@ -558,7 +559,7 @@ font: "Awasome 12"; .RE .PP -The string must be valid UTF\-8, special characters can be escaped: +The string must be valid UTF-8, special characters can be escaped: .PP .RS @@ -577,7 +578,7 @@ The following special characters can be escaped: \fB\fC\\b\fR, \fB\fC\\f\fR, \fB .SH Integer .RS .IP \(bu 2 -Format: \fB\fC[\-+]?[:digit:]+\fR +Format: \fB\fC[-+]?[:digit:]+\fR .RE @@ -599,7 +600,7 @@ lines: 12; .SH Real .RS .IP \(bu 2 -Format: \fB\fC[\-+]?[:digit:]+(\\.[:digit:]+)?\fR +Format: \fB\fC[-+]?[:digit:]+(\\.[:digit:]+)?\fR .RE @@ -619,7 +620,7 @@ real: 3.4; .RE .PP -The following is not valid: \fB\fC\&.3\fR, \fB\fC3.\fR or scientific notation: \fB\fC3.4e\-3\fR\&. +The following is not valid: \fB\fC\&.3\fR, \fB\fC3.\fR or scientific notation: \fB\fC3.4e-3\fR\&. .SH Boolean .RS @@ -629,7 +630,7 @@ Format: \fB\fC(true|false)\fR .RE .PP -Boolean value is either \fB\fCtrue\fR or \fB\fCfalse\fR\&. This is case\-\&sensitive. +Boolean value is either \fB\fCtrue\fR or \fB\fCfalse\fR\&. This is case-sensitive. .PP For example: @@ -645,7 +646,7 @@ dynamic: false; .SH Image .PP -\fBrofi\fP support a limited set of background\-image formats. +\fBrofi\fP support a limited set of background-image formats. .RS .IP \(bu 2 @@ -654,12 +655,12 @@ Format: url("path to image"); Format: url("path to image", scale); where scale is: none, both, width, height .IP \(bu 2 -Format: linear\-gradient(stop color,stop1, color, stop2 color, ...); +Format: linear-gradient(stop color,stop1, color, stop2 color, ...); .IP \(bu 2 -Format: linear\-gradient(to direction, stop color,stop1, color, stop2 color, ...); +Format: linear-gradient(to direction, stop color,stop1, color, stop2 color, ...); where direction is: top,left,right,bottom. .IP \(bu 2 -Format: linear\-gradient(angle, stop color,stop1, color, stop2 color, ...); +Format: linear-gradient(angle, stop color,stop1, color, stop2 color, ...); Angle in deg,rad,grad (as used in color). .RE @@ -691,31 +692,27 @@ Format: \fB\fChwb[a]( {ANGLE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE}])\fR .IP \(bu 2 Format: \fB\fCcmyk( {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE} ])\fR .IP \(bu 2 -Format: \fB\fC{named\-color} [ / {PERCENTAGE} ]\fR +Format: \fB\fC{named-color} [ / {PERCENTAGE} ]\fR .RE .PP -The white\-space format proposed in CSS4 is also supported. +The white-space format proposed in CSS4 is also supported. .PP The different values are: .RS .IP \(bu 2 -\fB\fC{HEX}\fR is a hexadecimal number ('0\-9a\-f' case insensitive). +\fB\fC{HEX}\fR is a hexadecimal number ('0-9a-f' case insensitive). .IP \(bu 2 -\fB\fC{INTEGER}\fR value can be between 0 and 255 or 0\-100 when representing percentage. +\fB\fC{INTEGER}\fR value can be between 0 and 255 or 0-100 when representing percentage. .IP \(bu 2 \fB\fC{ANGLE}\fR is the angle on the color wheel, can be in \fB\fCdeg\fR, \fB\fCrad\fR, \fB\fCgrad\fR or \fB\fCturn\fR\&. When no unit is specified, degrees is assumed. .IP \(bu 2 -\fB\fC{PERCENTAGE}\fR can be between 0\-1.0, or 0%\-100% +\fB\fC{PERCENTAGE}\fR can be between 0-1.0, or 0%-100% .IP \(bu 2 - -.PP -\fB\fC{named\-color}\fR is one of the following colors: -.PP -AliceBlue, AntiqueWhite, Aqua, Aquamarine, Azure, Beige, Bisque, Black, BlanchedAlmond, Blue, BlueViolet, Brown, +\fB\fC{named-color}\fR is one of the following colors:AliceBlue, AntiqueWhite, Aqua, Aquamarine, Azure, Beige, Bisque, Black, BlanchedAlmond, Blue, BlueViolet, Brown, BurlyWood, CadetBlue, Chartreuse, Chocolate, Coral, CornflowerBlue, Cornsilk, Crimson, Cyan, DarkBlue, DarkCyan, DarkGoldenRod, DarkGray, DarkGrey, DarkGreen, DarkKhaki, DarkMagenta, DarkOliveGreen, DarkOrange, DarkOrchid, DarkRed, DarkSalmon, DarkSeaGreen, DarkSlateBlue, DarkSlateGray, DarkSlateGrey, DarkTurquoise, DarkViolet, DeepPink, DeepSkyBlue, @@ -739,9 +736,9 @@ For example: .RS .nf -background\-color: #FF0000; -border\-color: rgba(0,0,1, 0.5); -text\-color: SeaGreen; +background-color: #FF0000; +border-color: rgba(0,0,1, 0.5); +text-color: SeaGreen; .fi .RE @@ -753,8 +750,8 @@ or .RS .nf -background\-color: transparent; -text\-color: Black; +background-color: transparent; +text-color: Black; .fi .RE @@ -795,7 +792,7 @@ The following options are available on pango 1.50.0 and up: .PP The following option is disabled as pango crashes on this if there is eel - upsizing or wrapping. This will be re\-enabled once fixed: + upsizing or wrapping. This will be re-enabled once fixed: .RS .IP \(bu 2 @@ -863,7 +860,7 @@ For example: .RE .PP -On a full\-HD (1920x1080) monitor, it defines a padding of 192 pixels on the left +On a full-HD (1920x1080) monitor, it defines a padding of 192 pixels on the left and right side and 108 pixels on the top and bottom. .SS Calculating sizes @@ -874,7 +871,7 @@ Rofi supports some maths in calculating sizes. For this it uses the CSS syntax: .RS .nf -width: calc( 100% \- 37px ); +width: calc( 100% - 37px ); .fi .RE @@ -895,7 +892,7 @@ It supports the following operations: .IP \(bu 2 \fB\fC+\fR : Add .IP \(bu 2 -\fB\fC\-\fR : Subtract +\fB\fC-\fR : Subtract .IP \(bu 2 \fB\fC/\fR : Divide .IP \(bu 2 @@ -943,9 +940,9 @@ The different number of fields in the formats are parsed like: .IP \(bu 2 1 field: \fB\fCall\fR .IP \(bu 2 -2 fields: \fB\fCtop\&bottom\fR \fB\fCleft\&right\fR +2 fields: \fB\fCtop&bottom\fR \fB\fCleft&right\fR .IP \(bu 2 -3 fields: \fB\fCtop\fR, \fB\fCleft\&right\fR, \fB\fCbottom\fR +3 fields: \fB\fCtop\fR, \fB\fCleft&right\fR, \fB\fCbottom\fR .IP \(bu 2 4 fields: \fB\fCtop\fR, \fB\fCright\fR, \fB\fCbottom\fR, \fB\fCleft\fR @@ -983,6 +980,7 @@ style property. .PP When no unit is specified, pixels are assumed. + .RE .SH Position @@ -1120,7 +1118,7 @@ Format: \fB\fC[ keyword, keyword ]\fR .RE .PP -A list starts with a '[' and ends with a ']'. The entries in the list are comma\-separated. +A list starts with a '[' and ends with a ']'. The entries in the list are comma-separated. The \fB\fCkeyword\fR in the list refers to an widget name. .SH List of values @@ -1131,7 +1129,7 @@ Format: \fB\fC[ value, value, ... ]\fR .RE .PP -An list starts with a '[' and ends with a ']'. The entries in the list are comma\-separated. +An list starts with a '[' and ends with a ']'. The entries in the list are comma-separated. .SH Environment variable .RS @@ -1142,14 +1140,14 @@ Format: \fB\fC${:alnum:}\fR .PP This will parse the environment variable as the property value. (that then can be any of the above types). -The environment variable should be an alphanumeric string without white\-space. +The environment variable should be an alphanumeric string without white-space. .PP .RS .nf * { - background\-color: ${BG}; + background-color: ${BG}; } .fi @@ -1163,7 +1161,7 @@ Format: \fB\fCenv(ENVIRONMENT, default)\fR .PP This will parse the environment variable as the property value. (that then can be any of the above types). -The environment variable should be an alphanumeric string without white\-space. +The environment variable should be an alphanumeric string without white-space. If the environment value is not found, the default value is used. .PP @@ -1195,7 +1193,7 @@ Inherits the property from its parent widget. .nf mainbox { - border\-color: inherit; + border-color: inherit; } .fi @@ -1247,7 +1245,6 @@ The current widgets available in \fBrofi\fP: .RS .IP \(bu 2 \fB\fCwindow\fR - .RS .IP \(bu 2 \fB\fCoverlay\fR: the overlay widget. @@ -1255,65 +1252,66 @@ The current widgets available in \fBrofi\fP: \fB\fCmainbox\fR: The mainbox box. .IP \(bu 2 \fB\fCinputbar\fR: The input bar box. - .RS .IP \(bu 2 \fB\fCbox\fR: the horizontal @box packing the widgets .IP \(bu 2 -\fB\fCcase\-indicator\fR: the case/sort indicator @textbox +\fB\fCcase-indicator\fR: the case/sort indicator @textbox .IP \(bu 2 \fB\fCprompt\fR: the prompt @textbox .IP \(bu 2 \fB\fCentry\fR: the main entry @textbox .IP \(bu 2 -\fB\fCnum\-rows\fR: Shows the total number of rows. +\fB\fCnum-rows\fR: Shows the total number of rows. .IP \(bu 2 -\fB\fCnum\-filtered\-rows\fR: Shows the total number of rows after filtering. +\fB\fCnum-filtered-rows\fR: Shows the total number of rows after filtering. .IP \(bu 2 -\fB\fCtextbox\-current\-entry\fR: Shows the text of the currently selected entry. +\fB\fCtextbox-current-entry\fR: Shows the text of the currently selected entry. .IP \(bu 2 -\fB\fCicon\-current\-entry\fR: Shows the icon of the currently selected entry. +\fB\fCicon-current-entry\fR: Shows the icon of the currently selected entry. .RE + .IP \(bu 2 \fB\fClistview\fR: The listview. - .RS .IP \(bu 2 \fB\fCscrollbar\fR: the listview scrollbar .IP \(bu 2 \fB\fCelement\fR: a box in the listview holding the entries - .RS .IP \(bu 2 -\fB\fCelement\-icon\fR: the widget in the listview's entry showing the (optional) icon +\fB\fCelement-icon\fR: the widget in the listview's entry showing the (optional) icon .IP \(bu 2 -\fB\fCelement\-index\fR: the widget in the listview's entry keybindable index (1,2,3..0) +\fB\fCelement-index\fR: the widget in the listview's entry keybindable index (1,2,3..0) .IP \(bu 2 -\fB\fCelement\-text\fR: the widget in the listview's entry showing the text. +\fB\fCelement-text\fR: the widget in the listview's entry showing the text. .RE -.RE -.IP \(bu 2 -\fB\fCmode\-switcher\fR: the main horizontal @box packing the buttons. +.RE + +.IP \(bu 2 +\fB\fCmode-switcher\fR: the main horizontal @box packing the buttons. .RS .IP \(bu 2 \fB\fCbutton\fR: the buttons @textbox for each mode .RE + .IP \(bu 2 \fB\fCmessage\fR: The container holding the textbox. - .RS .IP \(bu 2 \fB\fCtextbox\fR: the message textbox .RE + .RE + .RE .PP @@ -1367,8 +1365,8 @@ Example: .nf nametotextbox selected.active { - background\-color: #003642; - text\-color: #008ed4; + background-color: #003642; + text-color: #008ed4; } .fi @@ -1401,16 +1399,16 @@ Margin on the outside of the widget \fBborder\fP: border Border around the widget (between padding and margin)/ .IP \(bu 2 -\fBborder\-radius\fP: padding +\fBborder-radius\fP: padding Sets a radius on the corners of the borders. .IP \(bu 2 -\fBbackground\-color\fP: color +\fBbackground-color\fP: color Background color .IP \(bu 2 -\fBbackground\-image\fP: image +\fBbackground-image\fP: image Background image .IP \(bu 2 -\fBborder\-color\fP: color +\fBborder-color\fP: color Color of the border .IP \(bu 2 \fBcursor\fP: cursor @@ -1421,47 +1419,31 @@ Type of mouse cursor that is set when the mouse pointer is hovered over the widg .SS window: .RS .IP \(bu 2 - -.PP \fBfont\fP: string The font used in the window .IP \(bu 2 - -.PP \fBtransparency\fP: string Indicating if transparency should be used and what type: -\fBreal\fP \- True transparency. Only works with a compositor. -\fBbackground\fP \- Take a screenshot of the background image and use that. -\fBscreenshot\fP \- Take a screenshot of the screen and use that. -\fBPath\fP to png file \- Use an image. +\fBreal\fP - True transparency. Only works with a compositor. +\fBbackground\fP - Take a screenshot of the background image and use that. +\fBscreenshot\fP - Take a screenshot of the screen and use that. +\fBPath\fP to png file - Use an image. .IP \(bu 2 - -.PP \fBlocation\fP: position The place of the anchor on the monitor .IP \(bu 2 - -.PP \fBanchor\fP: anchor The anchor position on the window .IP \(bu 2 - -.PP \fBfullscreen\fP: boolean Window is fullscreen. .IP \(bu 2 - -.PP \fBwidth\fP: distance The width of the window .IP \(bu 2 - -.PP -\fBx\-offset\fP: distance +\fBx-offset\fP: distance .IP \(bu 2 - -.PP -\fBy\-offset\fP: distance +\fBy-offset\fP: distance The offset of the window to the anchor point, allowing you to push the window left/right/up/down .RE @@ -1469,13 +1451,13 @@ The offset of the window to the anchor point, allowing you to push the window le .SS scrollbar: .RS .IP \(bu 2 -\fBbackground\-color\fP: color +\fBbackground-color\fP: color .IP \(bu 2 -\fBhandle\-width\fP: distance +\fBhandle-width\fP: distance .IP \(bu 2 -\fBhandle\-color\fP: color +\fBhandle-color\fP: color .IP \(bu 2 -\fBborder\-color\fP: color +\fBborder-color\fP: color .RE @@ -1493,25 +1475,25 @@ The offset of the window to the anchor point, allowing you to push the window le .SS textbox: .RS .IP \(bu 2 -\fBbackground\-color\fP: color +\fBbackground-color\fP: color .IP \(bu 2 -\fBborder\-color\fP: the color used for the border around the widget. +\fBborder-color\fP: the color used for the border around the widget. .IP \(bu 2 \fBfont\fP: the font used by this textbox (string). .IP \(bu 2 \fBstr\fP/\fBcontent\fP: the string to display by this textbox (string). .IP \(bu 2 -\fBvertical\-align\fP: Vertical alignment of the text. A number between 0 (top) and 1 (bottom). +\fBvertical-align\fP: Vertical alignment of the text. A number between 0 (top) and 1 (bottom). .IP \(bu 2 -\fBhorizontal\-align\fP: Horizontal alignment of the text. A number between 0 (left) and 1 (right). +\fBhorizontal-align\fP: Horizontal alignment of the text. A number between 0 (left) and 1 (right). .IP \(bu 2 -\fBtext\-color\fP: the text color to use. +\fBtext-color\fP: the text color to use. .IP \(bu 2 -\fBtext\-transform\fP: text style {color} for the whole text. +\fBtext-transform\fP: text style {color} for the whole text. .IP \(bu 2 \fBhighlight\fP: text style {color}. color is optional, multiple highlight styles can be added like: bold underline italic #000000; -This option is only available on the \fB\fCelement\-text\fR widget. +This option is only available on the \fB\fCelement-text\fR widget. .IP \(bu 2 \fBwidth\fP: override the desired width for the textbox. .IP \(bu 2 @@ -1519,15 +1501,15 @@ This option is only available on the \fB\fCelement\-text\fR widget. .IP \(bu 2 \fBplaceholder\fP: Set the displayed text (String) when nothing is entered. .IP \(bu 2 -\fBplaceholder\-markup\fP: If true, placeholder text supports pango markup for stylizing. +\fBplaceholder-markup\fP: If true, placeholder text supports pango markup for stylizing. .IP \(bu 2 -\fBplaceholder\-color\fP: Color of the placeholder text. +\fBplaceholder-color\fP: Color of the placeholder text. .IP \(bu 2 \fBblink\fP: Enable/Disable blinking on an input textbox (Boolean). .IP \(bu 2 \fBmarkup\fP: Force markup on, beware that only valid pango markup strings are shown. .IP \(bu 2 -\fBtab\-stops\fP: array of distances +\fBtab-stops\fP: array of distances Set the location of tab stops by their distance from the beginning of the line. Each distance should be greater than the previous one. The text appears to the right of the tab stop position (other alignments are not supported yet). @@ -1540,7 +1522,7 @@ The text appears to the right of the tab stop position (other alignments are not \fBcolumns\fP: integer Number of columns to show (at least 1) .IP \(bu 2 -\fBfixed\-height\fP: boolean +\fBfixed-height\fP: boolean Always show \fB\fClines\fR rows, even if fewer elements are available. .IP \(bu 2 \fBdynamic\fP: boolean @@ -1549,7 +1531,7 @@ Always show \fB\fClines\fR rows, even if fewer elements are available. \fBscrollbar\fP: boolean If the scrollbar should be enabled/disabled. .IP \(bu 2 -\fBscrollbar\-width\fP: distance +\fBscrollbar-width\fP: distance Width of the scrollbar .IP \(bu 2 \fBcycle\fP: boolean @@ -1570,23 +1552,23 @@ Reverse the ordering (top down to bottom up). \fBflow\fP: orientation The order the elements are layed out. Vertical is the original 'column' view. .IP \(bu 2 -\fBfixed\-columns\fP: boolean +\fBfixed-columns\fP: boolean Do not reduce the number of columns shown when number of visible elements is not enough to fill them all. .IP \(bu 2 -\fBrequire\-input\fP: boolean +\fBrequire-input\fP: boolean Listview requires user input to show up. .RE .PP -Each element is a \fB\fCbox\fR called \fB\fCelement\fR\&. Each \fB\fCelement\fR can contain an \fB\fCelement\-icon\fR and \fB\fCelement\-text\fR\&. +Each element is a \fB\fCbox\fR called \fB\fCelement\fR\&. Each \fB\fCelement\fR can contain an \fB\fCelement-icon\fR and \fB\fCelement-text\fR\&. .SS listview text highlight: .PP -The \fB\fCelement\-text\fR widget in the \fB\fClistview\fR is the one used to show the text. +The \fB\fCelement-text\fR widget in the \fB\fClistview\fR is the one used to show the text. On this widget set the \fB\fChighlight\fR property (only place this property is used) to change the style of highlighting. -The \fB\fChighlight\fR property consist of the \fB\fCtext\-style\fR property and a color. +The \fB\fChighlight\fR property consist of the \fB\fCtext-style\fR property and a color. .PP To disable highlighting: @@ -1595,7 +1577,7 @@ To disable highlighting: .RS .nf - element\-text { + element-text { highlight: None; } @@ -1609,7 +1591,7 @@ To set to red underlined: .RS .nf - element\-text { + element-text { highlight: underline red; } @@ -1682,11 +1664,11 @@ The current layout of \fBrofi\fP is structured as follows: .RS .IP \(bu 2 -ci is the case\-indicator +ci is the case-indicator .IP \(bu 2 -fr is the num\-filtered\-rows +fr is the num-filtered-rows .IP \(bu 2 -ns is the num\-rows +ns is the num-rows .RE @@ -1726,17 +1708,17 @@ entry .IP \(bu 2 overlay .IP \(bu 2 -case\-indicator +case-indicator .IP \(bu 2 message .IP \(bu 2 listview .IP \(bu 2 -mode\-switcher +mode-switcher .IP \(bu 2 -num\-rows +num-rows .IP \(bu 2 -num\-filtered\-rows +num-filtered-rows .RE @@ -1747,10 +1729,10 @@ These are used in the default theme as depicted in the figure above. .RS .IP \(bu 2 mainbox -Packs: \fB\fCinputbar, message, listview, mode\-switcher\fR +Packs: \fB\fCinputbar, message, listview, mode-switcher\fR .IP \(bu 2 inputbar -Packs: \fB\fCprompt,entry,case\-indicator\fR +Packs: \fB\fCprompt,entry,case-indicator\fR .RE @@ -1762,7 +1744,7 @@ There are several special widgets that can be used by prefixing the name of the .SS textbox .PP -This is a read\-only textbox widget. The displayed string can be set with \fB\fCcontent\fR\&. +This is a read-only textbox widget. The displayed string can be set with \fB\fCcontent\fR\&. .PP Example: @@ -1771,7 +1753,7 @@ Example: .RS .nf -textbox\-custom { +textbox-custom { expand: false; content: "My Message"; } @@ -1783,7 +1765,7 @@ textbox\-custom { .PP This is an icon widget. The displayed icon can be set with \fB\fCfilename\fR and size with \fB\fCsize\fR\&. If the property \fB\fCaction\fR is set, it acts as a button. -\fB\fCaction\fR can be set to a keybinding name and completes that action. (see rofi \-show keys for a list). +\fB\fCaction\fR can be set to a keybinding name and completes that action. (see rofi -show keys for a list). .PP If the \fB\fCsquared\fR property is set to \fBfalse\fP the widget height and width are not forced to be equal. @@ -1795,12 +1777,12 @@ Example: .RS .nf -icon\-paste { +icon-paste { expand: false; - filename: "gtk\-paste"; + filename: "gtk-paste"; size: 24; - vertical\-align: 0.5; - action: "kb\-primary\-paste"; + vertical-align: 0.5; + action: "kb-primary-paste"; } .fi @@ -1810,17 +1792,17 @@ icon\-paste { .PP This is a textbox widget that can have a 'clickable' action. The \fB\fCaction\fR can be set to: -\fB\fCkeybinding\fR: accepts a keybinding name and completes that action. (see rofi \-show keys for a list). +\fB\fCkeybinding\fR: accepts a keybinding name and completes that action. (see rofi -show keys for a list). .PP .RS .nf -button\-paste { +button-paste { expand: false; content: "My Clickable Message"; - vertical\-align: 0.5; - action: "kb\-primary\-paste"; + vertical-align: 0.5; + action: "kb-primary-paste"; } .fi @@ -1836,7 +1818,7 @@ property (this always happens on the \fB\fCbox\fR child, see example below): .nf inputbar { - children: [prompt,entry,overlay,case\-indicator]; + children: [prompt,entry,overlay,case-indicator]; } .fi @@ -1853,9 +1835,9 @@ Below is an example of a theme emulating dmenu: .nf * { - background\-color: Black; - text\-color: White; - border\-color: White; + background-color: Black; + text-color: White; + border-color: White; font: "Times New Roman 12"; } @@ -1887,7 +1869,7 @@ element { padding: 0px 2px; } element selected { - background\-color: SteelBlue; + background-color: SteelBlue; } .fi @@ -1922,15 +1904,15 @@ Explanation of the different parts: .RS .IP \(bu 2 -Content \- The content of the widget. +Content - The content of the widget. .IP \(bu 2 -Padding \- Clears an area around the widget. +Padding - Clears an area around the widget. The padding shows the background color of the widget. .IP \(bu 2 -Border \- A border that goes around the padding and content. -The border use the border\-color of the widget. +Border - A border that goes around the padding and content. +The border use the border-color of the widget. .IP \(bu 2 -Margin \- Clears an area outside the border. +Margin - Clears an area outside the border. The margin is transparent. .RE @@ -1998,7 +1980,7 @@ To get debug information from the parser, run rofi like: .RS .nf -G\_MESSAGES\_DEBUG=Parser rofi \-show run +G_MESSAGES_DEBUG=Parser rofi -show run .fi .RE @@ -2013,19 +1995,19 @@ To see the elements queried during running, run: .RS .nf -G\_MESSAGES\_DEBUG=Theme rofi \-show run +G_MESSAGES_DEBUG=Theme rofi -show run .fi .RE .PP -To test minor changes, part of the theme can be passed on the command line, for example to set it to full\-screen: +To test minor changes, part of the theme can be passed on the command line, for example to set it to full-screen: .PP .RS .nf -rofi \-theme\-str 'window { fullscreen:true;}' \-show run +rofi -theme-str 'window { fullscreen:true;}' -show run .fi .RE @@ -2037,7 +2019,7 @@ Another syntax to modify theme properties is: .RS .nf -rofi \-theme+window+fullscreen true \-show run +rofi -theme+window+fullscreen true -show run .fi .RE @@ -2049,7 +2031,7 @@ To print the current theme, run: .RS .nf -rofi \-dump\-theme +rofi -dump-theme .fi .RE @@ -2062,7 +2044,7 @@ Parts of the theme can be conditionally loaded, like the CSS \fB\fC@media\fR opt .RS .nf -@media ( min\-width: 120 ) { +@media ( min-width: 120 ) { } @@ -2074,19 +2056,19 @@ It supports the following keys as constraint: .RS .IP \(bu 2 -\fB\fCmin\-width\fR: load when width is bigger or equal then value. +\fB\fCmin-width\fR: load when width is bigger or equal then value. .IP \(bu 2 -\fB\fCmax\-width\fR: load when width is smaller then value. +\fB\fCmax-width\fR: load when width is smaller then value. .IP \(bu 2 -\fB\fCmin\-height\fR: load when height is bigger or equal then value. +\fB\fCmin-height\fR: load when height is bigger or equal then value. .IP \(bu 2 -\fB\fCmax\-height\fR: load when height is smaller then value. +\fB\fCmax-height\fR: load when height is smaller then value. .IP \(bu 2 -\fB\fCmin\-aspect\-ratio\fR load when aspect ratio is over value. +\fB\fCmin-aspect-ratio\fR load when aspect ratio is over value. .IP \(bu 2 -\fB\fCmax\-aspect\-ratio\fR: load when aspect ratio is under value. +\fB\fCmax-aspect-ratio\fR: load when aspect ratio is under value. .IP \(bu 2 -\fB\fCmonitor\-id\fR: The monitor id, see rofi \-help for id's. +\fB\fCmonitor-id\fR: The monitor id, see rofi -help for id's. .IP \(bu 2 \fB\fCenabled\fR: Boolean option to enable. Supports environment variable. @@ -2099,7 +2081,7 @@ It supports the following keys as constraint: .RS .nf -@media ( min\-width: 120 px ) { +@media ( min-width: 120 px ) { } @@ -2110,7 +2092,7 @@ It supports the following keys as constraint: .RS .nf -@media ( enabled: env(DO\_LIGHT, false ) { +@media ( enabled: env(DO_LIGHT, false ) { } @@ -2153,7 +2135,7 @@ Rofi supports 3 ways of specifying an icon: .IP \(bu 2 Filename .IP \(bu 2 -icon\-name, this is looked up via the icon\-theme. +icon-name, this is looked up via the icon-theme. .IP \(bu 2 Markup String. It renders a string as an icon. @@ -2172,7 +2154,7 @@ Markup string: .RS .nf -echo \-en "testing\\0icon\\x1f" | ./rofi \-dmenu +echo -en "testing\\0icon\\x1f" | ./rofi -dmenu .fi .RE @@ -2184,7 +2166,7 @@ Getting supported icon formats: .RS .nf -G\_MESSAGES\_DEBUG=Helpers.IconFetcher rofi +G_MESSAGES_DEBUG=Helpers.IconFetcher rofi .fi .RE @@ -2227,11 +2209,11 @@ If a filename is provided, it will try to resolve it in the following order: .RS .IP \(bu 2 -\fB\fC${XDG\_CONFIG\_HOME}/rofi/themes/\fR +\fB\fC${XDG_CONFIG_HOME}/rofi/themes/\fR .IP \(bu 2 -\fB\fC${XDG\_CONFIG\_HOME}/rofi/\fR +\fB\fC${XDG_CONFIG_HOME}/rofi/\fR .IP \(bu 2 -\fB\fC${XDG\_DATA\_HOME}/rofi/themes/\fR +\fB\fC${XDG_DATA_HOME}/rofi/themes/\fR .IP \(bu 2 \fB\fC${INSTALL PREFIX}/share/rofi/themes/\fR @@ -2247,4 +2229,4 @@ Several examples are installed together with \fBrofi\fP\&. These can be found in .SH SEE ALSO .PP -rofi(1), rofi\-script(5), rofi\-theme\-selector(1) +rofi(1), rofi-script(5), rofi-theme-selector(1) diff --git a/doc/rofi.1 b/doc/rofi.1 index 3decbf1e..22e4a021 100644 --- a/doc/rofi.1 +++ b/doc/rofi.1 @@ -1,15 +1,16 @@ +.nh .TH ROFI 1 rofi .SH NAME .PP -\fBrofi\fP \- A window switcher, application launcher, ssh dialog, dmenu replacement and more +\fBrofi\fP - A window switcher, application launcher, ssh dialog, dmenu replacement and more .SH SYNOPSIS .PP -\fBrofi\fP [ \-show \fImode\fP ]|[ \-dmenu ]|[ \-e \fImsg\fP ] [ CONFIGURATION ] +\fBrofi\fP [ -show \fImode\fP ]|[ -dmenu ]|[ -e \fImsg\fP ] [ CONFIGURATION ] .SH DESCRIPTION .PP -\fBrofi\fP is an X11 pop\-up window switcher, run dialog, dmenu replacement, and +\fBrofi\fP is an X11 pop-up window switcher, run dialog, dmenu replacement, and more. It focuses on being fast to use and have minimal distraction. It supports keyboard and mouse navigation, type to filter, tokenized search and more. @@ -19,19 +20,19 @@ keyboard and mouse navigation, type to filter, tokenized search and more. quickly switch between windows, start applications or log into a remote machine via \fB\fCssh\fR\&. There are different \fImodes\fP for different types of actions. \fBrofi\fP is a standalone application and should not be integrated into scripts. For -integration into scripts it has a special mode that functions as a (drop\-in) +integration into scripts it has a special mode that functions as a (drop-in) replacement for \fBdmenu(1)\fP\&. See emulating dmenu below. .SS Running rofi .PP -To launch \fBrofi\fP directly in a certain mode, specify a mode with \fB\fCrofi \-show \fR\&. +To launch \fBrofi\fP directly in a certain mode, specify a mode with \fB\fCrofi -show \fR\&. To show the \fB\fCdrun\fR dialog: .PP .RS .nf - rofi \-show drun + rofi -show drun .fi .RE @@ -44,7 +45,7 @@ with \fB\fCwindow\fR mode: .RS .nf - rofi \-show combi \-modes combi \-combi\-modes "window,drun,run" + rofi -show combi -modes combi -combi-modes "window,drun,run" .fi .RE @@ -57,10 +58,10 @@ running firefox, or launch it when it is not running. .SS Emulating dmenu .PP \fBrofi\fP can emulate \fBdmenu(1)\fP (a dynamic menu for X11) when launched with -the \fB\fC\-dmenu\fR flag. +the \fB\fC-dmenu\fR flag. .PP -For more information see \fBrofi\-dmenu(5)\fP\&. +For more information see \fBrofi-dmenu(5)\fP\&. .SS Display Error message .PP @@ -70,7 +71,7 @@ For more information see \fBrofi\-dmenu(5)\fP\&. .RS .nf -rofi \-e "my message" +rofi -e "my message" .fi .RE @@ -85,23 +86,23 @@ There are currently three methods of setting configuration options (evaluated in .RS .IP \(bu 2 System configuration file (for example \fB\fC/etc/rofi.rasi\fR). -It first checks \fB\fCXDG\_CONFIG\_DIRS\fR, and then \fB\fCSYSCONFDIR\fR (that is passed at compile time). +It first checks \fB\fCXDG_CONFIG_DIRS\fR, and then \fB\fCSYSCONFDIR\fR (that is passed at compile time). It loads the first config file it finds, it does not merge multiple system configuration files. .IP \(bu 2 Rasi theme file: The new \fItheme\fP format can be used to set configuration values. .IP \(bu 2 -Command\-line options: Arguments passed to \fBrofi\fP\&. +Command-line options: Arguments passed to \fBrofi\fP\&. .RE .PP -To get a template config file, run: \fB\fCrofi \-dump\-config > config.rasi\fR +To get a template config file, run: \fB\fCrofi -dump-config > config.rasi\fR .PP This will contain (commented) all current configuration options, modified options are uncommented. .PP -To get a template config file that sets the icon\-theme run: \fB\fCrofi \-icon\-theme hicolor \-dump\-config\fR\&. +To get a template config file that sets the icon-theme run: \fB\fCrofi -icon-theme hicolor -dump-config\fR\&. .PP It is \fBstrongly\fP recommended to use this as a starting point for your configuration. @@ -121,8 +122,8 @@ configuration { .RE .PP -Most of the configuration options mentioned below (beside options like \fB\fC\-show\fR, -\fB\fC\-dump\-config\fR that apply to a single run) can be set here. +Most of the configuration options mentioned below (beside options like \fB\fC-show\fR, +\fB\fC-dump-config\fR that apply to a single run) can be set here. .PP For example to set the dpi value to 72: @@ -156,17 +157,17 @@ lists .RE .PP -For the syntax of these options, see the \fBrofi\-theme(5)\fP manpage. +For the syntax of these options, see the \fBrofi-theme(5)\fP manpage. .PP -For use on the command line, Boolean options have a non\-default command\-line +For use on the command line, Boolean options have a non-default command-line syntax. Example to enable option X: .PP .RS .nf -\-X +-X .fi .RE @@ -178,7 +179,7 @@ To disable option X: .RS .nf -\-no\-X +-no-X .fi .RE @@ -188,46 +189,46 @@ Below is a list of the most important options: .SS General .PP -\fB\fC\-help\fR +\fB\fC-help\fR .PP -The help option shows the full list of command\-line options and the current set -values. These include dynamic (run\-time generated) options. +The help option shows the full list of command-line options and the current set +values. These include dynamic (run-time generated) options. .PP -\fB\fC\-version\fR +\fB\fC-version\fR .PP Show the \fBrofi\fP version and exit. .PP -\fB\fC\-dump\-config\fR +\fB\fC-dump-config\fR .PP Dump the current active configuration, in rasi format, to stdout and exit. -Information about the rasi format can be found in the \fBrofi\-theme(5)\fP manpage. +Information about the rasi format can be found in the \fBrofi-theme(5)\fP manpage. .PP -\fB\fC\-dump\-theme\fR +\fB\fC-dump-theme\fR .PP Dump the current active theme, in rasi format, to stdout and exit. .PP -\fB\fC\-rasi\-validate\fR \fIfilename\fP +\fB\fC-rasi-validate\fR \fIfilename\fP .PP -Try to parse the file and return 0 when successful, non\-zero when failed. +Try to parse the file and return 0 when successful, non-zero when failed. .PP -\fB\fC\-list\-keybindings\fR +\fB\fC-list-keybindings\fR .PP List all known keybindings without trying to parse them. This can be used to look for duplicate bindings. .PP -\fB\fC\-threads\fR \fInum\fP +\fB\fC-threads\fR \fInum\fP .PP Specify the number of threads \fBrofi\fP should use: @@ -238,33 +239,29 @@ Specify the number of threads \fBrofi\fP should use: .IP \(bu 2 1: Disable threading .IP \(bu 2 - -.PP -2..n: Specify the maximum number of threads to use in the thread pool. -.PP -Default: Autodetect +2..n: Specify the maximum number of threads to use in the thread pool.Default: Autodetect .RE .PP -\fB\fC\-display\fR \fIdisplay\fP +\fB\fC-display\fR \fIdisplay\fP .PP The X server to contact. Default is \fB\fC$DISPLAY\fR\&. .PP -\fB\fC\-dmenu\fR +\fB\fC-dmenu\fR .PP Run \fBrofi\fP in dmenu mode. This allows for interactive scripts. In \fB\fCdmenu\fR mode, \fBrofi\fP reads from STDIN, and output to STDOUT. -A simple example, displaying three pre\-defined options: +A simple example, displaying three pre-defined options: .PP .RS .nf -echo \-e "Option #1\\nOption #2\\nOption #3" | rofi \-dmenu +echo -e "Option #1\\nOption #2\\nOption #3" | rofi -dmenu .fi .RE @@ -276,43 +273,43 @@ Or get the options from a script: .RS .nf -\~/my\_script.sh | rofi \-dmenu +~/my_script.sh | rofi -dmenu .fi .RE .PP -See the \fBrofi\-dmenu(5)\fP manpage for more information. +See the \fBrofi-dmenu(5)\fP manpage for more information. .PP -\fB\fC\-show\fR \fImode\fP +\fB\fC-show\fR \fImode\fP .PP Open \fBrofi\fP in a certain mode. Available modes are \fB\fCwindow\fR, \fB\fCrun\fR, \fB\fCdrun\fR, \fB\fCssh\fR, \fB\fCcombi\fR\&. The special argument \fB\fCkeys\fR can be used to open a searchable list of supported key bindings -(see the \fBrofi\-keys(5)\fP manpage) +(see the \fBrofi-keys(5)\fP manpage) .PP -To show the run\-dialog: +To show the run-dialog: .PP .RS .nf -rofi \-show run +rofi -show run .fi .RE .PP -If \fB\fC\-show\fR is the last option passed to rofi, the first enabled modes is shown. +If \fB\fC-show\fR is the last option passed to rofi, the first enabled modes is shown. .PP -\fB\fC\-modes\fR \fImode1,mode2\fP +\fB\fC-modes\fR \fImode1,mode2\fP .PP -Specify an ordered, comma\-separated list of modes to enable. +Specify an ordered, comma-separated list of modes to enable. Enabled modes can be changed at runtime. Default key is \fB\fCCtrl+Tab\fR\&. If no modes are specified, all configured modes will be enabled. To only show the \fB\fCrun\fR and \fB\fCssh\fR launcher: @@ -321,7 +318,7 @@ To only show the \fB\fCrun\fR and \fB\fCssh\fR launcher: .RS .nf -rofi \-modes "run,ssh" \-show run +rofi -modes "run,ssh" -show run .fi .RE @@ -340,13 +337,13 @@ two parameters: .RE .PP -Example: Have a mode called 'Workspaces' using the \fB\fCi3\_switch\_workspaces.sh\fR script: +Example: Have a mode called 'Workspaces' using the \fB\fCi3_switch_workspaces.sh\fR script: .PP .RS .nf -rofi \-modes "window,run,ssh,Workspaces:i3\_switch\_workspaces.sh" \-show Workspaces +rofi -modes "window,run,ssh,Workspaces:i3_switch_workspaces.sh" -show Workspaces .fi .RE @@ -362,50 +359,50 @@ exec command. For that case, \fB\fC#\fR can be used as a separator. .RS .nf -rofi \-modes "My File Browser:fb.sh" \-show "My File Browser" +rofi -modes "My File Browser:fb.sh" -show "My File Browser" .fi .RE .PP -\fB\fC\-case\-sensitive\fR +\fB\fC-case-sensitive\fR .PP -Start in case\-sensitive mode. -This option can be changed at run\-time using the \fB\fC\-kb\-toggle\-case\-sensitivity\fR key binding. +Start in case-sensitive mode. +This option can be changed at run-time using the \fB\fC-kb-toggle-case-sensitivity\fR key binding. .PP -\fB\fC\-cycle\fR +\fB\fC-cycle\fR .PP Cycle through the result list. Default is 'true'. .PP -\fB\fC\-filter\fR \fIfilter\fP +\fB\fC-filter\fR \fIfilter\fP .PP Filter the list by setting text in input bar to \fIfilter\fP .PP -\fB\fC\-config\fR \fIfilename\fP +\fB\fC-config\fR \fIfilename\fP .PP Load an alternative configuration file. .PP -\fB\fC\-cache\-dir\fR \fIfilename\fP +\fB\fC-cache-dir\fR \fIfilename\fP .PP Directory that is used to place temporary files, like history. .PP -\fB\fC\-scroll\-method\fR \fImethod\fP +\fB\fC-scroll-method\fR \fImethod\fP .PP Select the scrolling method. 0: Per page, 1: continuous. .PP -\fB\fC\-normalize\-match\fR +\fB\fC-normalize-match\fR .PP Normalize the string before matching, so \fB\fCo\fR will match \fB\fCö\fR, and \fB\fCé\fR matches \fB\fCe\fR\&. @@ -413,31 +410,31 @@ Normalize the string before matching, so \fB\fCo\fR will match \fB\fCö\fR, and This is not a perfect implementation, but works. For now, it disables highlighting of the matched part. .PP -\fB\fC\-no\-lazy\-grab\fR +\fB\fC-no-lazy-grab\fR .PP Disables lazy grab, this forces the keyboard being grabbed before gui is shown. .PP -\fB\fC\-no\-plugins\fR +\fB\fC-no-plugins\fR .PP Disable plugin loading. .PP -\fB\fC\-plugin\-path\fR \fIdirectory\fP +\fB\fC-plugin-path\fR \fIdirectory\fP .PP Specify the directory where \fBrofi\fP should look for plugins. .PP -\fB\fC\-show\-icons\fR +\fB\fC-show-icons\fR .PP Show application icons in \fB\fCdrun\fR and \fB\fCwindow\fR modes. .PP -\fB\fC\-icon\-theme\fR +\fB\fC-icon-theme\fR .PP Specify icon theme to be used. @@ -445,25 +442,25 @@ If not specified default theme from DE is used, \fIAdwaita\fP and \fIgnome\fP th fallback themes. .PP -\fB\fC\-markup\fR +\fB\fC-markup\fR .PP Use Pango markup to format output wherever possible. .PP -\fB\fC\-normal\-window\fR +\fB\fC-normal-window\fR .PP Make \fBrofi\fP react like a normal application window. Useful for scripts like Clerk that are basically an application. .PP -\fB\fC\-[no\-]steal\-focus\fR +\fB\fC-[no-]steal-focus\fR .PP Make rofi steal focus on launch and restore close to window that held it when launched. .PP -\fB\fC\-refilter\-timeout\-limit\fR +\fB\fC-refilter-timeout-limit\fR .PP The time (in ms) boundary filter may take before switch from instant to delayed filter mode. @@ -480,7 +477,7 @@ A fallback icon can be specified for each mode: .nf configuration { { - fallback\-icon: ""; + fallback-icon: ""; } } @@ -496,7 +493,7 @@ Example .nf configuration { run,drun { - fallback\-icon: "application\-x\-addon"; + fallback-icon: "application-x-addon"; } } @@ -505,7 +502,7 @@ configuration { .SS Matching .PP -\fB\fC\-matching\fR \fImethod\fP +\fB\fC-matching\fR \fImethod\fP .PP Specify the matching algorithm used. @@ -532,19 +529,19 @@ Default: \fInormal\fP Note: glob matching might be slow for larger lists .PP -\fB\fC\-tokenize\fR +\fB\fC-tokenize\fR .PP Tokenize the input. .PP -\fB\fC\-drun\-categories\fR \fIcategory1\fP,\fIcategory2\fP +\fB\fC-drun-categories\fR \fIcategory1\fP,\fIcategory2\fP .PP Only show desktop files that are present in the listed categories. .PP -\fB\fC\-drun\-match\-fields\fR \fIfield1\fP,\fIfield2\fP,... +\fB\fC-drun-match-fields\fR \fIfield1\fP,\fIfield2\fP,... .PP When using \fB\fCdrun\fR, match only with the specified Desktop entry fields. @@ -562,16 +559,12 @@ The different fields are: .IP \(bu 2 \fBcomment\fP: the application comment .IP \(bu 2 - -.PP -\fBall\fP: all the above -.PP -Default: \fIname,generic,exec,categories,keywords\fP +\fBall\fP: all the aboveDefault: \fIname,generic,exec,categories,keywords\fP .RE .PP -\fB\fC\-drun\-display\-format\fR +\fB\fC-drun-display-format\fR .PP The format string for the \fB\fCdrun\fR dialog: @@ -603,10 +596,10 @@ Default: {name} [({generic})] .RE .PP -Note: Only fields enabled in \fB\fC\-drun\-match\-fields\fR can be used in the format string. +Note: Only fields enabled in \fB\fC-drun-match-fields\fR can be used in the format string. .PP -\fB\fC\-[no\-]drun\-show\-actions\fR +\fB\fC-[no-]drun-show-actions\fR .PP Show actions present in the Desktop files. @@ -621,7 +614,7 @@ Default: false .RE .PP -\fB\fC\-window\-match\-fields\fR \fIfield1\fP,\fIfield2\fP,... +\fB\fC-window-match-fields\fR \fIfield1\fP,\fIfield2\fP,... .PP When using window mode, match only with the specified fields. @@ -639,16 +632,12 @@ The different fields are: .IP \(bu 2 \fBdesktop\fP: window's current desktop .IP \(bu 2 - -.PP -\fBall\fP: all the above -.PP -Default: \fIall\fP +\fBall\fP: all the aboveDefault: \fIall\fP .RE .PP -\fB\fC\-matching\-negate\-char\fR \fIchar\fP +\fB\fC-matching-negate-char\fR \fIchar\fP .PP Set the character used to negate the query (i.e. if it does \fBnot\fP match the next keyword). @@ -658,7 +647,7 @@ Set to '\\x0' to disable. .RS .nf -Default: '\-' +Default: '-' .fi .RE @@ -668,16 +657,16 @@ Default: '\-' \fBIMPORTANT:\fP In newer \fBrofi\fP releases, all the theming options have been moved into the new theme format. They are no longer normal \fBrofi\fP options that can be passed directly on the command line (there are too many). - Small snippets can be passed on the command line: \fB\fCrofi \-theme\-str 'window {width: 50%;}'\fR to override a single + Small snippets can be passed on the command line: \fB\fCrofi -theme-str 'window {width: 50%;}'\fR to override a single setting. They are merged into the current theme. They can also be appended at the end of the \fBrofi\fP config file to override parts of the theme. .PP Most of the following options are \fBdeprecated\fP and should not be used. Please use the new theme format to customize -\fBrofi\fP\&. More information about the new format can be found in the \fBrofi\-theme(5)\fP manpage. +\fBrofi\fP\&. More information about the new format can be found in the \fBrofi-theme(5)\fP manpage. .PP -\fB\fC\-location\fR +\fB\fC-location\fR .PP Specify where the window should be located. The numbers map to the following locations on screen: @@ -697,68 +686,68 @@ Specify where the window should be located. The numbers map to the following loc Default: \fI0\fP .PP -\fB\fC\-fixed\-num\-lines\fR +\fB\fC-fixed-num-lines\fR .PP Keep a fixed number of visible lines. .PP -\fB\fC\-sidebar\-mode\fR +\fB\fC-sidebar-mode\fR .PP -Open in sidebar\-mode. In this mode, a list of all enabled modes is shown at the bottom. -(See \fB\fC\-modes\fR option) +Open in sidebar-mode. In this mode, a list of all enabled modes is shown at the bottom. +(See \fB\fC-modes\fR option) To show sidebar, use: .PP .RS .nf -rofi \-show run \-sidebar\-mode +rofi -show run -sidebar-mode .fi .RE .PP -\fB\fC\-hover\-select\fR +\fB\fC-hover-select\fR .PP Automatically select the entry the mouse is hovering over. This option is best combined with custom mouse bindings. -To utilize hover\-select and accept an entry in a single click, use: +To utilize hover-select and accept an entry in a single click, use: .PP .RS .nf -rofi \-show run \-hover\-select \-me\-select\-entry '' \-me\-accept\-entry MousePrimary +rofi -show run -hover-select -me-select-entry '' -me-accept-entry MousePrimary .fi .RE .PP -\fB\fC\-eh\fR \fInumber\fP +\fB\fC-eh\fR \fInumber\fP .PP Set row height (in chars) Default: \fI1\fP .PP -\fB\fC\-auto\-select\fR +\fB\fC-auto-select\fR .PP When one entry is left, automatically select it. .PP -\fB\fC\-m\fR \fInum\fP +\fB\fC-m\fR \fInum\fP .PP -\fB\fC\-m\fR \fIname\fP +\fB\fC-m\fR \fIname\fP .PP -\fB\fC\-monitor\fR \fInum\fP +\fB\fC-monitor\fR \fInum\fP .PP -\fB\fC\-monitor\fR \fIname\fP +\fB\fC-monitor\fR \fIname\fP .PP Select monitor to display \fBrofi\fP on. @@ -767,34 +756,30 @@ detection). Negative numbers are handled differently: .RS .IP \(bu 2 -\fB\-1\fP: the currently focused monitor. +\fB-1\fP: the currently focused monitor. .IP \(bu 2 -\fB\-2\fP: the currently focused window (that is, \fBrofi\fP will be displayed on top of the focused window). +\fB-2\fP: the currently focused window (that is, \fBrofi\fP will be displayed on top of the focused window). .IP \(bu 2 -\fB\-3\fP: Position of mouse (overrides the location setting to get normal context menu +\fB-3\fP: Position of mouse (overrides the location setting to get normal context menu behavior.) .IP \(bu 2 -\fB\-4\fP: the monitor with the focused window. +\fB-4\fP: the monitor with the focused window. .IP \(bu 2 - -.PP -\fB\-5\fP: the monitor that shows the mouse pointer. -.PP -Default: \fI\-5\fP +\fB-5\fP: the monitor that shows the mouse pointer.Default: \fI-5\fP .RE .PP -See \fB\fCrofi \-h\fR output for the detected monitors, their position, and size. +See \fB\fCrofi -h\fR output for the detected monitors, their position, and size. .PP -\fB\fC\-theme\fR \fIfilename\fP +\fB\fC-theme\fR \fIfilename\fP .PP Path to the new theme file format. This overrides the old theme settings. .PP -\fB\fC\-theme\-str\fR \fIstring\fP +\fB\fC-theme-str\fR \fIstring\fP .PP Allow theme parts to be specified on the command line as an override. @@ -806,7 +791,7 @@ For example: .RS .nf -rofi \-theme\-str '#window { fullscreen: true; }' +rofi -theme-str '#window { fullscreen: true; }' .fi .RE @@ -816,21 +801,21 @@ This option can be specified multiple times. This is now the method to tweak the theme via the command line. .PP -\fB\fC\-dpi\fR \fInumber\fP +\fB\fC-dpi\fR \fInumber\fP .PP Override the default DPI setting. .RS .IP \(bu 2 -If set to \fB\fC0\fR, it tries to auto\-detect based on X11 screen size (similar to i3 and GTK). +If set to \fB\fC0\fR, it tries to auto-detect based on X11 screen size (similar to i3 and GTK). .IP \(bu 2 -If set to \fB\fC1\fR, it tries to auto\-detect based on the size of the monitor that \fBrofi\fP is displayed on (similar to latest Qt 5). +If set to \fB\fC1\fR, it tries to auto-detect based on the size of the monitor that \fBrofi\fP is displayed on (similar to latest Qt 5). .RE .PP -\fB\fC\-selected\-row\fR \fIselected row\fP +\fB\fC-selected-row\fR \fIselected row\fP .PP Select a certain row. @@ -840,7 +825,7 @@ Default: \fI0\fP .SS PATTERN setting .PP -\fB\fC\-terminal\fR +\fB\fC-terminal\fR .PP Specify which terminal to start. @@ -849,7 +834,7 @@ Specify which terminal to start. .RS .nf -rofi \-terminal xterm +rofi -terminal xterm .fi .RE @@ -858,36 +843,36 @@ rofi \-terminal xterm Pattern: \fI{terminal}\fP .PP -Default: \fIx\-terminal\-emulator\fP +Default: \fIx-terminal-emulator\fP .PP -\fB\fC\-ssh\-client\fR \fIclient\fP +\fB\fC-ssh-client\fR \fIclient\fP .PP Override the used \fB\fCssh\fR client. .PP -Pattern: \fI{ssh\-client}\fP +Pattern: \fI{ssh-client}\fP .PP Default: \fIssh\fP .SS SSH settings .PP -\fB\fC\-ssh\-command\fR \fIcmd\fP +\fB\fC-ssh-command\fR \fIcmd\fP .PP Set the command to execute when starting an ssh session. The pattern \fI{host}\fP is replaced by the selected ssh entry. .PP -Pattern: \fI{ssh\-client}\fP +Pattern: \fI{ssh-client}\fP .PP -Default: \fI{terminal} \-e {ssh\-client} {host}\fP +Default: \fI{terminal} -e {ssh-client} {host}\fP .PP -\fB\fC\-parse\-hosts\fR +\fB\fC-parse-hosts\fR .PP Parse the \fB\fC/etc/hosts\fR file for entries. @@ -896,18 +881,18 @@ Parse the \fB\fC/etc/hosts\fR file for entries. Default: \fIdisabled\fP .PP -\fB\fC\-parse\-known\-hosts\fR -\fB\fC\-no\-parse\-known\-hosts\fR +\fB\fC-parse-known-hosts\fR +\fB\fC-no-parse-known-hosts\fR .PP -Parse the \fB\fC\~/.ssh/known\_hosts\fR file for entries. +Parse the \fB\fC~/.ssh/known_hosts\fR file for entries. .PP Default: \fIenabled\fP .SS Run settings .PP -\fB\fC\-run\-command\fR \fIcmd\fP +\fB\fC-run-command\fR \fIcmd\fP .PP Set command (\fI{cmd}\fP) to execute when running an application. @@ -917,27 +902,27 @@ See \fIPATTERN\fP\&. Default: \fI{cmd}\fP .PP -\fB\fC\-run\-shell\-command\fR \fIcmd\fP +\fB\fC-run-shell-command\fR \fIcmd\fP .PP Set command to execute when running an application in a shell. See \fIPATTERN\fP\&. .PP -Default: \fI{terminal} \-e {cmd}\fP +Default: \fI{terminal} -e {cmd}\fP .PP -\fB\fC\-run\-list\-command\fR \fIcmd\fP +\fB\fC-run-list-command\fR \fIcmd\fP .PP -If set, use an external tool to generate a list of executable commands. Uses \fB\fCrun\-command\fR\&. +If set, use an external tool to generate a list of executable commands. Uses \fB\fCrun-command\fR\&. .PP Default: \fI{cmd}\fP .SS Window switcher settings .PP -\fB\fC\-window\-format\fR \fIformat\fP +\fB\fC-window-format\fR \fIformat\fP .PP Format what is being displayed for windows. @@ -963,24 +948,24 @@ Format what is being displayed for windows. .RE .PP -\fIlen\fP: maximum field length (0 for auto\-size). If length is negative, the entry will be unchanged. +\fIlen\fP: maximum field length (0 for auto-size). If length is negative, the entry will be unchanged. If length is positive, the entry will be truncated or padded to fill that length. .PP default: {w} {c} {t} .PP -\fB\fC\-window\-command\fR \fIcmd\fP +\fB\fC-window-command\fR \fIcmd\fP .PP -Set command to execute on selected window for an alt action (\fB\fC\-kb\-accept\-alt\fR). +Set command to execute on selected window for an alt action (\fB\fC-kb-accept-alt\fR). See \fIPATTERN\fP\&. .PP -Default: \fI"wmctrl \-i \-R {window}"\fP +Default: \fI"wmctrl -i -R {window}"\fP .PP -\fB\fC\-window\-thumbnail\fR +\fB\fC-window-thumbnail\fR .PP Show window thumbnail (if available) as icon in the window switcher. @@ -994,7 +979,7 @@ You can stop rofi from exiting when closing a window (allowing multiple to be cl .nf configuration { window { - close\-on\-delete: false; + close-on-delete: false; } } @@ -1002,7 +987,7 @@ configuration { .RE .PP -You can hide the currently active window with the 'hide\-active\-window' setting: +You can hide the currently active window with the 'hide-active-window' setting: .PP .RS @@ -1010,7 +995,7 @@ You can hide the currently active window with the 'hide\-active\-window' setting .nf configuration { window { - hide\-active\-window: true; + hide-active-window: true; } } @@ -1018,22 +1003,41 @@ configuration { .RE .PP -or pass \fB\fC\-window\-hide\-active\-window true\fR on command line. +or pass \fB\fC-window-hide-active-window true\fR on command line. + +.PP +You can prefer the icon theme above the window set icon with the 'prefer-icon-theme' setting: + +.PP +.RS + +.nf +configuration { + window { + prefer-icon-theme: true; + } +} + +.fi +.RE + +.PP +or pass \fB\fC-window-prefer-icon-theme true\fR on command line. .SS Combi settings .PP -\fB\fC\-combi\-modes\fR \fImode1\fP,\fImode2\fP +\fB\fC-combi-modes\fR \fImode1\fP,\fImode2\fP .PP The modes to combine in combi mode. -For syntax to \fB\fC\-combi\-modes\fR, see \fB\fC\-modes\fR\&. +For syntax to \fB\fC-combi-modes\fR, see \fB\fC-modes\fR\&. To get one merge view, of \fB\fCwindow\fR,\fB\fCrun\fR, and \fB\fCssh\fR: .PP .RS .nf -rofi \-show combi \-combi\-modes "window,run,ssh" \-modes combi +rofi -show combi -combi-modes "window,run,ssh" -modes combi .fi .RE @@ -1043,7 +1047,7 @@ rofi \-show combi \-combi\-modes "window,run,ssh" \-modes combi For that case, \fB\fC#\fR can be used as a separator. .PP -\fB\fC\-combi\-display\-format\fR +\fB\fC-combi-display-format\fR .PP The format string for entries in the \fB\fCcombi\fR dialog: @@ -1069,26 +1073,26 @@ Default: {mode} {text} .RE .PP -Note: This setting is ignored if \fB\fCcombi\-hide\-mode\-prefix\fR is enabled. +Note: This setting is ignored if \fB\fCcombi-hide-mode-prefix\fR is enabled. .SS History and Sorting .PP -\fB\fC\-disable\-history\fR -\fB\fC\-no\-disable\-history\fR (re\-enable history) +\fB\fC-disable-history\fR +\fB\fC-no-disable-history\fR (re-enable history) .PP Disable history .PP -\fB\fC\-sort\fR to enable -\fB\fC\-no\-sort\fR to disable +\fB\fC-sort\fR to enable +\fB\fC-no-sort\fR to disable .PP Enable, disable sorting. -This setting can be changed at runtime (see \fB\fC\-kb\-toggle\-sort\fR). +This setting can be changed at runtime (see \fB\fC-kb-toggle-sort\fR). .PP -\fB\fC\-sorting\-method\fR 'method' to specify the sorting method. +\fB\fC-sorting-method\fR 'method' to specify the sorting method. .PP There are 2 sorting methods: @@ -1102,18 +1106,18 @@ fzf sorting. .RE .PP -\fB\fC\-max\-history\-size\fR \fInumber\fP +\fB\fC-max-history-size\fR \fInumber\fP .PP Maximum number of entries to store in history. Defaults to 25. (WARNING: can cause slowdowns when set too high) .SS Message dialog .PP -\fB\fC\-e\fR \fImessage\fP +\fB\fC-e\fR \fImessage\fP .PP Pops up a message dialog (used internally for showing errors) with \fImessage\fP\&. -Message can be multi\-line. +Message can be multi-line. .SS File browser settings .PP @@ -1129,16 +1133,16 @@ configuration { directory: "/some/directory"; /** * Sorting method. Can be set to: - * \- "name" - * \- "mtime" (modification time) - * \- "atime" (access time) - * \- "ctime" (change time) + * - "name" + * - "mtime" (modification time) + * - "atime" (access time) + * - "ctime" (change time) */ - sorting\-method: "name"; + sorting-method: "name"; /** Group directories before files. */ - directories\-first: true; + directories-first: true; /** Show hidden files. */ - show\-hidden: false; + show-hidden: false; } } @@ -1147,40 +1151,40 @@ configuration { .SS Other .PP -\fB\fC\-drun\-use\-desktop\-cache\fR +\fB\fC-drun-use-desktop-cache\fR .PP Build and use a cache with the content of desktop files. Usable for systems with slow hard drives. .PP -\fB\fC\-drun\-reload\-desktop\-cache\fR +\fB\fC-drun-reload-desktop-cache\fR .PP -If \fB\fCdrun\-use\-desktop\-cache\fR is enabled, rebuild a cache with the content of desktop files. +If \fB\fCdrun-use-desktop-cache\fR is enabled, rebuild a cache with the content of desktop files. .PP -\fB\fC\-drun\-url\-launcher\fR \fIcommand\fP +\fB\fC-drun-url-launcher\fR \fIcommand\fP .PP Command to open a Desktop Entry that is a Link. .PP -\fB\fC\-pid\fR \fIpath\fP +\fB\fC-pid\fR \fIpath\fP .PP -Make \fBrofi\fP create a pid file and check this on startup. The pid file prevents multiple \fBrofi\fP instances from running simultaneously. This is useful when running \fBrofi\fP from a key\-binding daemon. +Make \fBrofi\fP create a pid file and check this on startup. The pid file prevents multiple \fBrofi\fP instances from running simultaneously. This is useful when running \fBrofi\fP from a key-binding daemon. .PP -\fB\fC\-replace\fR +\fB\fC-replace\fR .PP If rofi is already running, based on pid file, try to kill that instance. .PP -\fB\fC\-display\-{mode}\fR \fIstring\fP +\fB\fC-display-{mode}\fR \fIstring\fP .PP -Set the name to use for mode. This is used as prompt and in combi\-browser. +Set the name to use for mode. This is used as prompt and in combi-browser. .PP It is now preferred to use the configuration file: @@ -1191,7 +1195,7 @@ It is now preferred to use the configuration file: .nf configuration { {mode} { - display\-name: *string*; + display-name: *string*; } } @@ -1199,8 +1203,8 @@ configuration { .RE .PP -\fB\fC\-click\-to\-exit\fR -\fB\fC\-no\-click\-to\-exit\fR +\fB\fC-click-to-exit\fR +\fB\fC-no-click-to-exit\fR .PP Click the mouse outside the \fBrofi\fP window to exit. @@ -1209,7 +1213,7 @@ Click the mouse outside the \fBrofi\fP window to exit. Default: \fIenabled\fP .PP -\fB\fC\-xserver\-i300\-workaround\fR +\fB\fC-xserver-i300-workaround\fR .PP Workaround for bug in Xserver. See issue #611 and #1642 on the rofi issue tracker. @@ -1219,29 +1223,29 @@ Default: \fIdisabled\fP .SH PATTERN .PP -To launch commands (for example, when using the ssh launcher), the user can enter the used command\-line. The following keys can be used that will be replaced at runtime: +To launch commands (for example, when using the ssh launcher), the user can enter the used command-line. The following keys can be used that will be replaced at runtime: .RS .IP \(bu 2 \fB\fC{host}\fR: the host to connect to .IP \(bu 2 -\fB\fC{terminal}\fR: the configured terminal (see \-terminal) +\fB\fC{terminal}\fR: the configured terminal (see -terminal) .IP \(bu 2 -\fB\fC{ssh\-client}\fR: the configured ssh client (see \-ssh\-client) +\fB\fC{ssh-client}\fR: the configured ssh client (see -ssh-client) .IP \(bu 2 \fB\fC{cmd}\fR: the command to execute .IP \(bu 2 -\fB\fC{window}\fR: the window ID of the selected window (in \fB\fCwindow\-command\fR) +\fB\fC{window}\fR: the window ID of the selected window (in \fB\fCwindow-command\fR) .RE .SH THEMING .PP -Please see \fBrofi\-theme(5)\fP manpage for more information on theming. +Please see \fBrofi-theme(5)\fP manpage for more information on theming. .SH KEY BINDINGS .PP -Please see the \fBrofi\-keys(5)\fP manpage for the keybindings and how to set them up. +Please see the \fBrofi-keys(5)\fP manpage for the keybindings and how to set them up. .PP The keybinding can also be used for actions, when the action is executed the @@ -1260,7 +1264,7 @@ after X seconds. configuration { timeout { delay: 15; - action: "kb\-cancel"; + action: "kb-cancel"; } } @@ -1277,7 +1281,7 @@ When the input of the textbox changes: .nf configuration { inputchange { - action: "kb\-row\-first"; + action: "kb-row-first"; } } @@ -1288,9 +1292,9 @@ configuration { .SS window .PP Show a list of all the windows and allow switching between them. -Pressing the \fB\fCdelete\-entry\fR binding (\fB\fCshift\-delete\fR) will close the window. -Pressing the \fB\fCaccept\-custom\fR binding (\fB\fCcontrol\-enter\fR or \fB\fCshift\-enter\fR) will run a command on the window. -(See option \fB\fCwindow\-command\fR ); +Pressing the \fB\fCdelete-entry\fR binding (\fB\fCshift-delete\fR) will close the window. +Pressing the \fB\fCaccept-custom\fR binding (\fB\fCcontrol-enter\fR or \fB\fCshift-enter\fR) will run a command on the window. +(See option \fB\fCwindow-command\fR ); .PP If there is no match, it will try to launch the input. @@ -1298,9 +1302,9 @@ If there is no match, it will try to launch the input. .SS windowcd .PP Shows a list of the windows on the current desktop and allows switching between them. -Pressing the \fB\fCdelete\-entry\fR binding (\fB\fCshift\-delete\fR) will kill the window. -Pressing the \fB\fCaccept\-custom\fR binding (\fB\fCcontrol\-enter\fR or \fB\fCshift\-enter\fR) will run a command on the window. -(See option \fB\fCwindow\-command\fR ); +Pressing the \fB\fCdelete-entry\fR binding (\fB\fCshift-delete\fR) will kill the window. +Pressing the \fB\fCaccept-custom\fR binding (\fB\fCcontrol-enter\fR or \fB\fCshift-enter\fR) will run a command on the window. +(See option \fB\fCwindow-command\fR ); .PP If there is no match, it will try to launch the input. @@ -1308,24 +1312,24 @@ If there is no match, it will try to launch the input. .SS run .PP Shows a list of executables in \fB\fC$PATH\fR and can launch them (optional in a terminal). -Pressing the \fB\fCdelete\-entry\fR binding (\fB\fCshift\-delete\fR) will remove this entry from the run history. -Pressing the \fB\fCaccept\-custom\fR binding (\fB\fCcontrol\-enter\fR) will run the command as entered in the entry box. -Pressing the \fB\fCaccept\-alt\fR binding (\fB\fCshift\-enter\fR) will run the command in a terminal. +Pressing the \fB\fCdelete-entry\fR binding (\fB\fCshift-delete\fR) will remove this entry from the run history. +Pressing the \fB\fCaccept-custom\fR binding (\fB\fCcontrol-enter\fR) will run the command as entered in the entry box. +Pressing the \fB\fCaccept-alt\fR binding (\fB\fCshift-enter\fR) will run the command in a terminal. .PP -When pressing the \fB\fCmode\-complete\fR binding (\fB\fCControl\-l\fR), you can use the File Browser mode to launch the application +When pressing the \fB\fCmode-complete\fR binding (\fB\fCControl-l\fR), you can use the File Browser mode to launch the application with a file as the first argument. .SS drun .PP Same as the \fBrun\fP launches, but the list is created from the installed desktop files. It automatically launches them in a terminal if specified in the Desktop File. -Pressing the \fB\fCdelete\-entry\fR binding (\fB\fCshift\-delete\fR) will remove this entry from the run history. -Pressing the \fB\fCaccept\-custom\fR binding (\fB\fCcontrol\-enter\fR) will run the command as entered in the entry box. -Pressing the \fB\fCaccept\-alt\fR binding (\fB\fCshift\-enter\fR) will run the command in a terminal. +Pressing the \fB\fCdelete-entry\fR binding (\fB\fCshift-delete\fR) will remove this entry from the run history. +Pressing the \fB\fCaccept-custom\fR binding (\fB\fCcontrol-enter\fR) will run the command as entered in the entry box. +Pressing the \fB\fCaccept-alt\fR binding (\fB\fCshift-enter\fR) will run the command in a terminal. .PP -When pressing the \fB\fCmode\-complete\fR binding (\fB\fCControl\-l\fR), you can use the File Browser mode to launch the application +When pressing the \fB\fCmode-complete\fR binding (\fB\fCControl-l\fR), you can use the File Browser mode to launch the application passing a file as argument if specified in the desktop file. .PP @@ -1346,9 +1350,9 @@ There are two advanced options to tweak the behaviour: configuration { drun { /** Parse user desktop files. */ - parse\-user: true; + parse-user: true; /** Parse system desktop files. */ - parse\-system: false; + parse-system: false; } } @@ -1365,16 +1369,16 @@ Shows a searchable list of key bindings. .SS script .PP -Allows custom scripted Modes to be added, see the \fBrofi\-script(5)\fP manpage for more information. +Allows custom scripted Modes to be added, see the \fBrofi-script(5)\fP manpage for more information. .SS combi .PP -Combines multiple modes in one list. Specify which modes are included with the \fB\fC\-combi\-modes\fR option. +Combines multiple modes in one list. Specify which modes are included with the \fB\fC-combi-modes\fR option. .PP When using the combi mode, a \fI!bang\fP can be used to filter the results by modes. All modes that match the bang as a prefix are included. -For example, say you have specified \fB\fC\-combi\-modes run,window,windowcd\fR\&. If your +For example, say you have specified \fB\fC-combi-modes run,window,windowcd\fR\&. If your query begins with the bang \fB\fC!w\fR, only results from the \fB\fCwindow\fR and \fB\fCwindowcd\fR modes are shown, even if the rest of the input text would match results from \fB\fCrun\fR\&. @@ -1384,11 +1388,11 @@ If no match, the input is handled by the first combined modes. .SH FAQ .SS The text in the window switcher is not nicely aligned. .PP -Try using a mono\-space font or tabs + the tab\-stops setting.. +Try using a mono-space font or tabs + the tab-stops setting.. .SS The window is completely black. .PP -Check quotes used on the command\-line: you might have used \fB\fC“\fR ("smart quotes") instead of \fB\fC"\fR ("machine quotes"). +Check quotes used on the command-line: you might have used \fB\fC“\fR ("smart quotes") instead of \fB\fC"\fR ("machine quotes"). .SS What does the icon in the top right show? .PP @@ -1399,7 +1403,7 @@ The indicator shows: .nf ` ` Case insensitive and no sorting. -`\-` Case sensitivity enabled, no sorting. +`-` Case sensitivity enabled, no sorting. `+` Case insensitive and Sorting enabled `±` Sorting and Case sensitivity enabled" @@ -1432,7 +1436,7 @@ Show the run dialog: .RS .nf -rofi \-modes run \-show run +rofi -modes run -show run .fi .RE @@ -1444,7 +1448,7 @@ Show the run dialog, and allow switching to Desktop File run dialog (\fB\fCdrun\ .RS .nf -rofi \-modes run,drun \-show run +rofi -modes run,drun -show run .fi .RE @@ -1456,7 +1460,7 @@ Combine the run and Desktop File run dialog (\fB\fCdrun\fR): .RS .nf -rofi \-modes combi \-show combi \-combi\-modes run,drun +rofi -modes combi -show combi -combi-modes run,drun .fi .RE @@ -1468,7 +1472,7 @@ Combine the run and Desktop File run dialog (\fB\fCdrun\fR), and allow switching .RS .nf -rofi \-modes combi,window \-show combi \-combi\-modes run,drun +rofi -modes combi,window -show combi -combi-modes run,drun .fi .RE @@ -1480,7 +1484,7 @@ Pop up a text message claiming that this is the end: .RS .nf -rofi \-e "This is the end" +rofi -e "This is the end" .fi .RE @@ -1492,7 +1496,7 @@ Pop up a text message in red, bold font claiming that this is still the end: .RS .nf -rofi \-e "This is still the end" \-markup +rofi -e "This is still the end" -markup .fi .RE @@ -1504,7 +1508,7 @@ Show all key bindings: .RS .nf -rofi \-show keys +rofi -show keys .fi .RE @@ -1518,7 +1522,7 @@ See also the i3 manual .PP Some tools (such as \fB\fCimport\fR or \fB\fCxdotool\fR) might be unable to run upon a KeyPress event, because the keyboard/pointer is -still grabbed. For these situations, the \fB\fC\-\-release\fR flag can be used, as it will execute the command after the keys have +still grabbed. For these situations, the \fB\fC--release\fR flag can be used, as it will execute the command after the keys have been released. .SH LICENSE @@ -1567,7 +1571,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. .SH DEBUGGING .PP -For more information see \fBrofi\-debugging(5)\fP manpage. +For more information see \fBrofi-debugging(5)\fP manpage. .SH ISSUE TRACKER .PP @@ -1581,26 +1585,26 @@ first. .SH SEE ALSO .PP -\fBrofi\-sensible\-terminal(1)\fP, \fBdmenu(1)\fP, \fBrofi\-debugging(5)\fP, \fBrofi\-theme(5)\fP, \fBrofi\-script(5)\fP, \fBrofi\-keys(5)\fP,\fBrofi\-theme\-selector(1)\fP,\fBrofi\-dmenu(5)\fP +\fBrofi-sensible-terminal(1)\fP, \fBdmenu(1)\fP, \fBrofi-debugging(5)\fP, \fBrofi-theme(5)\fP, \fBrofi-script(5)\fP, \fBrofi-keys(5)\fP,\fBrofi-theme-selector(1)\fP,\fBrofi-dmenu(5)\fP .SH AUTHOR .RS .IP \(bu 2 -Qball Cow -\[la]qball@blame.services\[ra] +Qball Cow qball@blame.services +\[la]mailto:qball@blame.services\[ra] .IP \(bu 2 -Rasmus Steinke -\[la]rasi@xssn.at\[ra] +Rasmus Steinke rasi@xssn.at +\[la]mailto:rasi@xssn.at\[ra] .IP \(bu 2 -Morgane Glidic -\[la]sardemff7+rofi@sardemff7.net\[ra] +Morgane Glidic sardemff7+rofi@sardemff7.net +\[la]mailto:sardemff7+rofi@sardemff7.net\[ra] .RE .PP Original code based on work by: Sean Pringle -\[la]https://github.com/seanpringle/simpleswitcher\[ra] -\[la]sean.pringle@gmail.com\[ra] +\[la]https://github.com/seanpringle/simpleswitcher\[ra] sean.pringle@gmail.com +\[la]mailto:sean.pringle@gmail.com\[ra] .PP For a full list of authors, check the \fB\fCAUTHORS\fR file. diff --git a/doc/rofi.1.markdown b/doc/rofi.1.markdown index 976ca5b5..f386907b 100644 --- a/doc/rofi.1.markdown +++ b/doc/rofi.1.markdown @@ -612,6 +612,17 @@ configuration { or pass `-window-hide-active-window true` on command line. +You can prefer the icon theme above the window set icon with the 'prefer-icon-theme' setting: + +```css +configuration { + window { + prefer-icon-theme: true; + } +} +``` + +or pass `-window-prefer-icon-theme true` on command line. ### Combi settings diff --git a/include/rofi-icon-fetcher.h b/include/rofi-icon-fetcher.h index 5394db5d..34f9cfd2 100644 --- a/include/rofi-icon-fetcher.h +++ b/include/rofi-icon-fetcher.h @@ -63,6 +63,16 @@ uint32_t rofi_icon_fetcher_query_advanced(const char *name, const int wsize, */ cairo_surface_t *rofi_icon_fetcher_get(const uint32_t uid); +/** + * @param uid The unique id representing the matching request. + * @param surface [out] The surface found. + * + * If the surface is used, the user should reference the surface. + * + * @returns false if a query was done and failed. + */ +gboolean rofi_icon_fetcher_get_ex(const uint32_t uid, + cairo_surface_t **surface); /** * @param path the image path to check. * diff --git a/source/modes/window.c b/source/modes/window.c index 7932eded..94bd80db 100644 --- a/source/modes/window.c +++ b/source/modes/window.c @@ -127,6 +127,7 @@ typedef struct { uint32_t icon_fetch_uid; uint32_t icon_fetch_size; gboolean thumbnail_checked; + gboolean icon_theme_checked; } client; // window lists @@ -150,6 +151,7 @@ typedef struct { GRegex *window_regex; // Hide current active window gboolean hide_active_window; + gboolean prefer_icon_theme; } WindowModePrivateData; winlist *cache_client = NULL; @@ -688,6 +690,11 @@ static int window_mode_init(Mode *sw) { if (p && p->type == P_BOOLEAN && p->value.b == TRUE) { pd->hide_active_window = TRUE; } + // prefer icon theme selection + p = rofi_theme_find_property(wid, P_BOOLEAN, "prefer-icon-theme", FALSE); + if (p && p->type == P_BOOLEAN && p->value.b == TRUE) { + pd->prefer_icon_theme = TRUE; + } pd->window_regex = g_regex_new("{[-\\w]+(:-?[0-9]+)?}", 0, 0, NULL); mode_set_private_data(sw, (void *)pd); _window_mode_load_data(sw, FALSE); @@ -1056,24 +1063,56 @@ static cairo_surface_t *_get_icon(const Mode *sw, unsigned int selected_line, } c->thumbnail_checked = FALSE; c->icon_checked = FALSE; + c->icon_theme_checked = FALSE; } if (config.window_thumbnail && c->thumbnail_checked == FALSE) { c->icon = x11_helper_get_screenshot_surface_window(c->window, size); c->thumbnail_checked = TRUE; } - if (c->icon == NULL && c->icon_checked == FALSE) { - c->icon = get_net_wm_icon(rmpd->ids->array[selected_line], size); - c->icon_checked = TRUE; - } - if (c->icon == NULL && c->class) { - if (c->icon_fetch_uid > 0) { - return rofi_icon_fetcher_get(c->icon_fetch_uid); + if (rmpd->prefer_icon_theme == FALSE) { + if (c->icon == NULL && c->icon_checked == FALSE) { + c->icon = get_net_wm_icon(rmpd->ids->array[selected_line], size); + c->icon_checked = TRUE; + } + if (c->icon == NULL && c->class && c->icon_theme_checked == FALSE) { + g_warning("icon theme icon: %s %u", c->class, size); + if (c->icon_fetch_uid > 0) { + c->icon_theme_checked = + rofi_icon_fetcher_get_ex(c->icon_fetch_uid, &(c->icon)); + if (c->icon) { + cairo_surface_reference(c->icon); + } + return c->icon; + } + char *class_lower = g_utf8_strdown(c->class, -1); + c->icon_fetch_uid = rofi_icon_fetcher_query(class_lower, size); + g_free(class_lower); + c->icon_fetch_size = size; + c->icon_theme_checked = + rofi_icon_fetcher_get_ex(c->icon_fetch_uid, &(c->icon)); + if (c->icon) { + cairo_surface_reference(c->icon); + } + return c->icon; + } + } else { + if (c->icon == NULL && c->class && c->icon_theme_checked == FALSE) { + if (c->icon_fetch_uid == 0) { + char *class_lower = g_utf8_strdown(c->class, -1); + c->icon_fetch_uid = rofi_icon_fetcher_query(class_lower, size); + g_free(class_lower); + c->icon_fetch_size = size; + } + c->icon_theme_checked = + rofi_icon_fetcher_get_ex(c->icon_fetch_uid, &(c->icon)); + if (c->icon) { + cairo_surface_reference(c->icon); + } + } + if (c->icon == NULL && c->icon_checked == FALSE) { + c->icon = get_net_wm_icon(rmpd->ids->array[selected_line], size); + c->icon_checked = TRUE; } - char *class_lower = g_utf8_strdown(c->class, -1); - c->icon_fetch_uid = rofi_icon_fetcher_query(class_lower, size); - g_free(class_lower); - c->icon_fetch_size = size; - return rofi_icon_fetcher_get(c->icon_fetch_uid); } c->icon_fetch_size = size; return c->icon; diff --git a/source/rofi-icon-fetcher.c b/source/rofi-icon-fetcher.c index 8e3fe6a7..7dc9770d 100644 --- a/source/rofi-icon-fetcher.c +++ b/source/rofi-icon-fetcher.c @@ -81,6 +81,7 @@ typedef struct { int wsize; int hsize; cairo_surface_t *surface; + gboolean query_done; IconFetcherNameEntry *entry; } IconFetcherEntry; @@ -317,6 +318,7 @@ static void rofi_icon_fetcher_worker(thread_state *sdata, g_object_unref(layout); cairo_destroy(cr); sentry->surface = surface; + sentry->query_done = TRUE; rofi_view_reload(); return; @@ -333,6 +335,8 @@ static void rofi_icon_fetcher_worker(thread_state *sdata, icon_path = helper_get_theme_path(sentry->entry->name, ext); } if (icon_path == NULL) { + sentry->query_done = TRUE; + rofi_view_reload(); return; } } else { @@ -344,6 +348,8 @@ static void rofi_icon_fetcher_worker(thread_state *sdata, const char *suf = strrchr(icon_path, '.'); if (suf == NULL) { + sentry->query_done = TRUE; + rofi_view_reload(); return; } @@ -363,6 +369,7 @@ static void rofi_icon_fetcher_worker(thread_state *sdata, sentry->surface = icon_surf; g_free(icon_path_); + sentry->query_done = TRUE; rofi_view_reload(); } @@ -391,6 +398,7 @@ uint32_t rofi_icon_fetcher_query_advanced(const char *name, const int wsize, sentry->wsize = wsize; sentry->hsize = hsize; sentry->entry = entry; + sentry->query_done = FALSE; sentry->surface = NULL; entry->sizes = g_list_prepend(entry->sizes, sentry); @@ -446,5 +454,19 @@ cairo_surface_t *rofi_icon_fetcher_get(const uint32_t uid) { if (sentry) { return sentry->surface; } + g_warning("Querying an non-existing uid"); return NULL; } + +gboolean rofi_icon_fetcher_get_ex(const uint32_t uid, + cairo_surface_t **surface) { + IconFetcherEntry *sentry = g_hash_table_lookup( + rofi_icon_fetcher_data->icon_cache_uid, GINT_TO_POINTER(uid)); + *surface = NULL; + if (sentry) { + *surface = sentry->surface; + return sentry->query_done; + } + g_warning("Querying an non-existing uid"); + return FALSE; +} From 60fcbbb10ee5cbadcc9851c90b6511b785fe00ca Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Sat, 22 Oct 2022 11:10:35 +0200 Subject: [PATCH 008/139] [Window] Small fixes to prefer-icon-theme option Thanks to Kafva (https://github.com/Kafva) for the original patch. Issue: #1702 --- source/modes/window.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/source/modes/window.c b/source/modes/window.c index 94bd80db..3ffe01f8 100644 --- a/source/modes/window.c +++ b/source/modes/window.c @@ -1075,25 +1075,17 @@ static cairo_surface_t *_get_icon(const Mode *sw, unsigned int selected_line, c->icon_checked = TRUE; } if (c->icon == NULL && c->class && c->icon_theme_checked == FALSE) { - g_warning("icon theme icon: %s %u", c->class, size); - if (c->icon_fetch_uid > 0) { - c->icon_theme_checked = - rofi_icon_fetcher_get_ex(c->icon_fetch_uid, &(c->icon)); - if (c->icon) { - cairo_surface_reference(c->icon); - } - return c->icon; + if (c->icon_fetch_uid == 0) { + char *class_lower = g_utf8_strdown(c->class, -1); + c->icon_fetch_uid = rofi_icon_fetcher_query(class_lower, size); + g_free(class_lower); + c->icon_fetch_size = size; } - char *class_lower = g_utf8_strdown(c->class, -1); - c->icon_fetch_uid = rofi_icon_fetcher_query(class_lower, size); - g_free(class_lower); - c->icon_fetch_size = size; c->icon_theme_checked = rofi_icon_fetcher_get_ex(c->icon_fetch_uid, &(c->icon)); if (c->icon) { cairo_surface_reference(c->icon); } - return c->icon; } } else { if (c->icon == NULL && c->class && c->icon_theme_checked == FALSE) { @@ -1109,7 +1101,8 @@ static cairo_surface_t *_get_icon(const Mode *sw, unsigned int selected_line, cairo_surface_reference(c->icon); } } - if (c->icon == NULL && c->icon_checked == FALSE) { + if (c->icon_theme_checked == TRUE && c->icon == NULL && + c->icon_checked == FALSE) { c->icon = get_net_wm_icon(rmpd->ids->array[selected_line], size); c->icon_checked = TRUE; } From cf2cf27336494f4a41fd6f76190b2027d9bb0272 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Mon, 24 Oct 2022 19:20:03 +0200 Subject: [PATCH 009/139] [Build] Fix icon install path for makefile. fixes: #1733 --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 75a6270a..24e5526a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -626,7 +626,7 @@ coverage-clean: .PHONY: .FORCE .FORCE: -icondir=$(datadir)/icons/hicolor/apps/ +icondir=$(datadir)/icons/hicolor/scalable/apps/ icon_DATA=\ data/rofi.svg From fba6aee46da050eab979de1ced62c1205f3b9539 Mon Sep 17 00:00:00 2001 From: Fabian Winter <5821180+fdw@users.noreply.github.com> Date: Tue, 25 Oct 2022 19:14:25 +0200 Subject: [PATCH 010/139] [DOC] Add parsing row options to dmenu manpage (#1734) --- doc/rofi-dmenu.5.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/rofi-dmenu.5.markdown b/doc/rofi-dmenu.5.markdown index 9e525426..f9732a5d 100644 --- a/doc/rofi-dmenu.5.markdown +++ b/doc/rofi-dmenu.5.markdown @@ -192,6 +192,10 @@ When multi-select is enabled, prefix this string when element is not selected. *default*: "☐ " +## 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. From 3d3af82b5413682b93c8d4e6d95f2b8488fb7ce2 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Tue, 25 Oct 2022 19:14:54 +0200 Subject: [PATCH 011/139] [man] re-gen manpage. --- doc/rofi-dmenu.5 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/rofi-dmenu.5 b/doc/rofi-dmenu.5 index 9a873c48..674f949e 100644 --- a/doc/rofi-dmenu.5 +++ b/doc/rofi-dmenu.5 @@ -298,6 +298,10 @@ When multi-select is enabled, prefix this string when element is not selected. .PP \fIdefault\fP: "☐ " +.SH PARSING ROW OPTIONS +.PP +Extra options for individual rows can be also set. See the \fBrofi-script(5)\fP manpage for details; the syntax and supported features are identical. + .SH RETURN VALUE .RS .IP \(bu 2 From 62ebb863edd1efc9f6f616a82d4cfe6fb2ea473f Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Thu, 27 Oct 2022 22:22:11 +0200 Subject: [PATCH 012/139] [Textbox] Add a 'get_cursor_x_pos' function. --- include/widgets/textbox.h | 9 +++++++++ source/widgets/textbox.c | 19 +++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/include/widgets/textbox.h b/include/widgets/textbox.h index 7ec36ce1..a3383208 100644 --- a/include/widgets/textbox.h +++ b/include/widgets/textbox.h @@ -76,6 +76,8 @@ typedef struct { double yalign; double xalign; + int cursor_x_pos; + TBFontConfig *tbfc; PangoEllipsizeMode emode; @@ -335,5 +337,12 @@ void textbox_cursor_end(textbox *tb); * Set the ellipsizing mode used on the string. */ void textbox_set_ellipsize(textbox *tb, PangoEllipsizeMode mode); + +/** + * @param tb Handle to the textbox + * + * @returns the position of the cursor (0 if no cursor). + */ +int textbox_get_cursor_x_pos(const textbox *tb); /**@}*/ #endif // ROFI_TEXTBOX_H diff --git a/source/widgets/textbox.c b/source/widgets/textbox.c index 80e4be09..758e32d5 100644 --- a/source/widgets/textbox.c +++ b/source/widgets/textbox.c @@ -525,7 +525,7 @@ static void textbox_draw(widget *wid, cairo_t *draw) { // draw the cursor rofi_theme_get_color(WIDGET(tb), "text-color", draw); - if (tb->flags & TB_EDITABLE && tb->blink) { + if (tb->flags & TB_EDITABLE) { // We want to place the cursor based on the text shown. const char *text = pango_layout_get_text(tb->layout); // Clamp the position, should not be needed, but we are paranoid. @@ -538,9 +538,14 @@ static void textbox_draw(widget *wid, cairo_t *draw) { int cursor_y = pos.y / PANGO_SCALE; int cursor_height = pos.height / PANGO_SCALE; int cursor_width = 2; - cairo_rectangle(draw, x + cursor_x, y + cursor_y, cursor_width, - cursor_height); - cairo_fill(draw); + if ((x + cursor_x) != tb->cursor_x_pos) { + tb->cursor_x_pos = x + cursor_x; + } + if (tb->blink) { + cairo_rectangle(draw, x + cursor_x, y + cursor_y, cursor_width, + cursor_height); + cairo_fill(draw); + } } } @@ -993,3 +998,9 @@ void textbox_set_ellipsize(textbox *tb, PangoEllipsizeMode mode) { } } } +int textbox_get_cursor_x_pos(const textbox *tb) { + if (tb == NULL) { + return 0; + } + return tb->cursor_x_pos; +} From 804eb908bd072cef92f90eaf8a17381498b50195 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Mon, 31 Oct 2022 21:28:17 +0100 Subject: [PATCH 013/139] [FileBrowser] Bind kb-delete-entry to toggle show-hidden. --- doc/rofi.1 | 3 +++ doc/rofi.1.markdown | 2 ++ source/modes/filebrowser.c | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/doc/rofi.1 b/doc/rofi.1 index 22e4a021..ae26ee63 100644 --- a/doc/rofi.1 +++ b/doc/rofi.1 @@ -1149,6 +1149,9 @@ configuration { .fi .RE +.PP +The \fB\fCshow-hidden\fR can also be triggered with the \fB\fCkb-delete-entry\fR keybinding. + .SS Other .PP \fB\fC-drun-use-desktop-cache\fR diff --git a/doc/rofi.1.markdown b/doc/rofi.1.markdown index f386907b..5730dbae 100644 --- a/doc/rofi.1.markdown +++ b/doc/rofi.1.markdown @@ -708,6 +708,8 @@ configuration { } ``` +The `show-hidden` can also be triggered with the `kb-delete-entry` keybinding. + ### Other `-drun-use-desktop-cache` diff --git a/source/modes/filebrowser.c b/source/modes/filebrowser.c index 03141777..21ae13b9 100644 --- a/source/modes/filebrowser.c +++ b/source/modes/filebrowser.c @@ -523,6 +523,9 @@ static ModeMode file_browser_mode_result(Mode *sw, int mretv, char **input, retv = RELOAD_DIALOG; } } else if ((mretv & MENU_ENTRY_DELETE) == MENU_ENTRY_DELETE) { + file_browser_config.show_hidden = !file_browser_config.show_hidden; + free_list(pd); + get_file_browser(sw); retv = RELOAD_DIALOG; } return retv; @@ -678,6 +681,9 @@ ModeMode file_browser_mode_completer(Mode *sw, int mretv, char **input, g_free(dir); retv = RELOAD_DIALOG; } else if ((mretv & MENU_ENTRY_DELETE) == MENU_ENTRY_DELETE) { + file_browser_config.show_hidden = !file_browser_config.show_hidden; + free_list(pd); + get_file_browser(sw); retv = RELOAD_DIALOG; } return retv; From 579902deff5c23cf690fc76bb9bcdca4f511b0df Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Wed, 2 Nov 2022 20:15:38 +0100 Subject: [PATCH 014/139] [Window] Make sure their is a trailing 0 on the workspace strings. Issue: #1739 --- source/modes/window.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/source/modes/window.c b/source/modes/window.c index 3ffe01f8..bc2bc9ae 100644 --- a/source/modes/window.c +++ b/source/modes/window.c @@ -574,13 +574,19 @@ static void _window_mode_load_data(Mode *sw, unsigned int cd) { // we're working... pd->ids = winlist_new(); + int has_names = FALSE; + ssize_t ws_names_length = 0; + char *ws_names = NULL; xcb_get_property_cookie_t prop_cookie = xcb_ewmh_get_desktop_names(&xcb->ewmh, xcb->screen_nbr); xcb_ewmh_get_utf8_strings_reply_t names; - int has_names = FALSE; if (xcb_ewmh_get_desktop_names_reply(&xcb->ewmh, prop_cookie, &names, NULL)) { + ws_names_length = names.strings_len; + ws_names = g_malloc0_n(names.strings_len + 1, sizeof(char)); + memcpy(ws_names, names.strings, names.strings_len); has_names = TRUE; + xcb_ewmh_get_utf8_strings_reply_wipe(&names); } // calc widths of fields for (i = clients.windows_len - 1; i > -1; i--) { @@ -629,11 +635,11 @@ static void _window_mode_load_data(Mode *sw, unsigned int cd) { WM_PANGO_WORKSPACE_NAMES) { char *output = NULL; if (pango_parse_markup( - _window_name_list_entry(names.strings, names.strings_len, + _window_name_list_entry(ws_names, ws_names_length, winclient->wmdesktop), -1, 0, NULL, &output, NULL, NULL)) { winclient->wmdesktopstr = g_strdup(_window_name_list_entry( - names.strings, names.strings_len, winclient->wmdesktop)); + ws_names, ws_names_length, winclient->wmdesktop)); winclient->wmdesktopstr_len = g_utf8_strlen(output, -1); pd->wmdn_len = MAX(pd->wmdn_len, winclient->wmdesktopstr_len); g_free(output); @@ -645,7 +651,7 @@ static void _window_mode_load_data(Mode *sw, unsigned int cd) { } } else { winclient->wmdesktopstr = g_markup_escape_text( - _window_name_list_entry(names.strings, names.strings_len, + _window_name_list_entry(ws_names, ws_names_length, winclient->wmdesktop), -1); winclient->wmdesktopstr_len = @@ -675,7 +681,7 @@ static void _window_mode_load_data(Mode *sw, unsigned int cd) { } if (has_names) { - xcb_ewmh_get_utf8_strings_reply_wipe(&names); + g_free(ws_names); } } xcb_ewmh_get_windows_reply_wipe(&clients); From 6d02648d3a2ab9ee9751db8783f00b14071f57b4 Mon Sep 17 00:00:00 2001 From: duarm Date: Tue, 8 Nov 2022 15:18:45 -0300 Subject: [PATCH 015/139] input method (#1735) * input method draft * restoring relese event * using unused macro, removing debug code, handling disconnection * review fixes, new update_im_window_pos method * initializing variables correctly * initializing im pos queue correctly * ime window positioning * add widget_get_y_pos() position * [Build] Update makefile with imdkit * [CI] Add imdkit as dependency. * [XCB] rofi_view_paste don't throw warning, print debug. * [XCB] rofi_view_paste lower 'failed to convert selection' * [Build] Add minimum version check to imdkit * new macro XCB_IMDKIT_1_0_3_LOWER * [Build] Try to support old version of imdkit in meson/makefile. * [Build] Fix typo in meson.build * [XIM] Don't set use compound/set use utf8 when on old version. * [Build] Allow building without imdkit. * [Doc] Add imdkit to dependency list. Co-authored-by: Dave Davenport --- .github/actions/setup/action.yml | 1 + INSTALL.md | 1 + Makefile.am | 2 + configure.ac | 6 +- include/view.h | 10 +++ include/xcb-internal.h | 5 ++ include/xcb.h | 12 +++ meson.build | 20 ++++- source/rofi.c | 7 ++ source/view.c | 116 ++++++++++++++++++++++++ source/xcb.c | 149 +++++++++++++++++++++++++++---- 11 files changed, 308 insertions(+), 21 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 0f641a5f..14973be3 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -29,6 +29,7 @@ runs: libxcb-xkb-dev \ libxcb-xrm-dev \ libxcb-cursor-dev \ + libxcb-imdkit-dev \ libxkbcommon-dev \ libxkbcommon-dev \ libxkbcommon-x11-dev \ diff --git a/INSTALL.md b/INSTALL.md index f62ffbfc..dd7a5401 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -39,6 +39,7 @@ You can also use [Meson](https://mesonbuild.com/) as an alternative. * 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`. diff --git a/Makefile.am b/Makefile.am index 24e5526a..4e316e74 100644 --- a/Makefile.am +++ b/Makefile.am @@ -145,6 +145,7 @@ rofi_CFLAGS=\ $(libsn_CFLAGS)\ $(cairo_CFLAGS)\ $(gdkpixbuf_CFLAGS)\ + $(imdclient_CFLAGS)\ -DMANPAGE_PATH="\"$(mandir)/\""\ -I$(top_srcdir)/include/\ -I$(top_builddir)/lexer/\ @@ -165,6 +166,7 @@ rofi_LDADD=\ $(pango_LIBS)\ $(cairo_LIBS)\ $(gdkpixbuf_LIBS)\ + $(imdclient_LIBS)\ $(LIBS) ## diff --git a/configure.ac b/configure.ac index de043d48..cdef673d 100644 --- a/configure.ac +++ b/configure.ac @@ -145,7 +145,11 @@ NK_INIT([bindings xdg-theme]) PKG_CHECK_MODULES([glib], [glib-2.0 >= ${glib_min_version} gio-unix-2.0 gmodule-2.0]) AC_DEFINE_UNQUOTED([GLIB_VERSION_MIN_REQUIRED], [(G_ENCODE_VERSION(${glib_min_major},${glib_min_minor}))], [The lower GLib version supported]) AC_DEFINE_UNQUOTED([GLIB_VERSION_MAX_ALLOWED], [(G_ENCODE_VERSION(${glib_min_major},${glib_min_minor}))], [The highest GLib version supported]) -GW_CHECK_XCB([xcb-aux xcb-xkb xkbcommon xkbcommon-x11 xcb-ewmh xcb-icccm xcb-cursor xcb-randr xcb-xinerama]) +GW_CHECK_XCB([xcb-aux xcb-xkb xkbcommon xkbcommon-x11 xcb-ewmh xcb-icccm xcb-cursor xcb-randr xcb-xinerama ]) +PKG_CHECK_MODULES([imdclient], [xcb-imdkit <= 1.0.2 ], + [AC_DEFINE([XCB_IMDKIT_1_0_3_LOWER], [1], [Indicate lower version of imdclient]) + AC_DEFINE([XCB_IMDKIT],[1], [IMD Kit missing])], + [PKG_CHECK_MODULES([imdclient], [xcb-imdkit >= 1.0.3],[AC_DEFINE([XCB_IMDKIT],[1], [IMD Kit missing])],[HAVE_IMDKIT=0])]) PKG_CHECK_MODULES([pango], [pango pangocairo]) PKG_CHECK_MODULES([cairo], [cairo cairo-xcb]) PKG_CHECK_MODULES([libsn], [libstartup-notification-1.0 ]) diff --git a/include/view.h b/include/view.h index 8fbe0159..9ca8bfbf 100644 --- a/include/view.h +++ b/include/view.h @@ -341,5 +341,15 @@ void rofi_view_set_window_title(const char *title); * set ellipsize mode to start. */ void rofi_view_ellipsize_start(RofiViewState *state); + +/** + * @param new_x New XIM window x pos + * @param new_y New XIM window y pos + * + * Updates the XIM window position to new_x and new_y, relative to the + * main_window + */ +gboolean rofi_set_im_window_pos(int new_x, int new_y); + /** @} */ #endif diff --git a/include/xcb-internal.h b/include/xcb-internal.h index f2d78ca1..c83ef585 100644 --- a/include/xcb-internal.h +++ b/include/xcb-internal.h @@ -32,6 +32,7 @@ #include #include +#include "xcb.h" #include #include #include @@ -45,6 +46,10 @@ struct _xcb_stuff { GMainLoop *main_loop; GWaterXcbSource *source; xcb_connection_t *connection; +#ifdef XCB_IMDKIT + xcb_xic_t ic; + xcb_xim_t *im; +#endif xcb_ewmh_connection_t ewmh; xcb_screen_t *screen; int screen_nbr; diff --git a/include/xcb.h b/include/xcb.h index afc9c5ec..2b847645 100644 --- a/include/xcb.h +++ b/include/xcb.h @@ -29,6 +29,10 @@ #define ROFI_XCB_H #include +#include +#ifdef XCB_IMDKIT +#include +#endif #include /** @@ -220,6 +224,7 @@ extern WindowManagerQuirk current_window_manager; * @returns NULL if window was not found, or unmapped, otherwise returns a * cairo_surface. */ + cairo_surface_t *x11_helper_get_screenshot_surface_window(xcb_window_t window, int size); @@ -233,4 +238,11 @@ cairo_surface_t *x11_helper_get_screenshot_surface_window(xcb_window_t window, void cairo_image_surface_blur(cairo_surface_t *surface, double radius, double deviation); +#ifdef XCB_IMDKIT +/** + * IME Forwarding + */ +void x11_event_handler_fowarding(xcb_xim_t *im, xcb_xic_t ic, + xcb_key_press_event_t *event, void *user_data); +#endif #endif diff --git a/meson.build b/meson.build index 98a56f10..2c8d476a 100644 --- a/meson.build +++ b/meson.build @@ -74,9 +74,27 @@ deps += [ dependency('libstartup-notification-1.0'), ] -check = dependency('check', version: '>= 0.11.0', required: get_option('check')) +imdkit_new = dependency('xcb-imdkit', version: '>= 1.0.3', required: false) +imdkit_old = dependency('xcb-imdkit', version: '<= 1.0.2', required: false) + +check = dependency('check', version: '>= 0.11.0', required: get_option('check')) header_conf = configuration_data() + +if imdkit_new.found() + deps += imdkit_new + header_conf.set('XCB_IMDKIT_1_0_3_LOWER', false) + header_conf.set('XCB_IMDKIT', true) +elif imdkit_old.found() + deps+= imdkit_old + header_conf.set('XCB_IMDKIT_1_0_3_LOWER', true) + header_conf.set('XCB_IMDKIT', true) +else + header_conf.set('XCB_IMDKIT_1_0_3_LOWER', false) + header_conf.set('XCB_IMDKIT', false) +endif + + header_conf.set_quoted('PACKAGE_NAME', meson.project_name()) header_conf.set_quoted('PACKAGE_VERSION', meson.project_version()) header_conf.set_quoted('VERSION', meson.project_version()) diff --git a/source/rofi.c b/source/rofi.c index 0bf4be81..d8d6a1f1 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -379,6 +379,13 @@ static void help(G_GNUC_UNUSED int argc, char **argv) { #else printf("\t• asan %sdisabled%s\n", is_term ? color_red : "", is_term ? color_reset : ""); +#endif +#ifdef XCB_IMDKIT + printf("\t• imdkit %senabled%s\n", is_term ? color_green : "", + is_term ? color_reset : ""); +#else + printf("\t• imdkit %sdisabled%s\n", is_term ? color_red : "", + is_term ? color_reset : ""); #endif printf("\n"); printf("For more information see: %sman rofi%s\n", is_term ? color_bold : "", diff --git a/source/view.c b/source/view.c index cfa96438..1c432891 100644 --- a/source/view.c +++ b/source/view.c @@ -38,6 +38,9 @@ #include #include #include +#ifdef XCB_IMDKIT +#include +#endif #include #include #include @@ -79,6 +82,20 @@ void rofi_view_update(RofiViewState *state, gboolean qr); static int rofi_view_calculate_height(RofiViewState *state); +#ifdef XCB_IMDKIT +static void xim_commit_string(xcb_xim_t *im, G_GNUC_UNUSED xcb_xic_t ic, + G_GNUC_UNUSED uint32_t flag, char *str, + uint32_t length, G_GNUC_UNUSED uint32_t *keysym, + G_GNUC_UNUSED size_t nKeySym, + G_GNUC_UNUSED void *user_data); +static void xim_disconnected(G_GNUC_UNUSED xcb_xim_t *im, + G_GNUC_UNUSED void *user_data); +xcb_xim_im_callback xim_callback = {.forward_event = + x11_event_handler_fowarding, + .commit_string = xim_commit_string, + .disconnected = xim_disconnected}; +#endif + /** Thread pool used for filtering */ GThreadPool *tpool = NULL; @@ -784,6 +801,86 @@ rofi_view_setup_fake_transparency(widget *win, TICK_N("Fake transparency"); } } + +#ifdef XCB_IMDKIT +static void xim_commit_string(xcb_xim_t *im, G_GNUC_UNUSED xcb_xic_t ic, + G_GNUC_UNUSED uint32_t flag, char *str, + uint32_t length, G_GNUC_UNUSED uint32_t *keysym, + G_GNUC_UNUSED size_t nKeySym, + G_GNUC_UNUSED void *user_data) { + RofiViewState *state = rofi_view_get_active(); + if (state == NULL) { + return; + } + +#ifndef XCB_IMDKIT_1_0_3_LOWER + if (xcb_xim_get_encoding(im) == XCB_XIM_UTF8_STRING) { + rofi_view_handle_text(state, str); + } else if (xcb_xim_get_encoding(im) == XCB_XIM_COMPOUND_TEXT) { + size_t newLength = 0; + char *utf8 = xcb_compound_text_to_utf8(str, length, &newLength); + if (utf8) { + rofi_view_handle_text(state, utf8); + } + } +#else + size_t newLength = 0; + char *utf8 = xcb_compound_text_to_utf8(str, length, &newLength); + if (utf8) { + rofi_view_handle_text(state, utf8); + } +#endif +} + +static void xim_disconnected(G_GNUC_UNUSED xcb_xim_t *im, + G_GNUC_UNUSED void *user_data) { + xcb->ic = 0; +} + +static void create_ic_callback(xcb_xim_t *im, xcb_xic_t new_ic, + G_GNUC_UNUSED void *user_data) { + xcb->ic = new_ic; + if (xcb->ic) { + xcb_xim_set_ic_focus(im, xcb->ic); + } +} + +gboolean rofi_set_im_window_pos(int new_x, int new_y) { + if (!xcb->ic) + return false; + + static xcb_point_t spot = {.x = 0, .y = 0}; + if (spot.x != new_x || spot.y != new_y) { + spot.x = new_x; + spot.y = new_y; + xcb_xim_nested_list nested = xcb_xim_create_nested_list( + xcb->im, XCB_XIM_XNSpotLocation, &spot, NULL); + xcb_xim_set_ic_values(xcb->im, xcb->ic, NULL, NULL, XCB_XIM_XNClientWindow, + &CacheState.main_window, XCB_XIM_XNFocusWindow, + &CacheState.main_window, XCB_XIM_XNPreeditAttributes, + &nested, NULL); + free(nested.data); + } + return true; +} +static void open_xim_callback(xcb_xim_t *im, G_GNUC_UNUSED void *user_data) { + RofiViewState *state = rofi_view_get_active(); + uint32_t input_style = XCB_IM_PreeditPosition | XCB_IM_StatusArea; + xcb_point_t spot; + spot.x += widget_get_x_pos(&state->text->widget) + + textbox_get_cursor_x_pos(state->text); + spot.y += widget_get_y_pos(&state->text->widget) + + widget_get_height(&state->text->widget); + xcb_xim_nested_list nested = + xcb_xim_create_nested_list(im, XCB_XIM_XNSpotLocation, &spot, NULL); + xcb_xim_create_ic( + im, create_ic_callback, NULL, XCB_XIM_XNInputStyle, &input_style, + XCB_XIM_XNClientWindow, &CacheState.main_window, XCB_XIM_XNFocusWindow, + &CacheState.main_window, XCB_XIM_XNPreeditAttributes, &nested, NULL); + free(nested.data); +} +#endif + void __create_window(MenuFlags menu_flags) { uint32_t selmask = XCB_CW_BACK_PIXMAP | XCB_CW_BORDER_PIXEL | XCB_CW_BIT_GRAVITY | XCB_CW_BACKING_STORE | @@ -799,6 +896,15 @@ void __create_window(MenuFlags menu_flags) { XCB_GRAVITY_STATIC, XCB_BACKING_STORE_NOT_USEFUL, xcb_event_masks, map}; +#ifdef XCB_IMDKIT + xcb_xim_set_im_callback(xcb->im, &xim_callback, NULL); +#endif + +// Open connection to XIM server. +#ifdef XCB_IMDKIT + xcb_xim_open(xcb->im, open_xim_callback, true, NULL); +#endif + xcb_window_t box_window = xcb_generate_id(xcb->connection); xcb_void_cookie_t cc = xcb_create_window_checked( xcb->connection, depth->depth, box_window, xcb_stuff_get_root_window(), 0, @@ -810,6 +916,7 @@ void __create_window(MenuFlags menu_flags) { g_error("xcb_create_window() failed error=0x%x\n", error->error_code); exit(EXIT_FAILURE); } + TICK_N("xcb create window"); CacheState.gc = xcb_generate_id(xcb->connection); xcb_create_gc(xcb->connection, CacheState.gc, box_window, 0, 0); @@ -1107,6 +1214,7 @@ static void update_callback(textbox *t, icon *ico, unsigned int index, textbox_set_pango_attributes(t, list); pango_attr_list_unref(list); } + g_list_free(add_list); g_free(text); } else { @@ -1149,6 +1257,14 @@ void rofi_view_update(RofiViewState *state, gboolean qr) { cairo_set_operator(d, CAIRO_OPERATOR_OVER); widget_draw(WIDGET(state->main_window), d); +#ifdef XCB_IMDKIT + int x = widget_get_x_pos(&state->text->widget) + + textbox_get_cursor_x_pos(state->text); + int y = widget_get_y_pos(&state->text->widget) + + widget_get_height(&state->text->widget); + rofi_set_im_window_pos(x, y); +#endif + TICK_N("widgets"); cairo_surface_flush(CacheState.edit_surf); if (qr) { diff --git a/source/xcb.c b/source/xcb.c index e7959b04..db9e344a 100644 --- a/source/xcb.c +++ b/source/xcb.c @@ -30,6 +30,9 @@ #define G_LOG_DOMAIN "X11Helper" #include "config.h" +#ifdef XCB_IMDKIT +#include +#endif #include #include #include @@ -62,6 +65,7 @@ #include "xcb-internal.h" #include "xcb.h" #include +#include #include "mode.h" #include "modes/window.h" @@ -84,6 +88,9 @@ WindowManagerQuirk current_window_manager = WM_EWHM; */ struct _xcb_stuff xcb_int = {.connection = NULL, .screen = NULL, +#ifdef XCB_IMDKIT + .im = NULL, +#endif .screen_nbr = -1, .sndisplay = NULL, .sncontext = NULL, @@ -1061,6 +1068,35 @@ int monitor_active(workarea *mon) { return FALSE; } +static bool get_atom_name(xcb_connection_t *conn, xcb_atom_t atom, char **out) { + xcb_get_atom_name_cookie_t cookie; + xcb_get_atom_name_reply_t *reply; + int length; + char *name; + + if (atom == 0) { + *out = NULL; + return true; + } + + cookie = xcb_get_atom_name(conn, atom); + reply = xcb_get_atom_name_reply(conn, cookie, NULL); + if (!reply) + return false; + + length = xcb_get_atom_name_name_length(reply); + name = xcb_get_atom_name_name(reply); + + (*out) = g_strndup(name, length); + if (!(*out)) { + free(reply); + return false; + } + + free(reply); + return true; +} + /** * @param state Internal state of the menu. * @param xse X selection event. @@ -1070,7 +1106,7 @@ int monitor_active(workarea *mon) { static void rofi_view_paste(RofiViewState *state, xcb_selection_notify_event_t *xse) { if (xse->property == XCB_ATOM_NONE) { - g_warning("Failed to convert selection"); + g_debug("Failed to convert selection"); } else if (xse->property == xcb->ewmh.UTF8_STRING) { gchar *text = window_get_text_prop(xse->requestor, xcb->ewmh.UTF8_STRING); if (text != NULL && text[0] != '\0') { @@ -1085,7 +1121,13 @@ static void rofi_view_paste(RofiViewState *state, } g_free(text); } else { - g_warning("Failed"); + char *out = NULL; + if (get_atom_name(xcb->connection, xse->property, &out)) { + g_debug("rofi_view_paste: Got unknown atom: %s", out); + g_free(out); + } else { + g_debug("rofi_view_paste: Got unknown, unnamed: %s", out); + } } } @@ -1142,6 +1184,32 @@ static gboolean x11_button_to_nk_bindings_scroll(guint32 x11_button, return TRUE; } +static void rofi_key_press_event_handler(xcb_key_press_event_t *xkpe, + RofiViewState *state) { + gchar *text; + + xcb->last_timestamp = xkpe->time; + if (config.xserver_i300_workaround) { + text = nk_bindings_seat_handle_key_with_modmask( + xcb->bindings_seat, NULL, xkpe->state, xkpe->detail, + NK_BINDINGS_KEY_STATE_PRESS); + } else { + text = nk_bindings_seat_handle_key(xcb->bindings_seat, NULL, xkpe->detail, + NK_BINDINGS_KEY_STATE_PRESS); + } + if (text != NULL) { + rofi_view_handle_text(state, text); + g_free(text); + } +} + +static void rofi_key_release_event_handler(xcb_key_release_event_t *xkre, + G_GNUC_UNUSED RofiViewState *state) { + xcb->last_timestamp = xkre->time; + nk_bindings_seat_handle_key(xcb->bindings_seat, NULL, xkre->detail, + NK_BINDINGS_KEY_STATE_RELEASE); +} + /** * Process X11 events in the main-loop (gui-thread) of the application. */ @@ -1301,28 +1369,26 @@ static void main_loop_x11_event_handler_view(xcb_generic_event_t *event) { } case XCB_KEY_PRESS: { xcb_key_press_event_t *xkpe = (xcb_key_press_event_t *)event; - gchar *text; - - xcb->last_timestamp = xkpe->time; - if (config.xserver_i300_workaround) { - text = nk_bindings_seat_handle_key_with_modmask( - xcb->bindings_seat, NULL, xkpe->state, xkpe->detail, - NK_BINDINGS_KEY_STATE_PRESS); - } else { - text = nk_bindings_seat_handle_key(xcb->bindings_seat, NULL, xkpe->detail, - NK_BINDINGS_KEY_STATE_PRESS); - } - if (text != NULL) { - rofi_view_handle_text(state, text); - g_free(text); +#ifdef XCB_IMDKIT + if (xcb->ic) { + xcb_xim_forward_event(xcb->im, xcb->ic, xkpe); + } else +#endif + { + rofi_key_press_event_handler(xkpe, state); } break; } case XCB_KEY_RELEASE: { xcb_key_release_event_t *xkre = (xcb_key_release_event_t *)event; - xcb->last_timestamp = xkre->time; - nk_bindings_seat_handle_key(xcb->bindings_seat, NULL, xkre->detail, - NK_BINDINGS_KEY_STATE_RELEASE); +#ifdef XCB_IMDKIT + if (xcb->ic) { + xcb_xim_forward_event(xcb->im, xcb->ic, xkre); + } else +#endif + { + rofi_key_release_event_handler(xkre, state); + } break; } default: @@ -1331,6 +1397,25 @@ static void main_loop_x11_event_handler_view(xcb_generic_event_t *event) { rofi_view_maybe_update(state); } +#ifdef XCB_IMDKIT +void x11_event_handler_fowarding(G_GNUC_UNUSED xcb_xim_t *im, + G_GNUC_UNUSED xcb_xic_t ic, + xcb_key_press_event_t *event, + G_GNUC_UNUSED void *user_data) { + RofiViewState *state = rofi_view_get_active(); + if (state == NULL) { + return; + } + uint8_t type = event->response_type & ~0x80; + if (type == XCB_KEY_PRESS) { + rofi_key_press_event_handler(event, state); + } else if (type == XCB_KEY_RELEASE) { + xcb_key_release_event_t *xkre = (xcb_key_release_event_t *)event; + rofi_key_release_event_handler(xkre, state); + } +} +#endif + static gboolean main_loop_x11_event_handler(xcb_generic_event_t *ev, G_GNUC_UNUSED gpointer user_data) { if (ev == NULL) { @@ -1346,6 +1431,13 @@ static gboolean main_loop_x11_event_handler(xcb_generic_event_t *ev, // status); return G_SOURCE_CONTINUE; } + +#ifdef XCB_IMDKIT + if (xcb->im && xcb_xim_filter_event(xcb->im, ev)) { + return G_SOURCE_CONTINUE; + } +#endif + uint8_t type = ev->response_type & ~0x80; if (type == xcb->xkb.first_event) { switch (ev->pad0) { @@ -1375,6 +1467,7 @@ static gboolean main_loop_x11_event_handler(xcb_generic_event_t *ev, if (xcb->sndisplay != NULL) { sn_xcb_display_process_event(xcb->sndisplay, ev); } + main_loop_x11_event_handler_view(ev); return G_SOURCE_CONTINUE; } @@ -1542,6 +1635,9 @@ gboolean display_setup(GMainLoop *main_loop, NkBindings *bindings) { find_arg_str("-display", &display_str); xcb->main_loop = main_loop; +#ifdef XCB_IMDKIT + xcb_compound_text_init(); +#endif xcb->source = g_water_xcb_source_new(g_main_loop_get_context(xcb->main_loop), display_str, &xcb->screen_nbr, main_loop_x11_event_handler, NULL, NULL); @@ -1550,6 +1646,16 @@ gboolean display_setup(GMainLoop *main_loop, NkBindings *bindings) { return FALSE; } xcb->connection = g_water_xcb_source_get_connection(xcb->source); +#ifdef XCB_IMDKIT + xcb->im = xcb_xim_create(xcb->connection, xcb->screen_nbr, NULL); +#endif + +#ifdef XCB_IMDKIT +#ifndef XCB_IMDKIT_1_0_3_LOWER + xcb_xim_set_use_compound_text(xcb->im, true); + xcb_xim_set_use_utf8_string(xcb->im, true); +#endif +#endif TICK_N("Open Display"); @@ -1819,6 +1925,11 @@ void display_cleanup(void) { xcb_ewmh_connection_wipe(&(xcb->ewmh)); xcb_flush(xcb->connection); xcb_aux_sync(xcb->connection); +#ifdef XCB_IMDKIT + xcb_xim_close(xcb->im); + xcb_xim_destroy(xcb->im); + xcb->im = NULL; +#endif g_water_xcb_source_free(xcb->source); xcb->source = NULL; xcb->connection = NULL; From 690924c270845119499909aba94196c321494b91 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Fri, 11 Nov 2022 21:53:20 +0100 Subject: [PATCH 016/139] [Doc] Update support links. Remove reddit. --- README.md | 1 - configure.ac | 2 +- doc/rofi.1 | 2 -- doc/rofi.1.markdown | 1 - meson.build | 2 +- 5 files changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f20b4ed6..ed78c76a 100644 --- a/README.md +++ b/README.md @@ -232,7 +232,6 @@ for discussions. * [GitHub Discussions](https://github.com/davatorium/rofi/discussions) * IRC (#rofi on irc.libera.chat) - * [Reddit](https://reddit.com/r/qtools/) ## Stargazers over time diff --git a/configure.ac b/configure.ac index cdef673d..7da5465e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([rofi], [1.7.5-dev], [https://github.com/davatorium/rofi/],[],[https://reddit.com/r/qtools/]) +AC_INIT([rofi], [1.7.5-dev], [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/doc/rofi.1 b/doc/rofi.1 index ae26ee63..b2eb5db2 100644 --- a/doc/rofi.1 +++ b/doc/rofi.1 @@ -1567,8 +1567,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \fBrofi\fP support can be obtained: * GitHub Discussions \[la]https://github.com/davatorium/rofi/discussions\[ra] - * Forum (Reddit) -\[la]https://reddit.com/r/qtools//\[ra] * IRC \[la]irc://irc.libera.chat:6697/#rofi\[ra] (#rofi on irc.libera.chat), diff --git a/doc/rofi.1.markdown b/doc/rofi.1.markdown index 5730dbae..2f8a82e4 100644 --- a/doc/rofi.1.markdown +++ b/doc/rofi.1.markdown @@ -996,7 +996,6 @@ been released. **rofi** support can be obtained: * [GitHub Discussions](https://github.com/davatorium/rofi/discussions) - * [Forum (Reddit)](https://reddit.com/r/qtools//) * [IRC](irc://irc.libera.chat:6697/#rofi) (#rofi on irc.libera.chat), ## DEBUGGING diff --git a/meson.build b/meson.build index 2c8d476a..ab6ba486 100644 --- a/meson.build +++ b/meson.build @@ -100,7 +100,7 @@ header_conf.set_quoted('PACKAGE_VERSION', meson.project_version()) header_conf.set_quoted('VERSION', meson.project_version()) header_conf.set_quoted('GETTEXT_PACKAGE', meson.project_name()) header_conf.set_quoted('PACKAGE_BUGREPORT', 'https://github.com/davatorium/rofi/') -header_conf.set_quoted('PACKAGE_URL', 'https://reddit.com/r/qtools/') +header_conf.set_quoted('PACKAGE_URL', 'https://github.com/davatorium/rofi/discussions') header_conf.set('_GNU_SOURCE', true) From 53391da45a63301f651d8e004294387e3430f34b Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Tue, 15 Nov 2022 17:18:51 +0100 Subject: [PATCH 017/139] [Build] Add option to disable imdkit at compile time. Issue: #1742 --- configure.ac | 6 ++++++ meson.build | 32 +++++++++++++++++--------------- meson_options.txt | 1 + 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/configure.ac b/configure.ac index 7da5465e..a84c8a36 100644 --- a/configure.ac +++ b/configure.ac @@ -146,10 +146,16 @@ PKG_CHECK_MODULES([glib], [glib-2.0 >= ${glib_min_version} gio-unix-2.0 gmod AC_DEFINE_UNQUOTED([GLIB_VERSION_MIN_REQUIRED], [(G_ENCODE_VERSION(${glib_min_major},${glib_min_minor}))], [The lower GLib version supported]) AC_DEFINE_UNQUOTED([GLIB_VERSION_MAX_ALLOWED], [(G_ENCODE_VERSION(${glib_min_major},${glib_min_minor}))], [The highest GLib version supported]) GW_CHECK_XCB([xcb-aux xcb-xkb xkbcommon xkbcommon-x11 xcb-ewmh xcb-icccm xcb-cursor xcb-randr xcb-xinerama ]) + + +AC_ARG_ENABLE([imdkit], AS_HELP_STRING([--disable-imdkit], [Build with checks using check library (default: enabled)])) + +AS_IF([test "x${enable_imdkit}" != "xno"], [ PKG_CHECK_MODULES([imdclient], [xcb-imdkit <= 1.0.2 ], [AC_DEFINE([XCB_IMDKIT_1_0_3_LOWER], [1], [Indicate lower version of imdclient]) AC_DEFINE([XCB_IMDKIT],[1], [IMD Kit missing])], [PKG_CHECK_MODULES([imdclient], [xcb-imdkit >= 1.0.3],[AC_DEFINE([XCB_IMDKIT],[1], [IMD Kit missing])],[HAVE_IMDKIT=0])]) +]) PKG_CHECK_MODULES([pango], [pango pangocairo]) PKG_CHECK_MODULES([cairo], [cairo cairo-xcb]) PKG_CHECK_MODULES([libsn], [libstartup-notification-1.0 ]) diff --git a/meson.build b/meson.build index ab6ba486..5aa3d483 100644 --- a/meson.build +++ b/meson.build @@ -74,25 +74,27 @@ deps += [ dependency('libstartup-notification-1.0'), ] -imdkit_new = dependency('xcb-imdkit', version: '>= 1.0.3', required: false) -imdkit_old = dependency('xcb-imdkit', version: '<= 1.0.2', required: false) +header_conf = configuration_data() +if get_option('imdkit') + imdkit_new = dependency('xcb-imdkit', version: '>= 1.0.3', required: false) + imdkit_old = dependency('xcb-imdkit', version: '<= 1.0.2', required: false) + if imdkit_new.found() + deps += imdkit_new + header_conf.set('XCB_IMDKIT_1_0_3_LOWER', false) + header_conf.set('XCB_IMDKIT', true) + elif imdkit_old.found() + deps+= imdkit_old + header_conf.set('XCB_IMDKIT_1_0_3_LOWER', true) + header_conf.set('XCB_IMDKIT', true) + else + header_conf.set('XCB_IMDKIT_1_0_3_LOWER', false) + header_conf.set('XCB_IMDKIT', false) + endif +endif check = dependency('check', version: '>= 0.11.0', required: get_option('check')) -header_conf = configuration_data() -if imdkit_new.found() - deps += imdkit_new - header_conf.set('XCB_IMDKIT_1_0_3_LOWER', false) - header_conf.set('XCB_IMDKIT', true) -elif imdkit_old.found() - deps+= imdkit_old - header_conf.set('XCB_IMDKIT_1_0_3_LOWER', true) - header_conf.set('XCB_IMDKIT', true) -else - header_conf.set('XCB_IMDKIT_1_0_3_LOWER', false) - header_conf.set('XCB_IMDKIT', false) -endif header_conf.set_quoted('PACKAGE_NAME', meson.project_name()) diff --git a/meson_options.txt b/meson_options.txt index 08fb0de0..9ca68fc6 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,4 @@ option('drun', type: 'boolean', value: true, description: 'Desktop file mode') option('window', type: 'boolean', value: true, description: 'Window switcher mode') option('check', type: 'feature', description: 'Build and run libcheck-based tests') +option('imdkit', type: 'boolean', value: true, description: 'IMDKit support') From fb80595725054c5f592b0348c0d4457d1a835963 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Thu, 17 Nov 2022 11:25:45 +0100 Subject: [PATCH 018/139] [Build] Add option to build with lto to meson. Fix error in test. Issue: #1743 --- meson.build | 7 +++++++ meson_options.txt | 1 + test/box-test.c | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 5aa3d483..185224a3 100644 --- a/meson.build +++ b/meson.build @@ -30,6 +30,13 @@ foreach f : flags endif endforeach +if get_option('lto') + add_project_arguments('-flto', language: 'c') + add_project_arguments('-Werror=odr', language: 'c') + add_project_arguments('-Werror=lto-type-mismatch', language: 'c') + add_project_arguments('-Werror=strict-aliasing', language: 'c') +endif + plugindir = join_paths(get_option('libdir'), meson.project_name()) themedir = join_paths(get_option('datadir'), meson.project_name(), 'themes') desktop_install_dir = join_paths(get_option('datadir'), 'applications') diff --git a/meson_options.txt b/meson_options.txt index 9ca68fc6..09e89b5a 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -2,3 +2,4 @@ option('drun', type: 'boolean', value: true, description: 'Desktop file mode') option('window', type: 'boolean', value: true, description: 'Window switcher mode') option('check', type: 'feature', description: 'Build and run libcheck-based tests') option('imdkit', type: 'boolean', value: true, description: 'IMDKit support') +option('lto', type: 'boolean', value: false, description: 'Compile with lto') diff --git a/test/box-test.c b/test/box-test.c index dafc526f..12b83200 100644 --- a/test/box-test.c +++ b/test/box-test.c @@ -97,8 +97,8 @@ char *helper_get_theme_path(const char *file, G_GNUC_UNUSED const char *ext) { } void rofi_add_error_message(G_GNUC_UNUSED GString *msg) {} void rofi_add_warning_message(G_GNUC_UNUSED GString *msg) {} -int textbox_get_estimated_char_height(void); -int textbox_get_estimated_char_height(void) { return 16; } +double textbox_get_estimated_char_height(void); +double textbox_get_estimated_char_height(void) { return 16; } double textbox_get_estimated_ch(void); double textbox_get_estimated_ch(void) { return 8; } void rofi_view_get_current_monitor(G_GNUC_UNUSED int *width, From c82754307cd160e692b0892490849c11849f9ce4 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Thu, 17 Nov 2022 12:03:01 +0100 Subject: [PATCH 019/139] [Window] Fix reloading windowcd from xserver request --- source/modes/window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/modes/window.c b/source/modes/window.c index bc2bc9ae..39070b74 100644 --- a/source/modes/window.c +++ b/source/modes/window.c @@ -395,8 +395,8 @@ static gboolean window_client_reload(G_GNUC_UNUSED void *data) { window_mode._init(&window_mode); } if (window_mode_cd.private_data) { - window_mode._destroy(&window_mode_cd); - window_mode._init(&window_mode_cd); + window_mode_cd._destroy(&window_mode_cd); + window_mode_cd._init(&window_mode_cd); } if (window_mode.private_data || window_mode_cd.private_data) { rofi_view_reload(); From c9faa69a1b5b2f01bb6939d11db7cc43d6ec5552 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Thu, 17 Nov 2022 12:13:14 +0100 Subject: [PATCH 020/139] [Build] Use built-in lto option. --- meson.build | 3 +-- meson_options.txt | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 185224a3..4cc7b7c8 100644 --- a/meson.build +++ b/meson.build @@ -30,8 +30,7 @@ foreach f : flags endif endforeach -if get_option('lto') - add_project_arguments('-flto', language: 'c') +if get_option('b_lto') add_project_arguments('-Werror=odr', language: 'c') add_project_arguments('-Werror=lto-type-mismatch', language: 'c') add_project_arguments('-Werror=strict-aliasing', language: 'c') diff --git a/meson_options.txt b/meson_options.txt index 09e89b5a..9ca68fc6 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -2,4 +2,3 @@ option('drun', type: 'boolean', value: true, description: 'Desktop file mode') option('window', type: 'boolean', value: true, description: 'Window switcher mode') option('check', type: 'feature', description: 'Build and run libcheck-based tests') option('imdkit', type: 'boolean', value: true, description: 'IMDKit support') -option('lto', type: 'boolean', value: false, description: 'Compile with lto') From 0bbccc31370f6b86e72b26da1afcd6a21e3cc9a8 Mon Sep 17 00:00:00 2001 From: cognitiond <118043135+cognitiond@users.noreply.github.com> Date: Thu, 17 Nov 2022 14:36:13 +0000 Subject: [PATCH 021/139] Build documentation (#1744) * explain how to pass options to meson * fix typo in INSTALL.md --- INSTALL.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index dd7a5401..aff74e02 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -109,11 +109,15 @@ From this point, use the same steps you use for a release. ## Options for configure When you run the configure step there are several options you can configure. -For Autotools, you can see the full list with `./configure --help`. -For Meson, before the initial setup, you can see rofi options in `meson_options.txt` and Meson options with `meson setup --help`. -After the initial setup, use `meson configure build`. -The most useful one to set the installation prefix: +For Autotools, you can see the full list with `./configure --help`. + +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: # Autotools ../configure --prefix= From 96e81d1b56b1bbc61be8ee720937dd0f0abfd4ad Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Thu, 17 Nov 2022 17:49:16 +0100 Subject: [PATCH 022/139] Disable imdkit by default --- configure.ac | 4 ++-- meson_options.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index a84c8a36..908b2f80 100644 --- a/configure.ac +++ b/configure.ac @@ -148,9 +148,9 @@ AC_DEFINE_UNQUOTED([GLIB_VERSION_MAX_ALLOWED], [(G_ENCODE_VERSION(${glib_min_maj GW_CHECK_XCB([xcb-aux xcb-xkb xkbcommon xkbcommon-x11 xcb-ewmh xcb-icccm xcb-cursor xcb-randr xcb-xinerama ]) -AC_ARG_ENABLE([imdkit], AS_HELP_STRING([--disable-imdkit], [Build with checks using check library (default: enabled)])) +AC_ARG_ENABLE([imdkit], AS_HELP_STRING([--enable-imdkit], [Build with checks using check library (default: disabled)])) -AS_IF([test "x${enable_imdkit}" != "xno"], [ +AS_IF([test "x${enable_imdkit}" = "xyes"], [ PKG_CHECK_MODULES([imdclient], [xcb-imdkit <= 1.0.2 ], [AC_DEFINE([XCB_IMDKIT_1_0_3_LOWER], [1], [Indicate lower version of imdclient]) AC_DEFINE([XCB_IMDKIT],[1], [IMD Kit missing])], diff --git a/meson_options.txt b/meson_options.txt index 9ca68fc6..519ea3cc 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,4 +1,4 @@ option('drun', type: 'boolean', value: true, description: 'Desktop file mode') option('window', type: 'boolean', value: true, description: 'Window switcher mode') option('check', type: 'feature', description: 'Build and run libcheck-based tests') -option('imdkit', type: 'boolean', value: true, description: 'IMDKit support') +option('imdkit', type: 'boolean', value: false, description: 'IMDKit support') From c6ba962673df73ecac1dfd3b84afb36b06c38eb4 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Fri, 18 Nov 2022 08:46:16 +0100 Subject: [PATCH 023/139] [listview] Set ellipsize mode on creation of textbox So if rows are added, they behave correctily. Issue: #1746 --- source/widgets/listview.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/widgets/listview.c b/source/widgets/listview.c index 52146702..fe2cb496 100644 --- a/source/widgets/listview.c +++ b/source/widgets/listview.c @@ -175,6 +175,7 @@ static void listview_add_widget(listview *lv, _listview_row *row, widget *wid, row->textbox = textbox_create(WIDGET(wid), WIDGET_TYPE_TEXTBOX_TEXT, "element-text", TB_AUTOHEIGHT | flags, NORMAL, "DDD", 0, 0); + textbox_set_ellipsize(row->textbox, lv->emode); box_add((box *)wid, WIDGET(row->textbox), TRUE); } else if (strcasecmp(label, "element-index") == 0) { row->index = From 30d50e3bdc7baddb8a9a2df8f1e7550ac4453d56 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Fri, 18 Nov 2022 17:01:05 +0100 Subject: [PATCH 024/139] Move doxy-coverage to davatorium version --- .github/actions/doxycheck/action.yml | 2 +- .github/actions/setup/action.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/doxycheck/action.yml b/.github/actions/doxycheck/action.yml index 63a4c649..7e50dec8 100644 --- a/.github/actions/doxycheck/action.yml +++ b/.github/actions/doxycheck/action.yml @@ -20,5 +20,5 @@ runs: exit 1 fi - python2 ./doxy-coverage/doxy-coverage.py builddir/doc/html/xml/ + python ./doxy-coverage/doxy-coverage.py builddir/doc/html/xml/ shell: bash diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 14973be3..d5518a18 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -45,7 +45,7 @@ runs: xutils-dev shell: bash - id: doxy - run: git clone https://github.com/alobbs/doxy-coverage + run: git clone https://github.com/davatorium/doxy-coverage shell: bash - id: check run: | From 66d782e0e7c3e719275fc220dcef7dbb125a0513 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Thu, 17 Nov 2022 13:21:15 +0100 Subject: [PATCH 025/139] Move config.h small updates Tweak header a bit [CI] Add lto build to sh ci. [CI] Fix artifact upload [CI] no wildcard for artifact --- .build.yml | 4 +-- include/xcb.h | 1 - source/history.c | 1 + source/keyb.c | 45 ++++++++++++++++------------- source/modes/dmenu.c | 1 + source/modes/drun.c | 2 +- source/modes/filebrowser.c | 1 + source/modes/help-keys.c | 2 +- source/modes/run.c | 2 +- source/modes/ssh.c | 2 +- source/modes/window.c | 2 +- source/widgets/container.c | 1 + source/widgets/icon.c | 1 + source/widgets/listview.c | 2 +- source/widgets/textbox.c | 1 + source/widgets/widget.c | 1 + source/xcb.c | 2 ++ test/helper-config-cmdline-parser.c | 1 + test/helper-expand.c | 2 +- test/helper-test.c | 2 ++ test/textbox-test.c | 1 + 21 files changed, 47 insertions(+), 30 deletions(-) diff --git a/.build.yml b/.build.yml index 1519618e..4f0c2cf6 100644 --- a/.build.yml +++ b/.build.yml @@ -27,7 +27,7 @@ sources: tasks: - setup: | cd rofi - meson setup builddir . + meson setup builddir . -Db_lto=true - build: | ninja -C rofi/builddir - test: | @@ -38,4 +38,4 @@ tasks: - dist: | ninja -C rofi/builddir dist artifacts: - - rofi/builddir/meson-dist/rofi-1.7.3-dev.tar.xz + - rofi/builddir/meson-dist/rofi-1.7.5-dev.tar.xz diff --git a/include/xcb.h b/include/xcb.h index 2b847645..f681eaae 100644 --- a/include/xcb.h +++ b/include/xcb.h @@ -29,7 +29,6 @@ #define ROFI_XCB_H #include -#include #ifdef XCB_IMDKIT #include #endif diff --git a/source/history.c b/source/history.c index 56c68e2d..cc992dae 100644 --- a/source/history.c +++ b/source/history.c @@ -24,6 +24,7 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ +#include "config.h" #include "history.h" #include "rofi.h" diff --git a/source/keyb.c b/source/keyb.c index a3eac3d1..4ae01753 100644 --- a/source/keyb.c +++ b/source/keyb.c @@ -24,11 +24,12 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ +#include "config.h" #include "rofi.h" #include "xrmoptions.h" #include +#include #include -#include "nkutils-bindings.h" typedef struct { guint id; @@ -372,7 +373,7 @@ static const gchar *mouse_default_bindings[] = { [MOUSE_DCLICK_UP] = "!MouseDPrimary", }; -void abe_list_all_bindings(gboolean is_term ) { +void abe_list_all_bindings(gboolean is_term) { int length = 0; for (gsize i = 0; i < G_N_ELEMENTS(rofi_bindings); ++i) { @@ -383,9 +384,10 @@ void abe_list_all_bindings(gboolean is_term ) { for (gsize i = 0; i < G_N_ELEMENTS(rofi_bindings); ++i) { ActionBindingEntry *b = &rofi_bindings[i]; if (is_term) { - printf("%s%*s%s - %s\n", color_bold,length, b->name, color_reset,b->binding); + printf("%s%*s%s - %s\n", color_bold, length, b->name, color_reset, + b->binding); } else { - printf("%*s - %s\n", length, b->name, b->binding); + printf("%*s - %s\n", length, b->name, b->binding); } } } @@ -439,22 +441,25 @@ gboolean parse_keys_abe(NkBindings *bindings) { if (!nk_bindings_add_binding(bindings, b->scope, entry, binding_check_action, binding_trigger_action, GUINT_TO_POINTER(b->id), NULL, &error)) { - if ( error->code == NK_BINDINGS_ERROR_ALREADY_REGISTERED && error->domain == NK_BINDINGS_ERROR){ - char *str = g_markup_printf_escaped( - "Failed to set binding %s for: %s (%s):\n\tBinding `%s` is already bound.\n" - "\tExecute rofi -list-keybindings to get the current list of configured bindings.\n", - b->binding, b->comment, b->name, entry); - g_string_append(error_msg, str); - g_free(str); - } else { - char *str = g_markup_printf_escaped( - "Failed to set binding %s for: %s (%s):\n\t%s\n", - b->binding, b->comment, b->name, error->message); - g_string_append(error_msg, str); - g_free(str); - } + if (error->code == NK_BINDINGS_ERROR_ALREADY_REGISTERED && + error->domain == NK_BINDINGS_ERROR) { + char *str = g_markup_printf_escaped( + "Failed to set binding %s for: %s (%s):\n\tBinding `%s` is already " + "bound.\n" + "\tExecute rofi -list-keybindings to get the current list " + "of configured bindings.\n", + b->binding, b->comment, b->name, entry); + g_string_append(error_msg, str); + g_free(str); + } else { + char *str = g_markup_printf_escaped( + "Failed to set binding %s for: %s (%s):\n\t%s\n", + b->binding, b->comment, b->name, error->message); + g_string_append(error_msg, str); + g_free(str); + } g_clear_error(&error); } } diff --git a/source/modes/dmenu.c b/source/modes/dmenu.c index d6431f55..f5b667a3 100644 --- a/source/modes/dmenu.c +++ b/source/modes/dmenu.c @@ -27,6 +27,7 @@ /** The log domain of this dialog. */ #define G_LOG_DOMAIN "Modes.DMenu" +#include "config.h" #include "modes/dmenu.h" #include "helper.h" diff --git a/source/modes/drun.c b/source/modes/drun.c index c0bab187..fc4d990b 100644 --- a/source/modes/drun.c +++ b/source/modes/drun.c @@ -28,7 +28,7 @@ /** The log domain of this dialog. */ #define G_LOG_DOMAIN "Modes.DRun" -#include +#include "config.h" #ifdef ENABLE_DRUN #include #include diff --git a/source/modes/filebrowser.c b/source/modes/filebrowser.c index 21ae13b9..df3c8c12 100644 --- a/source/modes/filebrowser.c +++ b/source/modes/filebrowser.c @@ -23,6 +23,7 @@ * 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 #include #include diff --git a/source/modes/help-keys.c b/source/modes/help-keys.c index 3659209d..26b9b617 100644 --- a/source/modes/help-keys.c +++ b/source/modes/help-keys.c @@ -25,7 +25,7 @@ * */ -#include +#include "config.h" #include #include diff --git a/source/modes/run.c b/source/modes/run.c index 1393471f..198673e1 100644 --- a/source/modes/run.c +++ b/source/modes/run.c @@ -33,7 +33,7 @@ /** The log domain of this dialog. */ #define G_LOG_DOMAIN "Modes.Run" -#include +#include "config.h" #include #include diff --git a/source/modes/ssh.c b/source/modes/ssh.c index 261e5c3c..5a1867ef 100644 --- a/source/modes/ssh.c +++ b/source/modes/ssh.c @@ -35,7 +35,7 @@ */ #define G_LOG_DOMAIN "Modes.Ssh" -#include +#include "config.h" #include #include #include diff --git a/source/modes/window.c b/source/modes/window.c index 39070b74..1ff3a98d 100644 --- a/source/modes/window.c +++ b/source/modes/window.c @@ -28,7 +28,7 @@ /** The log domain of this dialog. */ #define G_LOG_DOMAIN "Modes.Window" -#include +#include "config.h" #ifdef WINDOW_MODE diff --git a/source/widgets/container.c b/source/widgets/container.c index b5f6656c..a97ab740 100644 --- a/source/widgets/container.c +++ b/source/widgets/container.c @@ -27,6 +27,7 @@ /** The log domain of this widget. */ #define G_LOG_DOMAIN "Widgets.Container" +#include "config.h" #include "widgets/container.h" #include "theme.h" diff --git a/source/widgets/icon.c b/source/widgets/icon.c index a669d220..0900fff4 100644 --- a/source/widgets/icon.c +++ b/source/widgets/icon.c @@ -27,6 +27,7 @@ /** The log domain of this widget. */ #define G_LOG_DOMAIN "Widgets.Icon" +#include "config.h" #include "widgets/icon.h" #include "theme.h" diff --git a/source/widgets/listview.c b/source/widgets/listview.c index fe2cb496..0668b8da 100644 --- a/source/widgets/listview.c +++ b/source/widgets/listview.c @@ -25,7 +25,7 @@ * */ -#include +#include "config.h" #include #include #include diff --git a/source/widgets/textbox.c b/source/widgets/textbox.c index 758e32d5..e8f178ce 100644 --- a/source/widgets/textbox.c +++ b/source/widgets/textbox.c @@ -25,6 +25,7 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ +#include "config.h" #include "widgets/textbox.h" #include "helper-theme.h" diff --git a/source/widgets/widget.c b/source/widgets/widget.c index 29812a61..bc2be61e 100644 --- a/source/widgets/widget.c +++ b/source/widgets/widget.c @@ -24,6 +24,7 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ +#include "config.h" #include "widgets/widget.h" #include "theme.h" diff --git a/source/xcb.c b/source/xcb.c index db9e344a..6c8515cb 100644 --- a/source/xcb.c +++ b/source/xcb.c @@ -1187,6 +1187,7 @@ static gboolean x11_button_to_nk_bindings_scroll(guint32 x11_button, static void rofi_key_press_event_handler(xcb_key_press_event_t *xkpe, RofiViewState *state) { gchar *text; + g_log("IMDKit", G_LOG_LEVEL_DEBUG, "press handler"); xcb->last_timestamp = xkpe->time; if (config.xserver_i300_workaround) { @@ -1371,6 +1372,7 @@ static void main_loop_x11_event_handler_view(xcb_generic_event_t *event) { xcb_key_press_event_t *xkpe = (xcb_key_press_event_t *)event; #ifdef XCB_IMDKIT if (xcb->ic) { + g_log("IMDKit", G_LOG_LEVEL_DEBUG, "input xim"); xcb_xim_forward_event(xcb->im, xcb->ic, xkpe); } else #endif diff --git a/test/helper-config-cmdline-parser.c b/test/helper-config-cmdline-parser.c index 4cbfe78f..7c3048d4 100644 --- a/test/helper-config-cmdline-parser.c +++ b/test/helper-config-cmdline-parser.c @@ -24,6 +24,7 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ +#include "config.h" #include "display.h" #include "rofi-icon-fetcher.h" diff --git a/test/helper-expand.c b/test/helper-expand.c index 60c0079e..e80d1a24 100644 --- a/test/helper-expand.c +++ b/test/helper-expand.c @@ -24,7 +24,7 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ - +#include "config.h" #include "display.h" #include "rofi-icon-fetcher.h" #include "rofi.h" diff --git a/test/helper-test.c b/test/helper-test.c index 4e81b937..1aca07e7 100644 --- a/test/helper-test.c +++ b/test/helper-test.c @@ -25,6 +25,8 @@ * */ +#include "config.h" + #include "display.h" #include "rofi-icon-fetcher.h" #include "rofi.h" diff --git a/test/textbox-test.c b/test/textbox-test.c index 737db4f0..0ddfc50f 100644 --- a/test/textbox-test.c +++ b/test/textbox-test.c @@ -25,6 +25,7 @@ * */ +#include "config.h" #include #include From 063195922f667a1d25efdb3ccdbd426fcf62cb9f Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Sat, 19 Nov 2022 21:03:22 +0100 Subject: [PATCH 026/139] [DMenu] Add -ellipsize-mode option. --- doc/rofi-dmenu.5 | 9 +++++++++ doc/rofi-dmenu.5.markdown | 6 ++++++ include/view.h | 6 +++++- include/widgets/listview.h | 3 ++- pkgconfig/rofi.pc.in | 2 +- source/modes/dmenu.c | 22 +++++++++++++++++++--- source/view.c | 5 +++-- source/widgets/listview.c | 4 ++-- 8 files changed, 47 insertions(+), 10 deletions(-) diff --git a/doc/rofi-dmenu.5 b/doc/rofi-dmenu.5 index 674f949e..c11dc96c 100644 --- a/doc/rofi-dmenu.5 +++ b/doc/rofi-dmenu.5 @@ -298,6 +298,15 @@ When multi-select is enabled, prefix this string when element is not selected. .PP \fIdefault\fP: "☐ " +.PP +\fB\fC-ellipsize-mode\fR (start|middle|end) + +.PP +Set ellipsize mode on the listview. + +.PP +\fIdefault\fP "end" + .SH PARSING ROW OPTIONS .PP Extra options for individual rows can be also set. See the \fBrofi-script(5)\fP manpage for details; the syntax and supported features are identical. diff --git a/doc/rofi-dmenu.5.markdown b/doc/rofi-dmenu.5.markdown index f9732a5d..ff2f0203 100644 --- a/doc/rofi-dmenu.5.markdown +++ b/doc/rofi-dmenu.5.markdown @@ -192,6 +192,12 @@ 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. diff --git a/include/view.h b/include/view.h index 9ca8bfbf..17326a1e 100644 --- a/include/view.h +++ b/include/view.h @@ -29,6 +29,7 @@ #define ROFI_VIEW_H #include "mode.h" +#include #include /** * @defgroup View View @@ -338,9 +339,12 @@ void rofi_capture_screenshot(void); void rofi_view_set_window_title(const char *title); /** + @param state The window state handle + @param mode The pango ellipsize mode to user * set ellipsize mode to start. */ -void rofi_view_ellipsize_start(RofiViewState *state); +void rofi_view_ellipsize_listview(RofiViewState *state, + PangoEllipsizeMode mode); /** * @param new_x New XIM window x pos diff --git a/include/widgets/listview.h b/include/widgets/listview.h index ad44f15c..5ffb4f31 100644 --- a/include/widgets/listview.h +++ b/include/widgets/listview.h @@ -29,6 +29,7 @@ #define ROFI_LISTVIEW_H #include "widgets/textbox.h" +#include /** * @defgroup listview listview @@ -276,7 +277,7 @@ void listview_toggle_ellipsizing(listview *lv); * Set ellipsize mode to start. */ -void listview_set_ellipsize_start(listview *lv); +void listview_set_ellipsize(listview *lv, PangoEllipsizeMode mode); /** * @param lv Handler to the listview object. diff --git a/pkgconfig/rofi.pc.in b/pkgconfig/rofi.pc.in index 0c290594..59fb53b2 100644 --- a/pkgconfig/rofi.pc.in +++ b/pkgconfig/rofi.pc.in @@ -7,6 +7,6 @@ pluginsdir=@libdir@/rofi/ Name: rofi Description: Header files for rofi plugins -Requires.private: glib-2.0 >= 2.40 gmodule-2.0 cairo +Requires.private: glib-2.0 >= 2.40 gmodule-2.0 cairo pango Version: @VERSION@ Cflags: -I${includedir}/ diff --git a/source/modes/dmenu.c b/source/modes/dmenu.c index f5b667a3..ee5e9288 100644 --- a/source/modes/dmenu.c +++ b/source/modes/dmenu.c @@ -29,8 +29,8 @@ #define G_LOG_DOMAIN "Modes.DMenu" #include "config.h" -#include "modes/dmenu.h" #include "helper.h" +#include "modes/dmenu.h" #include "rofi-icon-fetcher.h" #include "rofi.h" #include "settings.h" @@ -299,7 +299,7 @@ static gpointer read_input_thread(gpointer userdata) { i = 0; if (block) { double elapsed = g_timer_elapsed(tim, NULL); - if ( elapsed >= 0.1 || block->length == BLOCK_LINES_SIZE) { + if (elapsed >= 0.1 || block->length == BLOCK_LINES_SIZE) { g_timer_start(tim); g_async_queue_push(pd->async_queue, block); block = NULL; @@ -957,7 +957,21 @@ int dmenu_mode_dialog(void) { rofi_view_create(&dmenu_mode, input, menu_flags, dmenu_finalize); if (find_arg("-keep-right") >= 0) { - rofi_view_ellipsize_start(state); + rofi_view_ellipsize_listview(state, PANGO_ELLIPSIZE_START); + } + char *ellipsize_mode = NULL; + if (find_arg_str("-ellipsize-mode", &ellipsize_mode) >= 0) { + if (ellipsize_mode) { + if (g_ascii_strcasecmp(ellipsize_mode, "start") == 0) { + rofi_view_ellipsize_listview(state, PANGO_ELLIPSIZE_START); + } else if (g_ascii_strcasecmp(ellipsize_mode, "middle") == 0) { + rofi_view_ellipsize_listview(state, PANGO_ELLIPSIZE_MIDDLE); + } else if (g_ascii_strcasecmp(ellipsize_mode, "end") == 0) { + rofi_view_ellipsize_listview(state, PANGO_ELLIPSIZE_END); + } else { + g_warning("Unrecognized ellipsize mode: '%s'", ellipsize_mode); + } + } } rofi_view_set_selected_line(state, pd->selected_line); rofi_view_set_active(state); @@ -1021,4 +1035,6 @@ void print_dmenu_options(void) { "When multi-select is enabled prefix this string when element " "is not selected.", NULL, is_term); + print_help_msg("-ellipsize-mode", "end", + "Set ellipsize mode(start | middle | end).", NULL, is_term); } diff --git a/source/view.c b/source/view.c index 1c432891..491c1404 100644 --- a/source/view.c +++ b/source/view.c @@ -2499,8 +2499,9 @@ void rofi_view_clear_input(RofiViewState *state) { } } -void rofi_view_ellipsize_start(RofiViewState *state) { - listview_set_ellipsize_start(state->list_view); +void rofi_view_ellipsize_listview(RofiViewState *state, + PangoEllipsizeMode mode) { + listview_set_ellipsize(state->list_view, mode); } void rofi_view_switch_mode(RofiViewState *state, Mode *mode) { diff --git a/source/widgets/listview.c b/source/widgets/listview.c index 0668b8da..79e81893 100644 --- a/source/widgets/listview.c +++ b/source/widgets/listview.c @@ -1104,9 +1104,9 @@ void listview_set_fixed_num_lines(listview *lv) { } } -void listview_set_ellipsize_start(listview *lv) { +void listview_set_ellipsize(listview *lv, PangoEllipsizeMode mode) { if (lv) { - lv->emode = PANGO_ELLIPSIZE_START; + lv->emode = mode; for (unsigned int i = 0; i < lv->cur_elements; i++) { textbox_set_ellipsize(lv->boxes[i].textbox, lv->emode); } From d9935e594e913f6d5399e245f32bda68eb9b46ae Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Sat, 19 Nov 2022 21:50:34 +0100 Subject: [PATCH 027/139] [Doc] Fix some missing docu. --- include/keyb.h | 3 +++ include/theme.h | 19 ++++++++++++++++++- include/view-internal.h | 2 ++ include/widgets/textbox.h | 3 ++- include/widgets/widget-internal.h | 27 +++++++++++++-------------- include/widgets/widget.h | 6 ++++-- include/xcb.h | 5 +++++ source/modes/dmenu.c | 2 ++ source/modes/script.c | 11 +++++++++-- source/rofi.c | 1 + source/theme.c | 9 +++++++++ source/view.c | 4 ++++ source/xcb.c | 3 ++- 13 files changed, 74 insertions(+), 21 deletions(-) diff --git a/include/keyb.h b/include/keyb.h index b2d3b323..8aaeaa76 100644 --- a/include/keyb.h +++ b/include/keyb.h @@ -186,6 +186,9 @@ gboolean parse_keys_abe(NkBindings *bindings); */ void setup_abe(void); +/** + * List all available key bindings to the terminal. + */ void abe_list_all_bindings(gboolean is_term); /** * @param name Don't have the name. diff --git a/include/theme.h b/include/theme.h index 45faa67c..ec12390b 100644 --- a/include/theme.h +++ b/include/theme.h @@ -142,9 +142,11 @@ void rofi_theme_property_free(Property *p); /** * @param p The property to free. * + * Make a newly allocted copy of the property. + * * @returns a copy of p */ -Property *rofi_theme_property_copy(const Property *p, void *); +Property *rofi_theme_property_copy(const Property *p, G_GNUC_UNUSED void *); /** * @param widget * @@ -463,9 +465,24 @@ void rofi_theme_free_parsed_files(void); void rofi_theme_print_parsed_files(int is_term); /** + * @param widget The widget handle. + * @param property The property to query. + * * Returns a list of allocated RofiDistance objects that should be * freed. + * + * @returns a GList of RofiDistance objects. */ GList *rofi_theme_get_list_distance(const widget *widget, const char *property); + +/** + * @param widget The widget handle. + * @param property The property to query. + * + * Returns a list of allocated strings othat should be + * freed. + * + * @returns a GList of strings. + */ GList *rofi_theme_get_list_strings(const widget *widget, const char *property); #endif diff --git a/include/view-internal.h b/include/view-internal.h index 28ab47f3..7779ae3b 100644 --- a/include/view-internal.h +++ b/include/view-internal.h @@ -107,7 +107,9 @@ struct RofiViewState { /** filtered rows */ textbox *tb_filtered_rows; + /** Extra icon widget that shows the current selected entries text. */ textbox *tb_current_entry; + /** Extra icon widget that shows the current selected entries icon. */ icon *icon_current_entry; /** Settings of the menu */ diff --git a/include/widgets/textbox.h b/include/widgets/textbox.h index a3383208..d5695c0b 100644 --- a/include/widgets/textbox.h +++ b/include/widgets/textbox.h @@ -313,6 +313,7 @@ PangoAttrList *textbox_get_pango_attributes(textbox *tb); * @returns the visible text. */ const char *textbox_get_visible_text(const textbox *tb); + /** * @param wid The handle to the textbox. * @param height The height we want the desired width for @@ -321,7 +322,7 @@ const char *textbox_get_visible_text(const textbox *tb); * * @returns the desired width of the textbox. */ -int textbox_get_desired_width(widget *wid, const int height); +int textbox_get_desired_width(widget *wid, G_GNUC_UNUSED const int height); /** * @param tb Handle to the textbox diff --git a/include/widgets/widget-internal.h b/include/widgets/widget-internal.h index f7b7c25f..8cc0a295 100644 --- a/include/widgets/widget-internal.h +++ b/include/widgets/widget-internal.h @@ -32,23 +32,22 @@ /** Macro for initializing the RofiDistance struct. */ #define WIDGET_DISTANCE_INIT \ - (RofiDistance){ \ - .base = { \ - .distance = 0, \ - .type = ROFI_PU_PX, \ - .modtype = ROFI_DISTANCE_MODIFIER_NONE, \ - .left = NULL, \ - .right = NULL, \ - }, \ + (RofiDistance) { \ + .base = \ + { \ + .distance = 0, \ + .type = ROFI_PU_PX, \ + .modtype = ROFI_DISTANCE_MODIFIER_NONE, \ + .left = NULL, \ + .right = NULL, \ + }, \ .style = ROFI_HL_SOLID, \ } -/* Macro for initializing the RofiPadding struct. */ +/** Macro for initializing the RofiPadding struct. */ #define WIDGET_PADDING_INIT \ - (RofiPadding){ \ - .top = WIDGET_DISTANCE_INIT, \ - .right = WIDGET_DISTANCE_INIT, \ - .bottom = WIDGET_DISTANCE_INIT, \ - .left = WIDGET_DISTANCE_INIT, \ + (RofiPadding) { \ + .top = WIDGET_DISTANCE_INIT, .right = WIDGET_DISTANCE_INIT, \ + .bottom = WIDGET_DISTANCE_INIT, .left = WIDGET_DISTANCE_INIT, \ } /** diff --git a/include/widgets/widget.h b/include/widgets/widget.h index f41437b1..28edb33a 100644 --- a/include/widgets/widget.h +++ b/include/widgets/widget.h @@ -284,8 +284,10 @@ widget *widget_find_mouse_target(widget *wid, WidgetType type, gint x, gint y); * * @returns Whether the action would be handled or not */ -WidgetTriggerActionResult widget_check_action(widget *wid, guint action, gint x, - gint y); +WidgetTriggerActionResult widget_check_action(widget *wid, + G_GNUC_UNUSED guint action, + G_GNUC_UNUSED gint x, + G_GNUC_UNUSED gint y); /** * @param wid The widget handle diff --git a/include/xcb.h b/include/xcb.h index f681eaae..4f67b9f3 100644 --- a/include/xcb.h +++ b/include/xcb.h @@ -44,6 +44,11 @@ typedef struct _xcb_stuff xcb_stuff; */ extern xcb_stuff *xcb; +/** + * @param data String to copy to clipboard. + * + * copies string to clipboard. + */ void xcb_stuff_set_clipboard(char *data); /** diff --git a/source/modes/dmenu.c b/source/modes/dmenu.c index ee5e9288..e6245013 100644 --- a/source/modes/dmenu.c +++ b/source/modes/dmenu.c @@ -114,6 +114,8 @@ typedef struct { char *ballot_unselected; } DmenuModePrivateData; +/** Maximum number of lines rofi parses async before it pushes it to the main + * thread. */ #define BLOCK_LINES_SIZE 2048 typedef struct { unsigned int length; diff --git a/source/modes/script.c b/source/modes/script.c index 5a705c36..5e2131de 100644 --- a/source/modes/script.c +++ b/source/modes/script.c @@ -463,12 +463,19 @@ static cairo_surface_t *script_get_icon(const Mode *sw, #include "mode-private.h" +/** Structure that holds a user script + * found in $config/rofi/scripts/ + */ typedef struct ScriptUser { + /** name of the script */ char *name; + /** path to the script. */ char *path; } ScriptUser; +/** list of user_scripts. */ ScriptUser *user_scripts = NULL; +/** number of user scripts collected */ size_t num_scripts = 0; void script_mode_cleanup(void) { @@ -538,10 +545,10 @@ Mode *script_mode_parse_setup(const char *str) { unsigned int index = 0; const char *const sep = ":"; char **tokens = g_strsplit(str, sep, 2); - if ( tokens ){ + if (tokens) { index = g_strv_length(tokens); sw->name = g_strdup(tokens[0]); - sw->ed = (void*)rofi_expand_path(tokens[1]); + sw->ed = (void *)rofi_expand_path(tokens[1]); g_strfreev(tokens); } if (index == 2) { diff --git a/source/rofi.c b/source/rofi.c index d8d6a1f1..e57ae721 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -85,6 +85,7 @@ const char *cache_dir = NULL; /** List of error messages.*/ GList *list_of_error_msgs = NULL; +/** List of warning messages for the user.*/ GList *list_of_warning_msgs = NULL; static void rofi_collectmodes_destroy(void); diff --git a/source/theme.c b/source/theme.c index 774298c0..386a5ad6 100644 --- a/source/theme.c +++ b/source/theme.c @@ -46,13 +46,22 @@ #include "widgets/textbox.h" #include +/** + * list of config files we parsed. + */ GList *parsed_config_files = NULL; +/** cleanup (free) the list of parsed config files. */ void rofi_theme_free_parsed_files(void) { g_list_free_full(parsed_config_files, g_free); parsed_config_files = NULL; } +/** + * @param is_term if print to terminal + * + * print the list of parsed config files. + */ void rofi_theme_print_parsed_files(gboolean is_term) { printf("\nParsed files:\n"); for (GList *iter = g_list_first(parsed_config_files); iter != NULL; diff --git a/source/view.c b/source/view.c index 491c1404..4378db96 100644 --- a/source/view.c +++ b/source/view.c @@ -130,9 +130,13 @@ struct { guint idle_timeout; /** timeout for reloading */ guint refilter_timeout; + /** amount of time refiltering delay got reset */ guint refilter_timeout_count; + /** if filtering takes longer then this time, + * reduce the amount of refilters. */ double max_refilter_time; + /** enable the reduced refilter mode. */ gboolean delayed_mode; /** timeout handling */ guint user_timeout; diff --git a/source/xcb.c b/source/xcb.c index 6c8515cb..bcc4522f 100644 --- a/source/xcb.c +++ b/source/xcb.c @@ -992,8 +992,9 @@ static int monitor_active_from_id(int mon_id, workarea *mon) { // determine which monitor holds the active window, or failing that the mouse // pointer - +/** The cached monitor setup (mon_cache) is populated */ gboolean mon_set = FALSE; +/** cached monitor cache, to avoid multiple roundtrips to fetch this. */ workarea mon_cache = { 0, }; From bdeede53e45cb1aafb77f83675a330b72f283894 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Sat, 19 Nov 2022 21:56:12 +0100 Subject: [PATCH 028/139] [Doc] Add documentation for new functions. --- include/theme.h | 1 + include/widgets/listview.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/theme.h b/include/theme.h index ec12390b..2dd31d5c 100644 --- a/include/theme.h +++ b/include/theme.h @@ -141,6 +141,7 @@ void rofi_theme_property_free(Property *p); /** * @param p The property to free. + * @param data User data (unused) * * Make a newly allocted copy of the property. * diff --git a/include/widgets/listview.h b/include/widgets/listview.h index 5ffb4f31..461c784f 100644 --- a/include/widgets/listview.h +++ b/include/widgets/listview.h @@ -273,8 +273,9 @@ void listview_toggle_ellipsizing(listview *lv); /** * @param lv Handler to the listview object. + * @param mode The ellipsize mode to set. * - * Set ellipsize mode to start. + * Set ellipsize mode on the listview. */ void listview_set_ellipsize(listview *lv, PangoEllipsizeMode mode); From ffe32899998ecd8a7c223c5a403aa763959a8824 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Sat, 19 Nov 2022 22:04:25 +0100 Subject: [PATCH 029/139] [Build] Fix test building in makefile. --- Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile.am b/Makefile.am index 4e316e74..2a14c198 100644 --- a/Makefile.am +++ b/Makefile.am @@ -287,6 +287,7 @@ history_test_CFLAGS=\ $(NKUTILS_CFLAGS)\ $(libsn_CFLAGS)\ $(cairo_CFLAGS)\ + $(pango_CFLAGS)\ -DTHEME_DIR=\"$(themedir)\"\ -DPLUGIN_PATH=\"${libdir}/rofi\"\ -I$(top_srcdir)/include/\ @@ -295,6 +296,7 @@ history_test_CFLAGS=\ history_test_LDADD=\ $(glib_LIBS)\ + $(pango_LIBS)\ $(NKUTILS_LIBS) history_test_SOURCES=\ @@ -316,6 +318,7 @@ textbox_test_CFLAGS=\ $(cairo_CFLAGS)\ $(libsn_CFLAGS)\ $(gdkpixbuf_CFLAGS)\ + $(pango_CFLAGS)\ -DPLUGIN_PATH=\"${libdir}/rofi\"\ -DTHEME_DIR=\"$(themedir)\"\ -I$(top_srcdir)/include/\ @@ -331,6 +334,7 @@ textbox_test_LDADD=\ $(NKUTILS_LIBS)\ $(GW_XCB_LIBS)\ $(cairo_LIBS)\ + $(pango_LIBS)\ $(libsn_LIBS) helper_pidfile_CFLAGS=$(textbox_test_CFLAGS) From ee2ab5b7f989310e234eaa3525f9ef0133c2625c Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 21 Nov 2022 17:20:11 +0100 Subject: [PATCH 030/139] [Doc] Add example run command with cgroup support (#1752) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds an example command to launch processes via systemd-run into a dedicated systemd scope within the users slice, which allows using systemd-oomd, that evaluates memory consumption on a per cgroup basis. The systemd-run arguments are chosen in alignment with systemds desktop environment integration recommendations¹. [1] https://systemd.io/DESKTOP_ENVIRONMENTS/ Co-Authored-By: Dave Davenport Co-authored-by: Dave Davenport --- doc/rofi.1 | 12 ++++++++++++ doc/rofi.1.markdown | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/doc/rofi.1 b/doc/rofi.1 index b2eb5db2..20db729f 100644 --- a/doc/rofi.1 +++ b/doc/rofi.1 @@ -901,6 +901,18 @@ See \fIPATTERN\fP\&. .PP Default: \fI{cmd}\fP +.PP +Example to run applications in a dedicated cgroup with systemd. Requires a shell to escape and interpolate the unit name correctly. + +.PP +.RS + +.nf +"bash -c 'systemd-run --user --unit=app-rofi-\\$(systemd-escape {cmd})-\\$RANDOM {cmd}'" + +.fi +.RE + .PP \fB\fC-run-shell-command\fR \fIcmd\fP diff --git a/doc/rofi.1.markdown b/doc/rofi.1.markdown index 2f8a82e4..73d94af6 100644 --- a/doc/rofi.1.markdown +++ b/doc/rofi.1.markdown @@ -543,6 +543,12 @@ See *PATTERN*. Default: *{cmd}* +Example to run applications in a dedicated cgroup with systemd. Requires a shell to escape and interpolate the unit name correctly. + +``` +"bash -c 'systemd-run --user --unit=app-rofi-\$(systemd-escape {cmd})-\$RANDOM {cmd}'" +``` + `-run-shell-command` *cmd* Set command to execute when running an application in a shell. From 54aa148a5ece4027cabceec3f79df880e158376d Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Mon, 21 Nov 2022 21:15:51 +0100 Subject: [PATCH 031/139] [XIM] Fix an unitialized value problem. --- source/view.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/view.c b/source/view.c index 4378db96..331b7852 100644 --- a/source/view.c +++ b/source/view.c @@ -871,10 +871,10 @@ static void open_xim_callback(xcb_xim_t *im, G_GNUC_UNUSED void *user_data) { RofiViewState *state = rofi_view_get_active(); uint32_t input_style = XCB_IM_PreeditPosition | XCB_IM_StatusArea; xcb_point_t spot; - spot.x += widget_get_x_pos(&state->text->widget) + - textbox_get_cursor_x_pos(state->text); - spot.y += widget_get_y_pos(&state->text->widget) + - widget_get_height(&state->text->widget); + spot.x = widget_get_x_pos(&state->text->widget) + + textbox_get_cursor_x_pos(state->text); + spot.y = widget_get_y_pos(&state->text->widget) + + widget_get_height(&state->text->widget); xcb_xim_nested_list nested = xcb_xim_create_nested_list(im, XCB_XIM_XNSpotLocation, &spot, NULL); xcb_xim_create_ic( From 23de9e9d2c35af8cce72b060f6d2916cd6215a23 Mon Sep 17 00:00:00 2001 From: vE5li Date: Fri, 25 Nov 2022 10:28:34 +0100 Subject: [PATCH 032/139] make cursor more customizable by adding cursor-width and cursor-color (#1753) * make cursor more customizable by adding cursor-width and cursor-color to the theme * fix placeholder color * add doc entry * more documentation --- doc/rofi-theme.5 | 23 +++++++++++++++++++++++ doc/rofi-theme.5.markdown | 14 ++++++++++++++ source/widgets/textbox.c | 29 ++++++++++++++++++----------- 3 files changed, 55 insertions(+), 11 deletions(-) diff --git a/doc/rofi-theme.5 b/doc/rofi-theme.5 index c0a229c5..1e1bdda5 100644 --- a/doc/rofi-theme.5 +++ b/doc/rofi-theme.5 @@ -196,6 +196,25 @@ element-text { .fi .RE +.PP +We can also specify the color and width of the cursor. You could, for example, +create a crimson block cursor like this: + +.PP +.RS + +.nf +entry { + cursor-color: rgb(220,20,60); + cursor-width: 8px; +} + +.fi +.RE + +.PP +By default, the \fB\fCcursor-color\fR will be the same as the \fB\fCtext-color\fR\&. The \fB\fCcursor-width\fR will always default to 2 pixels. + .PP If you want to see the complete theme, including the modification you can run: @@ -1513,6 +1532,10 @@ This option is only available on the \fB\fCelement-text\fR widget. Set the location of tab stops by their distance from the beginning of the line. Each distance should be greater than the previous one. The text appears to the right of the tab stop position (other alignments are not supported yet). +.IP \(bu 2 +\fBcursor-width\fP: The width of the cursor. +.IP \(bu 2 +\fBcursor-color\fP: The color used to draw the cursor. .RE diff --git a/doc/rofi-theme.5.markdown b/doc/rofi-theme.5.markdown index bf0f3630..bbb0a7cd 100644 --- a/doc/rofi-theme.5.markdown +++ b/doc/rofi-theme.5.markdown @@ -132,6 +132,18 @@ element-text { └─────────────────────────────────────────────────────────────────────┘ ``` +We can also specify the color and width of the cursor. You could, for example, +create a crimson block cursor like this: + +```css +entry { + cursor-color: rgb(220,20,60); + cursor-width: 8px; +} +``` + +By default, the `cursor-color` will be the same as the `text-color`. The `cursor-width` will always default to 2 pixels. + If you want to see the complete theme, including the modification you can run: ```bash @@ -937,6 +949,8 @@ The following properties are currently supported: Set the location of tab stops by their distance from the beginning of the line. Each distance should be greater than the previous one. The text appears to the right of the tab stop position (other alignments are not supported yet). +* **cursor-width**: The width of the cursor. +* **cursor-color**: The color used to draw the cursor. ### listview: * **columns**: integer diff --git a/source/widgets/textbox.c b/source/widgets/textbox.c index e8f178ce..0501b432 100644 --- a/source/widgets/textbox.c +++ b/source/widgets/textbox.c @@ -484,12 +484,10 @@ static void textbox_draw(widget *wid, cairo_t *draw) { // TODO check if this is still needed after flatning. cairo_set_operator(draw, CAIRO_OPERATOR_OVER); - cairo_set_source_rgb(draw, 0.0, 0.0, 0.0); + cairo_set_source_rgb ( draw, 0.0, 0.0, 0.0 ); + // use text color as fallback for themes that don't specify the cursor color rofi_theme_get_color(WIDGET(tb), "text-color", draw); - if (tb->show_placeholder) { - rofi_theme_get_color(WIDGET(tb), "placeholder-color", draw); - } // Set ARGB // We need to set over, otherwise subpixel hinting wont work. switch (pango_layout_get_alignment(tb->layout)) { @@ -519,13 +517,8 @@ static void textbox_draw(widget *wid, cairo_t *draw) { break; } } - cairo_save(draw); - cairo_reset_clip(draw); - pango_cairo_show_layout(draw, tb->layout); - cairo_restore(draw); // draw the cursor - rofi_theme_get_color(WIDGET(tb), "text-color", draw); if (tb->flags & TB_EDITABLE) { // We want to place the cursor based on the text shown. const char *text = pango_layout_get_text(tb->layout); @@ -538,16 +531,30 @@ static void textbox_draw(widget *wid, cairo_t *draw) { int cursor_x = pos.x / PANGO_SCALE; int cursor_y = pos.y / PANGO_SCALE; int cursor_height = pos.height / PANGO_SCALE; - int cursor_width = 2; + RofiDistance cursor_width = rofi_theme_get_distance(WIDGET(tb), "cursor-width", 2); + int cursor_pixel_width = distance_get_pixel(cursor_width, ROFI_ORIENTATION_HORIZONTAL); if ((x + cursor_x) != tb->cursor_x_pos) { tb->cursor_x_pos = x + cursor_x; } if (tb->blink) { - cairo_rectangle(draw, x + cursor_x, y + cursor_y, cursor_width, + // save the state so we can restore the text color afterwards + cairo_save(draw); + rofi_theme_get_color(WIDGET(tb), "cursor-color", draw); + cairo_rectangle(draw, x + cursor_x, y + cursor_y, cursor_pixel_width, cursor_height); cairo_fill(draw); + cairo_restore(draw); } } + + // draw the text + cairo_save(draw); + cairo_reset_clip(draw); + if (tb->show_placeholder) { + rofi_theme_get_color(WIDGET(tb), "placeholder-color", draw); + } + pango_cairo_show_layout(draw, tb->layout); + cairo_restore(draw); } // cursor handling for edit mode From 356e9a98bb8e685f5e181344a2bb4d563fc266a5 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Tue, 20 Dec 2022 16:34:24 +0100 Subject: [PATCH 033/139] [Doc] Clarify that `require-input` only hides it. --- doc/rofi-theme.5 | 3 ++- doc/rofi-theme.5.markdown | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/rofi-theme.5 b/doc/rofi-theme.5 index 1e1bdda5..457874fc 100644 --- a/doc/rofi-theme.5 +++ b/doc/rofi-theme.5 @@ -1579,7 +1579,8 @@ The order the elements are layed out. Vertical is the original 'column' view. Do not reduce the number of columns shown when number of visible elements is not enough to fill them all. .IP \(bu 2 \fBrequire-input\fP: boolean -Listview requires user input to show up. +Listview requires user input to be unhidden. The list will still respond to normal interaction. +Hitting accept will still activate the selected entry. .RE diff --git a/doc/rofi-theme.5.markdown b/doc/rofi-theme.5.markdown index bbb0a7cd..55af7984 100644 --- a/doc/rofi-theme.5.markdown +++ b/doc/rofi-theme.5.markdown @@ -978,7 +978,8 @@ The following properties are currently supported: * **fixed-columns**: boolean Do not reduce the number of columns shown when number of visible elements is not enough to fill them all. * **require-input**: boolean - Listview requires user input to show up. + Listview requires user input to be unhidden. The list will still respond to normal interaction. + Hitting accept will still activate the selected entry. Each element is a `box` called `element`. Each `element` can contain an `element-icon` and `element-text`. From a1943bab1f9a4f69d9aed72a11c67ddaa3b65891 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Tue, 20 Dec 2022 21:21:14 +0100 Subject: [PATCH 034/139] [Doc] Clarify documentation on `require-input` further. --- doc/rofi-theme.5 | 4 ++-- doc/rofi-theme.5.markdown | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/rofi-theme.5 b/doc/rofi-theme.5 index 457874fc..b7b36f3c 100644 --- a/doc/rofi-theme.5 +++ b/doc/rofi-theme.5 @@ -1579,8 +1579,8 @@ The order the elements are layed out. Vertical is the original 'column' view. Do not reduce the number of columns shown when number of visible elements is not enough to fill them all. .IP \(bu 2 \fBrequire-input\fP: boolean -Listview requires user input to be unhidden. The list will still respond to normal interaction. -Hitting accept will still activate the selected entry. +Listview requires user input to be unhidden. The list is still present and +hitting accept will activate the first entry. .RE diff --git a/doc/rofi-theme.5.markdown b/doc/rofi-theme.5.markdown index 55af7984..9a06c1a5 100644 --- a/doc/rofi-theme.5.markdown +++ b/doc/rofi-theme.5.markdown @@ -978,8 +978,8 @@ The following properties are currently supported: * **fixed-columns**: boolean Do not reduce the number of columns shown when number of visible elements is not enough to fill them all. * **require-input**: boolean - Listview requires user input to be unhidden. The list will still respond to normal interaction. - Hitting accept will still activate the selected entry. + Listview requires user input to be unhidden. The list is still present and + hitting accept will activate the first entry. Each element is a `box` called `element`. Each `element` can contain an `element-icon` and `element-text`. From 0ff6ff21c343ceaff4ee74e02e4cd225462537dc Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Fri, 23 Dec 2022 13:38:09 +0100 Subject: [PATCH 035/139] [Textbox] Add text-outline to style --- .gitignore | 4 +++- doc/rofi-theme.5 | 6 ++++++ doc/rofi-theme.5.markdown | 3 +++ source/widgets/textbox.c | 19 +++++++++++++++---- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index ac7472d9..aded913b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ -/build/ +/build*/ +/.cache/ +/.vscode/ # autotools generated files /missing diff --git a/doc/rofi-theme.5 b/doc/rofi-theme.5 index b7b36f3c..293304c5 100644 --- a/doc/rofi-theme.5 +++ b/doc/rofi-theme.5 @@ -1536,6 +1536,12 @@ The text appears to the right of the tab stop position (other alignments are not \fBcursor-width\fP: The width of the cursor. .IP \(bu 2 \fBcursor-color\fP: The color used to draw the cursor. +.IP \(bu 2 +\fBtext-outline\fP: Enable a border (outline) around the text. (Boolean) +.IP \(bu 2 +\fBtext-outline-width\fP: The width of the border around the text. (Double) +.IP \(bu 2 +\fBtext-outline-color\fP: The color to use for the text outline. (Color) .RE diff --git a/doc/rofi-theme.5.markdown b/doc/rofi-theme.5.markdown index 9a06c1a5..354d77cf 100644 --- a/doc/rofi-theme.5.markdown +++ b/doc/rofi-theme.5.markdown @@ -951,6 +951,9 @@ The following properties are currently supported: The text appears to the right of the tab stop position (other alignments are not supported yet). * **cursor-width**: The width of the cursor. * **cursor-color**: The color used to draw the cursor. +* **text-outline**: Enable a border (outline) around the text. (Boolean) +* **text-outline-width**: The width of the border around the text. (Double) +* **text-outline-color**: The color to use for the text outline. (Color) ### listview: * **columns**: integer diff --git a/source/widgets/textbox.c b/source/widgets/textbox.c index 0501b432..90e8cc53 100644 --- a/source/widgets/textbox.c +++ b/source/widgets/textbox.c @@ -27,12 +27,12 @@ */ #include "config.h" -#include "widgets/textbox.h" #include "helper-theme.h" #include "helper.h" #include "keyb.h" #include "mode.h" #include "view.h" +#include "widgets/textbox.h" #include #include #include @@ -484,7 +484,7 @@ static void textbox_draw(widget *wid, cairo_t *draw) { // TODO check if this is still needed after flatning. cairo_set_operator(draw, CAIRO_OPERATOR_OVER); - cairo_set_source_rgb ( draw, 0.0, 0.0, 0.0 ); + cairo_set_source_rgb(draw, 0.0, 0.0, 0.0); // use text color as fallback for themes that don't specify the cursor color rofi_theme_get_color(WIDGET(tb), "text-color", draw); @@ -531,8 +531,10 @@ static void textbox_draw(widget *wid, cairo_t *draw) { int cursor_x = pos.x / PANGO_SCALE; int cursor_y = pos.y / PANGO_SCALE; int cursor_height = pos.height / PANGO_SCALE; - RofiDistance cursor_width = rofi_theme_get_distance(WIDGET(tb), "cursor-width", 2); - int cursor_pixel_width = distance_get_pixel(cursor_width, ROFI_ORIENTATION_HORIZONTAL); + RofiDistance cursor_width = + rofi_theme_get_distance(WIDGET(tb), "cursor-width", 2); + int cursor_pixel_width = + distance_get_pixel(cursor_width, ROFI_ORIENTATION_HORIZONTAL); if ((x + cursor_x) != tb->cursor_x_pos) { tb->cursor_x_pos = x + cursor_x; } @@ -554,6 +556,15 @@ static void textbox_draw(widget *wid, cairo_t *draw) { rofi_theme_get_color(WIDGET(tb), "placeholder-color", draw); } pango_cairo_show_layout(draw, tb->layout); + + if (rofi_theme_get_boolean(WIDGET(tb), "text-outline", FALSE)) { + rofi_theme_get_color(WIDGET(tb), "text-outline-color", draw); + double width = rofi_theme_get_double(WIDGET(tb), "text-outline-width", 0.5); + pango_cairo_layout_path(draw, tb->layout); + cairo_set_line_width(draw, width); + cairo_stroke(draw); + } + cairo_restore(draw); } From 3d73cf25541a5ea3dceb864a15f8ad4f654615da Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Fri, 23 Dec 2022 22:11:22 +0100 Subject: [PATCH 036/139] [Textbox] Cursor goes over, not under. allow cursor outline. --- doc/rofi-theme.5 | 6 +++++ doc/rofi-theme.5.markdown | 3 +++ source/widgets/textbox.c | 51 ++++++++++++++++++++++++--------------- 3 files changed, 41 insertions(+), 19 deletions(-) diff --git a/doc/rofi-theme.5 b/doc/rofi-theme.5 index 293304c5..f70aa560 100644 --- a/doc/rofi-theme.5 +++ b/doc/rofi-theme.5 @@ -1537,6 +1537,12 @@ The text appears to the right of the tab stop position (other alignments are not .IP \(bu 2 \fBcursor-color\fP: The color used to draw the cursor. .IP \(bu 2 +\fBcursor-outline\fP: Enable a border (outline) around the cursor. (Boolean) +.IP \(bu 2 +\fBcursor-outline-width\fP: The width of the border around the cursor. (Double) +.IP \(bu 2 +\fBcursor-outline-color\fP: The color to use for the cursor outline. (Color) +.IP \(bu 2 \fBtext-outline\fP: Enable a border (outline) around the text. (Boolean) .IP \(bu 2 \fBtext-outline-width\fP: The width of the border around the text. (Double) diff --git a/doc/rofi-theme.5.markdown b/doc/rofi-theme.5.markdown index 354d77cf..24388f58 100644 --- a/doc/rofi-theme.5.markdown +++ b/doc/rofi-theme.5.markdown @@ -951,6 +951,9 @@ The following properties are currently supported: The text appears to the right of the tab stop position (other alignments are not supported yet). * **cursor-width**: The width of the cursor. * **cursor-color**: The color used to draw the cursor. +* **cursor-outline**: Enable a border (outline) around the cursor. (Boolean) +* **cursor-outline-width**: The width of the border around the cursor. (Double) +* **cursor-outline-color**: The color to use for the cursor outline. (Color) * **text-outline**: Enable a border (outline) around the text. (Boolean) * **text-outline-width**: The width of the border around the text. (Double) * **text-outline-color**: The color to use for the text outline. (Color) diff --git a/source/widgets/textbox.c b/source/widgets/textbox.c index 90e8cc53..5e45a0d5 100644 --- a/source/widgets/textbox.c +++ b/source/widgets/textbox.c @@ -518,6 +518,28 @@ static void textbox_draw(widget *wid, cairo_t *draw) { } } + // draw the text + cairo_save(draw); + cairo_reset_clip(draw); + + gboolean show_outline = + rofi_theme_get_boolean(WIDGET(tb), "text-outline", FALSE); + if (tb->show_placeholder) { + rofi_theme_get_color(WIDGET(tb), "placeholder-color", draw); + show_outline = FALSE; + } + pango_cairo_show_layout(draw, tb->layout); + + if (show_outline) { + rofi_theme_get_color(WIDGET(tb), "text-outline-color", draw); + double width = rofi_theme_get_double(WIDGET(tb), "text-outline-width", 0.5); + pango_cairo_layout_path(draw, tb->layout); + cairo_set_line_width(draw, width); + cairo_stroke(draw); + } + + cairo_restore(draw); + // draw the cursor if (tb->flags & TB_EDITABLE) { // We want to place the cursor based on the text shown. @@ -544,28 +566,19 @@ static void textbox_draw(widget *wid, cairo_t *draw) { rofi_theme_get_color(WIDGET(tb), "cursor-color", draw); cairo_rectangle(draw, x + cursor_x, y + cursor_y, cursor_pixel_width, cursor_height); - cairo_fill(draw); + if (rofi_theme_get_boolean(WIDGET(tb), "cursor-outline", FALSE)) { + cairo_fill_preserve(draw); + rofi_theme_get_color(WIDGET(tb), "cursor-outline-color", draw); + double width = + rofi_theme_get_double(WIDGET(tb), "cursor-outline-width", 0.5); + cairo_set_line_width(draw, width); + cairo_stroke(draw); + } else { + cairo_fill(draw); + } cairo_restore(draw); } } - - // draw the text - cairo_save(draw); - cairo_reset_clip(draw); - if (tb->show_placeholder) { - rofi_theme_get_color(WIDGET(tb), "placeholder-color", draw); - } - pango_cairo_show_layout(draw, tb->layout); - - if (rofi_theme_get_boolean(WIDGET(tb), "text-outline", FALSE)) { - rofi_theme_get_color(WIDGET(tb), "text-outline-color", draw); - double width = rofi_theme_get_double(WIDGET(tb), "text-outline-width", 0.5); - pango_cairo_layout_path(draw, tb->layout); - cairo_set_line_width(draw, width); - cairo_stroke(draw); - } - - cairo_restore(draw); } // cursor handling for edit mode From 09b90397189d2342f70f94c34a94824a8ed0c34d Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Sat, 24 Dec 2022 11:46:03 +0100 Subject: [PATCH 037/139] [Theme] Move some definitions header around for plugin. --- include/helper.h | 27 ++++++++++++++ include/rofi-types.h | 51 ++++++++++++++++++++++++++ include/theme.h | 78 ---------------------------------------- source/mode.c | 1 + source/widgets/textbox.c | 5 ++- 5 files changed, 81 insertions(+), 81 deletions(-) diff --git a/include/helper.h b/include/helper.h index 83a06970..bcae4810 100644 --- a/include/helper.h +++ b/include/helper.h @@ -399,6 +399,33 @@ char *helper_string_replace_if_exists(char *string, ...); */ char *helper_get_theme_path(const char *file, const char *ext); +/** + * @param name The name of the element to find. + * @param state The state of the element. + * @param exact If the match should be exact, or parent can be included. + * + * Find the configuration element. If not exact, the closest specified element + * is returned. + * + * @returns the ThemeWidget if found, otherwise NULL. + */ +ConfigEntry *rofi_config_find_widget(const char *name, const char *state, + gboolean exact); + +/** + * @param widget The widget to find the property on. + * @param type The %PropertyType to find. + * @param property The property to find. + * @param exact If the property should only be found on this widget, or on + * parents if not found. + * + * Find the property on the widget. If not exact, the parents are searched + * recursively until match is found. + * + * @returns the Property if found, otherwise NULL. + */ +Property *rofi_theme_find_property(ConfigEntry *widget, PropertyType type, + const char *property, gboolean exact); G_END_DECLS /**@} */ diff --git a/include/rofi-types.h b/include/rofi-types.h index 807a2556..4fc878d4 100644 --- a/include/rofi-types.h +++ b/include/rofi-types.h @@ -297,6 +297,57 @@ typedef struct Property { PropertyValue value; } Property; +/** + * Describe the media constraint type. + */ +typedef enum { + /** Minimum width constraint. */ + THEME_MEDIA_TYPE_MIN_WIDTH, + /** Maximum width constraint. */ + THEME_MEDIA_TYPE_MAX_WIDTH, + /** Minimum height constraint. */ + THEME_MEDIA_TYPE_MIN_HEIGHT, + /** Maximum height constraint. */ + THEME_MEDIA_TYPE_MAX_HEIGHT, + /** Monitor id constraint. */ + THEME_MEDIA_TYPE_MON_ID, + /** Minimum aspect ratio constraint. */ + THEME_MEDIA_TYPE_MIN_ASPECT_RATIO, + /** Maximum aspect ratio constraint. */ + THEME_MEDIA_TYPE_MAX_ASPECT_RATIO, + /** Boolean option for use with env. */ + THEME_MEDIA_TYPE_BOOLEAN, + /** Invalid entry. */ + THEME_MEDIA_TYPE_INVALID, +} ThemeMediaType; + +/** + * Theme Media description. + */ +typedef struct ThemeMedia { + ThemeMediaType type; + double value; + gboolean boolv; +} ThemeMedia; + +/** + * ThemeWidget. + */ +typedef struct ThemeWidget { + int set; + char *name; + + unsigned int num_widgets; + struct ThemeWidget **widgets; + + ThemeMedia *media; + + GHashTable *properties; + + struct ThemeWidget *parent; +} ThemeWidget; + +typedef ThemeWidget ConfigEntry; /** * Structure to hold a range. */ diff --git a/include/theme.h b/include/theme.h index 2dd31d5c..aaba03c8 100644 --- a/include/theme.h +++ b/include/theme.h @@ -32,56 +32,6 @@ #include #include -/** - * Describe the media constraint type. - */ -typedef enum { - /** Minimum width constraint. */ - THEME_MEDIA_TYPE_MIN_WIDTH, - /** Maximum width constraint. */ - THEME_MEDIA_TYPE_MAX_WIDTH, - /** Minimum height constraint. */ - THEME_MEDIA_TYPE_MIN_HEIGHT, - /** Maximum height constraint. */ - THEME_MEDIA_TYPE_MAX_HEIGHT, - /** Monitor id constraint. */ - THEME_MEDIA_TYPE_MON_ID, - /** Minimum aspect ratio constraint. */ - THEME_MEDIA_TYPE_MIN_ASPECT_RATIO, - /** Maximum aspect ratio constraint. */ - THEME_MEDIA_TYPE_MAX_ASPECT_RATIO, - /** Boolean option for use with env. */ - THEME_MEDIA_TYPE_BOOLEAN, - /** Invalid entry. */ - THEME_MEDIA_TYPE_INVALID, -} ThemeMediaType; - -/** - * Theme Media description. - */ -typedef struct ThemeMedia { - ThemeMediaType type; - double value; - gboolean boolv; -} ThemeMedia; - -/** - * ThemeWidget. - */ -typedef struct ThemeWidget { - int set; - char *name; - - unsigned int num_widgets; - struct ThemeWidget **widgets; - - ThemeMedia *media; - - GHashTable *properties; - - struct ThemeWidget *parent; -} ThemeWidget; - /** * Global pointer to the current active theme. */ @@ -370,34 +320,6 @@ void distance_get_linestyle(RofiDistance d, cairo_t *draw); ThemeWidget *rofi_theme_find_widget(const char *name, const char *state, gboolean exact); -/** - * @param name The name of the element to find. - * @param state The state of the element. - * @param exact If the match should be exact, or parent can be included. - * - * Find the configuration element. If not exact, the closest specified element - * is returned. - * - * @returns the ThemeWidget if found, otherwise NULL. - */ -ThemeWidget *rofi_config_find_widget(const char *name, const char *state, - gboolean exact); - -/** - * @param widget The widget to find the property on. - * @param type The %PropertyType to find. - * @param property The property to find. - * @param exact If the property should only be found on this widget, or on - * parents if not found. - * - * Find the property on the widget. If not exact, the parents are searched - * recursively until match is found. - * - * @returns the Property if found, otherwise NULL. - */ -Property *rofi_theme_find_property(ThemeWidget *widget, PropertyType type, - const char *property, gboolean exact); - /** * Reset the current theme. */ diff --git a/source/mode.c b/source/mode.c index 02c4aaee..990bea56 100644 --- a/source/mode.c +++ b/source/mode.c @@ -34,6 +34,7 @@ #include "rofi-icon-fetcher.h" // This one should only be in mode implementations. +#include "helper.h" #include "mode-private.h" /** * @ingroup MODE diff --git a/source/widgets/textbox.c b/source/widgets/textbox.c index 5e45a0d5..51273adf 100644 --- a/source/widgets/textbox.c +++ b/source/widgets/textbox.c @@ -561,8 +561,8 @@ static void textbox_draw(widget *wid, cairo_t *draw) { tb->cursor_x_pos = x + cursor_x; } if (tb->blink) { - // save the state so we can restore the text color afterwards - cairo_save(draw); + // use text color as fallback for themes that don't specify the cursor + // color rofi_theme_get_color(WIDGET(tb), "cursor-color", draw); cairo_rectangle(draw, x + cursor_x, y + cursor_y, cursor_pixel_width, cursor_height); @@ -576,7 +576,6 @@ static void textbox_draw(widget *wid, cairo_t *draw) { } else { cairo_fill(draw); } - cairo_restore(draw); } } } From 34810e72be9dff6f73a2ad68ad53266f718ba934 Mon Sep 17 00:00:00 2001 From: TonCherAmi Date: Sun, 25 Dec 2022 15:02:44 +0300 Subject: [PATCH 038/139] [CI] Maintenance. (#1767) * [CI] Bump actions/upload-artifact version. * [CI] Bump actions/checkout version. * [CI] Bump actions/setup-python version. * [CI] Adjust doxy redirection order. --- .github/actions/autotools/action.yml | 4 ++-- .github/actions/setup/action.yml | 2 +- .github/workflows/build.yml | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/actions/autotools/action.yml b/.github/actions/autotools/action.yml index 63bd568e..3161607c 100644 --- a/.github/actions/autotools/action.yml +++ b/.github/actions/autotools/action.yml @@ -30,7 +30,7 @@ runs: run: cd builddir && make distcheck shell: bash - id: doxy - run: cd builddir && make doxy 2>&1 > doxygen.log + run: cd builddir && make doxy > doxygen.log 2>&1 shell: bash - id: doxycheck uses: ./.github/actions/doxycheck @@ -45,7 +45,7 @@ runs: make make check - id: upload - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: tarballs path: | diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index d5518a18..0181bafa 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -5,7 +5,7 @@ runs: using: composite steps: - id: python - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: '3.x' - id: apt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aed5e72b..fb754c3d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: build-meson-gcc: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - uses: ./.github/actions/setup @@ -28,7 +28,7 @@ jobs: build-meson-clang: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - uses: ./.github/actions/setup @@ -38,7 +38,7 @@ jobs: build-autotools-gcc: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - uses: ./.github/actions/setup @@ -49,7 +49,7 @@ jobs: build-autotools-gcc-no-window: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - uses: ./.github/actions/setup @@ -60,7 +60,7 @@ jobs: build-autotools-clang: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - uses: ./.github/actions/setup From d47b1515b5d189f7e080ffe00a62651308b65741 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Thu, 29 Dec 2022 18:41:51 +0100 Subject: [PATCH 039/139] [listview] Don't calculate infinite rows on empty height. Issue: #1769 --- include/widgets/listview.h | 7 ------- source/view.c | 3 --- source/widgets/listview.c | 13 +++++++------ 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/include/widgets/listview.h b/include/widgets/listview.h index 461c784f..29211838 100644 --- a/include/widgets/listview.h +++ b/include/widgets/listview.h @@ -232,13 +232,6 @@ void listview_set_scroll_type(listview *lv, ScrollType type); void listview_set_mouse_activated_cb(listview *lv, listview_mouse_activated_cb cb, void *udata); -/** - * @param lv Handler to the listview object. - * @param num_lines the maximum number of lines to display. - * - * Set the maximum number of lines to display. - */ -void listview_set_num_lines(listview *lv, unsigned int num_lines); /** * @param lv Handler to the listview object. diff --git a/source/view.c b/source/view.c index 331b7852..fecd48e0 100644 --- a/source/view.c +++ b/source/view.c @@ -2166,9 +2166,6 @@ static void rofi_view_add_widget(RofiViewState *state, widget *parent_widget, listview_set_mouse_activated_cb( state->list_view, rofi_view_listview_mouse_activated_cb, state); - int lines = rofi_theme_get_integer(WIDGET(state->list_view), "lines", - DEFAULT_MENU_LINES); - listview_set_num_lines(state->list_view, lines); listview_set_max_lines(state->list_view, state->num_lines); } /** diff --git a/source/widgets/listview.c b/source/widgets/listview.c index 79e81893..02b6d109 100644 --- a/source/widgets/listview.c +++ b/source/widgets/listview.c @@ -607,7 +607,11 @@ static void listview_resize(widget *wid, short w, short h) { lv->widget.h = MAX(0, h); int height = lv->widget.h - widget_padding_get_padding_height(WIDGET(lv)); int spacing_vert = distance_get_pixel(lv->spacing, ROFI_ORIENTATION_VERTICAL); - lv->max_rows = (spacing_vert + height) / (lv->element_height + spacing_vert); + if ( lv->widget.h == 0 ) { + lv->max_rows = lv->menu_lines; + } else { + lv->max_rows = (spacing_vert + height) / (lv->element_height + spacing_vert); + } lv->max_elements = lv->max_rows * lv->menu_columns; widget_move(WIDGET(lv->scrollbar), @@ -758,6 +762,8 @@ listview *listview_create(widget *parent, const char *name, lv->spacing = rofi_theme_get_distance(WIDGET(lv), "spacing", DEFAULT_SPACING); lv->menu_columns = rofi_theme_get_integer(WIDGET(lv), "columns", DEFAULT_MENU_COLUMNS); + lv->menu_lines = + rofi_theme_get_integer(WIDGET(lv), "lines", DEFAULT_MENU_LINES); lv->fixed_num_lines = rofi_theme_get_boolean(WIDGET(lv), "fixed-height", config.fixed_num_lines); lv->dynamic = rofi_theme_get_boolean(WIDGET(lv), "dynamic", TRUE); @@ -1080,11 +1086,6 @@ void listview_set_mouse_activated_cb(listview *lv, lv->mouse_activated_data = udata; } } -void listview_set_num_lines(listview *lv, unsigned int num_lines) { - if (lv) { - lv->menu_lines = num_lines; - } -} void listview_set_max_lines(listview *lv, unsigned int max_lines) { if (lv) { From d464822505f5b57e6f5984f5468c62af83d88b2f Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Fri, 30 Dec 2022 11:54:15 +0100 Subject: [PATCH 040/139] [Theme] support rasinc for theme include files. --- Makefile.am | 2 +- doc/rofi-theme.5 | 1 + doc/rofi-theme.5.markdown | 1 + include/helper.h | 4 ++-- lexer/theme-lexer.l | 5 +++-- meson.build | 2 +- source/helper.c | 13 +++++++++++-- test/box-test.c | 2 +- test/scrollbar-test.c | 2 +- .../{gruvbox-common.rasi => gruvbox-common.rasinc} | 0 themes/gruvbox-dark-hard.rasi | 2 +- themes/gruvbox-dark-soft.rasi | 2 +- themes/gruvbox-dark.rasi | 2 +- themes/gruvbox-light-hard.rasi | 2 +- themes/gruvbox-light-soft.rasi | 2 +- themes/gruvbox-light.rasi | 2 +- 16 files changed, 28 insertions(+), 16 deletions(-) rename themes/{gruvbox-common.rasi => gruvbox-common.rasinc} (100%) diff --git a/Makefile.am b/Makefile.am index 2a14c198..174ea9fe 100644 --- a/Makefile.am +++ b/Makefile.am @@ -214,7 +214,7 @@ theme_DATA=\ themes/dmenu.rasi\ themes/docu.rasi\ themes/glue_pro_blue.rasi\ - themes/gruvbox-common.rasi\ + themes/gruvbox-common.rasinc\ themes/gruvbox-dark-hard.rasi\ themes/gruvbox-dark-soft.rasi\ themes/gruvbox-dark.rasi\ diff --git a/doc/rofi-theme.5 b/doc/rofi-theme.5 index f70aa560..b7b64b25 100644 --- a/doc/rofi-theme.5 +++ b/doc/rofi-theme.5 @@ -353,6 +353,7 @@ name .PP The preferred file extension for the new theme format is \fBrasi\fP\&. This is an abbreviation for \fBr\fPofi \fBa\fPdvanced \fBs\fPtyle \fBi\fPnformation. +If a theme file is split over multiple files, include files can have the: \fBrasinc\fP extension. .SH Basic Structure .PP diff --git a/doc/rofi-theme.5.markdown b/doc/rofi-theme.5.markdown index 24388f58..bec95423 100644 --- a/doc/rofi-theme.5.markdown +++ b/doc/rofi-theme.5.markdown @@ -233,6 +233,7 @@ name The preferred file extension for the new theme format is **rasi**. This is an abbreviation for **r**ofi **a**dvanced **s**tyle **i**nformation. +If a theme file is split over multiple files, include files can have the: **rasinc** extension. ## Basic Structure diff --git a/include/helper.h b/include/helper.h index bcae4810..efe6b07c 100644 --- a/include/helper.h +++ b/include/helper.h @@ -393,11 +393,11 @@ char *helper_string_replace_if_exists(char *string, ...); /** * @param file File name passed to option. - * @param ext File extension passed to option. + * @param ext NULL terminated array of file extension passed to option. * * @returns path to theme or copy of filename if not found. */ -char *helper_get_theme_path(const char *file, const char *ext); +char *helper_get_theme_path(const char *file, const char **ext); /** * @param name The name of the element to find. diff --git a/lexer/theme-lexer.l b/lexer/theme-lexer.l index 0763b22e..25e8bd71 100644 --- a/lexer/theme-lexer.l +++ b/lexer/theme-lexer.l @@ -50,6 +50,7 @@ #define LOG_DOMAIN "Parser" int last_state = 0; +const char *rasi_theme_file_extensions[] = {".rasi", ".rasinc", NULL}; /** * Type of Object to parse. */ @@ -413,7 +414,7 @@ if ( queue == NULL ) { yytext[yyleng-1] = '\0'; ParseObject *top = g_queue_peek_head ( file_queue ); g_assert ( top != NULL ); - char *file2 = helper_get_theme_path ( &yytext[1], ".rasi" ); + char *file2 = helper_get_theme_path ( &yytext[1], rasi_theme_file_extensions ); char *filename = rofi_theme_parse_prepare_file ( file2, top->filename ); g_free ( file2 ); FILE *f = fopen ( filename, "rb" ); @@ -880,7 +881,7 @@ if ( queue == NULL ) { gboolean rofi_theme_parse_file ( const char *file ) { - char *file2 = helper_get_theme_path ( file, ".rasi" ); + char *file2 = helper_get_theme_path ( file, rasi_theme_file_extensions ); char *filename = rofi_theme_parse_prepare_file ( file2, NULL ); g_free ( file2 ); diff --git a/meson.build b/meson.build index 4cc7b7c8..6061a62d 100644 --- a/meson.build +++ b/meson.build @@ -293,7 +293,7 @@ install_data( 'themes/dmenu.rasi', 'themes/docu.rasi', 'themes/glue_pro_blue.rasi', - 'themes/gruvbox-common.rasi', + 'themes/gruvbox-common.rasinc', 'themes/gruvbox-dark-hard.rasi', 'themes/gruvbox-dark-soft.rasi', 'themes/gruvbox-dark.rasi', diff --git a/source/helper.c b/source/helper.c index 583d128c..8f5f95ff 100644 --- a/source/helper.c +++ b/source/helper.c @@ -1067,7 +1067,7 @@ gboolean helper_execute_command(const char *wd, const char *cmd, return helper_execute(wd, args, "", cmd, context); } -char *helper_get_theme_path(const char *file, const char *ext) { +char *helper_get_theme_path(const char *file, const char **ext) { char *filename = rofi_expand_path(file); g_debug("Opening theme, testing: %s\n", filename); if (g_file_test(filename, G_FILE_TEST_EXISTS)) { @@ -1075,7 +1075,16 @@ char *helper_get_theme_path(const char *file, const char *ext) { } g_free(filename); - if (g_str_has_suffix(file, ext)) { + gboolean ext_found = FALSE; + if (ext) { + for (const char **i = ext; *i != NULL; i++) { + if (g_str_has_suffix(file, *i)) { + ext_found = TRUE; + break; + } + } + } + if (ext_found) { filename = g_strdup(file); } else { filename = g_strconcat(file, ext, NULL); diff --git a/test/box-test.c b/test/box-test.c index 12b83200..36bbaaf1 100644 --- a/test/box-test.c +++ b/test/box-test.c @@ -92,7 +92,7 @@ gboolean config_parse_set_property(G_GNUC_UNUSED const Property *p, } char *rofi_expand_path(G_GNUC_UNUSED const char *path) { return NULL; } -char *helper_get_theme_path(const char *file, G_GNUC_UNUSED const char *ext) { +char *helper_get_theme_path(const char *file, G_GNUC_UNUSED const char **ext) { return g_strdup(file); } void rofi_add_error_message(G_GNUC_UNUSED GString *msg) {} diff --git a/test/scrollbar-test.c b/test/scrollbar-test.c index d79154a8..cb58bdcf 100644 --- a/test/scrollbar-test.c +++ b/test/scrollbar-test.c @@ -77,7 +77,7 @@ cairo_surface_t *rofi_icon_fetcher_get(G_GNUC_UNUSED const uint32_t uid) { int monitor_active(G_GNUC_UNUSED workarea *mon) { return 0; } -char *helper_get_theme_path(const char *file, G_GNUC_UNUSED const char *ext) { +char *helper_get_theme_path(const char *file, G_GNUC_UNUSED const char **ext) { return g_strdup(file); } gboolean config_parse_set_property(G_GNUC_UNUSED const Property *p, diff --git a/themes/gruvbox-common.rasi b/themes/gruvbox-common.rasinc similarity index 100% rename from themes/gruvbox-common.rasi rename to themes/gruvbox-common.rasinc diff --git a/themes/gruvbox-dark-hard.rasi b/themes/gruvbox-dark-hard.rasi index f09507e6..10be00f0 100644 --- a/themes/gruvbox-dark-hard.rasi +++ b/themes/gruvbox-dark-hard.rasi @@ -58,5 +58,5 @@ selected-urgent-foreground: @urgent-foreground; } -@import "gruvbox-common.rasi" +@import "gruvbox-common.rasinc" diff --git a/themes/gruvbox-dark-soft.rasi b/themes/gruvbox-dark-soft.rasi index d080824a..03b120cc 100644 --- a/themes/gruvbox-dark-soft.rasi +++ b/themes/gruvbox-dark-soft.rasi @@ -58,5 +58,5 @@ selected-urgent-foreground: @urgent-foreground; } -@import "gruvbox-common.rasi" +@import "gruvbox-common.rasinc" diff --git a/themes/gruvbox-dark.rasi b/themes/gruvbox-dark.rasi index 6bec1275..bc59022f 100644 --- a/themes/gruvbox-dark.rasi +++ b/themes/gruvbox-dark.rasi @@ -58,5 +58,5 @@ selected-urgent-foreground: @urgent-foreground; } -@import "gruvbox-common.rasi" +@import "gruvbox-common.rasinc" diff --git a/themes/gruvbox-light-hard.rasi b/themes/gruvbox-light-hard.rasi index e0efe33f..18e51f47 100644 --- a/themes/gruvbox-light-hard.rasi +++ b/themes/gruvbox-light-hard.rasi @@ -58,5 +58,5 @@ selected-urgent-foreground: @urgent-foreground; } -@import "gruvbox-common.rasi" +@import "gruvbox-common.rasinc" diff --git a/themes/gruvbox-light-soft.rasi b/themes/gruvbox-light-soft.rasi index 43ddb6b4..f386da75 100644 --- a/themes/gruvbox-light-soft.rasi +++ b/themes/gruvbox-light-soft.rasi @@ -58,5 +58,5 @@ selected-urgent-foreground: @urgent-foreground; } -@import "gruvbox-common.rasi" +@import "gruvbox-common.rasinc" diff --git a/themes/gruvbox-light.rasi b/themes/gruvbox-light.rasi index f8041564..29190683 100644 --- a/themes/gruvbox-light.rasi +++ b/themes/gruvbox-light.rasi @@ -58,5 +58,5 @@ selected-urgent-foreground: @urgent-foreground; } -@import "gruvbox-common.rasi" +@import "gruvbox-common.rasinc" From 9da2c12c8a2bb26f814b59c2999b8e5b5ce43b72 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Fri, 30 Dec 2022 15:01:17 +0100 Subject: [PATCH 041/139] [IconFetcher] Fix for api change --- source/rofi-icon-fetcher.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/rofi-icon-fetcher.c b/source/rofi-icon-fetcher.c index 7dc9770d..51ed6f44 100644 --- a/source/rofi-icon-fetcher.c +++ b/source/rofi-icon-fetcher.c @@ -332,7 +332,8 @@ static void rofi_icon_fetcher_worker(thread_state *sdata, const char *ext = g_strrstr(sentry->entry->name, "."); if (ext) { - icon_path = helper_get_theme_path(sentry->entry->name, ext); + const char *exts2[2] = {ext, NULL}; + icon_path = helper_get_theme_path(sentry->entry->name, exts2); } if (icon_path == NULL) { sentry->query_done = TRUE; From 9143d291d42dde35eebc8777a18e52d4a77f7a48 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Sat, 31 Dec 2022 00:23:48 +0100 Subject: [PATCH 042/139] [themes] don't use screenshot transparency in shipped themes --- source/rofi.c | 9 +++++++++ themes/arthur.rasi | 2 +- themes/paper-float.rasi | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/source/rofi.c b/source/rofi.c index e57ae721..7671f3af 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -804,6 +804,12 @@ static gboolean startup(G_GNUC_UNUSED gpointer data) { return G_SOURCE_REMOVE; } +static gboolean take_screenshot_quit ( G_GNUC_UNUSED void *data) +{ + rofi_capture_screenshot(); + rofi_quit_main_loop(); + return G_SOURCE_REMOVE; +} static gboolean record(G_GNUC_UNUSED void *data) { rofi_capture_screenshot(); return G_SOURCE_CONTINUE; @@ -1115,6 +1121,9 @@ int main(int argc, char *argv[]) { if (find_arg_uint("-record-screenshots", &interval)) { g_timeout_add((guint)(1000 / (double)interval), record, NULL); } + if ( find_arg_uint("-take-screenshot-quit", &interval)) { + g_timeout_add(interval, take_screenshot_quit, NULL); + } if (find_arg("-benchmark-ui") >= 0) { config.benchmark_ui = TRUE; } diff --git a/themes/arthur.rasi b/themes/arthur.rasi index 437778a7..58b951a3 100644 --- a/themes/arthur.rasi +++ b/themes/arthur.rasi @@ -52,7 +52,7 @@ window { location: center; anchor: center; - transparency: "screenshot"; + transparency: "real"; padding: 10px; border: 0px; border-radius: 10px; diff --git a/themes/paper-float.rasi b/themes/paper-float.rasi index 6b57ae7b..b327b8db 100644 --- a/themes/paper-float.rasi +++ b/themes/paper-float.rasi @@ -18,7 +18,7 @@ location: center; } window { - transparency: "screenshot"; + transparency: "real"; background-color: #00000000; border: 0; padding: 0% 0% 1em 0%; From 3d62bb32c93365729c2db11bc81be46c050fabaf Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Sat, 31 Dec 2022 13:15:01 +0100 Subject: [PATCH 043/139] MKDoc website (#1772) * Add initial documentation page using mkdocs * Test action * Add notes to mkdoc site. * Add installation guide * Add installation and config guide to mkdocs. * Add installation manual * Add image to main page * [mkdocs] Add plugin guide. * [mkdocs] Add plugin to main page and some small fixes. * Add shipped themes page * [actions] Also rebuild website on the next branch --- .github/workflows/mkdocs.yml | 20 + CONFIG.md | 29 +- INSTALL.md | 2 + doc/rofi-theme.5 | 78 +- doc/rofi-theme.5.markdown | 86 +- doc/rofi.1 | 10 +- doc/rofi.1.markdown | 1 + mkdocs/docs/1.7.0/rofi-script.5.markdown | 145 ++ mkdocs/docs/1.7.0/rofi-theme.5.markdown | 1140 +++++++++++++ mkdocs/docs/1.7.0/rofi.1.markdown | 1086 +++++++++++++ mkdocs/docs/1.7.1/rofi-script.5.markdown | 145 ++ mkdocs/docs/1.7.1/rofi-theme.5.markdown | 1198 ++++++++++++++ mkdocs/docs/1.7.1/rofi.1.markdown | 1116 +++++++++++++ mkdocs/docs/1.7.2/rofi-script.5.markdown | 145 ++ mkdocs/docs/1.7.2/rofi-theme.5.markdown | 1198 ++++++++++++++ mkdocs/docs/1.7.2/rofi.1.markdown | 1116 +++++++++++++ mkdocs/docs/1.7.3/rofi-debugging.5.markdown | 176 ++ mkdocs/docs/1.7.3/rofi-dmenu.5.markdown | 227 +++ mkdocs/docs/1.7.3/rofi-keys.5.markdown | 471 ++++++ mkdocs/docs/1.7.3/rofi-script.5.markdown | 155 ++ mkdocs/docs/1.7.3/rofi-theme.5.markdown | 1443 +++++++++++++++++ mkdocs/docs/1.7.3/rofi.1.markdown | 1030 ++++++++++++ mkdocs/docs/1.7.4/rofi-debugging.5.markdown | 176 ++ mkdocs/docs/1.7.4/rofi-dmenu.5.markdown | 217 +++ mkdocs/docs/1.7.4/rofi-keys.5.markdown | 456 ++++++ mkdocs/docs/1.7.4/rofi-script.5.markdown | 155 ++ mkdocs/docs/1.7.4/rofi-theme.5.markdown | 1421 ++++++++++++++++ mkdocs/docs/1.7.4/rofi.1.markdown | 1005 ++++++++++++ mkdocs/docs/1.7.5/rofi-debugging.5.markdown | 176 ++ mkdocs/docs/1.7.5/rofi-dmenu.5.markdown | 217 +++ mkdocs/docs/1.7.5/rofi-keys.5.markdown | 456 ++++++ mkdocs/docs/1.7.5/rofi-script.5.markdown | 155 ++ mkdocs/docs/1.7.5/rofi-theme.5.markdown | 1421 ++++++++++++++++ mkdocs/docs/1.7.5/rofi.1.markdown | 1005 ++++++++++++ mkdocs/docs/CONFIG.md | 1 + mkdocs/docs/COPYING.md | 1 + mkdocs/docs/INSTALL.md | 1 + mkdocs/docs/current/rofi-debugging.5.markdown | 1 + mkdocs/docs/current/rofi-dmenu.5.markdown | 1 + mkdocs/docs/current/rofi-keys.5.markdown | 1 + mkdocs/docs/current/rofi-script.5.markdown | 1 + mkdocs/docs/current/rofi-theme.5.markdown | 1 + mkdocs/docs/current/rofi.1.markdown | 1 + ...17-04-19-rofi-140-sneak-preview-plugins.md | 695 ++++++++ .../docs/guides/Plugins/rofi-file-browser.png | Bin 0 -> 18170 bytes .../docs/guides}/Positioning/anchors.svg | 0 .../docs/guides}/Positioning/example-pos.png | Bin .../Positioning/theme3-positioning.markdown | 0 .../guides}/Transparency/rofi-background.png | Bin .../guides}/Transparency/rofi-background2.png | Bin .../docs/guides}/Transparency/rofi-fake.png | Bin .../docs/guides}/Transparency/rofi-paper.png | Bin .../docs/guides}/Transparency/rofi-real.png | Bin .../docs/guides}/Transparency/rofi-transp.png | Bin .../docs/guides}/Transparency/structure.svg | 0 .../Transparency/theme3-transparency.markdown | 0 mkdocs/docs/images/rofi.png | Bin 0 -> 58343 bytes mkdocs/docs/index.md | 35 + mkdocs/docs/themes/Adapta-Nokto.png | Bin 0 -> 21676 bytes mkdocs/docs/themes/Arc-Dark.png | Bin 0 -> 25511 bytes mkdocs/docs/themes/Arc.png | Bin 0 -> 21723 bytes mkdocs/docs/themes/DarkBlue.png | Bin 0 -> 26540 bytes mkdocs/docs/themes/Indego.png | Bin 0 -> 21950 bytes mkdocs/docs/themes/Monokai.png | Bin 0 -> 25897 bytes mkdocs/docs/themes/Paper.png | Bin 0 -> 21850 bytes mkdocs/docs/themes/android_notification.png | Bin 0 -> 21541 bytes mkdocs/docs/themes/arthur.png | Bin 0 -> 24043 bytes mkdocs/docs/themes/blue.png | Bin 0 -> 23114 bytes mkdocs/docs/themes/c64.png | Bin 0 -> 17303 bytes mkdocs/docs/themes/capture.sh | 51 + mkdocs/docs/themes/default.png | Bin 0 -> 24975 bytes mkdocs/docs/themes/dmenu.png | Bin 0 -> 11040 bytes mkdocs/docs/themes/docu.png | Bin 0 -> 129092 bytes mkdocs/docs/themes/fancy.png | Bin 0 -> 33331 bytes mkdocs/docs/themes/glue_pro_blue.png | Bin 0 -> 25458 bytes mkdocs/docs/themes/gruvbox-dark-hard.png | Bin 0 -> 21816 bytes mkdocs/docs/themes/gruvbox-dark-soft.png | Bin 0 -> 21970 bytes mkdocs/docs/themes/gruvbox-dark.png | Bin 0 -> 21926 bytes mkdocs/docs/themes/gruvbox-light-hard.png | Bin 0 -> 22171 bytes mkdocs/docs/themes/gruvbox-light-soft.png | Bin 0 -> 22061 bytes mkdocs/docs/themes/gruvbox-light.png | Bin 0 -> 22129 bytes mkdocs/docs/themes/iggy.png | Bin 0 -> 1078652 bytes mkdocs/docs/themes/lb.png | Bin 0 -> 25160 bytes mkdocs/docs/themes/paper-float.png | Bin 0 -> 25555 bytes mkdocs/docs/themes/purple.png | Bin 0 -> 21645 bytes mkdocs/docs/themes/sidebar-v2.png | Bin 0 -> 47820 bytes mkdocs/docs/themes/sidebar.png | Bin 0 -> 28047 bytes mkdocs/docs/themes/solarized.png | Bin 0 -> 21140 bytes mkdocs/docs/themes/solarized_alternate.png | Bin 0 -> 21274 bytes mkdocs/docs/themes/themes.md | 123 ++ mkdocs/mkdocs.yml | 59 + 91 files changed, 18747 insertions(+), 102 deletions(-) create mode 100644 .github/workflows/mkdocs.yml create mode 100644 mkdocs/docs/1.7.0/rofi-script.5.markdown create mode 100644 mkdocs/docs/1.7.0/rofi-theme.5.markdown create mode 100644 mkdocs/docs/1.7.0/rofi.1.markdown create mode 100644 mkdocs/docs/1.7.1/rofi-script.5.markdown create mode 100644 mkdocs/docs/1.7.1/rofi-theme.5.markdown create mode 100644 mkdocs/docs/1.7.1/rofi.1.markdown create mode 100644 mkdocs/docs/1.7.2/rofi-script.5.markdown create mode 100644 mkdocs/docs/1.7.2/rofi-theme.5.markdown create mode 100644 mkdocs/docs/1.7.2/rofi.1.markdown create mode 100644 mkdocs/docs/1.7.3/rofi-debugging.5.markdown create mode 100644 mkdocs/docs/1.7.3/rofi-dmenu.5.markdown create mode 100644 mkdocs/docs/1.7.3/rofi-keys.5.markdown create mode 100644 mkdocs/docs/1.7.3/rofi-script.5.markdown create mode 100644 mkdocs/docs/1.7.3/rofi-theme.5.markdown create mode 100644 mkdocs/docs/1.7.3/rofi.1.markdown create mode 100644 mkdocs/docs/1.7.4/rofi-debugging.5.markdown create mode 100644 mkdocs/docs/1.7.4/rofi-dmenu.5.markdown create mode 100644 mkdocs/docs/1.7.4/rofi-keys.5.markdown create mode 100644 mkdocs/docs/1.7.4/rofi-script.5.markdown create mode 100644 mkdocs/docs/1.7.4/rofi-theme.5.markdown create mode 100644 mkdocs/docs/1.7.4/rofi.1.markdown create mode 100644 mkdocs/docs/1.7.5/rofi-debugging.5.markdown create mode 100644 mkdocs/docs/1.7.5/rofi-dmenu.5.markdown create mode 100644 mkdocs/docs/1.7.5/rofi-keys.5.markdown create mode 100644 mkdocs/docs/1.7.5/rofi-script.5.markdown create mode 100644 mkdocs/docs/1.7.5/rofi-theme.5.markdown create mode 100644 mkdocs/docs/1.7.5/rofi.1.markdown create mode 120000 mkdocs/docs/CONFIG.md create mode 120000 mkdocs/docs/COPYING.md create mode 120000 mkdocs/docs/INSTALL.md create mode 120000 mkdocs/docs/current/rofi-debugging.5.markdown create mode 120000 mkdocs/docs/current/rofi-dmenu.5.markdown create mode 120000 mkdocs/docs/current/rofi-keys.5.markdown create mode 120000 mkdocs/docs/current/rofi-script.5.markdown create mode 120000 mkdocs/docs/current/rofi-theme.5.markdown create mode 120000 mkdocs/docs/current/rofi.1.markdown create mode 100644 mkdocs/docs/guides/Plugins/2017-04-19-rofi-140-sneak-preview-plugins.md create mode 100644 mkdocs/docs/guides/Plugins/rofi-file-browser.png rename {doc/Notes/Theme => mkdocs/docs/guides}/Positioning/anchors.svg (100%) rename {doc/Notes/Theme => mkdocs/docs/guides}/Positioning/example-pos.png (100%) rename {doc/Notes/Theme => mkdocs/docs/guides}/Positioning/theme3-positioning.markdown (100%) rename {doc/Notes/Theme => mkdocs/docs/guides}/Transparency/rofi-background.png (100%) rename {doc/Notes/Theme => mkdocs/docs/guides}/Transparency/rofi-background2.png (100%) rename {doc/Notes/Theme => mkdocs/docs/guides}/Transparency/rofi-fake.png (100%) rename {doc/Notes/Theme => mkdocs/docs/guides}/Transparency/rofi-paper.png (100%) rename {doc/Notes/Theme => mkdocs/docs/guides}/Transparency/rofi-real.png (100%) rename {doc/Notes/Theme => mkdocs/docs/guides}/Transparency/rofi-transp.png (100%) rename {doc/Notes/Theme => mkdocs/docs/guides}/Transparency/structure.svg (100%) rename {doc/Notes/Theme => mkdocs/docs/guides}/Transparency/theme3-transparency.markdown (100%) create mode 100644 mkdocs/docs/images/rofi.png create mode 100644 mkdocs/docs/index.md create mode 100644 mkdocs/docs/themes/Adapta-Nokto.png create mode 100644 mkdocs/docs/themes/Arc-Dark.png create mode 100644 mkdocs/docs/themes/Arc.png create mode 100644 mkdocs/docs/themes/DarkBlue.png create mode 100644 mkdocs/docs/themes/Indego.png create mode 100644 mkdocs/docs/themes/Monokai.png create mode 100644 mkdocs/docs/themes/Paper.png create mode 100644 mkdocs/docs/themes/android_notification.png create mode 100644 mkdocs/docs/themes/arthur.png create mode 100644 mkdocs/docs/themes/blue.png create mode 100644 mkdocs/docs/themes/c64.png create mode 100755 mkdocs/docs/themes/capture.sh create mode 100644 mkdocs/docs/themes/default.png create mode 100644 mkdocs/docs/themes/dmenu.png create mode 100644 mkdocs/docs/themes/docu.png create mode 100644 mkdocs/docs/themes/fancy.png create mode 100644 mkdocs/docs/themes/glue_pro_blue.png create mode 100644 mkdocs/docs/themes/gruvbox-dark-hard.png create mode 100644 mkdocs/docs/themes/gruvbox-dark-soft.png create mode 100644 mkdocs/docs/themes/gruvbox-dark.png create mode 100644 mkdocs/docs/themes/gruvbox-light-hard.png create mode 100644 mkdocs/docs/themes/gruvbox-light-soft.png create mode 100644 mkdocs/docs/themes/gruvbox-light.png create mode 100644 mkdocs/docs/themes/iggy.png create mode 100644 mkdocs/docs/themes/lb.png create mode 100644 mkdocs/docs/themes/paper-float.png create mode 100644 mkdocs/docs/themes/purple.png create mode 100644 mkdocs/docs/themes/sidebar-v2.png create mode 100644 mkdocs/docs/themes/sidebar.png create mode 100644 mkdocs/docs/themes/solarized.png create mode 100644 mkdocs/docs/themes/solarized_alternate.png create mode 100644 mkdocs/docs/themes/themes.md create mode 100644 mkdocs/mkdocs.yml diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml new file mode 100644 index 00000000..4137d29a --- /dev/null +++ b/.github/workflows/mkdocs.yml @@ -0,0 +1,20 @@ +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 }} diff --git a/CONFIG.md b/CONFIG.md index 8732b12c..f065cb86 100644 --- a/CONFIG.md +++ b/CONFIG.md @@ -1,22 +1,8 @@ -> # :warning: This page does not describe all of **ROFI**'s configuration options, just the most common usecase. For the full configuration options, check the manpages. +> This page does not describe all of **ROFI**'s configuration options, just the most common usecase. For the full configuration options, check the manpages.
-## :exclamation: Upgrade from old configuration format to new :exclamation: - -In release after '2 Jan 2020' you can convert to the new configuration format by using the following command: - -```bash -rofi -upgrade-config -``` - -This will create `~/.config/rofi/config.rasi` (or the default location for your system) with the previously configured options. - -From 1.7.0 the old configuration format is no longer supported and the `-upgrade-config` option is no longer available. - -
- # Where does the configuration live Rofi's configurations, custom themes live in `${XDG_CONFIG_HOME}/rofi/`, on most systems this is `~/.config/rofi/`. @@ -62,6 +48,12 @@ configuration { } ``` +To create a copy of the current theme, you can run: + +```bash +rofi -dump-theme > ~/.config/rofi/current.rasi +``` + # Configuration file format ## Encoding @@ -195,6 +187,7 @@ configuration { ``` -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 **Themes** section\ -Imports can be nested. +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. diff --git a/INSTALL.md b/INSTALL.md index aff74e02..4e305095 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -184,6 +184,8 @@ can then load the core in GDB. > 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 diff --git a/doc/rofi-theme.5 b/doc/rofi-theme.5 index b7b64b25..080c0854 100644 --- a/doc/rofi-theme.5 +++ b/doc/rofi-theme.5 @@ -4,7 +4,7 @@ .PP \fBrofi-theme\fP - Rofi theme format files -.SH GETTING STARTED WITH THEMING +.SH Getting started with theming .PP The easiest way to get started theming rofi is by modifying your existing theme. @@ -227,7 +227,7 @@ rofi -dump-theme .fi .RE -.SH DEFAULT THEME LOADING +.SH Default theme loading .PP By default, rofi loads the default theme. This theme is \fBalways\fP loaded. The default configuration contains: @@ -265,14 +265,14 @@ rofi -no-config -dump-theme .fi .RE -.SH DESCRIPTION +.SH Description .PP The need for a new theme format was motivated by the fact that the way rofi handled widgets has changed. From a very static drawing of lines and text to a nice structured form of packing widgets. This change made it possible to provide a more flexible theme framework. The old theme format and config file are not flexible enough to expose these options in a user-friendly way. Therefore, a new file format has been created, replacing the old one. -.SH FORMAT SPECIFICATION +.SH Format specification .SH Encoding .PP The encoding of the file is UTF-8. Both unix (\fB\fC\\n\fR) and windows (\fB\fC\\r\\n\fR) newlines format are supported. But unix is @@ -556,7 +556,7 @@ Inherit .PP Some of these types are a combination of other types. -.SH String +.SS String .RS .IP \(bu 2 Format: \fB\fC"[:print:]+"\fR @@ -595,7 +595,7 @@ text { .PP The following special characters can be escaped: \fB\fC\\b\fR, \fB\fC\\f\fR, \fB\fC\\n\fR, \fB\fC\\r\fR, \fB\fC\\t\fR, \fB\fC\\v\fR, \fB\fC\\\fR and \fB\fC"\fR\&. -.SH Integer +.SS Integer .RS .IP \(bu 2 Format: \fB\fC[-+]?[:digit:]+\fR @@ -617,7 +617,7 @@ lines: 12; .fi .RE -.SH Real +.SS Real .RS .IP \(bu 2 Format: \fB\fC[-+]?[:digit:]+(\\.[:digit:]+)?\fR @@ -642,7 +642,7 @@ real: 3.4; .PP The following is not valid: \fB\fC\&.3\fR, \fB\fC3.\fR or scientific notation: \fB\fC3.4e-3\fR\&. -.SH Boolean +.SS Boolean .RS .IP \(bu 2 Format: \fB\fC(true|false)\fR @@ -664,7 +664,7 @@ dynamic: false; .fi .RE -.SH Image +.SS Image .PP \fBrofi\fP support a limited set of background-image formats. @@ -688,7 +688,7 @@ Angle in deg,rad,grad (as used in color). .PP Where the \fB\fCpath\fR is a string, and \fB\fCstop\fR color is of type color. -.SH Color +.SS Color .PP \fBrofi\fP supports the color formats as specified in the CSS standard (1,2,3 and some of CSS 4) @@ -776,7 +776,7 @@ text-color: Black; .fi .RE -.SH Text style +.SS Text style .RS .IP \(bu 2 Format: \fB\fC(bold|italic|underline|strikethrough|none)\fR @@ -820,7 +820,7 @@ The following option is disabled as pango crashes on this if there is eel .RE -.SH Line style +.SS Line style .RS .IP \(bu 2 Format: \fB\fC(dash|solid)\fR @@ -833,7 +833,7 @@ It currently supports: * \fB\fCdash\fR: a dashed line, where the gap is the same width as the dash * \fB\fCsolid\fR: a solid line -.SH Distance +.SS Distance .RS .IP \(bu 2 Format: \fB\fC{Integer}px\fR @@ -935,7 +935,7 @@ It supports the following operations: .PP It uses the C precedence ordering. -.SH Padding +.SS Padding .RS .IP \(bu 2 Format: \fB\fC{Integer}\fR @@ -968,7 +968,7 @@ The different number of fields in the formats are parsed like: .RE -.SH Border +.SS Border .RS .IP \(bu 2 Format: \fB\fC{Integer}\fR @@ -1003,7 +1003,7 @@ When no unit is specified, pixels are assumed. .RE -.SH Position +.SS Position .PP Indicate a place on the window/monitor. @@ -1028,7 +1028,7 @@ Format: \fB\fC(center|east|north|west|south|north east|north west|south west|sou .RE -.SH Visibility +.SS Visibility .PP It is possible to hide widgets: @@ -1043,7 +1043,7 @@ inputbar { .fi .RE -.SH Reference +.SS Reference .RS .IP \(bu 2 Format: \fB\fC@{PROPERTY NAME}\fR @@ -1110,7 +1110,7 @@ window { If the property \fB\fCwidth\fR is set globally (\fB\fC*{}\fR) that value is used, if the property \fB\fCwidth\fR is not set, the default value is used. -.SH Orientation +.SS Orientation .RS .IP \(bu 2 Format: \fB\fC(horizontal|vertical)\fR @@ -1120,7 +1120,7 @@ Format: \fB\fC(horizontal|vertical)\fR .PP Specify the orientation of the widget. -.SH Cursor +.SS Cursor .RS .IP \(bu 2 Format: \fB\fC(default|pointer|text)\fR @@ -1130,7 +1130,7 @@ Format: \fB\fC(default|pointer|text)\fR .PP Specify the type of mouse cursor that is set when the mouse pointer is over the widget. -.SH List of keywords +.SS List of keywords .RS .IP \(bu 2 Format: \fB\fC[ keyword, keyword ]\fR @@ -1141,7 +1141,7 @@ Format: \fB\fC[ keyword, keyword ]\fR A list starts with a '[' and ends with a ']'. The entries in the list are comma-separated. The \fB\fCkeyword\fR in the list refers to an widget name. -.SH List of values +.SS List of values .RS .IP \(bu 2 Format: \fB\fC[ value, value, ... ]\fR @@ -1151,7 +1151,7 @@ Format: \fB\fC[ value, value, ... ]\fR .PP An list starts with a '[' and ends with a ']'. The entries in the list are comma-separated. -.SH Environment variable +.SS Environment variable .RS .IP \(bu 2 Format: \fB\fC${:alnum:}\fR @@ -1198,7 +1198,7 @@ window { .PP If environment WIDTH is set, then that value is parsed, otherwise the default value (\fB\fC40%\fR). -.SH Inherit +.SS Inherit .RS .IP \(bu 2 Format: \fB\fCinherit\fR @@ -1219,7 +1219,7 @@ mainbox { .fi .RE -.SH ELEMENTS PATHS +.SH Elements paths .PP Element paths exists of two parts, the first part refers to the actual widget by name. Some widgets have an extra state. @@ -1257,10 +1257,10 @@ element selected { .fi .RE -.SH SUPPORTED ELEMENT PATH -.SH Name +.SS Supported element paths +.SS Name .PP -The current widgets available in \fBrofi\fP: +The default widgets available in \fBrofi\fP and the default hierarchic: .RS .IP \(bu 2 @@ -1338,7 +1338,7 @@ The current widgets available in \fBrofi\fP: Note that these path names match the default theme. Themes that provide a custom layout will have different elements, and structure. -.SH State +.SS State .PP State: State of widget @@ -1401,11 +1401,11 @@ Note that a state modifies the original element, it therefore contains all the p The scrollbar uses the \fB\fChandle\fR state when drawing the small scrollbar handle. This allows the colors used for drawing the handle to be set independently. -.SH SUPPORTED PROPERTIES +.SH Widget properties .PP The following properties are currently supported: -.SS all widgets: +.SS all widgets .RS .IP \(bu 2 \fBenabled\fP: enable/disable rendering of the widget @@ -1436,7 +1436,7 @@ Type of mouse cursor that is set when the mouse pointer is hovered over the widg .RE -.SS window: +.SS window .RS .IP \(bu 2 \fBfont\fP: string @@ -1468,7 +1468,7 @@ The offset of the window to the anchor point, allowing you to push the window le .RE -.SS scrollbar: +.SS scrollbar .RS .IP \(bu 2 \fBbackground-color\fP: color @@ -1481,7 +1481,7 @@ The offset of the window to the anchor point, allowing you to push the window le .RE -.SS box: +.SS box .RS .IP \(bu 2 \fBorientation\fP: orientation @@ -1492,7 +1492,7 @@ The offset of the window to the anchor point, allowing you to push the window le .RE -.SS textbox: +.SS textbox .RS .IP \(bu 2 \fBbackground-color\fP: color @@ -1552,7 +1552,7 @@ The text appears to the right of the tab stop position (other alignments are not .RE -.SS listview: +.SS listview .RS .IP \(bu 2 \fBcolumns\fP: integer @@ -1600,7 +1600,7 @@ hitting accept will activate the first entry. .PP Each element is a \fB\fCbox\fR called \fB\fCelement\fR\&. Each \fB\fCelement\fR can contain an \fB\fCelement-icon\fR and \fB\fCelement-text\fR\&. -.SS listview text highlight: +.SS listview text highlight .PP The \fB\fCelement-text\fR widget in the \fB\fClistview\fR is the one used to show the text. On this widget set the \fB\fChighlight\fR property (only place this property is used) to change @@ -2009,7 +2009,7 @@ If both dummy widgets are set to expand, \fB\fCchild\fR will be centered. Depend remaining space will be equally divided between both dummy and child widget (expand enabled), or both dummy widgets (expand disabled). -.SH DEBUGGING +.SH Debugging .PP To get debug information from the parser, run rofi like: @@ -2259,7 +2259,7 @@ If a filename is provided, it will try to resolve it in the following order: .PP A name is resolved as a filename by appending the \fB\fC\&.rasi\fR extension. -.SH EXAMPLES +.SH Examples .PP Several examples are installed together with \fBrofi\fP\&. These can be found in \fB\fC{datadir}/rofi/themes/\fR, where \fB\fC{datadir}\fR is the install path of \fBrofi\fP data. When installed using a package manager, this is usually: \fB\fC/usr/share/\fR\&. diff --git a/doc/rofi-theme.5.markdown b/doc/rofi-theme.5.markdown index bec95423..99e98e5f 100644 --- a/doc/rofi-theme.5.markdown +++ b/doc/rofi-theme.5.markdown @@ -4,7 +4,7 @@ **rofi-theme** - Rofi theme format files -## GETTING STARTED WITH THEMING +## Getting started with theming The easiest way to get started theming rofi is by modifying your existing theme. @@ -150,7 +150,7 @@ If you want to see the complete theme, including the modification you can run: rofi -dump-theme ``` -## DEFAULT THEME LOADING +## Default theme loading By default, rofi loads the default theme. This theme is **always** loaded. The default configuration contains: @@ -174,14 +174,14 @@ To see the default theme, run the following command: rofi -no-config -dump-theme ``` -## DESCRIPTION +## Description The need for a new theme format was motivated by the fact that the way rofi handled widgets has changed. From a very static drawing of lines and text to a nice structured form of packing widgets. This change made it possible to provide a more flexible theme framework. The old theme format and config file are not flexible enough to expose these options in a user-friendly way. Therefore, a new file format has been created, replacing the old one. -## FORMAT SPECIFICATION +## Format specification ## Encoding @@ -370,7 +370,7 @@ The current theme format supports different types: Some of these types are a combination of other types. -## String +### String * Format: `"[:print:]+"` @@ -392,7 +392,7 @@ text { The following special characters can be escaped: `\b`, `\f`, `\n`, `\r`, `\t`, `\v`, `\` and `"`. -## Integer +### Integer * Format: `[-+]?[:digit:]+` @@ -404,7 +404,7 @@ For examples: lines: 12; ``` -## Real +### Real * Format: `[-+]?[:digit:]+(\.[:digit:]+)?` @@ -418,7 +418,7 @@ real: 3.4; The following is not valid: `.3`, `3.` or scientific notation: `3.4e-3`. -## Boolean +### Boolean * Format: `(true|false)` @@ -431,7 +431,7 @@ For example: dynamic: false; ``` -## Image +### Image **rofi** support a limited set of background-image formats. @@ -446,7 +446,7 @@ dynamic: false; Where the `path` is a string, and `stop` color is of type color. -## Color +### Color **rofi** supports the color formats as specified in the CSS standard (1,2,3 and some of CSS 4) @@ -502,7 +502,7 @@ background-color: transparent; text-color: Black; ``` -## Text style +### Text style * Format: `(bold|italic|underline|strikethrough|none)` @@ -524,7 +524,7 @@ The following options are available on pango 1.50.0 and up: * `capitalize`: Capitalize the text. -## Line style +### Line style * Format: `(dash|solid)` @@ -533,7 +533,7 @@ It currently supports: * `dash`: a dashed line, where the gap is the same width as the dash * `solid`: a solid line -## Distance +### Distance * Format: `{Integer}px` * Format: `{Real}em` @@ -559,7 +559,7 @@ For example: On a full-HD (1920x1080) monitor, it defines a padding of 192 pixels on the left and right side and 108 pixels on the top and bottom. -### Calculating sizes +#### Calculating sizes Rofi supports some maths in calculating sizes. For this it uses the CSS syntax: @@ -586,7 +586,7 @@ It supports the following operations: It uses the C precedence ordering. -## Padding +### Padding * Format: `{Integer}` * Format: `{Distance}` @@ -604,7 +604,7 @@ The different number of fields in the formats are parsed like: * 4 fields: `top`, `right`, `bottom`, `left` -## Border +### Border * Format: `{Integer}` * Format: `{Distance}` @@ -622,7 +622,7 @@ style property. > When no unit is specified, pixels are assumed. -## Position +### Position Indicate a place on the window/monitor. @@ -638,7 +638,7 @@ Indicate a place on the window/monitor. * Format: `(center|east|north|west|south|north east|north west|south west|south east)` -## Visibility +### Visibility It is possible to hide widgets: @@ -649,7 +649,7 @@ inputbar { ``` -## Reference +### Reference * Format: `@{PROPERTY NAME}` @@ -690,32 +690,32 @@ If the property `width` is set globally (`*{}`) that value is used, if the prope `width` is not set, the default value is used. -## Orientation +### Orientation * Format: `(horizontal|vertical)` Specify the orientation of the widget. -## Cursor +### Cursor * Format: `(default|pointer|text)` Specify the type of mouse cursor that is set when the mouse pointer is over the widget. -## List of keywords +### List of keywords * Format: `[ keyword, keyword ]` A list starts with a '[' and ends with a ']'. The entries in the list are comma-separated. The `keyword` in the list refers to an widget name. -## List of values +### List of values * Format: `[ value, value, ... ]` An list starts with a '[' and ends with a ']'. The entries in the list are comma-separated. -## Environment variable +### Environment variable * Format: `${:alnum:}` @@ -742,7 +742,7 @@ window { If environment WIDTH is set, then that value is parsed, otherwise the default value (`40%`). -## Inherit +### Inherit * Format: `inherit` @@ -755,7 +755,7 @@ mainbox { ``` -## ELEMENTS PATHS +## Elements paths Element paths exists of two parts, the first part refers to the actual widget by name. Some widgets have an extra state. @@ -780,11 +780,11 @@ element selected { } ``` -## SUPPORTED ELEMENT PATH +### Supported element paths -## Name +### Name -The current widgets available in **rofi**: +The default widgets available in **rofi** and the default hierarchic: * `window` * `overlay`: the overlay widget. @@ -813,7 +813,7 @@ Note that these path names match the default theme. Themes that provide a custom elements, and structure. -## State +### State State: State of widget @@ -821,7 +821,7 @@ Optional flag(s) indicating state of the widget, used for theming. These are appended after the name or class of the widget. -### Example: +#### Example: `button selected.normal { }` @@ -829,7 +829,7 @@ These are appended after the name or class of the widget. Currently only the entrybox and scrollbar have states: -### Entrybox: +#### Entrybox: `{visible modifier}.{state}` @@ -857,17 +857,17 @@ nametotextbox selected.active { Sets all selected textboxes marked active to the given text and background color. Note that a state modifies the original element, it therefore contains all the properties of that element. -### Scrollbar +#### Scrollbar The scrollbar uses the `handle` state when drawing the small scrollbar handle. This allows the colors used for drawing the handle to be set independently. -## SUPPORTED PROPERTIES +## Widget properties The following properties are currently supported: -### all widgets: +### all widgets * **enabled**: enable/disable rendering of the widget * **padding**: padding @@ -887,7 +887,7 @@ The following properties are currently supported: * **cursor**: cursor Type of mouse cursor that is set when the mouse pointer is hovered over the widget. -### window: +### window * **font**: string The font used in the window @@ -912,21 +912,21 @@ The following properties are currently supported: The offset of the window to the anchor point, allowing you to push the window left/right/up/down -### scrollbar: +### scrollbar * **background-color**: color * **handle-width**: distance * **handle-color**: color * **border-color**: color -### box: +### box * **orientation**: orientation Set the direction the elements are packed. * **spacing**: distance Distance between the packed elements. -### textbox: +### textbox * **background-color**: color * **border-color**: the color used for the border around the widget. @@ -959,7 +959,7 @@ The following properties are currently supported: * **text-outline-width**: The width of the border around the text. (Double) * **text-outline-color**: The color to use for the text outline. (Color) -### listview: +### listview * **columns**: integer Number of columns to show (at least 1) * **fixed-height**: boolean @@ -990,7 +990,7 @@ The following properties are currently supported: Each element is a `box` called `element`. Each `element` can contain an `element-icon` and `element-text`. -### listview text highlight: +#### listview text highlight The `element-text` widget in the `listview` is the one used to show the text. On this widget set the `highlight` property (only place this property is used) to change @@ -1291,7 +1291,7 @@ If both dummy widgets are set to expand, `child` will be centered. Depending on remaining space will be equally divided between both dummy and child widget (expand enabled), or both dummy widgets (expand disabled). -## DEBUGGING +## Debugging To get debug information from the parser, run rofi like: @@ -1434,7 +1434,7 @@ A name is resolved as a filename by appending the `.rasi` extension. -## EXAMPLES +## Examples Several examples are installed together with **rofi**. These can be found in `{datadir}/rofi/themes/`, where `{datadir}` is the install path of **rofi** data. When installed using a package manager, this is usually: `/usr/share/`. diff --git a/doc/rofi.1 b/doc/rofi.1 index 20db729f..d99e8f26 100644 --- a/doc/rofi.1 +++ b/doc/rofi.1 @@ -1577,11 +1577,17 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. .SH SUPPORT .PP \fBrofi\fP support can be obtained: - * GitHub Discussions + +.RS +.IP \(bu 2 +GitHub Discussions \[la]https://github.com/davatorium/rofi/discussions\[ra] - * IRC +.IP \(bu 2 +IRC \[la]irc://irc.libera.chat:6697/#rofi\[ra] (#rofi on irc.libera.chat), +.RE + .SH DEBUGGING .PP For more information see \fBrofi-debugging(5)\fP manpage. diff --git a/doc/rofi.1.markdown b/doc/rofi.1.markdown index 73d94af6..dc1bde35 100644 --- a/doc/rofi.1.markdown +++ b/doc/rofi.1.markdown @@ -1001,6 +1001,7 @@ been released. ## SUPPORT **rofi** support can be obtained: + * [GitHub Discussions](https://github.com/davatorium/rofi/discussions) * [IRC](irc://irc.libera.chat:6697/#rofi) (#rofi on irc.libera.chat), diff --git a/mkdocs/docs/1.7.0/rofi-script.5.markdown b/mkdocs/docs/1.7.0/rofi-script.5.markdown new file mode 100644 index 00000000..3e6bd778 --- /dev/null +++ b/mkdocs/docs/1.7.0/rofi-script.5.markdown @@ -0,0 +1,145 @@ +# ROFI-SCRIPT 5 rofi-script + +## NAME + +**rofi script mode** - Rofi format for scriptable modi. + + +## DESCRIPTION + +**rofi** supports modes that use simple scripts in the background to generate a list and process the result from user +actions. This provide a simple interface to make simple extensions to rofi. + + +## USAGE + +To specify a script mode, set a mode with the following syntax: "{name}:{executable}" + +For example: + +``` +rofi -show fb -modi "fb:file_browser.sh" +``` + +The name should be unique. + +## API + +Rofi calls the executable without arguments on startup. This should generate a list of options, separated by a newline +(`\n`) (This can be changed by the script). +If the user selects an option, rofi calls the executable with the text of that option as the first argument. +If the script returns no entries, rofi quits. + +A simple script would be: + +```bash +#!/usr/bin/env bash + +if [ x"$@" = x"quit" ] +then + exit 0 +fi +echo "reload" +echo "quit" + +``` + +This shows two entries, reload and quit. When the quit entry is selected, rofi closes. + +## Environment + +Rofi sets the following environment variable when executing the script: + +### `ROFI_RETV` + +An integer number with the current state: + + * **0**: Initial call of script. + * **1**: Selected an entry. + * **2**: Selected a custom entry. + * **10-28**: Custom keybinding 1-19 ( need to be explicitly enabled by script ). + +### `ROFI_INFO` + +Environment get set when selected entry get set with the property value of the 'info' row option, if set. + +## Passing mode options + +Extra options, like setting the prompt, can be set by the script. +Extra options are lines that start with a NULL character (`\0`) followed by a key, separator (`\x1f`) and value. + +For example to set the prompt: + +```bash + echo -en "\0prompt\x1fChange prompt\n" +``` + +The following extra options exists: + + * **prompt**: Update the prompt text. + * **message**: Update the message text. + * **markup-rows**: If 'true' renders markup in the row. + * **urgent**: Mark rows as urgent. (for syntax see the urgent option in dmenu mode) + * **active**: Mark rows as active. (for syntax see the active option in dmenu mode) + * **delim**: Set the delimiter for for next rows. Default is '\n' and this option should finish with this. Only call this on first call of script, it is remembered for consecutive calls. + * **no-custom**: If set to 'true'; only accept listed entries, ignore custom input. + * **use-hot-keys**: If set to true, it enabled the Custom keybindings for script. Warning this breaks the normal rofi flow. + +## Parsing row options + +Extra options for individual rows can be set. +The extra option can be specified following the same syntax as mode option, but following the entry. + +For example: + +```bash + echo -en "aap\0icon\x1ffolder\n" +``` + +The following options are supported: + + * **icon**: Set the icon for that row. + * **meta**: Specify invisible search terms. + * **nonselectable**: If true the row cannot activated. + * **info**: Info that, on selection, gets placed in the `ROFI_INFO` environment variable. This entry does not get searched. + +multiple entries can be passed using the `\x1f` separator. + +```bash + echo -en "aap\0icon\x1ffolder\x1finfo\x1ftest\n" +``` + +## Executing external program + +If you want to launch an external program from the script, you need to make sure it is launched in the background. +If not rofi will wait for its output (to display). + +In bash the best way to do this is using `coproc`. + +```bash + coproc ( myApp > /dev/null 2>&1 ) +``` + + +## DASH shell + +If you use the `dash` shell for your script, take special care with how dash handles escaped values for the separators. +See issue #1201 on github. + + +## SEE ALSO + +rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1) + +## AUTHOR + +Qball Cow + +Rasmus Steinke + +Quentin 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.0/rofi-theme.5.markdown b/mkdocs/docs/1.7.0/rofi-theme.5.markdown new file mode 100644 index 00000000..ba96ead3 --- /dev/null +++ b/mkdocs/docs/1.7.0/rofi-theme.5.markdown @@ -0,0 +1,1140 @@ +# ROFI-THEME 5 rofi-theme + +## NAME + +**rofi-theme** - Rofi theme format files + +## DESCRIPTION + +The need for a new theme format was motivated by the fact that the way rofi handled widgets has changed. From a very +static drawing of lines and text to a nice structured form of packing widgets. This change made it possible to provide a +more flexible theme framework. The old theme format and config file are not flexible enough to expose these options in a +user-friendly way. Therefore, a new file format has been created, replacing the old one. + +## FORMAT SPECIFICATION + +## 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 + +; +``` + +## File extension + +The preferred file extension for the new theme format is **rasi**. This is an +abbreviation for **r**ofi **a**dvanced **s**tyle **i**nformation. + +## Basic Structure + +Each element has a section with defined properties. Global properties can be defined in section `* { }`. +Sub-section names begin with a hash symbol `#`. + +It is advised to define the *global properties section* on top of the file to +make inheritance of properties clearer. + +```css +/* Global properties section */ +* { + // list of properties +} + +/* Element theme section. */ +{element path} { + // list of properties +} +{elements... } { + // list of properties +} +``` + +If there are multiple sections with the same name, they are merged. Duplicate properties are overwritten and the last +parsed entry kept. + +## Global properties section + +A theme can have one or more global properties sections. If there is more than one, +they will be merged. + +The global properties section denotes the defaults for each element. +Each property of this section can be referenced with `@{identifier}` +(See Properties section) + +A global properties section is indicated with a `*` as element path. + +## Element theme section + +A theme can have multiple element theme sections. + +The element path can consist of multiple names separated by whitespace or dots. +Each element may contain any number of letters, numbers and `-`'s. +The first element in the element path should always start with a `#`. +Multiple elements can be specified by a `,`. + +This is a valid element name: + +```css +element normal.normal { + background-color: blue; +} +button { + background-color: blue; +} +``` + +And is identical to: + +```css +element normal normal, button { + background-color: blue; +} +``` + +Each section inherits the global properties. Properties can be explicitly inherited from their parent with the +`inherit` keyword. +In the following example: + +```css +window { + a: 1; + b: 2; + children: [ mainbox ]; +} +mainbox { + a: inherit; + b: 4; + c: 8; +} +``` + +The element `mainbox` will have the following set of properties (if `mainbox` is a child of `window`): + +```css +a: 1; +b: 4; +c: 8; +``` + +If multiple sections are defined with the same name, they are merged by the +parser. If multiple properties with the same name are defined in one section, +the last encountered property is used. + +## Properties Format + +The properties in a section consist of: + +```css +{identifier}: {value}; +``` + +Both fields are mandatory for a property. + +The `identifier` names the specified property. Identifiers can consist of any +combination of numbers, letters and '-'. It must not contain any whitespace. +The structure of the `value` defines the type of the property. The current +parser does not define or enforce a certain type of a particular `identifier`. +When used, values with the wrong type that cannot be converted are ignored. + +The current theme format supports different types: + + * a string + * an integer number + * a fractional number + * a boolean value + * a color + * image + * text style + * line style + * a distance + * a padding + * a border + * a position + * a reference + * an orientation + * a cursor + * a list of keywords + * an environment variable + * Inherit + +Some of these types are a combination of other types. + +## String + +* Format: `"[:print:]+"` + +A string is always surrounded by double quotes (`"`). Between the quotes there can be any printable character. + +For example: + +```css +font: "Awasome 12"; +``` + +The string must be valid UTF-8. + +## Integer + +* Format: `[-+]?[:digit:]+` + +An integer may contain any number. + +For examples: + +```css +lines: 12; +``` + +## Real + +* Format: `[-+]?[:digit:]+(\.[:digit:]+)?` + +A real is an integer with an optional fraction. + +For example: + +```css +real: 3.4; +``` + +The following is not valid: `.3`, `3.` or scientific notation: `3.4e-3`. + +## Boolean + +* Format: `(true|false)` + +Boolean value is either `true` or `false`. This is case-sensitive. + + +For example: + +```css +dynamic: false; +``` + +## Image + +**rofi** support a limited set of background-image formats. + +* Format: url("path to image"); +* Format: url("path to image", scale); + where scale is: none, both, width, height +* Format: linear-gradient(stop color,stop1, color, stop2 color, ...); +* Format: linear-gradient(to direction, stop color,stop1, color, stop2 color, ...); + where direction is: top,left,right,bottom. +* Format: linear-gradient(angle, stop color,stop1, color, stop2 color, ...); + Angle in deg,rad,grad (as used in color). + +Where the `path` is a string, and `stop` color is of type color. + +## Color + +**rofi** supports the color formats as specified in the CSS standard (1,2,3 and some of CSS 4) + +* Format: `#{HEX}{3}` (rgb) +* Format: `#{HEX}{4}` (rgba) +* Format: `#{HEX}{6}` (rrggbb) +* Format: `#{HEX}{8}` (rrggbbaa) +* Format: `rgb[a]({INTEGER},{INTEGER},{INTEGER}[, {PERCENTAGE}])` +* Format: `rgb[a]({INTEGER}%,{INTEGER}%,{INTEGER}%[, {PERCENTAGE}])` +* Format: `hsl[a]( {ANGLE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE}])` +* Format: `hwb[a]( {ANGLE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE}])` +* Format: `cmyk( {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE} ])` +* Format: `{named-color} [ / {PERCENTAGE} ]` + +The white-space format proposed in CSS4 is also supported. + +The different values are: + + * `{HEX}` is a hexadecimal number ('0-9a-f' case insensitive). + * `{INTEGER}` value can be between 0 and 255 or 0-100 when representing percentage. + * `{ANGLE}` is the angle on the color wheel, can be in `deg`, `rad`, `grad` or `turn`. When no unit is specified, degrees is assumed. + * `{PERCENTAGE}` can be between 0-1.0, or 0%-100% + * `{named-color}` is one of the following colors: + + AliceBlue, AntiqueWhite, Aqua, Aquamarine, Azure, Beige, Bisque, Black, BlanchedAlmond, Blue, BlueViolet, Brown, + BurlyWood, CadetBlue, Chartreuse, Chocolate, Coral, CornflowerBlue, Cornsilk, Crimson, Cyan, DarkBlue, DarkCyan, + DarkGoldenRod, DarkGray, DarkGrey, DarkGreen, DarkKhaki, DarkMagenta, DarkOliveGreen, DarkOrange, DarkOrchid, DarkRed, + DarkSalmon, DarkSeaGreen, DarkSlateBlue, DarkSlateGray, DarkSlateGrey, DarkTurquoise, DarkViolet, DeepPink, DeepSkyBlue, + DimGray, DimGrey, DodgerBlue, FireBrick, FloralWhite, ForestGreen, Fuchsia, Gainsboro, GhostWhite, Gold, GoldenRod, + Gray, Grey, Green, GreenYellow, HoneyDew, HotPink, IndianRed, Indigo, Ivory, Khaki, Lavender, LavenderBlush, LawnGreen, + LemonChiffon, LightBlue, LightCoral, LightCyan, LightGoldenRodYellow, LightGray, LightGrey, LightGreen, LightPink, + LightSalmon, LightSeaGreen, LightSkyBlue, LightSlateGray, LightSlateGrey, LightSteelBlue, LightYellow, Lime, LimeGreen, + Linen, Magenta, Maroon, MediumAquaMarine, MediumBlue, MediumOrchid, MediumPurple, MediumSeaGreen, MediumSlateBlue, + MediumSpringGreen, MediumTurquoise, MediumVioletRed, MidnightBlue, MintCream, MistyRose, Moccasin, NavajoWhite, Navy, + OldLace, Olive, OliveDrab, Orange, OrangeRed, Orchid, PaleGoldenRod, PaleGreen, PaleTurquoise, PaleVioletRed, + PapayaWhip, PeachPuff, Peru, Pink, Plum, PowderBlue, Purple, RebeccaPurple, Red, RosyBrown, RoyalBlue, SaddleBrown, + Salmon, SandyBrown, SeaGreen, SeaShell, Sienna, Silver, SkyBlue, SlateBlue, SlateGray, SlateGrey, Snow, SpringGreen, + SteelBlue, Tan, Teal, Thistle, Tomato, Turquoise, Violet, Wheat, White, WhiteSmoke, Yellow, YellowGreen,transparent + + + +For example: + +```css +background-color: #FF0000; +border-color: rgba(0,0,1, 0.5); +text-color: SeaGreen; +``` +or + +```css +background-color: transparent; +text-color: Black; +``` + +## Text style + +* Format: `(bold|italic|underline|strikethrough|none)` + +Text style indicates how the highlighted text is emphasized. `None` indicates that no emphasis +should be applied. + + * `bold`: make the text thicker then the surrounding text. + * `italic`: put the highlighted text in script type (slanted). + * `underline`: put a line under the highlighted text. + * `strikethrough`: put a line through the highlighted text. + +## Line style + +* Format: `(dash|solid)` + +Indicates how a line should be drawn. +It currently supports: + * `dash`: a dashed line, where the gap is the same width as the dash + * `solid`: a solid line + +## Distance + +* Format: `{Integer}px` +* Format: `{Real}em` +* Format: `{Real}ch` +* Format: `{Real}%` +* Format: `{Integer}mm` + +A distance can be specified in 3 different units: + +* `px`: Screen pixels. +* `em`: Relative to text height. +* `ch`: Relative to width of a single number. +* `mm`: Actual size in millimeters (based on dpi). +* `%`: Percentage of the **monitor** size. + +Distances used in the horizontal direction use the monitor width. Distances in +the vertical direction use the monitor height. +For example: + +```css + padding: 10%; +``` +On a full-HD (1920x1080) monitor, it defines a padding of 192 pixels on the left +and right side and 108 pixels on the top and bottom. + +### Calculating sizes + +Rofi supports some maths in calculating sizes. For this it uses the CSS syntax: + +```css +width: calc( 100% - 37px ); +``` + +It supports the following operations: + +* `+` : Add +* `-` : Subtract +* `/` : Divide +* `*` : Multiply +* `%` : Multiply +* `min` : Minimum of l or rvalue; +* `max` : Maximum of l or rvalue; + +It uses the C precedence ordering. + +## Padding + +* Format: `{Integer}` +* Format: `{Distance}` +* Format: `{Distance} {Distance}` +* Format: `{Distance} {Distance} {Distance}` +* Format: `{Distance} {Distance} {Distance} {Distance}` + +If no unit is specified, pixels are assumed. + +The different number of fields in the formats are parsed like: + +* 1 field: `all` +* 2 fields: `top&bottom` `left&right` +* 3 fields: `top`, `left&right`, `bottom` +* 4 fields: `top`, `right`, `bottom`, `left` + + +## Border + +* Format: `{Integer}` +* Format: `{Distance}` +* Format: `{Distance} {Distance}` +* Format: `{Distance} {Distance} {Distance}` +* Format: `{Distance} {Distance} {Distance} {Distance}` +* Format: `{Distance} {Line style}` +* Format: `{Distance} {Line style} {Distance} {Line style}` +* Format: `{Distance} {Line style} {Distance} {Line style} {Distance} {Line style}` +* Format: `{Distance} {Line style} {Distance} {Line style} {Distance} {Line style} {Distance} {Line style}` + +Borders are identical to padding, except that each distance field has a line +style property. + +> When no unit is specified, pixels are assumed. + +## Position + +Indicate a place on the window/monitor. + +* Format: `(center|east|north|west|south|north east|north west|south west|south east)` + +``` + +north west | north | north east +-------------|-------------|------------ + west | center | east +-------------|-------------|------------ +south west | south | south east +``` + +## Visibility + +It is possible to hide widgets: + +inputbar { + enabled: false; +} + +## Reference + +* Format: `@{PROPERTY NAME}` + +A reference can point to another reference. Currently, the maximum number of redirects is 20. +A property always refers to another property. It cannot be used for a subpart of the property. +For example, this is not valid: + +```css +highlight: bold @pink; +``` + +But this is: + +```css +* { + myhigh: bold #FAA; +} + +window { + highlight: @myhigh; +} +``` + +## Orientation + + * Format: `(horizontal|vertical)` + +Specify the orientation of the widget. + +## Cursor + + * Format: `(default|pointer|text)` + +Specify the type of mouse cursor that is set when the mouse pointer is over the widget. + +## List of keywords + +* Format: `[ keyword, keyword ]` + +A list starts with a '[' and ends with a ']'. The entries in the list are comma-separated. +The `keyword` in the list refers to an widget name. + +## Environment variable + +* Format: `${:alnum:}` + +This will parse the environment variable as the property value. (that then can be any of the above types). +The environment variable should be an alphanumeric string without white-space. + +```css +* { + background-color: ${BG}; +} +``` + +## Inherit + + * Format: `inherit` + +Inherits the property from its parent widget. + +```css +mainbox { + border-color: inherit; +} +``` + + +## ELEMENTS PATHS + +Element paths exists of two parts, the first part refers to the actual widget by name. +Some widgets have an extra state. + +For example: + +```css +element selected { +} +``` + +Here `element selected` is the name of the widget, `selected` is the state of the widget. + +The difference between dots and spaces is purely cosmetic. These are all the same: + +```css +element .selected { + +element.selected { +} +element selected { +} +``` + +## SUPPORTED ELEMENT PATH + +## Name + +The current widgets available in **rofi**: + +* `window` + * `overlay`: the overlay widget. + * `mainbox`: The mainbox box. + * `inputbar`: The input bar box. + * `box`: the horizontal @box packing the widgets + * `case-indicator`: the case/sort indicator @textbox + * `prompt`: the prompt @textbox + * `entry`: the main entry @textbox + * `num-rows`: Shows the total number of rows. + * `num-filtered-rows`: Shows the total number of rows after filtering. + * `listview`: The listview. + * `scrollbar`: the listview scrollbar + * `element`: a box in the listview holding the entries + * `element-icon`: the widget in the listview's entry showing the (optional) icon + * `element-index`: the widget in the listview's entry keybindable index (1,2,3..0) + * `element-text`: the widget in the listview's entry showing the text. + * `mode-switcher`: the main horizontal @box packing the buttons. + * `button`: the buttons @textbox for each mode + * `message`: The container holding the textbox. + * `textbox`: the message textbox + +Note that these path names match the default theme. Themes that provide a custom layout will have different +elements, and structure. + + +## State + +State: State of widget + +Optional flag(s) indicating state of the widget, used for theming. + +These are appended after the name or class of the widget. + +### Example: + +`button selected.normal { }` + +`element selected.urgent { }` + +Currently only the entrybox and scrollbar have states: + +### Entrybox: + +`{visible modifier}.{state}` + +Where `visible modifier` can be: + * normal: no modification + * selected: the entry is selected/highlighted by user + * alternate: the entry is at an alternating row (uneven row) + +Where `state` is: + * normal: no modification + * urgent: this entry is marked urgent + * active: this entry is marked active + +These can be mixed. + +Example: + +```css +nametotextbox selected.active { + background-color: #003642; + text-color: #008ed4; +} +``` + +Sets all selected textboxes marked active to the given text and background color. +Note that a state modifies the original element, it therefore contains all the properties of that element. + +### Scrollbar + +The scrollbar uses the `handle` state when drawing the small scrollbar handle. +This allows the colors used for drawing the handle to be set independently. + + +## SUPPORTED PROPERTIES + +The following properties are currently supported: + +### all widgets: + +* **enabled**: enable/disable the widget +* **padding**: padding + Padding on the inside of the widget +* **margin**: padding + Margin on the outside of the widget +* **border**: border + Border around the widget (between padding and margin)/ +* **border-radius**: padding + Sets a radius on the corners of the borders. +* **background-color**: color + Background color +* **background-image**: image + Background image +* **border-color**: color + Color of the border +* **cursor**: cursor + Type of mouse cursor that is set when the mouse pointer is hovered over the widget. + +### window: + +* **font**: string + The font used in the window + +* **transparency**: string + Indicating if transparency should be used and what type: + **real** - True transparency. Only works with a compositor. + **background** - Take a screenshot of the background image and use that. + **screenshot** - Take a screenshot of the screen and use that. + **Path** to png file - Use an image. + +* **location**: position + The place of the anchor on the monitor +* **anchor**: anchor + The anchor position on the window +* **fullscreen**: boolean + Window is fullscreen. +* **width**: distance + The width of the window +* **x-offset**: distance +* **y-offset**: distance + The offset of the window to the anchor point, allowing you to push the window left/right/up/down + + +### scrollbar: + +* **background-color**: color +* **handle-width**: distance +* **handle-color**: color +* **border-color**: color + +### box: + +* **orientation**: orientation + Set the direction the elements are packed. +* **spacing**: distance + Distance between the packed elements. + +### textbox: + +* **background-color**: color +* **border-color**: the color used for the border around the widget. +* **font**: the font used by this textbox (string). +* **str**: the string to display by this textbox (string). +* **vertical-align**: Vertical alignment of the text. A number between 0 (top) and 1 (bottom). +* **horizontal-align**: Horizontal alignment of the text. A number between 0 (left) and 1 (right). +* **text-color**: the text color to use. +* **highlight**: text style {color}. + color is optional, multiple highlight styles can be added like: bold underline italic #000000; + This option is only available on the `element-text` widget. +* **width**: override the desired width for the textbox. +* **content**: Set the displayed text (String). +* **placeholder**: Set the displayed text (String) when nothing is entered. +* **placeholder-color**: Color of the placeholder text. +* **blink**: Enable/Disable blinking on an input textbox (Boolean). +* **markup**: Force markup on, beware that only valid pango markup strings are shown. + +### listview: +* **columns**: integer + Number of columns to show (at least 1) +* **fixed-height**: boolean + Always show `lines` rows, even if fewer elements are available. +* **dynamic**: boolean + `True` if the size should change when filtering the list, `False` if it should keep the original height. +* **scrollbar**: boolean + If the scrollbar should be enabled/disabled. +* **scrollbar-width**: distance + Width of the scrollbar +* **cycle**: boolean + When navigating, it should wrap around +* **spacing**: distance + Spacing between the elements (both vertical and horizontal) +* **lines**: integer + Number of rows to show in the list view. +* **layout**: orientation + Indicate how elements are stacked. Horizontal implements the dmenu style. +* **reverse**: boolean + Reverse the ordering (top down to bottom up). +* **fixed-columns**: boolean + Do not reduce the number of columns shown when number of visible elements is not enough to fill them all. + +Each element is a `box` called `element`. Each `element` can contain an `element-icon` and `element-text`. + +### listview text highlight: + +The `element-text` widget in the `listview` is the one used to show the text. +On this widget set the `highlight` property (only place this property is used) to change +the style of highlighting. +The `highlight` property consist of the `text-style` property and a color. + +To disable highlighting: + +```css + element-text { + highlight: None; + } +``` + +To set to red underlined: + +```css + element-text { + highlight: underline red; + } +``` + +## Layout + +The new format allows the layout of the **rofi** window to be tweaked extensively. +For each widget, the themer can specify padding, margin, border, font, and more. +It even allows, as an advanced feature, to pack widgets in a custom structure. + +### Basic structure + +The whole view is made out of boxes that pack other boxes or widgets. +The box can be vertical or horizontal. This is loosely inspired by [GTK](http://gtk.org/). + +The current layout of **rofi** is structured as follows: + +``` +|------------------------------------------------------------------------------------| +| window {BOX:vertical} | +| |-------------------------------------------------------------------------------| | +| | mainbox {BOX:vertical} | | +| | |---------------------------------------------------------------------------| | | +| | | inputbar {BOX:horizontal} | | | +| | | |---------| |-| |---------------------------------|---| |---| |---| |---| | | | +| | | | prompt | |:| | entry |#fr| | / | |#ns| |ci | | | | +| | | |---------| |_| |---------------------------------|---| |---| |---| |---| | | | +| | |---------------------------------------------------------------------------| | | +| | | | +| | |---------------------------------------------------------------------------| | | +| | | message | | | +| | | |-----------------------------------------------------------------------| | | | +| | | | textbox | | | | +| | | |-----------------------------------------------------------------------| | | | +| | |---------------------------------------------------------------------------| | | +| | | | +| | |-----------------------------------------------------------------------------| | +| | | listview | | +| | |-----------------------------------------------------------------------------| | +| | | | +| | |---------------------------------------------------------------------------| | | +| | | mode-switcher {BOX:horizontal} | | | +| | | |---------------| |---------------| |--------------| |---------------| | | | +| | | | Button | | Button | | Button | | Button | | | | +| | | |---------------| |---------------| |--------------| |---------------| | | | +| | |---------------------------------------------------------------------------| | | +| |-------------------------------------------------------------------------------| | +|------------------------------------------------------------------------------------| + + +``` +> * ci is the case-indicator +> * fr is the num-filtered-rows +> * ns is the num-rows + +### Error message structure + +``` +|-----------------------------------------------------------------------------------| +| window {BOX:vertical} | +| |------------------------------------------------------------------------------| | +| | error-message {BOX:vertical} | | +| | |-------------------------------------------------------------------------| | | +| | | textbox | | | +| | | |-----------------| |-------------------------------------------------| | | | +| | | |element-icon | |element-text | | | | +| | | |-----------------| |-------------------------------------------------| | | | +| | |-------------------------------------------------------------------------| | | +| |------------------------------------------------------------------------------| | +|-----------------------------------------------------------------------------------| + + +``` + +### Advanced layout + +The layout of **rofi** can be tweaked by packing the 'fixed' widgets in a custom structure. + +The following widgets are fixed, as they provide core **rofi** functionality: + + * prompt + * entry + * overlay + * case-indicator + * message + * listview + * mode-switcher + * num-rows + * num-filtered-rows + +The following keywords are defined and can be used to automatically pack a subset of the widgets. +These are used in the default theme as depicted in the figure above. + + * mainbox + Packs: `inputbar, message, listview, mode-switcher` + * inputbar + Packs: `prompt,entry,case-indicator` + +Any widget name starting with `textbox` is a textbox widget, others are box widgets and can pack other widgets. + +There are several special widgets that can be used by prefixing the name of the widget: + +#### textbox + +This is a read-only textbox widget. The displayed string can be set with `content`. + + +Example: + +```css +textbox-custom { + expand: false; + content: "My Message"; +} +``` + +#### Icon + +This is an icon widget. The displayed icon can be set with `filename` and size with `size`. +If the property `action` is set, it acts as a button. +`action` can be set to a keybinding name and completes that action. (see rofi -show keys for a list). + +If the `squared` property is set to **false** the widget height and width are not forced to be equal. + +Example: + +```css +icon-paste { + expand: false; + filename: "gtk-paste"; + size: 24; + vertical-align: 0.5; + action: "kb-primary-paste"; +} +``` + + +#### button + +This is a textbox widget that can have a 'clickable' action. +The `action` can be set to: +`keybinding`: accepts a keybinding name and completes that action. (see rofi -show keys for a list). + +```css +button-paste { + expand: false; + content: "My Clickable Message"; + vertical-align: 0.5; + action: "kb-primary-paste"; +} +``` + + +#### Children + +To specify children, set the `children` +property (this always happens on the `box` child, see example below): + +```css +inputbar { + children: [prompt,entry,overlay,case-indicator]; +} +``` + +The theme needs to be updated to match the hierarchy specified. + +Below is an example of a theme emulating dmenu: + +```css +* { + background-color: Black; + text-color: White; + border-color: White; + font: "Times New Roman 12"; +} + +window { + anchor: north; + location: north; + width: 100%; + padding: 4px; + children: [ horibox ]; +} + +horibox { + orientation: horizontal; + children: [ prompt, entry, listview ]; +} + +listview { + layout: horizontal; + spacing: 5px; + lines: 10; +} + +entry { + expand: false; + width: 10em; +} + +element { + padding: 0px 2px; +} +element selected { + background-color: SteelBlue; +} +``` + + +### Padding and margin + +Just like CSS, **rofi** uses the box model for each widget. + +``` +|-------------------------------------------------------------------| +| margin | +| |-------------------------------------------------------------| | +| | border | | +| | |---------------------------------------------------------| | | +| | | padding | | | +| | | |-----------------------------------------------------| | | | +| | | | content | | | | +| | | |-----------------------------------------------------| | | | +| | |---------------------------------------------------------| | | +| |-------------------------------------------------------------| | +|-------------------------------------------------------------------| +``` + +Explanation of the different parts: + + * Content - The content of the widget. + * Padding - Clears an area around the widget. + The padding shows the background color of the widget. + * Border - A border that goes around the padding and content. + The border use the border-color of the widget. + * Margin - Clears an area outside the border. + The margin is transparent. + +The box model allows us to add a border around elements, and to define space between elements. + +The size of each margin, border, and padding can be set. +For the border, a linestyle and radius can be set. + +### Spacing + +Widgets that can pack more then one child widget (currently box and listview) have the `spacing` property. +This property sets the distance between the packed widgets (both horizontally and vertically). + +``` +|---------------------------------------| +| |--------| s |--------| s |-------| | +| | child | p | child | p | child | | +| | | a | | a | | | +| | | c | | c | | | +| | | i | | i | | | +| | | n | | n | | | +| |--------| g |--------| g |-------| | +|---------------------------------------| +``` + +### Advanced box packing + +More dynamic spacing can be achieved by adding dummy widgets, for example to make one widget centered: + +``` +|--------------------------------------------| +| |-----------| |--------| |-----------| | +| | dummy | | child | | dummy | | +| | expand: y | | | | expand: y | | +| | | | | | | | +| | | | | | | | +| | | | | | | | +| |-----------| |--------| |-----------| | +|--------------------------------------------| +``` + +If both dummy widgets are set to expand, `child` will be centered. Depending on the `expand` flag of child the +remaining space will be equally divided between both dummy and child widget (expand enabled), or both dummy widgets +(expand disabled). + +## DEBUGGING + +To get debug information from the parser, run rofi like: + +``` +G_MESSAGES_DEBUG=Parser rofi -show run +``` + +Syntax errors are shown in a popup and printed out to command line with the above command. + +To see the elements queried during running, run: + +``` +G_MESSAGES_DEBUG=Theme rofi -show run +``` + +To test minor changes, part of the theme can be passed on the command line, for example to set it to full-screen: + +``` +rofi -theme-str 'window { fullscreen:true;}' -show run +``` + +To print the current theme, run: + +``` +rofi -dump-theme +``` + +## Media support + +Parts of the theme can be conditionally loaded, like the CSS `@media` option. + +``` +@media ( min-width: 120 ) { + +} +``` + +It supports the following keys as constraint: + + * `min-width`: load when width is bigger or equal then value. + * `max-width`: load when width is smaller then value. + * `min-height`: load when height is bigger or equal then value. + * `max-height`: load when height is smaller then value. + * `min-aspect-ratio` load when aspect ratio is over value. + * `max-aspect-ratio`: load when aspect ratio is under value. + * `monitor-id`: The monitor id, see rofi -help for id's. + +@media takes an integer number or a fraction, for integer number `px` can be added. + + +``` +@media ( min-width: 120 px ) { + +} +``` + + +## Font Parsing + +Rofi uses [pango](https://pango.gnome.org/) for font rendering. The font should be specified in a format that pango +understands. +This normally is the font name followed by the font size. For example: + +``` +mono 18 +``` + +Or + +``` +FontAwesome 22 +``` + +## Multiple file handling + +The rasi file format offers two methods of including other files. +This can be used to modify existing themes, or have multiple variations on a theme. + + * import: Import and parse a second file. + * theme: Discard theme, and load file as a fresh theme. + +Syntax: + +``` +@import "myfile" +@theme "mytheme" +``` + +The specified file can either by *name*, *filename*,*full path*. + +If a filename is provided, it will try to resolve it in the following order: + + * `${XDG_CONFIG_HOME}/rofi/themes/` + * `${XDG_CONFIG_HOME}/rofi/` + * `${XDG_DATA_HOME}/rofi/themes/` + * `${INSTALL PREFIX}/share/rofi/themes/` + +A name is resolved as a filename by appending the `.rasi` extension. + + + +## EXAMPLES + +Several examples are installed together with **rofi**. These can be found in `{datadir}/rofi/themes/`, where +`{datadir}` is the install path of **rofi** data. When installed using a package manager, this is usually: `/usr/share/`. + +## SEE ALSO + +rofi(1), rofi-script(5), rofi-theme-selector(1) diff --git a/mkdocs/docs/1.7.0/rofi.1.markdown b/mkdocs/docs/1.7.0/rofi.1.markdown new file mode 100644 index 00000000..ab312b95 --- /dev/null +++ b/mkdocs/docs/1.7.0/rofi.1.markdown @@ -0,0 +1,1086 @@ +# ROFI 1 rofi + +## NAME + +**rofi** - A window switcher, application launcher, ssh dialog, dmenu replacement and more + +## SYNOPSIS + +**rofi** [ -show *mode* ]|[ -dmenu ]|[ -e *msg* ] [ CONFIGURATION ] + + +## DESCRIPTION + +**rofi** is an X11 pop-up window switcher, run dialog, dmenu replacement, and more. It focuses on +being fast to use and have minimal distraction. It supports keyboard and mouse navigation, type to +filter, tokenized search and more. + + +## USAGE + +**rofi**'s main functionality is to assist in your workflow, allowing you to quickly switch +between windows, start applications or log into a remote machine via `ssh`. +There are different *modi* for different types of actions. + +**rofi** can also function as (drop-in) replacement for **dmenu(1)**. + +### Running rofi + +To launch **rofi** directly in a certain mode, specify a mode with `rofi -show `. +To show the `run` dialog: + + rofi -show run + +### Emulating dmenu + +**rofi** can emulate **dmenu(1)** (a dynamic menu for X11) when launched with the `-dmenu` flag. + +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). + +### Display Error message + +**rofi** error dialog can also be called from the command line. + + rofi -e "my message" + +Markup support can be enabled, see CONFIGURATION options. + +## CONFIGURATION + +There are currently three methods of setting configuration options (evaluated in order below): + + * System configuration file (for example `/etc/rofi.rasi`). + It first checks `XDG_CONFIG_DIRS`, and then `SYSCONFDIR` (that is passed at compile time). + It loads the first config file it finds, it does not merge multiple system configuration files. + * Rasi theme file: The new *theme* format can be used to set configuration values. + * Command-line options: Arguments passed to **rofi**. + +To get a template config file, run: `rofi -dump-config > config.rasi` + +This will contain (commented) all current configuration options, modified options are uncommented. + +The configuration system supports the following types: + + * string + * integer (signed and unsigned) + * char + * boolean + * lists + +For the syntax of these options, see the **rofi-theme(5)** manpage. + +For use on the command line, Boolean options have a non-default command-line +syntax. Example to enable option X: + + -X + +To disable option X: + + -no-X + +Below is a list of the most important options: + +### General + +`-help` + +The help option shows the full list of command-line options and the current set values. +These include dynamic (run-time generated) options. + +`-version` + +Show the **rofi** version and exit. + +`-dump-config` + +Dump the current active configuration, in rasi format, to stdout and exit. +Information about the rasi format can be found in the **rofi-theme(5)** manpage. + +`-dump-theme` + +Dump the current active theme, in rasi format, to stdout and exit. + +`-rasi-validate` *filename* + +Try to parse the file and return 0 when successful, non-zero when failed. + +`-threads` *num* + +Specify the number of threads **rofi** should use: + + * 0: Autodetect the number of supported hardware threads. + * 1: Disable threading + * 2..n: Specify the maximum number of threads to use in the thread pool. + + Default: Autodetect + +`-display` *display* + +The X server to contact. Default is `$DISPLAY`. + +`-dmenu` + +Run **rofi** in dmenu mode. This allows for interactive scripts. +In `dmenu` mode, **rofi** reads from STDIN, and output to STDOUT. +A simple example, displaying three pre-defined options: + + echo -e "Option #1\nOption #2\nOption #3" | rofi -dmenu + +Or get the options from a script: + + ~/my_script.sh | rofi -dmenu + +`-show` *mode* + +Open **rofi** in a certain mode. Available modes are `window`, `run`, `drun`, `ssh`, `combi`. +The special argument `keys` can be used to open a searchable list of supported key bindings +(see *KEY BINDINGS*) + +To show the run-dialog: + + rofi -show run + +If `-show` is the last option passed to rofi, the first enabled modi is shown. + +`-modi` *mode1,mode2* + +Specify an ordered, comma-separated list of modes to enable. +Enabled modes can be changed at runtime. Default key is `Ctrl+Tab`. +If no modes are specified, all configured modes will be enabled. +To only show the `run` and `ssh` launcher: + + rofi -modi "run,ssh" -show run + +Custom modes can be added using the internal `script` mode. Each such mode has two parameters: + + :