Update all dotfiles

This commit is contained in:
2025-05-22 17:56:05 -05:00
parent 0280a88a7b
commit 4bb042584b
1651 changed files with 60533 additions and 2672 deletions

View File

@ -0,0 +1,125 @@
# -----------------------------------------------------
# "Dynamic" (default)
# -----------------------------------------------------
animations {
enabled = true
bezier = wind, 0.05, 0.9, 0.1, 1.05
bezier = winIn, 0.1, 1.1, 0.1, 1.1
bezier = winOut, 0.3, -0.3, 0, 1
bezier = liner, 1, 1, 1, 1
animation = windows, 1, 6, wind, slide
animation = windowsIn, 1, 6, winIn, slide
animation = windowsOut, 1, 5, winOut, slide
animation = windowsMove, 1, 5, wind, slide
animation = border, 1, 1, liner
animation = borderangle, 1, 30, liner, once
animation = fade, 1, 10, default
animation = workspaces, 1, 5, wind
}
# -----------------------------------------------------
# "Disabled"
# -----------------------------------------------------
#animations {
#enabled = false
#}
# -----------------------------------------------------
# "Standard"
# -----------------------------------------------------
#animations {
#enabled = true
#bezier = myBezier, 0.05, 0.9, 0.1, 1.05
#animation = windows, 1, 7, myBezier
#animation = windowsOut, 1, 7, default, popin 80%
#animation = border, 1, 10, default
#animation = borderangle, 1, 8, default
#animation = fade, 1, 7, default
#animation = workspaces, 1, 6, default
#}
# -----------------------------------------------------
# "Dynamic"
# -----------------------------------------------------
#animations {
#enabled = true
#bezier = wind, 0.05, 0.9, 0.1, 1.05
#bezier = winIn, 0.1, 1.1, 0.1, 1.1
#bezier = winOut, 0.3, -0.3, 0, 1
#bezier = liner, 1, 1, 1, 1
#animation = windows, 1, 6, wind, slide
#animation = windowsIn, 1, 6, winIn, slide
#animation = windowsOut, 1, 5, winOut, slide
#animation = windowsMove, 1, 5, wind, slide
#animation = border, 1, 1, liner
#animation = borderangle, 1, 30, liner, loop
#animation = fade, 1, 10, default
#animation = workspaces, 1, 5, wind
#}
# -----------------------------------------------------
# "Classic"
# -----------------------------------------------------
#animations {
#enabled = true
#bezier = myBezier, 0.05, 0.9, 0.1, 1.05
#animation = windows, 1, 7, myBezier
#animation = windowsOut, 1, 7, default, popin 80%
#animation = border, 1, 10, default
#animation = borderangle, 1, 8, default
#animation = fade, 1, 7, default
#animation = workspaces, 1, 6, default
#}
# -----------------------------------------------------
# "Fast"
# -----------------------------------------------------
#animations {
#enabled = true
#bezier = linear, 0, 0, 1, 1
#bezier = md3_standard, 0.2, 0, 0, 1
#bezier = md3_decel, 0.05, 0.7, 0.1, 1
#bezier = md3_accel, 0.3, 0, 0.8, 0.15
#bezier = overshot, 0.05, 0.9, 0.1, 1.1
#bezier = crazyshot, 0.1, 1.5, 0.76, 0.92
#bezier = hyprnostretch, 0.05, 0.9, 0.1, 1.0
#bezier = fluent_decel, 0.1, 1, 0, 1
#bezier = easeInOutCirc, 0.85, 0, 0.15, 1
#bezier = easeOutCirc, 0, 0.55, 0.45, 1
#bezier = easeOutExpo, 0.16, 1, 0.3, 1
#animation = windows, 1, 3, md3_decel, popin 60%
#animation = border, 1, 10, default
#animation = fade, 1, 2.5, md3_decel
#animation = workspaces, 1, 3.5, easeOutExpo, slide
#animation = specialWorkspace, 1, 3, md3_decel, slidevert
#}
# -----------------------------------------------------
# "High"
# -----------------------------------------------------
#animations {
#enabled = true
#bezier = wind, 0.05, 0.9, 0.1, 1.05
#bezier = winIn, 0.1, 1.1, 0.1, 1.1
#bezier = winOut, 0.3, -0.3, 0, 1
#bezier = liner, 1, 1, 1, 1
#animation = windows, 1, 6, wind, slide
#animation = windowsIn, 1, 6, winIn, slide
#animation = windowsOut, 1, 5, winOut, slide
#animation = windowsMove, 1, 5, wind, slide
#animation = border, 1, 1, liner
#animation = borderangle, 1, 30, liner, loop
#animation = fade, 1, 10, default
#animation = workspaces, 1, 5, wind
#}
# -----------------------------------------------------
# "Moving"
# -----------------------------------------------------
#animations {
#enabled = true
#bezier = overshot, 0.05, 0.9, 0.1, 1.05
#bezier = smoothOut, 0.5, 0, 0.99, 0.99
#bezier = smoothIn, 0.5, -0.5, 0.68, 1.5
#animation = windows, 1, 5, overshot, slide
#animation = windowsOut, 1, 3, smoothOut
#animation = windowsIn, 1, 3, smoothOut
#animation = windowsMove, 1, 4, smoothIn, slide
#animation = border, 1, 5, default
#animation = fade, 1, 5, smoothIn
#animation = fadeDim, 1, 5, smoothIn
#animation = workspaces, 1, 6, default
#}

View File

@ -0,0 +1,48 @@
# ___ __ __ __
# / _ |__ __/ /____ ___ / /____ _____/ /_
# / __ / // / __/ _ \(_-</ __/ _ `/ __/ __/
# /_/ |_\_,_/\__/\___/___/\__/\_,_/_/ \__/
#
# Setup XDG for screen sharing and start waypaper and waybar
exec-once = ~/.config/hypr/scripts/xdg.sh
# Load Wallpaper
exec-once = ~/.config/hypr/scripts/wallpaper-restore.sh
# Start Polkit
exec-once=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
# Load Notification Daemon
exec-once = ~/.config/ml4w/settings/notification.sh
# Load GTK settings
exec-once = ~/.config/hypr/scripts/gtk.sh
# Using hypridle to start hyprlock
exec-once = hypridle
# Load cliphist history
exec-once = wl-paste --watch cliphist store
# Autostart ML4W App
exec-once = ~/.config/ml4w/scripts/ml4w-autostart.sh
# Start ags
exec-once = ~/.config/ml4w/scripts/ags.sh
# Start autostart cleanup
exec-once = ~/.config/hypr/scripts/cleanup.sh
# Load configuration from ML4W Hyprland Settings App
exec = ~/.config/ml4w-hyprland-settings/hyprctl.sh
# Dock
exec-once = ~/.config/nwg-dock-hyprland/launch.sh
# Apps
exec-once = nextcloud --background
exec-once = bitwarden
exec-once = startsunshine
exec-once = /home/gib/.local/share/JetBrains/Toolbox/bin/jetbrains-toolbox --minimize
exec-once = flatpak run app.bluebubbles.BlueBubbles minimized

View File

@ -0,0 +1,24 @@
# Add your additional Hyprland configurations here
#
# This is an additional key binding
# bind = $mainMod CTRL, up, workspace, empty
#
# Example for xwayland
# xwayland {
# force_zero_scaling = true
# }
# qt5ct environment variable
# env = QT_QPA_PLATFORMTHEME,qt5ct
# SDL version
env = SDL_VIDEODRIVER,wayland
# env = SDL_VIDEODRIVER,x11
# No Hardware Cursor
# cursor {
# no_hardware_cursors = false
# }
# Blur for waybar
#layerrule = blur, waybar

View File

@ -0,0 +1,168 @@
# -----------------------------------------------------
# Default
# -----------------------------------------------------
decoration {
rounding = 10
active_opacity = 1.0
inactive_opacity = 0.8
fullscreen_opacity = 1.0
blur {
enabled = true
size = 6
passes = 2
new_optimizations = on
ignore_opacity = true
xray = true
# blurls = waybar
}
shadow {
enabled = true
range = 30
render_power = 3
color = 0x66000000
}
}
# -----------------------------------------------------
# Rounding
# -----------------------------------------------------
#decoration {
#rounding = 10
#active_opacity = 1.0
#inactive_opacity = 0.8
#fullscreen_opacity = 1.0
#blur {
#enabled = true
#size = 6
#passes = 2
#new_optimizations = on
#ignore_opacity = true
#xray = true
## blurls = waybar
#}
#shadow {
#enabled = true
#range = 30
#render_power = 3
#color = 0x66000000
#}
#}
# -----------------------------------------------------
# Rounding All Blur
# -----------------------------------------------------
#decoration {
#rounding = 10
#active_opacity = 0.9
#inactive_opacity = 0.6
#fullscreen_opacity = 0.9
#blur {
#enabled = true
#size = 12
#passes = 4
#new_optimizations = on
#ignore_opacity = true
#xray = true
#blurls = waybar
#}
#shadow {
#enabled = true
#range = 30
#render_power = 3
#color = 0x66000000
#}
#}
# -----------------------------------------------------
# Rounding, All Blur No Shadows
# -----------------------------------------------------
#decoration {
#rounding = 10
#active_opacity = 0.9
#inactive_opacity = 0.6
#fullscreen_opacity = 0.9
#blur {
#enabled = true
#size = 12
#passes = 4
#new_optimizations = on
#ignore_opacity = true
#xray = true
#blurls = waybar
#}
#shadow {
#enabled = false
#range = 30
#render_power = 3
#color = 0x66000000
#}
#}
# -----------------------------------------------------
# Rounding, More Blur
# -----------------------------------------------------
#decoration {
#rounding = 10
#active_opacity = 1.0
#inactive_opacity = 0.6
#fullscreen_opacity = 1.0
#blur {
#enabled = true
#size = 12
#passes = 6
#new_optimizations = on
#ignore_opacity = true
#xray = true
## blurls = waybar
#}
#shadow {
#enabled = true
#range = 30
#render_power = 3
#color = 0x66000000
#}
#}
# -----------------------------------------------------
# No Rounding
# -----------------------------------------------------
#decoration {
#rounding = 0
#active_opacity = 1.0
#inactive_opacity = 0.8
#fullscreen_opacity = 1.0
#blur {
#enabled = true
#size = 6
#passes = 2
#new_optimizations = on
#ignore_opacity = true
#xray = true
## blurls = waybar
#}
#shadow {
#enabled = true
#range = 30
#render_power = 3
#color = 0x66000000
#}
#}
# -----------------------------------------------------
# No Rounding, More Blur
# -----------------------------------------------------
#decoration {
#rounding = 0
#active_opacity = 1.0
#inactive_opacity = 0.6
#fullscreen_opacity = 1.0
#blur {
#enabled = true
#size = 12
#passes = 6
#new_optimizations = on
#ignore_opacity = true
#xray = true
## blurls = waybar
#}
#shadow {
#enabled = true
#range = 30
#render_power = 3
#color = 0x66000000
#}
#}

View File

@ -0,0 +1,134 @@
# -----------------------------------------------------
# Keybingings
# -----------------------------------------------------
# -----------------------------------------------------
# SUPER KEY
# -----------------------------------------------------
$mainMod = SUPER
$altMod = ALT
# -----------------------------------------------------
# VARIABLES
# -----------------------------------------------------
$HYPRSCRIPTS = ~/.config/hypr/scripts
$SCRIPTS = ~/.config/ml4w/scripts
# -----------------------------------------------------
# DEFAULT APPLICATIONS
# -----------------------------------------------------
$terminal = kitty
$fileManager = nautilus
$browser = firefox
$menu = pkill rofi || rofi -show drun -replace
$calculator = gnome-calculator
# -----------------------------------------------------
# DEFAULT COMMANDS
# -----------------------------------------------------
$quitwindow = killactive
$forcequit = hyprctl activewindow | grep pid | tr -d 'pid:' | xargs kill
# -----------------------------------------------------
# DEFAULT APPLICATION BINDINGS
# -----------------------------------------------------
bind = $mainMod, T, exec, $terminal
bind = $mainMod, W, exec, $browser
bind = $mainMod, F, exec, $fileManager
bind = $mainMod, C, exec, $calculator
bind = $mainMod, D, exec, $menu
bind = $altMod, D, exec, nwg-dock-hyprland
# -----------------------------------------------------
# DEFAULT WINDOW BINDINGS
# -----------------------------------------------------
bind = $mainMod, Q, $quitwindow
bind = $mainMod SHIFT, Q, exec, $forcequit
bind = $mainMod, M, fullscreen, 1
bind = $mainMod SHIFT, M, fullscreen, 0
bind = $mainMod, E, togglefloating
bind = $mainMod SHIFT, E, exec, $HYPRSCRIPTS/toggleallfloat.sh
bind = $mainMod, X, togglesplit
bind = $mainMod, Z, swapsplit
bind = $mainMod, H, movefocus, l
bind = $mainMod, L, movefocus, r
bind = $mainMod, K, movefocus, u
bind = $mainMod, J, movefocus, d
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
bind = $mainMod CTRL, L, resizeactive, 100 0
bind = $mainMod CTRL, H, resizeactive, -100 0
bind = $mainMod CTRL, J, resizeactive, 0 100
bind = $mainMod CTRL, K, resizeactive, 0 -100
# -----------------------------------------------------
# ACTIONS
# -----------------------------------------------------
bind = $mainMod SHIFT, A, exec, $HYPRSCRIPTS/toggle-animations.sh
bind = $mainMod, PRINT, exec, $HYPRSCRIPTS/screenshot.sh
bind = $mainMod SHIFT, S, exec, $HYPRSCRIPTS/screenshot.sh
bind = $mainMod CTRL, Q, exec, ~/.config/ml4w/scripts/wlogout.sh
bind = $mainMod SHIFT, W, exec, waypaper --random
bind = $mainMod CTRL, W, exec, waypaper
bind = $mainMod ALT, W, exec, $HYPERSCRIPTS/wallpaper-automation.sh
bind = $mainMod SHIFT, R, exec, $HYPRSCRIPTS/loadconfig.sh
bind = $mainMod, V, exec, $SCRIPTS/cliphist.sh
bind = $mainMod SHIFT, B, exec, ~/.config/waybar/launch.sh
bind = $mainMod CTRL, B, exec, ~/.config/waybar/toggle.sh
bind = $mainMod CTRL, T, exec, ~/.config/waybar/themeswitcher.sh
bind = $mainMod CTRL, S, exec, ~/.config/ml4w/apps/ML4W_Dotfiles_Settings-x86_64.AppImage
# -----------------------------------------------------
# WORKSPACES
# -----------------------------------------------------
# Move to workspace from left to right
bind = $altMod, H, workspace, -3
bind = $altMod, L, workspace, +3
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Open workspace by number
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 1, workspace, 2
bind = $mainMod, 1, workspace, 3
bind = $mainMod, 2, workspace, 3
bind = $mainMod, 2, workspace, 4
bind = $mainMod, 2, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 3, workspace, 7
bind = $mainMod, 3, workspace, 8
bind = $mainMod, 9, workspace, 9
# Move active window to workspace from left to right
bind = $mainMod SHIFT, H, movetoworkspace, -1
bind = $mainMod SHIFT, L, movetoworkspace, +1
bind = $altMod SHIFT, H, movetoworkspace, -3
bind = $altMod SHIFT, L, movetoworkspace, +3
# Move active window to workspace by number
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
# -----------------------------------------------------
# Fn Keys
# -----------------------------------------------------
bind = , XF86MonBrightnessUp, exec, brightnessctl -q s +10%
bind = , XF86MonBrightnessDown, exec, brightnessctl -q s 10%-
bind = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%
bind = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%
bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bind = , XF86AudioPlay, exec, playerctl play-pause
bind = , XF86AudioPause, exec, playerctl pause
bind = , XF86AudioNext, exec, playerctl next
bind = , XF86AudioPrev, exec, playerctl previous
bind = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle
bind = , XF86Calculator, exec, $calculator
bind = , XF86Lock, exec, hyprlock
bind = , code:238, exec, brightnessctl -d smc::kbd_backlight s +10
bind = , code:237, exec, brightnessctl -d smc::kbd_backlight s 10-

View File

@ -0,0 +1,35 @@
# -----------------------------------------------------
# Keyboard Layout
# https://wiki.hyprland.org/Configuring/Variables/#input
# -----------------------------------------------------
input {
kb_layout = us
kb_variant =
kb_model =
kb_options =
numlock_by_default = true
mouse_refocus = false
# For United States
# kb_layout = us
# kb_variant = intl
# kb_model = pc105
# kb_options =
follow_mouse = 1
touchpad {
# for desktop
natural_scroll = false
# for laptop
# natural_scroll = yes
# middle_button_emulation = true
# clickfinger_behavior = false
scroll_factor = 1.0 # Touchpad scroll factor
}
sensitivity = 0 # Pointer speed: -1.0 - 1.0, 0 means no modification.
}
gestures {
workspace_swipe = true
}

View File

@ -0,0 +1,45 @@
# -----------------------------------------------------
# Default
# -----------------------------------------------------
dwindle {
pseudotile = true
preserve_split = true
}
master {
# Commented out due to compatibility reasons
# new_status = master
}
gestures {
workspace_swipe = false
}
binds {
workspace_back_and_forth = true
allow_workspace_cycles = true
pass_mouse_when_bound = false
}
# -----------------------------------------------------
# Laptop
# -----------------------------------------------------
#dwindle {
#pseudotile = true
#preserve_split = true
#}
#master {
## Commented out due to compatibility reasons
## new_status = master
#}
#gestures {
#workspace_swipe = true
#workspace_swipe_fingers = 3
#workspace_swipe_distance = 500
#workspace_swipe_invert = true
#workspace_swipe_min_speed_to_force = 30
#workspace_swipe_cancel_ratio = 0.5
#workspace_swipe_create_new = true
#workspace_swipe_forever = true
#}
#binds {
#workspace_back_and_forth = true
#allow_workspace_cycles = true
#pass_mouse_when_bound = false
#}

View File

@ -0,0 +1,8 @@
# -----------------------------------------------------
# Misc settings
# -----------------------------------------------------
misc {
disable_hyprland_logo = true
disable_splash_rendering = true
initial_workspace_tracking = 1
}

View File

@ -0,0 +1,124 @@
# __ _____ _____ __ _____ ___
# / |/ / / / / / | /| / / / ___/__ ___ / _/
# / /|_/ / /_/_ _/ |/ |/ / / /__/ _ \/ _ \/ _/
# /_/ /_/____//_/ |__/|__/ \___/\___/_//_/_/
#
# Pavucontrol floating
windowrulev2 = float,class:(.*org.pulseaudio.pavucontrol.*)
windowrulev2 = size 700 600,class:(.*org.pulseaudio.pavucontrol.*)
windowrulev2 = center,class:(.*org.pulseaudio.pavucontrol.*)
windowrulev2 = pin,class:(.*org.pulseaudio.pavucontrol.*)
# OpenAI ChatGPT floating
windowrulev2 = float,title:(ChatGPT.*)
windowrulev2 = float,title:(.*chat.gibbyb.com.*)
windowrulev2 = size 500 50%,title:(.*chat.gibbyb.com.*)
windowrulev2 = move 20 70,title:(.*chat.gibbyb.com.*)
# ML4W Welcome App floating
windowrulev2 = float,class:(.*waypaper.*)
windowrulev2 = size 900 700,class:(.*waypaper.*)
windowrulev2 = center,class:(.*waypaper.*)
windowrulev2 = pin,class:(.*waypaper.*)
# ML4W Welcome App floating
windowrulev2 = float,class:(com.ml4w.welcome)
windowrulev2 = size 700 600,class:(com.ml4w.welcome)
windowrulev2 = center,class:(com.ml4w.welcome)
windowrulev2 = pin,class:(com.ml4w.welcome)
windowrulev2 = float,class:(ml4w-welcome.py)
windowrulev2 = size 400 500,class:(ml4w-welcome.py)
windowrulev2 = center,class:(ml4w-welcome.py)
windowrulev2 = pin,class:(ml4w-welcome.py)
# ML4W Settings App floating
windowrulev2 = float,class:(com.ml4w.dotfilessettings)
windowrulev2 = size 700 600,class:(com.ml4w.dotfilessettings)
windowrulev2 = move 10% 20%,class:(com.ml4w.dotfilessettings)
windowrulev2 = pin,class:(com.ml4w.dotfilessettings)
windowrulev2 = float,class:(ml4w-dotfiles-settings.py)
windowrulev2 = size 400 500,class:(ml4w-dotfiles-settings.py)
windowrulev2 = move 10% 20%,class:(ml4w-dotfiles-settings.py)
windowrulev2 = pin,class:(ml4w-dotfiles-settings.py)
# ML4W Hyprland App floating
windowrulev2 = float,class:(com.ml4w.hyprland.settings)
windowrulev2 = size 700 600,class:(com.ml4w.hyprland.settings)
windowrulev2 = center,class:(com.ml4w.hyprland.settings)
windowrulev2 = pin,class:(com.ml4w.hyprland.settings)
windowrulev2 = float,class:(ml4w-hyprland-settings.py)
windowrulev2 = size 700 600,class:(ml4w-hyprland-settings.py)
windowrulev2 = center,class:(ml4w-hyprland-settings.py)
windowrulev2 = pin,class:(ml4w-hyprland-settings.py)
# System Mission Center
windowrulev2 = float, class:(io.missioncenter.MissionCenter)
windowrulev2 = pin, class:(io.missioncenter.MissionCenter)
windowrulev2 = center, class:(io.missioncenter.MissionCenter)
windowrulev2 = size 900 600, class:(io.missioncenter.MissionCenter)
# System Mission Center Preference Window
windowrulev2 = float, class:(missioncenter), title:^(Preferences)$
windowrulev2 = pin, class:(missioncenter), title:^(Preferences)$
windowrulev2 = center, class:(missioncenter), title:^(Preferences)$
# Gnome Calculator
windowrulev2 = float,class:(org.gnome.Calculator)
windowrulev2 = size 700 600,class:(org.gnome.Calculator)
windowrulev2 = center,class:(org.gnome.Calculator)
# Emoji Picker Smile
windowrulev2 = float,class:(it.mijorus.smile)
windowrulev2 = pin, class:(it.mijorus.smile)
windowrulev2 = move 100%-w-40 90,class:(it.mijorus.smile)
# Hyprland Share Picker
windowrulev2 = float, class:(hyprland-share-picker)
windowrulev2 = pin, class:(hyprland-share-picker)
windowrulev2 = center, title:class:(hyprland-share-picker)
windowrulev2 = size 600 400,class:(hyprland-share-picker)
# General floating
windowrulev2 = float,class:(dotfiles-floating)
windowrulev2 = size 1000 700,class:(dotfiles-floating)
windowrulev2 = center,class:(dotfiles-floating)
windowrulev2 = pin, class:(dotfiles-floating)
# XDG Desktop Portal
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
# QT
env = QT_QPA_PLATFORM,wayland;xcb
env = QT_QPA_PLATFORMTHEME,qt6ct
env = QT_QPA_PLATFORMTHEME,qt5ct
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
# GDK
env = GDK_SCALE,1
# Toolkit Backend
env = GDK_BACKEND,wayland,x11,*
env = CLUTTER_BACKEND,wayland
# Mozilla
env = MOZ_ENABLE_WAYLAND,1
# Set the cursor size for xcursor
env = XCURSOR_SIZE,24
# Disable appimage launcher by default
env = APPIMAGELAUNCHER_DISABLE,1
# Ozone
env = OZONE_PLATFORM,wayland
env = ELECTRON_OZONE_PLATFORM_HINT,wayland
# Python
# env = PYTHONPATH,/usr/lib/python3.12/site-packages:/usr/lib/python3.13/site-packages:$PYTHONPATH

View File

@ -0,0 +1,23 @@
# -----------------------------------------------------
# NVIDIA Environment Variables
# https://wiki.hyprland.org/Nvidia/
# -----------------------------------------------------
env = GBM_BACKEND,nvidia-drm
env = LIBVA_DRIVER_NAME,nvidia
env = SDL_VIDEODRIVER,wayland
env = WLR_DRM_NO_ATOMIC,1
env = __GL_VRR_ALLOWED,1
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = __NV_PRIME_RENDER_OFFLOAD,1
env = __VK_LAYER_NV_optimus,NVIDIA_only
# FOR VM and POSSIBLY NVIDIA
env = WLR_NO_HARDWARE_CURSORS,1 # On hyprland >v0.41, now configured on variable cursor section
env = WLR_RENDERER_ALLOW_SOFTWARE,1
# nvidia firefox (for hardware acceleration on FF)?
# check this post https://github.com/elFarto/nvidia-vaapi-driver#configuration
env = MOZ_DISABLE_RDD_SANDBOX,1
env = EGL_PLATFORM,wayland
env = ELECTRON_OZONE_PLATFORM_HINT,auto
cursor {
no_hardware_cursors = true
}

View File

@ -0,0 +1,49 @@
# -----------------------------------------------------
# Default
# -----------------------------------------------------
general {
gaps_in = 10
gaps_out = 14
border_size = 3
col.active_border = $color11
col.inactive_border = rgba(ffffffff)
layout = dwindle
resize_on_border = true
}
# -----------------------------------------------------
# No Border
# -----------------------------------------------------
#general {
#gaps_in = 10
#gaps_out = 14
#border_size = 0
#col.active_border = $color11
#col.inactive_border = rgba(ffffffff)
#layout = dwindle
#resize_on_border = true
#}
# -----------------------------------------------------
# Border 1
# -----------------------------------------------------
#general {
#gaps_in = 10
#gaps_out = 14
#border_size = 1
#col.active_border = $color11
#col.inactive_border = rgba(ffffffff)
#layout = dwindle
#resize_on_border = true
#}
# -----------------------------------------------------
# Border 1 Reverse
# -----------------------------------------------------
#general {
#gaps_in = 10
#gaps_out = 14
#border_size = 1
#col.active_border = rgba(ffffffff)
#col.inactive_border = $color11
#layout = dwindle
#resize_on_border = true
#}

View File

@ -0,0 +1 @@
magick $wallpaper -set colorspace Gray -separate -average $used_wallpaper

View File

@ -0,0 +1,2 @@
magick $wallpaper -set colorspace Gray -separate -average $used_wallpaper
magick $used_wallpaper -blur "50x30" $used_wallpaper

View File

@ -0,0 +1,2 @@
magick $wallpaper -set colorspace Gray -separate -average $used_wallpaper
magick $used_wallpaper -brightness-contrast -60% $used_wallpaper

View File

@ -0,0 +1,2 @@
magick $wallpaper -set colorspace Gray -separate -average $used_wallpaper
magick $used_wallpaper -brightness-contrast -40% $used_wallpaper

View File

@ -0,0 +1,2 @@
magick $wallpaper -set colorspace Gray -separate -average $used_wallpaper
magick $used_wallpaper -brightness-contrast -20% $used_wallpaper

View File

@ -0,0 +1 @@
magick $wallpaper -blur "50x30" $used_wallpaper

View File

@ -0,0 +1,2 @@
magick $wallpaper -blur "50x30" $used_wallpaper
magick $used_wallpaper -brightness-contrast -60% $used_wallpaper

View File

@ -0,0 +1,2 @@
magick $wallpaper -blur "50x30" $used_wallpaper
magick $used_wallpaper -brightness-contrast -40% $used_wallpaper

View File

@ -0,0 +1,2 @@
magick $wallpaper -blur "50x30" $used_wallpaper
magick $used_wallpaper -brightness-contrast -20% $used_wallpaper

View File

@ -0,0 +1 @@
magick $wallpaper -blur "10x30" $used_wallpaper

View File

@ -0,0 +1 @@
magick $wallpaper -negate $used_wallpaper

View File

@ -0,0 +1,2 @@
magick $wallpaper -negate $used_wallpaper
magick $used_wallpaper -brightness-contrast -60% $used_wallpaper

View File

@ -0,0 +1,2 @@
magick $wallpaper -negate $used_wallpaper
magick $used_wallpaper -brightness-contrast -40% $used_wallpaper

View File

@ -0,0 +1,2 @@
magick $wallpaper -negate $used_wallpaper
magick $used_wallpaper -brightness-contrast -20% $used_wallpaper

