From: Amazingca Date: Sat, 14 Mar 2026 07:09:12 +0000 (-0600) Subject: Initial commit (again) X-Git-Url: http://git.amazingca.dev/?a=commitdiff_plain;h=bf0c1d753ecebd71705211db893ba37cea8d0ede;p=autumn%2Fdots Initial commit (again) --- bf0c1d753ecebd71705211db893ba37cea8d0ede diff --git a/README.md b/README.md new file mode 100644 index 0000000..f0fbd7f --- /dev/null +++ b/README.md @@ -0,0 +1,60 @@ +## Autumn's Dotfiles + +This repository hosts my configuration files for use with Hyprland/COSMIC. + +### Required Packages + + - [ ] Hyprland + - [x] Hyprpaper *[wallpaper utility]* + - [x] Hyprlock *[for lock screen]* + - [x] Ironbar *[composable menu that provides additional information within the environment]* + - [ ] COSMIC *[alternative to Hyprland that includes better OOTB support]* + + +### Optional Packages +(These are used by default within `hyprland.conf` but are not necessary to the overall theme) + + - [ ] nautilus *[GNOME file manager]* + - [ ] helix *[terminal editor]* + - [ ] zen *[Web browser]* + - [ ] discord *[online communication platform]* + - [ ] stoat *[open-source communication platform]* + - [ ] minecraft *[it's a sandbox game]* + - [ ] hyprshot *[screenshot utility]* + +### Credits + +Most of these configurations are mixed-and-matched from various other dotfiles. Here's a brief synopsis of where I adapted them: + +[end-4 -- illogical-impulse](https://github.com/end-4/dots-hyprland) + - Hyprlock configurations + +[d00m1k -- SimpleBlueColorWaybar](https://github.com/d00m1k/SimpleBlueColorWaybar) + - Waybar configurations + +**Discord** (check Disclaimer) + - Wallpaper (from Direct Message backgrounds) + +### My Modifications + +I made some minor adjustments to the Waybar config files: + + - Moved the bar to the top + - Moved the window name to the immediate right of the workspaces bar, with minor padding + - Localized the date and time to U.S. and moved it to the middle to align with Gnome's bar styling + - Adjusted the naming conventions for processes and memory utilization + - Removed battery levels and other settings that weren't viable since this configuration was meant for a desktop setting + +### Additional notes + +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. + +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. + +### Installation + +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. + +#### Disclaimer + +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. diff --git a/config/helix/config.toml b/config/helix/config.toml new file mode 100644 index 0000000..a5307bb --- /dev/null +++ b/config/helix/config.toml @@ -0,0 +1,7 @@ +theme = "autumn" + +[editor] +true-color = true + +[editor.soft-wrap] +enable = true diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf new file mode 100644 index 0000000..1c5d8fd --- /dev/null +++ b/config/hypr/hyprland.conf @@ -0,0 +1,319 @@ + +# ####################################################################################### +# 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 ### +################ + +# See https://wiki.hyprland.org/Configuring/Monitors/ +monitor=,preferred,auto,auto + + +################### +### MY PROGRAMS ### +################### + +# See https://wiki.hyprland.org/Configuring/Keywords/ + +# Set programs that you use +$terminal = kgx +$fileManager = nautilus +$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 + + +############################# +### ENVIRONMENT VARIABLES ### +############################# + +# See https://wiki.hyprland.org/Configuring/Environment-variables/ + +env = XCURSOR_SIZE,24 +env = HYPRCURSOR_SIZE,24 + + +################### +### PERMISSIONS ### +################### + +# See https://wiki.hyprland.org/Configuring/Permissions/ +# Please note permission changes here require a Hyprland restart and are not applied on-the-fly +# for security reasons + +# ecosystem { +# enforce_permissions = 1 +# } + +# permission = /usr/(bin|local/bin)/grim, screencopy, allow +# permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow +# permission = /usr/(bin|local/bin)/hyprpm, plugin, allow + + +##################### +### LOOK AND FEEL ### +##################### + +# Refer to https://wiki.hyprland.org/Configuring/Variables/ + +# https://wiki.hyprland.org/Configuring/Variables/#general +general { + gaps_in = 5 + gaps_out = 10 + + border_size = 2 + + # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors + col.active_border = rgba(F7DCDE39) + col.inactive_border = rgba(A58A8D30) + + # Set to true enable resizing windows by clicking and dragging on borders and gaps + resize_on_border = true + + # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on + allow_tearing = false + + layout = dwindle +} + +# https://wiki.hyprland.org/Configuring/Variables/#decoration +decoration { + rounding = 10 + rounding_power = 2 + + # Change transparency of focused and unfocused windows + active_opacity = 1.0 + inactive_opacity = 1.0 + + shadow { + enabled = true + range = 4 + render_power = 3 + color = rgba(1a1a1aee) + } + + # https://wiki.hyprland.org/Configuring/Variables/#blur + blur { + enabled = true + size = 3 + passes = 1 + + vibrancy = 0.1696 + } +} + +# https://wiki.hyprland.org/Configuring/Variables/#animations +animations { + enabled = yes, please :) + + # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + + bezier = easeOutQuint,0.23,1,0.32,1 + bezier = easeInOutCubic,0.65,0.05,0.36,1 + bezier = linear,0,0,1,1 + bezier = almostLinear,0.5,0.5,0.75,1.0 + bezier = quick,0.15,0,0.1,1 + + animation = global, 1, 10, default + animation = border, 1, 5.39, easeOutQuint + animation = windows, 1, 4.79, easeOutQuint + animation = windowsIn, 1, 4.1, easeOutQuint, popin 87% + animation = windowsOut, 1, 1.49, linear, popin 87% + animation = fadeIn, 1, 1.73, almostLinear + animation = fadeOut, 1, 1.46, almostLinear + animation = fade, 1, 3.03, quick + animation = layers, 1, 3.81, easeOutQuint + animation = layersIn, 1, 4, easeOutQuint, fade + animation = layersOut, 1, 1.5, linear, fade + animation = fadeLayersIn, 1, 1.79, almostLinear + animation = fadeLayersOut, 1, 1.39, almostLinear + animation = workspaces, 1, 1.94, almostLinear, fade + animation = workspacesIn, 1, 1.21, almostLinear, fade + animation = workspacesOut, 1, 1.94, almostLinear, fade +} + +# Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/ +# "Smart gaps" / "No gaps when only" +# uncomment all if you wish to use that. +# workspace = w[tv1], gapsout:0, gapsin:0 +# workspace = f[1], gapsout:0, gapsin:0 +# windowrule = bordersize 0, floating:0, onworkspace:w[tv1] +# windowrule = rounding 0, floating:0, onworkspace:w[tv1] +# windowrule = bordersize 0, floating:0, onworkspace:f[1] +# windowrule = rounding 0, floating:0, onworkspace:f[1] + +# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more +dwindle { + pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = true # You probably want this +} + +# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more +master { + new_status = master +} + +# https://wiki.hyprland.org/Configuring/Variables/#misc +misc { + force_default_wallpaper = 1 # 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. :( +} + + +############# +### INPUT ### +############# + +# https://wiki.hyprland.org/Configuring/Variables/#input +input { + kb_layout = us + kb_variant = + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. + + touchpad { + natural_scroll = false + } +} + +# 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 { + name = epic-mouse-v1 + sensitivity = -0.5 +} + + +################### +### KEYBINDINGS ### +################### + +# See https://wiki.hyprland.org/Configuring/Keywords/ +$mainMod = SUPER # Sets "Windows" 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, D, exec, discord +bind = $mainMod, M, exec, minecraft-launcher +bind = $mainMod, L, exec, hyprlock +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 + +# Move focus with mainMod + arrow keys +bind = $mainMod, left, movefocus, l +bind = $mainMod, right, movefocus, r +bind = $mainMod, up, movefocus, u +bind = $mainMod, down, movefocus, d + +# Switch workspaces with mainMod + [0-9] +bind = $mainMod, 1, workspace, 1 +bind = $mainMod, 2, workspace, 2 +bind = $mainMod, 3, workspace, 3 +bind = $mainMod, 4, workspace, 4 +bind = $mainMod, 5, workspace, 5 +bind = $mainMod, 6, workspace, 6 +bind = $mainMod, 7, workspace, 7 +bind = $mainMod, 8, workspace, 8 +bind = $mainMod, 9, workspace, 9 +bind = $mainMod, 0, workspace, 10 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod SHIFT, 1, movetoworkspace, 1 +bind = $mainMod SHIFT, 2, movetoworkspace, 2 +bind = $mainMod SHIFT, 3, movetoworkspace, 3 +bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, 5, movetoworkspace, 5 +bind = $mainMod SHIFT, 6, movetoworkspace, 6 +bind = $mainMod SHIFT, 7, movetoworkspace, 7 +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 + +# Scroll through existing workspaces with mainMod + scroll +bind = $mainMod, mouse_down, workspace, e+1 +bind = $mainMod, mouse_up, workspace, e-1 + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow + +# Laptop multimedia keys for volume and LCD brightness +bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ +bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle +bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle +bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+ +bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%- + +# Requires playerctl +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 new file mode 100644 index 0000000..2f4fb64 --- /dev/null +++ b/config/hypr/hyprlock.conf @@ -0,0 +1,94 @@ +$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 + +background { + color = rgba(181818FF) + # path = {{ SWWW_WALL }} + + # path = screenshot + # blur_size = 15 + # blur_passes = 4 +} +input-field { + monitor = + size = 250, 50 + outline_thickness = 2 + dots_size = 0.1 + dots_spacing = 0.3 + outer_color = $entry_border_color + inner_color = $entry_background_color + font_color = $entry_color + fade_on_empty = true + + position = 0, 20 + halign = center + valign = center +} + +label { # Caps Lock Warning + monitor = + text = cmd[update:250] ${XDG_CONFIG_HOME:-$HOME/.config}/hypr/hyprlock/check-capslock.sh + color = $text_color + font_size = 13 + font_family = $font_family + position = 0, -25 + halign = center + valign = center +} + +label { # Clock + monitor = + text = $TIME12 + color = $text_color + font_size = 65 + font_family = $font_family_clock + + position = 0, 300 + halign = center + valign = center +} +label { # Date + monitor = + text = cmd[update:5000] date +"%A, %B %d" + 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 { # Status + monitor = + text = cmd[update:5000] ${XDG_CONFIG_HOME:-$HOME/.config}/hypr/hyprlock/status.sh + color = $text_color + font_size = 14 + font_family = $font_family + + position = 30, -30 + halign = left + valign = top +} diff --git a/config/hypr/hyprlock/check-capslock.sh b/config/hypr/hyprlock/check-capslock.sh new file mode 100755 index 0000000..ca56178 --- /dev/null +++ b/config/hypr/hyprlock/check-capslock.sh @@ -0,0 +1,9 @@ +#!/bin/env bash + +MAIN_KB_CAPS=$(hyprctl devices | grep -B 6 "main: yes" | grep "capsLock" | head -1 | awk '{print $2}') + +if [ "$MAIN_KB_CAPS" = "yes" ]; then + echo "Caps Lock active" +else + echo "" +fi diff --git a/config/hypr/hyprlock/status.sh b/config/hypr/hyprlock/status.sh new file mode 100755 index 0000000..dd80633 --- /dev/null +++ b/config/hypr/hyprlock/status.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +############ Variables ############ +enable_battery=false +battery_charging=false + +####### Check availability ######## +for battery in /sys/class/power_supply/*BAT*; do + if [[ -f "$battery/uevent" ]]; then + enable_battery=true + if [[ $(cat /sys/class/power_supply/*/status | head -1) == "Charging" ]]; then + battery_charging=true + fi + break + fi +done + +############# Output ############# +if [[ $enable_battery == true ]]; then + if [[ $battery_charging == true ]]; then + echo -n "(+) " + fi + echo -n "$(cat /sys/class/power_supply/*/capacity | head -1)"% + if [[ $battery_charging == false ]]; then + echo -n " remaining" + fi +fi + +echo '' \ No newline at end of file diff --git a/config/hypr/hyprpaper.conf b/config/hypr/hyprpaper.conf new file mode 100644 index 0000000..caac433 --- /dev/null +++ b/config/hypr/hyprpaper.conf @@ -0,0 +1,2 @@ +preload = ./in-the-clouds.jpg +wallpaper = , ./in-the-clouds.jpg diff --git a/config/hypr/hyprsunset.conf b/config/hypr/hyprsunset.conf new file mode 100644 index 0000000..df777e4 --- /dev/null +++ b/config/hypr/hyprsunset.conf @@ -0,0 +1,12 @@ +max-gamma = 150 + +profile { + time = 7:30 + identity = true +} + +profile { + time = 23:00 + temperature = 5500 + gamma = 0.8 +} diff --git a/config/hypr/in-the-clouds.jpg b/config/hypr/in-the-clouds.jpg new file mode 100644 index 0000000..c0055a8 Binary files /dev/null and b/config/hypr/in-the-clouds.jpg differ diff --git a/config/hypr/shaders/chromatic_abberation.frag b/config/hypr/shaders/chromatic_abberation.frag new file mode 100644 index 0000000..5389241 --- /dev/null +++ b/config/hypr/shaders/chromatic_abberation.frag @@ -0,0 +1,24 @@ +// vim: set ft=glsl: + +precision highp float; +varying highp vec2 v_texcoord; +uniform highp sampler2D tex; + +#define STRENGTH 0.0027 + +void main() { + vec2 center = vec2(0.5, 0.5); + vec2 offset = (v_texcoord - center) * STRENGTH; + + float rSquared = dot(offset, offset); + float distortion = 1.0 + 1.0 * rSquared; + vec2 distortedOffset = offset * distortion; + + vec2 redOffset = vec2(distortedOffset.x, distortedOffset.y); + vec2 blueOffset = vec2(distortedOffset.x, distortedOffset.y); + + vec4 redColor = texture2D(tex, v_texcoord + redOffset); + vec4 blueColor = texture2D(tex, v_texcoord + blueOffset); + + gl_FragColor = vec4(redColor.r, texture2D(tex, v_texcoord).g, blueColor.b, 1.0); +} diff --git a/config/hypr/shaders/crt.frag b/config/hypr/shaders/crt.frag new file mode 100644 index 0000000..a37ff9f --- /dev/null +++ b/config/hypr/shaders/crt.frag @@ -0,0 +1,511 @@ +#version 100 +precision highp float; +varying highp vec2 v_texcoord; +varying highp vec3 v_pos; +uniform highp sampler2D tex; +uniform lowp float time; + +#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 + +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; +} + diff --git a/config/hypr/shaders/drugs.frag b/config/hypr/shaders/drugs.frag new file mode 100644 index 0000000..1190ed0 --- /dev/null +++ b/config/hypr/shaders/drugs.frag @@ -0,0 +1,42 @@ + +precision highp float; +varying vec2 v_texcoord; +uniform sampler2D tex; +uniform float time; + +void warpco(inout vec2 tc) { + tc -= 0.5; + tc *= length(tc) * 2.0; + tc += 0.5; +} + +float rand1d(float seed) { + return sin(seed*1454.0); +} + +float rand2d(vec2 co) +{ + return fract(sin(dot(co.xy, vec2(12.9898,78.233))) * 43758.5453); +} + +vec3 rgb(in vec2 tc, float freq, float amp, inout vec4 centre) { + vec2 off = vec2(1.0/800.0, 0.0) * sin(tc.t * freq + time) * amp; + vec2 off2 = vec2(1.0/800.0, 0.0) * sin(tc.t * freq - time * 1.5) * amp; + centre = texture2D(tex, tc); + return vec3(texture2D(tex, tc-off).r, centre.g, texture2D(tex, tc+off2).b); +} + +void main() { + // vec2 px = 1.0 / textureSize(tex, 0).st; + vec2 tc = v_texcoord; + warpco(tc); + tc = mix(v_texcoord, tc, sin(time * 2.0)*0.07); + tc.x += rand2d(floor(tc * 20.0 + floor(time * 2.5))) * 0.01; + tc.x += rand1d(floor(tc.x * 40.0)) * 0.005 * rand1d(time * 0.001); + tc.y += sin(tc.x + time) * 0.02; + vec4 centre; + vec3 bent = rgb(tc, 100.0, 5.0, centre); + vec3 col = mix(centre.rgb, bent, sin(time)); + gl_FragColor = vec4(col, centre.a); + // gl_FragColor = vec4(texture2D(tex, v_texcoord)); +} \ No newline at end of file diff --git a/config/hypr/shaders/extradark.frag b/config/hypr/shaders/extradark.frag new file mode 100644 index 0000000..a8ed613 --- /dev/null +++ b/config/hypr/shaders/extradark.frag @@ -0,0 +1,21 @@ +// vim: set ft=glsl: +// blue light filter shader +// values from https://reshade.me/forum/shader-discussion/3673-blue-light-filter-similar-to-f-lux + +precision mediump float; +varying vec2 v_texcoord; +uniform sampler2D tex; + +void main() { + + vec4 pixColor = texture2D(tex, v_texcoord); + + // red + //pixColor[0] *= 2; + // green + //pixColor[1] *= 2; + // blue + pixColor[2] *= 0.1; + + gl_FragColor = pixColor; +} diff --git a/config/hypr/shaders/invert.frag b/config/hypr/shaders/invert.frag new file mode 100644 index 0000000..864f718 --- /dev/null +++ b/config/hypr/shaders/invert.frag @@ -0,0 +1,13 @@ +// vim: set ft=glsl: +// blue light filter shader +// values from https://reshade.me/forum/shader-discussion/3673-blue-light-filter-similar-to-f-lux + +precision mediump float; +varying vec2 v_texcoord; +uniform sampler2D tex; + +void main() { + vec4 pixColor = texture2D(tex, v_texcoord); + pixColor.rgb = 1.0 - pixColor.rgb; + gl_FragColor = pixColor; +} \ No newline at end of file diff --git a/config/hypr/shaders/solarized.frag b/config/hypr/shaders/solarized.frag new file mode 100644 index 0000000..1c37f2c --- /dev/null +++ b/config/hypr/shaders/solarized.frag @@ -0,0 +1,41 @@ +// -*- mode:c -*- +precision lowp float; +varying vec2 v_texcoord; +uniform sampler2D tex; + +float distanceSquared(vec3 pixColor, vec3 solarizedColor) { + vec3 distanceVector = pixColor - solarizedColor; + return dot(distanceVector, distanceVector); +} + +void main() { + vec3 solarized[16]; + solarized[0] = vec3(0.,0.169,0.212); + solarized[1] = vec3(0.027,0.212,0.259); + solarized[2] = vec3(0.345,0.431,0.459); + solarized[3] = vec3(0.396,0.482,0.514); + solarized[4] = vec3(0.514,0.58,0.588); + solarized[5] = vec3(0.576,0.631,0.631); + solarized[6] = vec3(0.933,0.91,0.835); + solarized[7] = vec3(0.992,0.965,0.89); + solarized[8] = vec3(0.71,0.537,0.); + solarized[9] = vec3(0.796,0.294,0.086); + solarized[10] = vec3(0.863,0.196,0.184); + solarized[11] = vec3(0.827,0.212,0.51); + solarized[12] = vec3(0.424,0.443,0.769); + solarized[13] = vec3(0.149,0.545,0.824); + solarized[14] = vec3(0.165,0.631,0.596); + solarized[15] = vec3(0.522,0.6,0.); + + vec3 pixColor = vec3(texture2D(tex, v_texcoord)); + int closest = 0; + float closestDistanceSquared = distanceSquared(pixColor, solarized[0]); + for (int i = 1; i < 15; i++) { + float newDistanceSquared = distanceSquared(pixColor, solarized[i]); + if (newDistanceSquared < closestDistanceSquared) { + closest = i; + closestDistanceSquared = newDistanceSquared; + } + } + gl_FragColor = vec4(solarized[closest], 1.); +} diff --git a/config/ironbar/config.toml b/config/ironbar/config.toml new file mode 100644 index 0000000..3b98eac --- /dev/null +++ b/config/ironbar/config.toml @@ -0,0 +1,48 @@ +position = "top" +height = 24 + +[[start]] +type = "menu" +label = "" # "󰣇 btw" +label_icon = "/opt/archlinux-icons/archlinux-icon-crystal-256.svg" +label_icon_size = 24 + +[[start]] +type = "workspaces" +favorites = ["1", "2", "3", "4", "5"] + +[[start]] +type = "focused" +truncate = { mode = "end", max_length = 50 } +icon_size = 16 + +[[center]] +type = "clock" +format = "%-l:%M %p" +format_popup = "%m/%d/%Y %-r" + +[[end]] +type = "music" + +[[end]] +type = "volume" +sink_slider_orientation = "horizontal" +source_slider_orientation = "horizontal" +icon_size = 25 + +[[end]] +type = "sys_info" +format = [ + # "C {cpu_percent: <1}%", + # "M {memory_percent: <1}%", + # "T {temp_c: <1}°C" + " {cpu_percent: <1}%", + " {memory_percent: <1}%", + "󰔏 {temp_c: <1}°C" +] +icon_size = 20 + +[end.interval] +cpu = 1 +memory = 1 +temp = 1 diff --git a/config/ironbar/style.css b/config/ironbar/style.css new file mode 100644 index 0000000..db5ba70 --- /dev/null +++ b/config/ironbar/style.css @@ -0,0 +1,128 @@ +:root { + --color-dark-primary: #1c1c1c; + --color-dark-secondary: #2d2d2d; + --color-white: #fff; + --color-active: #e7deff; + --color-urgent: #8f0a0a; + + --margin-lg: 1em; + --margin-sm: 0.5em; +} + +* { + border-radius: 0; + border: none; + box-shadow: none; + background-image: none; + font-family: "Maple Mono NF"; +} + +scale > trough { + background-color: var(--color-dark-secondary); +} + +scale > trough > highlight { + background-color: var(--color-active); + border-style: solid; + border-color: var(--color-active); + border-width: 0.2em; +} + +scale > trough > slider { + background-color: var(--color-white); + border-radius: 1em; +} + +switch > slider { + background-color: var(--color-white); +} + +switch:checked { + background-color: var(--color-active); +} + +switch:not(:checked) { + background-color: var(--color-dark-secondary); +} + +popover, popover contents, calendar { + background-color: var(--color-dark-primary); +} + +#bar, .background { + background-color: rgba(28, 28, 28, 0.5); +} + +box, button, label { + background-color: #0000; + color: var(--color-white); +} + +button { + border-radius: 1em; + padding-left: var(--margin-sm); + padding-right: var(--margin-sm); +} + +button:hover, button:active { + background-color: var(--color-dark-secondary); +} + +#end > * + * { + margin-left: var(--margin-lg); +} + +.menu { + padding: 0; +} + +.menu > box { + /* background-color: white; */ + padding-left: 4px; /* Really weird fix here since there's a min-width value somewhere I cannot change. */ +} + +.sysinfo > * + * { + /* margin-left: var(--margin-sm); */ +} + +.clock { + font-weight: bold; +} + +.popup-clock .calendar-clock { + font-size: 1.5em; +} + +.popup-clock .calendar .day-number { + border-radius: 1em; +} + +.popup-clock .calendar .today { + background-color: var(--color-active); + color: var(--color-dark-primary); +} + +.popup-clock .calendar .day-number:focus, .popup-clock .calendar .day-number:selected { + outline-color: var(--color-active); +} + +.workspaces, .sysinfo { + margin-right: 0.5em; +} + +.workspaces .item.visible { + /* box-shadow: inset 0 -1px var(--color-white); */ +} + +.workspaces .item.focused { + /* box-shadow: inset 0 -1px var(--color-active); */ + background-color: var(--color-dark-secondary); +} + +.workspaces .item.urgent { + background-color: var(--color-urgent); +} + +button > .background, button contents { + border-radius: 1em; +} diff --git a/config/nushell/config.nu b/config/nushell/config.nu new file mode 100644 index 0000000..6b6aab5 --- /dev/null +++ b/config/nushell/config.nu @@ -0,0 +1,41 @@ +# config.nu +# +# Installed by: +# version = "0.110.0" +# +# This file is used to override default Nushell settings, define +# (or import) custom commands, or run any other startup tasks. +# See https://www.nushell.sh/book/configuration.html +# +# Nushell sets "sensible defaults" for most configuration settings, +# so your `config.nu` only needs to override these defaults if desired. +# +# You can open this file in your default editor using: +# config nu +# +# You can also pretty-print and page through the documentation for configuration +# options using: +# config nu --doc | nu-highlight | less -R +dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=cosmic + +$env.EDITOR = "helix" +$env.config.buffer_editor = $env.EDITOR + +$env.GPG_TTY = (tty) + +$env.LANG = "en_US.UTF-8" + +$env.config.show_banner = false + +$env.PROMPT_INDICATOR = "$ " + +$env.PROMPT_COMMAND = { $"[(pwd | path basename)@(sys host | get hostname)]" } + +$env.config.table.mode = "psql" + +$env.VPN_GATEWAY = "" + +def gp [] { sudo gpclient --fix-openssl connect $env.VPN_GATEWAY } +def virt [] { sudo /usr/bin/modprobe v4l2loopback exclusive_caps=1 card_label=OBS Virtual Camera } +def c [] { cosmic-session } +def h [] { dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=hyprland; start-hyprland } diff --git a/config/waybar/config.jsonc b/config/waybar/config.jsonc new file mode 100644 index 0000000..619ed1e --- /dev/null +++ b/config/waybar/config.jsonc @@ -0,0 +1,29 @@ +// -*- mode: jsonc -*- +{ + "layer": "top", // Waybar at top layer + "position": "top", // Waybar position (top|bottom|left|right) + "height": 42, // Waybar height (to be removed for auto height) + // "width": 1280, // Waybar width + "spacing": 4, // Gaps between modules (4px) + // Choose the order of the modules + "modules-left": [ + "custom/arch", + "hyprland/workspaces", + "hyprland/window" + ], + "modules-center": [ + "clock" + ], + "modules-right": [ + "idle_inhibitor", + "pulseaudio", + "cpu", + "memory", + "temperature" + ], + //Modules configuration + + "include": [ + "~/.config/waybar/modules.json" + ] +} diff --git a/config/waybar/modules.json b/config/waybar/modules.json new file mode 100644 index 0000000..94e0038 --- /dev/null +++ b/config/waybar/modules.json @@ -0,0 +1,95 @@ +{ + "custom/arch": { + "format": "󰣇", + "tooltip": true, + "tooltip-format": "btw" + }, + + + "hyprland/workspaces": { + "disable-scroll": true, + "all-outputs": true, + "warp-on-scroll": false, + "format": "{name}", + "format-icons": { + "urgent": "", + "active": "", + "default": "" + } + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "pulseaudio": { + "format": "{icon} {volume}%", + "format-bluetooth": "{icon} {volume}%  {format_source}", + "format-bluetooth-muted": " {icon} {format_source}", + "format-muted": " {format_source}", + "format-source": " {volume}%", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""] + }, + "on-click": "pavucontrol" + }, + "network": { + "format-wifi": " {essid} ({signalStrength}%)", + "format-ethernet": "{ipaddr}/{cidr} ", + "tooltip-format": "{ifname} via {gwaddr} ", + "format-linked": "{ifname} (No IP) ", + "format-disconnected": "Disconnected ⚠", + "on-click": "sh ~/scripts/rofi-wifi-menu/rofi-wifi-menu.sh" + + }, + "cpu": { + "format": "CPU {usage}%", + "tooltip": true + }, + "memory": { + "format": "MEMORY {}%", + "tooltip": true + }, + "temperature": { + "interval": 10, + "hwmon-path": "/sys/devices/platform/coretemp.0/hwmon/hwmon4/temp1_input", + "critical-threshold": 100, + "format-critical": " {temperatureC}", + "format": " {temperatureC}°C" + }, + "hyprland/language": { + "format": " {}", + "format-en": "EN", + "format-ru": "RU" + }, + "battery": { + "states": { + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + "format-full": "{icon} {capacity}%", + "format-charging": " {capacity}%", + "format-plugged": " {capacity}%", + "format-alt": "{time} {icon}", + "format-icons": ["", "", "", "", ""] + }, + "battery#bat2": { + "bat": "BAT2" + }, + "clock": { + "format": "{:%I:%M %p} ", + "tooltip-format": "{:%Y %B}\n{calendar}", + "format-alt": "{:%A, %b %d, %Y at %r}" + } + +} diff --git a/config/waybar/style.css b/config/waybar/style.css new file mode 100644 index 0000000..a6fb254 --- /dev/null +++ b/config/waybar/style.css @@ -0,0 +1,112 @@ +* { + /* `otf-font-awesome` and SpaceMono Nerd Font are required to be installed for icons */ + font-family: "Fira Sans Semibold", FontAwesome, Roboto, Helvetica, Arial, sans-serif; + font-size: 15px; + transition: background-color .3s ease-out; +} + +window#waybar { + background: rgba(26, 27, 38, 0.75); + color: #c0caf5; + font-family: + SpaceMono Nerd Font, + feather; + transition: background-color .5s; +} + +.modules-left, +.modules-center, +.modules-right +{ + background: rgba(0, 0, 8, .7); + margin: 5px 10px; + padding: 0 5px; + border-radius: 15px; +} +.modules-left { + padding: 0; + padding-right: 10px; +} +#window { + padding-left: 3px; +} + +.modules-center { + padding: 0 10px; +} + +#clock, +#battery, +#cpu, +#memory, +#disk, +#temperature, +#backlight, +#network, +#pulseaudio, +#wireplumber, +#custom-media, +#tray, +#mode, +#idle_inhibitor, +#scratchpad, +#power-profiles-daemon, +#language, +#mpd { + padding: 0 10px; + border-radius: 15px; +} + +#clock:hover, +#battery:hover, +#cpu:hover, +#memory:hover, +#disk:hover, +#temperature:hover, +#backlight:hover, +#network:hover, +#pulseaudio:hover, +#wireplumber:hover, +#custom-media:hover, +#tray:hover, +#mode:hover, +#idle_inhibitor:hover, +#scratchpad:hover, +#power-profiles-daemon:hover, +#language:hover, +#mpd:hover { + background: rgba(26, 27, 38, 0.9); +} + + +#workspaces button { + background: transparent; + font-family: + SpaceMono Nerd Font, + feather; + font-weight: 900; + font-size: 13pt; + color: #c0caf5; + border:none; + border-radius: 15px; +} + +#workspaces button.active { + background: #13131d; +} + +#workspaces button:hover { + background: #11111b; + color: #cdd6f4; + box-shadow: none; +} + +#custom-arch { + margin-left: 5px; + padding: 0 10px; + font-size: 25px; + transition: color .5s; +} +#custom-arch:hover { + color: #1793d1; +} diff --git a/local/share/applications/helium.desktop b/local/share/applications/helium.desktop new file mode 100644 index 0000000..8532c29 --- /dev/null +++ b/local/share/applications/helium.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Helium Browser +StartupWMClass=Helium Browser +Comment=A browser built on ungoogled-chromium +GenericName=Helium Browser +Exec=/usr/bin/helium +Type=Application +Categories=Network;WebBrowser; +Path=/usr/bin