Shortcut keys and running shells without timeout worries in Linux #2942
Danie10
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've discovered this app yesterday and been hard at work converting all my existing Stream Deck functionality from the StreamController app for Linux, to Bitfocus Companion. Two things though did prove to be tricky:
Preventing the Shell Timeout Issue
Using the Button action internal: System: Run shell path (local) I'm executing:
The & on the end instructs the bash shell to fire up the konsole shell as detached. So even when the timeout kills the bash shell, the konsole one continues to run. The actual command I wanted to run, which I interact with, is
pamac update --aur --devel
and I want that shell kept open when it finishes, so I can check if there are any errors or other messages.Global Shortcut Key Combinations
Xdoptool is an incredibly powerful, and lightweight, Linux command to not only fire off global shortcut keys, but it will also bring background windows into focus, click the mouse, focus on a specific browser tab, or direct keys at a specific window. I won't go into all the details of how to get it to search for a named window, etc but will just replicate some commands I'm using for these shortcuts, and it will get most Linux users going quickly. No connection or module is required.
For all of these, I'm using the Button Press actions and internal: System: Run shell path (local) to output global shortcuts:
Ctrl L
xdotool key Control_L+Left
Alt L
xdotool key Alt_L+Left
Ctrl Right Arrow
xdotool key Control_L+Right
Right Arrow
xdotool key Right
s key
xdotool key s
Keyboard's Volume Increase
xdotool key XF86AudioRaiseVolume
Keyboard's media Next
xdotool key XF86AudioNext
Esc key
xdotool key esc
F6
xdotool key F6
Bonus extra:
I also like to have a key to paste my mail footer at the end of any mail etc, so this works too for outputting plain text with new lines:
xdotool type "Regards" && xdotool key Return && xdotool type "Name Surname"
Beta Was this translation helpful? Give feedback.
All reactions