Skip to content

Commit b1578ed

Browse files
authored
Add orgmode, replace nvimtree with oil, replace nvim-cmp with blink.cmp (#84)
* Add orgmode, replace nvimtree with oil, replace nvim-cmp with blink.cmp * Use ollama in avanta, lock treesitter version and format lua files * Use $PYENV_PATH instead of $HOME/.pyenv to prevent errors when pyenv is uninstall but not cleaned * Don't set XDG_RUNTIME_DIR in OSX or you're going to have a bad time * Update mpd config file * If no nix-profiles available check for nix system profile * Add kernel specific config files for mpd and add support for in in the install script * Update avante and blink
1 parent 5aa3d19 commit b1578ed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1923
-490
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#version 330
2+
3+
in vec2 fragCoord;
4+
out vec4 fragColor;
5+
6+
// bar values. defaults to left channels first (low to high), then right (high to low).
7+
uniform float bars[512];
8+
9+
uniform int bars_count; // number of bars (left + right) (configurable)
10+
uniform int bar_width; // bar width (configurable), not used here
11+
uniform int bar_spacing; // space bewteen bars (configurable)
12+
13+
uniform vec3 u_resolution; // window resolution
14+
15+
//colors, configurable in cava config file (r,g,b) (0.0 - 1.0)
16+
uniform vec3 bg_color; // background color
17+
uniform vec3 fg_color; // foreground color
18+
19+
uniform int gradient_count;
20+
uniform vec3 gradient_colors[8]; // gradient colors
21+
22+
vec3 normalize_C(float y,vec3 col_1, vec3 col_2, float y_min, float y_max)
23+
{
24+
//create color based on fraction of this color and next color
25+
float yr = (y - y_min) / (y_max - y_min);
26+
return col_1 * (1.0 - yr) + col_2 * yr;
27+
}
28+
29+
void main()
30+
{
31+
// find which bar to use based on where we are on the x axis
32+
float x = u_resolution.x * fragCoord.x;
33+
int bar = int(bars_count * fragCoord.x);
34+
35+
//calculate a bar size
36+
float bar_size = u_resolution.x / bars_count;
37+
38+
//the y coordinate and bar values are the same
39+
float y = bars[bar];
40+
41+
// make sure there is a thin line at bottom
42+
if (y * u_resolution.y < 1.0)
43+
{
44+
y = 1.0 / u_resolution.y;
45+
}
46+
47+
//draw the bar up to current height
48+
if (y > fragCoord.y)
49+
{
50+
//make some space between bars basen on settings
51+
if (x > (bar + 1) * (bar_size) - bar_spacing)
52+
{
53+
fragColor = vec4(bg_color,1.0);
54+
}
55+
else
56+
{
57+
if (gradient_count == 0)
58+
{
59+
fragColor = vec4(fg_color,1.0);
60+
}
61+
else
62+
{
63+
//find which color in the configured gradient we are at
64+
int color = int((gradient_count - 1) * fragCoord.y);
65+
66+
//find where on y this and next color is supposed to be
67+
float y_min = color / (gradient_count - 1.0);
68+
float y_max = (color + 1.0) / (gradient_count - 1.0);
69+
70+
//make color
71+
fragColor = vec4(normalize_C(fragCoord.y, gradient_colors[color], gradient_colors[color + 1], y_min, y_max), 1.0);
72+
}
73+
}
74+
}
75+
else
76+
{
77+
fragColor = vec4(bg_color,1.0);
78+
}
79+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#version 330
2+
3+
in vec2 fragCoord;
4+
out vec4 fragColor;
5+
6+
// bar values. defaults to left channels first (low to high), then right (high to low).
7+
uniform float bars[512];
8+
9+
uniform int bars_count; // number of bars (left + right) (configurable)
10+
11+
uniform vec3 u_resolution; // window resolution, not used here
12+
13+
//colors, configurable in cava config file
14+
uniform vec3 bg_color; // background color(r,g,b) (0.0 - 1.0), not used here
15+
uniform vec3 fg_color; // foreground color, not used here
16+
17+
void main()
18+
{
19+
// find which bar to use based on where we are on the x axis
20+
int bar = int(bars_count * fragCoord.x);
21+
22+
float bar_y = 1.0 - abs((fragCoord.y - 0.5)) * 2.0;
23+
float y = (bars[bar]) * bar_y;
24+
25+
float bar_x = (fragCoord.x - float(bar) / float(bars_count)) * bars_count;
26+
float bar_r = 1.0 - abs((bar_x - 0.5)) * 2;
27+
28+
bar_r = bar_r * bar_r * 2;
29+
30+
// set color
31+
fragColor.r = fg_color.x * y * bar_r;
32+
fragColor.g = fg_color.y * y * bar_r;
33+
fragColor.b = fg_color.z * y * bar_r;
34+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#version 330
2+
3+
4+
// Input vertex data, different for all executions of this shader.
5+
layout(location = 0) in vec3 vertexPosition_modelspace;
6+
7+
// Output data ; will be interpolated for each fragment.
8+
out vec2 fragCoord;
9+
10+
void main()
11+
{
12+
gl_Position = vec4(vertexPosition_modelspace,1);
13+
fragCoord = (vertexPosition_modelspace.xy+vec2(1,1))/2.0;
14+
}

.config/mpd/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sticker.sql
2+
database
3+
playlists/
4+
mpd.conf

.config/mpd/mpd.conf

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)