You are not logged in.

#1 2017-01-16 10:18:39

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

Toggling the wibox in AwesomeWM

I am trying to create a custom response to Mod4+R, so when I press the keystroke, this would happen:

-Make all clients disappear (without killing them)
-Blur my wallpaper
-Spawn Rofi in run mode
-Run any command. Rofi disappears
-Make my wallpaper go back to normal
-Recover all my clients

For achieving this, I have programmed my rc.lua like:

  -- Prompt
    procom = "rofi -show run"
       
    awful.key({ modkey }, "r", function () awful.util.spawn(procom)
        blur = "hsetroot -fill /usr/share/awesome/themes/modded/background.png -blur 5"
        unblur = "hsetroot -fill /usr/share/awesome/themes/modded/background.png"
        
        mywibox[mouse.screen].visible = false
        awful.util.spawn(blur)

        client.connect_signal("unmanage", function(c)

           if c.name == "rofi" then          
              mywibox[mouse.screen].visible = true
              awful.util.spawn(unblur)
              awful.tag.gettags(mouse.screen)[1].selected = true
           end

        end)
    end),

As far as I could debug, it seems the program won't enter the 'if' loop. I have checked the client name using xprop, but I don't know if I forgot to do something in my code. The final result is the program blurring my wallpaper, launching Rofi and hiding the wibox (but not the clients). After running the command, Rofi disappears and I'm left a blurred wallpaper with a spinning mouse (loading something?).

Last edited by xVlaze (2017-01-16 10:19:06)

Offline

#2 2017-02-14 14:48:33

0x3048
Member
Registered: 2016-05-20
Posts: 6

Re: Toggling the wibox in AwesomeWM

I don't know if that's the issue, but it seems that mouse.screen now returns an instance of screen class instead of a number (as it did before). Check that [mouse.screen] references and, where needed, change them to [mouse.screen.index]. I had broken prompt widget because of this

Last edited by 0x3048 (2017-02-14 14:54:02)

Offline

Board footer

Powered by FluxBB