View File

@ -0,0 +1,47 @@
# _ _ _ _
# | |__ _ _ _ __ _ __(_) __| | | ___
# | '_ \| | | | '_ \| '__| |/ _` | |/ _ \
# | | | | |_| | |_) | | | | (_| | | __/
# |_| |_|\__, | .__/|_| |_|\__,_|_|\___|
# |___/|_|
#
# Version 2.8.3
# DO NOT REMOVE THE REPLACEMENT COMMENTS
# REQUIRED BY THE ML4W SETTINGS APP
# https://wiki.hyprland.org/Hypr-Ecosystem/hypridle/
# general {
# ignore_dbus_inhibit = false
# }
general {
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
before_sleep_cmd = loginctl lock-session # lock before suspend.
after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
}
# Screenlock
listener {
# HYPRLOCK TIMEOUT
timeout = 600
# HYPRLOCK ONTIMEOUT
on-timeout = loginctl lock-session
}
# dpms
listener {
# DPMS TIMEOUT
timeout = 660
# DPMS ONTIMEOUT
on-timeout = hyprctl dispatch dpms off
# DPMS ONRESUME
on-resume = hyprctl dispatch dpms on
}
# Suspend
listener {
# SUSPEND TIMEOUT
timeout = 1800
#SUSPEND ONTIMEOUT
on-timeout = systemctl suspend
}

View File

@ -0,0 +1,123 @@
# -----------------------------------------------------
# | | | |Gib's _ __ _ __| | __ _ _ __ __| |
# | |_| | | | | '_ \| '__| |/ _` | '_ \ / _` |
# | _ | |_| | |_) | | | | (_| | | | | (_| |
# |_| |_|\__, | .__/|_| |_|\__,_|_| |_|\__,_|
# |___/|_| Config - Gulfport Desktop
# -----------------------------------------------------
# Monitor
# -----------------------------------------------------
monitor=DP-3,1920x1080@60,0x0,1
monitor=DP-1,1920x1080@60,1920x0,1
monitor=DP-2,1920x1080@75,3840x0,1
# -----------------------------------------------------
# Workspaces
# -----------------------------------------------------
workspace = 1, monitor:DP-3, default:true
workspace = 2, monitor:DP-1, default:true
workspace = 3, monitor:DP-2, default:true
workspace = 4, monitor:DP-3
workspace = 5, monitor:DP-1
workspace = 6, monitor:DP-2
workspace = 7, monitor:DP-3
workspace = 8, monitor:DP-1
workspace = 9, monitor:DP-2
# -----------------------------------------------------
# WINDOW RULES
# https://wiki.hyprland.org/Configuring/Window-Rules/
# -----------------------------------------------------
windowrule = tile,^(gnome-connections)$
windowrule = tile,^(jumpclient.exe)$
windowrule = tile,^(Microsoft-edge)$
windowrule = tile,^(kitty)$
windowrule = tile,^(firefox)$
windowrule = tile,^(Chromium)$
windowrule = float,^(Bitwarden)$
windowrule = float,^(Cider)$
windowrule = float,^(pavucontrol)$
windowrule = float,^(blueman-manager)$
windowrule = float,^(nm-connection-editor)$
windowrule = float,^(qalculate-gtk)$
# Browser Picture in Picture
windowrulev2 = float, title:^(Picture-in-Picture)$
windowrulev2 = pin, title:^(Picture-in-Picture)$
windowrulev2 = move 69.5% 4%, title:^(Picture-in-Picture)$
# -----------------------------------------------------
# CURSOR
# -----------------------------------------------------
exec-once = hyprctl setcursor Bibata-Modern-Ice 24
# -----------------------------------------------------
# NVIDIA
# https://wiki.hyprland.org/Nvidia/
# -----------------------------------------------------
source = ~/.config/hypr/conf/nvidia.conf
# -----------------------------------------------------
# KEYBOARD
# https://wiki.hyprland.org/Configuring/Variables/#input
# -----------------------------------------------------
input {
kb_layout = us
kb_variant =
kb_model =
kb_options =
numlock_by_default = true
mouse_refocus = false
follow_mouse = 1
touchpad {
# FOR DESKTOP/MOUSE
natural_scroll = false
# FOR LAPTOP/TOUCHPAD
# natural_scroll = yes
# middle_button_emulation = true
# clickfinger_behavior = false
scroll_factor = 1.0 # Touchpad scroll factor
}
sensitivity = 0 # Pointer speed: -1.0 - 1.0, 0 means no modification.
}
gestures {
workspace_swipe = true
}
# -----------------------------------------------------
# Load pywal color file
# -----------------------------------------------------
source = ~/.cache/wal/colors-hyprland.conf
# -----------------------------------------------------
# Autostart
# -----------------------------------------------------
source = ~/.config/hypr/conf/autostart.conf
# -----------------------------------------------------
# Load configuration files
# -----------------------------------------------------
source = ~/.config/hypr/conf/window.conf
source = ~/.config/hypr/conf/decoration.conf
source = ~/.config/hypr/conf/layout.conf
source = ~/.config/hypr/conf/misc.conf
source = ~/.config/hypr/conf/keybinding.conf
# -----------------------------------------------------
# Animation
# -----------------------------------------------------
source = ~/.config/hypr/conf/animation.conf
# -----------------------------------------------------
# Custom
# -----------------------------------------------------
source = ~/.config/hypr/conf/custom.conf
# -----------------------------------------------------
# ML4W Configuration
# -----------------------------------------------------
source = ~/.config/hypr/conf/ml4w.conf
# -----------------------------------------------------
# Environment for xdg-desktop-portal-hyprland
# -----------------------------------------------------
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP

View File

@ -0,0 +1,88 @@
# _ _ _
# | |__ _ _ _ __ _ __| | ___ ___| | __
# | '_ \| | | | '_ \| '__| |/ _ \ / __| |/ /
# | | | | |_| | |_) | | | | (_) | (__| <
# |_| |_|\__, | .__/|_| |_|\___/ \___|_|\_\
# |___/|_|
#
general {
ignore_empty_input = true
}
background {
monitor =
path = $HOME/.config/ml4w/cache/blurred_wallpaper.png # only png supported for now
}
input-field {
monitor =
size = 200, 50
outline_thickness = 3
dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true
dots_rounding = -1 # -1 default circle, -2 follow input-field rounding
outer_color = rgb(151515)
inner_color = rgb(FFFFFF)
font_color = rgb(10, 10, 10)
fade_on_empty = true
fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered.
placeholder_text = <i>Input Password...</i> # Text rendered in the input box when it's empty.
hide_input = false
rounding = -1 # -1 means complete rounding (circle/oval)
check_color = rgb(204, 136, 34)
fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i> # can be set to empty
fail_transition = 300 # transition time in ms between normal outer_color and fail_color
capslock_color = -1
numlock_color = -1
bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above)
invert_numlock = false # change color if numlock is off
swap_font_color = false # see below
position = 0, -20
halign = center
valign = center
}
label {
monitor =
#clock
text = cmd[update:1000] echo "$TIME"
color = rgba(200, 200, 200, 1.0)
font_size = 55
font_family = Fira Semibold
position = -100, 70
halign = right
valign = bottom
shadow_passes = 5
shadow_size = 10
}
label {
monitor =
text = $USER
color = rgba(200, 200, 200, 1.0)
font_size = 20
font_family = Fira Semibold
position = -100, 160
halign = right
valign = bottom
shadow_passes = 5
shadow_size = 10
}
image {
monitor =
path = $HOME/.config/ml4w/cache/square_wallpaper.png
size = 280 # lesser side if not 1:1 ratio
rounding = -1 # negative values mean circle
border_size = 4
border_color = rgb(221, 221, 221)
rotate = 0 # degrees, counter-clockwise
reload_time = -1 # seconds between reloading, 0 to reload with SIGUSR2
# reload_cmd = # command to get new path. if empty, old path will be used. don't run "follow" commands like tail -F
position = 0, 200
halign = center
valign = center
}

View File

@ -0,0 +1,6 @@
preload = /home/gib/Pictures/Wallpapers/faroe_islands.jpg
preload = /home/gib/Pictures/Wallpapers/mt_rainier.jpg
wallpaper = DP-2,/home/gib/Pictures/Wallpapers/faroe_islands.jpg
wallpaper = HDMI-A-1,/home/gib/Pictures/Wallpapers/mt_rainier.jpg
splash = false

View File

@ -0,0 +1,14 @@
#!/bin/bash
# ____ _
# / ___| | ___ __ _ _ __ _ _ _ __
# | | | |/ _ \/ _` | '_ \| | | | '_ \
# | |___| | __/ (_| | | | | |_| | |_) |
# \____|_|\___|\__,_|_| |_|\__,_| .__/
# |_|
#
# Remove gamemode flag
if [ -f ~/.cache/gamemode ] ;then
rm ~/.cache/gamemode
echo ":: ~/.cache/gamemode removed"
fi

View File

@ -0,0 +1,24 @@
#!/bin/bash
clear
figlet -f smslant "Disable DM"
echo "Hyprland recommends the start with the tty login."
echo "You can deactivate the current display manager (if exists)."
echo ""
echo "-> Do you really want to deactivate the display manager?"
while true; do
read -p "Do you want to enable the sddm display manager and setup theme? (Yy/Nn): " yn
case $yn in
[Yy]* )
if [ -f /etc/systemd/system/display-manager.service ]; then
sudo rm /etc/systemd/system/display-manager.service
echo "Current display manager removed."
else
echo "No active display manager found."
fi
break;;
[Nn]* )
exit
break;;
* ) echo "Please answer yes or no.";;
esac
done

