rofi 2.1.0
History
Collaboration diagram for History:

Functions

void history_set (const char *filename, const char *entry) __attribute__((nonnull))
void history_remove (const char *filename, const char *entry) __attribute__((nonnull))
char ** history_get_list (const char *filename, unsigned int *length) __attribute__((nonnull))

Detailed Description

Implements a very simple history module that can be used by a Mode.

This uses the following options from the config object:

Function Documentation

◆ history_get_list()

char ** history_get_list ( const char * filename,
unsigned int * length )
Parameters
filenameThe filename of the history cache.
lengthThe length of the returned list.

Gets the entries in the list (in order of usage)

Returns
a list of entries length long. (and NULL terminated).

Definition at line 327 of file history.c.

References __history_get_element_list_fields(), config, Settings::disable_history, and history_get_list().

Referenced by get_apps(), get_ssh(), and history_get_list().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ history_remove()

void history_remove ( const char * filename,
const char * entry )
Parameters
filenameThe filename of the history cache.
entryThe entry to remove

Removes the entry from the history.

Definition at line 263 of file history.c.

References __history_get_element_list(), __history_write_element_list(), config, Settings::disable_history, and history_remove().

Referenced by delete_entry(), delete_ssh(), exec_cmd(), and history_remove().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ history_set()

void history_set ( const char * filename,
const char * entry )
Parameters
filenameThe filename of the history cache.
entryThe entry to add/increment

Sets the entry in the history, if it exists its use-count is incremented.

Definition at line 181 of file history.c.

References __history_get_element_list(), __history_write_element_list(), config, Settings::disable_history, history_set(), Settings::ignored_prefixes, __element::index, and __element::name.

Referenced by exec_cmd(), exec_ssh(), and history_set().

Here is the call graph for this function:
Here is the caller graph for this function: