![]() My approach was to check the current computer’s hostname to figure out which computer I want to switch to. Now that you have the right input values for the monitor, it’s fast to throw together a hotkey. I: VCP control #96 (0圆0) = current: 27, max: 18 Create a Hammerspoon hotkey to switch the display # When I ran it on my laptop, I got a current value of 27 (USB-C): $ ~/.ddcctl/ddcctl -d 1 -i ? When I ran it on my desktop, I got a current value of 15 (DisplayPort 1): $ ~/.ddcctl/ddcctl -d 1 -i ? Just use the ddcctl -d 1 -i "?" command on each of your computers. Turns out you can just ask the monitor which input source is active using ddcctl, which will save some guess and check. However, I found it to be incomplete–for example, my monitor’s USB-C input source is not in the table. There is a table of input sources on ddcctl’s README. Figure out which input each computer is on # Repeat this process on your second computer. Check it real quick you should see output like this: $ ~/.ddcctl/ddcctlĭ: NSScreen #724072469 (3440x1440 0°) 109.00 DPI Resolution: 3440 x 1440 (UWQHD - Ultra-Wide Quad HD )įramebuffer Depth: 30-Bit Color (ARGB2101010 )Īs you can see from the output above, I have both Intel and AMD (Radeon) cards, but I have my computer set to always use the Radeon no matter what. Metal: Supported, feature set macOS GPUFamily2 v1 Note whether you’re using an amd, nvidia, or intel card. Use system_profiler to figure out what graphics card you are using. I’ve chosen to clone it at ~/.ddcctl: $ git clone ~/.ddcctl Among other things, it lets you switch inputs!įirst, clone ddcctl. Install ddcctl on both computers #ĭdcctl is a simple command line program that lets you talk to your monitor using the Display Data Channel protocol. I’ll show you how to set up a single hot key with Hammerspoon to seamlessly switch between computers. Until now, I’ve been manually switching between computers dozens of times a day by menu diving on the actual monitor. I have a Dell 3419UW monitor, with my work Macbook plugged into the USB-C input, and my personal desktop Mac plugged into DisplayPort 1. Create a Hammerspoon hotkey to switch the display. ![]() Figure out which input each computer is on.Or for more advanced users, using the Homebrew command-line tool by running the below command in the terminal of your choice (e.g.Create a quick monitor input switcher with Hammerspoon You can download it from the Karabiner Elements website and follow the installation instruction, It is a free application with an easy setup for changes in the functionality of your keys. If you want to remap some of your keys, the easiest way to do that is to use the Karabiner Elements application. As a result, you will be not stretching your hands but confidently pressing only two keys on your keyboard. And you are right! Such a combination makes my shortcuts unique, and now I will show you how to remap not so often used keys to this tricky combination. You can think that it is a lot of keys to be pressed at once. See hammerspoon/a for instructions on configuring shortcuts to launch your most commonly-used apps. I defined my shortcuts using HYPER + selected letter. Hyper Mode ships with the default keybindings below, but you'll likely want to personalize this setup. The right global shortcut has to be unique to not overlap with any shortcuts in your system or IDE. ![]() Later in the post, I will call this combination a Hyper Key. So for example for remapping caps lock, we can remap it to. In my case, it will be the combination of 4 other control keys pressed at once: CMD (⌘) + SHIFT (⇧) + OPTION (⌥) + CTRL(˄). Hyper key means that a key now serves two purposes, once when pressed alone and once when held down. In my particular case, CAPSLOCK (⇪) is the least used key - I can remap it to a combination of keys, which would be more useful for me! When I need to type capital letters, I hold the SHIFT (⇧) key most of the time. The method uses Karabiner/Hammerspoon to do the key mapping and to fire off the appropriate application based on the key that Hyper is modifying. ![]() The article shows the setup for making the Caps Lock serve as Hyper and uses it to launch Atom, Chrome, or iTerm. Easy way to remap keys - Karabiner Elementsĭid you ever wonder what key do you use the least often? I figured out it was a CAPSLOCK (⇪) key. The idea is to use Hyper as a global shortcut key. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |