rofi  1.5.4
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 325 of file history.c.

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

Referenced by get_apps(), and get_ssh().

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 259 of file history.c.

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

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

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 178 of file history.c.

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

Referenced by exec_cmd(), and exec_ssh().

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