Reputation: 153
I'm trying to setup a keybind for running rofi -show combi
without having to type it in my terminal (which works fine).
Setting up a custom shortcut via System Settings -> Shortcuts -> Custom Shortcuts does not seem to do anything:
Meta+W
rofi -show combi
I'm running kubuntu 18.04 and rofi is installed via apt.
Tanks!
Upvotes: 1
Views: 8878
Reputation: 1202
In the Custom Shortcuts tree, after adding your new action, don't forget to enable it by checking the checkbox and clicking Apply button.
Upvotes: 0
Reputation: 422
Here's what did the trick for me:
sudo nano /usr/local/bin/rofi-run
Paste in:
#!/bin/bash
export LC_ALL="C"
rofi -show run 2>&1 | tee /tmp/rofi-run.log
exit 0
Make the file executable:
sudo chmod +x /usr/local/bin/rofi-run
Then use /usr/local/bin/rofi-run
as command/URL under settings -> shortcuts -> custom shortcuts
(Modifying Shortcuts - KDE Documentation).
Also if something fails you can now read the log under /tmp/rofi-run.log
Upvotes: 3
Reputation: 153
I've got a workaround.
Since I'm using guake as my main terminal, I'm just making it open a new tab, show rofi and exit the tab afterwards.
guake -n guake -e " rofi -show combi && exit"
The executed command deliberately starts with a space, so it won't land in bash history.
Hope it helps others too :D
Upvotes: 0