punktdateien/hypr/hyprland.conf

347 lines
21 KiB
Text

# jstm's hyprland config
####################################################
####################################################
### ___ ###
### /'___\ __ ###
### ___ ___ ___ /\ \__//\_\ __ ###
### /'___\ / __`\ /' _ `\ \ ,__\/\ \ /'_ `\ ###
### /\ \__//\ \L\ \/\ \/\ \ \ \_/\ \ \/\ \L\ \ ###
### \ \____\ \____/\ \_\ \_\ \_\ \ \_\ \____ \ ###
### \/____/\/___/ \/_/\/_/\/_/ \/_/\/___L\ \ ###
### This is the most important part. /\____/ ###
### Here you can configure filepaths, \_/__/ ###
### modkeys, programs and so much more. ###
####################################################
####################################################
# file paths
$fsHomeDir = /home/jeremystartm # define path to home directory aka. $HOME
$fsHyprConfig = $fsHomeDir/.config/hypr # define path to hyprland and hyprpaper config
$fsWaybarConfig = $fsHomeDir/.config/waybar # define path to waybar config
$fsEwwConfig = $fsHomeDir/.config/eww # define path to eww config
$fsJobRunner = $fsHomeDir/.local/bin/jobrunner # define path to companion job runner
# modkeys
$modkeyDefault = SUPER # define modkey
$modkeyRare = SUPER_SHIFT # define modkey for rare or dangerous keybinds
# programs (if your program is a tui, specify "$progTerminal -e <program>" instead)
$progTerminal = konsole # define the preferred terminal emulator
$progEditor = $progTerminal -e nano # define the preferred editor
$progFileManager = dolphin # define the preferred file manager
$progBrowser = librewolf # define the preferred web browser
# commands
$cmdShutdownCommand = poweroff # define the shutdown command
$cmdRestartCommand = reboot # define the restart command
# features
$featDisableAutoreload = true # disables autoreload, use modkey_rare+m to reload to do it manually
$featMouseFocus = true # controls if the focus should change based on mouse input
## effects
$vfxFancy = 2 # define if fancy effects should be enabled, 0: disable fancy stuff, 1: configurable, 2: enable all
$vfxEnableAnimations = true # define animations
$vfxEnableShadows = false # define shadows
$vfxEnableDim = false # define dim
$vfxEnableBlur = true # define blur
$vfxEnableWallpaper = true # define wallpaper display
# external theming
$themQtTheme = qt6ct # define qt theme
$themCursorTheme = Posy_Cursor # define cursor theme
$themCursorSize = 24 # define cursor size
# monitors
monitor=DP-1, 2560x1440, 0x0, 1 # configure second monitor
monitor=HDMI-A-1, 1920x1080, 2560x0, 1 # configure main monitor
###############################################
# __ __ __ __ __ #
# /\ \\ \ /\ \ /\ \\ \ #
# \ \_\\_\ ___ ___ \_\ \ __\ \_\\_\ #
# \/_//_//'___\ / __`\ /'_` \ /'__`\/_//_/ #
# /\ \__//\ \L\ \/\ \L\ \/\ __/ #
# The \ \____\ \____/\ \___,_\ \____\ #
# rest of \/____/\/___/ \/__,_ /\/____/ #
# this config will be uninteresting to most, #
# probably. #
###############################################
# environment variables
env HOME,$homeDir # set HOME variable
env MOZ_ENABLE_WAYLAND=1 # enable wayland support for firefox
# hyprland helpers
exec=bash -c "rm -rf /tmp/logs;mkdir /tmp/logs -p"
exec=env SWI=$vfxEnableWallpaper CONF=$fsHyprConfig $fsHyprConfig/scripts/conf-wall.sh # update wallpaper
exec=env FANCY=$vfxFancy $fsHyprConfig/scripts/conf-fancy.sh # configure fancyness
# fixes
#exec-once=systemctl restart --user pipewire-media-session.service pipewire.socket # restarts pipewire
#exec-once=systemctl disable --now --user pulseaudio.service pulseaudio.socket # nukes pulseaudio
# background stuff
exec=env CONFIG_DIR=$fsWaybarConfig $fsHyprConfig/scripts/bgjob-waybar.sh # display bar
exec=env CONFIG_DIR=$fsEwwConfig $fsHyprConfig/scripts/bgjob-eww.sh # display sysinfo widget
exec=bash -c "pkill -9 ulauncher;ulauncher --hide-window" # run launcher
exec=bash -c "pkill -9 copyq;copyq --start-server" # run clipboard manager
exec=bash -c "pkill -9 fnott;fnott" # run notification daemon
exec=env $fsHyprConfig/scripts/enforce-xdph.sh # enforce xdg-platform-portal-hyprland
exec-once=/usr/lib/polkit-kde-authentication-agent-1 # run auth agent
exec-once=swayosd-server # run swayosd server
exec-once=swayosd-client --caps-lock # enable caps lock display
exec-once=swayosd-client --num-lock # enable num lock display
exec-once=bash -c "pkill -9 node;sleep 2s;companion" # run companion
exec-once=bash $fsJobRunner # run companion job helper
# set backends
env=GDK_BACKEND,wayland # set gdk backend to wayland
env=QT_QPA_PLATFORM,wayland;xcb # set qt backend to wayland, fallback xwayland
#env=SDL_VIDEODRIVER,wayland # set sdl backend to wayland, disabled as it conflicts with SRB2
env=CLUTTER_BACKEND,wayland # set clutter backend to wayland
# set xdg stuff
env=XDG_CURRENT_DESKTOP,Hyprland # set current desktop
env=XDG_SESSION_TYPE,wayland # set session type
env=XDG_SESSION_DESKTOP,Hyprland # set session desktop
# set qt theme
env=QT_STYLE_OVERRIDE,$themQtTheme # set qt style
env=QT_QPA_PLATFORMTHEME,$themQtTheme # set qt style
# set cursor
env=XCURSOR_SIZE,$themCursorSize # set cursor size for xwayland
exec=hyprctl setcursor $themCursorTheme $themCursorSize # set cursor and cursor size
general {
sensitivity=1 # mouse sensitivity, use input:sensitivity for better compat
border_size=3 # border size
no_border_on_floating=false # disable border on floating windows
gaps_in=15 # gap size, window to window
gaps_out=20 # gap size, window to monitor border
col.active_border=rgba(d60532ff) rgba(8300ffff) 90deg # active border
col.inactive_border=rgba(af0532c8) rgba(5c00b3c8) 90deg # inactive border
cursor_inactive_timeout=0 # time to hide cursor during mouse inactivity
layout=dwindle # set layout
no_cursor_warps=true # disable cursor warps/teleports
no_focus_fallback=true # disable focus the nearest window
apply_sens_to_raw=false # apply sensitivity of raw mouse output
resize_on_border=false # allow resize when hitting border
extend_border_grab_area=true # extend border grab area (resize_on_border)
hover_icon_on_border=true # change user icon when over border grab area (resize_on_border)
#allow_tearing=false # master switch for tearing
}
decoration {
rounding=10 # rounded borders, set to 5 for win11's dwm patch
active_opacity=1 # opacity for active windows
inactive_opacity=0.9 # opacity for inactive windows, set to 0 for fun effects
fullscreen_opacity=1 # opacity for fullscreen windows
drop_shadow=$vfxEnableShadows # if windows should drop a shadow
shadow_range=4 # shadow range in px
shadow_render_power=4 # render power, less=better perf
shadow_ignore_window=true # if shadow should be visible below the window
col.shadow=rgba(ee1a1a1a) # shadow color for active windows
col.shadow_inactive=rgba(ee1a1a1a) # shadow color for inactive windows
dim_inactive=$vfxEnableDim # enable inactive window dimming
dim_strength=0.15 # dimming strength
dim_special=0 # dimming strength while special workspace is open
dim_around=0.2 # dimaround window rule strength
screen_shader= # screen shader applied at end of rendering
blur {
enabled=$vfxEnableBlur # if blurring should be enabled
size=1 # blur size aka. blur strength
passes=3 # blur passes aka. strength multiplier
ignore_opacity=false # if blur layer should ignore window opacity
new_optimizations=true # if optimizations should be enabled, heavily recommended
xray=false # if floating windows should ignore the blur of tiled windows, reduces overhead
noise=0 # noise level added to blur
contrast=1 # contrast level added to blur
brightness=0.8 # brightnesss level added to blur
special=false # if blurring should take place behind special workspace, "note: expensive"
}
}
animations {
enabled=$vfxEnableAnimations # if animations should be enabled
bezier=plain, 0, 0, 1, 1 # straight curve
bezier=easeInSine, 0.12, 0, 0.39, 0 # slowest ease in
bezier=easeInQuart, 0.5, 0, 0.75, 0 # slow ease in
bezier=easeInQuint, 0.64, 0, 0.78, 0 # fast ease in
bezier=easeInExpo, 0.7, 0, 0.84, 0 # fastest ease in
bezier=easeOutSine, 0.61, 1, 0.88, 1 # slowest ease out
bezier=easeOutQuart, 0.25, 1, 0.5, 1 # slow ease out
bezier=easeOutQuint, 0.22, 1, 0.36, 1 # fast ease out
bezier=easeOutExpo, 0.16, 1, 0.3, 1 # fastest ease out
animation=windowsIn, 1, 4, easeOutSine # window open animation
animation=windowsOut, 1, 5, easeInSine # window close animation
animation=windowsMove, 1, 6, easeOutExpo # window move/drag/resize animation
animation=fadeIn, 1, 4, easeOutSine # window open fade animation
animation=fadeOut, 1, 4, easeOutSine # window close fade animation
animation=fadeSwitch, 1, 10, easeOutQuart # focus switch opacity fade animation
animation=fadeShadow, 1, 10, easeOutQuart # focus switch shadow fade animation
animation=fadeDim, 1, 10, easeOutQuart # focus switch dim fade animation
animation=border, 1, 2, easeOutExpo # focus switch border animation
animation=borderangle, 1, 100, plain, loop # border color switch animation
animation=workspaces, 1, 10, easeInQuart, slidefade # workspace switch animation
animation=specialWorkspace, 1, 10, easeInQuart, slidefade # special workspace toggle animation
}
input {
kb_model= # keyboard layout model
kb_layout=de # keyboard layout, most important
kb_variant= # keyboard layout variant
kb_options= # keyboard layout options
kb_rules= # keyboard layout rules
kb_file= # custom xkb file, if you want
numlock_by_default=false # if numlock should be enabled by default
repeat_rate=25 # repeat rate for held-down keys per second
repeat_delay=600 # delay before held-down key is repeated in milliseconds
sensitivity=0 # mouse sensitivity, recommended over general:sensitivity for better compat
accel_profile=false # force disable cursor acceleration, bypasses pointer settings, not recommended: cursor desync
left_handed=false # if leftclick and rightclick should be switched
scroll_method=2fg # the scroll method
scroll_button=0 # the scroll button
scroll_button_lock=false # if the scroll button lock should be enabled
natural_scroll=false # if the scrolling direction should be inverted
follow_mouse=$featMouseFocus # if mouse should change focus on move
mouse_refocus=true # if mouse should switch focus to hovered window even without crossing border
float_switch_override_focus=1 # 0: disabled, 1: focus change to window under cursor when changing from tiled-to-floating and vice versa, 2: focus will follow on float-to-float too
touchpad {
disable_while_typing=true # if touchpad should be disabled while typing on keyboard
natural_scroll=false # if the scrolling direction should be inverted
scroll_factor=1 # multiplier applied to scroll movement
middle_button_emulation=false # if a leftclick and rightclick at the same time should be interpreted as middleclick
tap_button_map= # set button mapping for touchpad button emulation, can be lrm (left, right, middle) or lmr (left, middle, right)
clickfinger_behavior=false # if button presses with one, two and three fingers should be intepreted as a leftclick, rightclick and middleclick respectively
tap-to-click=true # if tapping on touchpad with one, two and three fingers should be interpreted as a leftclick, rightclick and middleclick respectively
drag_lock=false # if a dragged item should not be dropped instantly while the finger is lifted off
tap-and-drag=false # if tap and drag mode should be enabled
}
touchdevice {
transform=0 # transforms the input from touchdevices
output= # to which output the touchdevice's input should be bound to
}
#tablet {
# transform=0 # transforms the input from tablets
# output= # to which output the tablet's input should be bound to
# region_position=0, 0 # position of the mapped region in output layout
# region_size=0, 0 # size of the mapped region
#}
}
misc {
disable_hyprland_logo=false # if hyprland logo and hypr-chan wallpaper should be hidden
disable_splash_rendering=true # if the splash text should be disabled
force_default_wallpaper=1 # enforces the default wallpaper variation, -1 is random
vfr=true # if the framerate should be dynamic, recommended
vrr=0 # controls adaptive sync
mouse_move_enables_dpms=true # if mouse movement should wake up your monitors
key_press_enables_dpms=true # if a key press should wake up your monitors
always_follow_on_dnd=true # if focus should change while dragging and dropping
layers_hog_keyboard_focus=true # if keyboard-interactive layers should keep their focus on mouse movement
animate_manual_resizes=true # if manual window resizes should be animated
animate_mouse_windowdragging=true # if window drags should be animated
disable_autoreload=$featDisableAutoreload # if autoreload should be disabled, may help save your battery life
enable_swallow=false # if window swallowing should be enabled
swallow_regex= # regex used to determine which windows should be swallowed
swallow_exception_regex= # regex used to determine which windows should not be swallowed
focus_on_activate=false # if focus should change to a window that requests it
no_direct_scanout=true # if direct scanout should be disabled, aka. if you want lag disable this
hide_cursor_on_touch=true # if the cursor should be hidden on touch input
mouse_move_focuses_monitor=true # if moving the mouse to another monitor should change the focus
#suppress_portal_warnings=false # if warnings about incompatible portal implementations should be ignored
render_ahead_of_time=false # if rendering should start before the monitor displays a frame
render_ahead_safezone=10 # how many milliseconds hyprland should wait before rendering ahead of time
cursor_zoom_factor=1 # how much zoom should be applied on the monitor the cursor is on
cursor_zoom_rigid=false # if the cursor zoom should follow the cursor rigidly of loosely
allow_session_lock_restore=false # if the lockscreen app should be restarted in case it crashes
background_color=rgb(000000) # the background color (!disable_hyprland_logo)
close_special_on_empty=true # if the special workspace should be removed if no window is inside it
new_window_takes_over_fullscreen=2 # if a new tiled window should take over a fullscreen window
}
binds {
pass_mouse_when_bound=false # if mouse events should be passed to programs if a keybind has been triggered
scroll_event_delay=300 # how many milliseconds to wait before allowing another scroll event to trigger a bind
workspace_back_and_forth=false # if attempting to switch the current workspace the previous workspace should be switched instead
allow_workspace_cycles=false # if hyprland shouldn't forget the previous workspace
#workspace_center_on=0 # how the cursor should be positioned when switching to a new workspace
focus_preferred_method=0 # how the focus finding algorithm should find the next window
ignore_group_lock=false # if certain dispatchers should ignore group locks
}
xwayland {
use_nearest_neighbor=true # if xwayland programs should be pixelated instead of blurry (!force_zero_scaling)
force_zero_scaling=false # forces xwayland programs to have a scale factor of 1
}
dwindle {
pseudotile=true # if floating windows should retain their size when tiled
force_split=0 # how the split should operate
preserve_split=true # if the split should not change regardless of what happens
smart_split=false # if the split should be controlled based on the cursor position
smart_resizing=true # if the resizing direction should be determined by the nearest side of the window border to the mouse
permanent_direction_override=false # if the preselect direction should persist
special_scale_factor=1 # the scale factor of windows on the special workspace
split_width_multiplier=1 # the auto-split width multiplier
no_gaps_when_only=0 # if gaps should be displayed, 0: gap+border, 1: nothing, 2: border
use_active_for_splits=true # if the active window should be preferred for splits
default_split_ratio=1 # the default split ratio, 1 is 50/50
}
# Media keys
##bindle=,XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5% # raise volume level by 5%, uses pulseaudio directly
##bindle=,XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5% # lower volume level by 5%, uses pulseaudio directly
bindle=,XF86AudioRaiseVolume, exec, swayosd-client --output-volume=raise # raise volume level by 5%, uses swayosd
bindle=,XF86AudioLowerVolume, exec, swayosd-client --output-volume=lower # lower volume level by 5%, uses swayosd
bindle=,XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle # mute audio
bindle=,XF86AudioPlay, exec, playerctl play-pause # play/pause playback
bindle=,XF86AudioStop, exec, playerctl stop # stop playback
bindle=,XF86AudioNext, exec, playerctl next # play next song
bindle=,XF86AudioPrev, exec, playerctl previous # play previous song
# Application shortcuts
bind=$modkeyDefault, A, exec, $progTerminal # start terminal emulator
bind=$modkeyDefault, S, exec, $progFileManager # start file manager
bind=$modkeyDefault, D, exec, $progBrowser # start browser
# Useful shortcuts
binde=$modkeyDefault, Q, exec, env $fsHyprConfig/scripts/winclose.sh # close active window, includes workarounds
bind=ALT, F4, exec, env $fsHyprConfig/scripts/close-window.sh # alias for modkey_default+q and without repeating
bind=$modkeyDefault, W, exec, env $fsHyprConfig/scripts/perfmode.sh # enables or disables performance mode
bind=$modkeyDefault, E, togglesplit, # change split mode
bind=$modkeyDefault, F, fullscreen, 0 # toggle fullscreen mode
bind=$modkeyDefault, G, fullscreen, 1 # maximize window
bind=$modkeyDefault, H, centerwindow, # center window
bind=ALT, SPACE, exec, ulauncher-toggle # ulauncher toggle
bindr=$modkeyDefault,SUPER_L, exec, ulauncher-toggle # alias for alt+space
# Special workspace
bind = $modkeyDefault, C, togglespecialworkspace, magic # toggle special workspace visibility
bind = $modkeyDefault, V, movetoworkspace, special:magic # move active window to special workspace
bind = $modkeyDefault, B, movetoworkspace, 1 # move active window to normal workspace
bind = $modkeyDefault, B, movewindow, mon:DP-1 # move active window to monitor 0
# Dangerous or rarily used binds
bind=$modkeyRare, Q, exit, # exit Hyprland
bind=$modkeyRare, W, exec, $cmdShutdownCommand # shutdown system
bind=$modkeyRare, E, exec, $cmdRestartCommand # reboot system
bind=$modkeyRare, Y, togglefloating, active # toggle float mode
bind=$modkeyRare, M, exec, hyprctl reload # reload hyprland config
bind=$modkeyRare, N, exec, $progEditor '$fsHyprConfig/hyprland.conf' # edit hyprland config
# Focus manipulation
bind=$modkeyDefault, LEFT, movefocus, l # move focus to left window
bind=$modkeyDefault, RIGHT, movefocus, r # move focus to right window
bind=$modkeyDefault, UP, movefocus, u # move focus to upper window
bind=$modkeyDefault, DOWN, movefocus, d # move focus to lower window
#bind=$modkeyDefault, K, exec, flatpak run org.prismlauncher.PrismLauncherk
# Window size and position manipulation
bindm=$modkeyDefault, mouse:272, movewindow # move window
bindm=$modkeyDefault, mouse:273, resizewindow # resize window
# Window rules
## xwaylandvideobridge
windowrulev2=opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$
windowrulev2=noanim,class:^(xwaylandvideobridge)$
windowrulev2=nofocus,class:^(xwaylandvideobridge)$
windowrulev2=noinitialfocus,class:^(xwaylandvideobridge)$
# policykit authentication
windowrulev2=float,class:org.kde.polkit-kde-authentication-agent-1
# pavucontrol
windowrulev2=float,class:pavucontrol
# copyq
windowrulev2=float,class:com.github.hluk.copyq
# EOF <- yes, you've reached the end