View File

@ -0,0 +1,25 @@
#!/bin/bash
# ____ _
# / ___| __ _ _ __ ___ ___ _ __ ___ ___ __| | ___
# | | _ / _` | '_ ` _ \ / _ \ '_ ` _ \ / _ \ / _` |/ _ \
# | |_| | (_| | | | | | | __/ | | | | | (_) | (_| | __/
# \____|\__,_|_| |_| |_|\___|_| |_| |_|\___/ \__,_|\___|
#
#
if [ -f ~/.cache/gamemode ] ;then
hyprctl reload
rm ~/.cache/gamemode
notify-send "Gamemode deactivated" "Animations and blur enabled"
else
hyprctl --batch "\
keyword animations:enabled 0;\
keyword decoration:drop_shadow 0;\
keyword decoration:blur:enabled 0;\
keyword general:gaps_in 0;\
keyword general:gaps_out 0;\
keyword general:border_size 1;\
keyword decoration:rounding 0"
touch ~/.cache/gamemode
notify-send "Gamemode activated" "Animations and blur disabled"
fi

View File

@ -0,0 +1,41 @@
#!/bin/bash
# ____ _____ _ __
# / ___|_ _| |/ /
# | | _ | | | ' /
# | |_| | | | | . \
# \____| |_| |_|\_\
#
# Source: https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
config="$HOME/.config/gtk-3.0/settings.ini"
if [ ! -f "$config" ]; then exit 1; fi
gnome_schema="org.gnome.desktop.interface"
gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')"
icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')"
cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')"
cursor_size="$(grep 'gtk-cursor-theme-size' "$config" | sed 's/.*\s*=\s*//')"
font_name="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')"
terminal=$(cat $HOME/.config/ml4w/settings/terminal.sh)
echo $gtk_theme
echo $icon_theme
echo $cursor_theme
echo $cursor_size
echo $font_name
echo $terminal
gsettings set "$gnome_schema" gtk-theme "$gtk_theme"
gsettings set "$gnome_schema" icon-theme "$icon_theme"
gsettings set "$gnome_schema" cursor-theme "$cursor_theme"
gsettings set "$gnome_schema" font-name "$font_name"
gsettings set "$gnome_schema" color-scheme "prefer-dark"
gsettings set com.github.stunkymonkey.nautilus-open-any-terminal terminal "$terminal"
gsettings set com.github.stunkymonkey.nautilus-open-any-terminal use-generic-terminal-name "true"
gsettings set com.github.stunkymonkey.nautilus-open-any-terminal keybindings "<Ctrl><Alt>t"
if [ -f ~/.config/hypr/conf/cursor.conf ] ;then
echo "exec-once = hyprctl setcursor $cursor_theme $cursor_size" > ~/.config/hypr/conf/cursor.conf
hyprctl setcursor $cursor_theme $cursor_size
fi

View File

@ -0,0 +1,25 @@
#!/bin/bash
# _ _ _ _ _
# | | | |_ _ _ __ _ __(_) __| | | ___
# | |_| | | | | '_ \| '__| |/ _` | |/ _ \
# | _ | |_| | |_) | | | | (_| | | __/
# |_| |_|\__, | .__/|_| |_|\__,_|_|\___|
# |___/|_|
#
SERVICE="hypridle"
if [[ "$1" == "status" ]]; then
sleep 1
if pgrep -x "$SERVICE" >/dev/null ;then
echo '{"text": "RUNNING", "class": "active", "tooltip": "Screen locking active\nLeft: Deactivate\nRight: Lock Screen"}'
else
echo '{"text": "NOT RUNNING", "class": "notactive", "tooltip": "Screen locking deactivated\nLeft: Activate\nRight: Lock Screen"}'
fi
fi
if [[ "$1" == "toggle" ]]; then
if pgrep -x "$SERVICE" >/dev/null ;then
killall hypridle
else
hypridle
fi
fi

View File

@ -0,0 +1,56 @@
#!/bin/bash
# _ _ _ _
# | | | |_ _ _ __ _ __ ___| |__ __ _ __| | ___
# | |_| | | | | '_ \| '__/ __| '_ \ / _` |/ _` |/ _ \
# | _ | |_| | |_) | | \__ \ | | | (_| | (_| | __/
# |_| |_|\__, | .__/|_| |___/_| |_|\__,_|\__,_|\___|
# |___/|_|
#
if [[ "$1" == "rofi" ]]; then
# Open rofi to select the Hyprshade filter for toggle
options="$(hyprshade ls)\noff"
# Open rofi
choice=$(echo -e "$options" | rofi -dmenu -replace -config ~/.config/rofi/config-hyprshade.rasi -i -no-show-icons -l 4 -width 30 -p "Hyprshade")
if [ ! -z $choice ] ;then
echo "hyprshade_filter=\"$choice\"" > ~/.config/ml4w/settings/hyprshade.sh
if [ "$choice" == "off" ] ;then
hyprshade off
notify-send "Hyprshade deactivated"
echo ":: hyprshade turned off"
else
notify-send "Changing Hyprshade to $choice" "Toggle shader with SUPER+SHIFT+S"
fi
fi
else
# Toggle Hyprshade based on the selected filter
hyprshade_filter="blue-light-filter-50"
# Check if hyprshade.sh settings file exists and load
if [ -f ~/.config/ml4w/settings/hyprshade.sh ] ;then
source ~/.config/ml4w/settings/hyprshade.sh
fi
# Toggle Hyprshade
if [ "$hyprshade_filter" != "off" ] ;then
if [ -z $(hyprshade current) ] ;then
echo ":: hyprshade is not running"
hyprshade on $hyprshade_filter
notify-send "Hyprshade activated" "with $(hyprshade current)"
echo ":: hyprshade started with $(hyprshade current)"
else
notify-send "Hyprshade deactivated"
echo ":: Current hyprshade $(hyprshade current)"
echo ":: Switching hyprshade off"
hyprshade off
fi
else
hyprshade off
echo ":: hyprshade turned off"
fi
fi

View File

@ -0,0 +1,27 @@
#!/bin/bash
# __ ______ _____ _
# \ \ / / _ \ | ____|_ __ __ _(_)_ __ ___
# \ \ /\ / /| |_) | | _| | '_ \ / _` | | '_ \ / _ \
# \ V V / | __/ | |___| | | | (_| | | | | | __/
# \_/\_/ |_| |_____|_| |_|\__, |_|_| |_|\___|
# |___/
#
wallpaper_engine=$(cat $HOME/.config/ml4w/settings/wallpaper-engine.sh)
if [ "$wallpaper_engine" == "swww" ] ;then
# swww
echo ":: Using swww"
swww init
swww-daemon --format xrgb
sleep 0.5
~/.config/hypr/scripts/wallpaper.sh init
elif [ "$wallpaper_engine" == "hyprpaper" ] ;then
# hyprpaper
echo ":: Using hyprpaper"
sleep 0.5
~/.config/hypr/scripts/wallpaper.sh init
else
echo ":: Wallpaper Engine disabled"
~/.config/hypr/scripts/wallpaper.sh init
fi

View File

@ -0,0 +1,47 @@
#!/bin/bash
# _ _ _ _ _
# | | _____ _ _| |__ (_)_ __ __| (_)_ __ __ _ ___
# | |/ / _ \ | | | '_ \| | '_ \ / _` | | '_ \ / _` / __|
# | < __/ |_| | |_) | | | | | (_| | | | | | (_| \__ \
# |_|\_\___|\__, |_.__/|_|_| |_|\__,_|_|_| |_|\__, |___/
# |___/ |___/
#
# -----------------------------------------------------
# Get keybindings location based on variation
# -----------------------------------------------------
config_file=$(cat ~/.config/hypr/conf/keybinding.conf)
config_file=${config_file/source = ~/}
config_file=${config_file/source=~/}
# -----------------------------------------------------
# Path to keybindings config file
# -----------------------------------------------------
config_file="/home/$USER$config_file"
echo "Reading from: $config_file"
keybinds=""
# Detect Start String
while read -r line
do
if [[ "$line" == "bind"* ]]; then
line="$(echo "$line" | sed 's/$mainMod/SUPER/g')"
line="$(echo "$line" | sed 's/bind = //g')"
line="$(echo "$line" | sed 's/bindm = //g')"
IFS='#'
read -a strarr <<<"$line"
kb_str=${strarr[0]}
cm_str=${strarr[1]}
IFS=','
read -a kbarr <<<"$kb_str"
item="${kbarr[0]} + ${kbarr[1]}"$'\r'"${cm_str:1}"
keybinds=$keybinds$item$'\n'
fi
done < "$config_file"
sleep 0.2
rofi -dmenu -i -markup -eh 2 -replace -p "Keybinds" -config ~/.config/rofi/config-compact.rasi <<< "$keybinds"

View File

@ -0,0 +1,2 @@
#!/bin/bash
hyprctl reload

View File

