1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00

Obey quiet a bit better, update manpage with signals

This commit is contained in:
Dave Davenport 2015-07-29 17:55:26 +02:00
parent c68ab67dd8
commit 5cea640a34
3 changed files with 58 additions and 14 deletions

View file

@ -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).

View file

@ -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:
.

View file

@ -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' ) {
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,8 +2128,10 @@ int main ( int argc, char *argv[] )
// Close pipe
close ( pfds[0] );
close ( pfds[1] );
if(!quiet) {
fprintf ( stdout, "Quit from daemon mode.\n" );
}
}
return EXIT_SUCCESS;
}