♻️ refactor(dock): overhaul dock implementation for improved performance and maintainability
This commit is contained in:
1 parent
8ba98e33d3
commit
4852fa01e2
22 files changed
+876
-2755
No files matched your search
+6
-34
@@ -1,34 +1,6 @@
|
||||
{
|
||||
"pinned_apps": [
|
||||
{
|
||||
"name": "Bulk Rename",
|
||||
"display_name": "Bulk Rename",
|
||||
"window_class": null,
|
||||
"executable": "thunar",
|
||||
"command_line": "thunar --bulk-rename %F"
|
||||
},
|
||||
{
|
||||
"name": "Ghostty",
|
||||
"display_name": "Ghostty",
|
||||
"window_class": "com.mitchellh.ghostty",
|
||||
"executable": "ghostty",
|
||||
"command_line": "ghostty"
|
||||
},
|
||||
{
|
||||
"name": "Zen Browser",
|
||||
"display_name": "Zen Browser",
|
||||
"window_class": "zen",
|
||||
"executable": "/opt/zen-browser-bin/zen-bin",
|
||||
"command_line": "/opt/zen-browser-bin/zen-bin %u"
|
||||
},
|
||||
{
|
||||
"name": "Visual Studio Code",
|
||||
"display_name": "Visual Studio Code",
|
||||
"window_class": "Code",
|
||||
"executable": "/usr/bin/code",
|
||||
"command_line": "/usr/bin/code %F",
|
||||
"icon_name": "visual-studio-code"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
[
|
||||
"zen",
|
||||
"kitty",
|
||||
"code",
|
||||
"Vesktop"
|
||||
]
|
||||
@@ -1,9 +0,0 @@
|
||||
<svg version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<style id="current-color-scheme" type="text/css">.ColorScheme-Text {
|
||||
color:#dedede;
|
||||
}</style>
|
||||
</defs>
|
||||
<path class="ColorScheme-Text" d="m6.1738 5.6631c0.37981 1e-7 0.54189 0.12418 0.65234 0.18555 0.0072 0.00447 0.01438 0.00902 0.02148 0.013672l6.9356 4.0957c0.07518 0.043562 0.20874 0.10765 0.36914 0.30469 0.16225 0.1993 0.25781 0.52881 0.25781 0.73633 0 0.20754-0.08765 0.52075-0.24219 0.7207-0.15288 0.1978-0.29598 0.27643-0.38477 0.32812l-6.9355 4.0957c-0.0071 0.0046-0.01426 0.0092-0.02148 0.01367-0.16196 0.09008-0.38778 0.17969-0.65234 0.17969-0.25637-5e-6 -0.58772-0.09652-0.83203-0.3418-0.24432-0.24527-0.3418-0.587-0.3418-0.84766v-8.2871c0-0.26064 0.08983-0.5862 0.32031-0.83203 0.23049-0.24583 0.57064-0.36523 0.85352-0.36523zm0 1c-0.09815 0-0.17383 0.068844-0.17383 0.19727v8.2871c0 0.12841 0.07568 0.18945 0.17383 0.18945 0.04538 0 0.09802-0.01687 0.16602-0.05469l6.9355-4.0957c0.09064-0.05286 0.13477-0.09682 0.13477-0.1875s-0.04412-0.12878-0.13477-0.18164l-6.9355-4.0957c-0.06799-0.037776-0.12063-0.058594-0.16602-0.058594z" fill="currentColor"/>
|
||||
<rect class="ColorScheme-Text" transform="scale(-1,1)" x="-17" y="6" width="1" height="10" rx=".5" ry=".5" fill="currentColor"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -1,14 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#dedede;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path
|
||||
style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M 16 5 L 16 7 L 3 7 L 3 8 L 16 8 L 16 10 L 19 7.5 L 16 5 z M 16 12 L 16 14 L 3 14 L 3 15 L 16 15 L 16 17 L 19 14.5 L 16 12 z "
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 465 B |
@@ -1,11 +0,0 @@
|
||||
<svg version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<style id="current-color-scheme" type="text/css">.ColorScheme-Text {
|
||||
color:#dedede;
|
||||
}</style>
|
||||
</defs>
|
||||
<g class="ColorScheme-Text" fill="currentColor">
|
||||
<path d="m9.5 8c-0.277 0-0.5 0.223-0.5 0.5v5c0 0.277 0.223 0.5 0.5 0.5s0.5-0.223 0.5-0.5v-5c0-0.277-0.223-0.5-0.5-0.5zm3 0c-0.277 0-0.5 0.223-0.5 0.5v5c0 0.277 0.223 0.5 0.5 0.5s0.5-0.223 0.5-0.5v-5c0-0.277-0.223-0.5-0.5-0.5z"/>
|
||||
<path d="m11 3a8 8 0 0 0-8 8 8 8 0 0 0 8 8 8 8 0 0 0 8-8 8 8 0 0 0-8-8zm0 1a7 7 0 0 1 7 7 7 7 0 0 1-7 7 7 7 0 0 1-7-7 7 7 0 0 1 7-7z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 634 B |
@@ -1,9 +0,0 @@
|
||||
<svg version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<style id="current-color-scheme" type="text/css">.ColorScheme-Text {
|
||||
color:#dedede;
|
||||
}</style>
|
||||
</defs>
|
||||
<path class="ColorScheme-Text" d="m11 3a8 8 0 0 0-8 8 8 8 0 0 0 8 8 8 8 0 0 0 8-8 8 8 0 0 0-8-8zm0 1a7 7 0 0 1 7 7 7 7 0 0 1-7 7 7 7 0 0 1-7-7 7 7 0 0 1 7-7z" fill="currentColor"/>
|
||||
<path class="ColorScheme-Text" d="m9.498 7.5723c-0.26595 0.011578-0.49805 0.18369-0.49805 0.46875v5.9063c0 0.41453 0.46559 0.61778 0.86328 0.38086l4.873-2.8691c0.35533-0.20313 0.34686-0.71884 0-0.92188l-4.873-2.877c-0.11636-0.066104-0.24435-0.093154-0.36523-0.087891z" fill="currentColor"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 683 B |
@@ -1,9 +0,0 @@
|
||||
<svg version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<style id="current-color-scheme" type="text/css">.ColorScheme-Text {
|
||||
color:#dedede;
|
||||
}</style>
|
||||
</defs>
|
||||
<path class="ColorScheme-Text" d="m15.826 5.6631c-0.37981 1e-7 -0.54189 0.12418-0.65234 0.18555-0.0072 0.00447-0.01438 0.00902-0.02148 0.013672l-6.9356 4.0957c-0.075177 0.043562-0.20874 0.10765-0.36914 0.30469-0.16225 0.1993-0.25781 0.52881-0.25781 0.73633 0 0.20754 0.087648 0.52075 0.24219 0.7207 0.15287 0.1978 0.29598 0.27643 0.38477 0.32812l6.9355 4.0957c0.0071 0.0046 0.01426 0.0092 0.02148 0.01367 0.16196 0.09008 0.38778 0.17969 0.65234 0.17969 0.25637-5e-6 0.58772-0.09652 0.83203-0.3418 0.24432-0.24527 0.3418-0.587 0.3418-0.84766v-8.2871c0-0.26064-0.08983-0.5862-0.32031-0.83203-0.23049-0.24583-0.57064-0.36523-0.85352-0.36523zm0 1c0.09815 0 0.17383 0.068844 0.17383 0.19727v8.2871c0 0.12841-0.07568 0.18945-0.17383 0.18945-0.04538 0-0.09802-0.01687-0.16602-0.05469l-6.9355-4.0957c-0.09064-0.05286-0.13477-0.09682-0.13477-0.1875s0.04412-0.12878 0.13477-0.18164l6.9355-4.0957c0.06799-0.037776 0.12063-0.058594 0.16602-0.058594z" fill="currentColor"/>
|
||||
<rect class="ColorScheme-Text" x="5" y="6" width="1" height="10" rx=".5" ry=".5" fill="currentColor"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB |
@@ -1,14 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#dedede;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path
|
||||
style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M 16 5 L 16 7 L 13 7 C 10.784 7 9 8.784 9 11 C 9 12.662 7.662 14 6 14 L 3 14 L 3 15 L 6 15 C 8.216 15 10 13.216 10 11 C 10 9.338 11.338 8 13 8 L 16 8 L 16 10 L 19 7.5 L 16 5 z M 3 7 L 3 8 L 6 8 C 6.8536128 8 7.6168144 8.3572581 8.1621094 8.9257812 C 8.2578781 8.5814037 8.3956215 8.2568349 8.5742188 7.9570312 C 7.8779048 7.3680394 6.9875937 7 6 7 L 3 7 z M 16 12 L 16 14 L 13 14 C 12.146387 14 11.383186 13.642742 10.837891 13.074219 C 10.742121 13.418597 10.604379 13.743165 10.425781 14.042969 C 11.122095 14.631961 12.012406 15 13 15 L 16 15 L 16 17 L 19 14.5 L 16 12 z "
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 914 B |
@@ -1,171 +0,0 @@
|
||||
{
|
||||
"todos": [
|
||||
{
|
||||
"id": 14,
|
||||
"title": "yo",
|
||||
"description": "",
|
||||
"priority": "low",
|
||||
"category": "",
|
||||
"due_date": null,
|
||||
"completed": false,
|
||||
"created": "2025-06-26T16:51:06.643095",
|
||||
"completed_at": null
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"title": "Medium priority task",
|
||||
"description": "",
|
||||
"priority": "medium",
|
||||
"category": "normal",
|
||||
"due_date": null,
|
||||
"completed": false,
|
||||
"created": "2025-06-26T16:52:59.579365",
|
||||
"completed_at": null
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"title": "Low priority task",
|
||||
"description": "",
|
||||
"priority": "low",
|
||||
"category": "later",
|
||||
"due_date": null,
|
||||
"completed": false,
|
||||
"created": "2025-06-26T16:52:59.583278",
|
||||
"completed_at": null
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"title": "🔥 URGENT: Fix critical bug",
|
||||
"description": "",
|
||||
"priority": "high",
|
||||
"category": "work",
|
||||
"due_date": null,
|
||||
"completed": true,
|
||||
"created": "2025-06-26T16:53:51.412081",
|
||||
"completed_at": "2025-06-26T16:53:51.418575"
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"title": "📝 Review documentation",
|
||||
"description": "",
|
||||
"priority": "medium",
|
||||
"category": "work",
|
||||
"due_date": null,
|
||||
"completed": false,
|
||||
"created": "2025-06-26T16:53:51.413594",
|
||||
"completed_at": null
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"title": "🧹 Clean desk",
|
||||
"description": "",
|
||||
"priority": "low",
|
||||
"category": "personal",
|
||||
"due_date": null,
|
||||
"completed": false,
|
||||
"created": "2025-06-26T16:53:51.415181",
|
||||
"completed_at": null
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"title": "Test high priority",
|
||||
"description": "",
|
||||
"priority": "high",
|
||||
"category": "test",
|
||||
"due_date": null,
|
||||
"completed": true,
|
||||
"created": "2025-06-26T16:55:12.629834",
|
||||
"completed_at": "2025-06-26T17:00:48.989919"
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"title": "Test medium priority",
|
||||
"description": "",
|
||||
"priority": "medium",
|
||||
"category": "test",
|
||||
"due_date": null,
|
||||
"completed": false,
|
||||
"created": "2025-06-26T16:55:12.631496",
|
||||
"completed_at": null
|
||||
},
|
||||
{
|
||||
"id": 23,
|
||||
"title": "Test low priority",
|
||||
"description": "",
|
||||
"priority": "low",
|
||||
"category": "test",
|
||||
"due_date": null,
|
||||
"completed": false,
|
||||
"created": "2025-06-26T16:55:12.632521",
|
||||
"completed_at": null
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"title": "High priority task",
|
||||
"description": "",
|
||||
"priority": "high",
|
||||
"category": "test",
|
||||
"due_date": null,
|
||||
"completed": true,
|
||||
"created": "2025-06-26T16:57:15.780304",
|
||||
"completed_at": "2025-06-26T16:57:15.800393"
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"title": "Medium priority task",
|
||||
"description": "",
|
||||
"priority": "medium",
|
||||
"category": "test",
|
||||
"due_date": null,
|
||||
"completed": false,
|
||||
"created": "2025-06-26T16:57:15.783358",
|
||||
"completed_at": null
|
||||
},
|
||||
{
|
||||
"id": 26,
|
||||
"title": "Low priority task",
|
||||
"description": "",
|
||||
"priority": "low",
|
||||
"category": "test",
|
||||
"due_date": null,
|
||||
"completed": false,
|
||||
"created": "2025-06-26T16:57:15.792488",
|
||||
"completed_at": null
|
||||
},
|
||||
{
|
||||
"id": 27,
|
||||
"title": "🔥 High priority",
|
||||
"description": "",
|
||||
"priority": "high",
|
||||
"category": "test",
|
||||
"due_date": null,
|
||||
"completed": true,
|
||||
"created": "2025-06-26T16:57:50.943800",
|
||||
"completed_at": "2025-06-26T17:00:50.482300"
|
||||
},
|
||||
{
|
||||
"id": 28,
|
||||
"title": "📝 Medium priority",
|
||||
"description": "",
|
||||
"priority": "medium",
|
||||
"category": "test",
|
||||
"due_date": null,
|
||||
"completed": false,
|
||||
"created": "2025-06-26T16:57:50.952343",
|
||||
"completed_at": null
|
||||
},
|
||||
{
|
||||
"id": 29,
|
||||
"title": "🧹 Low priority",
|
||||
"description": "",
|
||||
"priority": "low",
|
||||
"category": "test",
|
||||
"due_date": null,
|
||||
"completed": false,
|
||||
"created": "2025-06-26T16:57:50.968381",
|
||||
"completed_at": null
|
||||
}
|
||||
],
|
||||
"next_id": 30,
|
||||
"last_modified": "2025-06-26T17:00:50.482384"
|
||||
}
|
||||
+5
-4
@@ -56,7 +56,7 @@ CURRENT_WIDTH = screen.get_width()
|
||||
CURRENT_HEIGHT = screen.get_height()
|
||||
|
||||
|
||||
WALLPAPERS_DIR_DEFAULT = get_relative_path("../assets/wallpapers_example/")
|
||||
WALLPAPERS_DIR_DEFAULT = os.path.expanduser(f"~/Pictures/wallpapers/")
|
||||
CONFIG_FILE = get_relative_path("../config/assets/config.json")
|
||||
MATUGEN_STATE_FILE = os.path.join(CONFIG_DIR, "matugen")
|
||||
|
||||
@@ -91,8 +91,7 @@ if os.path.exists(CONFIG_FILE):
|
||||
DOCK_ENABLED = config.get("dock_enabled", True)
|
||||
DOCK_AUTO_HIDE = config.get("dock_auto_hide", True)
|
||||
DOCK_ALWAYS_OCCLUDED = config.get("dock_always_occluded", False)
|
||||
DOCK_THEME = config.get("dock_theme", "Pills")
|
||||
DOCK_ICON_SIZE = config.get("dock_icon_size", 28)
|
||||
DOCK_ICON_SIZE = config.get("dock_icon_size", 60)
|
||||
WORKSPACE_NUMS = config.get("workspace_nums", False)
|
||||
WORKSPACE_USE_CHINESE_NUMERAL = config.get("workspace_use_chinese_numerals", False)
|
||||
WORKSPACE_DOTS = config.get("workspace_dots", False)
|
||||
@@ -101,6 +100,7 @@ if os.path.exists(CONFIG_FILE):
|
||||
DOCK_HIDE_SPECIAL_WORKSPACE_APPS = config.get(
|
||||
"dock_hide_special_workspace_apps", True
|
||||
)
|
||||
DOCK_PREVIEW_APPS = config.get("dock_preview_apps", False)
|
||||
|
||||
NOTIFICATION_TIMEOUT_STR = config.get("notification_timeout", "5s")
|
||||
NOTIFICATION_TIMEOUT = parse_timeout_string(NOTIFICATION_TIMEOUT_STR)
|
||||
@@ -133,10 +133,11 @@ else:
|
||||
DOCK_AUTO_HIDE = True
|
||||
TERMINAL_COMMAND = "kitty -e"
|
||||
DOCK_THEME = "Pills"
|
||||
DOCK_ICON_SIZE = 30
|
||||
DOCK_ICON_SIZE = 60
|
||||
WINDOW_SWITCHER_ITEMS_PER_ROW = 13
|
||||
DOCK_HIDE_SPECIAL_WORKSPACE = True
|
||||
DOCK_HIDE_SPECIAL_WORKSPACE_APPS = True
|
||||
DOCK_PREVIEW_APPS = False
|
||||
|
||||
NOTIFICATION_TIMEOUT_STR = "5s"
|
||||
NOTIFICATION_TIMEOUT = parse_timeout_string(NOTIFICATION_TIMEOUT_STR)
|
||||
|
||||
Reference in new issue
Block a user