bling/docs/module/flash.md

34 lines
1.0 KiB
Markdown
Raw Normal View History

2021-02-17 07:01:29 +01:00
## 🔦 Flash Focus <!-- {docsify-ignore} -->
Flash focus does an opacity animation effect on a client when it is focused.
### Usage
There are two ways in which you can use this module. You can enable it by calling the `enable()` function:
```lua
bling.module.flash_focus.enable()
```
This connects to the focus signal of a client, which means that the flash focus will activate however you focus the client.
The other way is to call the function itself like this: `bling.module.flash_focus.flashfocus(someclient)`. This allows you to activate on certain keybinds like so:
```lua
awful.key({modkey}, "Up",
2021-04-28 13:25:20 +02:00
function()
2021-02-17 07:01:29 +01:00
awful.client.focus.bydirection("up")
bling.module.flash_focus.flashfocus(client.focus)
end, {description = "focus up", group = "client"})
```
### Theme Variables
```lua
theme.flash_focus_start_opacity = 0.6 -- the starting opacity
theme.flash_focus_step = 0.01 -- the step of animation
2021-02-17 07:01:29 +01:00
```
### Preview
![](https://imgur.com/5txYrlV.gif)
*gif by [JavaCafe01](https://github.com/JavaCafe01)*