Git Product home page Git Product logo

xkeysnail-macos's Introduction

Xkeysnail macOS config

A Xkeysnail config that emulates macOS styled keyboard controls/shortcuts in Linux and X11.

Installation

  1. Install Xkeysnail using your package manager or following Xkeysnail installation instructions.

  2. Clone or download the provided config file to a location of your preference.

  3. Edit the config file and replace Your-terminal-app-here with the window class of your terminal application.

    (To get the window class name, run xprop WM_CLASS and click on the window of the terminal application)

  4. Create a systemd service for xkeysnail to run automatically on the background:

    cd /etc/systemd/system && sudo nano xkeysnail.service
    
  5. Insert the following code to the service config and edit the path to the provided config file:

    [Unit]
    Description=xkeysnail
    
    [Service]
    Type=simple
    KillMode=process
    ExecStart=/usr/bin/sudo /usr/bin/xkeysnail --quiet --watch /path/to/your/config-macos.py
    ExecStop=/usr/bin/sudo /usr/bin/killall xkeysnail
    Restart=on-failure
    RestartSec=3
    Environment=DISPLAY=:0
    
    [Install]
    WantedBy=graphical.target
    
  6. Enable the xkeysnail service:

    sudo systemctl enable xkeysnail
    
  7. Start the xkeysnail service:

    sudo systemctl start xkeysnail
    

Troubleshooting

  • To check if the xkeysnail service is running properly, run:

    sudo systemctl status xkeysnail
    
  • If you encounter errors like Xlib.error.DisplayConnectionError: Can't connect to display ":0.0": b'No protocol specified\n', make sure you have xhost package installed and try:

    sudo xhost + && sudo systemctl restart xkeysnail
    

Limitations

  • Command key input in terminals is troublesome, since macOS uses ctrl for all terminal operations. While the provided scripts provide a workaround for this, you won't be able to use these in built-in terminals (i.e. VS Code).

xkeysnail-macos's People

Contributors

bartosjiri avatar kekeho avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.