Use ini highlighting

This commit is contained in:
Mihai Fufezan 2022-09-24 17:03:37 +03:00
parent 00c8ab988a
commit c2143ecbac
No known key found for this signature in database
GPG Key ID: 5899325F2F120900
11 changed files with 64 additions and 64 deletions

View File

@ -6,7 +6,7 @@ Please remember, that for ALL arguments separated by a comma, if you want to
leave one of them empty, you cannot reduce the number of commas, *unless told
otherwise in a specific section*:
```plain
```ini
three_param_keyword=A,B,C # OK
three_param_keyword=A,C # NOT OK
@ -82,25 +82,25 @@ script (`exec-once=~/myscript.sh` and do `myapp &` in the script)
You can define your own custom variables like this:
```
```ini
$VAR = value
```
for example:
```
```ini
$MyFavoriteGame = Among Us
```
then, to use them, simply use them. For example:
```
```ini
col.active_border=$MyColor
```
You ARE allowed to do this:
```
```ini
col.active_border=ff$MyRedValue1111
```
@ -110,7 +110,7 @@ Use the `source` keyword to source another file.
For example, in your `hyprland.conf` you can:
```
```ini
source=~/.config/hypr/myColors.conf
```
@ -134,7 +134,7 @@ overwritten.
In order to apply per-device config options, make a new category like this:
```
```ini
device:name {
}
@ -149,7 +149,7 @@ force_no_accel, follow_mouse, float_switch_override_focus
For example:
```
```ini
device:ROYUAN Akko Multi-modes Keyboard-B {
repeat_rate=50
repeat_delay=500
@ -161,7 +161,7 @@ device:ROYUAN Akko Multi-modes Keyboard-B {
{{< hint type=tip >}}
With hyprctl, the category's spaces get turned into `-`, and everything is lowercase. So, for `hyprctl` calls, do for example:
```
```sh
hyprctl keyword device:royuan-akko-multi-modes-keyboard-b:kb_layout us
```
{{< /hint >}}
@ -182,7 +182,7 @@ notification overlays, bars, etc.
If you really want to blur them, use `blurls=`
```
```ini
blurls=NAMESPACE
```
@ -191,6 +191,6 @@ where `NAMESPACE` is the namespace of the layerSurface. (You can get it from
to remove a namespace from being blurred (useful in dynamic situations) use:
```
```ini
blurls=remove,NAMESPACE
```

View File

@ -5,7 +5,7 @@
Animations are declared with the `animation` keyword.
```
```ini
animation=NAME,ONOFF,SPEED,CURVE,STYLE
or
animation=NAME,ONOFF,SPEED,CURVE
@ -13,7 +13,7 @@ animation=NAME,ONOFF,SPEED,CURVE
for example:
```
```ini
animation=workspaces,1,8,default
animation=windows,1,10,myepiccurve,slide
```
@ -53,7 +53,7 @@ global
For animation style `popin` in `windows`, you can specify a minimum percentage
to start from. For example:
```
```ini
animation=windows,1,8,default,popin 80%
```
@ -63,7 +63,7 @@ will make the animation 80% -> 100% of the size.
Defining your own Bezier curve can be done with the `bezier` keyword:
```
```ini
bezier=NAME,X0,Y0,X1,Y1
```
@ -73,6 +73,6 @@ good website to design your bezier can be found
Example curve:
```
```ini
bezier=overshot,0.05,0.9,0.1,1.1
```

View File

