From 316fc60546b8e75257b8f2a98b7e88a2d45178d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Dias?= Date: Mon, 23 Sep 2024 13:19:06 -0300 Subject: [PATCH] :sparkles: feat(hypr): use xf86 binds, add nvidia configuration as optional --- hypr/appearance.conf | 2 +- hypr/bindings.conf | 21 ++++++++++++--------- hypr/environment.conf | 1 + hypr/hyprland.conf | 3 +++ hypr/hyprpaper.conf | 2 +- hypr/monitors.conf | 2 +- hypr/nvidia.conf | 19 +++++++++++++++++++ hypr/rules.conf | 1 + 8 files changed, 39 insertions(+), 12 deletions(-) create mode 100644 hypr/nvidia.conf diff --git a/hypr/appearance.conf b/hypr/appearance.conf index ae345f9..47bf1d8 100644 --- a/hypr/appearance.conf +++ b/hypr/appearance.conf @@ -56,7 +56,7 @@ animations { animation = borderangle, 1, 8, default animation = fade, 1, 3.5, default animation = fadeLayers, 1, 7, amazingBezier - animation = workspaces, 1, 5.5, amazingBezier, slidefade + animation = workspaces, 1, 5.5, amazingBezier, slide } dwindle { diff --git a/hypr/bindings.conf b/hypr/bindings.conf index 041cb88..90adada 100644 --- a/hypr/bindings.conf +++ b/hypr/bindings.conf @@ -13,7 +13,7 @@ $lockscreen = hyprlock $screenshotDir = $HOME/Screenshots $screenshotFull = hyprshot -m output -o $screenshotDir $screenshotSelect = hyprshot -m region -o $screenshotDir - +$media = spotify-launcher input { kb_layout = br @@ -49,14 +49,17 @@ bind = $mainMod, N, exec, swaync-client -t bind = $mainMod, L, exec, $lockscreen # Media keys -bind = , code:121, exec, pamixer --mute # Mute -bind = , code:122, exec, pamixer -d 5 # Decrease volume -bind = , code:123, exec, pamixer -i 5 # Increase volume -bind = , code:173, exec, playerctl previous # Previous media -bind = , code:172, exec, playerctl play-pause # Toggle Play/Pause media -bind = , code:171, exec, playerctl next # Next media -bind = , code:232, exec, brightnessctl s 5%- # Lower monitor brightness -bind = , code:233, exec, brightnessctl s +5% # Increase monitor brightness +bind = , XF86AudioMedia, exec, $media +bind = , XF86AudioLowerVolume, exec, pamixer -d 5 # Decrease volume +bind = , XF86AudioRaiseVolume, exec, pamixer -i 5 # Increase volume +bind = , XF86AudioMute, exec, pamixer --toggle-mute # Mute +bind = , XF86AudioPrevious, exec, playerctl previous # Previous media +bind = , XF86AudioNext, exec, playerctl next # Next media +bind = , XF86AudioPlay, exec, playerctl play-pause # Toggle Play/Pause media + +# Brightness Keys +bind = , XF86MonBrightnessDown, exec, brightnessctl s 5%- # Lower monitor brightness +bind = , XF86MonBrightnessUp, exec, brightnessctl s +5% # Increase monitor brightness # Screenshot bind = , Print, exec, $screenshotSelect diff --git a/hypr/environment.conf b/hypr/environment.conf index 9f0a484..8ffcbf6 100644 --- a/hypr/environment.conf +++ b/hypr/environment.conf @@ -3,6 +3,7 @@ ## ENVIRONMENT ## ################# +# Others env = XCURSOR_THEME, Adwaita env = XCURSOR_SIZE, 24 env = HYPRCURSOR_THEME, Adwaita diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 9aeea10..a27f0f4 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -3,6 +3,9 @@ ## Retrozinndev's Hyprland Configurations! ## ############################################# +# Nvidia Settings +# source = ~/.config/hypr/nvidia.conf + # Environment source = ~/.config/hypr/environment.conf diff --git a/hypr/hyprpaper.conf b/hypr/hyprpaper.conf index d0455df..fd9aed2 100644 --- a/hypr/hyprpaper.conf +++ b/hypr/hyprpaper.conf @@ -1,5 +1,5 @@ -$wallpaper = /home/joaov/wallpapers/Ryo Yamada.png +$wallpaper = /home/joaov/wallpapers/Kessoku Band Reunited.jpg splash = true preload = $wallpaper diff --git a/hypr/monitors.conf b/hypr/monitors.conf index 9c8c640..34374af 100644 --- a/hypr/monitors.conf +++ b/hypr/monitors.conf @@ -13,5 +13,5 @@ # 5 -> variable refresh rate; # 6 -> 1: vrr enabled, 0: no vrr. -monitor = VGA-1, 1920x1080@60, 0x0, 1, vrr, 1 +monitor = HDMI-A-1, 1920x1080@75, 0x0, 1, vrr, 1 diff --git a/hypr/nvidia.conf b/hypr/nvidia.conf new file mode 100644 index 0000000..754f699 --- /dev/null +++ b/hypr/nvidia.conf @@ -0,0 +1,19 @@ + +##################### +## NVIDIA SETTINGS ## +##################### + +env = LIBVA_DRIVER_NAME, nvidia +env = XDG_SESSION_TYPE, wayland +env = GBM_BACKEND, nvidia-drm +env = __GLX_VENDOR_LIBRARY_NAME, nvidia +env = _VK_LAYER_NV_optimus, NVIDIA_only +env = __NV_PRIME_RENDER_OFFLOAD, 1 + +cursor { + no_hardware_cursors = true +} + +render { + explicit_sync = true +} diff --git a/hypr/rules.conf b/hypr/rules.conf index 6c5fb0b..d872da9 100644 --- a/hypr/rules.conf +++ b/hypr/rules.conf @@ -19,6 +19,7 @@ windowrulev2 = size 50% 50%, class:org.pulseaudio.pavucontrol # Moving windowrulev2 = move 49.27% 7.28%, class:org.pulseaudio.pavucontrol +windowrulev2 = movetoworkspace e, class:org.pulseaudio.pavucontrol # Maximize windowrulev2 = tile, title:^(Resources)$