mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Obey quiet a bit better, update manpage with signals
This commit is contained in:
parent
c68ab67dd8
commit
5cea640a34
3 changed files with 58 additions and 14 deletions
|
@ -595,6 +595,21 @@ This way it can be used as a drop-in replacement for dmenu. just copy or symlink
|
|||
|
||||
ln -s /usr/bin/dmenu /usr/bin/rofi
|
||||
|
||||
## SIGNALS
|
||||
|
||||
`HUP`
|
||||
|
||||
If in daemon mode, reload the configuration from Xresources. (commandline arguments still -override
|
||||
Xresources). This will also reload configured key-bindings.
|
||||
|
||||
`INT`
|
||||
|
||||
If in daemon mode, quits **rofi**.
|
||||
|
||||
`USR1`
|
||||
|
||||
If in daemon mode, dumps the current configuration to stdout. Similar to `-xresources-dump`
|
||||
|
||||
## THEMING
|
||||
|
||||
With **rofi** 0.15.4 we have a new way of specifying colors, the old settings still apply (for now).
|
||||
|
|
18
doc/rofi.1
18
doc/rofi.1
|
@ -1071,6 +1071,24 @@ ln \-s /usr/bin/dmenu /usr/bin/rofi
|
|||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "SIGNALS"
|
||||
\fBHUP\fR
|
||||
.
|
||||
.P
|
||||
If in daemon mode, reload the configuration from Xresources\. (commandline arguments still \-override Xresources)\. This will also reload configured key\-bindings\.
|
||||
.
|
||||
.P
|
||||
\fBINT\fR
|
||||
.
|
||||
.P
|
||||
If in daemon mode, quits \fBrofi\fR\.
|
||||
.
|
||||
.P
|
||||
\fBUSR1\fR
|
||||
.
|
||||
.P
|
||||
If in daemon mode, dumps the current configuration to stdout\. Similar to \fB\-xresources\-dump\fR
|
||||
.
|
||||
.SH "THEMING"
|
||||
With \fBrofi\fR 0\.15\.4 we have a new way of specifying colors, the old settings still apply (for now)\. To enable the new setup, set \fBrofi\.color\-enabled\fR to true\. The new setup allows you to specify colors per state, similar to \fBi3\fR Currently 3 states exists:
|
||||
.
|
||||
|
|
|
@ -1827,6 +1827,21 @@ static int grab_global_keybindings ()
|
|||
}
|
||||
return key_bound;
|
||||
}
|
||||
static void print_global_keybindings ()
|
||||
{
|
||||
fprintf ( stdout, "Rofi is launched in daemon mode.\n" );
|
||||
fprintf ( stdout, "listening to the following keys:\n" );
|
||||
for ( unsigned int i = 0; i < num_switchers; i++ ) {
|
||||
if ( switchers[i]->keystr != NULL ) {
|
||||
fprintf ( stdout, "\t* "color_bold "%s"color_reset " on %s\n",
|
||||
switchers[i]->name, switchers[i]->keystr );
|
||||
}
|
||||
else {
|
||||
fprintf ( stdout, "\t* "color_bold "%s"color_reset " on <unspecified>\n",
|
||||
switchers[i]->name );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void reload_configuration ()
|
||||
{
|
||||
|
@ -2026,18 +2041,7 @@ int main ( int argc, char *argv[] )
|
|||
return EXIT_FAILURE;
|
||||
}
|
||||
if ( !quiet ) {
|
||||
fprintf ( stdout, "Rofi is launched in daemon mode.\n" );
|
||||
fprintf ( stdout, "listening to the following keys:\n" );
|
||||
for ( unsigned int i = 0; i < num_switchers; i++ ) {
|
||||
if ( switchers[i]->keystr != NULL ) {
|
||||
fprintf ( stdout, "\t* "color_bold "%s"color_reset " on %s\n",
|
||||
switchers[i]->name, switchers[i]->keystr );
|
||||
}
|
||||
else {
|
||||
fprintf ( stdout, "\t* "color_bold "%s"color_reset " on <unspecified>\n",
|
||||
switchers[i]->name );
|
||||
}
|
||||
}
|
||||
print_global_keybindings ();
|
||||
}
|
||||
|
||||
|
||||
|
@ -2090,13 +2094,18 @@ int main ( int argc, char *argv[] )
|
|||
read ( pfds[0], &c, 1 );
|
||||
// Reload configuration.
|
||||
if ( c == 'c' ) {
|
||||
fprintf ( stdout, "Reload configuration\n" );
|
||||
if ( !quiet ) {
|
||||
fprintf ( stdout, "Reload configuration\n" );
|
||||
}
|
||||
// Release the keybindings.
|
||||
release_global_keybindings ();
|
||||
// Reload config
|
||||
reload_configuration ();
|
||||
// Grab the possibly new keybindings.
|
||||
grab_global_keybindings ();
|
||||
if ( !quiet ) {
|
||||
print_global_keybindings ();
|
||||
}
|
||||
XFlush ( display );
|
||||
}
|
||||
// Got message to quit.
|
||||
|
@ -2119,7 +2128,9 @@ int main ( int argc, char *argv[] )
|
|||
// Close pipe
|
||||
close ( pfds[0] );
|
||||
close ( pfds[1] );
|
||||
fprintf ( stdout, "Quit from daemon mode.\n" );
|
||||
if(!quiet) {
|
||||
fprintf ( stdout, "Quit from daemon mode.\n" );
|
||||
}
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
|
Loading…
Reference in a new issue