dotfiles

My PC Dotfiles & Website
commit ce384c8d12cd0f7c0a14dd60f55263fd5e63edc0
parent a3467385bb5dbca0c523006d53d4dc43a0ef807e
Author: maydayv7 <maydayv7@gmail.com>
Date:   Fri,  1 Aug 2025 18:15:12 +0530

feat: Add Hyprland Shaders

Diffstat:

6 files changed, 57 insertions(+), 4 deletions(-)

diff --git a/files/flake.nix b/files/flake.nix @@ -74,6 +74,9 @@ # Hyprland WM hyprland = { + # Custom Shaders + shaders = ./hyprland/shaders; + # Pyprland pypr = readFile ./hyprland/pypr.toml; diff --git a/files/hyprland/shaders/dim.frag b/files/hyprland/shaders/dim.frag @@ -0,0 +1,14 @@ +// Screen Dimming + +#version 300 es +precision highp float; + +in vec2 v_texcoord; +uniform sampler2D tex; + +out vec4 fragColor; + +void main() +{ + fragColor = texture(tex, v_texcoord) * 0.3; +} diff --git a/files/hyprland/shaders/invert.frag b/files/hyprland/shaders/invert.frag @@ -0,0 +1,15 @@ +// Invert Colors + +#version 300 es +precision highp float; + +in vec2 v_texcoord; +uniform sampler2D tex; + +out vec4 fragColor; + +void main() +{ + vec4 pixColor = texture(tex, v_texcoord); + fragColor = vec4(1.0 - pixColor.r, 1.0 - pixColor.g, 1.0 - pixColor.b, pixColor.a); +} diff --git a/files/hyprland/shaders/monochrome.frag b/files/hyprland/shaders/monochrome.frag @@ -0,0 +1,21 @@ +// Monochrome filter + +#version 300 es +precision mediump float; + +in vec2 v_texcoord; +uniform sampler2D tex; + +out vec4 fragColor; + +void main() +{ + vec4 pixColor = texture(tex, v_texcoord); + + // Check https://en.wikipedia.org/wiki/Grayscale#Luma_coding_in_video_systems for which one to choose + float lum = dot(pixColor.rgb, vec3(0.299, 0.587, 0.114)); // BT.601 + // float lum = dot(pixColor.rgb, vec3(0.2126, 0.7152, 0.0722)); // BT.709 + // float lum = dot(pixColor.rgb, vec3(0.2627, 0.6780, 0.0593)); // BT.2100 + + fragColor = vec4(vec3(lum), pixColor.a); +} diff --git a/flake.lock b/flake.lock @@ -1209,11 +1209,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1745080454, - "narHash": "sha256-Ylk1g6/yy+/4vQ+0E6oOYcwtQ2Kk0vbcimvK21a8ppI=", + "lastModified": 1753270975, + "narHash": "sha256-bI3F+PqAHVK0g+H2B+wFK7r7z+BmHsqyRY5I477Zcuo=", "owner": "maydayv7", "repo": "proprietary", - "rev": "7fcbd8b32736128dd29bb106b855a926c0338f10", + "rev": "182c2803995962c7e3ea5e491ae4294325766e59", "type": "github" }, "original": { diff --git a/modules/gui/desktop/hyprland/apps/utilities.nix b/modules/gui/desktop/hyprland/apps/utilities.nix @@ -166,7 +166,7 @@ in # Shaders ".config/hypr/shaders" = { - source = files.proprietary.shaders.path; + source = shaders; recursive = true; }; };