1400 points · by thesephist · 5y ago · 235 comments
I remember using this regularly to mass-download the images embedded into a page - open the page this way by replacing http:// with a pseudo-protocol, copy all, paste, done.
KDE always came with a lot of VFS trickery like that. Ripping a music CD into MP3s was similar - you'd open the volume in the file manager and see your tracks along with a virtual folder full of MP3 files. The rip and encoding would happen on the fly, and you could do this e.g. straight from the file attach feature in an instant messenger.
Desktop Linux was a lot less friendly to get working smoothly back then compared to now, and feature discovery was by word of mouth more than anything, but it sure felt like living in the future early.
It then (IIRC 15 years ago) became deprecated in favor of DBUS, but I remember it was not as straightforward and simple to use as DCOP was, and also the applications, at least by the time, weren't supporting lots of useful operations with DBUS.
AudioCD KIO is still working the same way. I'm ripping an old audio CD of mine to FLAC as I write this comment.
KDE's one of the oldest and best maintained feature is KIO backend. It's still alive and kicking as hard as in 3.5.x days.
Yeah, KIO is an awesome piece of software. Yesterday, a fuse interface was released[1] so that non-KDE software in Plasma also get most of the benefits of KIO.
And speaking of browser tabs, Plasma Browser integration allows to switch to an open tabs from Krunner directly and it works with Firefox, Chrome and Microsoft Edge.
[1]: https://feverfew.home.blog/2020/12/31/kio-fuse-5-0-0-release...
On this topic and more generally, I think KDE had gotten way too little credit!
gio help [COMMAND]
gio version
gio cat LOCATION...
gio copy [OPTION...] SOURCE... DESTINATION
gio info [OPTION...] LOCATION...
gio list [OPTION...] [LOCATION...]
gio mime MIMETYPE [HANDLER]
gio mkdir [OPTION...] LOCATION...
gio monitor [OPTION...] [LOCATION...]
gio mount [OPTION...] [LOCATION...]
gio move [OPTION...] SOURCE... DESTINATION
gio open LOCATION...
gio rename LOCATION NAME
gio remove [OPTION...] LOCATION...
gio save [OPTION...] DESTINATION
gio set [OPTION...] LOCATION ATTRIBUTE VALUE...
gio trash [OPTION...] [LOCATION...]
gio tree [OPTION...] [LOCATION...]That is how Android and ChromeOS happen, or FOSS developers end up buying a BSD based proprietary desktop OS, or even Windows based systems, to develop software for GNU/Linux based cloud environments.
These days many desktop interfaces feel quite dumbed-down. Still very usable though. But perhaps sometimes with unrealized potential.
Taligent?
You can paste any KIO URI into any application's file open dialog box and it'll retrieve it. So for example, you could open any KDE media player, paste in an audiocd:// URI, and it'll play the specified track from your CD.
And it also meant that any application could open remote files without having to manually download them first. Like, if I wanted to open some random file off the web in a text editor, I can just go into Kate, hit Ctrl-O, and paste its URL into the dialog box, and it'll fetch it into a temp folder and open it without me having to first download it manually. This was especially useful for PDFs, because Okular is generally way better than any browser's PDF reader (and I was doing this before most browsers came with PDF readers).
Btw Konqueror also used/uses the KHTML rendering engine, which was the foundation for WebKit.
It goes further than that. It's pretty much everything in one app. KIOs accesses stuff and KParts shows it. Since many applications expose their functionality using those, it can show whatever content they support and browse it as a filesystem when it's possible.
Web browsing is just KIO doing http and a KPart showing the page. File management is just the file (or smb or sftp or whatever) KIO and the Dolphin KPart. The Kate KPart is used in both cases to either view local text files or web pages source.
But there are others and you can do any combination, including some cool ones.
You can go to man:// or info:// to view man/info pages.
The Akonadi KIO from the PIM suite can be used to browse remote mail or calendar accounts and extract data.
It even used to be possible to use magnet links in HTML (like in <video src="magnet:...">) with kio-magnet or to browse mysql databases and use applications to edit content in cells with libferris, although I don't think those are currently maintained.
That was apparently common thing to do, as Microsoft did the same in Windows 98 integrating Explorer with IE.
My OS is heavily scripted and keybound, thanks to 15 years of cumulative incremental fixes and a kick-ass WM. The one thing that's frustrated me is the relative black box that my browser represents, and writing a shim between my WM and browser tabs has been on my TODO list for a long, long time (through a couple of aborted attempts due to a combination of Chrome's at-the-time obsolete documentation and probably-necessary security model).
I'm cautiously optimistic that this is going to represent a dramatic step function in ease-of-use of my OS, in the same way that i3 was.
EDIT: I should clarify that I did read the author's note that this is experimental, not secure, etc. I'm mainly just excited about having a jumping-off point to play around with and possibly hack on a little.
Have you noticed a significant difference in memory usage? qutebrowser turns into quite the memory hog over time. I have to periodically restart qutebrowser so my hundreds of tabs go into suspended mode. Even suspended tabs use a good chunk of memory.
Yes, I should be better at closing tabs.
Unfortunately, I can't answer your other questions because I'm good at closing tabs :p
I can give you one of my favorite examples. I have a pretty intense job, and I've struggled to some degree with the way stress eats into both my work productivity and my well-being after work. I wrote this script to mitigate the bouts of workday akrasia that induce me to almost-unconsciously procrastinate, as well as the unfortunate habit of checking work email/Slack after work hours or while on breaks (one of the pitfalls of not physically separating my work and recreational machines).
I use a simple launcher app called gmrun, which allows defining custom protocol prefixes. I've defined a few of these protocols, but my favorite is "m:", which switches "modes" on my laptop. Appending a prefix-string of either "work", "rec", or "all" rewrites my i3 config file to switch to the corresponding "mode" by selectively disabling a set of switch-to-workspace keybindings. It's about 100 lines of straightforward Python code incl docs and newlines, took me half an hour, and it paid for the time I put into it in less than a week. Probably a _dozen_ times a day, I catch myself trying to switch to the workspace that has my messenger apps or personal browser windows, and disabling the keybinding is enough to short-circuit the stress-driven impulse to distract and procrastinate and remember that I am trying to do focused work. It works very similarly for checking my email/Slack after work hours, something I almost never do now for the same reasons.
This is pretty tuned to my situation, OS setup, and personality, but that's pretty much the point: I'm extremely spoiled by Linux, i3, etc due to having a system that's been custom-fitted to my every need every moment of my computing life since late high school. If there's a rough edge, I sand it; if there's an optimization opportunity, I take it (if the ROI seems clearly worth it).
Not to get on my soapbox, but it saddens me a little that so many people I talk to, particularly technical ones, have become disconnected from just how many affordances general-purpose computers can offer without ever being _forced_ to avoid choosing the ease of a one-size-fits-all approach.
But it was the rest of your post, describing the way in which you're environment has morphed with you over the years, and how you've been able to really dial in your computing experience...it's so striking! There are few people who can say the same. I certainly cannot. I have personally gone through perhaps 3 complete redos in my adult life. But it's disruptive and bad, and I have to admit I feel some envy that you've been able to maintain a single coherent thread of evolution for so long. You must move around incredibly smoothly - I'd be curious to see a video of a few cycles of a build-test-debug cycle with your setup. I would also be curious to know how your file-system is organized. That seems to be the most difficult problem of all!
In the realm of tab management, I use this one liner in console of chrome://inspect every once in a while, then just close all of my tabs:
collection = document.getElementById("pages").getElementsByClassName("subrow"); final_output_tsv = "title\turl\n"; for (let item of collection) {final_output_tsv += `${item.children[0].innerHTML}\t${item.children[1] ? item.children[1].innerHTML : "N/A"}\n`}; copy(final_output_tsv)
Substitute "devices" for "pages" to get android chrome tabsThis way I can backup all my tabs in simple, non-bookmark format and search them using python etc.
This is an adapted version that skips grabbing subprocesses
collection = document.getElementById("pages").getElementsByClassName("subrow"); final_output_tsv = "title\turl\n"; for (let item of collection) {if(new RegExp("([a-zA-Z0-9]+://)?([a-zA-Z0-9_]+:[a-zA-Z0-9_]+@)?([a-zA-Z0-9.-]+\\.[A-Za-z]{2,4})(:[0-9]+)?(/.*)?").test(item.children[0].innerHTML) === false) final_output_tsv += `${item.children[0].innerHTML}\t${item.children[1] ? item.children[1].innerHTML : "N/A"}\n`}; copy(final_output_tsv)
edit: I used reload all tabs extension with reload all tabs in all windows option turned on. This could get messy.A friend of mine keeps basically infinity tabs open. I sort of rolled my eyes, but accepted his rare behavior.
However as time has gone on, I've been surprised to find I may have the rare behavior and it is common for people to work this way.
So.. maybe this is a way he can backup his "filesystem" and not suffer a nervous breakdown when his machine reboots or some othe browser failure where he loses his world.
For those in the comments who are like myself (and parent's friend) and have hundreds or even thousands of tabs open, I highly recommend the Panorama Tab Groups extension for Firefox:
https://addons.mozilla.org/en-US/firefox/addon/panorama-tab-...
This extension adds back in the functionality that was removed from Firefox half a decade ago. It gives you a visual, 2D-map of arbitrary groups of tabs in a tile layout you can view with "Ctrl-Shift-F". Combined with the backup feature (just in case it crashes or gets corrupted, although this has yet to happen to me) and Firefox's built-in tab session saving option, so long as you have enough memory (I bought 40 gigs of RAM for this laptop after terrible memories of running Firefox on a Chromebook with 4GB of soldered RAM), you can basically browse as though you'll never have to close a tab again, AND also be able to stay organized.
Sounds like someone taking a corner at 200 mph and rolling their eyes when they hit the crash barrier. Not often is the following true, but - you're using that tool wrong.
Firefox used to have similar problem with their json so after a few bug report with them they fixed it with another json.bak as redundancy. ( The good days of Firefox )
macOS does the same except without the scrolling.
2 - Name the bookmark folder (within the top-level bookmark folder) something like: 'Tab-mess-from-<date-time>'
3 - Ctrl-F4 close them. Press and hold Ctrl, then F4 them one at a time. You can close 200+ tabs in a minute. (or as other suggested, right-click any tab and use the option 'close other tabs').
The issue i find is that even if you create the perfect system, you still rarely m go back and revisit these tabs kept open.
It can make this a little better by storing the tabs as part of a task. Soo you can get back to them as part of a context rather than just a link.
As a bonus you can arrange URLs by name, url, or time next to each other, so it's usually fast to churn through related or duplicate tabs.
Ctrl-F4 shuts down entire browser, Ctrl-W closes each tab with a press of w. This is behavior in Ubuntu and it holds true for most application windows.
yeah about that, are you sure they are open and not hibernated? Chrome had proactive-tab-freeze-and-discard , later renamed to proactive-tab-freeze and finally forced On in 80 with no option of turning it off. 'hibernated' tabs are merely a bookmark without loaded content. I dont think this extension would be able to work with non loaded tabs without forcing them all to load. 300 tabs is able to easily eat 16GB of ram, Im scared to think what would happen with 1000 tabs loaded in Chrome.
I remember good old Opera 12.x where you could sit on 200 actually loaded and active tabs and RAM usage was somewhere around 2GB.
I'm starting to get seriously tempted to go with one of the forks. I seriously miss the old extensions.
Also, "Auto discard tab" plugin does a good job by keeping unused tabs closed, to save resources.
This behavior always confuses me. To what end? Have you ever derived any value from a tab you chose not to close?
I probably have hundreds of "productive" tabs open, and that's before even getting to tabs that are serving as an "L1 cache" version of a read-it-later service. And all of this comes with extremely quick clean-up; once I buy the gift/finalize the routine/purchase the item, it's trivial to close the entire window for that task.
> Do you only have a single thread of tasks you're doing at any given time on your machine, all of whose resources are torn down and rebuilt from scratch when needed?
Yes, absolutely, at least when it comes to my web browser.
I run Firefox Nightly and intentionally use its prompt to restart for an update as a prompt to consider whether I should close the things I have open. I'll sometimes ignore the update for a few hours, but not usually longer than that.
If I need to retain some information over a period of more than a few hours, I'll transfer it to a note-taking app or something similar. Habitually not keeping a large number of tabs open helps me maintain focus to some extent, and deliberating over whether to close a tab or window presents and opportunity to think about extracting a snippet for storage elsewhere.
To me the idea of keeping an entire webpage open as a method of storing what is likely a very small subset of what it contains just doesn't seem "right", regardless of actual resource consumption on the computer I'm using.
The way i work: I mostly work on a one thing at a time. For that i can have probably at max 40 tabs open. Once it gets past some threshold(i don't recognize or remember what's in them) i tend to start to close the obsolete ones. If there is something i find useful i bookmark it. If there is something i think i would like to read in future i also bookmark it. Once the work is done i close all the tabs. In general i like my tabs closed, it brings peace to my mind.
"Your personal research assistant
Zotero is a free, easy-to-use tool to help you collect, organize, cite, and share research."
Like you I am an avaricious multi-tasker over extended periods of time and was heading towards the same state you appear to have reached.
I realised it was not optimal and did some research and discovered Zotero. I use it personally and require it at my businesses.
It adds several wonderful abilities - best is the ability to share and collaborate on research at will.
Can you elaborate on this? Which extensions are you talking about?
I also rack up hundreds of tabs and my browser is often the main resource hog for me. I’ll often have to kill -9 it to force it to start with “oops we crashed, here are your previous tabs in an unloaded state”, but it sounds like you have a better way of doing this
Tabs? They are easy to organize, easily accessible because they are always visible and they are powerful enough to completely remove the need for bookmarks which makes using bookmarks always inferior because of the downsides of bookmarks.
Now lets get to the actual point:
>Have you ever derived any value from a tab you chose not to close?
I close tabs that I don't need eventually, bookmarks just keep accumulating because there is an easy method to add them, but actually finding or deleting bookmarks is a lot of effort.
I've been using qutebrowser mainly for a couple months now, and I find the way bookmarks and quickmarks fit into the standard open or open in new tab dialogue feels very powerful. I often am just hitting O to open in new tab, typing a few characters, and picking a result from bookmarks or history. Searching and going to a URL happens there too. I try to use either descriptive names like "guix-bug-issue" for quickmarks so they show up when I type any of those bits (bug and issue intentionally redundant so if I think to search either, it comes up), or I use very shorts strings like "lfm" for my last.fm profile. In the case of these shorter ones, you get the added advantage of being able to go there without looking. If you type an exact quickmark name in the box and hit enter, it goes straight there, you don't have to wait and look over the suggestions in the box.
This keeps my bookmarks clean.
Not GP but of course!
Why would we close something we are going back to?
This encloses all my research for this subject in one window. Often times I have upwards of 10+ windows opened. Since some of the work spans over several days or weeks.
I also take screenshots of relevant information. Which gets automatically labeled by date and time into a screenshot folder, and sub-sorted into months.
So window ‘topic-1’ have 10 tabs relating to ‘topic-1’ and the property ‘topic-1’ is visible in my WM.
Is this possible (I have not -yet - searched ‘enough’ for this functionality...)?
$ cd ~/tmp/foo
$ touch a b c d e
$ vim .
Then select the file(s) you wish to delete, press D (must be capital "D"), confirm the deletion, and Bob's your uncle.In Firefox you can right-click on a tab and close
- all tabs
- or all tabs to the right
If you use tree style tabs you can also close a tree or a subtree.
Edit: and there is an extension (yep :) to the tree style tab extension to allow you to export a subtree as a nested list of links - in Markdown!
I think it's the most important extension for people who do heavy browsing, research things online, etc.
cp html/body/*/img/.hero-img/hello.png ~Downloads/
You would need some clever way to express the DOM with ids and classes etc but it could be done with some subdirectory structure and long names, sometimes having multiple names for the same thing.
The DOM represents the tree structure derived from the markup by the browser, so dealing with malformed markup wouldn't be the problem of this extension, it'd be the problem of the browser it's integrating in to.
There was https://amoffat.github.io/supertag/ [,] which I'm intending to use in my filesharing sftp server, and now this, which seems like something that exposes functionality from a web browser that I would love.
Also, say hello to FUSE, which tries to mimic that on the userland.
This might cause certain software to automatically read them (for instance to generate previews) and allow an attacker to exploit vulnerabilities in that software.
Think of an unsandboxed process generating a preview for a PDF file...
On plan 9 we use a file server called webfs[1] which serves web pages as a series of directories containing files of parsed html and so on. It's basically a tabbed browser back end. A front end such as mothra or netsurf[2] can then use webfs to abstract the html protocol and replaces post/get with read()/write(). And it can be served over a network so you could run a webfs "server" and let multiple clients on multiple machines surf the web through a single webfs server. Bonus is you can also do webstuff from shell scripts so the back end is used by shell programs like hget which is the plan 9 equivalent to wget :-)
You can make it so that every website is fully searchable and the data easily viewable/extractable. Set up the marketplace for user created plugins, the possibilities are endless.
I would happily contribute $25k to this. reply if interested.
Ba-dum tsshhh
It's a shame that you all haven't gotten more traction on HN despite regularly making submissions for major developments over the years. This thread[1], though outdated, made for some interesting reading.
Best of luck for future development. I'm looking forward to digging into Nyxt very soon!
Why did you choose the latter approach?
But experience tell me that any tool that interfaces with the browser will break in a year and a half. Depending on this tool will put me into a situation where I'll have to decide between preserving my workflow or updating my browser and possibly other software.
Maybe once there's more than 5 forks or a few hundred Github stars, I'll start to see where I can incorporate it into my workflow. But as it is, I've become wary of super-useful tools that are not yet in widespread use.
Expose all the resources used in each tab in a virtual filesystem (JS, CSS, images, HTML, fonts, etc) in a folder for each tab. Basically Chrome Developer Tool's Sources tab but as files and folders on your computer.
This would be great for scraping with headless browsers. It'd let you use shell scripts or your favorite programming language's filesystem library to read/copy assets, rather than writing code with Puppeteer to copy files/data.
It would have to copy from Chrome directly though, rather than re-fetch the content
The general idea is to have more persistent caching locally, so that peer offloading (and persistence of offline content) can be guaranteed.
Since yesterday the cache supports multiple versions of each file (with a timestamp), and it will get a UI that allows to navigate back in time for each URL.
Isn’t that what happens when you save a page? Or is that not possible with Puppeteer?
> bt (brotab = Browser Tabs) is a command-line tool that helps you manage browser tabs. It can help you list, close, reorder, open and activate your tabs.
It supports both Chrome and Firefox. I use it to get titles of tabs that make some sound in Firefox.
Would it work better as a "relational database" than a hierarchical tree filesystem? I noticced that "by-id" and "by-title" and "last-focused" are several views into an underlying source of data, and changing one view causes other branches of the filesystem to change automatically. Maybe it could be more cleanly modeled as a relational data store with one row per tab, and columns with different meanings. Then use SQL, or a cleaner notation for relational algebra, to query this interface.
The downside is that you can no longer use command-line utilities that operate on files (find/grep, fd/rg).
i upvoted because it's an interesting question, but to me i would like good patterns for how to express data & views on the file-system. data goes into databases to die, alas. it remains tragically single consumer, one database one application. not that it has to be, but that's how things usually are. the file system by contrast is exposed system wide, & requires no app configuration or discovery to consume data on it (I guess choosing a file might sort of count?). there are a wide range of command line and gui tools built in to the os for exploring & manipulating the file system.
perhaps we could make a good sql on the file-system plugin, to make sql data more accessible across the system? :)
google-chrome --user-data-dir="/path/to/somewhere/else"
I use this switch and a directory from `mktemp -d` for remote debugging (--remote-debugging-port=1234). The debugging does not disturb my normal browsing and the profile is completely disposable.https://chrome.google.com/webstore/detail/manage-tabs-by-dom...
Which would allow you to easily close all tabs from Stack Overflow.
However, I think a less powerful extension that just subscribes to `chrome.(tab|window).*` events and reports them to a local server and listens for commands (e.g to create tabs) would be enough. Not using the debug api and not exposing more than tabs, windows and URLs.
The reporting bit of the extension could be as simple as a bunch of listeners a la:
chrome.tabs.onSelectionChanged.addListener(
(tabId, props) => fetch('http://localhost:8118/report?'+JSON.stringify([tabId, props])));It would be interesting to have a "persistent" layer where you could store stuff related to a domain. For example you would store userscripts in "ycombinator.com" folder, and they would load each time a tab of that domain is open. That would be a clean organization.
Then, if websites are made with TabFS in mind, the gap between the concepts of "apps" and "website" is probably filled.
Very cool idea though and looking forward to seeing what comes of it.
I know that both the Mozilla and Chrome stores have become increasingly strict in terms of what the uploaded extensions can do (I've gone through a quite bumpy road to get my extension published), but if you submit the extension to them and make sure that it is compliant with their policies I think that there would be no need to manually load the manifest from developer mode.
https://omar.website/tabfs/doc/delete.mp4
Ah, I see now. It is called "dired". I wonder if it can be used standalone, without emacs.
emacs --eval '(dired ".")'
to immediately start emacs-dired in this directory :-) $ cat ~/bin/dired
#!/bin/bash
# Launch Dired in a plain Emacs configuration.
# Arguments are passed to Emacs, e.g. "-nw" works as expected.
emacs -q "$@" \
--eval "(dired default-directory)" \
--eval "(defun kill-window-or-emacs () (interactive) (if (one-window-p) (kill-emacs) (delete-window)))" \
--eval "(setq dired-dwim-target t delete-by-moving-to-trash t)" \
--eval "(define-key dired-mode-map (kbd \"q\") #'kill-window-or-emacs)"In fact, one feature I am missing in Tree Style Tabs is the ability to save a list of tabs as a text file to archive it and to open/import it at a later point in time again.
Somehow TabFS feels like it could be used to achieve that.
chrome-cli
I'd prefer the same info as a relational DB though.
Look forward to seeing what else gets implemented on your todo list.
Unfortunately it doesn't work for me though -- I get "Unchecked runtime.lastError: Native host has exited."
Output of install script: ``` $ ./install.sh chrome mnlmpigkagdnfjmicelbkejgfefcnlkp + [[ 2 -lt 1 ]] + [[ chrome == \f\i\r\e\f\o\x ]] + [[ chrome == \c\h\r\o\m\e ]] + [[ 2 -eq 2 ]] + [[ 32 -eq 32 ]] ++ uname -s + OS=Linux ++ echo chrome ++ tr '[:upper:]' '[:lower:]' + BROWSER=chrome + case "$OS $BROWSER" in + MANIFEST_LOCATION=/home/dheera/.config/google-chrome/NativeMessagingHosts + mkdir -p /home/dheera/.config/google-chrome/NativeMessagingHosts + APP_NAME=com.rsnous.tabfs ++ pwd + EXE_PATH=/home/dheera/code/clone/TabFS/fs/tabfs + case "$BROWSER" in + EXTENSION_ID=mnlmpigkagdnfjmicelbkejgfefcnlkp ++ cat + MANIFEST='{ "name": "com.rsnous.tabfs", "description": "TabFS", "path": "/home/dheera/code/clone/TabFS/fs/tabfs", "type": "stdio", "allowed_extensions": ["tabfs@rsnous.com"], "allowed_origins": ["chrome-extension://mnlmpigkagdnfjmicelbkejgfefcnlkp/"] }' + echo '{ "name": "com.rsnous.tabfs", "description": "TabFS", "path": "/home/dheera/code/clone/TabFS/fs/tabfs", "type": "stdio", "allowed_extensions": ["tabfs@rsnous.com"], "allowed_origins": ["chrome-extension://mnlmpigkagdnfjmicelbkejgfefcnlkp/"] }' ```
Problem with HTML5 video is you can use more than just a link to video file https://developer.mozilla.org/en-US/docs/Web/API/MediaSource There are "certain" websites serving videos using BLOB object mediasource created dynamically from encrypted https sources. So far I had no luck trying to capture resulting video datastream, mediasource is a write and forget type of interface, and on top of that MediaRecorder/captureStream() is bugged and crashes so you cant even record lossy reencoded capture.
https://stackoverflow.com/questions/50938089/how-to-download...
I should probably experiment with shimming whole MediaSource api and capture data before its pumped into the read only void.