@ -0,0 +1,48 @@
#!/bin/bash
# __ __ _
# | \/ | _____ _____ | |_ ___
# | |\/| |/ _ \ \ / / _ \ | __/ _ \
# | | | | (_) \ V / __/ | || (_) |
# |_| |_|\___/ \_/ \___| \__\___/
#
# Function to log messages (useful for debugging)
log_message() {
# echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" >> ~/moveto_log.txt
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1"
}
# Get the target workspace from the argument
target_workspace=$1
# Check if a target workspace was provided
if [ -z "$target_workspace" ]; then
log_message "Error: No target workspace provided"
exit 1
fi
# Get the current active workspace
current_workspace=$(hyprctl activewindow -j | jq '.workspace.id')
if [ -z "$current_workspace" ]; then
log_message "Error: Couldn't determine current workspace"
exit 1
fi
log_message "Moving from workspace $current_workspace to $target_workspace"
# Get all window addresses in the current workspace
window_addresses=$(hyprctl clients -j | jq -r ".[] | select(.workspace.id == $current_workspace) | .address")
# Move each window to the target workspace
for address in $window_addresses; do
log_message "Moving window $address to workspace $target_workspace"
hyprctl dispatch movetoworkspacesilent "$target_workspace,address:$address"
done
log_message "Finished moving windows"
# Switch to the target workspace
hyprctl dispatch workspace "$target_workspace"
log_message "Switched to workspace $target_workspace"

View File

@ -0,0 +1,56 @@
#!/bin/bash
# ____
# | _ \ _____ _____ _ __
# | |_) / _ \ \ /\ / / _ \ '__|
# | __/ (_) \ V V / __/ |
# |_| \___/ \_/\_/ \___|_|
#
# Check if eww is open
FILE="$HOME/.cache/ml4w_sidebar"
if [[ "$1" == "exit" ]]; then
echo ":: Exit"
if [[ -f "$FILE" ]]; then
rm $FILE
fi
sleep 0.5
killall -9 Hyprland
sleep 2
fi
if [[ "$1" == "lock" ]]; then
echo ":: Lock"
sleep 0.5
hyprlock
fi
if [[ "$1" == "reboot" ]]; then
echo ":: Reboot"
if [[ -f "$FILE" ]]; then
rm $FILE
fi
sleep 0.5
systemctl reboot
fi
if [[ "$1" == "shutdown" ]]; then
echo ":: Shutdown"
if [[ -f "$FILE" ]]; then
rm $FILE
fi
sleep 0.5
systemctl poweroff
fi
if [[ "$1" == "suspend" ]]; then
echo ":: Suspend"
sleep 0.5
systemctl suspend
fi
if [[ "$1" == "hibernate" ]]; then
echo ":: Hibernate"
sleep 1;
systemctl hibernate
fi

View File

@ -0,0 +1,5 @@
#!/bin/bash
killall hypridle
sleep 1
hypridle &
notify-send "hypridle has been restarted."

View File

@ -0,0 +1,224 @@
#!/bin/bash
# ____ _ _
# / ___| ___ _ __ ___ ___ _ __ ___| |__ ___ | |_
# \___ \ / __| '__/ _ \/ _ \ '_ \/ __| '_ \ / _ \| __|
# ___) | (__| | | __/ __/ | | \__ \ | | | (_) | |_
# |____/ \___|_| \___|\___|_| |_|___/_| |_|\___/ \__|
#
# Based on https://github.com/hyprwm/contrib/blob/main/grimblast/screenshot.sh
# -----------------------------------------------------
# Screenshots will be stored in $HOME by default.
# The screenshot will be moved into the screenshot directory
# Add this to ~/.config/user-dirs.dirs to save screenshots in a custom folder:
# XDG_SCREENSHOTS_DIR="$HOME/Screenshots"
prompt='Screenshot'
mesg="DIR: ~/Screenshots"
# Screenshot Filename
source ~/.config/ml4w/settings/screenshot-filename.sh
# Screenshot Folder
source ~/.config/ml4w/settings/screenshot-folder.sh
# Screenshot Editor
export GRIMBLAST_EDITOR="$(cat ~/.config/ml4w/settings/screenshot-editor.sh)"
# Example for keybindings
# bind = SUPER, p, exec, grimblast save active
# bind = SUPER SHIFT, p, exec, grimblast save area
# bind = SUPER ALT, p, exec, grimblast save output
# bind = SUPER CTRL, p, exec, grimblast save screen
# Options
option_1="Immediate"
option_2="Delayed"
option_capture_1="Capture Everything"
option_capture_2="Capture Active Display"
option_capture_3="Capture Selection"
option_time_1="5s"
option_time_2="10s"
option_time_3="20s"
option_time_4="30s"
option_time_5="60s"
#option_time_4="Custom (in seconds)" # Roadmap or someone contribute :)
list_col='1'
list_row='2'
copy='Copy'
save='Save'
copy_save='Copy & Save'
edit='Edit'
# Rofi CMD
rofi_cmd() {
rofi -dmenu -replace -config ~/.config/rofi/config-screenshot.rasi -i -no-show-icons -l 2 -width 30 -p "Take screenshot"
}
# Pass variables to rofi dmenu
run_rofi() {
echo -e "$option_1\n$option_2" | rofi_cmd
}
####
# Choose Timer
# CMD
timer_cmd() {
rofi -dmenu -replace -config ~/.config/rofi/config-screenshot.rasi -i -no-show-icons -l 5 -width 30 -p "Choose timer"
}
# Ask for confirmation
timer_exit() {
echo -e "$option_time_1\n$option_time_2\n$option_time_3\n$option_time_4\n$option_time_5" | timer_cmd
}
# Confirm and execute
timer_run() {
selected_timer="$(timer_exit)"
if [[ "$selected_timer" == "$option_time_1" ]]; then
countdown=5
${1}
elif [[ "$selected_timer" == "$option_time_2" ]]; then
countdown=10
${1}
elif [[ "$selected_timer" == "$option_time_3" ]]; then
countdown=20
${1}
elif [[ "$selected_timer" == "$option_time_4" ]]; then
countdown=30
${1}
elif [[ "$selected_timer" == "$option_time_5" ]]; then
countdown=60
${1}
else
exit
fi
}
###
####
# Chose Screenshot Type
# CMD
type_screenshot_cmd() {
rofi -dmenu -replace -config ~/.config/rofi/config-screenshot.rasi -i -no-show-icons -l 3 -width 30 -p "Type of screenshot"
}
# Ask for confirmation
type_screenshot_exit() {
echo -e "$option_capture_1\n$option_capture_2\n$option_capture_3" | type_screenshot_cmd
}
# Confirm and execute
type_screenshot_run() {
selected_type_screenshot="$(type_screenshot_exit)"
if [[ "$selected_type_screenshot" == "$option_capture_1" ]]; then
option_type_screenshot=screen
${1}
elif [[ "$selected_type_screenshot" == "$option_capture_2" ]]; then
option_type_screenshot=output
${1}
elif [[ "$selected_type_screenshot" == "$option_capture_3" ]]; then
option_type_screenshot=area
${1}
else
exit
fi
}
###
####
# Choose to save or copy photo
# CMD
copy_save_editor_cmd() {
rofi -dmenu -replace -config ~/.config/rofi/config-screenshot.rasi -i -no-show-icons -l 4 -width 30 -p "How to save"
}
# Ask for confirmation
copy_save_editor_exit() {
echo -e "$copy\n$save\n$copy_save\n$edit" | copy_save_editor_cmd
}
# Confirm and execute
copy_save_editor_run() {
selected_chosen="$(copy_save_editor_exit)"
if [[ "$selected_chosen" == "$copy" ]]; then
option_chosen=copy
${1}
elif [[ "$selected_chosen" == "$save" ]]; then
option_chosen=save
${1}
elif [[ "$selected_chosen" == "$copy_save" ]]; then
option_chosen=copysave
${1}
elif [[ "$selected_chosen" == "$edit" ]]; then
option_chosen=edit
${1}
else
exit
fi
}
###
timer() {
if [[ $countdown -gt 10 ]]; then
notify-send -t 1000 "Taking screenshot in ${countdown} seconds"
countdown_less_10=$((countdown - 10))
sleep $countdown_less_10
countdown=10
fi
while [[ $countdown -ne 0 ]]; do
notify-send -t 1000 "Taking screenshot in ${countdown} seconds"
countdown=$((countdown - 1))
sleep 1
done
}
# take shots
takescreenshot() {
sleep 1
grimblast --notify "$option_chosen" "$option_type_screenshot" $NAME
if [ -f $HOME/$NAME ] ;then
if [ -d $screenshot_folder ] ;then
mv $HOME/$NAME $screenshot_folder/
fi
fi
}
takescreenshot_timer() {
sleep 1
timer
grimblast --notify "$option_chosen" "$option_type_screenshot" $NAME
if [ -f $HOME/$NAME ] ;then
if [ -d $screenshot_folder ] ;then
mv $HOME/$NAME $screenshot_folder/
fi
fi
}
# Execute Command
run_cmd() {
if [[ "$1" == '--opt1' ]]; then
type_screenshot_run
copy_save_editor_run "takescreenshot"
elif [[ "$1" == '--opt2' ]]; then
timer_run
type_screenshot_run
copy_save_editor_run "takescreenshot_timer"
fi
}
# Actions
chosen="$(run_rofi)"
case ${chosen} in
$option_1)
run_cmd --opt1
;;
$option_2)
run_cmd --opt2
;;
esac

View File

@ -0,0 +1,13 @@
#!/bin/bash
cache_file="$HOME/.cache/toggle_animation"
if [[ $(cat $HOME/.config/hypr/conf/animation.conf) == *"disabled"* ]]; then
echo ":: Toggle blocked by disabled.conf variation."
else
if [ -f $cache_file ] ;then
hyprctl keyword animations:enabled true
rm $cache_file
else
hyprctl keyword animations:enabled false
touch $cache_file
fi
fi

View File