@ -22,7 +22,7 @@ the layout pages and not here. (See the Sidebar)
{{< hint type=info >}}
Mod list:
```plain
```ini
SHIFT CAPS CTRL/CONTROL ALT MOD2 MOD3 SUPER/WIN/LOGO/MOD4 MOD5
```

View File

@ -4,13 +4,13 @@
## Basic
```
```ini
bind=MODS,key,dispatcher,params
```
for example,
```
```ini
bind=SUPER_SHIFT,Q,exec,firefox
```
@ -18,7 +18,7 @@ will bind opening firefox to <key>SUPER</key> + <key>SHIFT</key> + <key>Q</key>
{{< hint type=tip >}}
For binding keys without a modkey, leave it empty:
```
```ini
bind=,Print,exec,grim
```
{{< /hint >}}
@ -38,7 +38,7 @@ use `xev` or `wev` to find that information.
If you want to bind by a keycode, you can just input it in the KEY position,
e.g.:
```
```ini
bind=SUPER,28,exec,amongus
```
@ -49,7 +49,7 @@ can also use `xev` or `wev` to find keycodes.
You can also unbind with `unbind`, e.g.:
```
```ini
unbind=SUPER,O
```
@ -58,7 +58,7 @@ May be useful for dynamic keybindings with `hyprctl`.
You can also bind mouse buttons, by prefacing the mouse keycode with `mouse:`,
for example:
```
```ini
bind=SUPER,mouse:272,exec,amongus
```
@ -67,12 +67,12 @@ will bind it to <key>SUPER</key> + <key>LMB</key>.
For binding only modkeys, you need to use the TARGET modmask (with the
activating mod) and the `r` flag, e.g.:
```
```ini
bindr=SUPERALT,Alt_L,exec,amongus
```
You can also bind the mouse wheel with `mouse_up` and `mouse_down`:
```
```ini
bind=SUPER,mouse_down,workspace,e-1
```
(control the reset time with `binds:scroll_event_delay`)
@ -81,19 +81,19 @@ bind=SUPER,mouse_down,workspace,e-1
bind supports flags in this format:
```
```ini
bind[flags]=...
```
e.g.:
```
```ini
bindrl=MOD,KEY,exec,amongus
```
flags:
```
```ini
l -> locked, aka. works also when an input inhibitor is active
r -> release, will trigger on release of a key
e -> repeat, will repeat when held.
@ -113,7 +113,7 @@ with your mouse.
*Available mouse binds*:
| name | description |
| Name | Description |
| -----|------------ |
| movewindow | moves the active window |
| resizewindow | resizes the active window |
@ -135,7 +135,7 @@ whatever keys / mods you please. When held, the mouse function will be activated
You can bind a mod alone like this:
```
```ini
bindr=ALT,Alt_L,exec,amongus
```
@ -151,7 +151,7 @@ I've set the "Start/Stop Recording" keybind in OBS to <key>SUPER</key> +
<key>F10</key>, and I want it to be global.
Simple, add
```plain
```ini
bind = SUPER,F10,pass,^(com\.obsproject\.Studio)$
```
to your config and you're done.
@ -159,7 +159,7 @@ to your config and you're done.
`pass` will pass the PRESS and RELEASE events by itself, no need for a `bindr`.
This also means that push-to-talk will work flawlessly with one pass, e.g.:
```
```ini
bind=,mouse:276,pass,^(TeamSpeak 3)$
```
@ -182,7 +182,7 @@ If you want keybind submaps, for example if you press <key>ALT</key> +
<key>R</key>, you can enter a "resize" mode, resize with arrow keys, and leave
with escape, do it like this:
```
```ini
bind=ALT,R,submap,resize # will switch to a submap called resize
submap=resize # will start a submap called "resize"

View File

@ -21,7 +21,7 @@ toggleable / numerical options.
every config line is a command followed by a value.
```plain
```ini
COMMAND=VALUE
```
@ -32,7 +32,7 @@ You are **allowed to** input trailing spaces at the beginning and end.
e.g.:
```plain
```ini
COMMAND = VALUE
```

View File

