diff --git a/config/config.c b/config/config.c index 1c7c6d39..7bde9703 100644 --- a/config/config.c +++ b/config/config.c @@ -50,13 +50,13 @@ Settings config = { .terminal_emulator = "rofi-sensible-terminal", .ssh_client = "ssh", /** Command when executing ssh. */ - .ssh_command = "{terminal} -e '{ssh-client}' '{host}' [-p {port}]", + .ssh_command = "{terminal} -e {ssh-client} {host} [-p {port}]", /** Command when running */ - .run_command = "'{cmd}'", + .run_command = "{cmd}", /** Command used to list executable commands. empty -> internal */ .run_list_command = "", /** Command executed when running application in terminal */ - .run_shell_command = "{terminal} -e '{cmd}'", + .run_shell_command = "{terminal} -e {cmd}", /** Command executed on accep-entry-custom for window modus */ .window_command = "wmctrl -i -R {window}", /** No default icon theme, we search Adwaita and gnome as fallback */ diff --git a/doc/rofi.1 b/doc/rofi.1 index 3bbf720a..6d4c10e9 100644 --- a/doc/rofi.1 +++ b/doc/rofi.1 @@ -19,29 +19,37 @@ keyboard and mouse navigation, type to filter, tokenized search and more. .PP \fBrofi\fP\&'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 \fBssh\fR\&. There are different \fImodes\fP for different types of actions. \fBrofi\fP +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) 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 \fBrofi -show -\fR\&. To show the \fBdrun\fR dialog: - -.EX - rofi -show drun - -.EE +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 -A useful setup in minimalistic window managers is to combine \fBdrun\fR, \fBrun\fR -with \fBwindow\fR mode: +.RS -.EX +.nf + rofi -show drun + +.fi +.RE + +.PP +A useful setup in minimalistic window managers is to combine \fB\fCdrun\fR, \fB\fCrun\fR +with \fB\fCwindow\fR mode: + +.PP +.RS + +.nf rofi -show combi -modes combi -combi-modes "window,drun,run" -.EE +.fi +.RE .PP In this setup it first list all open applications, then all installed @@ -51,7 +59,7 @@ 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-dmenu\fR flag. +the \fB\fC-dmenu\fR flag. .PP For more information see \fBrofi-dmenu(5)\fP\&. @@ -60,10 +68,14 @@ For more information see \fBrofi-dmenu(5)\fP\&. .PP \fBrofi\fP error dialog can also be called from the command line. -.EX +.PP +.RS + +.nf rofi -e "my message" -.EE +.fi +.RE .PP Markup support can be enabled, see CONFIGURATION options. @@ -75,8 +87,8 @@ in order below): .RS .IP \(bu 2 -System configuration file (for example \fB/etc/rofi.rasi\fR). It first checks -\fBXDG_CONFIG_DIRS\fR, and then \fBSYSCONFDIR\fR (that is passed at compile time). +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 loads the first config file it finds, it does not merge multiple system configuration files. .IP \(bu 2 @@ -88,14 +100,14 @@ Command-line options: Arguments passed to \fBrofi\fP\&. .RE .PP -To get a template config file, run: \fBrofi -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: \fBrofi -icon-theme +To get a template config file that sets the icon-theme run: \fB\fCrofi -icon-theme hicolor -dump-config\fR\&. .PP @@ -105,26 +117,34 @@ configuration. .PP An empty configuration section in the config file looks like: -.EX +.PP +.RS + +.nf configuration { // set config options here } -.EE +.fi +.RE .PP -Most of the configuration options mentioned below (beside options like \fB-show\fR, -\fB-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: -.EX +.PP +.RS + +.nf configuration { dpi: 72; } -.EE +.fi +.RE .PP The configuration system supports the following types: @@ -150,64 +170,72 @@ For the syntax of these options, see the \fBrofi-theme(5)\fP manpage. For use on the command line, Boolean options have a non-default command-line syntax. Example to enable option X: -.EX +.PP +.RS + +.nf -X -.EE +.fi +.RE .PP To disable option X: -.EX +.PP +.RS + +.nf -no-X -.EE +.fi +.RE .PP Below is a list of the most important options: .SS General .PP -\fB-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. .PP -\fB-version\fR +\fB\fC-version\fR .PP Show the \fBrofi\fP version and exit. .PP -\fB-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. .PP -\fB-dump-theme\fR +\fB\fC-dump-theme\fR .PP Dump the current active theme, in rasi format, to stdout and exit. .PP -\fB-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. .PP -\fB-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-threads\fR \fInum\fP +\fB\fC-threads\fR \fInum\fP .PP Specify the number of threads \fBrofi\fP should use: @@ -226,197 +254,225 @@ Specify the number of threads \fBrofi\fP should use: Default: Autodetect .PP -\fB-display\fR \fIdisplay\fP +\fB\fC-display\fR \fIdisplay\fP .PP -The X server to contact. Default is \fB$DISPLAY\fR\&. +The X server to contact. Default is \fB\fC$DISPLAY\fR\&. .PP -\fB-dmenu\fR +\fB\fC-dmenu\fR .PP Run \fBrofi\fP in dmenu mode. This allows for interactive scripts. -In \fBdmenu\fR mode, \fBrofi\fP reads from STDIN, and output to STDOUT. +In \fB\fCdmenu\fR mode, \fBrofi\fP reads from STDIN, and output to STDOUT. A simple example, displaying three pre-defined options: -.EX +.PP +.RS + +.nf echo -e "Option #1\\nOption #2\\nOption #3" | rofi -dmenu -.EE +.fi +.RE .PP Or get the options from a script: -.EX +.PP +.RS + +.nf ~/my_script.sh | rofi -dmenu -.EE +.fi +.RE .PP See the \fBrofi-dmenu(5)\fP manpage for more information. .PP -\fB-show\fR \fImode\fP +\fB\fC-show\fR \fImode\fP .PP -Open \fBrofi\fP in a certain mode. Available modes are \fBwindow\fR, \fBrun\fR, \fBdrun\fR, -\fBssh\fR, \fBcombi\fR\&. The special argument \fBkeys\fR can be used to open a searchable +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) .PP To show the run-dialog: -.EX +.PP +.RS + +.nf rofi -show run -.EE +.fi +.RE .PP -If \fB-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-modes\fR \fImode1,mode2\fP +\fB\fC-modes\fR \fImode1,mode2\fP .PP Specify an ordered, comma-separated list of modes to enable. -Enabled modes can be changed at runtime. Default key is \fBCtrl+Tab\fR\&. +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 \fBrun\fR and \fBssh\fR launcher: +To only show the \fB\fCrun\fR and \fB\fCssh\fR launcher: -.EX +.PP +.RS + +.nf rofi -modes "run,ssh" -show run -.EE +.fi +.RE .PP -Custom modes can be added using the internal \fBscript\fR mode. Each such mode has +Custom modes can be added using the internal \fB\fCscript\fR mode. Each such mode has two parameters: -.EX +.PP +.RS + +.nf :