-
-
Notifications
You must be signed in to change notification settings - Fork 33
Configuring Hypr
The configuration file is stored in ~/.config/hypr/hypr.conf
The WM does not create a config itself (why? because it's constantly evolving), so you need to paste it youself.
A config is required. The WM will throw you an error at the top of the screen without one.
Get the example config from /example/hypr.conf
and paste it into ~/.config/hypr/hypr.conf
. You're done! Now you can edit it using the guidelines below.
gaps_in=int
- Gaps between windows
border_size=int
- Border size
gaps_out=int
- Gaps between monitor edges and windows
max_fps=int
- Max fps for updates of config, animations and the bar. (Recommended: 30-60)
layout=int
- Layout to use (0 - dwindling, default, 1 - master)
focus_when_hover=int
- (0/1) change focus when your cursor moves to a different window
intelligent_transients=int
- (0/1) intelligent transients make sure floated children windows are on top of their parents. (recommended 1, very useful and intuitive!)
col.active_border=hex
- Color of the active window border
col.inactive_border=hex
- Color of the inactive window border
status_command=string
- Deprecated
Warning: True animations (anim.cheap=0
) can be very laggy. Use if you have a very powerful PC and don't care about the choppiness.
Cheap animations do not look bad. They are just different, and way way smoother and easier for your PC to handle.
Start the animations section with Animations {
and end with }
in separate lines!
enabled=int
- Enable window animations (0/1)
speed=float
- Animation speed (default: 8)
cheap=int
- Enable cheap animations (0/1) - HIGHLY recommended to set this to 1.
borders=int
- Enable border animations (0/1)
workspaces=int
- Enable workspace wipe animations (0/1) - not really recommended, slow and will bug with compositors.
start the bar section with Bar {
and end with }
both in separate lines!
enabled=int
- Enable the bar (0/1)
height=int
- Pixel height of the bar
monitor=int
- Monitor to place the bar on (0 = default)
mod_pad_in=int
- The padding (in px) between the modules edge and text edge
no_tray_saving=int
- Don't save the tray between reloads (0/1) recommended 1 due to a bug with tray saving that could kill your bar.
col.bg=hex
- Color of the bar's background
col.high=hex
- Default high color for the bar (used in e.g. the workspaces widget)
font.main=str
- The main font to use (for the text)
font.secondary=str
- The font for the icons to use
Modules are created with the module=
keyword. Some examples to show you how they work:
module=right,X,0xffffffff,0xff00ff33,1000,$date +%a,\ %b\ %Y\ \ %I:%M\ %p$
module=left,,0xffffffff,0xff400080,1000,%RAM%
module=center,,0xffffffff,0xff400080,1000,%WINNAME%
Basically,
module=ALIGN,ICON,COLORTEXT,COLORBG,REFRESHMS,CONTENT
For icons, I recommend using the Nerd fonts (e.g. Iosevka Nerd) and unicode. (see here for a cheat sheet)
Content can have 2 types of tokens: %PERCENTTOKENS% and
PercentTokens are given by Hypr and an invalid one will throw an error.
CommandTokens are basically commands that Hypr will execute and return the output of.
RAM, CPU, WINNAME, WINCLASS
RAM - RAM usage (using/total)
CPU - CPU usage (percent)
WINNAME - Current window's title (e.g. github.com - where the world writes code - Firefox Nightly)
WINCLASS - Current window's class, aka. short title (e.g. Firefox)
content of workspaces
will draw a workspaces widget.
content of tray
will draw a systray widget.
There is one special module which is a separator. It's created like this:
module=pad,left,100
Where you put pad, then the alignment, and the pixel width of it.
Binds are done fairly simply. The syntax for creating a bind is as follows:
bind=MOD,KEY,DISPATCHER,COMMAND
The KEY is the XOrg key name. Check them with the xmodmap -pk
command or xev -event keyboard
.
A-Z, 0-9, RETURN, SPACE, LEFT, RIGHT, UP, DOWN, as the most common keys are guaranteed to work if input like this. Other keys are case-sensitive and must be the first result when issuing a command xmodmap -pk | grep <KEYNAME>
For moving windows and resizing them,
main_mod=str
And then hold the main_mod and left/right mouse button.
You can find example binds in the examples/hypr.conf config file.
SHIFT SUPER/MOD4 CTRL ALT/MOD1
You can mix them, eg.: SHIFTSUPER
or CTRLALTSUPER
.
exec - executes a shell command - COMMAND: command to execute
killactive - kills the focused window - No params
fullscreen - fullscreens the focused window - No params
movewindow - moves the focused window - COMMAND: l/r/u/d (left/right/up/down)
movefocus - moves the focus to the window neighboring - COMMAND: l/r/u/d (left/right/up/down)
movetoworkspace - moves the focused window to a workspace - COMMAND: number (workspace ID)
workspace - switches your view to a workspace - COMMAND: number (workspace ID)
togglefloating - toggles the focused window's floating state - No params
There is no dispatcher for reloading Hypr. Hypr is reloaded as soon as you save your config.
There is no dispatcher for quitting Hypr. You can use (for example) pkill Hypr
with exec
to kill the x server.
There are two keywords for executing stuff, exec
and exec-once
. They look like this:
exec=xterm
exec-once=firefox https://duckduckgo.com
exec
- executes a command every time the WM is reloaded. (on start and on config change)
exec-once
- executes a command ONLY on WM startup.
You can set specific window rules, for example:
windowrule=tiling,class:krunner
Basically,
windowrule=RULE,TEST
Where rules implemented are:
tiling - set window to tiling
floating - set window to floating
monitor <int> - set launch monitor id
size <int> <int> - set launch size (for floating only)
move <int< <int> - set launch coord (for floating only, on the launch monitor)
and tests are structured PROP:REGEX
, and the implemented props are
class role
which correspond to the role and class ewmh atoms.
Please note that all rules are evaluated as a window is mapped (opened) and will NOT update already existing windows.