You are not logged in.

#1 2017-01-08 16:29:48

xVlaze
Member
Registered: 2017-01-08
Posts: 10

Hide AwesomeWM top bar when running a command

I am trying to modify my rc.lua file the following way: when I press Mod4+R, AwesomeWM keybinding for running a command, I want Rofi to appear, blur my wallpaper and hide everything from my screen. I only want the Rofi prompt over a blurred wallpaper to be seen.

To achieve this, I have the following code in my conf file:

--From PROmpt COMmand:
procom = "rofi -show run"


awful.key({ modkey }, "r", function () awful.util.spawn(procom)

          if awful.util.spawn(procom) then
                    awful.titlebar.hide(c)
          else
                    awful.titlebar.show(c)
          end

end), 

Restarting AwesomeWM will display the following error code:

/usr/share/awesome/lib/awful/titlebar.lua:44: attempt to call a nil value (local 'c')


Any help will be appreciated.

Offline

#2 2017-01-09 14:30:42

quizzmaster
Member
Registered: 2012-11-24
Posts: 9

Re: Hide AwesomeWM top bar when running a command

c is nil, because you didn't assign anything to it. c has to be the client whose titlebar you want to hide.
awful.util.spawn is deprecated in awesome 4.0, use awful.spawn instead.

awful.spawn returns only the PID of the started process.
Maybe you want to use a property table or a callback function to hide the titlebar of rofi. You can also use rules for always hiding the titlebar for rofi.

Offline

Board footer

Powered by FluxBB