moved to @autumn.bsky.gay/dots
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Initial commit (again)

Amazingca bf0c1d75

+1646
+60
README.md
··· 1 + ## Autumn's Dotfiles 2 + 3 + This repository hosts my configuration files for use with Hyprland/COSMIC. 4 + 5 + ### Required Packages 6 + 7 + - [ ] Hyprland 8 + - [x] Hyprpaper *[wallpaper utility]* 9 + - [x] Hyprlock *[for lock screen]* 10 + - [x] Ironbar *[composable menu that provides additional information within the environment]* 11 + - [ ] COSMIC *[alternative to Hyprland that includes better OOTB support]* 12 + 13 + 14 + ### Optional Packages 15 + (These are used by default within `hyprland.conf` but are not necessary to the overall theme) 16 + 17 + - [ ] nautilus *[GNOME file manager]* 18 + - [ ] helix *[terminal editor]* 19 + - [ ] zen *[Web browser]* 20 + - [ ] discord *[online communication platform]* 21 + - [ ] stoat *[open-source communication platform]* 22 + - [ ] minecraft *[it's a sandbox game]* 23 + - [ ] hyprshot *[screenshot utility]* 24 + 25 + ### Credits 26 + 27 + Most of these configurations are mixed-and-matched from various other dotfiles. Here's a brief synopsis of where I adapted them: 28 + 29 + [end-4 -- illogical-impulse](https://github.com/end-4/dots-hyprland) 30 + - Hyprlock configurations 31 + 32 + [d00m1k -- SimpleBlueColorWaybar](https://github.com/d00m1k/SimpleBlueColorWaybar) 33 + - Waybar configurations 34 + 35 + **Discord** (check Disclaimer) 36 + - Wallpaper (from Direct Message backgrounds) 37 + 38 + ### My Modifications 39 + 40 + I made some minor adjustments to the Waybar config files: 41 + 42 + - Moved the bar to the top 43 + - Moved the window name to the immediate right of the workspaces bar, with minor padding 44 + - Localized the date and time to U.S. and moved it to the middle to align with Gnome's bar styling 45 + - Adjusted the naming conventions for processes and memory utilization 46 + - Removed battery levels and other settings that weren't viable since this configuration was meant for a desktop setting 47 + 48 + ### Additional notes 49 + 50 + I haven't adjusted the colors besides from the original defaults that end-4 auto-generated from the desktop background. In time, I'll likely adjust these settings. 51 + 52 + In addition, it is likely that there are some required packages that I missed, and will update this repository accordingly if/when I determine them. Since the adaptations I made were built on top of previously installed packages — of which there were many — it's possible that I've missed some. 53 + 54 + ### Installation 55 + 56 + You should be able to install most of these files directly by copying them over to the `~/` folder. Assuming that all required packages are installed and optional packages have been adjusted where needed, it should run without issue. 57 + 58 + #### Disclaimer 59 + 60 + Permission was *not* given by Discord when uploading the wallpaper. I can no longer locate the URL I retrieved the image from, so please use at your own risk.
+7
config/helix/config.toml
··· 1 + theme = "autumn" 2 + 3 + [editor] 4 + true-color = true 5 + 6 + [editor.soft-wrap] 7 + enable = true
+319
config/hypr/hyprland.conf
··· 1 + 2 + # ####################################################################################### 3 + # AUTOGENERATED HYPRLAND CONFIG. 4 + # PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hyprland.conf AND EDIT IT, 5 + # OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS. 6 + # ####################################################################################### 7 + 8 + autogenerated = 0 # remove this line to remove the warning 9 + 10 + # This is an example Hyprland config file. 11 + # Refer to the wiki for more information. 12 + # https://wiki.hyprland.org/Configuring/ 13 + 14 + # Please note not all available settings / options are set here. 15 + # For a full list, see the wiki 16 + 17 + # You can split this configuration into multiple files 18 + # Create your files separately and then link them to this file like this: 19 + # source = ~/.config/hypr/myColors.conf 20 + 21 + 22 + ################ 23 + ### MONITORS ### 24 + ################ 25 + 26 + # See https://wiki.hyprland.org/Configuring/Monitors/ 27 + monitor=,preferred,auto,auto 28 + 29 + 30 + ################### 31 + ### MY PROGRAMS ### 32 + ################### 33 + 34 + # See https://wiki.hyprland.org/Configuring/Keywords/ 35 + 36 + # Set programs that you use 37 + $terminal = kgx 38 + $fileManager = nautilus 39 + $menu = wofi --show drun 40 + 41 + 42 + ################# 43 + ### AUTOSTART ### 44 + ################# 45 + 46 + # Autostart necessary processes (like notifications daemons, status bars, etc.) 47 + # Or execute your favorite apps at launch like this: 48 + 49 + # exec-once = $terminal 50 + # exec-once = nm-applet & 51 + exec-once = waybar & hyprpaper # hyprpanel & hyprpaper # waybar & hyprpaper 52 + 53 + 54 + ############################# 55 + ### ENVIRONMENT VARIABLES ### 56 + ############################# 57 + 58 + # See https://wiki.hyprland.org/Configuring/Environment-variables/ 59 + 60 + env = XCURSOR_SIZE,24 61 + env = HYPRCURSOR_SIZE,24 62 + 63 + 64 + ################### 65 + ### PERMISSIONS ### 66 + ################### 67 + 68 + # See https://wiki.hyprland.org/Configuring/Permissions/ 69 + # Please note permission changes here require a Hyprland restart and are not applied on-the-fly 70 + # for security reasons 71 + 72 + # ecosystem { 73 + # enforce_permissions = 1 74 + # } 75 + 76 + # permission = /usr/(bin|local/bin)/grim, screencopy, allow 77 + # permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow 78 + # permission = /usr/(bin|local/bin)/hyprpm, plugin, allow 79 + 80 + 81 + ##################### 82 + ### LOOK AND FEEL ### 83 + ##################### 84 + 85 + # Refer to https://wiki.hyprland.org/Configuring/Variables/ 86 + 87 + # https://wiki.hyprland.org/Configuring/Variables/#general 88 + general { 89 + gaps_in = 5 90 + gaps_out = 10 91 + 92 + border_size = 2 93 + 94 + # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors 95 + col.active_border = rgba(F7DCDE39) 96 + col.inactive_border = rgba(A58A8D30) 97 + 98 + # Set to true enable resizing windows by clicking and dragging on borders and gaps 99 + resize_on_border = true 100 + 101 + # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on 102 + allow_tearing = false 103 + 104 + layout = dwindle 105 + } 106 + 107 + # https://wiki.hyprland.org/Configuring/Variables/#decoration 108 + decoration { 109 + rounding = 10 110 + rounding_power = 2 111 + 112 + # Change transparency of focused and unfocused windows 113 + active_opacity = 1.0 114 + inactive_opacity = 1.0 115 + 116 + shadow { 117 + enabled = true 118 + range = 4 119 + render_power = 3 120 + color = rgba(1a1a1aee) 121 + } 122 + 123 + # https://wiki.hyprland.org/Configuring/Variables/#blur 124 + blur { 125 + enabled = true 126 + size = 3 127 + passes = 1 128 + 129 + vibrancy = 0.1696 130 + } 131 + } 132 + 133 + # https://wiki.hyprland.org/Configuring/Variables/#animations 134 + animations { 135 + enabled = yes, please :) 136 + 137 + # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more 138 + 139 + bezier = easeOutQuint,0.23,1,0.32,1 140 + bezier = easeInOutCubic,0.65,0.05,0.36,1 141 + bezier = linear,0,0,1,1 142 + bezier = almostLinear,0.5,0.5,0.75,1.0 143 + bezier = quick,0.15,0,0.1,1 144 + 145 + animation = global, 1, 10, default 146 + animation = border, 1, 5.39, easeOutQuint 147 + animation = windows, 1, 4.79, easeOutQuint 148 + animation = windowsIn, 1, 4.1, easeOutQuint, popin 87% 149 + animation = windowsOut, 1, 1.49, linear, popin 87% 150 + animation = fadeIn, 1, 1.73, almostLinear 151 + animation = fadeOut, 1, 1.46, almostLinear 152 + animation = fade, 1, 3.03, quick 153 + animation = layers, 1, 3.81, easeOutQuint 154 + animation = layersIn, 1, 4, easeOutQuint, fade 155 + animation = layersOut, 1, 1.5, linear, fade 156 + animation = fadeLayersIn, 1, 1.79, almostLinear 157 + animation = fadeLayersOut, 1, 1.39, almostLinear 158 + animation = workspaces, 1, 1.94, almostLinear, fade 159 + animation = workspacesIn, 1, 1.21, almostLinear, fade 160 + animation = workspacesOut, 1, 1.94, almostLinear, fade 161 + } 162 + 163 + # Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/ 164 + # "Smart gaps" / "No gaps when only" 165 + # uncomment all if you wish to use that. 166 + # workspace = w[tv1], gapsout:0, gapsin:0 167 + # workspace = f[1], gapsout:0, gapsin:0 168 + # windowrule = bordersize 0, floating:0, onworkspace:w[tv1] 169 + # windowrule = rounding 0, floating:0, onworkspace:w[tv1] 170 + # windowrule = bordersize 0, floating:0, onworkspace:f[1] 171 + # windowrule = rounding 0, floating:0, onworkspace:f[1] 172 + 173 + # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more 174 + dwindle { 175 + pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below 176 + preserve_split = true # You probably want this 177 + } 178 + 179 + # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more 180 + master { 181 + new_status = master 182 + } 183 + 184 + # https://wiki.hyprland.org/Configuring/Variables/#misc 185 + misc { 186 + force_default_wallpaper = 1 # Set to 0 or 1 to disable the anime mascot wallpapers 187 + disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :( 188 + } 189 + 190 + 191 + ############# 192 + ### INPUT ### 193 + ############# 194 + 195 + # https://wiki.hyprland.org/Configuring/Variables/#input 196 + input { 197 + kb_layout = us 198 + kb_variant = 199 + kb_model = 200 + kb_options = 201 + kb_rules = 202 + 203 + follow_mouse = 1 204 + 205 + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. 206 + 207 + touchpad { 208 + natural_scroll = false 209 + } 210 + } 211 + 212 + # https://wiki.hyprland.org/Configuring/Variables/#gestures 213 + gestures { 214 + workspace_swipe = false 215 + } 216 + 217 + # Example per-device config 218 + # See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more 219 + device { 220 + name = epic-mouse-v1 221 + sensitivity = -0.5 222 + } 223 + 224 + 225 + ################### 226 + ### KEYBINDINGS ### 227 + ################### 228 + 229 + # See https://wiki.hyprland.org/Configuring/Keywords/ 230 + $mainMod = SUPER # Sets "Windows" key as main modifier 231 + 232 + # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more 233 + bind = $mainMod, T, exec, $terminal 234 + bind = $mainMod, Q, killactive, 235 + bind = $mainMod, Z, exec, zen 236 + bind = $mainMod, D, exec, discord 237 + bind = $mainMod, M, exec, minecraft-launcher 238 + bind = $mainMod, L, exec, hyprlock 239 + bind = Ctrl+Alt, Backspace, exit, 240 + bind = Ctrl+SHIFT+Alt, Backspace, exec, poweroff 241 + bind = $mainMod SHIFT, S, exec, hyprshot -zm region -o ~/Pictures/Screenshots 242 + bind = $mainMod, S, exec, steam 243 + bind = $mainMod, E, exec, $fileManager 244 + bind = $mainMod, V, togglefloating, 245 + bind = $mainMod, R, exec, revolt 246 + bind = $mainMod, P, pseudo, # dwindle 247 + bind = $mainMod, J, togglesplit, # dwindle 248 + 249 + # Move focus with mainMod + arrow keys 250 + bind = $mainMod, left, movefocus, l 251 + bind = $mainMod, right, movefocus, r 252 + bind = $mainMod, up, movefocus, u 253 + bind = $mainMod, down, movefocus, d 254 + 255 + # Switch workspaces with mainMod + [0-9] 256 + bind = $mainMod, 1, workspace, 1 257 + bind = $mainMod, 2, workspace, 2 258 + bind = $mainMod, 3, workspace, 3 259 + bind = $mainMod, 4, workspace, 4 260 + bind = $mainMod, 5, workspace, 5 261 + bind = $mainMod, 6, workspace, 6 262 + bind = $mainMod, 7, workspace, 7 263 + bind = $mainMod, 8, workspace, 8 264 + bind = $mainMod, 9, workspace, 9 265 + bind = $mainMod, 0, workspace, 10 266 + 267 + # Move active window to a workspace with mainMod + SHIFT + [0-9] 268 + bind = $mainMod SHIFT, 1, movetoworkspace, 1 269 + bind = $mainMod SHIFT, 2, movetoworkspace, 2 270 + bind = $mainMod SHIFT, 3, movetoworkspace, 3 271 + bind = $mainMod SHIFT, 4, movetoworkspace, 4 272 + bind = $mainMod SHIFT, 5, movetoworkspace, 5 273 + bind = $mainMod SHIFT, 6, movetoworkspace, 6 274 + bind = $mainMod SHIFT, 7, movetoworkspace, 7 275 + bind = $mainMod SHIFT, 8, movetoworkspace, 8 276 + bind = $mainMod SHIFT, 9, movetoworkspace, 9 277 + bind = $mainMod SHIFT, 0, movetoworkspace, 10 278 + 279 + # Example special workspace (scratchpad) 280 + # bind = $mainMod, S, togglespecialworkspace, magic 281 + # bind = $mainMod SHIFT, S, movetoworkspace, special:magic 282 + 283 + # Scroll through existing workspaces with mainMod + scroll 284 + bind = $mainMod, mouse_down, workspace, e+1 285 + bind = $mainMod, mouse_up, workspace, e-1 286 + 287 + # Move/resize windows with mainMod + LMB/RMB and dragging 288 + bindm = $mainMod, mouse:272, movewindow 289 + bindm = $mainMod, mouse:273, resizewindow 290 + 291 + # Laptop multimedia keys for volume and LCD brightness 292 + bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ 293 + bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- 294 + bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle 295 + bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle 296 + bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+ 297 + bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%- 298 + 299 + # Requires playerctl 300 + bindl = , XF86AudioNext, exec, playerctl next 301 + bindl = , XF86AudioPause, exec, playerctl play-pause 302 + bindl = , XF86AudioPlay, exec, playerctl play-pause 303 + bindl = , XF86AudioPrev, exec, playerctl previous 304 + 305 + ############################## 306 + ### WINDOWS AND WORKSPACES ### 307 + ############################## 308 + 309 + # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more 310 + # See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules 311 + 312 + # Example windowrule 313 + # windowrule = float,class:^(kitty)$,title:^(kitty)$ 314 + 315 + # Ignore maximize requests from apps. You'll probably like this. 316 + windowrule = suppressevent maximize, class:.* 317 + 318 + # Fix some dragging issues with XWayland 319 + windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
+94
config/hypr/hyprlock.conf
··· 1 + $text_color = rgba(E7DEFFFF) 2 + $entry_background_color = rgba(1E006011) 3 + $entry_border_color = rgba(938E9F55) 4 + $entry_color = rgba(E7DEFFFF) 5 + $font_family = Rubik Light 6 + $font_family_clock = Rubik Light 7 + $font_material_symbols = Material Symbols Rounded 8 + 9 + background { 10 + color = rgba(181818FF) 11 + # path = {{ SWWW_WALL }} 12 + 13 + # path = screenshot 14 + # blur_size = 15 15 + # blur_passes = 4 16 + } 17 + input-field { 18 + monitor = 19 + size = 250, 50 20 + outline_thickness = 2 21 + dots_size = 0.1 22 + dots_spacing = 0.3 23 + outer_color = $entry_border_color 24 + inner_color = $entry_background_color 25 + font_color = $entry_color 26 + fade_on_empty = true 27 + 28 + position = 0, 20 29 + halign = center 30 + valign = center 31 + } 32 + 33 + label { # Caps Lock Warning 34 + monitor = 35 + text = cmd[update:250] ${XDG_CONFIG_HOME:-$HOME/.config}/hypr/hyprlock/check-capslock.sh 36 + color = $text_color 37 + font_size = 13 38 + font_family = $font_family 39 + position = 0, -25 40 + halign = center 41 + valign = center 42 + } 43 + 44 + label { # Clock 45 + monitor = 46 + text = $TIME12 47 + color = $text_color 48 + font_size = 65 49 + font_family = $font_family_clock 50 + 51 + position = 0, 300 52 + halign = center 53 + valign = center 54 + } 55 + label { # Date 56 + monitor = 57 + text = cmd[update:5000] date +"%A, %B %d" 58 + color = $text_color 59 + font_size = 17 60 + font_family = $font_family 61 + 62 + position = 0, 240 63 + halign = center 64 + valign = center 65 + } 66 + 67 + label { # User 68 + monitor = 69 + text =  $USER 70 + color = $text_color 71 + shadow_passes = 1 72 + shadow_boost = 0.35 73 + outline_thickness = 2 74 + dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8 75 + dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0 76 + dots_center = true 77 + font_size = 20 78 + font_family = $font_family 79 + position = 0, 50 80 + halign = center 81 + valign = bottom 82 + } 83 + 84 + label { # Status 85 + monitor = 86 + text = cmd[update:5000] ${XDG_CONFIG_HOME:-$HOME/.config}/hypr/hyprlock/status.sh 87 + color = $text_color 88 + font_size = 14 89 + font_family = $font_family 90 + 91 + position = 30, -30 92 + halign = left 93 + valign = top 94 + }
+9
config/hypr/hyprlock/check-capslock.sh
··· 1 + #!/bin/env bash 2 + 3 + MAIN_KB_CAPS=$(hyprctl devices | grep -B 6 "main: yes" | grep "capsLock" | head -1 | awk '{print $2}') 4 + 5 + if [ "$MAIN_KB_CAPS" = "yes" ]; then 6 + echo "Caps Lock active" 7 + else 8 + echo "" 9 + fi
+29
config/hypr/hyprlock/status.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + ############ Variables ############ 4 + enable_battery=false 5 + battery_charging=false 6 + 7 + ####### Check availability ######## 8 + for battery in /sys/class/power_supply/*BAT*; do 9 + if [[ -f "$battery/uevent" ]]; then 10 + enable_battery=true 11 + if [[ $(cat /sys/class/power_supply/*/status | head -1) == "Charging" ]]; then 12 + battery_charging=true 13 + fi 14 + break 15 + fi 16 + done 17 + 18 + ############# Output ############# 19 + if [[ $enable_battery == true ]]; then 20 + if [[ $battery_charging == true ]]; then 21 + echo -n "(+) " 22 + fi 23 + echo -n "$(cat /sys/class/power_supply/*/capacity | head -1)"% 24 + if [[ $battery_charging == false ]]; then 25 + echo -n " remaining" 26 + fi 27 + fi 28 + 29 + echo ''
+2
config/hypr/hyprpaper.conf
··· 1 + preload = ./in-the-clouds.jpg 2 + wallpaper = , ./in-the-clouds.jpg
+12
config/hypr/hyprsunset.conf
··· 1 + max-gamma = 150 2 + 3 + profile { 4 + time = 7:30 5 + identity = true 6 + } 7 + 8 + profile { 9 + time = 23:00 10 + temperature = 5500 11 + gamma = 0.8 12 + }
config/hypr/in-the-clouds.jpg

This is a binary file and will not be displayed.

+24
config/hypr/shaders/chromatic_abberation.frag
··· 1 + // vim: set ft=glsl: 2 + 3 + precision highp float; 4 + varying highp vec2 v_texcoord; 5 + uniform highp sampler2D tex; 6 + 7 + #define STRENGTH 0.0027 8 + 9 + void main() { 10 + vec2 center = vec2(0.5, 0.5); 11 + vec2 offset = (v_texcoord - center) * STRENGTH; 12 + 13 + float rSquared = dot(offset, offset); 14 + float distortion = 1.0 + 1.0 * rSquared; 15 + vec2 distortedOffset = offset * distortion; 16 + 17 + vec2 redOffset = vec2(distortedOffset.x, distortedOffset.y); 18 + vec2 blueOffset = vec2(distortedOffset.x, distortedOffset.y); 19 + 20 + vec4 redColor = texture2D(tex, v_texcoord + redOffset); 21 + vec4 blueColor = texture2D(tex, v_texcoord + blueOffset); 22 + 23 + gl_FragColor = vec4(redColor.r, texture2D(tex, v_texcoord).g, blueColor.b, 1.0); 24 + }
+511
config/hypr/shaders/crt.frag
··· 1 + #version 100 2 + precision highp float; 3 + varying highp vec2 v_texcoord; 4 + varying highp vec3 v_pos; 5 + uniform highp sampler2D tex; 6 + uniform lowp float time; 7 + 8 + #define BORDER_COLOR vec4(vec3(0.0, 0.0, 0.0), 1.0) // black border 9 + #define BORDER_RADIUS 1.0 // larger vignette radius 10 + #define BORDER_SIZE 0.01 // small border size 11 + #define CHROMATIC_ABERRATION_STRENGTH 0.00 12 + #define DENOISE_INTENSITY 0.0001 // 13 + #define DISTORTION_AMOUNT 0.00 // moderate distortion amount 14 + #define HDR_BLOOM 0.75 // bloom intensity 15 + #define HDR_BRIGHTNESS 0.011 // brightness 16 + #define HDR_CONTRAST 0.011 // contrast 17 + #define HDR_SATURATION 1.0// saturation 18 + #define LENS_DISTORTION_AMOUNT 0.0 19 + #define NOISE_THRESHOLD 0.0001 20 + #define PHOSPHOR_BLUR_AMOUNT 0.77 // Amount of blur for phosphor glow 21 + #define PHOSPHOR_GLOW_AMOUNT 0.77 // Amount of phosphor glow 22 + #define SAMPLING_RADIUS 0.0001 23 + #define SCANLINE_FREQUENCY 540.0 24 + #define SCANLINE_THICKNESS 0.0507 25 + #define SCANLINE_TIME time * 471.24 26 + #define SHARPNESS 0.25 27 + #define SUPERSAMPLING_SAMPLES 16.0 28 + #define VIGNETTE_RADIUS 0.0 // larger vignette radius 29 + #define PI 3.14159265359 30 + #define TWOPI 6.28318530718 31 + 32 + vec2 applyBarrelDistortion(vec2 coord, float amt) { 33 + vec2 p = coord.xy / vec2(1.0); 34 + vec2 v = p * 2.0 - vec2(1.0); 35 + float r = dot(v, v); 36 + float k = 1.0 + pow(r, 2.0) * pow(amt, 2.0); 37 + vec2 result = v * k; 38 + return vec2(0.5, 0.5) + 0.5 * result.xy; 39 + } 40 + 41 + vec4 applyColorCorrection(vec4 color) { 42 + color.rgb *= vec3(1.0, 0.79, 0.89); 43 + return vec4(color.rgb, 1.0); 44 + } 45 + 46 + vec4 applyBorder(vec2 tc, vec4 color, float borderSize, vec4 borderColor) { 47 + float dist_x = min(tc.x, 1.0 - tc.x); 48 + float dist_y = min(tc.y, 1.0 - tc.y); 49 + float dist = min(dist_x, dist_y) * -1.0; 50 + float border = smoothstep(borderSize, 0.0, dist); 51 + border += smoothstep(borderSize, 0.0, dist); 52 + return mix(color, borderColor, border); 53 + } 54 + 55 + vec4 applyFakeHDR(vec4 color, float brightness, float contrast, float saturation, float bloom) { 56 + color.rgb = (color.rgb - vec3(0.5)) * exp2(brightness) + vec3(0.5); 57 + vec3 crtfactor = vec3(1.05, 0.92, 1.0); 58 + color.rgb = pow(color.rgb, crtfactor); 59 + // // NTSC 60 + // vec3 lumCoeff = vec3(0.2125, 0.7154, 0.0721); 61 + 62 + // // BT.709 63 + // vec3 lumCoeff = vec3(0.299, 0.587, 0.114); 64 + 65 + // BT.2020 66 + vec3 lumCoeff = vec3(0.2627, 0.6780, 0.0593); 67 + 68 + // // Warm NTSC 69 + // vec3 lumCoeff = vec3(0.2125, 0.7010, 0.0865); 70 + 71 + float luminance = dot(color.rgb, lumCoeff); 72 + luminance = pow(luminance, 2.2); 73 + color.rgb = mix(vec3(luminance), color.rgb, saturation); 74 + color.rgb = mix(color.rgb, vec3(1.0), pow(max(0.0, luminance - 1.0 + bloom), 4.0)); 75 + return color; 76 + } 77 + 78 + vec4 applyVignette(vec4 color) { 79 + vec2 center = vec2(0.5, 0.5); // center of screen 80 + float radius = VIGNETTE_RADIUS; // radius of vignette effect 81 + float softness = 1.0; // softness of vignette effect 82 + float intensity = 0.7; // intensity of vignette effect 83 + vec2 offset = v_texcoord - center; // offset from center of screen 84 + float distance = length(offset); // distance from center of screen 85 + float alpha = smoothstep(radius, radius - radius * softness, distance) * intensity; // calculate alpha value for vignette effect 86 + return mix(vec4(0.0, 0.0, 0.0, alpha), color, alpha); // mix black with color using calculated alpha value 87 + } 88 + 89 + vec4 applyPhosphorGlow(vec2 tc, vec4 color, sampler2D tex) { 90 + // Calculate average color value of the texture 91 + vec4 texelColor = color; 92 + float averageColor = (texelColor.r + texelColor.g + texelColor.b) / 3.0; 93 + 94 + // Determine brightness-dependent color factor 95 + float factor = mix( 96 + mix(0.09, 97 + mix(0.005, 0.0075, (averageColor - 0.1) / 0.1), 98 + step(0.01, averageColor)), 0.0005, 99 + step(0.02, averageColor)); 100 + // Apply phosphor glow effect 101 + vec4 sum = vec4(0.0); 102 + vec4 pixels[9]; 103 + pixels[0] = texture2D(tex, tc - vec2(0.001, 0.001)); 104 + pixels[1] = texture2D(tex, tc - vec2(0.001, 0.0)); 105 + pixels[2] = texture2D(tex, tc - vec2(0.001, -0.001)); 106 + pixels[3] = texture2D(tex, tc - vec2(0.0, 0.001)); 107 + pixels[4] = texture2D(tex, tc); 108 + pixels[5] = texture2D(tex, tc + vec2(0.001, 0.001)); 109 + pixels[6] = texture2D(tex, tc + vec2(0.001, 0.0)); 110 + pixels[7] = texture2D(tex, tc + vec2(0.001, -0.001)); 111 + pixels[8] = texture2D(tex, tc + vec2(0.0, 0.001)); 112 + 113 + // Perform operations on input pixels in parallel 114 + sum = pixels[0] 115 + + pixels[1] 116 + + pixels[2] 117 + + pixels[3] 118 + + pixels[4] 119 + + pixels[5] 120 + + pixels[6] 121 + + pixels[7] 122 + + pixels[8]; 123 + sum /= 9.0; 124 + sum += texture2D(tex, tc - vec2(0.01, 0.01)) * 0.001; 125 + sum += texture2D(tex, tc - vec2(0.0, 0.01)) * 0.001; 126 + sum += texture2D(tex, tc - vec2(-0.01, 0.01)) * 0.001; 127 + sum += texture2D(tex, tc - vec2(0.01, 0.0)) * 0.001; 128 + sum += color * PHOSPHOR_BLUR_AMOUNT; 129 + sum += texture2D(tex, tc - vec2(-0.01, 0.0)) * 0.001; 130 + sum += texture2D(tex, tc - vec2(0.01, -0.01)) * 0.001; 131 + sum += texture2D(tex, tc - vec2(0.0, -0.01)) * 0.001; 132 + sum += texture2D(tex, tc - vec2(-0.01, -0.01)) * 0.001; 133 + sum *= PHOSPHOR_GLOW_AMOUNT; 134 + 135 + // Initialize sum_sum_factor to zero 136 + vec4 sum_sum_factor = vec4(0.0); 137 + // Compute sum_j for i = -1 138 + vec4 sum_j = vec4(0.0); 139 + sum_j += texture2D(tex, tc + vec2(-1, -1) * 0.01); 140 + sum_j += texture2D(tex, tc + vec2(0, -1) * 0.01); 141 + sum_j += texture2D(tex, tc + vec2(1, -1) * 0.01); 142 + sum_j += texture2D(tex, tc + vec2(-1, 0) * 0.01); 143 + sum_j += texture2D(tex, tc + vec2(0, 0) * 0.01); 144 + sum_j += texture2D(tex, tc + vec2(1, 0) * 0.01); 145 + sum_j += texture2D(tex, tc + vec2(-1, 1) * 0.01); 146 + sum_j += texture2D(tex, tc + vec2(0, 1) * 0.01); 147 + sum_j += texture2D(tex, tc + vec2(1, 1) * 0.01); 148 + sum_sum_factor += sum_j * vec4(0.011); 149 + 150 + // Compute sum_j for i = 0 151 + sum_j = vec4(0.0); 152 + sum_j += texture2D(tex, tc + vec2(-1, 0) * 0.01); 153 + sum_j += texture2D(tex, tc + vec2(0, 0) * 0.01); 154 + sum_j += texture2D(tex, tc + vec2(1, 0) * 0.01); 155 + sum_j += texture2D(tex, tc + vec2(-1, 1) * 0.01); 156 + sum_j += texture2D(tex, tc + vec2(0, 1) * 0.01); 157 + sum_j += texture2D(tex, tc + vec2(1, 1) * 0.01); 158 + sum_sum_factor += sum_j * vec4(0.011); 159 + 160 + // Compute sum_j for i = 1 161 + sum_j = vec4(0.0); 162 + sum_j += texture2D(tex, tc + vec2(-1, 0) * 0.01); 163 + sum_j += texture2D(tex, tc + vec2(0, 1) * 0.01); 164 + sum_j += texture2D(tex, tc + vec2(1, 0) * 0.01); 165 + sum_j += texture2D(tex, tc + vec2(-1, 1) * 0.01); 166 + sum_j += texture2D(tex, tc + vec2(0, 1) * 0.01); 167 + sum_j += texture2D(tex, tc + vec2(1, 1) * 0.01); 168 + sum_sum_factor += sum_j * vec4(0.011); 169 + color += mix(sum_sum_factor * sum_sum_factor * vec4(factor), sum, 0.5); 170 + return color; 171 + } 172 + 173 + vec4 applyAdaptiveSharpen(vec2 tc, vec4 color, sampler2D tex) { 174 + vec4 color_tl = texture2D(tex, tc + vec2(-1.0, -1.0) * 0.5 / 2160.0); 175 + vec4 color_tr = texture2D(tex, tc + vec2(1.0, -1.0) * 0.5 / 2160.0); 176 + vec4 color_bl = texture2D(tex, tc + vec2(-1.0, 1.0) * 0.5 / 2160.0); 177 + vec4 color_br = texture2D(tex, tc + vec2(1.0, 1.0) * 0.5 / 2160.0); 178 + float sharpness = SHARPNESS; 179 + vec3 color_no_alpha = color.rgb; 180 + vec3 color_tl_no_alpha = color_tl.rgb; 181 + vec3 color_tr_no_alpha = color_tr.rgb; 182 + vec3 color_bl_no_alpha = color_bl.rgb; 183 + vec3 color_br_no_alpha = color_br.rgb; 184 + 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)); 185 + vec3 sharp_color_no_alpha = color_no_alpha + min(vec3(0.0), vec3(delta * sharpness)); 186 + vec4 sharp_color = vec4(sharp_color_no_alpha, color.a); 187 + return sharp_color; 188 + } 189 + 190 + vec4 applyScanlines(vec2 tc, vec4 color) { 191 + float scanline = (cos(tc.y * SCANLINE_FREQUENCY + SCANLINE_TIME) * 192 + sin(tc.y * SCANLINE_FREQUENCY + SCANLINE_TIME)) * SCANLINE_THICKNESS; 193 + float alpha = clamp(1.0 - abs(scanline), 0.0, 1.0); 194 + return vec4(color.rgb * alpha, color.a); 195 + } 196 + 197 + vec4 applyChromaticAberration(vec2 uv, vec4 color) { 198 + vec2 center = vec2(0.5, 0.5); // center of the screen 199 + vec2 offset = (uv - center) * CHROMATIC_ABERRATION_STRENGTH; // calculate the offset from the center 200 + 201 + // apply lens distortion 202 + float rSquared = dot(offset, offset); 203 + float distortion = 1.0 + LENS_DISTORTION_AMOUNT * rSquared; 204 + vec2 distortedOffset = offset * distortion; 205 + 206 + // apply chromatic aberration 207 + vec2 redOffset = vec2(distortedOffset.x * 1.00, distortedOffset.y * 1.00); 208 + vec2 blueOffset = vec2(distortedOffset.x * 1.00, distortedOffset.y * 1.00); 209 + 210 + vec4 redColor = texture2D(tex, uv + redOffset); 211 + vec4 blueColor = texture2D(tex, uv + blueOffset); 212 + 213 + vec4 result = vec4(redColor.r, color.g, blueColor.b, color.a); 214 + 215 + return result; 216 + } 217 + 218 + vec4 reduceGlare(vec4 color) { 219 + // Calculate the intensity of the color by taking the average of the RGB components 220 + float intensity = (color.r + color.g + color.b) / 3.0; 221 + // Set the maximum intensity that can be considered for glare 222 + float maxIntensity = 0.98; 223 + // Use smoothstep to create a smooth transition from no glare to full glare 224 + // based on the intensity of the color and the maximum intensity 225 + float glareIntensity = smoothstep(maxIntensity - 0.02, maxIntensity, intensity); 226 + // Set the amount of glare to apply to the color 227 + float glareAmount = 0.02; 228 + // Mix the original color with the reduced color that has glare applied to it 229 + vec3 reducedColor = mix(color.rgb, vec3(glareIntensity), glareAmount); 230 + // Return the reduced color with the original alpha value 231 + return vec4(reducedColor, color.a); 232 + } 233 + 234 + // Apply a fake HDR effect to the input color. 235 + // Parameters: 236 + // - inputColor: the color to apply the effect to. 237 + // - brightness: the brightness of the image. Should be a value between 0 and 1. 238 + // - contrast: the contrast of the image. Should be a value between 0 and 1. 239 + // - saturation: the saturation of the image. Should be a value between 0 and 2. 240 + // - bloom: the intensity of the bloom effect. Should be a value between 0 and 1. 241 + vec4 applyFakeHDREffect(vec4 inputColor, float brightness, float contrast, float saturation, float bloom) { 242 + const float minBrightness = 0.0; 243 + const float maxBrightness = 1.0; 244 + const float minContrast = 0.0; 245 + const float maxContrast = 1.0; 246 + const float minSaturation = 0.0; 247 + const float maxSaturation = 2.0; 248 + const float minBloom = 0.0; 249 + const float maxBloom = 1.0; 250 + 251 + // Check input parameters for validity 252 + if (brightness < minBrightness || brightness > maxBrightness) { 253 + return vec4(0.0, 0.0, 0.0, 1.0); // Return black with alpha of 1.0 to indicate error 254 + } 255 + if (contrast < minContrast || contrast > maxContrast) { 256 + return vec4(0.0, 0.0, 0.0, 1.0); 257 + } 258 + if (saturation < minSaturation || saturation > maxSaturation) { 259 + return vec4(0.0, 0.0, 0.0, 1.0); 260 + } 261 + if (bloom < minBloom || bloom > maxBloom) { 262 + return vec4(0.0, 0.0, 0.0, 1.0); 263 + } 264 + 265 + // Apply brightness and contrast 266 + vec3 color = inputColor.rgb; 267 + color = (color - vec3(0.5)) * exp2(brightness * 10.0) + vec3(0.5); 268 + color = mix(vec3(0.5), color, pow(contrast * 4.0 + 1.0, 2.0)); 269 + 270 + // // NTSC 271 + // vec3 lumCoeff = vec3(0.2125, 0.7154, 0.0721); 272 + 273 + // // BT.709 274 + // vec3 lumCoeff = vec3(0.299, 0.587, 0.114); 275 + 276 + // // BT.2020 277 + // vec3 lumCoeff = vec3(0.2627, 0.6780, 0.0593); 278 + 279 + // Warm NTSC 280 + vec3 lumCoeff = vec3(0.2125, 0.7010, 0.0865); 281 + 282 + // Apply saturation 283 + float luminance = dot(color, lumCoeff); 284 + vec3 grey = vec3(luminance); 285 + color = mix(grey, color, saturation); 286 + 287 + // Apply bloom effect 288 + float threshold = 1.0 - bloom; 289 + vec3 bloomColor = max(color - threshold, vec3(0.0)); 290 + bloomColor = pow(bloomColor, vec3(2.0)); 291 + bloomColor = mix(vec3(0.0), bloomColor, pow(min(luminance, threshold), 4.0)); 292 + color += bloomColor; 293 + 294 + return vec4(color, inputColor.a); 295 + } 296 + 297 + vec4 bilateralFilter(sampler2D tex, vec2 uv, vec4 color, float sampleRadius, float noiseThreshold, float intensity) { 298 + vec4 filteredColor = vec4(0.0); 299 + float totalWeight = 0.0; 300 + 301 + // Top-left pixel 302 + vec4 sample = texture2D(tex, uv + vec2(-1.0, -1.0)); 303 + float dist = length(vec2(-1.0, -1.0)); 304 + float colorDist = length(sample - color); 305 + float weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); 306 + filteredColor += sample * weight; 307 + totalWeight += weight; 308 + 309 + // Top pixel 310 + sample = texture2D(tex, uv + vec2(0.0, -1.0)); 311 + dist = length(vec2(0.0, -1.0)); 312 + colorDist = length(sample - color); 313 + weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); 314 + filteredColor += sample * weight; 315 + totalWeight += weight; 316 + 317 + // Top-right pixel 318 + sample = texture2D(tex, uv + vec2(1.0, -1.0)); 319 + dist = length(vec2(1.0, -1.0)); 320 + colorDist = length(sample - color); 321 + weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); 322 + filteredColor += sample * weight; 323 + totalWeight += weight; 324 + 325 + // Left pixel 326 + sample = texture2D(tex, uv + vec2(-1.0, 0.0)); 327 + dist = length(vec2(-1.0, 0.0)); 328 + colorDist = length(sample - color); 329 + weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); 330 + filteredColor += sample * weight; 331 + totalWeight += weight; 332 + 333 + // Center pixel 334 + sample = texture2D(tex, uv); 335 + dist = 0.0; 336 + colorDist = length(sample - color); 337 + weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); 338 + filteredColor += sample * weight; 339 + totalWeight += weight; 340 + 341 + // Right pixel 342 + sample = texture2D(tex, uv + vec2(1.0, 0.0)); 343 + dist = length(vec2(1.0, 0.0)); 344 + colorDist = length(sample - color); 345 + weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); 346 + filteredColor += sample * weight; 347 + totalWeight += weight; 348 + 349 + // Bottom-left pixel 350 + sample = texture2D(tex, uv + vec2(-1.0, 1.0)); 351 + dist = length(vec2(-1.0, 1.0)); 352 + colorDist = length(sample - color); 353 + weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); 354 + filteredColor += sample * weight; 355 + totalWeight += weight; 356 + 357 + // Bottom pixel 358 + sample = texture2D(tex, uv + vec2(0.0, sampleRadius)); 359 + dist = length(vec2(0.0, sampleRadius)); 360 + colorDist = length(sample - color); 361 + weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); 362 + filteredColor += sample * weight; 363 + totalWeight += weight; 364 + 365 + filteredColor /= totalWeight; 366 + return mix(color, filteredColor, step(noiseThreshold, length(filteredColor - color))); 367 + } 368 + 369 + vec4 supersample(sampler2D tex, vec2 uv, float sampleRadius, float noiseThreshold, float intensity) { 370 + float radiusSq = sampleRadius * sampleRadius; 371 + vec2 poissonDisk; 372 + vec4 color = vec4(0.0); 373 + 374 + float r1_0 = sqrt(0.0 / 16.0); 375 + float r2_0 = fract(1.0 / 3.0); 376 + float theta_0 = TWOPI * r2_0; 377 + poissonDisk = vec2(r1_0 * cos(theta_0), r1_0 * sin(theta_0)); 378 + color += texture2D(tex, uv + poissonDisk * sampleRadius); 379 + 380 + float r1_1 = sqrt(1.0 / 16.0); 381 + float r2_1 = fract(2.0 / 3.0); 382 + float theta_1 = TWOPI * r2_1; 383 + poissonDisk = vec2(r1_1 * cos(theta_1), r1_1 * sin(theta_1)); 384 + color += texture2D(tex, uv + poissonDisk * sampleRadius); 385 + 386 + float r1_2 = sqrt(2.0 / 16.0); 387 + float r2_2 = fract(3.0 / 3.0); 388 + float theta_2 = TWOPI * r2_2; 389 + poissonDisk = vec2(r1_2 * cos(theta_2), r1_2 * sin(theta_2)); 390 + color += texture2D(tex, uv + poissonDisk * sampleRadius); 391 + 392 + float r1_3 = sqrt(3.0 / 16.0); 393 + float r2_3 = fract(4.0 / 3.0); 394 + float theta_3 = TWOPI * r2_3; 395 + poissonDisk = vec2(r1_3 * cos(theta_3), r1_3 * sin(theta_3)); 396 + color += texture2D(tex, uv + poissonDisk * sampleRadius); 397 + 398 + float r1_4 = sqrt(4.0 / 16.0); 399 + float r2_4 = fract(5.0 / 3.0); 400 + float theta_4 = TWOPI * r2_4; 401 + poissonDisk = vec2(r1_4 * cos(theta_4), r1_4 * sin(theta_4)); 402 + color += texture2D(tex, uv + poissonDisk * sampleRadius); 403 + 404 + float r1_5 = sqrt(5.0 / 16.0); 405 + float r2_5 = fract(6.0 / 3.0); 406 + float theta_5 = TWOPI * r2_5; 407 + poissonDisk = vec2(r1_5 * cos(theta_5), r1_5 * sin(theta_5)); 408 + color += texture2D(tex, uv + poissonDisk * sampleRadius); 409 + 410 + float r1_6 = sqrt(6.0 / 16.0); 411 + float r2_6 = fract(7.0 / 3.0); 412 + float theta_6 = TWOPI * r2_6; 413 + poissonDisk = vec2(r1_6 * cos(theta_6), r1_6 * sin(theta_6)); 414 + color += texture2D(tex, uv + poissonDisk * sampleRadius); 415 + 416 + float r1_7 = sqrt(7.0 / 16.0); 417 + float r2_7 = fract(8.0 / 3.0); 418 + float theta_7 = TWOPI * r2_7; 419 + poissonDisk = vec2(r1_7 * cos(theta_7), r1_7 * sin(theta_7)); 420 + color += texture2D(tex, uv + poissonDisk * sampleRadius); 421 + 422 + float r1_8 = sqrt(8.0 / 16.0); 423 + float r2_8 = fract(9.0 / 3.0); 424 + float theta_8 = TWOPI * r2_8; 425 + poissonDisk = vec2(r1_8 * cos(theta_8), r1_8 * sin(theta_8)); 426 + color += texture2D(tex, uv + poissonDisk * sampleRadius); 427 + 428 + float r1_9 = sqrt(9.0 / 16.0); 429 + float r2_9 = fract(10.0 / 3.0); 430 + float theta_9 = TWOPI * r2_9; 431 + poissonDisk = vec2(r1_9 * cos(theta_9), r1_9 * sin(theta_9)); 432 + color += texture2D(tex, uv + poissonDisk * sampleRadius); 433 + 434 + float r1_10 = sqrt(10.0 / 16.0); 435 + float r2_10 = fract(11.0 / 3.0); 436 + float theta_10 = TWOPI * r2_10; 437 + poissonDisk = vec2(r1_10 * cos(theta_10), r1_10 * sin(theta_10)); 438 + color += texture2D(tex, uv + poissonDisk * sampleRadius); 439 + 440 + float r1_11 = sqrt(11.0 / 16.0); 441 + float r2_11 = fract(12.0 / 3.0); 442 + float theta_11 = TWOPI * r2_11; 443 + poissonDisk = vec2(r1_11 * cos(theta_11), r1_11 * sin(theta_11)); 444 + color += texture2D(tex, uv + poissonDisk * sampleRadius); 445 + 446 + float r1_12 = sqrt(12.0 / 16.0); 447 + float r2_12 = fract(13.0 / 3.0); 448 + float theta_12 = TWOPI * r2_12; 449 + poissonDisk = vec2(r1_12 * cos(theta_12), r1_12 * sin(theta_12)); 450 + color += texture2D(tex, uv + poissonDisk * sampleRadius); 451 + 452 + float r1_13 = sqrt(13.0 / 16.0); 453 + float r2_13 = fract(14.0 / 3.0); 454 + float theta_13 = TWOPI * r2_13; 455 + poissonDisk = vec2(r1_13 * cos(theta_13), r1_13 * sin(theta_13)); 456 + color += texture2D(tex, uv + poissonDisk * sampleRadius); 457 + 458 + float r1_14 = sqrt(14.0 / 16.0); 459 + float r2_14 = fract(15.0 / 3.0); 460 + float theta_14 = TWOPI * r2_14; 461 + poissonDisk = vec2(r1_14 * cos(theta_14), r1_14 * sin(theta_14)); 462 + color += texture2D(tex, uv + poissonDisk * sampleRadius); 463 + 464 + float r1_15 = sqrt(15.0 / 16.0); 465 + float r2_15 = fract(16.0 / 3.0); 466 + float theta_15 = TWOPI * r2_15; 467 + poissonDisk = vec2(r1_15 * cos(theta_15), r1_15 * sin(theta_15)); 468 + color += texture2D(tex, uv + poissonDisk * sampleRadius); 469 + 470 + return bilateralFilter(tex, uv, color, sampleRadius, noiseThreshold, intensity); 471 + } 472 + void main() { 473 + vec2 tc_no_dist = v_texcoord; 474 + 475 + vec2 tc = applyBarrelDistortion(tc_no_dist, DISTORTION_AMOUNT); 476 + 477 + // [-1, 1] 478 + vec2 tc_no_dist_symmetric = tc_no_dist * 2.0 - 1.0; 479 + 480 + // [0,1] 481 + vec2 tc_no_dist_normalized = (tc_no_dist_symmetric + 1.0) / 2.0; 482 + 483 + // vec4 color = texture2D(tex, tc); 484 + vec4 color = supersample(tex, tc, SAMPLING_RADIUS, NOISE_THRESHOLD, DENOISE_INTENSITY); 485 + 486 + color = applyAdaptiveSharpen(tc, color, tex); 487 + 488 + color = applyPhosphorGlow(tc, color, tex); 489 + 490 + color = reduceGlare(color); 491 + 492 + color = mix(applyFakeHDREffect(color, HDR_BRIGHTNESS, HDR_CONTRAST, HDR_SATURATION, HDR_BLOOM), color, 0.5); 493 + 494 + color = applyColorCorrection(color); 495 + 496 + color /= SUPERSAMPLING_SAMPLES; 497 + 498 + color = mix(applyChromaticAberration(tc, color), color, 0.25); 499 + 500 + color = mix(color, applyVignette(color), 0.37); 501 + 502 + color = applyBorder(tc_no_dist_normalized, color, 1.0 - BORDER_SIZE * BORDER_RADIUS, BORDER_COLOR); 503 + 504 + color = mix(applyBorder(tc, color, BORDER_SIZE, BORDER_COLOR), color, 0.05); 505 + 506 + color = applyScanlines(tc, color); 507 + 508 + gl_FragColor = color; 509 + gl_FragColor.a = 1.0; 510 + } 511 +
+42
config/hypr/shaders/drugs.frag
··· 1 + 2 + precision highp float; 3 + varying vec2 v_texcoord; 4 + uniform sampler2D tex; 5 + uniform float time; 6 + 7 + void warpco(inout vec2 tc) { 8 + tc -= 0.5; 9 + tc *= length(tc) * 2.0; 10 + tc += 0.5; 11 + } 12 + 13 + float rand1d(float seed) { 14 + return sin(seed*1454.0); 15 + } 16 + 17 + float rand2d(vec2 co) 18 + { 19 + return fract(sin(dot(co.xy, vec2(12.9898,78.233))) * 43758.5453); 20 + } 21 + 22 + vec3 rgb(in vec2 tc, float freq, float amp, inout vec4 centre) { 23 + vec2 off = vec2(1.0/800.0, 0.0) * sin(tc.t * freq + time) * amp; 24 + vec2 off2 = vec2(1.0/800.0, 0.0) * sin(tc.t * freq - time * 1.5) * amp; 25 + centre = texture2D(tex, tc); 26 + return vec3(texture2D(tex, tc-off).r, centre.g, texture2D(tex, tc+off2).b); 27 + } 28 + 29 + void main() { 30 + // vec2 px = 1.0 / textureSize(tex, 0).st; 31 + vec2 tc = v_texcoord; 32 + warpco(tc); 33 + tc = mix(v_texcoord, tc, sin(time * 2.0)*0.07); 34 + tc.x += rand2d(floor(tc * 20.0 + floor(time * 2.5))) * 0.01; 35 + tc.x += rand1d(floor(tc.x * 40.0)) * 0.005 * rand1d(time * 0.001); 36 + tc.y += sin(tc.x + time) * 0.02; 37 + vec4 centre; 38 + vec3 bent = rgb(tc, 100.0, 5.0, centre); 39 + vec3 col = mix(centre.rgb, bent, sin(time)); 40 + gl_FragColor = vec4(col, centre.a); 41 + // gl_FragColor = vec4(texture2D(tex, v_texcoord)); 42 + }
+21
config/hypr/shaders/extradark.frag
··· 1 + // vim: set ft=glsl: 2 + // blue light filter shader 3 + // values from https://reshade.me/forum/shader-discussion/3673-blue-light-filter-similar-to-f-lux 4 + 5 + precision mediump float; 6 + varying vec2 v_texcoord; 7 + uniform sampler2D tex; 8 + 9 + void main() { 10 + 11 + vec4 pixColor = texture2D(tex, v_texcoord); 12 + 13 + // red 14 + //pixColor[0] *= 2; 15 + // green 16 + //pixColor[1] *= 2; 17 + // blue 18 + pixColor[2] *= 0.1; 19 + 20 + gl_FragColor = pixColor; 21 + }
+13
config/hypr/shaders/invert.frag
··· 1 + // vim: set ft=glsl: 2 + // blue light filter shader 3 + // values from https://reshade.me/forum/shader-discussion/3673-blue-light-filter-similar-to-f-lux 4 + 5 + precision mediump float; 6 + varying vec2 v_texcoord; 7 + uniform sampler2D tex; 8 + 9 + void main() { 10 + vec4 pixColor = texture2D(tex, v_texcoord); 11 + pixColor.rgb = 1.0 - pixColor.rgb; 12 + gl_FragColor = pixColor; 13 + }
+41
config/hypr/shaders/solarized.frag
··· 1 + // -*- mode:c -*- 2 + precision lowp float; 3 + varying vec2 v_texcoord; 4 + uniform sampler2D tex; 5 + 6 + float distanceSquared(vec3 pixColor, vec3 solarizedColor) { 7 + vec3 distanceVector = pixColor - solarizedColor; 8 + return dot(distanceVector, distanceVector); 9 + } 10 + 11 + void main() { 12 + vec3 solarized[16]; 13 + solarized[0] = vec3(0.,0.169,0.212); 14 + solarized[1] = vec3(0.027,0.212,0.259); 15 + solarized[2] = vec3(0.345,0.431,0.459); 16 + solarized[3] = vec3(0.396,0.482,0.514); 17 + solarized[4] = vec3(0.514,0.58,0.588); 18 + solarized[5] = vec3(0.576,0.631,0.631); 19 + solarized[6] = vec3(0.933,0.91,0.835); 20 + solarized[7] = vec3(0.992,0.965,0.89); 21 + solarized[8] = vec3(0.71,0.537,0.); 22 + solarized[9] = vec3(0.796,0.294,0.086); 23 + solarized[10] = vec3(0.863,0.196,0.184); 24 + solarized[11] = vec3(0.827,0.212,0.51); 25 + solarized[12] = vec3(0.424,0.443,0.769); 26 + solarized[13] = vec3(0.149,0.545,0.824); 27 + solarized[14] = vec3(0.165,0.631,0.596); 28 + solarized[15] = vec3(0.522,0.6,0.); 29 + 30 + vec3 pixColor = vec3(texture2D(tex, v_texcoord)); 31 + int closest = 0; 32 + float closestDistanceSquared = distanceSquared(pixColor, solarized[0]); 33 + for (int i = 1; i < 15; i++) { 34 + float newDistanceSquared = distanceSquared(pixColor, solarized[i]); 35 + if (newDistanceSquared < closestDistanceSquared) { 36 + closest = i; 37 + closestDistanceSquared = newDistanceSquared; 38 + } 39 + } 40 + gl_FragColor = vec4(solarized[closest], 1.); 41 + }
+48
config/ironbar/config.toml
··· 1 + position = "top" 2 + height = 24 3 + 4 + [[start]] 5 + type = "menu" 6 + label = "" # "󰣇 btw" 7 + label_icon = "/opt/archlinux-icons/archlinux-icon-crystal-256.svg" 8 + label_icon_size = 24 9 + 10 + [[start]] 11 + type = "workspaces" 12 + favorites = ["1", "2", "3", "4", "5"] 13 + 14 + [[start]] 15 + type = "focused" 16 + truncate = { mode = "end", max_length = 50 } 17 + icon_size = 16 18 + 19 + [[center]] 20 + type = "clock" 21 + format = "%-l:%M %p" 22 + format_popup = "%m/%d/%Y %-r" 23 + 24 + [[end]] 25 + type = "music" 26 + 27 + [[end]] 28 + type = "volume" 29 + sink_slider_orientation = "horizontal" 30 + source_slider_orientation = "horizontal" 31 + icon_size = 25 32 + 33 + [[end]] 34 + type = "sys_info" 35 + format = [ 36 + # "C {cpu_percent: <1}%", 37 + # "M {memory_percent: <1}%", 38 + # "T {temp_c: <1}°C" 39 + " {cpu_percent: <1}%", 40 + " {memory_percent: <1}%", 41 + "󰔏 {temp_c: <1}°C" 42 + ] 43 + icon_size = 20 44 + 45 + [end.interval] 46 + cpu = 1 47 + memory = 1 48 + temp = 1
+128
config/ironbar/style.css
··· 1 + :root { 2 + --color-dark-primary: #1c1c1c; 3 + --color-dark-secondary: #2d2d2d; 4 + --color-white: #fff; 5 + --color-active: #e7deff; 6 + --color-urgent: #8f0a0a; 7 + 8 + --margin-lg: 1em; 9 + --margin-sm: 0.5em; 10 + } 11 + 12 + * { 13 + border-radius: 0; 14 + border: none; 15 + box-shadow: none; 16 + background-image: none; 17 + font-family: "Maple Mono NF"; 18 + } 19 + 20 + scale > trough { 21 + background-color: var(--color-dark-secondary); 22 + } 23 + 24 + scale > trough > highlight { 25 + background-color: var(--color-active); 26 + border-style: solid; 27 + border-color: var(--color-active); 28 + border-width: 0.2em; 29 + } 30 + 31 + scale > trough > slider { 32 + background-color: var(--color-white); 33 + border-radius: 1em; 34 + } 35 + 36 + switch > slider { 37 + background-color: var(--color-white); 38 + } 39 + 40 + switch:checked { 41 + background-color: var(--color-active); 42 + } 43 + 44 + switch:not(:checked) { 45 + background-color: var(--color-dark-secondary); 46 + } 47 + 48 + popover, popover contents, calendar { 49 + background-color: var(--color-dark-primary); 50 + } 51 + 52 + #bar, .background { 53 + background-color: rgba(28, 28, 28, 0.5); 54 + } 55 + 56 + box, button, label { 57 + background-color: #0000; 58 + color: var(--color-white); 59 + } 60 + 61 + button { 62 + border-radius: 1em; 63 + padding-left: var(--margin-sm); 64 + padding-right: var(--margin-sm); 65 + } 66 + 67 + button:hover, button:active { 68 + background-color: var(--color-dark-secondary); 69 + } 70 + 71 + #end > * + * { 72 + margin-left: var(--margin-lg); 73 + } 74 + 75 + .menu { 76 + padding: 0; 77 + } 78 + 79 + .menu > box { 80 + /* background-color: white; */ 81 + padding-left: 4px; /* Really weird fix here since there's a min-width value somewhere I cannot change. */ 82 + } 83 + 84 + .sysinfo > * + * { 85 + /* margin-left: var(--margin-sm); */ 86 + } 87 + 88 + .clock { 89 + font-weight: bold; 90 + } 91 + 92 + .popup-clock .calendar-clock { 93 + font-size: 1.5em; 94 + } 95 + 96 + .popup-clock .calendar .day-number { 97 + border-radius: 1em; 98 + } 99 + 100 + .popup-clock .calendar .today { 101 + background-color: var(--color-active); 102 + color: var(--color-dark-primary); 103 + } 104 + 105 + .popup-clock .calendar .day-number:focus, .popup-clock .calendar .day-number:selected { 106 + outline-color: var(--color-active); 107 + } 108 + 109 + .workspaces, .sysinfo { 110 + margin-right: 0.5em; 111 + } 112 + 113 + .workspaces .item.visible { 114 + /* box-shadow: inset 0 -1px var(--color-white); */ 115 + } 116 + 117 + .workspaces .item.focused { 118 + /* box-shadow: inset 0 -1px var(--color-active); */ 119 + background-color: var(--color-dark-secondary); 120 + } 121 + 122 + .workspaces .item.urgent { 123 + background-color: var(--color-urgent); 124 + } 125 + 126 + button > .background, button contents { 127 + border-radius: 1em; 128 + }
+41
config/nushell/config.nu
··· 1 + # config.nu 2 + # 3 + # Installed by: 4 + # version = "0.110.0" 5 + # 6 + # This file is used to override default Nushell settings, define 7 + # (or import) custom commands, or run any other startup tasks. 8 + # See https://www.nushell.sh/book/configuration.html 9 + # 10 + # Nushell sets "sensible defaults" for most configuration settings, 11 + # so your `config.nu` only needs to override these defaults if desired. 12 + # 13 + # You can open this file in your default editor using: 14 + # config nu 15 + # 16 + # You can also pretty-print and page through the documentation for configuration 17 + # options using: 18 + # config nu --doc | nu-highlight | less -R 19 + dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=cosmic 20 + 21 + $env.EDITOR = "helix" 22 + $env.config.buffer_editor = $env.EDITOR 23 + 24 + $env.GPG_TTY = (tty) 25 + 26 + $env.LANG = "en_US.UTF-8" 27 + 28 + $env.config.show_banner = false 29 + 30 + $env.PROMPT_INDICATOR = "$ " 31 + 32 + $env.PROMPT_COMMAND = { $"[(pwd | path basename)@(sys host | get hostname)]" } 33 + 34 + $env.config.table.mode = "psql" 35 + 36 + $env.VPN_GATEWAY = "" 37 + 38 + def gp [] { sudo gpclient --fix-openssl connect $env.VPN_GATEWAY } 39 + def virt [] { sudo /usr/bin/modprobe v4l2loopback exclusive_caps=1 card_label=OBS Virtual Camera } 40 + def c [] { cosmic-session } 41 + def h [] { dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=hyprland; start-hyprland }
+29
config/waybar/config.jsonc
··· 1 + // -*- mode: jsonc -*- 2 + { 3 + "layer": "top", // Waybar at top layer 4 + "position": "top", // Waybar position (top|bottom|left|right) 5 + "height": 42, // Waybar height (to be removed for auto height) 6 + // "width": 1280, // Waybar width 7 + "spacing": 4, // Gaps between modules (4px) 8 + // Choose the order of the modules 9 + "modules-left": [ 10 + "custom/arch", 11 + "hyprland/workspaces", 12 + "hyprland/window" 13 + ], 14 + "modules-center": [ 15 + "clock" 16 + ], 17 + "modules-right": [ 18 + "idle_inhibitor", 19 + "pulseaudio", 20 + "cpu", 21 + "memory", 22 + "temperature" 23 + ], 24 + //Modules configuration 25 + 26 + "include": [ 27 + "~/.config/waybar/modules.json" 28 + ] 29 + }
+95
config/waybar/modules.json
··· 1 + { 2 + "custom/arch": { 3 + "format": "󰣇", 4 + "tooltip": true, 5 + "tooltip-format": "btw" 6 + }, 7 + 8 + 9 + "hyprland/workspaces": { 10 + "disable-scroll": true, 11 + "all-outputs": true, 12 + "warp-on-scroll": false, 13 + "format": "{name}", 14 + "format-icons": { 15 + "urgent": "", 16 + "active": "", 17 + "default": "" 18 + } 19 + }, 20 + "idle_inhibitor": { 21 + "format": "{icon}", 22 + "format-icons": { 23 + "activated": "", 24 + "deactivated": "" 25 + } 26 + }, 27 + "pulseaudio": { 28 + "format": "{icon} {volume}%", 29 + "format-bluetooth": "{icon} {volume}%  {format_source}", 30 + "format-bluetooth-muted": " {icon} {format_source}", 31 + "format-muted": " {format_source}", 32 + "format-source": " {volume}%", 33 + "format-source-muted": "", 34 + "format-icons": { 35 + "headphone": "", 36 + "hands-free": "", 37 + "headset": "", 38 + "phone": "", 39 + "portable": "", 40 + "car": "", 41 + "default": ["", "", ""] 42 + }, 43 + "on-click": "pavucontrol" 44 + }, 45 + "network": { 46 + "format-wifi": " {essid} ({signalStrength}%)", 47 + "format-ethernet": "{ipaddr}/{cidr} ", 48 + "tooltip-format": "{ifname} via {gwaddr} ", 49 + "format-linked": "{ifname} (No IP) ", 50 + "format-disconnected": "Disconnected ⚠", 51 + "on-click": "sh ~/scripts/rofi-wifi-menu/rofi-wifi-menu.sh" 52 + 53 + }, 54 + "cpu": { 55 + "format": "CPU {usage}%", 56 + "tooltip": true 57 + }, 58 + "memory": { 59 + "format": "MEMORY {}%", 60 + "tooltip": true 61 + }, 62 + "temperature": { 63 + "interval": 10, 64 + "hwmon-path": "/sys/devices/platform/coretemp.0/hwmon/hwmon4/temp1_input", 65 + "critical-threshold": 100, 66 + "format-critical": " {temperatureC}", 67 + "format": " {temperatureC}°C" 68 + }, 69 + "hyprland/language": { 70 + "format": " {}", 71 + "format-en": "EN", 72 + "format-ru": "RU" 73 + }, 74 + "battery": { 75 + "states": { 76 + "warning": 30, 77 + "critical": 15 78 + }, 79 + "format": "{icon} {capacity}%", 80 + "format-full": "{icon} {capacity}%", 81 + "format-charging": " {capacity}%", 82 + "format-plugged": " {capacity}%", 83 + "format-alt": "{time} {icon}", 84 + "format-icons": ["", "", "", "", ""] 85 + }, 86 + "battery#bat2": { 87 + "bat": "BAT2" 88 + }, 89 + "clock": { 90 + "format": "{:%I:%M %p} ", 91 + "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>", 92 + "format-alt": "{:%A, %b %d, %Y at %r}" 93 + } 94 + 95 + }
+112
config/waybar/style.css
··· 1 + * { 2 + /* `otf-font-awesome` and SpaceMono Nerd Font are required to be installed for icons */ 3 + font-family: "Fira Sans Semibold", FontAwesome, Roboto, Helvetica, Arial, sans-serif; 4 + font-size: 15px; 5 + transition: background-color .3s ease-out; 6 + } 7 + 8 + window#waybar { 9 + background: rgba(26, 27, 38, 0.75); 10 + color: #c0caf5; 11 + font-family: 12 + SpaceMono Nerd Font, 13 + feather; 14 + transition: background-color .5s; 15 + } 16 + 17 + .modules-left, 18 + .modules-center, 19 + .modules-right 20 + { 21 + background: rgba(0, 0, 8, .7); 22 + margin: 5px 10px; 23 + padding: 0 5px; 24 + border-radius: 15px; 25 + } 26 + .modules-left { 27 + padding: 0; 28 + padding-right: 10px; 29 + } 30 + #window { 31 + padding-left: 3px; 32 + } 33 + 34 + .modules-center { 35 + padding: 0 10px; 36 + } 37 + 38 + #clock, 39 + #battery, 40 + #cpu, 41 + #memory, 42 + #disk, 43 + #temperature, 44 + #backlight, 45 + #network, 46 + #pulseaudio, 47 + #wireplumber, 48 + #custom-media, 49 + #tray, 50 + #mode, 51 + #idle_inhibitor, 52 + #scratchpad, 53 + #power-profiles-daemon, 54 + #language, 55 + #mpd { 56 + padding: 0 10px; 57 + border-radius: 15px; 58 + } 59 + 60 + #clock:hover, 61 + #battery:hover, 62 + #cpu:hover, 63 + #memory:hover, 64 + #disk:hover, 65 + #temperature:hover, 66 + #backlight:hover, 67 + #network:hover, 68 + #pulseaudio:hover, 69 + #wireplumber:hover, 70 + #custom-media:hover, 71 + #tray:hover, 72 + #mode:hover, 73 + #idle_inhibitor:hover, 74 + #scratchpad:hover, 75 + #power-profiles-daemon:hover, 76 + #language:hover, 77 + #mpd:hover { 78 + background: rgba(26, 27, 38, 0.9); 79 + } 80 + 81 + 82 + #workspaces button { 83 + background: transparent; 84 + font-family: 85 + SpaceMono Nerd Font, 86 + feather; 87 + font-weight: 900; 88 + font-size: 13pt; 89 + color: #c0caf5; 90 + border:none; 91 + border-radius: 15px; 92 + } 93 + 94 + #workspaces button.active { 95 + background: #13131d; 96 + } 97 + 98 + #workspaces button:hover { 99 + background: #11111b; 100 + color: #cdd6f4; 101 + box-shadow: none; 102 + } 103 + 104 + #custom-arch { 105 + margin-left: 5px; 106 + padding: 0 10px; 107 + font-size: 25px; 108 + transition: color .5s; 109 + } 110 + #custom-arch:hover { 111 + color: #1793d1; 112 + }
+9
local/share/applications/helium.desktop
··· 1 + [Desktop Entry] 2 + Name=Helium Browser 3 + StartupWMClass=Helium Browser 4 + Comment=A browser built on ungoogled-chromium 5 + GenericName=Helium Browser 6 + Exec=/usr/bin/helium 7 + Type=Application 8 + Categories=Network;WebBrowser; 9 + Path=/usr/bin