✨ feat(plugins/launcher): add Pomodoro Technique plugin with timer support
This commit is contained in:
4 files changed
+14
-10
No files matched your search
@@ -42,10 +42,6 @@
|
|||||||
"icon": "wallpapers",
|
"icon": "wallpapers",
|
||||||
"description": "Wallpapers - Set wallpapers, and tons of features"
|
"description": "Wallpapers - Set wallpapers, and tons of features"
|
||||||
},
|
},
|
||||||
"pomo": {
|
|
||||||
"icon": "timer_on",
|
|
||||||
"description": "Pomodoro - Productivity timer with notifications"
|
|
||||||
},
|
|
||||||
"web": {
|
"web": {
|
||||||
"icon": "world",
|
"icon": "world",
|
||||||
"description": "Web Search - Search the web using various search engines"
|
"description": "Web Search - Search the web using various search engines"
|
||||||
|
|||||||
@@ -246,7 +246,9 @@ class Launcher(Window):
|
|||||||
if hasattr(self.search_entry, "set_position"):
|
if hasattr(self.search_entry, "set_position"):
|
||||||
self.search_entry.set_position(-1) # Move caret to end
|
self.search_entry.set_position(-1) # Move caret to end
|
||||||
if hasattr(self.search_entry, "select_region"):
|
if hasattr(self.search_entry, "select_region"):
|
||||||
self.search_entry.select_region(text_length, text_length) # No selection
|
self.search_entry.select_region(
|
||||||
|
text_length, text_length
|
||||||
|
) # No selection
|
||||||
return False # Only run once
|
return False # Only run once
|
||||||
|
|
||||||
GLib.idle_add(position_cursor)
|
GLib.idle_add(position_cursor)
|
||||||
@@ -324,7 +326,11 @@ class Launcher(Window):
|
|||||||
if not query.endswith(" "):
|
if not query.endswith(" "):
|
||||||
# This is an exact trigger match without space - add space immediately
|
# This is an exact trigger match without space - add space immediately
|
||||||
trigger_text_with_space = self._add_space_to_trigger(query)
|
trigger_text_with_space = self._add_space_to_trigger(query)
|
||||||
GLib.timeout_add(TRIGGER_SEARCH_DEBOUNCE_MS, self._perform_search, trigger_text_with_space)
|
GLib.timeout_add(
|
||||||
|
TRIGGER_SEARCH_DEBOUNCE_MS,
|
||||||
|
self._perform_search,
|
||||||
|
trigger_text_with_space,
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
# Already has space, proceed with normal search
|
# Already has space, proceed with normal search
|
||||||
GLib.timeout_add(SEARCH_DEBOUNCE_MS, self._perform_search, query)
|
GLib.timeout_add(SEARCH_DEBOUNCE_MS, self._perform_search, query)
|
||||||
@@ -370,8 +376,11 @@ class Launcher(Window):
|
|||||||
current_text = self.search_entry.get_text()
|
current_text = self.search_entry.get_text()
|
||||||
|
|
||||||
# If the current text is exactly the trigger word (no space), add space automatically
|
# If the current text is exactly the trigger word (no space), add space automatically
|
||||||
if (current_text.strip() == trigger_word and not current_text.endswith(" ")
|
if (
|
||||||
and not getattr(self, "_auto_adding_space", False)):
|
current_text.strip() == trigger_word
|
||||||
|
and not current_text.endswith(" ")
|
||||||
|
and not getattr(self, "_auto_adding_space", False)
|
||||||
|
):
|
||||||
query = self._add_space_to_trigger(trigger_word)
|
query = self._add_space_to_trigger(trigger_word)
|
||||||
|
|
||||||
# Enter trigger mode
|
# Enter trigger mode
|
||||||
|
|||||||
@@ -86,7 +86,6 @@ class PluginManager:
|
|||||||
"screencapture",
|
"screencapture",
|
||||||
"emoji",
|
"emoji",
|
||||||
"wallpaper",
|
"wallpaper",
|
||||||
"pomodoro",
|
|
||||||
"websearch",
|
"websearch",
|
||||||
"kanban",
|
"kanban",
|
||||||
"calendar",
|
"calendar",
|
||||||
@@ -96,7 +95,7 @@ class PluginManager:
|
|||||||
"otp",
|
"otp",
|
||||||
"notifications",
|
"notifications",
|
||||||
"password",
|
"password",
|
||||||
"bookmarks"
|
"bookmarks",
|
||||||
]
|
]
|
||||||
|
|
||||||
for plugin_name in default_plugins:
|
for plugin_name in default_plugins:
|
||||||
|
|||||||
File renamed without changes.
Reference in new issue
Block a user