dotfiles/components/hyprland/hyprland.conf
2024-09-13 22:06:26 +05:00

302 lines
11 KiB
Plaintext

source = appearance.conf
source = monitors.conf
# source = ~/.config/hypr/monitors.sunshine.conf
#===========================================================================#
# Variables #
#===========================================================================#
$terminal = alacritty
$fileManager = nautilus -w
$menu = ~/.config/hypr/bin/runner
$browser = firefox
$discord = vesktop
$telegram = telegram-desktop
$pctl = playerctl
$sshot = hyprshot -o ~/Pictures/Screenshots/ -z -m
$locker = loginctl lock-session
$mainMod = SUPER
#===========================================================================#
# Autostart #
#===========================================================================#
exec-once = gsettings set org.gnome.desktop.wm.preferences button-layout ':'
exec-once = dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=Hyprland
exec-once = hyprpaper -c ~/.config/hypr/components/hyprland/hyprpaper.conf
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = mako -c ~/.config/hypr/components/mako/mako.conf
exec-once = nm-applet
exec-once = hypridle -c ~/.config/hypr/components/hyprland/hypridle.conf
exec-once = bash -c "sleep 2; easyeffects --gapplication-service"
exec-once = /usr/lib/xdg-desktop-portal -r
exec-once = waybar -c ~/.config/hypr/components/waybar/waybar.jsonc -s ~/.config/hypr/components/waybar/waybar.css
exec-once = clash-verge
exec-once = bash -c "sleep 5; vesktop"
exec-once = bash -c "sleep 5; telegram-desktop -startintray"
# exec-once = pipewire &
# exec-once = pipewire-pulse &
# exec-once = wireplumber &
# exec-once = syshud -o h -p top -M "audio_in,audio_out" -m "15 0 0 0"
# exec-once = AmneziaVPN -a &
#===========================================================================#
# Environment variables #
#===========================================================================#
env = XCURSOR_SIZE,24
env = HYPRCURSOR_SIZE,24
env = HYPRCURSOR_THEME,Bibata-Modern-Classic
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = QT_QPA_PLATFORM,wayland
env = QT_QPA_PLATFORMTHEME,qt5ct
env = EDITOR,nvim
#===========================================================================#
# Look and feel #
#===========================================================================#
general {
gaps_in = 3
gaps_out = 5
border_size = 3
resize_on_border = true
allow_tearing = false
layout = dwindle
}
decoration {
rounding = 0
active_opacity = 1.0
inactive_opacity = 1.0
drop_shadow = false
shadow_range = 4
shadow_render_power = 3
col.shadow = $bg
blur {
enabled = true
size = 4
passes = 3
vibrancy = 0.1696
}
}
animations {
enabled = false
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
}
dwindle {
pseudotile = false
preserve_split = true
smart_split = false
no_gaps_when_only = true
smart_resizing = false
}
misc {
force_default_wallpaper = -1
disable_hyprland_logo = true
}
#===========================================================================#
# Input #
#===========================================================================#
input {
kb_layout = us, ru
kb_variant =
kb_model =
kb_options = grp:caps_toggle
kb_rules =
follow_mouse = 1
sensitivity = 0
touchdevice {
transform = 3
}
}
gestures {
workspace_swipe = false
}
device {
name = epic-mouse-v1
sensitivity = -0.5
}
#===========================================================================#
# Keybinds #
#---------------------------------------------------------------------------#
# | bind | dispatcher | args #
#===========================================================================#
bind = $mainMod, RETURN, exec, $terminal
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, D, exec, $discord
bind = $mainMod, T, exec, $telegram
bind = $mainMod, B, exec, $browser
bind = $mainMod, Q, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, C, togglefloating,
bind = $mainMod, SPACE, exec, $menu
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, X, togglesplit, # dwindle
bind = $mainMod, R, exec, $sshot region
bind = $mainMod, W, exec, $sshot window
bind = $mainMod, O, exec, $sshot output
bind = $mainMod Ctrl, Q, exec, $locker
#===========================================================================#
# Media keys #
#===========================================================================#
bind = , XF86AudioPlay, exec, $pctl play-pause
bind = , XF86AudioNext, exec, $pctl next
bind = , XF86AudioPrev, exec, $pctl previous
bind = , XF86AudioMute, exec, pamixer -t
bind = , XF86AudioRaiseVolume, exec, pamixer -i 2
bind = , XF86AudioLowerVolume, exec, pamixer -d 2
#===========================================================================#
# Move focus with mainMod + arrow keys #
#===========================================================================#
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
#===========================================================================#
# Brightness control #
#===========================================================================#
bind = CTRL, 1, exec, brightnessctl s 5%-
bind = CTRL, 2, exec, brightnessctl s 5%+
#===========================================================================#
# Switch workspaces with mainMod + [0-9] #
#===========================================================================#
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
#===========================================================================#
# Move active window to a workspace with mainMod + SHIFT + [0-9] #
#===========================================================================#
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
#===========================================================================#
# 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
#===========================================================================#
# Windows and workspaces #
#===========================================================================#
layerrule = blur, waybar
layerrule = ignorezero, waybar
layerrule = blur, notifications
layerrule = ignorezero, notifications
layerrule = blur, rofi
layerrule = ignorezero, rofi
windowrulev2 = suppressevent maximize, class:.*
windowrule = float, ^(imv)$
windowrule = float, ^(fetch)$
windowrule = float, ^(AmneziaVPN)$
windowrule = float, ^(org.pulseaudio.pavucontrol)$
#windowrule = size 696 570, ^(org.pulseaudio.pavucontrol)$
#windowrule = move 1630 820, ^(org.pulseaudio.pavucontrol)$
windowrule = monitor DSI-1, ^(org.pulseaudio.pavucontrol)$
windowrule = fullscreen, ^(xfreerdp)$
windowrulev2 = opacity 0.0 override,class:^(xwaylandvideobridge)$
windowrulev2 = noanim,class:^(xwaylandvideobridge)$
windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$
windowrulev2 = maxsize 1 1,class:^(xwaylandvideobridge)$
windowrulev2 = noblur,class:^(xwaylandvideobridge)$
plugin:touch_gestures {
# The default sensitivity is probably too low on tablet screens,
# I recommend turning it up to 4.0
sensitivity = 4.0
# must be >= 3
workspace_swipe_fingers = 3
# switching workspaces by swiping from an edge, this is separate from workspace_swipe_fingers
# and can be used at the same time
# possible values: l, r, u, or d
# to disable it set it to anything else
workspace_swipe_edge = d
# in milliseconds
long_press_delay = 400
# in pixels, the distance from the edge that is considered an edge
edge_margin = 10
experimental {
# send proper cancel events to windows instead of hacky touch_up events,
# NOT recommended as it crashed a few times, once it's stabilized I'll make it the default
send_cancel = 0
}
}