You are not logged in.

#1 2022-07-21 12:56:00

ds6pex
Member
Registered: 2022-03-14
Posts: 6

How should i write keybinding script on rc.lua to run programs?

Hi, I'm trying to use rofi application launcher on Awesomewm. But i can't figure out how should i write keybinding script on my rc.lua .
I wanna just run "rofi -show drun" with superkey + p key.

Offline

#2 2022-07-21 13:28:26

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: How should i write keybinding script on rc.lua to run programs?

What have you tried?  What documentation have you followed?  This is an extremely well documented and basic question about configuring your WM - you should not need your hand held through it.  There are even examples in our wiki page for awesomewm.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2022-07-22 01:53:48

ds6pex
Member
Registered: 2022-03-14
Posts: 6

Re: How should i write keybinding script on rc.lua to run programs?

Hi, Thanks for replying. I know i had to take a look a ArchWiki and search on the internet before lefting post on the forum. Maybe i think i didn't take a look closely. I read a post of Awesome - Arch Wiki, r/awesomewm of Reddit, manpage of Awesome, ArchForum and Stack Exchange.

Anyhow, I solved the problem by refer to a post of Stack Exchange.
(Here is the link:) https://askubuntu.com/questions/279176/ … awesome-wm
I noticed that i should add a script

awful.key({ modkey, }, "p", function () awful.util.spawn("rofi -show drun") end),

under the line of

globalkeys = awful.util.table.join

And finally it works successfully.

Offline

#4 2022-07-22 02:27:51

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: How should i write keybinding script on rc.lua to run programs?

Nicely done.  Thanks for sharing the solution you arrived at.  Please also mark the thread as solved my editing your first post to prepend [SOLVED] to the title.  That way snarky forum veterans like me can someday chastize new users with similar questions for failing to search and find your post.

Last edited by Trilby (2022-07-22 02:28:18)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB