Replace swaybg with glpaper
diff --git a/src/apps/personal/sway.nix b/src/apps/personal/sway.nix
index bcc0486..610eedd 100644
--- a/src/apps/personal/sway.nix
+++ b/src/apps/personal/sway.nix
@@ -118,7 +118,7 @@
position = "0,2160";
};
"*" = {
- bg = "${./sway/background.png} fill";
+ # bg = "${./sway/background.png} fill";
};
};
right = "l";
@@ -130,6 +130,7 @@
startup = [
{ command = "dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK"; }
{ command = "pkill swaync; ${pkgs-unstable.swaynotificationcenter}/bin/swaync"; always = true; }
+ { command = "pkill glpaper; ${pkgs.glpaper}/bin/glpaper eDP-1 ${./sway/shader.glsl} -F && ${pkgs.glpaper}/bin/glpaper HDMI-A-2 ${./sway/shader.glsl} -F"; always = true; }
];
terminal = "kitty";
up = "k";
@@ -202,6 +203,7 @@
jq
pulseaudio
pamixer
+ glpaper
];
programs.zsh.profileExtra = ''
diff --git a/src/apps/personal/sway/shader.glsl b/src/apps/personal/sway/shader.glsl
new file mode 100644
index 0000000..4c4b435
--- /dev/null
+++ b/src/apps/personal/sway/shader.glsl
@@ -0,0 +1,27 @@
+#extension GL_OES_standard_derivatives : enable
+
+precision highp float;
+
+uniform float time;
+uniform vec2 mouse;
+uniform vec2 resolution;
+
+vec3 white = vec3(1, 1, 1);
+vec3 amaranth_pink = vec3(0.945, 0.612, 0.733);
+vec3 maya_blue = vec3(0.298, 0.624, 0.886);
+
+void main( void ) {
+
+ vec2 position = ( gl_FragCoord.xy / resolution.xy );
+
+ vec3 color = white;
+
+ if (sin(position.x + time / 10.0) / 2.0 - position.y + 0.7 < 0.0) {
+ color = amaranth_pink;
+ } else if (sin(position.x + time / 7.0 + 20.0) / 2.0 - position.y + 0.7 < 0.0) {
+ color = maya_blue;
+ }
+
+ gl_FragColor = vec4(color, 1.0);
+
+}