aboutsummaryrefslogtreecommitdiffstats
path: root/bookmarks/shell.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-26 13:07:08 +0100
committerDanilo M. <danix@danix.xyz>2026-10-26 13:07:08 +0100
commite320c1e0e4452d9bf4903d64e0dd3e1b3ced95d2 (patch)
tree34847129057c55116bc056f1af61c892342582f3 /bookmarks/shell.qml
parentf161ba41344c6834f10eaa5064dc02bc9c1cfdf6 (diff)
downloadquickshell-e320c1e0e4452d9bf4903d64e0dd3e1b3ced95d2.tar.gz
quickshell-e320c1e0e4452d9bf4903d64e0dd3e1b3ced95d2.zip
bookmarks: Firefox bookmarks as a full-width overlay
A new standalone shell, shaped like hosts, on SUPER+b. bookmarks.py reads the bookmark tree and favicons of the profile a running Firefox holds (found through the pid in its lock symlink; the last-modified places.sqlite was tried first and picked the guest profile after a stray launch touched it). Firefox keeps both databases in exclusive lock mode, so they are copied with their -wal and the copy is read: an immutable=1 open of the original skipped the log and kept showing bookmarks deleted minutes before. The grid spans DP-1, a ListView of card rows so only visible rows exist, grouped by folder with each folder's own bookmarks before its subfolders. Six icon buttons (Ctrl+S cycles) sort by folder, newest, title, site, most visited or link state. The wheel scrolls three rows a notch through a MouseArea, since Flickable's own step crawled; only the selected card carries a Glow, through a Loader. Favicons are extracted by content hash; a page without one takes any icon Firefox holds for its host, which found 52 more of 504. bookmarks.py --links (Ctrl+R) checks every http(s) bookmark, HEAD then GET, 32 at a time, in about 22s, and caches the result. Dead means 404/410, an NXDOMAIN or a refused connection; 403, 429, timeouts, TLS and resolver failures are only "unsure", because a 32-thread burst produced EAI_AGAIN that a serial retry resolved. Bookmarks open with xdg-open: a plain `firefox <url>` does not reach an instance started with -P and opened the default profile beside it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'bookmarks/shell.qml')
-rw-r--r--bookmarks/shell.qml26
1 files changed, 26 insertions, 0 deletions
diff --git a/bookmarks/shell.qml b/bookmarks/shell.qml
new file mode 100644
index 0000000..3212e06
--- /dev/null
+++ b/bookmarks/shell.qml
@@ -0,0 +1,26 @@
+// Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+import Quickshell
+import Quickshell.Io
+
+ShellRoot {
+ Bookmarks { id: bookmarks }
+
+ // Bound to SUPER + b in Hyprland:
+ // `qs -p <this dir> ipc call bookmarks toggle`
+ IpcHandler {
+ target: "bookmarks"
+ function toggle() { bookmarks.toggle(); }
+ function open() { bookmarks.open = true; }
+ function close() { bookmarks.close(); }
+ }
+}