Add hyprland config

This commit is contained in:
Martin Larsson 2024-04-07 02:10:08 +02:00
parent c9f3439835
commit b21ebf8043
5 changed files with 316 additions and 0 deletions

147
hypr/hyprland.conf Normal file
View file

@ -0,0 +1,147 @@
source=~/.config/hypr/macchiato.conf
# Environment variables for nvidia
env = LIBVA_DRIVER_NAME,nvidia
env = XDG_SESSION_TYPE,wayland
env = GBM_BACMEND,nvidia-drm
env = __GLX_VNEDOR_LIBRARY_NAME,nvidia
env = WLR_NO_HARDWARE_CURSORS,1
# Monitor setup
monitor = DP-1,3440x1440@240,0x0,1,bitdepth,10
# Screenshots using grim doesnt support 10 bit color as they become a different format :S
# monitor=DP-1,3440x1440@240,0x0,1,bitdepth
# Setup workspaces on boot
exec-once = [workspace 1 silent] kitty
exec-once = [workspace 2 silent] firefox
# Mandatory OS build blocks
exec-once = dunst # Notification manager
exec-once = /usr/lib/polkit-kde-authentication-agent-1 # Provides support for non-priveleged processes to talk to priveleged ones.
exec-once = waybar
# Hyprpaper
$randomize_wallpaper = sh ~/.config/hypr/hyprpaper_set.sh 2
exec-once = sh ~/.config/hypr/hyprpaper_preload.sh
exec-once = hyprpaper
exec-once = $randomize_wallpaper
# Bindings
bind = ALT, SPACE, exec, fuzzel -w 56 --line-height 24 -x 20 -P 8 -b 24273af6 -t cad3f5ff -m ed8796ff -s 363a4ff6 -S a6da95ff -M ed8796ff -B 2 -r 12 -C 181926ff -f "JetBrainsMonoNL Nerd Font Mono"
$default = SUPER
$resize = SUPER SHIFT
$move = SUPER CTRL
$movews = SUPER ALT
bind = $default, K, killactive
bind = $default, Space, togglefloating
bind = $default, S, fullscreen
bind = $default, Q, workspace, 1
bind = $default, Q, exec, $randomize_wallpaper
bind = $default, W, workspace, 2
bind = $default, W, exec, $randomize_wallpaper
bind = $default, F, workspace, 3
bind = $default, F, exec, $randomize_wallpaper
bind = $default, P, workspace, 4
bind = $default, P, exec, $randomize_wallpaper
bind = $default, B, workspace, 5
bind = $default, B, exec, $randomize_wallpaper
bind = $default, J, workspace, 6
bind = $default, J, exec, $randomize_wallpaper
bind = $default, L, workspace, 7
bind = $default, L, exec, $randomize_wallpaper
bind = $default, U, workspace, 8
bind = $default, U, exec, $randomize_wallpaper
bind = $default, Y, workspace, 9
bind = $default, Y, exec, $randomize_wallpaper
bind = $movews, Q, movetoworkspace, 1
bind = $movews, W, movetoworkspace, 2
bind = $movews, F, movetoworkspace, 3
bind = $movews, P, movetoworkspace, 4
bind = $movews, B, movetoworkspace, 5
bind = $movews, J, movetoworkspace, 6
bind = $movews, L, movetoworkspace, 7
bind = $movews, U, movetoworkspace, 8
bind = $movews, Y, movetoworkspace, 9
bind = $default, M, movefocus, l
bind = $default, N, movefocus, d
bind = $default, E, movefocus, u
bind = $default, I, movefocus, r
bind = $resize, M, resizeactive, -40 0
bind = $resize, N, resizeactive, 0 40
bind = $resize, E, resizeactive, 0 -40
bind = $resize, I, resizeactive, 40 0
bind = $move, M, movewindow, l
bind = $move, N, movewindow, d
bind = $move, E, movewindow, u
bind = $move, I, movewindow, r
general {
border_size = 2
gaps_in = 16
gaps_out = 10, 20, 20, 20
col.inactive_border = $mantle
col.active_border = $maroon
resize_on_border = true
}
decoration {
rounding = 8
active_opacity = 0.95
inactive_opacity = 0.875
fullscreen_opacity = 1.0
drop_shadow = true
shadow_range = 8
shadow_render_power = 4
col.shadow = $crust
col.shadow_inactive = $mantle
dim_inactive = true
dim_strength = 0.1
# screen_shader = examples/screenShader.frag
blur {
size = 2
passes = 3
ignore_opacity = true
xray = true
contrast = 4
}
}
input {
force_no_accel = true
scroll_method = on_button_down
scroll_button_lock = true
scroll_factor = 0.5
follow_mouse = 2
}
misc {
disable_hyprland_logo = true
disable_splash_rendering = true
background_color = $flamingo
#vrr = 1 - This doesn't seem to play nicely with NVIDIA GPU's :(
focus_on_activate = true
}
binds {
# pass_mouse_when_bound if disabled, will not pass the mouse events to apps / dragging windows around if a keybind has been triggered. bool false
# scroll_event_delay in ms, how many ms to wait after a scroll event to allow to pass another one for the binds. int 300
# workspace_back_and_forth If enabled, an attempt to switch to the currently focused workspace will instead switch to the previous workspace. Akin to i3s auto_back_and_forth. bool false
# allow_workspace_cycles If enabled, workspaces dont forget their previous workspace, so cycles can be created by switching to the first workspace in a sequence, then endlessly going to the previous workspace. bool false
# workspace_center_on Whether switching workspaces should center the cursor on the workspace (0) or on the last active window for that workspace (1) int 0
# focus_preferred_method sets the preferred focus finding method when using focuswindow/movewindow/etc with a direction. 0 - history (recent have priority), 1 - length (longer shared edges have priority) int 0
# ignore_group_lock If enabled, dispatchers like moveintogroup, moveoutofgroup and movewindoworgroup will ignore lock per group. bool false
# movefocus_cycles_fullscreen If enabled, when on a fullscreen window, movefocus will cycle fullscreen, if not, it will move the focus in a direction.
}
opengl {
nvidia_anti_flicker = true
}