From 505e01299818238090f62ba6425bbba1ed1562e5 Mon Sep 17 00:00:00 2001 From: Lucas Barbieri Date: Sun, 19 Nov 2023 08:16:40 -0300 Subject: [PATCH] add new hyprland config --- desktop/configs/hypr/hyprland.conf | 242 +++++++++++++------------ desktop/configs/hypr/hyprpaper.conf | 4 - desktop/configs/hypr/scripts/workspace | 52 ------ 3 files changed, 125 insertions(+), 173 deletions(-) delete mode 100644 desktop/configs/hypr/hyprpaper.conf delete mode 100755 desktop/configs/hypr/scripts/workspace diff --git a/desktop/configs/hypr/hyprland.conf b/desktop/configs/hypr/hyprland.conf index 6848585..c3b1f0e 100644 --- a/desktop/configs/hypr/hyprland.conf +++ b/desktop/configs/hypr/hyprland.conf @@ -1,17 +1,18 @@ -# jabuxas +# 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 -monitor=HDMI-A-1, 1920x1080, 0x0, 1 -monitor=DP-1, 1920x1080, 1920x145, 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 -exec-once = hyprpaper & redshift -t 5700:3600 -l -23.5475:-46.63611 -b 0.9:0.5 -exec-once = lxqt-policykit-agent -exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=Hyprland -exec-once = mpd -exec-once = rm -rf ~/tmp/* -exec-once = dunst & -exec-once = gsettings set org.gnome.desktop.interface icon-theme Qogir & gsettings set org.gnome.desktop.interface gtk-theme Adapta-Eta -# source = ~/.config/hypr/myColors.conf +env = XCURSOR_SIZE,24 +env = WLR_DRM_NO_ATOMIC,1 input { kb_layout = br @@ -26,28 +27,28 @@ input { natural_scroll = no } - # sensitivity = -0.69 # -1.0 - 1.0, 0 means no modification. - sensitivity = -0.5 + sensitivity = -0.3 # -1.0 - 1.0, 0 means no modification. } general { - - gaps_in = 6 - gaps_out = 6 - border_size = 1 - col.active_border = rgb(717171) - col.inactive_border = rgb(161616) - + 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 = yes - blur_size = 3 - blur_passes = 1 - blur_new_optimizations = on + + blur { + enabled = true + size = 2 + passes = 2 + } drop_shadow = yes shadow_range = 4 @@ -58,110 +59,112 @@ decoration { animations { enabled = yes - bezier=slow,0,0.85,0.3,1 - bezier=overshot,0.7,0.6,0.1,1.1 - bezier=bounce,1,1.6,0.1,0.85 - bezier=slingshot,1,-1,0.15,1.25 - bezier=nice,0,6.9,0.5,-4.20 + bezier = myBezier, 0.05, 1.2, 0.1, 1.05 - animation = windows, 1, 5, bounce, slide - # animation = windowsOut, 1, 7, default, popin 80% - animation = border, 1, 20, default - animation = fade, 1, 5, default - animation = workspaces, 1, 5, overshot, slide + 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_on_top = true + new_is_master = false } -# Example per-device config -# device:epic mouse V1 { -# sensitivity = -0.5 -# } +gestures { + workspace_swipe = off +} -windowrule = workspace 2 silent, ^(firefox-esr)$ -windowrule = workspace 2 silent, ^(firefox)$ -windowrule = workspace 2 silent, ^(Brave-browser)$ +misc { + mouse_move_enables_dpms = true + key_press_enables_dpms = true + enable_swallow = true + disable_hyprland_logo = true + focus_on_activate = false +} -windowrule = workspace 4 silent, ^(Waydroid)$ -windowrule = workspace 4 silent, ^(Waydroid)$ +binds { + workspace_back_and_forth = true +} -windowrule = workspace 4 silent, Minecraft* -windowrule = size 1920x1080, Minecraft* -windowrule = noblur, Minecraft* -windowrule = noshadow, Minecraft* -windowrule = noanim, Minecraft* +workspace= 9, border:0,rounding:0,decorate:0, -windowrule = noblur, pobfrontend -windowrule = noshadow, pobfrontend -windowrule = noanim, pobfrontend - -windowrule = workspace 3 silent, org.prismlauncher.PrismLauncher -windowrule = float, org.prismlauncher.PrismLauncher -windowrule = float, io.bassi.Amberol -windowrule = workspace 5 silent, ^(com.obsproject.Studio)$ -windowrule = float, ^(vlc)$ -windowrule = float, ^(lxqt-policykit-agent)$ -windowrule = float, ^(pavucontrol)$ -windowrule = workspace 3 silent, ^(Google-chrome)$ -windowrule = workspace 3 silent, ^(discord)$ -windowrule = float, title:^(Firefox — Sharing Indicator)$ -windowrule = workspace 9 silent, title:^(Firefox — Sharing Indicator)$ -windowrule = float, title:^(Steam - News) -windowrule = maxsize 0 0, title:^(Firefox — Sharing Indicator)$ -windowrule = float, ^(org.gnome.Nautilus)$ - -windowrule = fullscreen, gamescope -windowrule = noblur, gamescope -# windowrule = forceinput, ^(gamescope)$ -windowrule = workspace 4 silent, ^(gamescope)$ -windowrule = noanim, gamescope -windowrule = noshadow, gamescope - -windowrule = workspace 4 silent, ^(osu!)$ -#windowrule = fullscreen, ^(osu!)$ -windowrule = workspace 8 silent, ^(Steam)$ -windowrule = workspace 3 silent, ^(lutris)$ -windowrule = float, ^(lutris) -windowrule = size 720x1080, ^(lutris) -windowrule = center, ^(lutris) -windowrule = workspace 4 silent,^(explorer.exe)$ -windowrule = float, ^(thunar)$ +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, M, exec, kitty -e ncmpcpp -# bind = $mainMod CONTROL, Return, exec, kitty -c /home/jab/.config/kitty/undefined.conf bind = $mainMod SHIFT, C, killactive, -bind = CONTROL SHIFT, Q, exec, pkill -KILL -U $USER -bind = $mainMod SHIFT, S, exec, $HOME/steam/steam.sh -bind = $mainMod, E, exec, thunar -bind = $mainMod, t, togglefloating, -bind = $mainMod SHIFT, Return, exec, ~/.config/rofi/launchers/type-7/launcher.sh -bind = $mainMod, Space, fullscreen, 1 -bind = , Print, exec, ~/.local/bin/print-fullscreen -bind = SHIFT, Print, exec, ~/.local/bin/print-select -bind = $mainMod, P, layoutmsg, swapwithmaster -bind = $mainMod, B, exec, brave-bin -bind = $mainMod, Comma, focusmonitor, HDMI-A-1 -bind = $mainMod, Period, focusmonitor, DP-1 -bind = $mainMod SHIFT, Comma, movewindow, mon:HDMI-A-1 -bind = $mainMod SHIFT, Period, movewindow, mon:DP-1 +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, Escape, exec, mpc toggle -bind = $mainMod, F1, exec, mpc prev -bind = $mainMod, F2, exec, mpc next - +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 -# good defaults lmao +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 @@ -169,17 +172,20 @@ binde = $mainMod, L, resizeactive, 30 -30 bind = $mainMod, J, layoutmsg, cyclenext bind = $mainMod, K, layoutmsg, cycleprev -bind = $mainMod, 1, exec, ~/.config/hypr/scripts/workspace 1 -bind = $mainMod, 2, exec, ~/.config/hypr/scripts/workspace 2 -bind = $mainMod, 3, exec, ~/.config/hypr/scripts/workspace 3 -bind = $mainMod, 4, exec, ~/.config/hypr/scripts/workspace 4 -bind = $mainMod, 5, exec, ~/.config/hypr/scripts/workspace 5 -bind = $mainMod, 6, exec, ~/.config/hypr/scripts/workspace 6 -bind = $mainMod, 7, exec, ~/.config/hypr/scripts/workspace 7 -bind = $mainMod, 8, exec, ~/.config/hypr/scripts/workspace 8 -bind = $mainMod, 9, exec, ~/.config/hypr/scripts/workspace 9 -bind = $mainMod, 0, exec, ~/.config/hypr/scripts/workspace 0 +# 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 @@ -191,8 +197,10 @@ 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 - diff --git a/desktop/configs/hypr/hyprpaper.conf b/desktop/configs/hypr/hyprpaper.conf deleted file mode 100644 index 01e72d1..0000000 --- a/desktop/configs/hypr/hyprpaper.conf +++ /dev/null @@ -1,4 +0,0 @@ -preload = /home/jab/Pictures/wallpapers/ghibli.png -preload = /home/jab/Pictures/wallpapers/700049.jpg -wallpaper = HDMI-A-1,/home/jab/Pictures/wallpapers/ghibli.png -wallpaper = DP-1,/home/jab/Pictures/wallpapers/700049.jpg diff --git a/desktop/configs/hypr/scripts/workspace b/desktop/configs/hypr/scripts/workspace deleted file mode 100755 index 169bb30..0000000 --- a/desktop/configs/hypr/scripts/workspace +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# -# monitors=/tmp/hypr/monitors_temp -# hyprctl monitors > $monitors -# -# if [[ -z $1 ]]; then -# workspace=$(grep -B 4 "focused: no" "$monitors" | awk 'NR==1 {print $3}') -# else -# workspace=$1 -# fi -# -# -# activemonitor=$(grep -B 10 "focused: yes" "$monitors" | awk 'NR==1 {print $2}') -# passivemonitor=$(grep -B 10 "focused: no" "$monitors" | awk 'NR==1 {print $2}') -# #activews=$(grep -A 2 "$activemonitor" "$monitors" | awk 'NR==3 {print $1}' RS='(' FS=')') -# passivews=$(grep -A 5 "$passivemonitor" "$monitors" | awk 'NR==7 {print $3}') -# echo $passivews -# # echo $workspace -# -# if [[ $workspace -eq $passivews ]] && [[ $activemonitor != "$passivemonitor" ]]; then -# hyprctl dispatch swapactiveworkspaces "$activemonitor" "$passivemonitor" -# echo a -# elif [[ $workspace -eq $passivews ]]; then -# hyprctl swapactiveworkspaces "$activemonitor" "$passivemonitor" -# echo c -# else -# hyprctl dispatch moveworkspacetomonitor "$workspace $activemonitor" && hyprctl dispatch workspace "$workspace" -# echo b -# fi -# -# exit 0 -# -WORKSPACE="$1" - -monitors_out="$(hyprctl monitors -j)" -focused_mon="$(echo "$monitors_out" | jq '.[] | select(.focused==true) | .id')" -focused_wks="$(echo "$monitors_out" | jq '.[].activeWorkspace.id')" - -# Workspace is already focused, check on which monitor -if echo "$focused_wks" | grep "$WORKSPACE" >/dev/null; then - mon_id="$(echo "$monitors_out" | jq ".[] | select(.activeWorkspace.id==$WORKSPACE) | .id")" - - # If the workspace is focused on the active monitor, don't do anything (we're here). - # Otherwise, swap the workspaces. - if [ "$mon_id" -ne "$focused_mon" ]; then - hyprctl dispatch swapactiveworkspaces "$focused_mon" "$mon_id" - fi -# Switching to an unfocused workspace, always move it to focused monitor -else - hyprctl dispatch moveworkspacetomonitor "$WORKSPACE" "$focused_mon" - hyprctl dispatch workspace "$WORKSPACE" -fi