I made a script for linux renoise users that lets you play notes with PC keyboard while focused on a plugin window

Hi!

I was always annoyed that in linux renoise version you have to always change focus from a plugin window to DAW window if you want to play a few notes and see how it sounds.

So I made a very simple script that uses xdotool to solve this issue. It basically waits for focus change events and as soon as one happens, it switches focus back to the renoise window.

Here’s the script itself.

You can just download it, put it into ~/bin or ~/.local/bin or /usr/local/bin depending on your distro and personal preferences, make it executable with chmod +x and use

permafocus.sh start to fix the focus at currently focused window, permafocus.sh stop to stop it and permafocus.sh toggle to, well, toggle it.

You might have to install xdotool to use it.

Suggested use would be to use your window manager or hotkey daemon to bind this script to some key combination. I personally use win+s to toggle permafocus.

I hope this is helpful to somebody here.

1 Like

My God man this is super helpful but please can you tell me step by step how to do it in Ubuntu?This is a major problem in Renoise in Linux and many many people will be thankful if it works ok

No problem!

Step by step instructions to use this script. (commands provided after $ are to be run in a terminal session)

  1. Install xdotool:

$ sudo apt install xdotool

  1. Install this script to /usr/local/bin:
    $ sudo cp path/to/file/permafocus.sh /usr/local/bin/

(path/to/file should be replaced by the actual path to the folder containing script, for example ~/Downloads/)

  1. Make the file executable:

$ sudo chmod +x /usr/local/bin/permafocus.sh

  1. Follow this guide to create a custom shortcut, use any name and shortcut key you prefer. In the command field type permafocus.sh toggle

  2. Now whenever you press that shortcut key, the window currently in focus will keep the focus even when you click on another window. Press it again to stop this behavior.

  3. To use it with renoise, you can press your shortcut whenever you start working on a song in renoise and press it again, disabling focus grabbing, when you need to input something into your plugin or another window. But note that it should be pressed when main renoise window is in focus, not a plugin or any other window.

  4. Please note that I can’t test this script in every environment and setup, so it might not run correctly on some systems. Feel free to contact me if this is the case and I’d be happy to try to help.

Hope this helps!

1 Like

Great will try and respond tomorrow

Hey man sorry for the late reply i tested it today and it works perfectly i cant thank you enough.I think many people need this but they haven’t seen this thread so i will make a new one just to make them find it.