Migrating to Linux from a Mac? This bash script remaps native GNOME desktop environment keybindings to the macOS defaults. Very useful keyboard remap for Linux users who are running GNOME on a Macbook, Mac or a PC with Apple keyboard. Don't spend time getting used to the default GNOME keybindings. Run the script and use your Linux just like you do use your Mac. Here are some key remaps that are implemented:
- Command key
⌘
set as main system modifier key. - Copy and Paste work in Terminal with
⌘ c
,⌘ v
. Regular interruptctrl c
works in Terminal. - Nautilus keyboard hotkeys replaced with the Finder ones: navigate in and out of folder, delete folder, new folder...
- Home and End keys assigned to macOS defaults
⌘ ←
and⌘ →
. - Workspace switching works with
Ctrl ←
andCtrl →
. - Some macOS window manager keyboard shortcuts are implemented: application switcher
⌘ tab
,⌘ ~
, close window⌘ w
. - Mission Contol and Launchpad media keys are remapped.
- And more...
The functionality is based on the Autokey mechanism. On top of that the default GNOME shell keybindings are modified as well. Therefore it will only work in X11 window system. Wayland is not supported.
Make sure you are using X11, not Wayland. Logout from your session. On the GNOME login screen find and click gear icon. Select option "GNOME on Xorg". Log back in.
Install Git and AutoKey with package manager of your choice:
- On Pop!_OS run
sudo apt-get install git autokey-common autokey-gtk
. - On other Debian based distributions (Ubuntu, Zorin...) run
sudo apt-get install git autokey autokey-gtk
. - On Fedora run
sudo dnf install git autokey autokey-gtk
.
- Make sure you are running
Xorg
display server. If not sure logout from your session. On the GNOME login screen click ⚙ icon on the bottom right. SelectGNOME on Xorg
. Log in. - Check out the repository to some arbitrary location and run the
install.sh
script in Terminal. Script will ask for administrator password.
git clone https://github.com/petrstepanov/gnome-macos-remap
cd gnome-macos-remap
sh install.sh
- Open AutoKey (
autokey-gtk
). In Edit -> Preferences menu make sure theAutomatically start AutoKey at login
checkbox is on. - Restart your computer.
To get a functionality similar to the macOS Spotlight, I recommend installing the Ulauncher application. You can assign the ⌘ space
hotkey for the Ulauncher in its settings.
Logitech MX series keyboard users please use Solaar to set your keyboard to use macOS layout.
- Navigate into the program directory in Terminal and run
uninstall.sh
. - Restart your computer.
Please run the sh install.sh dev
command. This will create a symbolic link for autokey scripts from the repository into the autokey settings. Therefore it will be easy to add or modify AutoKey scripts and push the changes to the repoisitory.
Script supports GNOME 40 horizontal workspace switching.
Some hotkeys need to be implemented on the application-specific basis. However a regexp-related issue in Autokey prevents doing it at the moment. More macOS hotkeys will be implemented once this issue is resolved.