Skip to content

Commit

Permalink
Include recently open apps in the printed list
Browse files Browse the repository at this point in the history
  • Loading branch information
lchsk committed Aug 26, 2018
1 parent 3781ece commit f1c0a94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Add -e option: execute an application and detach it from terminal
* Print a list of applications from cache (-P param)
* Include recently open apps in the printed list
* Fix bug that breaks the application if it's built without compiler optimisation
* Save last open app when open with -e option
* Remove some compiler warnings
Expand Down
6 changes: 6 additions & 0 deletions src/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,14 @@ bool search(const char *query, unsigned query_len)

void print_cache_apps(void)
{
// Print recently open apps
for (int i = 0; i < recent_apps_cnt; i++) {
printf("%s\n", recent_apps[i]);
}

GQueue *cache = get_cache();

// Print other apps
for (int i = 0; i < g_queue_get_length(cache); i++) {
const char *path = g_queue_peek_nth(search_paths, i);

Expand Down

0 comments on commit f1c0a94

Please sign in to comment.