nixos-config/home/hyprland.nix
2023-08-07 21:22:56 +02:00

103 lines
3.1 KiB
Nix

{ pkgs, config, lib, ... }: let
modifier = "SUPER";
in {
xdg.configFile."hypr/hyprland.conf".text = ''
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,hyprland
env = GDK_BACKEND,wayland
env = QT_QPA_PLATFORM,wayland
monitor=eDP-1,1920x1080@60.096001,0x0,1
general {
gaps_in = 0
gaps_out = -1
border_size = 0
col.active_border = rgba(002B36ee) 45deg
col.inactive_border = rgba(07364299)
layout = dwindle
}
input {
kb_layout = de
accel_profile = flat
follow_mouse = 1
mouse_refocus = 0
sensitivity = 0
touchpad {
natural_scroll = yes
disable_while_typing = no
}
repeat_rate = 50
repeat_delay = 300
}
decoration {
rounding = 10
blur = yes
blur_size = 3
blur_passes = 1
blur_new_optimizations = on
drop_shadow = yes
shadow_range = 4
col.shadow = rgba(1a1a1aee)
}
# animations {
# enabled = true
# bezier = myBezier, 0.05, 0.9, 0.1, 1.05
# animation = windows, 1, 7, myBezier
# animation = windowsOut, 1, 7, default, popin 80%
# animation = workspace, 1, 6, default
# animation = border, 1, 10, default
# animation = borderangle, 1, 8, default
# animation = fade, 1, 7, default
# }
dwindle {
preserve_split = yes
# pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
}
master {
new_is_master = true
new_on_top = no
}
misc {
disable_hyprland_logo = true
disable_splash_rendering = true
}
exec-once = waybar
exec-once = sleep 0.1; swww init && swww img ${../assets/wallpaper_street.jpg}
$SUPER = ${modifier}
$SUPER_SHIFT = ${modifier}_SHIFT
$SUPER_ALT = ${modifier}_ALT
bind = $SUPER, Q, killactive
bind = $SUPER, T, exec, kitty
bind = $SUPER, B, exec, librewolf
bind = $SUPER, F, fullscreen,1
bind = $SUPER_SHIFT, F, fullscreen,0
bind = $SUPER_SHIFT, H, splitratio, -0.05
bind = $SUPER_SHIFT, L, splitratio, +0.05
# bind = $SUPER, V, togglesplit,
# Move/resize windows with super + LMB/RMB and dragging
bindm = $SUPER, mouse:272, movewindow
bindm = $SUPER, mouse:273, resizewindow
# Change volume with keys
bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && notify-send -t 2000 "Muted" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
bindl=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ && notify-send -t 2000 "Raised volume to" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | tail -c 3)%"
bindl=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && notify-send -t 2000 "Lowered volume to" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | tail -c 3)%"
bindl=, XF86MonBrightnessDown, exec, brightnessctl set 5%- && notify-send -t 2000 "Decreased brightness to" "$(brightnessctl get)"
bindl=, XF86MonBrightnessUp, exec, brightnessctl set +5% && notify-send -t 2000 "Increased brightness to" "$(brightnessctl get)"
'';
}