@ -38,7 +38,7 @@ You can, however, resize the master window.
{{< hint type=info >}}
example usage:
```
```ini
bind=MOD,KEY,layoutmsg,cyclenext
```
{{< /hint >}}

View File

@ -5,13 +5,13 @@
## General
The general config of a monitor looks like this
```plain
```ini
monitor=name,resolution,offset,scale
```
A common example:
```plain
```ini
monitor=DP-1,1920x1080@144,0x0,1
```
@ -37,7 +37,7 @@ You can use `preferred` as a resolution to use the display's preferred size, and
Recommended rule for quickly plugging in random monitors:
```plain
```ini
monitor=,preferred,auto,1
```
@ -49,13 +49,13 @@ resolution or refreshrate mix.
for a focus on refreshrate use this:
```plain
```ini
monitor=,highrr,auto,1
```
for a focus on resolution this:
```plain
```ini
monitor=,highres,auto,1
```
@ -63,7 +63,7 @@ monitor=,highres,auto,1
To disable a monitor, use
```plain
```ini
monitor=name,disable
```
@ -71,7 +71,7 @@ monitor=name,disable
If your workflow requires custom reserved area, you can add it with
```plain
```ini
monitor=name,addreserved,TOP,BOTTOM,LEFT,RIGHT
```
@ -83,7 +83,8 @@ only use one of these rules per monitor in the config.
If you want to mirror a display, add a `,mirror,[NAME]` at the end of the monitor
rule, examples:
```
```ini
monitor=DP-3,1920x1080@60,0x0,1,mirror,DP-2
monitor=,preferred,auto,1,mirror,DP-1
```
@ -102,13 +103,13 @@ specifically for the targeted monitor, and ***MUST*** be after it.
{{< /hint >}}
```plain
```ini
workspace=name,number
```
for example:
```plain
```ini
workspace=DP-1,1
```
@ -116,15 +117,14 @@ will tell Hyprland to make the default workspace on DP-1 a number 1.
If you want to rotate a monitor, use
```plain
```ini
monitor=NAME,transform,TRANSFORM
```
where `NAME` is the name, and `TRANSFORM` is an integer, from 0 to 7,
corresponding to your transform of choice.
```
```ini
WL_OUTPUT_TRANSFORM_NORMAL = 0
WL_OUTPUT_TRANSFORM_90 = 1
WL_OUTPUT_TRANSFORM_180 = 2
@ -139,12 +139,12 @@ WL_OUTPUT_TRANSFORM_FLIPPED_270 = 7
A workspace can be bound to a monitor, meaning by default it will ALWAYS open
on the selected monitor. You can do this with
```
```ini
wsbind=WORKSPACE,MONITOR
```
for example:
```
```ini
wsbind=5,DP-1
wsbind=name:secret,DP-2
```

View File

@ -3,7 +3,7 @@
An example of a switchable keyboard layout between US and RU, where you switch
between them with SUPER+A (SUPER+Ф)
```
```ini
bind=SUPER,A,exec,hyprctl keyword input:kb_layout ru
bind=SUPER,Cyrillic_ef,exec,hyprctl keyword input:kb_layout us
```
@ -41,7 +41,7 @@ See [per-device input configs](https://wiki.hyprland.org/Configuring/Advanced-co
If you want to disable all keybinds with another keybind (make a kaybind toggle
of sorts) you can just use a submap with only a keybind to exit it.
```
```ini
bind=MOD,KEY,submap,clean
submap=clean
bind=MOD,KEY,submap,reset

View File

@ -5,7 +5,7 @@
You can set window rules for various actions. These are applied on window open!
```
```ini
windowrule=RULE,WINDOW
```
@ -20,7 +20,7 @@ you can get both by inspecting `hyprctl clients`
Examples:
```
```ini
windowrule=float,^(kitty)$
windowrule=move 0 0,title:^(Firefox)(.*)$
```
@ -33,12 +33,12 @@ rule system, window rules v2 were implemented.
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:
```
```ini
windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
```
For now, the supported fields are:
```
```ini
class - class regex
title - title regex
xwayland - 0/1
@ -70,7 +70,7 @@ Keep in mind you do *not* need to define all of them, but you need to define at
| pin | pins the window *note: floating only* |
*Examples*:
```
```ini
windowrule = move 100 100,^(kitty)$
windowrule = animation popin,^(kitty)$
windowrule = noblur,^(firefox)$

View File

@ -27,7 +27,7 @@ and [this commit](https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/185950
programs crash Hyprland.
3. Add this line to your configuration:
```toml
```ini
exec-once=xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2
```
and configure toolkits to scale using their specific mechanisms, such as

View File

@ -165,7 +165,7 @@ workspace subsequently).
Put the following in your `hyprland.conf`: (example)
```plain
```ini
windowrule=workspace 1 silent,kitty
windowrule=workspace 1 silent,Subl
windowrule=workspace 3 silent,Mailspring
@ -198,7 +198,7 @@ following:
In hyprland.conf:
```plain
```ini
exec-once=handle_monitor_connect.sh
```
@ -233,11 +233,11 @@ Until then, OTD.
*~/.config/hypr/hyprland.conf*
```plain
```ini
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
```
and
```plain
```ini
exec-once=systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
```
@ -251,7 +251,7 @@ should probably add it to your exported envvars.
As with any Display Server, Xorg included, you should probably make a script to
launch it, for example:
```plain
```ini
export AMONG_US=1
exec Hyprland
```