# ~/.config/hypr/hyprland.conf # Hyprland Configuration - Converted from Sway ################ ### MONITORS ### ################ monitor=,2256x1504@60,0x0,1 ################### ### MY PROGRAMS ### ################### $terminal = foot $fileManager = nautilus $menu = wofi -S drun -p Search -I -i -b ################# ### AUTOSTART ### ################# exec-once = waybar exec-once = swaybg -i ~/Nextcloud/wallpapers/laptop/hiroishi_nagasai.png -m fill exec-once = mako exec-once = keepassxc exec-once = nextcloud exec-once = wlsunset -S 08:00 -s 18:00 exec-once = blueman-applet exec-once = nm-applet --indicator exec-once = wl-paste --type text --watch cliphist store exec-once = wl-paste --type image --watch cliphist store exec-once = /usr/lib/polkit-kde-authentication-agent-1 exec-once = gnome-keyring-daemon --start --components=pkcs11,secrets,ssh # exec-once = swayidle -w exec-once = swayidle -w \ timeout 300 'swaylock -f' \ timeout 600 'hyprctl dispatch dpms off' \ resume 'hyprctl dispatch dpms on' \ before-sleep 'swaylock -f' \ lock 'swaylock -f' \ event lid:on 'bash ~/.config/hypr/scripts/lid_suspend.sh' ############################# ### ENVIRONMENT VARIABLES ### ############################# env = XCURSOR_SIZE,24 env = HYPRCURSOR_SIZE,24 ##################### ### LOOK AND FEEL ### ##################### general { gaps_in = 5 gaps_out = 3 border_size = 1 col.active_border = rgba(d65d0eee) col.inactive_border = rgba(282828aa) resize_on_border = false allow_tearing = false layout = dwindle } decoration { rounding = 5 active_opacity = 1.0 inactive_opacity = 0.9 shadow { enabled = false range = 4 render_power = 3 color = rgba(1a1a1aee) } blur { enabled = false size = 3 passes = 1 vibrancy = 0.1696 } } animations { enabled = yes 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 = true preserve_split = true } master { new_status = master } misc { force_default_wallpaper = -1 disable_hyprland_logo = true } ############# ### INPUT ### ############# input { kb_layout = us follow_mouse = 1 sensitivity = 0 touchpad { natural_scroll = true disable_while_typing = true tap-to-click = true middle_button_emulation = true } } gestures { workspace_swipe = true } ################### ### KEYBINDINGS ### ################### $mainMod = SUPER # Basic binds bind = $mainMod, RETURN, exec, $terminal bind = $mainMod SHIFT, Q, killactive bind = $mainMod, M, exit bind = $mainMod, E, exec, $fileManager bind = $mainMod, V, togglefloating bind = $mainMod, D, exec, $menu bind = $mainMod, P, pseudo bind = $mainMod, J, togglesplit bind = $mainMod, F, fullscreen bind = $mainMod SHIFT, C, exec, hyprctl reload # 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 # Move focus with mainMod + hjkl bind = $mainMod, H, movefocus, l bind = $mainMod, L, movefocus, r bind = $mainMod, K, movefocus, u bind = $mainMod, J, movefocus, d # Move windows bind = $mainMod SHIFT, left, movewindow, l bind = $mainMod SHIFT, right, movewindow, r bind = $mainMod SHIFT, up, movewindow, u bind = $mainMod SHIFT, down, movewindow, d bind = $mainMod SHIFT, H, movewindow, l bind = $mainMod SHIFT, L, movewindow, r bind = $mainMod SHIFT, K, movewindow, u bind = $mainMod SHIFT, J, movewindow, d # Switch workspaces with mainMod + [0-9] bind = $mainMod, 1, workspace, 1 bind = $mainMod, 2, workspace, 2 bind = $mainMod, 3, workspace, 3 bind = $mainMod, 4, workspace, 4 bind = $mainMod, 5, workspace, 5 bind = $mainMod, 6, workspace, 6 bind = $mainMod, 7, workspace, 7 bind = $mainMod, 8, workspace, 8 bind = $mainMod, 9, workspace, 9 bind = $mainMod, 0, workspace, 10 # Move active window to a workspace with mainMod + SHIFT + [0-9] bind = $mainMod SHIFT, 1, movetoworkspace, 1 bind = $mainMod SHIFT, 2, movetoworkspace, 2 bind = $mainMod SHIFT, 3, movetoworkspace, 3 bind = $mainMod SHIFT, 4, movetoworkspace, 4 bind = $mainMod SHIFT, 5, movetoworkspace, 5 bind = $mainMod SHIFT, 6, movetoworkspace, 6 bind = $mainMod SHIFT, 7, movetoworkspace, 7 bind = $mainMod SHIFT, 8, movetoworkspace, 8 bind = $mainMod SHIFT, 9, movetoworkspace, 9 bind = $mainMod SHIFT, 0, movetoworkspace, 10 # Scratchpad bind = $mainMod, S, togglespecialworkspace, magic bind = $mainMod SHIFT, S, movetoworkspace, special:magic # Scroll through existing workspaces with mainMod + scroll bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_up, workspace, e-1 # Move/resize windows with mainMod + LMB/RMB and dragging bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow # Audio and brightness controls bindel = , XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ bindel = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- bindel = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle bindel = , XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle bindel = , XF86MonBrightnessUp, exec, brightnessctl set 10%+ bindel = , XF86MonBrightnessDown, exec, brightnessctl set 10%- # Media controls bindl = , XF86AudioNext, exec, playerctl next bindl = , XF86AudioPause, exec, playerctl play-pause bindl = , XF86AudioPlay, exec, playerctl play-pause bindl = , XF86AudioPrev, exec, playerctl previous # Screenshots bind = , Print, exec, grimshot copy output bind = $mainMod, Print, exec, grimshot copy area # Screen recording bind = $mainMod, XF86AudioMedia, exec, pkill wf-recorder || wf-recorder --audio --file ~/Videos/$(date +'%Y-%m-%d-%H-%M-%S').mp4 ############################## ### WINDOWS AND WORKSPACES ### ############################## # Window rules windowrule = suppressevent maximize, class:.* windowrule = float, class:^(blueman-manager)$ windowrule = size 40% 30%, class:^(blueman-manager)$ windowrule = float, class:^(org.keepassxc.KeePassXC)$ windowrule = size 70% 60%, class:^(org.keepassxc.KeePassXC)$ windowrule = float, class:^(pavucontrol)$ windowrule = size 60% 50%, class:^(pavucontrol)$ windowrule = float, title:^(Picture-in-Picture)$ windowrule = pin, title:^(Picture-in-Picture)$ $laptop = eDP-1 # Quando il coperchio viene chiuso: # bindl=,switch:lid:on,exec,bash -c "if [[ $(hyprctl monitors | grep -c 'Monitor') == 1 ]]; then systemctl suspend; fi" bindl=,switch:on:Lid,exec,bash -c "if [[ $(hyprctl monitors | grep -c 'Monitor') == 1 ]]; then systemctl suspend; fi" # Quando il coperchio viene aperto: # bindl=,switch:lid:off,exec,hyprctl keyword output "$laptop, enable" bindl=,switch:off:Lid,exec,hyprctl keyword output "$laptop, enable" # # lid closed # bindl = , switch:on:Lid Switch, exec, hyprctl dispatch dpms off # bindl = , switch:off:Lid Switch, exec, hyprctl dispatch dpms on