Crud, I missed that.
Someone should take it over. It's by far the best session-manager available for Safari.
-Chris
Crud, I missed that.
Someone should take it over. It's by far the best session-manager available for Safari.
-Chris
Hey Mitchell,
If you look at the post I linked to that has my _Safari » Switch Tabs-Windows Using Pick-List macro – and actually try out the macro – you'll see it marks the front tab of each window.
-Chris
Hey Mitchell,
The first page has a Popular, Recent and Categories links.
So you can search or browse.
-Chris
Expanding upon my scriptlet above and excerpted from the referenced macro (with a slight embellishment):
tell application "Safari"
tell (every window where its document is not missing value)
set docCount to count
set currentTabIndex to index of current tab
set tabCount to count of tabs
set tabNames to name of tabs
set tabURLs to URL of tabs
end tell
end tell
-Chris
Mostly just a haphazard impatient working style (as you probably could have guessed from all my too-hasty and misinformed posts :-).
But there are some underlying factors:
At the moment my Safari Windows and tabs are quite a bit more cleaned up than usual. In the hope I won't embarrass myself by anything included there, I put in my Dropbox the HML file generated for my current Safari state.
One of the things I often do to cut back on the documentation-related tabs is use Firefox for, and only for, technology documentation (unless I am developing or debugging something for which Firefox tools are helpful). I used to use OmniWeb for that, loving its workspace and vertical tab feature and highly Mac-Style interface (Omnigroup originating as a provider of applications for NeXT). I was very happy recently to discover a tree-structured vertical tab extension for Firefox (and many other vertical tab and tab-grouping extensions listed on that page).
Ill probably think of more to say about this, but I doubt there would be any point.
Working style, is the key, I think. In fact, the link cited above for the Firefox tree-tab extension says at one point "If you often use many many tabs…", so I know there is at least one person out there who shares this style :-).
Yeah, thats good. There are so many tab-managing macros floating around the KM forum that I haven’t kept up with all of them, no less read their implementations carefully. Best way to learn better ways to do things is to discover them in other people’s code, of course.
No, it's a matter of a change in Apple's extensions policy that the author objected to. I don't know where that might be on the extension's web page, but I read it in a popup that showed up when I first installed the extension.
I found the problem. It was hidden because it was the result of accidentally using a feature of Safari I never used — pinned tabs. I don’t even know how they work. I can’t imagine why a pinned tab would show up as one of the tabs of every window.
Because pinned tabs are added to every window.
Perfectly insane if you ask me...
-Chris
How'd you like to be able to create bookmarks in the Finder and auto-categorize and tag them?
-Chris
Well, if it works for you, I guess that's all that matters.
Personally, I can't imagine finding and navigating 250 open browser tabs.
It suggests that you are trying to work on multiple projects at the same time, literally. That wouldn't work for me -- too much noise and distractions.
I use the following to mainain order and still find things very quickly:
I have very, very, rarely need to have more than about 10 browser tabs open at once. Most new tabs come from a google search page, and I open each link in new tab. If the page isn't what i want, I close it. The link is still available on the search page. If I think I might need a page for future ref, then I clip it to Evernote.
One final note, if you use Chrome, you might find OneTab extension for Google Chrome helpful. They claim to "save up to 95% memory and reduce tab clutter".
Good luck.
Thanks — lots of good ideas there to think about. Yours is the most sophisticated use of Evernote I’ve heard of. I know I am not using more than its minimum features, but have yet to discipline myself enough to establish a workflow. I might try copying what you outlined.
The major thing that none of the organization techniques can handle is keeping a bunch of related documentation pages open – like the 10 or 15 pages I use most often when writing Python code. That’s where I am turning more and more to Firefox, leaving Safari for more normal use.
I tend to stay away from Chrome — don’t like some of its interface and especially don’t like its proliferation of processes using who knows how much memory and CPU (not that I’m really short in either of those). But when I do use Chrome it’s for yet another different kind of browsing.
Omniweb had this great feature: workspaces. They were snapshots of Window & Tab arrangements, with easy flipping among them. So I can arrange all my Python windows and tabs just how I want them, snapshot that, and switch to something else. Whenever I want Python documentation, I could just switch back to the Python workspace. Had workspaces for digital photography, Python, web technologies, Java, OS X, etc. Do you know of anything like this for any of the browsers? I suppose if I were clever i could figure out a way to use Sessions, or something like it, not just to capture the current browsing state, but a browsing state that I could flip back to. Probably can name sessions, but haven’t tried yet.
Great macro, thank you.
Would it be possible for me to ‘pre-fill’ the desired tab name? Instead of using the pick list?
I’m always checking to see if that tab exists and if so, go there, if not make a new one.
thanx
[deleted]
?? I'm on Safari - where is this "• Other •"
Sorry, confused, thought you were talking about a different macro:
Reveal Safari Windows
This script "Find and activate specific tab (Chrome and:or Safari)" used to work for me using Chrome, but it quit working months ago. Was there an u Mac OS update or Chrome update that broke it? Currently, it mostly locks up Chrome for a minute, then a notification pop ups with: "JavaScript For Automation Results" then exits the script yielding no results. Is there an update to the script to get it working again?
Thanks!
Thanks – it does sound as if there has been a change in Chrome (which I haven't been using much for a while) I'll take a look over the weekend.
Not sure of your exact use case, but I've sketched something here (just for Chrome) which:
86.0.4240.183
Activate a Chrome tab containing a given string.kmmacros (22.0 KB)
(() => {
'use strict';
// Activate first Chrome tab with a title
// which includes the given string.
// Rob Trew @2020
// main :: IO ()
const main = () => {
const
s = toLower(
Application(
'Keyboard Maestro Engine'
).getvariable('tabString')
),
ws = Application('Google Chrome').windows;
return either(
// Explanatory message,
x => x
)(
// or title and url of activated tab.
x => x
)(
bindLR(
0 < ws.length ? (
Right(ws.at(0))
) : Left('No windows open in Chrome')
)(frontWindow => {
const
tabIndex = frontWindow.tabs()
.findIndex(
x => toLower(x.title()).includes(s)
);
return bindLR(
-1 !== tabIndex ? (
Right(tabIndex)
) : Left('No match found in tabs.')
)(index => {
const tab = (
frontWindow.activeTabIndex = (1 + index),
frontWindow.activeTab()
);
return Right(
`[${tab.title()}](${tab.url()})`
)
});
})
);
};
// --------------------- GENERIC ---------------------
// Left :: a -> Either a b
const Left = x => ({
type: 'Either',
Left: x
});
// Right :: b -> Either a b
const Right = x => ({
type: 'Either',
Right: x
});
// bindLR (>>=) :: Either a ->
// (a -> Either b) -> Either b
const bindLR = m =>
mf => undefined !== m.Left ? (
m
) : mf(m.Right);
// either :: (a -> c) -> (b -> c) -> Either a b -> c
const either = fl =>
// Application of the function fl to the
// contents of any Left value in e, or
// the application of fr to its Right value.
fr => e => 'Either' === e.type ? (
undefined !== e.Left ? (
fl(e.Left)
) : fr(e.Right)
) : undefined;
// toLower :: String -> String
const toLower = s =>
// Lower-case version of string.
s.toLocaleLowerCase();
// MAIN ---
return main();
})();