mrchow19910319 Posted May 12, 2017 Share Posted May 12, 2017 I am using my laptop with an external monitor. Laptop has a 720p screen (non-retina macbook pro) (lol) and external monitor's resolution is 2560x1440. So everytime I connect and disconnect my laptop, I gotta adjust the size of web pages. On my laptop I use zoom in 100% and on my external display I use 150%. Otherwise the texts are gonna be too small. Is there an alfred workflow can let me do this? It is getting annoying having to adjust manually every single time. Link to comment
vitor Posted May 12, 2017 Share Posted May 12, 2017 (edited) According to Chromes’s AppleScript dictionary, you can’t zoom windows with it, only check if windows are already or can be zoomed. Two solutions: Add a Dispatch Key Combo Output to press ⌘+ and ⌘0 (Chrome’s zoom keyboard shortcuts). Use (disclaimer: I’m the author) to zoom the pages. Use the code (function(){document.body.style.zoom = "150%"})() to zoom in, and (function(){document.body.style.zoom = "100%"})() to zoom out. Here’s a ready-made workflow. The first method is more prone to errors (especially since to zoom to 150% you need to ⌘+ three times in a row) because it relies on faking keyboard presses. But the second method requires you to activate it on each page. Pick whichever is more convenient to your usage. Edited June 24, 2021 by vitor mrchow19910319 1 Link to comment
mrchow19910319 Posted May 13, 2017 Author Share Posted May 13, 2017 18 hours ago, vitor said: I see. So, there is not a solution that can make all my chrome windows set to 150% automatically when connect to a external display. Then when disconnection happened, all page went back to 100%? Link to comment
vitor Posted May 13, 2017 Share Posted May 13, 2017 If you want it to happen automatically when some event (plugging the monitor) occurs, then Alfred was never the way to go. By design, Alfred needs to be specifically called. That’s an explicit feature, not a limitation. There may be a way to auto-detect when a monitor is plugged in, yes, but you should ask on Ask Different. mrchow19910319 1 Link to comment
agilebean Posted June 15, 2021 Share Posted June 15, 2021 Hi @vitor , it's been a while so your workflow is not available at the link you gave any more. Can you share it again? Link to comment
vitor Posted June 24, 2021 Share Posted June 24, 2021 On 6/15/2021 at 3:55 AM, agilebean said: Hi @vitor , it's been a while so your workflow is not available at the link you gave any more. Can you share it again? Recheck the link. But it’s easy to redo. That’s why I added the instructions. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now