Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/VortexCoyote/hyprfocus
a focus animation plugin for Hyprland inspired by Flashfocus
https://github.com/VortexCoyote/hyprfocus
hyprland hyprland-plugin
Last synced: 6 days ago
JSON representation
a focus animation plugin for Hyprland inspired by Flashfocus
- Host: GitHub
- URL: https://github.com/VortexCoyote/hyprfocus
- Owner: VortexCoyote
- License: bsd-3-clause
- Created: 2023-04-11T20:34:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-22T12:10:02.000Z (5 months ago)
- Last Synced: 2024-08-02T07:17:19.420Z (3 months ago)
- Topics: hyprland, hyprland-plugin
- Language: C++
- Homepage:
- Size: 15.3 MB
- Stars: 167
- Watchers: 2
- Forks: 14
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-hyprland - hyprfocus - inspired plugin that adds flashing when changing focus, useful for borderless) (Plugins)
README
### ⚠️ this repo is inactive and will be archived! please consider using [pyt0xic's fork](https://github.com/pyt0xic/hyprfocus) instead, as it's being actively maintained!
# hyprfocus
a plugin which provides focus animations for us borderless folks, originally inspired by [flashfocus](https://github.com/fennerm/flashfocus)!
i'm on a tight schedule, so pull requests are welcome!
## animations
flash
![preview](flash.gif)
shrink
![preview](shrink.gif)
## compilation & installation
instructions based on [the official wiki](https://wiki.hyprland.org/Plugins/Using-Plugins/#compiling-official-plugins)
### hyprpm
**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```### manual
**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 `
**If you compile hyprland manually and install with `sudo make install` you can skip the cloning hyprland sources and `make pluginenv` part.**
## getting started
to start using hyprfocus, add this to your hyprland config:
```
plugin =plugin:hyprfocus {
enabled = yeskeyboard_focus_animation = shrink
mouse_focus_animation = flashbezier = bezIn, 0.5,0.0,1.0,0.5
bezier = bezOut, 0.0,0.5,0.5,1.0flash {
flash_opacity = 0.7in_bezier = bezIn
in_speed = 0.5out_bezier = bezOut
out_speed = 3
}shrink {
shrink_percentage = 0.8in_bezier = bezIn
in_speed = 0.5out_bezier = bezOut
out_speed = 3
}
}
```### plugin configuration
`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 configuration
animations can be configured within the plugin scope with the following syntax:
```
plugin:hyprfocus {
{}
}
```### shared animation variables
`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
`flash_opacity` (float) -> opacity to during the flash's apex
### shrink
`shrink_percentage` (float) -> the amount a window has shrunk during the animation's apex
### dispatching
hyprfocus can also flash the currently focused window through the `animatefocused` dispatcher:
```
bind = $mod, space, animatefocused
```## future plans
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!