Files
dotfiles/.config/hypr/hyprland.conf
T
2026-03-03 19:54:19 +05:30

469 lines
12 KiB
Plaintext

# _ _ _ _
# | | | |_ _ _ __ _ __| | __ _ _ __ __| |
# | |_| | | | | '_ \| '__| |/ _` | '_ \ / _` |
# | _ | |_| | |_) | | | | (_| | | | | (_| |
# |_| |_|\__, | .__/|_| |_|\__,_|_| |_|\__,_|
# |___/|_|
#
# -----------------------------------------------------
# -----------------------------------------------------
# Monitor
# -----------------------------------------------------
source = ~/.config/hypr/conf/monitor.conf
# -----------------------------------------------------
# Autostart
# -----------------------------------------------------
source = ~/.config/hypr/conf/autostart.conf
# -----------------------------------------------------
# Backlight
# -----------------------------------------------------
source = ~/.config/hypr/conf/backlight.conf
# Set programs that you use
$terminal = kitty
# If using dolphin
$fileManager = thunar
$fileManagerAlt = dolphin
$menu = rofi --show drun
# Some default env vars.
env = XCURSOR_THEME,Bibata-Modern-Classic
env = XCURSOR_SIZE,20
env = QT_QPA_PLATFORMTHEME,qt6ct
env = QT_QPA_PLATFORM,wayland
env = GDK_BACKEND,wayland,x11,*
env = QT_QPA_PLATFORM,wayland;xcb
env = SDL_VIDEODRIVER,wayland
env = CLUTTER_BACKEND,wayland
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = HYPRCURSOR_THEME,Bibata-Modern-Classic
env = HYPRCURSOR_SIZE,20
env = ELECTRON_OZONE_PLATFORM_HINT,wayland
# NVIDIA
#env = LIBVA_DRIVER_NAME,nvidia
#env = __GLX_VENDOR_LIBRARY_NAME,nvidia
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = us
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
touchpad {
natural_scroll = yes
disable_while_typing = true
middle_button_emulation = true
}
sensitivity = 0.25 # -1.0 to 1.0, 0 means no modification.
numlock_by_default = true
accel_profile = adaptive
}
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 2
gaps_out = 5
border_size = 1
col.active_border = rgba(00000000)
col.inactive_border = rgba(595959aa)
layout = dwindle
resize_on_border = true
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = true
snap {
enabled = true
}
}
cursor {
hotspot_padding = 1
}
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 10
blur {
enabled = true
size = 4
passes = 4
xray = 1
new_optimizations = true
noise = 0
popups = true
ignore_opacity = true
}
fullscreen_opacity = 1.0
shadow {
enabled = yes
range = 4
render_power = 3
color = rgba(1a1a1aee)
}
}
animations {
enabled = yes
# 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
bezier = overshoot, 0.05, 0.9, 0.1, 1
animation = global, 1, 10, default
animation = border, 1, 5.39, easeOutQuint
animation = windows, 1, 4.79, easeOutQuint
animation = windowsIn, 1, 3.1, quick, popin 60%
animation = windowsOut, 1, 4.1, almostLinear, slide
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, popin 80%
animation = layersOut, 1, 1.5, linear, popin 80%
animation = fadeLayersIn, 1, 1.79, almostLinear
animation = fadeLayersOut, 1, 1.39, almostLinear
#animation = fadePopups, 0
animation = workspaces, 1, 5, easeInOutCubic, slide
animation = specialWorkspace, 1, 3, easeInOutCubic, fade
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = yes # you probably want this
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_status = master
}
group {
groupbar {
font_size = 14
height = 24
indicator_height = 4
scrolling = true
rounding = 6
rounding_power = 0
round_only_edges = true
}
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe_distance = 300
}
misc {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
disable_hyprland_logo = true
allow_session_lock_restore = true
enable_swallow = true
swallow_regex = ^(Alacritty|kitty|footclient)$
vrr = 0
}
# 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
}
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
windowrule {
name = windowrule-1
suppress_event = maximize
match:class = .* # You'll probably like this.
}
windowrule {
name = windowrule-2
opacity = 0.85
match:class = ^(nemo)
}
windowrule {
name = windowrule-3
opacity = 0.90
match:class = ^(code)
}
windowrule {
name = windowrule-4
opacity = 0.90
match:class = ^(code-url-handler)
}
windowrule {
name = windowrule-5
opacity = 0.90
match:class = ^(Spotify)$
}
windowrule {
name = windowrule-6
opacity = 0.90
match:class = ^(spotify)$
}
windowrule {
name = windowrule-7
opacity = 0.85
match:class = ^(thunar)$
}
windowrule {
name = windowrule-8
opacity = 0.85
match:class = ^(Thunar)$
}
windowrule {
name = windowrule-9
opacity = 0.90
match:class = ^(org.qbittorrent.qBittorrent)$
}
windowrule {
name = windowrule-10
opacity = 0.90
match:class = ^(SWT)$
}
windowrule {
name = windowrule-11
opacity = 0.90
match:class = ^(Eclipse)$
}
windowrule {
name = windowrule-12
opacity = 0.90
match:class = ^(SpringToolSuite4)$
}
windowrule {
name = windowrule-13
opacity = 0.90
match:class = ^(jetbrains-idea-ce)$
}
layerrule {
name = layerrule-1
blur = on
xray[0] = on
ignore_alpha = 0
match:namespace = rofi
}
layerrule {
name = layerrule-2
no_anim = on
match:namespace = selection
}
# Fix some dragging issues with XWayland
windowrule {
name = windowrule-14
no_focus = on
match:class = ^$
match:title = ^$
match:xwayland = 1
match:float = 1
match:fullscreen = 0
match:pin = 0
}
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, $terminal
bind = $mainMod, C, killactive,
bind = $mainMod SHIFT, C, forcekillactive
bind = $mainMod, M, exit,
bind = $mainMod, E, exec, $fileManager
bind = $mainMod SHIFT, E, exec, $fileManagerAlt
bind = $mainMod, V, togglefloating,
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, 1, layoutmsg, togglesplit # dwindle
bind = $mainMod, 2, layoutmsg, swapsplit
bind = $mainMod, W, toggleswallow # toggles swallow
bind = ALT, G, togglegroup # toggles group
bind = ALT SHIFT, TAB, changegroupactive # toggles group
bind = $mainMod, D, dpms, toggle # toggles dpms
bind = $mainMod, B, exec, firefox
bind = $mainMod SHIFT, B, exec, firefox --private-window
bind = , Print, exec, grim -g "$(slurp -d)" "$HOME/Pictures/grim/$(date +'%Y_%m_%d_%H_%M_%S').png"
bind = ALT , Print, exec, grim -t jpeg -q 100 -g "$(slurp -d)" "$HOME/Pictures/grim/$(date +'%Y_%m_%d_%H_%M_%S').jpeg"
bind = $mainMod , Print ,exec, grim -g "$(slurp -d)" -| wl-copy
# Show or hide waybar
bind = $mainMod SHIFT, W, exec, pgrep -x waybar && pkill -x waybar || waybar &
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = ALT, Tab, cyclenext,
bind = ALT, Tab, bringactivetotop,
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
bind = $mainMod, F, fullscreen, 1
bind = $mainMod SHIFT, F, fullscreen, 0
bind = $mainMod CTRL, F, fullscreenstate, 0 2
bind = $mainMod, L, exec, hyprlock
bind = CTRL ALT, S , exec, systemctl suspend
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, A, workspace, 1
bind = $mainMod, S, workspace, 2
bind = $mainMod, Z, workspace, 3
bind = $mainMod, X, 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, A, movetoworkspace, 1
bind = $mainMod SHIFT, S, movetoworkspace, 2
bind = $mainMod SHIFT, Z, movetoworkspace, 3
bind = $mainMod SHIFT, X, 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, T, togglespecialworkspace, magic
bind = $mainMod SHIFT, T, 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
# Move/resize windows with mainMod + arrow keys
bindel = $mainMod SHIFT, right, resizeactive, 10 0
bindel = $mainMod SHIFT, left, resizeactive, -10 0
bindel = $mainMod SHIFT, up, resizeactive, 0 -10
bindel = $mainMod SHIFT, down, resizeactive, 0 10
# Gestures
gesture = 3, horizontal, workspace
gesture = 3, down, resize
gesture = 4, down, dispatcher, dpms, toggle
gesture = 4, left, dispatcher, exec, playerctl next
gesture = 4, right, dispatcher, exec, playerctl previous
# Media Key binds
# Example volume button that allows press and hold, volume limited to 150%
bindel=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
# Example volume button that will activate even while an input inhibitor is active
bindel=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
# Play/Pause/Seek
bind = ,XF86AudioPlay, exec, playerctl play-pause
bindl=, XF86AudioNext, exec, playerctl next
bindl=, XF86AudioPrev, exec, playerctl previous
# Monitor Brightness Control
binde = ,XF86MonBrightnessDown, exec, brightnessctl set 10%-
binde = ,XF86MonBrightnessUp, exec, brightnessctl set 10%+
# Mute
bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
# rofi
# Start rofi opens rofi on first press, closes it on second
bindr=SUPER, SUPER_L, exec, pkill rofi || rofi -show drun
bind = SUPER, U, exec, rofi -show filebrowser
bind = $mainMod, O, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy
# Lid Switch
bindl=,switch:Lid Switch, exec, systemctl suspend
# Gamemode
bind = WIN, F1, exec, ~/.config/hypr/gamemode.sh
# Looking-Glass
bind = CTRL ALT, L, exec, looking-glass-client -F
# Waydroid
bind = CTRL ALT, W, exec, waydroid show-full-ui
bind = CTRL ALT, Q, exec, waydroid session stop
# Passthrough keybinds to VM
bind = $mainMod,g,submap,passthru
submap = passthru
bind = $mainMod,Escape,submap,reset
submap = reset
render {
direct_scanout = 0
cm_fs_passthrough = 2
cm_enabled = true
new_render_scheduling = true
}
# Debug
#debug{
# overlay = true
#}
# Game Rules
# steam
windowrule {
name = windowrule-15
fullscreen = on
match:class = ^steam_app\d+$
}
windowrule {
name = windowrule-16
monitor = 1
workspace = 10
match:class = ^steam_app_\d+$
}
workspace = 10, border:false, rounding:false,gapsin:0,gapsout:0,shadow:false,rounding:false,decorare:false,on-created-empty:bash ~/.config/hypr/gamemode.sh