aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/chrome/ripple.kdl
blob: e4826302d138a7c4de574e4132c515e5e98325cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// ripple — chrome
//
// Hand-written, unlike contrib/shaders: those are generated from
// contrib/shadertoy.html, and the toy previews a pane's *contents*. A frame is
// a different rect and the toy has no frame to show.
//
// Drop this into ~/.config/slosh/config.kdl (a running session picks it up
// when you save), or point $SLOSH_CONFIG at this file. To hang it off a pane
// state instead of every pane, put the same pass inside one:
//
//     states { bell { ... } }
//
// Two pulses leaving the top-left corner in opposite directions and meeting at
// the far side. The radius sweeps 0..half the perimeter, which is as far as a
// ring goes before the two halves meet.

shaders {
    tint where="chrome" channel="fg" color="#7aa2f7" amount="(abs(min((y == 0 ? x : x == cols - 1 ? cols - 1 + y : y == rows - 1 ? 2 * cols + rows - 3 - x : 2 * cols + 2 * rows - 4 - y), (2 * cols + 2 * rows - 4) - (y == 0 ? x : x == cols - 1 ? cols - 1 + y : y == rows - 1 ? 2 * cols + rows - 3 - x : 2 * cols + 2 * rows - 4 - y)) - (t / 18 % (cols + rows - 2))) < 3) * 220"
}