From 9a8b98c844cec43b84eb7cf8293baa86ebbfa667 Mon Sep 17 00:00:00 2001 From: Amazingca Date: Sun, 15 Mar 2026 00:45:39 -0600 Subject: [PATCH] Add all the new stuff --- config/hypr/hyprland.conf | 99 ++---- config/hypr/hyprlock.conf | 55 ++-- config/hypr/hyprlock/status.sh | 2 +- config/hypr/hyprpaper.conf | 7 +- config/hypr/shaders/crt.frag | 572 ++++----------------------------- config/ironbar/config.toml | 1 + config/ironbar/style.css | 2 +- 7 files changed, 131 insertions(+), 607 deletions(-) diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 1c5d8fd..49df3ac 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -1,24 +1,3 @@ - -# ####################################################################################### -# AUTOGENERATED HYPRLAND CONFIG. -# PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hyprland.conf AND EDIT IT, -# OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS. -# ####################################################################################### - -autogenerated = 0 # remove this line to remove the warning - -# This is an example Hyprland config file. -# Refer to the wiki for more information. -# https://wiki.hyprland.org/Configuring/ - -# Please note not all available settings / options are set here. -# For a full list, see the wiki - -# You can split this configuration into multiple files -# Create your files separately and then link them to this file like this: -# source = ~/.config/hypr/myColors.conf - - ################ ### MONITORS ### ################ @@ -32,8 +11,6 @@ monitor=,preferred,auto,auto ################### # See https://wiki.hyprland.org/Configuring/Keywords/ - -# Set programs that you use $terminal = kgx $fileManager = nautilus $menu = wofi --show drun @@ -43,12 +20,7 @@ $menu = wofi --show drun ### AUTOSTART ### ################# -# Autostart necessary processes (like notifications daemons, status bars, etc.) -# Or execute your favorite apps at launch like this: - -# exec-once = $terminal -# exec-once = nm-applet & -exec-once = waybar & hyprpaper # hyprpanel & hyprpaper # waybar & hyprpaper +exec-once = discord & ironbar & hyprpaper & hyprsunset # waybar is the old top-bar ############################# @@ -86,8 +58,8 @@ env = HYPRCURSOR_SIZE,24 # https://wiki.hyprland.org/Configuring/Variables/#general general { - gaps_in = 5 - gaps_out = 10 + gaps_in = 3 # 5 + gaps_out = 6 # 10 border_size = 2 @@ -183,7 +155,7 @@ master { # https://wiki.hyprland.org/Configuring/Variables/#misc misc { - force_default_wallpaper = 1 # Set to 0 or 1 to disable the anime mascot wallpapers + force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :( } @@ -209,11 +181,6 @@ input { } } -# https://wiki.hyprland.org/Configuring/Variables/#gestures -gestures { - workspace_swipe = false -} - # Example per-device config # See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more device { @@ -227,24 +194,34 @@ device { ################### # See https://wiki.hyprland.org/Configuring/Keywords/ -$mainMod = SUPER # Sets "Windows" key as main modifier +$mainMod = SUPER # Sets "Super" key as main modifier # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more -bind = $mainMod, T, exec, $terminal -bind = $mainMod, Q, killactive, -bind = $mainMod, Z, exec, zen +bind = $mainMod, A, exec, $menu +bind = $mainMod, C, exec, cinny bind = $mainMod, D, exec, discord -bind = $mainMod, M, exec, minecraft-launcher +bind = $mainMod, E, exec, $fileManager +bind = $mainMod, F, exec, feishin +bind = $mainMod SHIFT, F, exec, fladder +bind = $mainMod, H, exec, helium bind = $mainMod, L, exec, hyprlock +bind = $mainMod, M, exec, minecraft-launcher +bind = $mainMod, O, exec, obsidian +bind = $mainMod, P, pseudo, # dwindle +bind = $mainMod, Q, killactive, +bind = $mainMod, R, exec, revolt +bind = $mainMod SHIFT, R, exec, root +bind = $mainMod SHIFT, S, exec, hyprshot -m region -c -s -o ~/Pictures/Screenshots +bind = Alt+SHIFT, S, exec, hyprshot -zm region -o ~/Pictures/Screenshots -- pinta +bind = $mainMod, S, exec, steam +bind = $mainMod Alt, S, exec, signal-desktop --password-store="gnome-libsecret" +bind = $mainMod, T, exec, $terminal +bind = $mainMod, V, exec, via +# bind = $mainMod, V, togglefloating, +bind = $mainMod, Z, exec, zen bind = Ctrl+Alt, Backspace, exit, bind = Ctrl+SHIFT+Alt, Backspace, exec, poweroff -bind = $mainMod SHIFT, S, exec, hyprshot -zm region -o ~/Pictures/Screenshots -bind = $mainMod, S, exec, steam -bind = $mainMod, E, exec, $fileManager -bind = $mainMod, V, togglefloating, -bind = $mainMod, R, exec, revolt -bind = $mainMod, P, pseudo, # dwindle -bind = $mainMod, J, togglesplit, # dwindle +bind = , F11, fullscreen, # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l @@ -276,9 +253,11 @@ bind = $mainMod SHIFT, 8, movetoworkspace, 8 bind = $mainMod SHIFT, 9, movetoworkspace, 9 bind = $mainMod SHIFT, 0, movetoworkspace, 10 -# Example special workspace (scratchpad) -# bind = $mainMod, S, togglespecialworkspace, magic -# bind = $mainMod SHIFT, S, movetoworkspace, special:magic +# Change position of currently active window +bind = $mainMod SHIFT, left, movewindow, l +bind = $mainMod SHIFT, right, movewindow, r +bind = $mainMod SHIFT, up, movewindow, u +bind = $mainMod SHIFT, down, movewindow, d # Scroll through existing workspaces with mainMod + scroll bind = $mainMod, mouse_down, workspace, e+1 @@ -301,19 +280,3 @@ bindl = , XF86AudioNext, exec, playerctl next bindl = , XF86AudioPause, exec, playerctl play-pause bindl = , XF86AudioPlay, exec, playerctl play-pause bindl = , XF86AudioPrev, exec, playerctl previous - -############################## -### WINDOWS AND WORKSPACES ### -############################## - -# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more -# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules - -# Example windowrule -# windowrule = float,class:^(kitty)$,title:^(kitty)$ - -# Ignore maximize requests from apps. You'll probably like this. -windowrule = suppressevent maximize, class:.* - -# Fix some dragging issues with XWayland -windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0 diff --git a/config/hypr/hyprlock.conf b/config/hypr/hyprlock.conf index 2f4fb64..b1c7b2f 100644 --- a/config/hypr/hyprlock.conf +++ b/config/hypr/hyprlock.conf @@ -2,17 +2,16 @@ $text_color = rgba(E7DEFFFF) $entry_background_color = rgba(1E006011) $entry_border_color = rgba(938E9F55) $entry_color = rgba(E7DEFFFF) -$font_family = Rubik Light -$font_family_clock = Rubik Light -$font_material_symbols = Material Symbols Rounded +$font_family = Maple Mono NF +$font_family_clock = Maple Mono NF +$font_material_symbols = Maple Mono NF background { - color = rgba(181818FF) - # path = {{ SWWW_WALL }} - + # color = rgba(181818FF) # path = screenshot - # blur_size = 15 - # blur_passes = 4 + path = /opt/backgrounds/orion_nebula_nasa_heic0601a.jpg + blur_size = 15 + blur_passes = 4 } input-field { monitor = @@ -23,8 +22,11 @@ input-field { outer_color = $entry_border_color inner_color = $entry_background_color font_color = $entry_color + font_family = $font_family fade_on_empty = true - + fail_color = rgba(fc4e59ff) + fail_text = $FAIL ($ATTEMPTS) + placeholder_text = Enter Password... position = 0, 20 halign = center valign = center @@ -47,7 +49,6 @@ label { # Clock color = $text_color font_size = 65 font_family = $font_family_clock - position = 0, 300 halign = center valign = center @@ -58,28 +59,27 @@ label { # Date color = $text_color font_size = 17 font_family = $font_family - position = 0, 240 halign = center valign = center } -label { # User - monitor = - text =  $USER - color = $text_color - shadow_passes = 1 - shadow_boost = 0.35 - outline_thickness = 2 - dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8 - dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0 - dots_center = true - font_size = 20 - font_family = $font_family - position = 0, 50 - halign = center - valign = bottom -} +# label { # User +# monitor = +# text = $USER +# color = $text_color +# shadow_passes = 1 +# shadow_boost = 0.35 +# outline_thickness = 2 +# dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8 +# dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0 +# dots_center = true +# font_size = 20 +# font_family = $font_family +# position = 0, 50 +# halign = center +# valign = bottom +# } label { # Status monitor = @@ -87,7 +87,6 @@ label { # Status color = $text_color font_size = 14 font_family = $font_family - position = 30, -30 halign = left valign = top diff --git a/config/hypr/hyprlock/status.sh b/config/hypr/hyprlock/status.sh index dd80633..0d4ec2d 100755 --- a/config/hypr/hyprlock/status.sh +++ b/config/hypr/hyprlock/status.sh @@ -26,4 +26,4 @@ if [[ $enable_battery == true ]]; then fi fi -echo '' \ No newline at end of file +echo '' diff --git a/config/hypr/hyprpaper.conf b/config/hypr/hyprpaper.conf index caac433..68bec2a 100644 --- a/config/hypr/hyprpaper.conf +++ b/config/hypr/hyprpaper.conf @@ -1,2 +1,5 @@ -preload = ./in-the-clouds.jpg -wallpaper = , ./in-the-clouds.jpg +wallpaper { + monitor = + path = /opt/backgrounds/orion_nebula_nasa_heic0601a.jpg + fit_mode = cover +} diff --git a/config/hypr/shaders/crt.frag b/config/hypr/shaders/crt.frag index a37ff9f..2a15e05 100644 --- a/config/hypr/shaders/crt.frag +++ b/config/hypr/shaders/crt.frag @@ -1,511 +1,69 @@ -#version 100 -precision highp float; -varying highp vec2 v_texcoord; -varying highp vec3 v_pos; -uniform highp sampler2D tex; -uniform lowp float time; +#version 300 es +precision mediump float; -#define BORDER_COLOR vec4(vec3(0.0, 0.0, 0.0), 1.0) // black border -#define BORDER_RADIUS 1.0 // larger vignette radius -#define BORDER_SIZE 0.01 // small border size -#define CHROMATIC_ABERRATION_STRENGTH 0.00 -#define DENOISE_INTENSITY 0.0001 // -#define DISTORTION_AMOUNT 0.00 // moderate distortion amount -#define HDR_BLOOM 0.75 // bloom intensity -#define HDR_BRIGHTNESS 0.011 // brightness -#define HDR_CONTRAST 0.011 // contrast -#define HDR_SATURATION 1.0// saturation -#define LENS_DISTORTION_AMOUNT 0.0 -#define NOISE_THRESHOLD 0.0001 -#define PHOSPHOR_BLUR_AMOUNT 0.77 // Amount of blur for phosphor glow -#define PHOSPHOR_GLOW_AMOUNT 0.77 // Amount of phosphor glow -#define SAMPLING_RADIUS 0.0001 -#define SCANLINE_FREQUENCY 540.0 -#define SCANLINE_THICKNESS 0.0507 -#define SCANLINE_TIME time * 471.24 -#define SHARPNESS 0.25 -#define SUPERSAMPLING_SAMPLES 16.0 -#define VIGNETTE_RADIUS 0.0 // larger vignette radius -#define PI 3.14159265359 -#define TWOPI 6.28318530718 +in vec2 v_texcoord; +uniform sampler2D tex; +uniform float time; +out vec4 fragColor; -vec2 applyBarrelDistortion(vec2 coord, float amt) { - vec2 p = coord.xy / vec2(1.0); - vec2 v = p * 2.0 - vec2(1.0); - float r = dot(v, v); - float k = 1.0 + pow(r, 2.0) * pow(amt, 2.0); - vec2 result = v * k; - return vec2(0.5, 0.5) + 0.5 * result.xy; -} - -vec4 applyColorCorrection(vec4 color) { - color.rgb *= vec3(1.0, 0.79, 0.89); - return vec4(color.rgb, 1.0); -} - -vec4 applyBorder(vec2 tc, vec4 color, float borderSize, vec4 borderColor) { - float dist_x = min(tc.x, 1.0 - tc.x); - float dist_y = min(tc.y, 1.0 - tc.y); - float dist = min(dist_x, dist_y) * -1.0; - float border = smoothstep(borderSize, 0.0, dist); - border += smoothstep(borderSize, 0.0, dist); - return mix(color, borderColor, border); -} - -vec4 applyFakeHDR(vec4 color, float brightness, float contrast, float saturation, float bloom) { - color.rgb = (color.rgb - vec3(0.5)) * exp2(brightness) + vec3(0.5); - vec3 crtfactor = vec3(1.05, 0.92, 1.0); - color.rgb = pow(color.rgb, crtfactor); - // // NTSC - // vec3 lumCoeff = vec3(0.2125, 0.7154, 0.0721); - - // // BT.709 - // vec3 lumCoeff = vec3(0.299, 0.587, 0.114); - - // BT.2020 - vec3 lumCoeff = vec3(0.2627, 0.6780, 0.0593); - - // // Warm NTSC - // vec3 lumCoeff = vec3(0.2125, 0.7010, 0.0865); - - float luminance = dot(color.rgb, lumCoeff); - luminance = pow(luminance, 2.2); - color.rgb = mix(vec3(luminance), color.rgb, saturation); - color.rgb = mix(color.rgb, vec3(1.0), pow(max(0.0, luminance - 1.0 + bloom), 4.0)); - return color; -} - -vec4 applyVignette(vec4 color) { - vec2 center = vec2(0.5, 0.5); // center of screen - float radius = VIGNETTE_RADIUS; // radius of vignette effect - float softness = 1.0; // softness of vignette effect - float intensity = 0.7; // intensity of vignette effect - vec2 offset = v_texcoord - center; // offset from center of screen - float distance = length(offset); // distance from center of screen - float alpha = smoothstep(radius, radius - radius * softness, distance) * intensity; // calculate alpha value for vignette effect - return mix(vec4(0.0, 0.0, 0.0, alpha), color, alpha); // mix black with color using calculated alpha value -} - -vec4 applyPhosphorGlow(vec2 tc, vec4 color, sampler2D tex) { - // Calculate average color value of the texture - vec4 texelColor = color; - float averageColor = (texelColor.r + texelColor.g + texelColor.b) / 3.0; - - // Determine brightness-dependent color factor - float factor = mix( - mix(0.09, - mix(0.005, 0.0075, (averageColor - 0.1) / 0.1), - step(0.01, averageColor)), 0.0005, - step(0.02, averageColor)); - // Apply phosphor glow effect - vec4 sum = vec4(0.0); - vec4 pixels[9]; - pixels[0] = texture2D(tex, tc - vec2(0.001, 0.001)); - pixels[1] = texture2D(tex, tc - vec2(0.001, 0.0)); - pixels[2] = texture2D(tex, tc - vec2(0.001, -0.001)); - pixels[3] = texture2D(tex, tc - vec2(0.0, 0.001)); - pixels[4] = texture2D(tex, tc); - pixels[5] = texture2D(tex, tc + vec2(0.001, 0.001)); - pixels[6] = texture2D(tex, tc + vec2(0.001, 0.0)); - pixels[7] = texture2D(tex, tc + vec2(0.001, -0.001)); - pixels[8] = texture2D(tex, tc + vec2(0.0, 0.001)); - -// Perform operations on input pixels in parallel - sum = pixels[0] - + pixels[1] - + pixels[2] - + pixels[3] - + pixels[4] - + pixels[5] - + pixels[6] - + pixels[7] - + pixels[8]; - sum /= 9.0; - sum += texture2D(tex, tc - vec2(0.01, 0.01)) * 0.001; - sum += texture2D(tex, tc - vec2(0.0, 0.01)) * 0.001; - sum += texture2D(tex, tc - vec2(-0.01, 0.01)) * 0.001; - sum += texture2D(tex, tc - vec2(0.01, 0.0)) * 0.001; - sum += color * PHOSPHOR_BLUR_AMOUNT; - sum += texture2D(tex, tc - vec2(-0.01, 0.0)) * 0.001; - sum += texture2D(tex, tc - vec2(0.01, -0.01)) * 0.001; - sum += texture2D(tex, tc - vec2(0.0, -0.01)) * 0.001; - sum += texture2D(tex, tc - vec2(-0.01, -0.01)) * 0.001; - sum *= PHOSPHOR_GLOW_AMOUNT; - - // Initialize sum_sum_factor to zero - vec4 sum_sum_factor = vec4(0.0); - // Compute sum_j for i = -1 - vec4 sum_j = vec4(0.0); - sum_j += texture2D(tex, tc + vec2(-1, -1) * 0.01); - sum_j += texture2D(tex, tc + vec2(0, -1) * 0.01); - sum_j += texture2D(tex, tc + vec2(1, -1) * 0.01); - sum_j += texture2D(tex, tc + vec2(-1, 0) * 0.01); - sum_j += texture2D(tex, tc + vec2(0, 0) * 0.01); - sum_j += texture2D(tex, tc + vec2(1, 0) * 0.01); - sum_j += texture2D(tex, tc + vec2(-1, 1) * 0.01); - sum_j += texture2D(tex, tc + vec2(0, 1) * 0.01); - sum_j += texture2D(tex, tc + vec2(1, 1) * 0.01); - sum_sum_factor += sum_j * vec4(0.011); - - // Compute sum_j for i = 0 - sum_j = vec4(0.0); - sum_j += texture2D(tex, tc + vec2(-1, 0) * 0.01); - sum_j += texture2D(tex, tc + vec2(0, 0) * 0.01); - sum_j += texture2D(tex, tc + vec2(1, 0) * 0.01); - sum_j += texture2D(tex, tc + vec2(-1, 1) * 0.01); - sum_j += texture2D(tex, tc + vec2(0, 1) * 0.01); - sum_j += texture2D(tex, tc + vec2(1, 1) * 0.01); - sum_sum_factor += sum_j * vec4(0.011); - - // Compute sum_j for i = 1 - sum_j = vec4(0.0); - sum_j += texture2D(tex, tc + vec2(-1, 0) * 0.01); - sum_j += texture2D(tex, tc + vec2(0, 1) * 0.01); - sum_j += texture2D(tex, tc + vec2(1, 0) * 0.01); - sum_j += texture2D(tex, tc + vec2(-1, 1) * 0.01); - sum_j += texture2D(tex, tc + vec2(0, 1) * 0.01); - sum_j += texture2D(tex, tc + vec2(1, 1) * 0.01); - sum_sum_factor += sum_j * vec4(0.011); - color += mix(sum_sum_factor * sum_sum_factor * vec4(factor), sum, 0.5); - return color; -} - -vec4 applyAdaptiveSharpen(vec2 tc, vec4 color, sampler2D tex) { - vec4 color_tl = texture2D(tex, tc + vec2(-1.0, -1.0) * 0.5 / 2160.0); - vec4 color_tr = texture2D(tex, tc + vec2(1.0, -1.0) * 0.5 / 2160.0); - vec4 color_bl = texture2D(tex, tc + vec2(-1.0, 1.0) * 0.5 / 2160.0); - vec4 color_br = texture2D(tex, tc + vec2(1.0, 1.0) * 0.5 / 2160.0); - float sharpness = SHARPNESS; - vec3 color_no_alpha = color.rgb; - vec3 color_tl_no_alpha = color_tl.rgb; - vec3 color_tr_no_alpha = color_tr.rgb; - vec3 color_bl_no_alpha = color_bl.rgb; - vec3 color_br_no_alpha = color_br.rgb; - float delta = (dot(color_no_alpha, vec3(0.333333)) + dot(color_tl_no_alpha, vec3(0.333333)) + dot(color_tr_no_alpha, vec3(0.333333)) + dot(color_bl_no_alpha, vec3(0.333333)) + dot(color_br_no_alpha, vec3(0.333333))) * 0.2 - dot(color_no_alpha, vec3(0.333333)); - vec3 sharp_color_no_alpha = color_no_alpha + min(vec3(0.0), vec3(delta * sharpness)); - vec4 sharp_color = vec4(sharp_color_no_alpha, color.a); - return sharp_color; -} - -vec4 applyScanlines(vec2 tc, vec4 color) { - float scanline = (cos(tc.y * SCANLINE_FREQUENCY + SCANLINE_TIME) * - sin(tc.y * SCANLINE_FREQUENCY + SCANLINE_TIME)) * SCANLINE_THICKNESS; - float alpha = clamp(1.0 - abs(scanline), 0.0, 1.0); - return vec4(color.rgb * alpha, color.a); -} - -vec4 applyChromaticAberration(vec2 uv, vec4 color) { - vec2 center = vec2(0.5, 0.5); // center of the screen - vec2 offset = (uv - center) * CHROMATIC_ABERRATION_STRENGTH; // calculate the offset from the center - - // apply lens distortion - float rSquared = dot(offset, offset); - float distortion = 1.0 + LENS_DISTORTION_AMOUNT * rSquared; - vec2 distortedOffset = offset * distortion; - - // apply chromatic aberration - vec2 redOffset = vec2(distortedOffset.x * 1.00, distortedOffset.y * 1.00); - vec2 blueOffset = vec2(distortedOffset.x * 1.00, distortedOffset.y * 1.00); - - vec4 redColor = texture2D(tex, uv + redOffset); - vec4 blueColor = texture2D(tex, uv + blueOffset); - - vec4 result = vec4(redColor.r, color.g, blueColor.b, color.a); - - return result; -} - -vec4 reduceGlare(vec4 color) { - // Calculate the intensity of the color by taking the average of the RGB components - float intensity = (color.r + color.g + color.b) / 3.0; - // Set the maximum intensity that can be considered for glare - float maxIntensity = 0.98; - // Use smoothstep to create a smooth transition from no glare to full glare - // based on the intensity of the color and the maximum intensity - float glareIntensity = smoothstep(maxIntensity - 0.02, maxIntensity, intensity); - // Set the amount of glare to apply to the color - float glareAmount = 0.02; - // Mix the original color with the reduced color that has glare applied to it - vec3 reducedColor = mix(color.rgb, vec3(glareIntensity), glareAmount); - // Return the reduced color with the original alpha value - return vec4(reducedColor, color.a); -} - -// Apply a fake HDR effect to the input color. -// Parameters: -// - inputColor: the color to apply the effect to. -// - brightness: the brightness of the image. Should be a value between 0 and 1. -// - contrast: the contrast of the image. Should be a value between 0 and 1. -// - saturation: the saturation of the image. Should be a value between 0 and 2. -// - bloom: the intensity of the bloom effect. Should be a value between 0 and 1. -vec4 applyFakeHDREffect(vec4 inputColor, float brightness, float contrast, float saturation, float bloom) { - const float minBrightness = 0.0; - const float maxBrightness = 1.0; - const float minContrast = 0.0; - const float maxContrast = 1.0; - const float minSaturation = 0.0; - const float maxSaturation = 2.0; - const float minBloom = 0.0; - const float maxBloom = 1.0; - - // Check input parameters for validity - if (brightness < minBrightness || brightness > maxBrightness) { - return vec4(0.0, 0.0, 0.0, 1.0); // Return black with alpha of 1.0 to indicate error - } - if (contrast < minContrast || contrast > maxContrast) { - return vec4(0.0, 0.0, 0.0, 1.0); - } - if (saturation < minSaturation || saturation > maxSaturation) { - return vec4(0.0, 0.0, 0.0, 1.0); - } - if (bloom < minBloom || bloom > maxBloom) { - return vec4(0.0, 0.0, 0.0, 1.0); - } - - // Apply brightness and contrast - vec3 color = inputColor.rgb; - color = (color - vec3(0.5)) * exp2(brightness * 10.0) + vec3(0.5); - color = mix(vec3(0.5), color, pow(contrast * 4.0 + 1.0, 2.0)); - - // // NTSC - // vec3 lumCoeff = vec3(0.2125, 0.7154, 0.0721); - - // // BT.709 - // vec3 lumCoeff = vec3(0.299, 0.587, 0.114); - - // // BT.2020 - // vec3 lumCoeff = vec3(0.2627, 0.6780, 0.0593); - - // Warm NTSC - vec3 lumCoeff = vec3(0.2125, 0.7010, 0.0865); - - // Apply saturation - float luminance = dot(color, lumCoeff); - vec3 grey = vec3(luminance); - color = mix(grey, color, saturation); - - // Apply bloom effect - float threshold = 1.0 - bloom; - vec3 bloomColor = max(color - threshold, vec3(0.0)); - bloomColor = pow(bloomColor, vec3(2.0)); - bloomColor = mix(vec3(0.0), bloomColor, pow(min(luminance, threshold), 4.0)); - color += bloomColor; - - return vec4(color, inputColor.a); -} - -vec4 bilateralFilter(sampler2D tex, vec2 uv, vec4 color, float sampleRadius, float noiseThreshold, float intensity) { - vec4 filteredColor = vec4(0.0); - float totalWeight = 0.0; - - // Top-left pixel - vec4 sample = texture2D(tex, uv + vec2(-1.0, -1.0)); - float dist = length(vec2(-1.0, -1.0)); - float colorDist = length(sample - color); - float weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); - filteredColor += sample * weight; - totalWeight += weight; - - // Top pixel - sample = texture2D(tex, uv + vec2(0.0, -1.0)); - dist = length(vec2(0.0, -1.0)); - colorDist = length(sample - color); - weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); - filteredColor += sample * weight; - totalWeight += weight; - - // Top-right pixel - sample = texture2D(tex, uv + vec2(1.0, -1.0)); - dist = length(vec2(1.0, -1.0)); - colorDist = length(sample - color); - weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); - filteredColor += sample * weight; - totalWeight += weight; - - // Left pixel - sample = texture2D(tex, uv + vec2(-1.0, 0.0)); - dist = length(vec2(-1.0, 0.0)); - colorDist = length(sample - color); - weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); - filteredColor += sample * weight; - totalWeight += weight; - - // Center pixel - sample = texture2D(tex, uv); - dist = 0.0; - colorDist = length(sample - color); - weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); - filteredColor += sample * weight; - totalWeight += weight; - - // Right pixel - sample = texture2D(tex, uv + vec2(1.0, 0.0)); - dist = length(vec2(1.0, 0.0)); - colorDist = length(sample - color); - weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); - filteredColor += sample * weight; - totalWeight += weight; - - // Bottom-left pixel - sample = texture2D(tex, uv + vec2(-1.0, 1.0)); - dist = length(vec2(-1.0, 1.0)); - colorDist = length(sample - color); - weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); - filteredColor += sample * weight; - totalWeight += weight; - -// Bottom pixel - sample = texture2D(tex, uv + vec2(0.0, sampleRadius)); - dist = length(vec2(0.0, sampleRadius)); - colorDist = length(sample - color); - weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); - filteredColor += sample * weight; - totalWeight += weight; - - filteredColor /= totalWeight; - return mix(color, filteredColor, step(noiseThreshold, length(filteredColor - color))); -} - -vec4 supersample(sampler2D tex, vec2 uv, float sampleRadius, float noiseThreshold, float intensity) { - float radiusSq = sampleRadius * sampleRadius; - vec2 poissonDisk; - vec4 color = vec4(0.0); - - float r1_0 = sqrt(0.0 / 16.0); - float r2_0 = fract(1.0 / 3.0); - float theta_0 = TWOPI * r2_0; - poissonDisk = vec2(r1_0 * cos(theta_0), r1_0 * sin(theta_0)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_1 = sqrt(1.0 / 16.0); - float r2_1 = fract(2.0 / 3.0); - float theta_1 = TWOPI * r2_1; - poissonDisk = vec2(r1_1 * cos(theta_1), r1_1 * sin(theta_1)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_2 = sqrt(2.0 / 16.0); - float r2_2 = fract(3.0 / 3.0); - float theta_2 = TWOPI * r2_2; - poissonDisk = vec2(r1_2 * cos(theta_2), r1_2 * sin(theta_2)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_3 = sqrt(3.0 / 16.0); - float r2_3 = fract(4.0 / 3.0); - float theta_3 = TWOPI * r2_3; - poissonDisk = vec2(r1_3 * cos(theta_3), r1_3 * sin(theta_3)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_4 = sqrt(4.0 / 16.0); - float r2_4 = fract(5.0 / 3.0); - float theta_4 = TWOPI * r2_4; - poissonDisk = vec2(r1_4 * cos(theta_4), r1_4 * sin(theta_4)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_5 = sqrt(5.0 / 16.0); - float r2_5 = fract(6.0 / 3.0); - float theta_5 = TWOPI * r2_5; - poissonDisk = vec2(r1_5 * cos(theta_5), r1_5 * sin(theta_5)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_6 = sqrt(6.0 / 16.0); - float r2_6 = fract(7.0 / 3.0); - float theta_6 = TWOPI * r2_6; - poissonDisk = vec2(r1_6 * cos(theta_6), r1_6 * sin(theta_6)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_7 = sqrt(7.0 / 16.0); - float r2_7 = fract(8.0 / 3.0); - float theta_7 = TWOPI * r2_7; - poissonDisk = vec2(r1_7 * cos(theta_7), r1_7 * sin(theta_7)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_8 = sqrt(8.0 / 16.0); - float r2_8 = fract(9.0 / 3.0); - float theta_8 = TWOPI * r2_8; - poissonDisk = vec2(r1_8 * cos(theta_8), r1_8 * sin(theta_8)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_9 = sqrt(9.0 / 16.0); - float r2_9 = fract(10.0 / 3.0); - float theta_9 = TWOPI * r2_9; - poissonDisk = vec2(r1_9 * cos(theta_9), r1_9 * sin(theta_9)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_10 = sqrt(10.0 / 16.0); - float r2_10 = fract(11.0 / 3.0); - float theta_10 = TWOPI * r2_10; - poissonDisk = vec2(r1_10 * cos(theta_10), r1_10 * sin(theta_10)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_11 = sqrt(11.0 / 16.0); - float r2_11 = fract(12.0 / 3.0); - float theta_11 = TWOPI * r2_11; - poissonDisk = vec2(r1_11 * cos(theta_11), r1_11 * sin(theta_11)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_12 = sqrt(12.0 / 16.0); - float r2_12 = fract(13.0 / 3.0); - float theta_12 = TWOPI * r2_12; - poissonDisk = vec2(r1_12 * cos(theta_12), r1_12 * sin(theta_12)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_13 = sqrt(13.0 / 16.0); - float r2_13 = fract(14.0 / 3.0); - float theta_13 = TWOPI * r2_13; - poissonDisk = vec2(r1_13 * cos(theta_13), r1_13 * sin(theta_13)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_14 = sqrt(14.0 / 16.0); - float r2_14 = fract(15.0 / 3.0); - float theta_14 = TWOPI * r2_14; - poissonDisk = vec2(r1_14 * cos(theta_14), r1_14 * sin(theta_14)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_15 = sqrt(15.0 / 16.0); - float r2_15 = fract(16.0 / 3.0); - float theta_15 = TWOPI * r2_15; - poissonDisk = vec2(r1_15 * cos(theta_15), r1_15 * sin(theta_15)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - return bilateralFilter(tex, uv, color, sampleRadius, noiseThreshold, intensity); -} void main() { - vec2 tc_no_dist = v_texcoord; - - vec2 tc = applyBarrelDistortion(tc_no_dist, DISTORTION_AMOUNT); - - // [-1, 1] - vec2 tc_no_dist_symmetric = tc_no_dist * 2.0 - 1.0; - - // [0,1] - vec2 tc_no_dist_normalized = (tc_no_dist_symmetric + 1.0) / 2.0; - - // vec4 color = texture2D(tex, tc); - vec4 color = supersample(tex, tc, SAMPLING_RADIUS, NOISE_THRESHOLD, DENOISE_INTENSITY); - - color = applyAdaptiveSharpen(tc, color, tex); - - color = applyPhosphorGlow(tc, color, tex); - - color = reduceGlare(color); - - color = mix(applyFakeHDREffect(color, HDR_BRIGHTNESS, HDR_CONTRAST, HDR_SATURATION, HDR_BLOOM), color, 0.5); - - color = applyColorCorrection(color); - - color /= SUPERSAMPLING_SAMPLES; - - color = mix(applyChromaticAberration(tc, color), color, 0.25); - - color = mix(color, applyVignette(color), 0.37); - - color = applyBorder(tc_no_dist_normalized, color, 1.0 - BORDER_SIZE * BORDER_RADIUS, BORDER_COLOR); - - color = mix(applyBorder(tc, color, BORDER_SIZE, BORDER_COLOR), color, 0.05); - - color = applyScanlines(tc, color); - - gl_FragColor = color; - gl_FragColor.a = 1.0; + vec2 tc = vec2(v_texcoord.x, v_texcoord.y); + + // Distance from the center + float dx = abs(0.5 - tc.x); + float dy = abs(0.5 - tc.y); + + // Square it to smooth the edges + dx *= dx; + dy *= dy; + + tc.x -= 0.5; + tc.x *= 1.0 + (dy * 0.03); + tc.x += 0.5; + + tc.y -= 0.5; + tc.y *= 1.0 + (dx * 0.03); + tc.y += 0.5; + + // Add RGB offset for retro color separation effect + vec2 r_tc = tc + vec2(0.0001, 0.001); + vec2 g_tc = tc; + vec2 b_tc = tc - vec2(0.0001, 0.001); + + vec4 color; + color.r = texture(tex, r_tc).r; + color.g = texture(tex, g_tc).g; + color.b = texture(tex, b_tc).b; + color.a = 1.0; + + // Add scanlines + float scanline = sin(tc.y * 2000.0) * 0.02; + color.rgb += scanline; + + // Add noise + float noise = (fract(sin(dot(tc.xy, vec2(12.9898, 78.233))) * 43758.5453) - 0.5) * 0.04; + color.rgb += noise; + + // Apply vignette effect + float vignette = smoothstep(0.8, 0.2, dx + dy); + color.rgb *= vignette; + + // Vertical CRT lines with reduced intensity + float lines = sin(tc.y * 40.0) * 0.02; + color.rgb *= 1.0 - lines; + + // Apply retro orange color transformation + vec3 retroColor = vec3( + color.r * 1.0, // Boost the red channel + color.g * 1.0, // Keep the green channel as is + color.b * 1.0 // Reduce the blue channel + ); + color.rgb = retroColor; + + // Cutoff + if (tc.y > 1.0 || tc.x < 0.0 || tc.x > 1.0 || tc.y < 0.0) + color = vec4(0.0); + + // Apply + fragColor = color; } - diff --git a/config/ironbar/config.toml b/config/ironbar/config.toml index 3b98eac..4dc4b7e 100644 --- a/config/ironbar/config.toml +++ b/config/ironbar/config.toml @@ -23,6 +23,7 @@ format_popup = "%m/%d/%Y %-r" [[end]] type = "music" +truncate = { mode = "end", max_length = 50 } [[end]] type = "volume" diff --git a/config/ironbar/style.css b/config/ironbar/style.css index db5ba70..90fa7f2 100644 --- a/config/ironbar/style.css +++ b/config/ironbar/style.css @@ -120,7 +120,7 @@ button:hover, button:active { } .workspaces .item.urgent { - background-color: var(--color-urgent); + /* background-color: var(--color-urgent); */ } button > .background, button contents { -- 2.54.0