update hyprland from nixos branch

This commit is contained in:
Benjamin Palko 2024-10-10 22:14:00 -04:00
parent 6265faa787
commit 31f3b9e1b2
9 changed files with 78 additions and 36 deletions

17
hypr/config/environments/nvidia.conf Executable file → Normal file
View file

@ -4,13 +4,20 @@
# -----------------------------------------------------
# https://wiki.hyprland.org/Nvidia/
env = XCURSOR_SIZE,24
env = QT_QPA_PLATFORM,wayland
env = WLR_NO_HARDWARE_CURSORS,1
env = LIBVA_DRIVER_NAME,nvidia
env = XDG_SESSION_TYPE,wayland
env = GBM_BACKEND,nvidia-drm
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
# env = __GL_VRR_ALLOWED,1
# env = WLR_DRM_NO_ATOMIC,1
cursor {
no_hardware_cursors = true
}
env = NVD_BACKEND,direct
env = XCURSOR_SIZE,24
env = QT_QPA_PLATFORM,wayland
env = WLR_NO_HARDWARE_CURSORS,1
env = __GL_VRR_ALLOWED,1
env = WLR_DRM_NO_ATOMIC,1
env = ELECTRON_OZONE_PLATFORM_HINT,auto

11
hypr/config/keybinds.conf Executable file → Normal file
View file

@ -2,7 +2,7 @@
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, T, exec, $terminal
bind = $mainMod, X, killactive,
bind = $mainMod, ESCAPE, exit,
bind = $mainMod, ESCAPE, exec, $powerMenu
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, F, togglefloating,
bind = $mainMod, R, exec, $menu
@ -44,13 +44,18 @@ bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
###############################################################################
# Special workspaces
###############################################################################
# Scratchpad
bind = CTRL SHIFT, S, togglespecialworkspace, magic
bind = CTRL $mainMod, S, movetoworkspace, special:magic
# Terminal
bind = CTRL SHIFT, T, togglespecialworkspace, terminal
bind = CTRL $mainMod, T, movetoworkspace, special:terminal
# Music
bind = CTRL SHIFT, M, togglespecialworkspace, music
bind = CTRL $mainMod, M, movetoworkspace, special:music
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
@ -65,8 +70,8 @@ bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# Audio keybinds
bind = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+
bind = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-
bind = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+
bind = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-
bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bind = , XF86AudioPlay, exec, playerctl play-pause
bind = , XF86AudioStop, exec,

30
hypr/config/rules.conf Executable file → Normal file
View file

@ -9,23 +9,27 @@ windowrulev2 = nomaxsize, class:.* # You'll probably like this.
# Apps
windowrule = workspace 1, title:^Spotify Premium$
windowrule = float, title:rofi
windowrule = workspace special:terminal, kitty
windowrule = workspace special:music, title:^Spotify Premium$
windowrulev2 = opacity 0.85 0.8, initialTitle:^Spotify Premium$
windowrule = workspace 2, discord
windowrule = opacity 0.999, discord
windowrulev2 = workspace 1,class:(discord)
windowrule = workspace 3, firefox
windowrulev2 = workspace 1,class:(Caprine)
windowrule = opacity 0.999, Caprine
windowrule = workspace 2, firefox
windowrule = opacity 0.999, firefox
windowrule = float, kitty
windowrule = workspace special:terminal, kitty
windowrule = move 25% 25%, kitty
windowrule = size 50% 50%, kitty
windowrulev2 = workspace 4,float,class:(steam)
windowrule = workspace 4, class:^(steam_app_*)$
windowrule = float, Thunar
windowrule = move 12.5% 12.5%, Thunar
windowrule = size 75% 75%, Thunar
windowrule = immediate, class:^(steam_app_553850)$
# Workspaces
workspace = 1, persistent:true
workspace = 2, persistent:true
workspace = 3, persistent:true
workspace = 4, persistent:true

5
hypr/config/startup.conf Executable file → Normal file
View file

@ -9,3 +9,8 @@ exec-once = emote
# Wallpaper Daemon
exec-once = swww-daemon
exec-once = [workspace 1 silent] discord --enable-features=UseOzonePlatform --ozone-platform=wayland
exec-once = [workspace 1 silent] caprine --enable-features=UseOzonePlatform --ozone-platform=wayland
exec-once = [workspace 2 silent] firefox
exec-once = [workspace special:music silent] spotify

22
hypr/hypridle.conf Executable file → Normal file
View file

@ -1,7 +1,25 @@
general {
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
before_sleep_cmd = loginctl lock-session # lock before suspend.
after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
}
listener {
timeout = 150 # 2.5min.
on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor.
on-resume = brightnessctl -r # monitor backlight restore.
}
# turn off keyboard backlight, comment out this section if you dont have a keyboard backlight.
listener {
timeout = 150 # 2.5min.
on-timeout = brightnessctl -sd rgb:kbd_backlight set 0 # turn off keyboard backlight.
on-resume = brightnessctl -rd rgb:kbd_backlight # turn on keyboard backlight.
}
listener {
timeout = 300 # 5min
on-timeout = hyprlock # lock screen when timeout has passed
#on-resume = notify-send "Welcome back!" # notification activity is detected after timeout has fired.
on-timeout = loginctl lock-session # lock screen when timeout has passed
}
listener {

9
hypr/hyprland.conf Executable file → Normal file
View file

@ -13,7 +13,7 @@
#autogenerated = 1 # remove this line to remove the warning
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,auto
monitor=DP-1,2560x1440@144,auto,auto
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
@ -30,12 +30,16 @@ source = ~/.cache/wal/colors-hyprland.conf
# Set programs that you use
$terminal = kitty
$fileManager = Thunar
$menu = rofi -show drun
$menu = ~/.config/rofi/scripts/launcher_t1
$powerMenu = ~/.config/rofi/scripts/powermenu_t1
$lockScreen = hyprlock
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
exec-once=hyprctl setcursor volantes_cursors 24
env = XCURSOR_THEME,
source = ~/.config/hypr/config/environments/nvidia.conf
source = ~/.config/hypr/config/keybinds.conf
source = ~/.config/hypr/config/rules.conf
@ -113,7 +117,6 @@ dwindle {
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true
}
gestures {

0
hypr/hyprlock.conf Executable file → Normal file
View file

0
hypr/scripts/start-swaync.sh Executable file → Normal file
View file

View file

@ -1,12 +1,12 @@
#!/bin/bash
#!/bin/sh
CONFIG_FILES="$HOME/.config/waybar/ $HOME/.cache/wal/"
trap "killall waybar" EXIT
trap "killall .waybar-wrapped" EXIT
while true; do
sleep 1.6
waybar &
inotifywait -e create,modify -r $CONFIG_FILES
killall waybar
killall .waybar-wrapped
done