From 7ba470e2d2762820d59b9c3c6eb34b781e772174 Mon Sep 17 00:00:00 2001 From: Lucas Barbieri Date: Thu, 4 Jan 2024 08:44:46 -0300 Subject: [PATCH] update hyprland config --- desktop/configs/hypr/binds.conf | 67 ++++++++++ desktop/configs/hypr/hyprland.conf | 208 +---------------------------- desktop/configs/hypr/init.conf | 10 ++ desktop/configs/hypr/rules.conf | 49 +++++++ desktop/configs/hypr/settings.conf | 73 ++++++++++ 5 files changed, 206 insertions(+), 201 deletions(-) create mode 100644 desktop/configs/hypr/binds.conf create mode 100644 desktop/configs/hypr/init.conf create mode 100644 desktop/configs/hypr/rules.conf create mode 100644 desktop/configs/hypr/settings.conf diff --git a/desktop/configs/hypr/binds.conf b/desktop/configs/hypr/binds.conf new file mode 100644 index 0000000..67ecdad --- /dev/null +++ b/desktop/configs/hypr/binds.conf @@ -0,0 +1,67 @@ +# control bindings +$mainMod = SUPER + +# app bindings +bind = $mainMod, Return, exec, kitty +bind = $mainMod, E, exec, thunar +bind = $mainMod SHIFT, s, exec,steam --noverifyfiles -cef-enable-debugging +bind = $mainMod CONTROL, s, exec, ~/sfp.sh +bind = $mainMod SHIFT, Return, exec, ~/.config/rofi/launchers/type-2/launcher.sh +bind = , Print, exec, ~/.local/bin/print-fullscreen +bind = SHIFT, Print, exec, ~/.local/bin/print-select +bind = CONTROL SHIFT, Print, exec, ~/.local/bin/print-tmp +bind = CONTROL, Print, exec, ~/.local/bin/print-window.sh +bind = $mainMod, b, exec, MOZ_ENABLE_WAYLAND=1 firefox-bin +bind = $mainMod ALT, x, exec, XL_SECRET_PROVIDER=file xivlauncher + +# window control +bind = $mainMod SHIFT, C, killactive, +bind = $mainMod, t, togglefloating, +bind = $mainMod, F, fullscreen, 0 +bind = $mainMod, Space, fullscreen, 1 +bind = $mainMod SHIFT, comma, movewindow, mon:DP-3 +bind = $mainMod SHIFT, period, movewindow, mon:HDMI-A-1 +bind = $mainMod, left, movefocus, l +bind = $mainMod, right, movefocus, r +bind = $mainMod, up, movefocus, u +bind = $mainMod, down, movefocus, d +bind = $mainMod, period, focusmonitor, -1 +bind = $mainMod, comma, focusmonitor, +1 +bind = $mainMod SHIFT, H, layoutmsg, swapnext +bind = $mainMod SHIFT, L, layoutmsg, swapnext +binde = $mainMod, H, resizeactive, -30 30 +binde = $mainMod, L, resizeactive, 30 -30 +bind = $mainMod, J, layoutmsg, cyclenext +bind = $mainMod, K, layoutmsg, cycleprev + +# workspace control +bind = $mainMod, 1, exec, try_swap_workspace 1 +bind = $mainMod, 2, exec, try_swap_workspace 2 +bind = $mainMod, 3, exec, try_swap_workspace 3 +bind = $mainMod, 4, exec, try_swap_workspace 4 +bind = $mainMod, 5, exec, try_swap_workspace 5 +bind = $mainMod, 6, exec, try_swap_workspace 6 +bind = $mainMod, 7, exec, try_swap_workspace 7 +bind = $mainMod, 8, exec, try_swap_workspace 8 +bind = $mainMod, 9, exec, try_swap_workspace 9 +bind = $mainMod, 0, exec, try_swap_workspace 10 +bind = $mainMod, minus, exec, try_swap_workspace 11 +bind = $mainMod, equal, exec, try_swap_workspace 12 +bind = $mainMod, F1, exec, try_swap_workspace 13 + +bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1 +bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2 +bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3 +bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4 +bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5 +bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6 +bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7 +bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8 +bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9 +bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10 +bind = $mainMod SHIFT, minus, movetoworkspacesilent, 11 +bind = $mainMod SHIFT, equal, movetoworkspacesilent, 12 +bind = $mainMod SHIFT, F1, movetoworkspacesilent, 13 + +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow diff --git a/desktop/configs/hypr/hyprland.conf b/desktop/configs/hypr/hyprland.conf index c3b1f0e..d82c334 100644 --- a/desktop/configs/hypr/hyprland.conf +++ b/desktop/configs/hypr/hyprland.conf @@ -1,206 +1,12 @@ -# monitor=HDMI-A-1, disable -monitor=DP-1, 1920x1080, 0x1080, 1 -monitor=HDMI-A-1, 1920x1080, 0x0, 1.5 -monitor=DVI-D-1, 1920x1080, 1920x1080, 1 - -exec-once = waybar & -exec-once = gentoo-pipewire-launcher & -exec-once = bash ~/swww -exec-once = gammastep -t 4500:3500 -l -23.5475:-46.63611 -b 1.0:0.5 & -exec-once = gsettings set org.gnome.desktop.interface icon-theme Win10Sur-black-dark & gsettings set org.gnome.desktop.interface gtk-theme Numix-BLACK-Pomegranate & gsettings set org.gnome.desktop.interface cursor-theme Simp1e -exec-once=dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +# jab +monitor=DP-3, 1920x1080, 0x0, 1 +monitor=HDMI-A-1, 1920x1080, 1920x0, 1 +source = ~/.config/hypr/init.conf env = XCURSOR_SIZE,24 -env = WLR_DRM_NO_ATOMIC,1 +env = QT_QPA_PLATOFORMTHEME=qt5ct -input { - kb_layout = br - kb_variant = abnt2 - kb_model = - kb_options = - kb_rules = +source = ~/.config/hypr/settings.conf - follow_mouse = 1 - - touchpad { - natural_scroll = no - } - - sensitivity = -0.3 # -1.0 - 1.0, 0 means no modification. -} - -general { - gaps_in = 5 - gaps_out = 10 - border_size = 2 - col.active_border = rgba(ff0038ee) rgba(33e2c5ee) 45deg - col.inactive_border = rgba(595959aa) - no_cursor_warps = true - layout = master - allow_tearing = true -} - -decoration { - rounding = 10 - - blur { - enabled = true - size = 2 - passes = 2 - } - - drop_shadow = yes - shadow_range = 4 - shadow_render_power = 3 - col.shadow = rgba(1a1a1aee) -} - -animations { - enabled = yes - - bezier = myBezier, 0.05, 1.2, 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 -} - -master { - new_is_master = false -} - -gestures { - workspace_swipe = off -} - -misc { - mouse_move_enables_dpms = true - key_press_enables_dpms = true - enable_swallow = true - disable_hyprland_logo = true - focus_on_activate = false -} - -binds { - workspace_back_and_forth = true -} - -workspace= 9, border:0,rounding:0,decorate:0, - -windowrulev2 = opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$ -windowrulev2 = noanim,class:^(xwaylandvideobridge)$ -windowrulev2 = nofocus,class:^(xwaylandvideobridge)$ -windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$ - -windowrulev2=float,class:anki,title:Add -windowrule=workspace 5 silent,anki -windowrule=workspace 7 silent,lutris -windowrule=workspace 5 silent,com.obsproject.Studio -windowrule=noblur,com.obsproject.Studio -windowrule=float,pavucontrol -windowrule=workspace 8 silent,steam -windowrule=workspace 7 silent, org.prismlauncher.PrismLauncher -windowrule=float,thunar -windowrule=workspace 10 silent,thunderbird -windowrule=workspace 7 silent,XIVLauncher.Core -windowrule=workspace 7 silent,moe.launcher.the-honkers-railway-launcher -windowrule=workspace 9 silent,ffxiv_dx11.exe -windowrule=immediate,ffxiv_dx11.exe -windowrule=float,.*.exe$ -windowrule=workspace 9 silent,.*.exe$ -windowrule=workspace 9 silent,Terraria.bin.x86_64 -windowrule=noborder,.*.exe$ -windowrule=immediate,.*.exe$ -windowrule=workspace 6 silent,WebCord -windowrule=float,title:(File Upload) -windowrule=float,.*Save.* -windowrule=float,.*Sign in.* -windowrule=workspace 9 silent,gamescope -windowrule=immediate,gamescope -windowrule=workspace 9 silent,.*Minecraft.* -windowrule=immediate,.*Minecraft.* -windowrule=workspace 9 silent,cs2 -windowrule=immediate,cs2 -windowrule=workspace 9 silent,.*league.* -windowrule=immediate,.*league.* -windowrule=workspace 9 silent,.*riot.* -windowrule=immediate,.*riot.* -windowrule=workspace 9 silent,steam_.* -windowrule=immediate,steam_.* -windowrule=fullscreen,steam_.* -windowrule=workspace 10 silent,SFP_UI -windowrulev2=size 0%,class:explorer.exe,title:Wine System Tray - -# See https://wiki.hyprland.org/Configuring/Keywords/ for more -$mainMod = SUPER - -# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more -bind = $mainMod, Return, exec, kitty -bind = $mainMod SHIFT, C, killactive, -bind = $mainMod SHIFT, Q, exit, -bind = $mainMod, E, exec, thunar -bind = $mainMod SHIFT, s, exec,steam --noverifyfiles -cef-enable-debugging -bind = $mainMod CONTROL, s, exec, ~/sfp.sh -bind = $mainMod, t, togglefloating, -bind = $mainMod SHIFT, Return, exec, ~/.config/rofi/launchers/type-2/launcher.sh -bind = $mainMod, F, fullscreen, 0 -bind = $mainMod, Space, fullscreen, 1 -bind = , Print, exec, ~/.local/bin/print-fullscreen -bind = SHIFT, Print, exec, ~/.local/bin/print-select -bind = CONTROL SHIFT, Print, exec, ~/.local/bin/print-tmp -bind = CONTROL, Print, exec, ~/.local/bin/print-window.sh -bind = $mainMod, b, exec, MOZ_ENABLE_WAYLAND=1 firefox -bind = $mainMod ALT, x, exec, XL_SECRET_PROVIDER=file xivlauncher - -# 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 - -bind = $mainMod, period, focusmonitor, -1 -bind = $mainMod, comma, focusmonitor, +1 - -bind = $mainMod SHIFT, H, layoutmsg, swapnext -bind = $mainMod SHIFT, L, layoutmsg, swapnext -binde = $mainMod, H, resizeactive, -30 30 -binde = $mainMod, L, resizeactive, 30 -30 -bind = $mainMod, J, layoutmsg, cyclenext -bind = $mainMod, K, layoutmsg, cycleprev - - -# Switch workspaces with mainMod + [0-9] -bind = $mainMod, 1, exec, try_swap_workspace 1 -bind = $mainMod, 2, exec, try_swap_workspace 2 -bind = $mainMod, 3, exec, try_swap_workspace 3 -bind = $mainMod, 4, exec, try_swap_workspace 4 -bind = $mainMod, 5, exec, try_swap_workspace 5 -bind = $mainMod, 6, exec, try_swap_workspace 6 -bind = $mainMod, 7, exec, try_swap_workspace 7 -bind = $mainMod, 8, exec, try_swap_workspace 8 -bind = $mainMod, 9, exec, try_swap_workspace 9 -bind = $mainMod, 0, exec, try_swap_workspace 10 - -# Move active window to a workspace with mainMod + SHIFT + [0-9] -bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1 -bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2 -bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3 -bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4 -bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5 -bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6 -bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7 -bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8 -bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9 -bind = $mainMod SHIFT, 0, movetoworkspacesilent, 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 +source = ~/.config/hypr/binds.conf diff --git a/desktop/configs/hypr/init.conf b/desktop/configs/hypr/init.conf new file mode 100644 index 0000000..4221c41 --- /dev/null +++ b/desktop/configs/hypr/init.conf @@ -0,0 +1,10 @@ +exec-once = ~/fix.sh +exec-once = spotifyd & +exec-once = lxqt-policykit-agent & +exec-once = gentoo-pipewire-launcher & +exec-once = bash ~/swww +exec-once = gammastep -t 4500:3500 -l -23.5475:-46.63611 -b 1.0:0.5 & +exec-once = gsettings set org.gnome.desktop.interface icon-theme Win10Sur-black-dark & gsettings set org.gnome.desktop.interface gtk-theme Numix-BLACK-Pomegranate & gsettings set org.gnome.desktop.interface cursor-theme Simp1e +exec-once = dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec-once = rm -rf ~/tmp/* +exec-once = corectrl --minimize-systray diff --git a/desktop/configs/hypr/rules.conf b/desktop/configs/hypr/rules.conf new file mode 100644 index 0000000..c436dcb --- /dev/null +++ b/desktop/configs/hypr/rules.conf @@ -0,0 +1,49 @@ +workspace= 9, border:0,rounding:0,decorate:0, + +windowrulev2 = opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$ +windowrulev2 = noanim,class:^(xwaylandvideobridge)$ +windowrulev2 = nofocus,class:^(xwaylandvideobridge)$ +windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$ +windowrulev2 = stayfocused, title:^()$,class:^(steam)$ +windowrulev2 = minsize 1 1, title:^()$,class:^(steam)$ +windowrulev2=float,class:anki,title:Add +windowrulev2=size 0%,class:explorer.exe,title:Wine System Tray + +windowrule=float,xdg-desktop-portal-gtk +windowrule=workspace 5 silent,anki +windowrule=workspace 7 silent,lutris +windowrule=workspace 5 silent,com.obsproject.Studio +windowrule=noblur,com.obsproject.Studio +windowrule=float,pavucontrol +windowrule=workspace 8 silent,steam +windowrule=workspace 7 silent, org.prismlauncher.PrismLauncher +windowrule=float,thunar +windowrule=workspace 10 silent,thunderbird +windowrule=workspace 7 silent,XIVLauncher.Core +windowrule=workspace 7 silent,moe.launcher.the-honkers-railway-launcher +windowrule=workspace 9 silent,ffxiv_dx11.exe +windowrule=float,.*.exe$ +windowrule=workspace 9 silent,.*.exe$ +windowrule=workspace 9 silent,Terraria.bin.x86_64 +windowrule=noborder,.*.exe$ +windowrule=workspace 6 silent,WebCord +windowrule=float,title:(File Upload) +windowrule=float,.*Save.* +windowrule=float,.*Sign in.* +windowrule=workspace 9 silent,gamescope +windowrule=fullscreen, gamescope +windowrule=workspace 9 silent,.*Minecraft.* +windowrule=workspace 9 silent,cs2 +windowrule=workspace 11 silent,.*league.* +windowrule=workspace 11 silent,.*riot.* +windowrule=float,steam_.* +windowrule=fakefullscreen,steam_.* +windowrule=nomaximizerequest,steam_.* +windowrule=nofullscreenrequest,steam_.* +windowrule=workspace 9 silent,steam_.* +windowrule=workspace 10 silent,SFP_UI +windowrule=workspace 4 silent,Spotify +windowrule=workspace 3 silent,parsecd +windowrule=workspace 2 silent,firefox +windowrule=workspace 12 silent,org.pwmt.zathura +windowrule=workspace 13 silent,Chromium-browser-chromium diff --git a/desktop/configs/hypr/settings.conf b/desktop/configs/hypr/settings.conf new file mode 100644 index 0000000..4993f2b --- /dev/null +++ b/desktop/configs/hypr/settings.conf @@ -0,0 +1,73 @@ +input { + kb_layout = br + kb_variant = abnt2 + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + touchpad { + natural_scroll = no + } + + sensitivity = -0.3 # -1.0 - 1.0, 0 means no modification. +} + +general { + gaps_in = 5 + gaps_out = 10 + border_size = 2 + col.active_border = rgba(ff0038ee) rgba(33e2c5ee) 45deg + col.inactive_border = rgba(595959aa) + no_cursor_warps = true + layout = master +} + +decoration { + rounding = 10 + + blur { + enabled = true + size = 2 + passes = 2 + } + + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1a1a1aee) +} + +animations { + enabled = yes + + bezier = myBezier, 0.05, 1.2, 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 +} + +master { + new_is_master = false +} + +gestures { + workspace_swipe = off +} + +misc { + mouse_move_enables_dpms = true + key_press_enables_dpms = true + enable_swallow = true + disable_hyprland_logo = true + focus_on_activate = false +} + +binds { + workspace_back_and_forth = true +}