⚠️ this repo is inactive and will be archived! please consider using pyt0xic's fork instead, as it's being actively maintained!
a plugin which provides focus animations for us borderless folks, originally inspired by flashfocus!
i'm on a tight schedule, so pull requests are welcome!
flash
shrink
instructions based on the official wiki
1) add hyprfocus
hyprpm add https://github.com/VortexCoyote/hyprfocus
2) verify that it's installed
hyprpm list
3) enable it and reload
hyprpm enable hyprfocus && hyprpm reload
4) (OPTIONAL) make sure plugins are loaded at startup
this goes into you hyprland config:
exec-once = hyprpm reload -n
1) clone hyprfocus and cd into it
git clone https://github.com/VortexCoyote/hyprfocus && cd hyprfocus
2) clone hyprland and cd into it
git clone --recursive https://github.com/hyprwm/Hyprland && cd Hyprland
3) checkout the correct release tag matching with your version of hyprland
git checkout tags/v0.26.0
4) prepare the hyprland source for plugin compilation
make all && sudo make installheaders
5) cd back and make
cd .. && make all
6) profit, make sure you use the full path to the .so file
hyprctl plugin load <full .so path>
If you compile hyprland manually and install with sudo make install
you can skip the cloning hyprland sources and make pluginenv
part.
to start using hyprfocus, add this to your hyprland config:
plugin = <full .so path>
plugin:hyprfocus {
enabled = yes
keyboard_focus_animation = shrink
mouse_focus_animation = flash
bezier = bezIn, 0.5,0.0,1.0,0.5
bezier = bezOut, 0.0,0.5,0.5,1.0
flash {
flash_opacity = 0.7
in_bezier = bezIn
in_speed = 0.5
out_bezier = bezOut
out_speed = 3
}
shrink {
shrink_percentage = 0.8
in_bezier = bezIn
in_speed = 0.5
out_bezier = bezOut
out_speed = 3
}
}
enabled
(yes/no) -> enable or disable the plugin
keyboard_focus_animation
(flash/shrink/nothing) -> animation for keyboard-driven focus
mouse_focus_animation
(flash/shrink/nothing) -> animation for mouse pressed focus (setting input:follow_mouse = 0, input:float_switch_override_focus = 0 and input:mouse_refocus = false is recommended)
animations can be configured within the plugin scope with the following syntax:
plugin:hyprfocus {
<animation> {
}
}
in_bezier
(bezier) -> bezier curve towards the animation apex
out_bezier
(bezier) -> bezier curve towards the default window state
in_speed
(float) -> speed for the 'in' bezier
out_speed
(float) -> speed for the 'out' bezier
flash_opacity
(float) -> opacity to during the flash's apex
shrink_percentage
(float) -> the amount a window has shrunk during the animation's apex
hyprfocus can also flash the currently focused window through the animatefocused
dispatcher:
bind = $mod, space, animatefocused
I'm mostly planning on implementing more animations, for example a popin-popout bounce animation. But if you have any suggestions, feel free to create a git issue!