♻️ hypr: separate shell and user configurations

This commit is contained in:
retrozinndev
2025-04-25 15:55:06 -03:00
parent 520f952b02
commit 6ef4f79f64
23 changed files with 301 additions and 225 deletions
+7 -27
View File
@@ -1,35 +1,15 @@
#############################################
## Retrozinndev's Hyprland Configurations! ##
#############################################
###############################
## Retrozinn's Hyprland Dots ##
###############################
# From https://github.com/retrozinndev/Hyprland-Dots
# Made with lots of love 󰋑 , by retrozinndev
# Licensed under the MIT License
# Nvidia Settings
source = ~/.config/hypr/nvidia.conf
# Environment
source = ~/.config/hypr/environment.conf
# Shell configurations (it's not recommended to modify)
source = ./shell/hyprland.conf
# Monitors
source = ~/.config/hypr/monitors.conf
# Layout
source = ~/.config/hypr/layout.conf
# Input
source = ~/.config/hypr/input.conf
# Appearance
source = ~/.config/hypr/decorations.conf
# Rules
source = ~/.config/hypr/rules.conf
# Bindings
source = ~/.config/hypr/bindings.conf
# Autostart
source = ~/.config/hypr/autostart.conf
# User configurations (please use the `user/` config directory
source = ./user/hyprland.conf
+2
View File
@@ -0,0 +1,2 @@
temperature = 4000
gamma = 100
-104
View File
@@ -1,104 +0,0 @@
############################
## WINDOW & LAYER RULES ##
############################
# See https://wiki.hyprland.org/Configuring/Window-Rules for
# more information on how to do this
# Floating windows
windowrule = float, class:moe.launcher.*
windowrule = float, class:com.github.rafostar.Clapper
windowrule = float, class:xdg-desktop-portal.*
windowrule = float, class:org.pulseaudio.pavucontrol
windowrule = float, class:blueberry.py
windowrule = float, class:org.gnome.Loupe
windowrule = float, class:mcpelauncher-webview
windowrule = float, class:org.gnome.Calculator
windowrule = float, class:io.mrarm.mcpelauncher-ui-qt
windowrule = float, class:Resources
windowrule = float, class:io.github.kaii_lb.Overskride
windowrule = float, class:nm-connection-editor
# Resize
windowrule = size 50% 50%, class:org.pulseaudio.pavucontrol
windowrule = size 50% 50%, class:blueberry.py
windowrule = size 50% 50%, class:io.github.kaii_lb.Overskride
windowrule = size 70% 70%, class:io.mrarm.mcpelauncher-ui-qt
# Moving
windowrule = move 49.27% 7.28%, class:org.pulseaudio.pavucontrol
windowrule = move 49.27% 7.28%, class:blueberry.py
windowrule = move 49.27% 7.28%, class:io.github.kaii_lb.Overskride
windowrule = movetoworkspace e, class:org.pulseaudio.pavucontrol
# Animations
windowrule = animation slide right, class:org.pulseaudio.pavucontrol
windowrule = animation slide right, class:blueberry.py
windowrule = animation slide right, class:io.github.kaii_lb.Overskride
windowrule = animation gnomed, class:moe.launcher..*
windowrule = animation gnomed, class:hyprpolkitagent
layerrule = animation slide, swaync-control-center
layerrule = animation fade, selection
layerrule = animation fade, waybar
layerrule = animation fade, hyprpaper
layerrule = animation slide right, swaync-notification-window
layerrule = animation fade, hyprpicker
layerrule = animation fade, anyrun
layerrule = animation fade, ^(eww-(.*))$
layerrule = animation slide, eww-cc
layerrule = animation fade, control-center
layerrule = animation fade, center-window # Bruh i need a better name for this :skull:
layerrule = animation fade, logout-menu
layerrule = animation fade, wallpaper
layerrule = animation slide bottom, apps-window
layerrule = animation fade, runner
layerrule = animation fade, ask-popup
layerrule = animation fade, entry-popup
layerrule = animation fade, background-window
# Opacity
windowrule = opacity .95 .95, class:kitty
windowrule = opacity .88 .88, class:spotify
windowrule = opacity .88 .88, class:hyprpolkitagent
# No blur
windowrule = noblur, class:^()$, title:^()$ # Removes blur from context menus
windowrule = noblur, class:steam(.*)$
# Layer Blur list
layerrule = blur, waybar
layerrule = blur, eww-bar
layerrule = blur, eww-calendar
layerrule = blur, eww-cc
layerrule = blur, eww-volume
layerrule = blur, eww-powermenu
layerrule = blur, top-bar
layerrule = blur, osd
layerrule = blur, control-center
layerrule = blur, center-window
layerrule = blur, logout-menu
layerrule = blur, runner
layerrule = blur, ask-popup
layerrule = blur, entry-popup
layerrule = blur, floating-notifications
layerrule = blur, apps-window
layerrule = ignorealpha .7, runner
layerrule = ignorealpha .6, eww-volume
layerrule = ignorealpha .55, eww-bar
layerrule = ignorealpha .5, eww-calendar
layerrule = ignorealpha .7, eww-cc
layerrule = ignorealpha .4, osd
layerrule = ignorealpha .55, top-bar
layerrule = ignorealpha .6, ask-popup
layerrule = ignorealpha .6, entry-popup
layerrule = ignorealpha .7, control-center
layerrule = ignorealpha .5, apps-window
layerrule = ignorealpha .7, center-window
layerrule = ignorealpha .7, floating-notifications
# Others
windowrule = noinitialfocus, class:Anydesk, title:anydesk
# Suppress maximize event from windows
windowrule = suppressevent maximize, class:.*
+34
View File
@@ -0,0 +1,34 @@
#!/usr/bin/env bash
# This script loads hyprsunset settings previously
# saved by the save-hyprsunset.sh script on shutdown.
# --------------
# Licensed under the MIT License
# Made by retrozinndev (João Dias)
# From https://github.com/retrozinndev/Hyprland-Dots
[[ -z $XDG_CONFIG_HOME ]] && XDG_CONFIG_HOME="$HOME/.config"
file_="$XDG_CONFIG_HOME/hypr/hyprsunset.conf"
if ! [[ -f "$file_" ]]; then
echo "[warn] Couldn't load hyprsunset config: file not found"
exit 0
fi
if ! [[ "$XDG_CURRENT_DESKTOP" =~ "Hyprland" ]]; then
echo "[error] Seems like you're not running Hyprland! Exiting"
exit 1
fi
if [[ -z $(command -v hyprsunset) ]]; then
echo "[error] Couldn't load hyprsunset settings: it's either not installed or not in PATH"
exit 1
fi
temperature=$(cat "$file_" | grep -E "^temperature = (.*)" | awk -F= '{ print $2 }')> /dev/null
gamma=$(cat "$file_" | grep -E "^gamma = (.*)" | awk -F= '{ print $2 }')> /dev/null
hyprctl hyprsunset temperature $temperature
sleep .05
hyprctl hyprsunset gamma $gamma
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# This script saves hyprsunset values into a file using
# hyprlang, in `$XDG_CONFIG_HOME/hypr/hyprsunset.conf`.
# It is used to save last user configuration on computer
# shutdown.
# --------------
# Licensed under the MIT License
# Made by retrozinndev (João Dias)
# From https://github.com/retrozinndev/Hyprland-Dots
[[ -z $XDG_CONFIG_HOME ]] && XDG_CONFIG_HOME="$HOME/.config"
if ! [[ "$XDG_CURRENT_DESKTOP" =~ "Hyprland" ]]; then
echo "[error] Seems like you're not running Hyprland! Exiting"
exit 1
fi
if [[ -z $(command -v hyprsunset) ]]; then
echo "[error] Couldn't save hyprsunset settings: it's either not installed or not in PATH"
exit 1
fi
output="$XDG_CONFIG_HOME/hypr/hyprsunset.conf"
temperature=$(hyprctl hyprsunset temperature)
gamma=$(hyprctl hyprsunset gamma)
printf "temperature = %d\ngamma = %d" "$temperature" "$gamma" > $output
@@ -1,10 +1,5 @@
###############
## AUTOSTART ##
###############
# Wiki: https://wiki.hyprland.org/Configuring/Keywords/#executing
# color-shell specific configuration, please don't modify unless you know what you're doing!
# Daemons
# exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 # GNOME PolKit
@@ -19,12 +14,8 @@ exec-once = systemctl enable --user --now hyprpaper
exec-once = systemctl enable --user --now hyprsunset
# Scripts
exec-once = sh $HOME/.config/hypr/scripts/gen-pywal.sh
exec-once = sh $HOME/.config/hypr/scripts/night-light-check.sh
exec-once = sh ../scripts/gen-pywal.sh
exec-once = sh ../scripts/night-light-check.sh
# Other
exec-once = ags run
# Apps
exec-once = discord --start-minimized
exec-once = steam -silent
+11 -51
View File
@@ -1,48 +1,30 @@
###############
## VARIABLES ##
###############
# Wiki: https://wiki.hyprland.org/Hypr-Ecosystem/hyprlang#defining-variables
# color-shell specific configuration, please don't modify unless you know what you're doing!
$mainMod = SUPER # The master key
$media = amberol # Media App
$terminal = kitty # Terminal Emulator
$fm = nautilus # File Manager
$menu = astal runner || anyrun # App Runner
$dmenu = anyrun --plugins libstdin.so # dmenu app
$lockscreen = hyprlock
$screenshotDir = $HOME/Screenshots
$screenshotFull = hyprshot -m output -o $screenshotDir
$screenshotSelect = hyprshot -m region -o $screenshotDir
##############
## BINDINGS ##
##############
# Wiki: https://wiki.hyprland.org/Configuring/Binds
bind = $mainMod, SPACE, exec, $menu
bind = $mainMod, F11, fullscreen
bind = $mainMod, $mainMod_L, exec, astal show-ws-numbers
bind = , Print, exec, killall slurp || hyprshot -m region -o "$(xdg-user-dir PICTURES)/Screenshots"
bind = $mainMod, Print, exec, killall slurp || hyprshot -m active -m output -o "$(xdg-user-dir PICTURES)/Screenshots"
# Uncomment if you want to press SUPER to launch application search
# bind = $mainMod, $mainMod_L, exec, astal toggle apps-window
# Test-only bind, used by developer
bind = $mainMod, F7, exec, ags request reload
bind = $mainMod, K, exec, $terminal
bind = $mainMod, Q, killactive
bind = $mainMod, E, exec, $fm
bind = $mainMod, F, togglefloating
bind = $mainMod, SPACE, exec, $menu
bind = $mainMod, P, pseudo,
bind = $mainMod, J, togglesplit
bind = $mainMod, N, exec, astal toggle control-center
bind = $mainMod, M, exec, astal toggle center-window
bind = $mainMod, L, exec, $lockscreen
bind = $mainMod, F11, fullscreen
bind = $mainMod, V, exec, sh $XDG_CONFIG_HOME/hypr/scripts/clipboard-menu.sh
bind = $mainMod, W, exec, sh $XDG_CONFIG_HOME/hypr/scripts/change-wallpaper.sh
bind = $mainMod, $mainMod_L, exec, astal show-ws-numbers
# XF86 keys
bind = , XF86AudioMedia, exec, $media
bind = , XF86AudioLowerVolume, exec, astal volume sink-decrease 5 || wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- # Decrease volume
bind = , XF86AudioRaiseVolume, exec, astal volume sink-increase 5 || wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ # Increase volume
bind = , XF86AudioMute, exec, astal volume sink-mute || wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle # Mute
@@ -50,27 +32,9 @@ bind = , XF86AudioPrev, exec, playerctl previous # Previous media
bind = , XF86AudioNext, exec, playerctl next # Next media
bind = , XF86AudioPlay, exec, playerctl play-pause # Toggle Play/Pause media
# Brightness Keys
bind = , XF86MonBrightnessDown, exec, brightnessctl s 5%- # Lower monitor brightness
bind = , XF86MonBrightnessUp, exec, brightnessctl s +5% # Increase monitor brightness
# Screenshot
bind = , Print, exec, $screenshotSelect
bind = $mainMod, Print, exec, $screenshotFull
# Open clipboard
bind = $mainMod, V, exec, sh $XDG_CONFIG_HOME/hypr/scripts/clipboard-menu.sh
# Open wallpaper menu
bind = $mainMod, W, exec, sh $XDG_CONFIG_HOME/hypr/scripts/change-wallpaper.sh
# Reload Shell (Astal)
bind = $mainMod, F7, exec, ags request reload
##################
### NAVIGATION ###
##################
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
@@ -128,10 +92,6 @@ bind = CTRL $mainMod, left, workspace, e-1
bind = $mainMod, S, togglespecialworkspace, special
bind = $mainMod SHIFT, S, movetoworkspace, special:special
# 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
@@ -1,14 +1,6 @@
source = ~/.cache/wal/colors-hypr.conf
################
## DECORATION ##
################
# See https://wiki.hyprland.org/Configuring/Variables for more information on how to configure appearance
general {
gaps_in = 6
gaps_out = 12
@@ -55,15 +47,15 @@ decoration {
size = 2
passes = 5
vibrancy = 0.9
popups = true
popups_ignorealpha = 0.6
# popups = true
# popups_ignorealpha = 0.6
}
}
animations {
enabled = true
# Beziers (yeah, I need better names)
# Beziers (I need better names)
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
bezier = amazingBezier, 0.25, 0.59, 0.1, 1.05
bezier = popinBezier, 0.5, .1, .05, 1.0
@@ -81,7 +73,8 @@ animations {
animation = layersOut, 1, 6, layerBezier, slide
# Workspaces
animation = workspaces, 1, 3.5, workspaceBezier, slidefade 20%
animation = workspaces, 1, 3.5, workspaceBezier, slidefade 16%
animation = specialWorkspace, 1, 3.5, myBezier, slidefadevert 10%
# Fade
animation = fade, 1, 4, myBezier
@@ -1,10 +1,4 @@
#################
## ENVIRONMENT ##
#################
# Wiki: https://wiki.hyprland.org/Configuring/Keywords/#setting-the-environment
# XDG Vars
env = XDG_CONFIG_HOME, $HOME/.config
env = XDG_CACHE_HOME, $HOME/.cache
+9
View File
@@ -0,0 +1,9 @@
source = ./variables.conf
source = ./nvidia.conf
source = ./environment.conf
source = ./bindings.conf
source = ./decorations.conf
source = ./autostart.conf
source = ./rules.conf
source = ./layout.conf
+6
View File
@@ -0,0 +1,6 @@
dwindle {
pseudotile = false
preserve_split = true
smart_resizing = true
}
@@ -1,8 +1,6 @@
##################
## NVIDIA STUFF ##
##################
# Wiki: https://wiki.hyprland.org/Configuring/Environment-variables/#nvidia-specific
+67
View File
@@ -0,0 +1,67 @@
# Float
windowrule = float, class:nm-connection-editor
windowrule = float, class:org.pulseaudio.pavucontrol
windowrule = float, class:xdg-desktop-portal.*
windowrule = float, class:io.github.kaii_lb.Overskride
# Resize
windowrule = size 50% 50%, class:org.pulseaudio.pavucontrol
windowrule = size 50% 50%, class:io.github.kaii_lb.Overskride
# Position
windowrule = move 49.27% 7.28%, class:org.pulseaudio.pavucontrol
windowrule = move 49.27% 7.28%, class:io.github.kaii_lb.Overskride
# Workspace
windowrule = movetoworkspace e, class:org.pulseaudio.pavucontrol
# Animations
windowrule = animation gnomed, class:hyprpolkitagent
windowrule = animation slide right, class:org.pulseaudio.pavucontrol
windowrule = animation slide right, class:io.github.kaii_lb.Overskride
layerrule = animation fade, selection
layerrule = animation fade, hyprpicker
layerrule = animation fade, hyprpaper
layerrule = animation fade, anyrun
layerrule = animation fade, control-center
layerrule = animation fade, center-window
layerrule = animation fade, logout-menu
layerrule = animation slide bottom, apps-window
layerrule = animation slide right, floating-notifications
layerrule = animation fade, runner
layerrule = animation fade, background-window
layerrule = animation fade, .*-popup
# Blur
windowrule = noblur, class:^()$, title:^()$ # fixes chromium/electron context menus
layerrule = blur, top-bar
layerrule = blur, osd
layerrule = blur, control-center
layerrule = blur, center-window
layerrule = blur, logout-menu
layerrule = blur, runner
layerrule = blur, ask-popup
layerrule = blur, entry-popup
layerrule = blur, floating-notifications
layerrule = blur, apps-window
layerrule = ignorealpha .7, runner
layerrule = ignorealpha .4, osd
layerrule = ignorealpha .55, top-bar
layerrule = ignorealpha .6, ask-popup
layerrule = ignorealpha .6, entry-popup
layerrule = ignorealpha .7, control-center
layerrule = ignorealpha .5, apps-window
layerrule = ignorealpha .7, center-window
layerrule = ignorealpha .7, floating-notifications
# Suppress maximize event from windows
windowrule = suppressevent maximize, class:.*
+11
View File
@@ -0,0 +1,11 @@
###############
## VARIABLES ##
###############
# Wiki: https://wiki.hyprland.org/Hypr-Ecosystem/hyprlang#defining-variables
$mainMod = SUPER
$terminal = kitty
$fm = nautilus
$menu = astal runner || anyrun
$dmenu = anyrun --plugins libstdin.so
+9
View File
@@ -0,0 +1,9 @@
###############
## AUTOSTART ##
###############
# Wiki: https://wiki.hyprland.org/Configuring/Keywords/#executing
# Apps
exec-once = discord --start-minimized
exec-once = steam -silent
+8
View File
@@ -0,0 +1,8 @@
##############
## BINDINGS ##
##############
# Wiki: https://wiki.hyprland.org/Configuring/Binds
# Uncomment if you want to press SUPER to launch application search
# bind = $mainMod, $mainMod_L, exec, astal toggle apps-window
+4
View File
@@ -0,0 +1,4 @@
################
## DECORATION ##
################
# Wiki: https://wiki.hyprland.org/Configuring/Variables
+6
View File
@@ -0,0 +1,6 @@
#################
## ENVIRONMENT ##
#################
# Wiki: https://wiki.hyprland.org/Configuring/Keywords/#setting-the-environment
+15
View File
@@ -0,0 +1,15 @@
########################
## USER CONFIGURATION ##
########################
# This sources all user configuration files
source = ./monitors.conf
source = ./environment.conf
source = ./input.conf
source = ./bindings.conf
source = ./layout.conf
source = ./decorations.conf
source = ./autostart.conf
source = ./rules.conf
+34
View File
@@ -0,0 +1,34 @@
###########
## INPUT ##
###########
# Wiki: https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs
input {
kb_layout = us
kb_variant = intl
kb_model = pc105
numlock_by_default = true
follow_mouse = 1
sensitivity = 0 # -1.0 to 1.0, 0 means no modification.
touchpad {
natural_scroll = true
}
}
##############
## GESTURES ##
##############
# Wiki: https://wiki.hyprland.org/Configuring/Variables/#gestures
gestures {
workspace_swipe = true
workspace_swipe_fingers = 3
workspace_swipe_create_new = true
}
@@ -1,12 +1,4 @@
############
## LAYOUT ##
############
# Wiki: https://wiki.hyprland.org/Configuring/Dwindle-Layout/#config
dwindle {
pseudotile = false
preserve_split = true
smart_resizing = true
}
@@ -1,4 +1,3 @@
##############
## MONITORS ##
##############
@@ -12,6 +11,6 @@
# arg2 -> positioning from the top-left corner;
# arg3 -> scaling;
# arg4 -> variable refresh rate(optional);
# - arg0 -> 1: vrr, 0: no vrr.
# - arg40 -> 1: vrr, 0: no vrr.
monitor = HDMI-A-1, 1920x1080@75, 0x0, 1, vrr, 0
+39
View File
@@ -0,0 +1,39 @@
############################
## WINDOW & LAYER RULES ##
############################
# See https://wiki.hyprland.org/Configuring/Window-Rules for
# more information on how to do this
# Floating windows
windowrule = float, class:moe.launcher.*
windowrule = float, class:com.github.rafostar.Clapper
windowrule = float, class:blueberry.py
windowrule = float, class:org.gnome.Loupe
windowrule = float, class:mcpelauncher-webview
windowrule = float, class:org.gnome.Calculator
windowrule = float, class:io.mrarm.mcpelauncher-ui-qt
windowrule = float, class:Resources
# Resize
windowrule = size 50% 50%, class:blueberry.py
windowrule = size 70% 70%, class:io.mrarm.mcpelauncher-ui-qt
# Moving
windowrule = move 49.27% 7.28%, class:blueberry.py
# Animations
windowrule = animation gnomed, class:moe.launcher..*
# Opacity
windowrule = opacity .95 .95, class:kitty
windowrule = opacity .88 .88, class:spotify
windowrule = opacity .88 .88, class:hyprpolkitagent
# No blur
windowrule = noblur, class:steam(.*)$
# Others
windowrule = noinitialfocus, class:Anydesk, title:anydesk