fennerm / flashfocus

Simple focus animations for tiling window managers.
MIT License
748 stars 10 forks source link

Poor man's flashfocus #68

Closed drybalka closed 1 year ago

drybalka commented 2 years ago

First of all, flashfocus is a great idea! I just wanted to say, that most of the functionality of flashfocus for sway can be implemented using a small bash script:

#!/bin/bash

for OP in 0.905 0.82 0.745 0.68 0.625 0.58 0.545 0.52 0.505 0.5 0.505 0.52 0.545 0.58 0.625 0.68 0.745 0.82 0.905 1
do
        swaymsg opacity $OP
        sleep .005
done

and modifying the action on focus switch in the config:

bindsym $mod+$left exec swaymsg focus left && path-to-script

I suspect the same can be done for i3 and others quite similarly. Maybe you'd want to include this information in wiki or just simply leave it here.

P.S. This solution is inspired by a post here.

fennerm commented 1 year ago

Took me a minute but finally got round to adding this to the wiki. Thanks for the suggestion @drybalka :)