@ -0,0 +1,10 @@
#!/bin/bash
# _ _ _ __ _ _
# / \ | | |/ _| | ___ __ _| |_
# / _ \ | | | |_| |/ _ \ / _` | __|
# / ___ \| | | _| | (_) | (_| | |_
# /_/ \_\_|_|_| |_|\___/ \__,_|\__|
#
hyprctl dispatch workspaceopt allfloat
notify-send "Windows on this workspace toggled to floating/tiling"

View File

@ -0,0 +1,28 @@
#!/bin/bash
# _ _ __ ______
# / \ _ _| |_ ___ \ \ / / _ \
# / _ \| | | | __/ _ \ \ \ /\ / /| |_) |
# / ___ \ |_| | || (_) | \ V V / | __/
# /_/ \_\__,_|\__\___/ \_/\_/ |_|
#
sec=$(cat ~/.config/ml4w/settings/wallpaper-automation.sh)
_setWallpaperRandomly() {
waypaper --random
echo ":: Next wallpaper in 60 seconds..."
sleep $sec
_setWallpaperRandomly
}
if [ ! -f ~/.config/ml4w/cache/wallpaper-automation ] ;then
touch ~/.config/ml4w/cache/wallpaper-automation
echo ":: Start wallpaper automation script"
notify-send "Wallpaper automation process started" "Wallpaper will be changed every $sec seconds."
_setWallpaperRandomly
else
rm ~/.config/ml4w/cache/wallpaper-automation
notify-send "Wallpaper automation process stopped."
echo ":: Wallpaper automation script process $wp stopped"
wp=$(pgrep -f wallpaper-automation.sh)
kill -KILL $wp
fi

View File

