Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with setting colors using --pipe #227

Open
NoahJelen opened this issue Mar 31, 2022 · 1 comment
Open

Issue with setting colors using --pipe #227

NoahJelen opened this issue Mar 31, 2022 · 1 comment

Comments

@NoahJelen
Copy link

What is the proper way to make it so I can have a gradient and set its colors at runtime using --pipe? I am trying to do that and every time I try to run glava with glava --desktop --pipe=fg --pipe=bg I get the following output:

WARNING: using "window" transform explicitly is deprecated (no-op); implied from "fft" transform.
WARNING: using "gravity" transform explicitly is deprecated (no-op); implied from "fft" transform.
WARNING: using "avg" transform explicitly is deprecated (no-op); implied from "fft" transform.
Shader compilation failed for '/home/nethernoah/.config/glava/bars/1.frag':
"1.frag":138(59): error: syntax error, unexpected ';', expecting ')' or ','

Here is my bars.glsl config:

/* Note: to only render a single channel, see `setmirror` in `rc.glsl`. */
#define C1 (@fg:#3366b2)
#define C2 (@bg:#a0a0b2)
/* Center line thickness (pixels) */
#define C_LINE 1
/* Width (in pixels) of each bar */
#define BAR_WIDTH 5
/* Width (in pixels) of each bar gap */
#define BAR_GAP 1
/* Outline width (in pixels, set to 0 to disable outline drawing) *
#define BAR_OUTLINE_WIDTH 1
/* Amplify magnitude of the results each bar displays */
#define AMPLIFY 300
/* Whether the current settings use the alpha channel;
   enabling this is required for alpha to function
   correctly on X11 with `"native"` transparency */
#define USE_ALPHA 0
/* How quickly the gradient transitions, in pixels */
#define GRADIENT 80
/* Bar color. By default this provides a blue-white gradient. */
#define COLOR mix(C1, C2, clamp(d / GRADIENT, 0, 1))
/* Outline color. By default this provides a 'glint' outline based on the bar color */
#define BAR_OUTLINE @bg:vec4(COLOR.rgb * 1.5, COLOR.a)
/* Direction that the bars are facing, 0 for inward, 1 for outward */
#define DIRECTION 0
/* Whether to switch left/right audio buffers */
#define INVERT 0
/* Whether to flip the output vertically */
#define FLIP 0
/* Whether to mirror output along `Y = X`, causing output to render on the left side of the window */
/* Use with `FLIP 1` to render on the right side */
#define MIRROR_YX 0
/* Whether to disable mono rendering when `#request setmirror true` is set in `rc.glsl`. */
#define DISABLE_MONO 0
@Preetam-Das
Copy link

I am getting the same issue :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants