hyprland

A dynamic tiling Wayland compositor based on wlroots that doesn’t sacrifice on its looks.

Screenshot

Configuration

The config is located in ~/.config/hypr/hyprland.conf.

Variables

Variable Types

typedescription
intinteger
boolboolean, true or false (yes or no, on or off, 0 or 1)
floatfloating point number
colorcolor, rgba(b3ff1aee), rgb(b3ff1a)
vec2vector with 2 values (float), seperated by a space (e.g 0 0 or -10.9 99.1)
MODa string modmask (e.g. SUPER or SUPERSHIFT or SUPER + SHIFT or SUPER and SHIFT or CTRL_SHIFT or empty for none)
stra string

Sections

General
namedescriptiontypedefault
sensitivitymouse sensitivity (legacy, may cause bugs if not 1, prefer input:sensitivity)float1.0
border_sizesize of the border around windowsint1
no_border_on_floatingdisable borders for floating windowsboolfalse
gaps_ingaps between windowsint5
gaps_outgaps between windows and monitor edgesint20
col.inactive_borderborder color for inactive windowsgradient0xffffffff
col.active_borderborder color for the active windowgradient0xff444444
col.nogroup_borderinactive border color for window that cannot be added to a group (see denywindowfromgroup dispatcher)gradient0xffffaaff
col.nogroup_border_activeactive border color for window that cannot be added to a groupgradient0xffff00ff
col.group_borderinactive (out of focus) group border colorgradient0x66777700
col.group_border_activeactive group border colorgradient0x66ffff00
col.group_border_lockedinactive locked group border colorgradient0x66775500
col.group_border_locked_activeactive locked group border colorgradient0x66ff5500
cursor_inactive_timeoutin seconds, after how many seconds of cursor’s inactivity to hide it. Set to 0 for never.int0
layoutwhich layout to use. (Available: dwindle, master)strdwindle
no_cursor_warpsif true, will not warp the cursor in many cases (focusing, keybinds, etc)boolfalse
no_focus_fallbackif true, will not fall back to the next available window when moving focus in a direction where no window was foundboolfalse
apply_sens_to_rawif on, will also apply the sensitivity to raw mouse output (e.g. sensitivity in games) NOTICE: really not recommended.boolfalse
resize_on_borderenables resizing windows by clicking and dragging on borders and gapsboolfalse
extend_border_grab_areaextends the area around the border where you can click and drag on, only used when general:resize_on_border is on.int15
hover_icon_on_bordershow a cursor icon when hovering over borders, only used when general:resize_on_border is on.booltrue
allow_tearingmaster switch for allowing tearing to occur. See the Tearing page.boolfalse
Decoration
namedescriptiontypedefault
roundingrounded corners’ radius (in layout px)int0
active_opacityopacity of active windows. (0.0 - 1.0)float1.0
inactive_opacityopacity of inactive windows. (0.0 - 1.0)float1.0
fullscreen_opacityopacity of fullscreen windows. (0.0 - 1.0)float1.0
drop_shadowenable drop shadows on windowsbooltrue
shadow_rangeShadow range (“size”) in layout pxint4
shadow_render_power(1 - 4), in what power to render the falloff (more power, the faster the falloff)int3
shadow_ignore_windowif true, the shadow will not be rendered behind the window itself, only around it.booltrue
col.shadowshadow’s color. Alpha dictates shadow’s opacity.color0xee1a1a1a
col.shadow_inactiveinactive shadow color. (if not set, will fall back to col.shadow)colorunset
shadow_offsetshadow’s rendering offset.vec2[0, 0]
shadow_scaleshadow’s scale. 0.0 - 1.0float1.0
dim_inactiveenables dimming of inactive windowsboolfalse
dim_strengthhow much inactive windows should be dimmed, 0.0 - 1.0float0.5
dim_specialhow much to dim the rest of the screen by when a special workspace is open. 0.0 - 1.0float0.2
dim_aroundhow much the dimaround window rule should dim by. 0.0 - 1.0float0.4
screen_shadera path to a custom shader to be applied at the end of rendering. See examples/screenShader.frag for an example.strEmpty
Blur

Subcategory decoration:blur:

namedescriptiontypedefault
enabledenable kawase window background blurbooltrue
sizeblur size (distance)int8
passesthe amount of passes to performint1
ignore_opacitymake the blur layer ignore the opacity of the windowboolfalse
new_optimizationswhether to enable further optimizations to the blur. Recommended to leave on, as it will massively improve performance.booltrue
xrayif enabled, floating windows will ignore tiled windows in their blur. Only available if blur_new_optimizations is true. Will reduce overhead on floating blur significantly.boolfalse
noisehow much noise to apply. 0.0 - 1.0float0.0117
contrastcontrast modulation for blur. 0.0 - 2.0float0.8916
brightnessbrightness modulation for blur. 0.0 - 2.0float0.8172
specialwhether to blur behind the special workspace (note: expensive)boolfalse
Animations
namedescriptiontypedefault
enabledenable animationsbooltrue
Input
namedescriptiontypedefault
kb_modelAppropriate XKB keymap parameter. See the note below.strEmpty
kb_layoutAppropriate XKB keymap parameterstrus
kb_variantAppropriate XKB keymap parameterstrEmpty
kb_optionsAppropriate XKB keymap parameterstrEmpty
kb_rulesAppropriate XKB keymap parameterstrEmpty
kb_fileIf you prefer, you can use a path to your custom .xkb file.strEmpty
numlock_by_defaultEngage numlock by default.boolfalse
repeat_rateThe repeat rate for held-down keys, in repeats per second.int25
repeat_delayDelay before a held-down key is repeated, in milliseconds.int600
sensitivitySets the mouse input sensitivity. Value will be clamped to the range -1.0 to 1.0. libinput#pointer-accelerationfloat0.0
accel_profileSets the cursor acceleration profile. Can be one of adaptive, flat. Can also be custom, see below. Leave empty to use libinput’s default mode for your input device. libinput#pointer-accelerationstrEmpty
force_no_accelForce no cursor acceleration. This bypasses most of your pointer settings to get as raw of a signal as possible. Enabling this is not recommended due to potential cursor desynchronization.boolfalse
left_handedSwitches RMB and LMBboolfalse
scroll_methodSets the scroll method. Can be one of 2fg (2 fingers), edge, on_button_down, no_scroll. libinput#scrollingstrEmpty
scroll_buttonSets the scroll button. Has to be an int, cannot be a string. Check wev if you have any doubts regarding the ID. 0 means default.int0
scroll_button_lockIf the scroll button lock is enabled, the button does not need to be held down. Pressing and releasing the button once enables the button lock, the button is now considered logically held down. Pressing and releasing the button a second time logically releases the button. While the button is logically held down, motion events are converted to scroll events.bool0
natural_scrollInverts scrolling direction. When enabled, scrolling moves content directly instead of manipulating a scrollbar.boolfalse
follow_mouse(0/1/2/3) Specify if and how cursor movement should affect window focus. See the note below.int1
mouse_refocusIf disabled and follow_mouse=1 then mouse focus will not switch to the hovered window unless the mouse crosses a window boundary.booltrue
float_switch_override_focusIf enabled (1 or 2), focus will change to the window under the cursor when changing from tiled-to-floating and vice versa. If 2, focus will also follow mouse on float-to-float switches.int1

XKB Settings: You can find a list of models, layouts, variants and options in /usr/share/X11/xkb/rules/base.lst. Alternatively, you can use the localectl command to discover what is available on your system.

Touchpad

Subcategory input:touchpad:

namedescriptiontypedefault
disable_while_typingDisable the touchpad while typing.booltrue
natural_scrollInverts scrolling direction. When enabled, scrolling moves content directly instead of manipulating a scrollbar.boolfalse
scroll_factorMultiplier applied to the amount of scroll movement.float1.0
middle_button_emulationSending LMB and RMB simultaneously will be interpreted as a middle click. This disables any touchpad area that would normally send a middle click based on location. libinput#middle-button-emulationboolfalse
tap_button_mapSets the tap button mapping for touchpad button emulation. Can be one of lrm (default) or lmr (Left, Middle, Right Buttons).strEmpty
clickfinger_behaviorButton presses with 1, 2, or 3 fingers will be mapped to LMB, RMB, and MMB respectively. This disables interpretation of clicks based on location on the touchpad. libinput#clickfinger-behaviorboolfalse
tap-to-clickTapping on the touchpad with 1, 2, or 3 fingers will send LMB, RMB, and MMB respectively.booltrue
drag_lockWhen enabled, lifting the finger off for a short time while dragging will not drop the dragged item. libinput#tap-and-dragboolfalse
tap-and-dragSets the tap and drag mode for the touchpadboolfalse
Gestures
namedescriptiontypedefault
workspace_swipeenable workspace swipe gestureboolfalse
workspace_swipe_fingershow many fingers for the gestureint3
workspace_swipe_distancein px, the distance of the gestureint300
workspace_swipe_invertinvert the directionbooltrue
workspace_swipe_min_speed_to_forceminimum speed in px per timepoint to force the change ignoring cancel_ratio. Setting to 0 will disable this mechanic.int30
workspace_swipe_cancel_ratio(0.0 - 1.0) how much the swipe has to proceed in order to commence it. (0.7 if > 0.7 * distance, switch, if less, revert)float0.5
workspace_swipe_create_newwhether a swipe right on the last workspace should create a new one.booltrue
workspace_swipe_direction_lockif enabled, switching direction will be locked when you swipe past the direction_lock_threshold.booltrue
workspace_swipe_direction_lock_thresholdin px, the distance to swipe before direction lock activates.int10
workspace_swipe_foreverif enabled, swiping will not clamp at the neighboring workspaces but continue to the further ones.boolfalse
workspace_swipe_numberedif enabled, swiping will swipe on consecutive numbered workspaces.boolfalse
workspace_swipe_use_rif enabled, swiping will use the r prefix instead of the m prefix for finding workspaces. (requires disabled workspace_swipe_numbered)boolfalse
Misc
namedescriptiontypedefault
disable_hyprland_logodisables the random hyprland logo / anime girl background. :(boolfalse
disable_splash_renderingdisables the hyprland splash rendering. (requires a monitor reload to take effect)boolfalse
force_hypr_chanmakes the background always have hypr-chan, the hyprland mascotboolfalse
force_default_wallpaperEnforce any of the 3 default wallpapers. Setting this to 0 disables the anime background. -1 means “random”int-1
vfrcontrols the VFR status of hyprland. Heavily recommended to leave on true to conserve resources.booltrue
vrrcontrols the VRR (Adaptive Sync) of your monitors. 0 - off, 1 - on, 2 - fullscreen onlyint0
mouse_move_enables_dpmsIf DPMS is set to off, wake up the monitors if the mouse moves.boolfalse
key_press_enables_dpmsIf DPMS is set to off, wake up the monitors if a key is pressed.boolfalse
always_follow_on_dndWill make mouse focus follow the mouse when drag and dropping. Recommended to leave it enabled, especially for people using focus follows mouse at 0.booltrue
layers_hog_keyboard_focusIf true, will make keyboard-interactive layers keep their focus on mouse move (e.g. wofi, bemenu)booltrue
animate_manual_resizesIf true, will animate manual window resizes/movesboolfalse
animate_mouse_windowdraggingIf true, will animate windows being dragged by mouse, note that this can cause weird behavior on some curvesboolfalse
disable_autoreloadIf true, the config will not reload automatically on save, and instead needs to be reloaded with hyprctl reload. Might save on battery.boolfalse
enable_swallowEnable window swallowingboolfalse
swallow_regexThe class regex to be used for windows that should be swallowed (usually, a terminal). To know more about the list of regex which can be used use this cheatsheet.strEmpty
swallow_exception_regexThe title regex to be used for windows that should not be swallowed by the windows specified in swallow_regex (e.g. wev). The regex is matched against the parent (e.g. Kitty) window’s title on the assumption that it changes to whatever process it’s running.strEmpty
focus_on_activateWhether Hyprland should focus an app that requests to be focused (an activate request)boolfalse
no_direct_scanoutDisables direct scanout. Direct scanout attempts to reduce lag when there is only one fullscreen application on a screen (e.g. game). It is also recommended to set this to true if the fullscreen application shows graphical glitches.booltrue
hide_cursor_on_touchHides the cursor when the last input was a touch input until a mouse input is done.booltrue
mouse_move_focuses_monitorWhether mouse moving into a different monitor should focus itbooltrue
suppress_portal_warningsdisables warnings about incompatible portal implementations.boolfalse
render_ahead_of_time[Warning: buggy] starts rendering before your monitor displays a frame in order to lower latencyboolfalse
render_ahead_safezonehow many ms of safezone to add to rendering ahead of time. Recommended 1-2.int1
cursor_zoom_factorthe factor to zoom by around the cursor. AKA. Magnifying glass. Minimum 1.0 (meaning no zoom)float1.0
cursor_zoom_rigidwhether the zoom should follow the cursor rigidly (cursor is always centered if it can be) or looselyboolfalse
allow_session_lock_restoreif true, will allow you to restart a lockscreen app in case it crashes (red screen of death)boolfalse
group_insert_after_currentwhether new windows in a group spawn after current or at group tailbooltrue
group_focus_removed_windowwhether Hyprland should focus on the window that has just been moved out of the groupbooltrue
groupbar_scrollingwhether scrolling in the groupbar changes group active windowbooltrue
render_titles_in_groupbarwhether to render titles in the group bar decorationbooltrue
groupbar_titles_font_sizefont size for the aboveint8
groupbar_gradientswhether to draw gradients under the titles of the abovebooltrue
groupbar_text_colorcontrols the group bar text colorcolor0xffffffff
background_colorchange the background color. (requires enabled disable_hyprland_logo)color0x111111
close_special_on_emptyclose the special workspace if the last window is removedbooltrue
new_window_takes_over_fullscreenif there is a fullscreen window, whether a new tiled window opened should replace the fullscreen one or stay behind. 0 - behind, 1 - takes over, 2 - unfullscreen the current fullscreen windowint0

Keywords

Executing

you can execute a shell script on startup of the compositor or on each time it’s reloaded.

exec-once=command will execute only on launch

exec=command will execute on each reload

Defining variables

You can define your own custom variables like this:

$VAR = value

for example:

$MyFavoriteGame = Among Us

then, to use them, simply use them. For example:

col.active_border=$MyColor

Sourcing (multi-file)

Use the source keyword to source another file.

For example, in your hyprland.conf you can:

source=~/.config/hypr/myColors.conf

And Hyprland will enter that file and parse it like a Hyprland config.

Please note it’s LINEAR. Meaning lines above the source= will be parsed first, then lines inside ~/.config/hypr/myColors.conf, then lines below.

Setting the environment

The env keyword works just like exec-once, meaning it will only fire once on Hyprland’s launch.

You can use the env keyword to set environment variables at Hyprland’s start, e.g.:

env = XCURSOR_SIZE,24
env = QT_QPA_PLATFORM,wayland

Monitor

General

The general config of a monitor looks like this

monitor=name,resolution,position,scale

A common example:

monitor=DP-1,1920x1080@144,0x0,1

will tell Hyprland to make the monitor on DP-1 a 1920x1080 display, at 144Hz, 0x0 off from the top left corner, with a scale of 1 (unscaled).

To list available monitors:

hyprctl monitors

Monitors are positioned on a virtual “layout”. The position is the position of said display in the layout. (calculated from the top-left corner)

For example:

monitor=DP-1, 1920x1080, 0x0, 1
monitor=DP-2, 1920x1080, 1920x0, 1

will tell hyprland to make DP-1 on the left of DP-2, while

monitor=DP-1, 1920x1080, 1920x0, 1
monitor=DP-2, 1920x1080, 0x0, 1

will tell hyprland to make DP-1 on the right.

The position is calculated with the scaled (and transformed) resolution, meaning if you want your 4K monitor with scale 2 to the left of your 1080p one, you’d use the position 1920x0 for the second screen. (3840 / 2) If the monitor is also rotated 90 degrees (vertical) you’d use 1080x0.

Leaving the name empty will define a fallback rule to use when no other rules match.

You can use preferred as a resolution to use the display’s preferred size, and auto as a position to let Hyprland decide on a position for you.

You can also use auto as a scale to let Hyprland decide on a scale for you. These depend on the PPI of the monitor.

Recommended rule for quickly plugging in random monitors:

monitor=,preferred,auto,1

Will make any monitor that was not specified with an explicit rule automatically placed on the right of the other(s) with its preferred resolution.

Disabling a monitor

To disable a monitor, use

monitor=name,disable

Mirrored displays

If you want to mirror a display, add a ,mirror,[NAME] at the end of the monitor rule, examples:

monitor=DP-3,1920x1080@60,0x0,1,mirror,DP-2
monitor=,preferred,auto,1,mirror,DP-1

Please remember that mirroring displays will not “re-render” everything for your second monitor, so if mirroring a 1080p screen onto a 4K one, the resolution will still be 1080p on the 4K display. This also means squishing and stretching will occur on non-matching resolutions.

Rotating

If you want to rotate a monitor, add a ,transform,X at the end of the monitor rule, where X corresponds to a transform number, e.g.:

monitor=eDP-1,2880x1800@90,0x0,1,transform,1

Transform list:

normal (no transforms) -> 0
90 degrees -> 1
180 degrees -> 2
270 degrees -> 3
flipped -> 4
flipped + 90 degrees -> 5
flipped + 180 degrees -> 6
flipped + 270 degrees -> 7

Binds

Basic

bind=MODS,key,dispatcher,params

for example,

bind=SUPER_SHIFT,Q,exec,firefox

will bind opening firefox to SUPER + SHIFT + Q

For binding keys without a modkey, leave it empty:

bind=,Print,exec,grim

Switches

Useful for binding e.g. the lid close/open event:

# trigger when the switch is toggled
bindl=,switch:[switch name],exec,swaylock
# trigger when the switch is turning on
bindl=,switch:on:[switch name],exec,hyprctl keyword monitor "eDP-1, 2560x1600, 0x0, 1"
# trigger when the switch is turning off
bindl=,switch:off:[switch name],exec,hyprctl keyword monitor "eDP-1, disable"

check out your switches in hyprctl devices.

Bind flags

bind supports flags in this format:

bind[flags]=...

e.g.:

bindrl=MOD,KEY,exec,amongus

Flags:

l -> locked, aka. works also when an input inhibitor (e.g. a lockscreen) is active.
r -> release, will trigger on release of a key.
e -> repeat, will repeat when held.
n -> non-consuming, key/mouse events will be passed to the active window in addition to triggering the dispatcher.
m -> mouse, see below
t -> transparent, cannot be shadowed by other binds.

Example Usage:

# Example volume button that allows press and hold, volume limited to 150%
binde=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+

# Example volume button that will activate even while an input inhibitor is active
bindl=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-

# Start wofi opens wofi on first press, closes it on second
bindr=SUPER, SUPER_L, exec, pkill wofi || wofi

# See Mouse Binds section for bindm usage

Global Keybinds

Yes, you heard this right, Hyprland does support global keybinds for ALL apps, including OBS, Discord, Firefox, etc.

See the pass dispatcher for keybinds.

Let’s take OBS as an example: the “Start/Stop Recording” keybind is set to SUPER + F10, and you want to make it work globally.

Simply add to your config and you’re done

bind = SUPER,F10,pass,^(com\.obsproject\.Studio)$

Submaps

If you want keybind submaps, also known as modes or groups, for example if you press ALT + R, you can enter a “resize” mode, resize with arrow keys, and leave with escape, do it like this:

# will switch to a submap called resize
bind=ALT,R,submap,resize

# will start a submap called "resize"
submap=resize

# sets repeatable binds for resizing the active window
binde=,right,resizeactive,10 0
binde=,left,resizeactive,-10 0
binde=,up,resizeactive,0 -10
binde=,down,resizeactive,0 10

# use reset to go back to the global submap
bind=,escape,submap,reset 

# will reset the submap, meaning end the current one and return to the global one
submap=reset

# keybinds further down will be global again...

IMPORTANT: do not forget a keybind to reset the keymap while inside it! (In this case, escape)

Dispatchers

Parameter explanation

Param typeDescription
windowa window. Any of the following: Class regex, title: and a title regex, pid: and the pid, address: and the address
workspacesee below.
directionl r u d left right up down
monitorOne of: direction, ID, name, current, relative (e.g. +1 or -1)
resizeparamsrelative pixel delta vec2 (e.g. 10 -10), optionally a percentage of the window size (e.g. 20 25%) or exact followed by an exact vec2 (e.g. exact 1280 720), optionally a percentage of the screen size (e.g. exact 50% 50%)
floatvaluea relative float delta (e.g -0.2 or +0.2) or exact followed by a the exact float value (e.g. exact 0.5)
workspaceoptsee below.
zheighttop or bottom

List of Dispatchers

DispatcherDescriptionParams
execexecutes a shell commandcommand (supports rules, see below)
execrexecutes a raw shell command (will not append any additional envvars like exec does, does not support rules)command
passpasses the key (with mods) to a specified window. Can be used as a workaround to global keybinds not working on Wayland.window
killactivecloses (not kills) the active windownone
closewindowcloses a specified windowwindow
workspacechanges the workspaceworkspace
movetoworkspacemoves the focused window to a workspaceworkspace OR workspace,window for a specific window
movetoworkspacesilentsame as above, but doesnt switch to the workspaceworkspace OR workspace,window for a specific window
togglefloatingtoggles the current window’s floating stateleft empty / active for current, or window for a specific window
fullscreentoggles the focused window’s fullscreen state0 - fullscreen (takes your entire screen), 1 - maximize (keeps gaps and bar(s))
fakefullscreentoggles the focused window’s internal fullscreen state without altering the geometrynone
dpmssets all monitors’ DPMS status. Do not use with a keybind directly.on, off, or toggle. For specific monitor add monitor name after a space
pinpins a window (i.e. show it on all workspaces) note: floating onlyleft empty / active for current, or window for a specific window
movefocusmoves the focus in a directiondirection
movewindowmoves the active window in a direction or to a monitordirection or mon: and a monitor
swapwindowswaps the active window with another window in the given directiondirection
centerwindowcenter the active window note: floating onlynone (for monitor center) or 1 (to respect monitor reserved area)
resizeactiveresizes the active windowresizeparams
moveactivemoves the active windowresizeparams
resizewindowpixelresizes a selected windowresizeparams,window, e.g. 100 100,^(kitty)$
movewindowpixelmoves a selected windowresizeparams,window
cyclenextfocuses the next window on a workspacenone (for next) or prev (for previous)
swapnextswaps the focused window with the next window on a workspacenone (for next) or prev (for previous)
focuswindowfocuses the first window matchingwindow
focusmonitorfocuses a monitormonitor
splitratiochanges the split ratiofloatvalue
toggleopaquetoggles the current window to always be opaque. Will override the opaque window rules.none
movecursortocornermoves the cursor to the corner of the active windowdirection, 0 - 3, bottom left - 0, bottom right - 1, top right - 2, top left - 3
movecursormoves the cursor to a specified positionx,y
workspaceopttoggles a workspace option for the active workspace.workspaceopt
renameworkspacerename a workspaceid name, e.g. 2 work
exitexits the compositor with no questions asked.none
forcerendererreloadforces the renderer to reload all resources and outputsnone
movecurrentworkspacetomonitorMoves the active workspace to a monitormonitor
moveworkspacetomonitorMoves a workspace to a monitorworkspace and a monitor separated by a space
swapactiveworkspacesSwaps the active workspaces between two monitorstwo monitors separated by a space
bringactivetotopDeprecated in favor of alterzorder. Brings the current window to the top of the stacknone
alterzorderModify the window stack order of the active or specified window. Note: this cannot be used to move a floating window behind a tiled one.zheight[,window]
togglespecialworkspacetoggles a special workspace on/offnone (for the first) or name for named (name has to be a special workspace’s name)
focusurgentorlastFocuses the urgent window or the last windownone
togglegrouptoggles the current active window into a groupnone
changegroupactiveswitches to the next window in a group.b - back, f - forward, or index start at 1
focuscurrentorlastSwitch focus from current to previously focused windownone
lockgroupsLocks the groups (all groups will not accept new windows)lock for locking, unlock for unlocking, toggle for toggle
lockactivegroupLock the focused group (the current group will not accept new windows or be moved to other groups)lock for locking, unlock for unlocking, toggle for toggle
moveintogroupMoves the active window into a group in a specified direction. No-op if there is no group in the specified direction.direction
moveoutofgroupMoves the active window out of a group. No-op if not in a groupnone
movewindoworgroupBehaves as moveintogroup if there is a group in the given direction. Behaves as moveoutofgroup if there is no group in the given direction relative to the active group. Otherwise behaves like movewindow.direction
movegroupwindowSwaps the active window with the next or previous in a groupb for back, anything else for forward
denywindowfromgroupProhibit the active window from becoming or being inserted into groupon, off or, toggle
setignoregrouplockTemporarily enable or disable binds:ignore_group_lockon, off, or toggle
globalExecutes a Global Shortcut using the GlobalShortcuts portal. See herename
submapChange the current mapping group. See Submapsreset or name

Window Rules

Syntax

windowrule=RULE,WINDOW
  • RULE is a rule (and a param if applicable)
  • WINDOW is a RegEx, either:
    • plain RegEx (for matching a window class);
    • title: followed by a regex (for matching a window’s title)

Rules

RuleDescriptionDynamic
floatfloats a window
tiletiles a window
fullscreenfullscreens a window
fakefullscreenfakefullscreens a window
maximizemaximizes a window
nofullscreenrequestprevents windows from requesting fullscreen mode, you can still manually toggle fullscreen.
nomaximizerequestprevents windows from requesting maximized mode, you can still manually toggle maximize.
move [x] [y]moves a floating window (x,y int or %, e.g. 20% or 100. You are also allowed to do 100%- for the right/bottom anchor, e.g. 100%-20). Additionally, you can also do cursor [x] [y] where x and y are either pixels or percent. Percent is calculated from the window’s size. Specify onscreen before other parameters to force the window into the screen (e.g. move onscreen cursor 50% 50%)
size [x] [y]resizes a floating window (x,y int or %, e.g. 20% or 100)
minsize [x] [y]sets the minimum size on creation (x,y int)
maxsize [x] [y]sets the maximum size on creation (x,y int)
center ([opt])if the window is floating, will center it on the monitor. Set opt as 1 to respect monitor reserved area
pseudopseudotiles a window
monitor [id]sets the monitor on which a window should open. id can be either id or name (either e.g. 1 or e.g. DP-1)
workspace [w]sets the workspace on which a window should open (for workspace syntax, see dispatchersworkspaces). You can also make [w] to unset, will unset all previous workspace rules applied to this window. You can also add silent after the workspace to make the window open silently.
opacity [a]additional opacity multiplier. Options for a: float sets an opacity OR float float sets activeopacity and inactiveopacity respectively. You can also add override after an opacity to make it override instead of a multiplier. (e.g. 1.0 override 0.5 override)
opaqueforces the window to be opaque (can be toggled with the toggleopaque dispatcher)
forcergbxmakes hyprland ignore the alpha channel of all the window’s surfaces, effectively making it actually, fully 100% opaque
animation [style] ([opt])forces an animation onto a window, with a selected opt. Opt is optional.
rounding [x]forces the application to have X pixels of rounding, ignoring the set default (in decoration:rounding). Has to be an int.
noblurdisables blur for the window
nofocusdisables focus to the window
noinitialfocusdisables the initial focus to the window
noborderdisables borders for the window
bordersize [size]sets the border size
nodimdisables window dimming for the window
noshadowdisables shadows for the window
forceinputforces an XWayland window to receive input, even if it requests not to do so. (Might fix issues like e.g. Game Launchers not receiving focus for some reason)
windowdanceforces an XWayland window to never refocus, used for games/applications like Rhythm Doctor
pinpins the window (i.e. show it on all workspaces) note: floating only
noanimdisables the animations for the window
keepaspectratioforces aspect ratio when resizing window with the mouse
bordercolor [c]force the bordercolor of the window. Options for c: color sets the active border color OR color color sets the active and inactive border color of the window. See variablescolors for color definition.
idleinhibit [mode]sets an idle inhibit rule for the window. If active, apps like swayidle will not fire. Modes: none, always, focus, fullscreen
unsetremoves all previously set rules for the given parameters. Please note it has to match EXACTLY.
nomaxsizeremoves max size limitations. Especially useful with windows that report invalid max sizes (e.g. winecfg)
dimarounddims everything around the window . Please note this rule is meant for floating windows and using it on tiled ones may result in strange behavior.
stayfocusedforces focus on the window as long as it’s visible
xray [on]sets blur xray mode for the window (0 for off, 1 for on, unset for default)
group [options]set window group properties. See the note below.
immediateforces the window to allow to be torn. See the Tearing page.

Window Rules V2

In V2, you are allowed to match multiple variables.

the RULE field is unchanged, but in the WINDOW field, you can put regexes for multiple values like so:

windowrulev2 = float,class:(kitty),title:(kitty)

In the case of dynamic window titles such as browser windows keep in mind how powerful regex is. for example a window rule of: windowrule=opacity 0.3 override 0.3 override,title:(.*)(- Youtube)$ will match any window that contains a string of “- Youtube” after any other text. This could be multiple browser windows or other applications that contain the string for any reason. for the windowrulev2 = float,class:(kitty),title:(kitty) example, the class:(kitty) WINDOW field is what keeps the window rule specific to kitty terminals.

For now, the supported fields are:

class - class regex 
title - title regex
xwayland - 0/1
floating - 0/1
fullscreen - 0/1
pinned - 0/1
workspace - id or name: and name

Tearing

To enable tearing:

  • Set general:allow_tearing to true. This is a “master toggle”
  • Add env = WLR_DRM_NO_ATOMIC,1 to your Hyprland config. This disables the usage of a newer kernel DRM API that doesn’t support tearing yet.
  • Add an immediate windowrule to your game of choice. This makes sure that Hyprland will tear it.

Please note that tearing will only be in effect when the game is in fullscreen and the only thing visible on the screen.

Example snippet:

general {
    allow_tearing = true
}

env = WLR_DRM_NO_ATOMIC,1

windowrulev2 = immediate, class:^(cs2)$

Using hyprctl

hyprctl is a utility for controlling some parts of the compositor from a CLI or a script. If you install with make install, or any package, it should automatically be installed.

To check if hyprctl is installed, simply execute it by issuing hyprctl in the terminal.

If it’s not, go to the repo root and /hyprctl. Issue a make all and then sudo cp ./hyprctl /usr/bin.

Dispatch

issue a dispatch to call a keybind dispatcher with an arg.

An arg has to be present, for dispatchers without parameters it can be anything.

To pass an argument starting with - or --, such as command line options to exec programs, pass -- as an option. This will disable any subsequent parsing of options by hyprctl.

Examples:

hyprctl dispatch exec kitty
hyprctl dispatch -- exec kitty --single-instance
hyprctl dispatch pseudo x

Returns: ok on success, an error message on fail.

Keyword

issue a keyword to call a config keyword dynamically.

Examples:

hyprctl keyword bind SUPER,O,pseudo
hyprctl keyword general:border_size 10
hyprctl keyword monitor DP-3,1920x1080@144,0x0,1

Returns: ok on success, an error message on fail.

Reload

issue a reload to force reload the config.

output

Allows you to add and remove fake outputs to your preferred backend.

params: create or remove and backend or name respectively.

For create: pass a backend name: wayland, x11, headless or auto. On a real hyprland session, if you’re looking for a VNC / RDP type thing, it’s 99% going to be headless.

For remove: pass the output’s name, as found in hyprctl monitors. Please be aware you are not allowed to remove real displays with this command.

e.g.:

# will create a 1920x1080 headless display, for example to use with RDP.
hyprctl output create headless
 
# will remove the above display, provided its name was HEADLESS-1
hyprctl output remove HEADLESS-1

Info

These commands let you gather information about your Hyprland session. Hyprctl can output JSON with the -j flag.

CommandDescription
versionprints the hyprland version, meaning flags, commit and branch of build
monitorslists active outputs with their properties, monitors all lists active and inactive outputs
workspaceslists all workspaces with their properties
activeworkspacegets the active workspace and its properties
workspacerulesgets the list of defined workspace rules
clientslists all windows with their properties
deviceslists all connected keyboards and mice
bindslists all registered binds
activewindowgets the active window name and its properties
layerslists all the layers
splashprints the current random splash
getoption [option]gets the config option status (values)
cursorposgets the current cursor pos in global layout coordinates
animationsgets the current config info about animations and beziers
instanceslists all running instances of hyprland with their info
layoutslists all layouts available

For the getoption command, the option name should be written as section:option, e.g.:

hyprctl getoption general:border_size
 
# For nested sections:
hyprctl getoption input:touchpad:disable_while_typing

Batch

You can also use --batch to specify a batch of commands to execute

e.g.

hyprctl --batch "keyword general:border_size 2 ; keyword general:gaps_out 20"

; separates the commands

Multi GPU

If your host machine uses multiple GPUs, you may want to primarily use one GPU for rendering all the elements for Hyprland including windows, animations, and another for hardware acceleration for certain applications, etc.

This setup is very common in the likes of gaming laptops, GPU-passthrough (without VFIO) capable hosts, and if you have multiple GPUs in general.

Detecting GPUs

Upon running lspci | grep -E 'VGA|3D', One can list all the video devices available.

01:00.0 VGA compatible controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1)
06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] (rev c6)

Here it is clear that 2 GPUs are available, the dedicated NVIDIA GTX 1650 Mobile / Max-Q and the integrated AMD Cezanne Radeon Vega Series GPU.

Now, run ls -l /dev/dri/by-path

 total 0
lrwxrwxrwx 1 root root  8 Jul 14 15:45 pci-0000:01:00.0-card -> ../card0
lrwxrwxrwx 1 root root 13 Jul 14 15:45 pci-0000:01:00.0-render -> ../renderD128
lrwxrwxrwx 1 root root  8 Jul 14 15:45 pci-0000:06:00.0-card -> ../card1
lrwxrwxrwx 1 root root 13 Jul 14 15:45 pci-0000:06:00.0-render -> ../renderD129

So from the above outputs, we can match the bus IDs and determine that NVIDIA is card0 and AMD is card1.

Telling Hyprland which GPU to use

After determining which “card” belongs to which GPU, we now have to tell Hyprland the GPU we want to use primarily.

It is generally a good idea for laptops to use the integrated GPU as the primary renderer as this preserves battery life and is practically indistinguishable from using the dedicated GPU on modern systems in most cases. Hyprland can be run on integrated GPUs just fine. The same principle applies for desktop setups with a lower and higher power rating GPUs respectively.

We can do so by using the WLR_DRM_DEVICES variable.

Add the following template to hyprland.conf

env = WLR_DRM_DEVICES,/dev/dri/cardN

For our case, we want to use card1 primarily and use it to render stuff.

env = WLR_DRM_DEVICES,/dev/dri/card1:/dev/dri/card0

Here, we tell Hyprland to set priorities. If card1 isn’t available for whatever reason, use card0. So if the AMD GPU isn’t available, use NVIDIA. The colon is for setting priorities, essentially.

You should now be able to use an integrated GPU for for lighter GPU loads, including Hyprland.

Useful Utilities

Must Haves

This page documents software that is critical / very important to have running for a smooth Wayland / Hyprland experience.

DEs like KDE / Gnome will do this automatically, Hyprland will not (because you might want to use something else)

Notification Daemon

Starting method: most likely manual (exec-once)

Many apps (e.g. Discord) may freeze without one running.

Use e.g. Dunst, mako, etc.

Pipewire

Starting method: automatic

Pipewire is not necessarily required, but screensharing will not work without it.

Install pipewire and wireplumber (not pipewire-media-session)

XDG Desktop Portal

Starting method: Automatic on Systemd, manual otherwise

XDG Desktop Portal handles a lot of stuff for your desktop, like file pickers, screensharing, etc.

See The Hyprland Desktop Portal Page

Authentication Agent

Starting method: manual (exec-once)

Authentication agents are the things that pop up a window asking you for a password whenever an app wants to elevate its privileges.

Our recommendation is the KDE one. For arch, it’s polkit-kde-agent.

You can autostart it with exec-once=/usr/lib/polkit-kde-authentication-agent-1. On some distributions you might have to use a different path /usr/libexec/polkit-kde-authentication-agent-1.

On other distributions that use a more recent version, such as Gentoo, it may be necessary to use exec-once=/usr/lib64/libexec/polkit-kde-authentication-agent-1 instead.

Qt Wayland Support

Starting method: none (just a library)

Install qt5-wayland and qt6-wayland.

Status Bars

Wallpapers

Hyprland Desktop Portal

An XDG Desktop Portal (later called XDP) is a program that lets other applications communicate swiftly with the compositor through D-Bus.

It’s used for stuff like e.g. opening file pickers, screen sharing.

On Wayland, it also requires an implementation. For Hyprland, you’d usually use xdg-desktop-portal-wlr (later called XDPW)

Unfortunately, due to various reasons the -wlr portal is inferior to the KDE or Gnome ones.

In order to bridge the gap, Hyprland has its own fork of XDPW that has more features, called xdg-desktop-portal-hyprland. (later called XDPH)

XDPH doesn’t implement a file picker. For that, I recommend installing xdg-desktop-portal-gtk alongside XDPH.

Install:

pacman -S xdg-desktop-portal-hyprland

App Launchers

Automatically Mounting Usingudiskie

Starting method: manual (’exec-once’)

USB Mass storage devices, like thumb drives, mobile phones, digital cameras, etc. do not mount automatically to the file system.

We generally have to manually mount it, often using root and umount to do so.

Many popular DEs automatically handle this by using udisks2 wrappers.

udiskie is a udisks2 front-end that allows to manage removable media such as CDs or flash drives from userspace.

Install udiskie via your repositories, or build manually

Head over to your ~/.config/hypr/hyprland.conf and add the following lines:

exec-once = udiskie &

What this does is launches udiskie and & argument launches it in the background.