@ -0,0 +1,5 @@
#!/bin/bash
generated_versions="$HOME/.config/ml4w/cache/wallpaper-generated"
rm $generated_versions/*
echo ":: Wallpaper cache cleared"
notify-send "Wallpaper cache cleared"

View File

@ -0,0 +1,21 @@
#!/bin/bash
# __ ______ _____ __ __ _
# \ \ / / _ \ | ____|/ _|/ _| ___ ___| |_ ___
# \ \ /\ / /| |_) | | _| | |_| |_ / _ \/ __| __/ __|
# \ V V / | __/ | |___| _| _| __/ (__| |_\__ \
# \_/\_/ |_| |_____|_| |_| \___|\___|\__|___/
#
# Get current wallpaper
cache_file="$HOME/.config/ml4w/cache/current_wallpaper"
# Open rofi to select the Hyprshade filter for toggle
options="$(ls ~/.config/hypr/effects/wallpaper/)\noff"
# Open rofi
choice=$(echo -e "$options" | rofi -dmenu -replace -config ~/.config/rofi/config-themes.rasi -i -no-show-icons -l 5 -width 30 -p "Hyprshade")
if [ ! -z $choice ] ;then
echo "$choice" > ~/.config/ml4w/settings/wallpaper-effect.sh
notify-send "Changing Wallpaper Effect to " "$choice"
waypaper --wallpaper $(cat $cache_file)
fi

View File

@ -0,0 +1,43 @@
#!/bin/bash
# _ _
# __ ____ _| | |_ __ __ _ _ __ ___ _ __
# \ \ /\ / / _` | | | '_ \ / _` | '_ \ / _ \ '__|
# \ V V / (_| | | | |_) | (_| | |_) | __/ |
# \_/\_/ \__,_|_|_| .__/ \__,_| .__/ \___|_|
# |_| |_|
#
# -----------------------------------------------------
# Restore last wallpaper
# -----------------------------------------------------
# -----------------------------------------------------
# Set defaults
# -----------------------------------------------------
defaultwallpaper="$HOME/Pictures/Wallpapers/faroe_islands.jpg"
cachefile="$HOME/.config/ml4w/cache/current_wallpaper"
# -----------------------------------------------------
# Get current wallpaper
# -----------------------------------------------------
if [ -f "$cachefile" ]; then
sed -i "s|~|$HOME|g" "$cachefile"
wallpaper=$(cat $cachefile)
if [ -f $wallpaper ]; then
echo ":: Wallpaper $wallpaper exists"
else
echo ":: Wallpaper $wallpaper does not exist. Using default."
wallpaper=$defaultwallpaper
fi
else
echo ":: $cachefile does not exist. Using default wallpaper."
wallpaper=$defaultwallpaper
fi
# -----------------------------------------------------
# Set wallpaper
# -----------------------------------------------------
echo ":: Setting wallpaper with source image $wallpaper"
waypaper --wallpaper "$wallpaper"

View File

@ -0,0 +1,172 @@
#!/bin/bash
# _ _
# __ ____ _| | |_ __ __ _ _ __ ___ _ __
# \ \ /\ / / _` | | | '_ \ / _` | '_ \ / _ \ '__|
# \ V V / (_| | | | |_) | (_| | |_) | __/ |
# \_/\_/ \__,_|_|_| .__/ \__,_| .__/ \___|_|
# |_| |_|
#
# -----------------------------------------------------
# Check to use wallpaper cache
# -----------------------------------------------------
if [ -f ~/.config/ml4w/settings/wallpaper_cache ]; then
use_cache=1
echo ":: Using Wallpaper Cache"
else
use_cache=0
echo ":: Wallpaper Cache disabled"
fi
# -----------------------------------------------------
# Set defaults
# -----------------------------------------------------
force_generate=0
generatedversions="$HOME/.config/ml4w/cache/wallpaper-generated"
waypaperrunning=$HOME/.config/ml4w/cache/waypaper-running
cachefile="$HOME/.config/ml4w/cache/current_wallpaper"
blurredwallpaper="$HOME/.config/ml4w/cache/blurred_wallpaper.png"
squarewallpaper="$HOME/.config/ml4w/cache/square_wallpaper.png"
rasifile="$HOME/.config/ml4w/cache/current_wallpaper.rasi"
blurfile="$HOME/.config/ml4w/settings/blur.sh"
defaultwallpaper="$HOME/Pictures/Wallpapers/faroe_islands.jpg"
wallpapereffect="$HOME/.config/ml4w/settings/wallpaper-effect.sh"
blur="50x30"
blur=$(cat $blurfile)
# Ensures that the script only run once if wallpaper effect enabled
if [ -f $waypaperrunning ]; then
rm $waypaperrunning
exit
fi
# Create folder with generated versions of wallpaper if not exists
if [ ! -d $generatedversions ]; then
mkdir $generatedversions
fi
# -----------------------------------------------------
# Get selected wallpaper
# -----------------------------------------------------
if [ -z $1 ]; then
if [ -f $cachefile ]; then
wallpaper=$(cat $cachefile)
else
wallpaper=$defaultwallpaper
fi
else
wallpaper=$1
fi
used_wallpaper=$wallpaper
echo ":: Setting wallpaper with source image $wallpaper"
tmpwallpaper=$wallpaper
# -----------------------------------------------------
# Copy path of current wallpaper to cache file
# -----------------------------------------------------
if [ ! -f $cachefile ]; then
touch $cachefile
fi
echo "$wallpaper" > $cachefile
echo ":: Path of current wallpaper copied to $cachefile"
# -----------------------------------------------------
# Get wallpaper filename
# -----------------------------------------------------
wallpaperfilename=$(basename $wallpaper)
echo ":: Wallpaper Filename: $wallpaperfilename"
# -----------------------------------------------------
# Wallpaper Effects
# -----------------------------------------------------
if [ -f $wallpapereffect ]; then
effect=$(cat $wallpapereffect)
if [ ! "$effect" == "off" ]; then
used_wallpaper=$generatedversions/$effect-$wallpaperfilename
if [ -f $generatedversions/$effect-$wallpaperfilename ] && [ "$force_generate" == "0" ] && [ "$use_cache" == "1" ]; then
echo ":: Use cached wallpaper $effect-$wallpaperfilename"
else
echo ":: Generate new cached wallpaper $effect-$wallpaperfilename with effect $effect"
notify-send --replace-id=1 "Using wallpaper effect $effect..." "with image $wallpaperfilename" -h int:value:33
source $HOME/.config/hypr/effects/wallpaper/$effect
fi
echo ":: Loading wallpaper $generatedversions/$effect-$wallpaperfilename with effect $effect"
echo ":: Setting wallpaper with $used_wallpaper"
touch $waypaperrunning
waypaper --wallpaper $used_wallpaper
else
echo ":: Wallpaper effect is set to off"
fi
else
effect="off"
fi
# -----------------------------------------------------
# Execute pywal
# -----------------------------------------------------
echo ":: Execute pywal with $used_wallpaper"
wal -q -i "$used_wallpaper"
source "$HOME/.cache/wal/colors.sh"
# -----------------------------------------------------
# Reload Waybar
# -----------------------------------------------------
killall -SIGUSR2 waybar
# -----------------------------------------------------
# Pywalfox
# -----------------------------------------------------
if type pywalfox > /dev/null 2>&1; then
pywalfox update
fi
# -----------------------------------------------------
# Created blurred wallpaper
# -----------------------------------------------------
if [ -f $generatedversions/blur-$blur-$effect-$wallpaperfilename.png ] && [ "$force_generate" == "0" ] && [ "$use_cache" == "1" ]; then
echo ":: Use cached wallpaper blur-$blur-$effect-$wallpaperfilename"
else
echo ":: Generate new cached wallpaper blur-$blur-$effect-$wallpaperfilename with blur $blur"
# notify-send --replace-id=1 "Generate new blurred version" "with blur $blur" -h int:value:66
magick $used_wallpaper -resize 75% $blurredwallpaper
echo ":: Resized to 75%"
if [ ! "$blur" == "0x0" ]; then
magick $blurredwallpaper -blur $blur $blurredwallpaper
cp $blurredwallpaper $generatedversions/blur-$blur-$effect-$wallpaperfilename.png
echo ":: Blurred"
fi
fi
cp $generatedversions/blur-$blur-$effect-$wallpaperfilename.png $blurredwallpaper
# -----------------------------------------------------
# Create rasi file
# -----------------------------------------------------
if [ ! -f $rasifile ]; then
touch $rasifile
fi
echo "* { current-image: url(\"$blurredwallpaper\", height); }" > "$rasifile"
# -----------------------------------------------------
# Created square wallpaper
# -----------------------------------------------------
echo ":: Generate new cached wallpaper square-$wallpaperfilename"
magick $tmpwallpaper -gravity Center -extent 1:1 $squarewallpaper
cp $squarewallpaper $generatedversions/square-$wallpaperfilename.png
# -----------------------------------------------------
# Reload AGS
# -----------------------------------------------------
ags quit &
sleep 0.2
ags run &

View File

@ -0,0 +1,58 @@
#!/bin/bash
# __ ______ ____
# \ \/ / _ \ / ___|
# \ /| | | | | _
# / \| |_| | |_| |
# /_/\_\____/ \____|
#
# Setup Timers
_sleep1="0.1"
_sleep2="0.5"
_sleep3="2"
# Kill all possible running xdg-desktop-portals
killall -e xdg-desktop-portal-hyprland
killall -e xdg-desktop-portal-gnome
killall -e xdg-desktop-portal-kde
killall -e xdg-desktop-portal-lxqt
killall -e xdg-desktop-portal-wlr
killall -e xdg-desktop-portal-gtk
killall -e xdg-desktop-portal
# Set required environment variables
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=hyprland
# Stop all services
systemctl --user stop pipewire
systemctl --user stop wireplumber
systemctl --user stop xdg-desktop-portal
systemctl --user stop xdg-desktop-portal-gnome
systemctl --user stop xdg-desktop-portal-kde
systemctl --user stop xdg-desktop-portal-wlr
systemctl --user stop xdg-desktop-portal-hyprland
sleep $_sleep1
# Start xdg-desktop-portal-hyprland
/usr/lib/xdg-desktop-portal-hyprland &
sleep $_sleep1
# Start xdg-desktop-portal-gtk
if [ -f /usr/lib/xdg-desktop-portal-gtk ] ;then
/usr/lib/xdg-desktop-portal-gtk &
sleep $_sleep1
fi
# Start xdg-desktop-portal
/usr/lib/xdg-desktop-portal &
sleep $_sleep2
# Start required services
systemctl --user start pipewire
systemctl --user start wireplumber
systemctl --user start xdg-desktop-portal
systemctl --user start xdg-desktop-portal-hyprland
# Run waybar
sleep $_sleep3
~/.config/waybar/launch.sh

View File

@ -0,0 +1,43 @@
// from https://github.com/hyprwm/Hyprland/issues/1140#issuecomment-1335128437
precision highp float;
varying vec2 v_texcoord;
uniform sampler2D tex;
const float temperature = 3000.0;
const float temperatureStrength = 0.25;
#define WithQuickAndDirtyLuminancePreservation
const float LuminancePreservationFactor = 1.0;
// function from https://www.shadertoy.com/view/4sc3D7
// valid from 1000 to 40000 K (and additionally 0 for pure full white)
vec3 colorTemperatureToRGB(const in float temperature) {
// values from: http://blenderartists.org/forum/showthread.php?270332-OSL-Goodness&p=2268693&viewfull=1#post2268693
mat3 m = (temperature <= 6500.0) ? mat3(vec3(0.0, -2902.1955373783176, -8257.7997278925690),
vec3(0.0, 1669.5803561666639, 2575.2827530017594),
vec3(1.0, 1.3302673723350029, 1.8993753891711275))
: mat3(vec3(1745.0425298314172, 1216.6168361476490, -8257.7997278925690),
vec3(-2666.3474220535695, -2173.1012343082230, 2575.2827530017594),
vec3(0.55995389139931482, 0.70381203140554553, 1.8993753891711275));
return mix(clamp(vec3(m[0] / (vec3(clamp(temperature, 1000.0, 40000.0)) + m[1]) + m[2]), vec3(0.0), vec3(1.0)),
vec3(1.0), smoothstep(1000.0, 0.0, temperature));
}
void main() {
vec4 pixColor = texture2D(tex, v_texcoord);
// RGB
vec3 color = vec3(pixColor[0], pixColor[1], pixColor[2]);
#ifdef WithQuickAndDirtyLuminancePreservation
color *= mix(1.0, dot(color, vec3(0.2126, 0.7152, 0.0722)) / max(dot(color, vec3(0.2126, 0.7152, 0.0722)), 1e-5),
LuminancePreservationFactor);
#endif
color = mix(color, color * colorTemperatureToRGB(temperature), temperatureStrength);
vec4 outCol = vec4(color, pixColor[3]);
gl_FragColor = outCol;
}

View File

@ -0,0 +1,43 @@
// from https://github.com/hyprwm/Hyprland/issues/1140#issuecomment-1335128437
precision highp float;
varying vec2 v_texcoord;
uniform sampler2D tex;
const float temperature = 3000.0;
const float temperatureStrength = 0.5;
#define WithQuickAndDirtyLuminancePreservation
const float LuminancePreservationFactor = 1.0;
// function from https://www.shadertoy.com/view/4sc3D7
// valid from 1000 to 40000 K (and additionally 0 for pure full white)
vec3 colorTemperatureToRGB(const in float temperature) {
// values from: http://blenderartists.org/forum/showthread.php?270332-OSL-Goodness&p=2268693&viewfull=1#post2268693
mat3 m = (temperature <= 6500.0) ? mat3(vec3(0.0, -2902.1955373783176, -8257.7997278925690),
vec3(0.0, 1669.5803561666639, 2575.2827530017594),
vec3(1.0, 1.3302673723350029, 1.8993753891711275))
: mat3(vec3(1745.0425298314172, 1216.6168361476490, -8257.7997278925690),
vec3(-2666.3474220535695, -2173.1012343082230, 2575.2827530017594),
vec3(0.55995389139931482, 0.70381203140554553, 1.8993753891711275));
return mix(clamp(vec3(m[0] / (vec3(clamp(temperature, 1000.0, 40000.0)) + m[1]) + m[2]), vec3(0.0), vec3(1.0)),
vec3(1.0), smoothstep(1000.0, 0.0, temperature));
}
void main() {
vec4 pixColor = texture2D(tex, v_texcoord);
// RGB
vec3 color = vec3(pixColor[0], pixColor[1], pixColor[2]);
#ifdef WithQuickAndDirtyLuminancePreservation
color *= mix(1.0, dot(color, vec3(0.2126, 0.7152, 0.0722)) / max(dot(color, vec3(0.2126, 0.7152, 0.0722)), 1e-5),
LuminancePreservationFactor);
#endif
color = mix(color, color * colorTemperatureToRGB(temperature), temperatureStrength);
vec4 outCol = vec4(color, pixColor[3]);
gl_FragColor = outCol;
}

View File

@ -0,0 +1,43 @@
// from https://github.com/hyprwm/Hyprland/issues/1140#issuecomment-1335128437
precision highp float;
varying vec2 v_texcoord;
uniform sampler2D tex;
const float temperature = 3000.0;
const float temperatureStrength = 0.75;
#define WithQuickAndDirtyLuminancePreservation
const float LuminancePreservationFactor = 1.0;
// function from https://www.shadertoy.com/view/4sc3D7
// valid from 1000 to 40000 K (and additionally 0 for pure full white)
vec3 colorTemperatureToRGB(const in float temperature) {
// values from: http://blenderartists.org/forum/showthread.php?270332-OSL-Goodness&p=2268693&viewfull=1#post2268693
mat3 m = (temperature <= 6500.0) ? mat3(vec3(0.0, -2902.1955373783176, -8257.7997278925690),
vec3(0.0, 1669.5803561666639, 2575.2827530017594),
vec3(1.0, 1.3302673723350029, 1.8993753891711275))
: mat3(vec3(1745.0425298314172, 1216.6168361476490, -8257.7997278925690),
vec3(-2666.3474220535695, -2173.1012343082230, 2575.2827530017594),
vec3(0.55995389139931482, 0.70381203140554553, 1.8993753891711275));
return mix(clamp(vec3(m[0] / (vec3(clamp(temperature, 1000.0, 40000.0)) + m[1]) + m[2]), vec3(0.0), vec3(1.0)),
vec3(1.0), smoothstep(1000.0, 0.0, temperature));
}
void main() {
vec4 pixColor = texture2D(tex, v_texcoord);
// RGB
vec3 color = vec3(pixColor[0], pixColor[1], pixColor[2]);
#ifdef WithQuickAndDirtyLuminancePreservation
color *= mix(1.0, dot(color, vec3(0.2126, 0.7152, 0.0722)) / max(dot(color, vec3(0.2126, 0.7152, 0.0722)), 1e-5),
LuminancePreservationFactor);
#endif
color = mix(color, color * colorTemperatureToRGB(temperature), temperatureStrength);
vec4 outCol = vec4(color, pixColor[3]);
gl_FragColor = outCol;
}

View File

@ -0,0 +1,8 @@
precision highp float;
varying vec2 v_texcoord;
uniform sampler2D tex;
void main() {
vec4 pixColor = texture2D(tex, v_texcoord);
gl_FragColor = vec4(1.0 - pixColor.r, 1.0 - pixColor.g, 1.0 - pixColor.b, pixColor.a);
}