aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Dmenu.hpp2
-rw-r--r--plugins/FileManager.hpp22
2 files changed, 23 insertions, 1 deletions
diff --git a/plugins/Dmenu.hpp b/plugins/Dmenu.hpp
index 84614cc..32fdad1 100644
--- a/plugins/Dmenu.hpp
+++ b/plugins/Dmenu.hpp
@@ -9,7 +9,7 @@ namespace QuickMedia {
bool search_is_filter() override { return true; }
bool search_suggestions_has_thumbnails() const override { return false; }
bool search_results_has_thumbnails() const override { return false; }
- int get_search_delay() const override { return 0; }
+ int get_search_delay() const override { return 50; }
bool search_suggestion_is_search() const override { return true; }
Page get_page_after_search() const override { return Page::EXIT; }
PluginResult get_front_page(BodyItems &result_items) override;
diff --git a/plugins/FileManager.hpp b/plugins/FileManager.hpp
new file mode 100644
index 0000000..d5d7088
--- /dev/null
+++ b/plugins/FileManager.hpp
@@ -0,0 +1,22 @@
+#pragma once
+
+#include "Plugin.hpp"
+#include <filesystem>
+
+namespace QuickMedia {
+ class FileManager : public Plugin {
+ public:
+ FileManager();
+ PluginResult get_files_in_directory(BodyItems &result_items);
+ bool set_current_directory(const std::string &path);
+ bool set_child_directory(const std::string &filename);
+ const std::filesystem::path& get_current_dir() const;
+
+ bool search_suggestions_has_thumbnails() const override { return true; }
+ bool search_results_has_thumbnails() const override { return true; }
+ int get_search_delay() const override { return 50; }
+ Page get_page_after_search() const override { return Page::FILE_MANAGER; }
+ private:
+ std::filesystem::path current_dir;
+ };
+} \ No newline at end of file