BlingCorp / bling

Utilities for the awesome window manager
https://blingcorp.github.io/bling/
MIT License
851 stars 51 forks source link

Scratchpad example doesn't work with animations #158

Open Nooo37 opened 2 years ago

Nooo37 commented 2 years ago

It seems to me that the scratchpad example given in the docs (https://blingcorp.github.io/bling/#/module/scratch) doesn't work with the animations provided

AdsonCicilioti commented 2 years ago

It seems to me that the scratchpad example given in the docs (https://blingcorp.github.io/bling/#/module/scratch) doesn't work with the animations provided

Here don't work in any way.

javacafe01 commented 1 year ago

@Nooo37 Works for me :thinking:

javacafe01 commented 1 year ago
local bling = require("module.bling")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi

local rubato = require("module.rubato")

local chat_anim = {
    x = rubato.timed {
        pos = -1400,
        rate = 120,
        easing = rubato.quadratic,
        intro = 0.1,
        duration = 0.3,
        awestore_compat = true
    }
}

local chat_scratch = bling.module.scratchpad:new{
    command = discord,
    rule = {class = "WebCord"},
    sticky = false,
    autoclose = false,
    floating = true,
    geometry = {
        x = screen_width / 2 - dpi(500),
        y = screen_height / 2 - dpi(450) + beautiful.wibar_height,
        height = dpi(850),
        width = dpi(1000)
    },
    reapply = true,
    rubato = chat_anim
}

awesome.connect_signal("scratch::chat", function() chat_scratch:toggle() end)