Jump to content

Creating Macros On Linux

The Linus and Luke Linux challenge made me want to give Linux a go for my day to day use. I installed Pop OS alongside my Windows 10 install on my system to give it a go.

 

I believe most things I do daily would be possible however, over the years I've become pretty good with AutoHotKey scripts and use them pretty regularly in my day to day workflow as well as for gaming. I've been able to recreate some of my Macros using shell scripts and custom hotkey buttons but there is a lot I haven't figured out how to do yet. For example some of the ones I use will depend on certain applications to be open or will have a different script for a press, double press or long press. Does anyone have any suggestions on how this can be done? Please keep in mind I don't really code I learned AHK over the years but that's about as far as my skill with it go. 

Link to comment
Share on other sites

Link to post
Share on other sites

There's a project called AutoKey that seems to do most of what AHK does, but the scripting language isn't the same. It uses Python for the scripts, one of the easier languages to learn and use, and there are some scripts out there so you can base yours on. 

 

There is also the possibility that most of what you're trying to do will work with traditional shell scripts. I'm not good enough at BASH scripting to know how to set that up, but someone else on here might. 

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, RONOTHAN## said:

There's a project called AutoKey that seems to do most of what AHK does, but the scripting language isn't the same. It uses Python for the scripts, one of the easier languages to learn and use, and there are some scripts out there so you can base yours on. 

 

There is also the possibility that most of what you're trying to do will work with traditional shell scripts. I'm not good enough at BASH scripting to know how to set that up, but someone else on here might. 

I checked out Autokey a bit but was scared away by python. But I may have to just bite the bullet and figure it out. 

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 weeks later...

I wouldn't let Python scare you aware. IMO it's more consistent than AutoHotKey - and a hell of a lot more powerful once you get comfortable with the basics. However, I'm not sure if it's possible to set up double or long press hotkeys with Autokey. Hopefully someone else can confirm or correct me.

 

I used AutoHotKey a lot on Windows to create workarounds for various annoyances, many of which just aren't issues for me on Linux. Then, in terms of simple things like hotkeys, swapping keys, and so forth - a lot of that is possible with configuration options depending on desktop environment (DE) / windows manager (WM). For more complex multi-step things I use mix of BASH and Python scripts and map them to hotkeys using my WM - or run them direct from terminal, add to crontab (a program that runs programs/scripts on a set schedule), etc. I only use Autokey as a text expander for a single application.

Link to comment
Share on other sites

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×