From 0aae54eb6a06196975af0aab7362926ce3968a92 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Tue, 20 Feb 2024 22:16:07 +0200 Subject: [PATCH] wiki: prepare for hextra treewide: replace hint with callout treewide: remove ToC header remove , since it's autogenerated add missing _index.md treewide: add frontmatter treewide: fix headings add weights Configuring,Getting Started: expand in sidebar Add version selector fix links --- pages/Configuring/Animations.md | 36 +-- pages/Configuring/Binds.md | 133 ++++++----- pages/Configuring/Configuring-Hyprland.md | 50 ++-- pages/Configuring/Dispatchers.md | 108 +++++---- pages/Configuring/Dwindle-Layout.md | 26 +- pages/Configuring/Environment-variables.md | 105 +++++--- pages/Configuring/Example-configurations.md | 18 +- pages/Configuring/Expanding-functionality.md | 12 +- pages/Configuring/Keywords.md | 84 ++++--- pages/Configuring/Master-Layout.md | 36 +-- pages/Configuring/Monitors.md | 120 ++++++---- pages/Configuring/Multi-GPU.md | 25 +- pages/Configuring/Performance.md | 34 ++- pages/Configuring/Tearing.md | 66 ++++-- pages/Configuring/Uncommon-tips-&-tricks.md | 70 ++++-- pages/Configuring/Using-hyprctl.md | 61 +++-- pages/Configuring/Variables.md | 188 ++++++++------- pages/Configuring/Window-Rules.md | 133 ++++++----- pages/Configuring/Workspace-Rules.md | 41 ++-- pages/Configuring/XWayland.md | 16 +- pages/Configuring/_index.md | 6 + .../PR-Guidelines.md | 16 +- pages/Contributing and Debugging/_index.md | 21 +- pages/Crashes and Bugs/_index.md | 37 +-- pages/FAQ/_index.md | 224 +++++++++++------- pages/Getting Started/Installation.md | 184 +++++++++----- pages/Getting Started/Master-Tutorial.md | 97 +++++--- pages/Getting Started/_index.md | 6 + pages/Hypr Ecosystem/_index.md | 11 +- pages/Hypr Ecosystem/hypridle.md | 21 +- pages/Hypr Ecosystem/hyprlock.md | 32 ++- pages/Hypr Ecosystem/hyprpaper.md | 33 +-- pages/Hypr Ecosystem/hyprpicker.md | 13 +- .../xdg-desktop-portal-hyprland.md | 12 +- pages/IPC/_index.md | 30 ++- pages/Nix/Cachix.md | 18 +- pages/Nix/Hyprland on Home Manager.md | 20 +- pages/Nix/Hyprland on NixOS.md | 44 ++-- pages/Nix/Hyprland on other distros.md | 20 +- pages/Nix/Options & Overrides.md | 20 +- pages/Nix/_index.md | 16 +- pages/Nvidia/_index.md | 124 +++++++--- pages/Plugins/Development/Advanced.md | 72 ++++-- pages/Plugins/Development/Event-list.md | 13 +- pages/Plugins/Development/Getting-Started.md | 104 +++++--- .../Plugins/Development/Plugin-Guidelines.md | 7 +- pages/Plugins/Development/_index.md | 4 + pages/Plugins/Using-Plugins.md | 56 +++-- pages/Plugins/_index.md | 4 + pages/Useful Utilities/App-Clients.md | 24 +- pages/Useful Utilities/App-Launchers.md | 18 +- pages/Useful Utilities/Clipboard-Managers.md | 48 +++- pages/Useful Utilities/Color-Pickers.md | 15 +- pages/Useful Utilities/Hypr-Ecosystem.md | 2 +- pages/Useful Utilities/Must-have.md | 52 ++-- pages/Useful Utilities/Other.md | 42 +++- pages/Useful Utilities/Screen-Sharing.md | 23 +- pages/Useful Utilities/Status-Bars.md | 132 +++++++---- pages/Useful Utilities/Wallpapers.md | 9 +- pages/Useful Utilities/_index.md | 29 ++- ...rtal.md => xdg-desktop-portal-hyprland.md} | 83 +++++-- pages/{Home.md => _index.md} | 18 +- pages/version-selector.md | 39 +++ 63 files changed, 2027 insertions(+), 1134 deletions(-) create mode 100644 pages/Configuring/_index.md create mode 100644 pages/Getting Started/_index.md create mode 100644 pages/Plugins/Development/_index.md create mode 100644 pages/Plugins/_index.md rename pages/Useful Utilities/{Hyprland-desktop-portal.md => xdg-desktop-portal-hyprland.md} (77%) rename pages/{Home.md => _index.md} (64%) create mode 100644 pages/version-selector.md diff --git a/pages/Configuring/Animations.md b/pages/Configuring/Animations.md index 736f028..c5734a2 100644 --- a/pages/Configuring/Animations.md +++ b/pages/Configuring/Animations.md @@ -1,8 +1,9 @@ -# Table of contents +--- +weight: 9 +title: Animations +--- -{{< toc >}} - -# General +## General Animations are declared with the `animation` keyword. @@ -12,7 +13,8 @@ or animation=NAME,ONOFF,SPEED,CURVE ``` -`ONOFF` can be either 0 or 1, 0 to disable, 1 to enable. _note:_ if it's 0, you can omit further args. +`ONOFF` can be either 0 or 1, 0 to disable, 1 to enable. _note:_ if it's 0, you +can omit further args. `SPEED` is the amount of ds (1ds = 100ms) the animation will take @@ -23,7 +25,7 @@ animation=NAME,ONOFF,SPEED,CURVE The animations are a tree. If an animation is unset, it will inherit its parent's values. See [the animation tree](#animation-tree). -## Examples +### Examples ```ini animation=workspaces,1,8,default @@ -31,7 +33,7 @@ animation=windows,1,10,myepiccurve,slide animation=fade,0 ``` -## Animation tree +### Animation tree ```txt global @@ -53,7 +55,7 @@ global ↳ specialWorkspace - styles: same as workspaces ``` -# Curves +## Curves Defining your own Bezier curve can be done with the `bezier` keyword: @@ -63,28 +65,30 @@ bezier=NAME,X0,Y0,X1,Y1 where `NAME` is the name, and the rest are two points for the Cubic Bezier. A good website to design your bezier can be found -[here, on cssportal.com](https://www.cssportal.com/css-cubic-bezier-generator/), but -if you want to instead choose from a list of beziers, you can check out [easings.net](https://easings.net). +[here, on cssportal.com](https://www.cssportal.com/css-cubic-bezier-generator/), +but if you want to instead choose from a list of beziers, you can check out +[easings.net](https://easings.net). -## Example +### Example ```ini bezier=overshot,0.05,0.9,0.1,1.1 ``` -# Extras +### Extras For animation style `popin` in `windows`, you can specify a minimum percentage -to start from. For example, the following will make the animation 80% -> 100% of the size: +to start from. For example, the following will make the animation 80% -> 100% of +the size: ```ini animation=windows,1,8,default,popin 80% ``` -For animation styles `slidefade` and `slidefadevert` in `workspaces`, you can specify a movement -percentage. For example, the following will make windows move 20% of the screen width: +For animation styles `slidefade` and `slidefadevert` in `workspaces`, you can +specify a movement percentage. For example, the following will make windows move +20% of the screen width: ```ini animation=workspaces,1,8,default,slidefade 20% ``` - diff --git a/pages/Configuring/Binds.md b/pages/Configuring/Binds.md index d65b73c..65cfa16 100644 --- a/pages/Configuring/Binds.md +++ b/pages/Configuring/Binds.md @@ -1,8 +1,9 @@ -# Table of Contents +--- +weight: 5 +title: Binds +--- -{{< toc >}} - -# Basic +## Basic ```ini bind=MODS,key,dispatcher,params @@ -16,18 +17,20 @@ bind=SUPER_SHIFT,Q,exec,firefox will bind opening firefox to SUPER + SHIFT + Q -{{< hint type=tip >}} +{{< callout type=info >}} + For binding keys without a modkey, leave it empty: ```ini bind=,Print,exec,grim ``` -{{< /hint >}} +{{< /callout >}} -_For a complete mod list, see [Variables](../Variables/#variable-types)._ +_For a complete mod list, see [Variables](../variables/#variable-types)._ -_The dispatcher list can be found in [Dispatchers](../Dispatchers/#list-of-dispatchers)._ +_The dispatcher list can be found in +[Dispatchers](../dispatchers/#list-of-dispatchers)._ ## Uncommon syms / binding with a keycode @@ -35,11 +38,11 @@ See the [xkbcommon-keysyms.h header](https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h) for all the keysyms. The name you should use is the segment after `XKB_KEY_`. -If you are unsure of what your key's name is, you can -use `xev` or `wev` to find that information. +If you are unsure of what your key's name is, you can 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 with a `code:` prefix, -e.g.: +If you want to bind by a keycode, you can just input it in the KEY position with +a `code:` prefix, e.g.: ```ini bind=SUPER,code:28,exec,amongus @@ -48,9 +51,9 @@ bind=SUPER,code:28,exec,amongus Will bind SUPER + T. (T is keycode 28.) - You can also use `xev` or `wev` to find keycodes. -# Misc +## Misc -## Unbind +### Unbind You can also unbind with `unbind`, e.g.: @@ -64,7 +67,7 @@ May be useful for dynamic keybindings with `hyprctl`. hyprctl keyword unbind SUPER,O ``` -## Mouse buttons +### Mouse buttons You can also bind mouse buttons, by prefacing the mouse keycode with `mouse:`, for example: @@ -75,7 +78,7 @@ bind=SUPER,mouse:272,exec,amongus will bind it to SUPER + LMB. -## Only modkeys +### Only modkeys For binding only modkeys, you need to use the TARGET modmask (with the activating mod) and the `r` flag, e.g.: @@ -84,9 +87,10 @@ activating mod) and the `r` flag, e.g.: bindr=SUPERALT,Alt_L,exec,amongus ``` -## Mouse wheel +### Mouse wheel -You can also bind the mouse wheel with `mouse_up` and `mouse_down` (or `mouse_left` and `mouse_right` if your wheel supports horizontal scrolling): +You can also bind the mouse wheel with `mouse_up` and `mouse_down` (or +`mouse_left` and `mouse_right` if your wheel supports horizontal scrolling): ```ini bind=SUPER,mouse_down,workspace,e-1 @@ -94,7 +98,7 @@ bind=SUPER,mouse_down,workspace,e-1 (control the reset time with `binds:scroll_event_delay`) -## Switches +### Switches Useful for binding e.g. the lid close/open event: @@ -109,9 +113,10 @@ bindl=,switch:off:[switch name],exec,hyprctl keyword monitor "eDP-1, 2560x1600, check out your switches in `hyprctl devices`. -## Multiple binds to one key +### Multiple binds to one key -You can trigger multiple actions with one keybind by assigning multiple binds to one combination, e.g.: +You can trigger multiple actions with one keybind by assigning multiple binds to +one combination, e.g.: ``` # to switch between windows in a floating workspace @@ -121,7 +126,7 @@ bind = SUPER,Tab,bringactivetotop, # bring it to the top The keybinds will be executed in the order they were created. (top to bottom) -# Bind flags +## Bind flags `bind` supports flags in this format: @@ -162,10 +167,10 @@ bindr=SUPER, SUPER_L, exec, pkill wofi || wofi # See Mouse Binds section for bindm usage ``` -# Mouse Binds +## Mouse Binds -Mouse binds are binds that heavily rely on a mouse, usually its movement. -They will have one less arg, and look for example like this: +Mouse binds are binds that heavily rely on a mouse, usually its movement. They +will have one less arg, and look for example like this: ```ini bindm=ALT,mouse:272,movewindow @@ -177,8 +182,8 @@ with your mouse. _Available mouse binds_: | Name | Description | Params | -| -----|------------ |--------| -| movewindow | moves the active window | none | +| --- | --- | --- | +| movewindow | moves the active window | none | | resizewindow | resizes the active window | 1 - resize and keep window aspect ratio, 2 - resize and ignore `keepaspectratio` window rule/prop, none or anything else for normal resize | _Common mouse buttons' codes:_ @@ -190,12 +195,15 @@ RMB -> 273 _for more, you can of course use `wev` to check._ -{{< hint type=tip >}} -Mouse binds, despite their name, behave like normal binds. You are free to use -whatever keys / mods you please. When held, the mouse function will be activated. -{{< /hint >}} +{{< callout type=info >}} -# Binding mods +Mouse binds, despite their name, behave like normal binds. You are free to use +whatever keys / mods you please. When held, the mouse function will be +activated. + +{{< /callout >}} + +## Binding mods You can bind a mod alone like this: @@ -203,15 +211,16 @@ You can bind a mod alone like this: bindr=ALT,Alt_L,exec,amongus ``` -# Global Keybinds +## Global Keybinds + +### Classic -## Classic Yes, you heard this right, Hyprland does support global keybinds for ALL apps, including OBS, Discord, Firefox, etc. -See the [`pass` dispatcher](../Dispatchers/#list-of-dispatchers) for keybinds. +See the [`pass` dispatcher](../dispatchers/#list-of-dispatchers) for keybinds. -Let's take OBS as an example: the "Start/Stop Recording" keybind is set to +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 @@ -231,21 +240,24 @@ bind=,mouse:276,pass,^(TeamSpeak 3)$ Will pass MOUSE5 to TeamSpeak3. -{{< hint type=important >}} +{{< callout >}} + XWayland is a bit wonky. Make sure that what you're passing is a "global Xorg keybind", otherwise passing from a different XWayland app may not work. It works flawlessly with all native Wayland applications though. -{{< /hint >}} -## DBus Global Shortcuts +{{< /callout >}} -Some applications may already support the GlobalShortcuts portal in xdg-desktop-portal. +### DBus Global Shortcuts + +Some applications may already support the GlobalShortcuts portal in +xdg-desktop-portal. If that's the case, then it's recommended to use this method instead of `pass`. -Open your desired app and issue `hyprctl globalshortcuts`. This will give you a list -of currently registered shortcuts with their description(s). +Open your desired app and issue `hyprctl globalshortcuts`. This will give you a +list of currently registered shortcuts with their description(s). Choose whichever you like, for example `coolApp:myToggle` @@ -255,16 +267,18 @@ Bind it to whatever you want with the `global` dispatcher: bind = SUPERSHIFT, A, global, coolApp:myToggle ``` -{{< hint type=tip >}} -Please note that this function will _only_ work with [XDPH](../../Useful-Utilities/Hyprland-desktop-portal). -{{}} +{{< callout type=info >}} -# Submaps +Please note that this function will _only_ work with +[XDPH](../../hyprland-ecosystem/xdg-desktop-portal-hyprland). + +{{}} + +## 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: +you press ALT + R, you can enter a "resize" mode, resize +with arrow keys, and leave with escape, do it like this: ```ini # will switch to a submap called resize @@ -288,11 +302,16 @@ 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`) +{{< callout type=warning >}} + +Do not forget a keybind to reset the keymap while inside it! (In this case, +`escape`) + +{{< /callout >}} If you get stuck inside a keymap, you can use `hyprctl dispatch submap reset` to -go back. If you do not have a terminal open, tough luck buddy. You have been warned. +go back. If you do not have a terminal open, tough luck buddy. You have been +warned. You can also set the same keybind to perform multiple actions, such as resize and close the submap, like so: @@ -314,16 +333,18 @@ assigning multiple actions per bind is possible. ## Catch-All -You can also define a keybind via the special `catchall` keyword, which activates no matter which key is pressed. -This can be used to prevent any keys from passing to your active application while in a submap or to exit it immediately when any unknown key is pressed: +You can also define a keybind via the special `catchall` keyword, which +activates no matter which key is pressed. This can be used to prevent any keys +from passing to your active application while in a submap or to exit it +immediately when any unknown key is pressed: ```ini bind=,catchall,submap,reset ``` -# Example Binds +## Example Binds -## Media +### Media These binds set the expected behavior for regular keyboard media volume keys, including when the screen is locked: diff --git a/pages/Configuring/Configuring-Hyprland.md b/pages/Configuring/Configuring-Hyprland.md index 86b5bbf..43d3cec 100644 --- a/pages/Configuring/Configuring-Hyprland.md +++ b/pages/Configuring/Configuring-Hyprland.md @@ -1,9 +1,16 @@ +--- +weight: 1 +title: Configuring Hyprland +--- + The config is located in `~/.config/hypr/hyprland.conf`. -You can tell Hyprland to use a specific configuration file by using the `--config` (or `-c`) argument. +You can tell Hyprland to use a specific configuration file by using the +`--config` (or `-c`) argument. -Hyprland will automatically generate an example config for you if -you don't have one. You can find an example config [here](https://github.com/hyprwm/Hyprland/blob/main/example/hyprland.conf). +Hyprland will automatically generate an example config for you if you don't have +one. You can find an example config +[here](https://github.com/hyprwm/Hyprland/blob/main/example/hyprland.conf). By removing the line `autogenerated=1` you'll remove the yellow warning. @@ -11,16 +18,18 @@ There is no "reload" keybind. The config is reloaded the moment you save it. Start a section with `name {` and end in `}` **_in separate lines!_** -{{< hint type=important >}} -The default config is not complete and does not list all the options / features of Hyprland. -Please refer to this wiki page and the pages -linked further down here for full configuration instructions. +{{< callout >}} -**Make sure to read the [Variables](../Variables) page as well**. It covers all the -toggleable / numerical options. -{{< /hint >}} +The default config is not complete and does not list all the options / features +of Hyprland. Please refer to this wiki page and the pages linked further down +here for full configuration instructions. -# Line style +**Make sure to read the [Variables](../variables) page as well**. It covers all +the toggleable / numerical options. + +{{< /callout >}} + +## Line style Every config line is a command followed by a value. @@ -41,22 +50,21 @@ COMMAND = VALUE is valid. -## Comments +### Comments Comments are started with the `#` character. -If you want to escape it (put an actual `#` and not start a comment) -you can use `##`. It will be turned into a single `#` that WILL be a part of your -line. +If you want to escape it (put an actual `#` and not start a comment) you can use +`##`. It will be turned into a single `#` that WILL be a part of your line. -# Basic configuring +## Basic configuring To configure the "options" of Hyprland, animations, styling, etc. see -[Variables](../Variables). +[Variables](../variables). -# Advanced configuring +## Advanced configuring -Some keywords (binds, curves, execs, monitors, etc.) are not variables but define -special behavior. +Some keywords (binds, curves, execs, monitors, etc.) are not variables but +define special behavior. -See all of them in [Keywords](../Keywords) and the sidebar. +See all of them in [Keywords](../keywords) and the sidebar. diff --git a/pages/Configuring/Dispatchers.md b/pages/Configuring/Dispatchers.md index 6d9699b..df2d964 100644 --- a/pages/Configuring/Dispatchers.md +++ b/pages/Configuring/Dispatchers.md @@ -1,14 +1,15 @@ -# Table of contents - -{{< toc >}} +--- +weight: 6 +title: Dispatchers +--- Please keep in mind some layout-specific dispatchers will be listed in the layout pages (See the sidebar). -# Parameter explanation +## Parameter explanation | Param type | Description | -| ---------- | ----------- | +| --- | --- | | window | a window. Any of the following: Class regex, `title:` and a title regex, `pid:` and the pid, `address:` and the address, `floating`, `tiled` | | workspace | see below. | | direction | `l` `r` `u` `d` left right up down | @@ -17,10 +18,10 @@ layout pages (See the sidebar). | floatvalue | a relative float delta (e.g `-0.2` or `+0.2`) or `exact` followed by a the exact float value (e.g. `exact 0.5`) | | zheight | `top` or `bottom` | -# List of Dispatchers +## List of Dispatchers | Dispatcher | Description | Params | -| ---------- | ----------- | ------ | +| --- | --- | --- | | exec | executes a shell command | command (supports rules, see [below]({{< relref "#executing-with-rules" >}})) | | execr | executes a raw shell command (does not support rules) | command | | pass | passes the key (with mods) to a specified window. Can be used as a workaround to global keybinds not working on Wayland. | window | @@ -33,11 +34,11 @@ layout pages (See the sidebar). | fullscreen | toggles the focused window's fullscreen state | 0 - fullscreen (takes your entire screen), 1 - maximize (keeps gaps and bar(s)), 2 - fullscreen (same as fullscreen except doesn't alter window's internal fullscreen state) | | fakefullscreen | toggles the focused window's internal fullscreen state without altering the geometry | none | | dpms | sets all monitors' DPMS status. Do not use with a keybind directly. | `on`, `off`, or `toggle`. For specific monitor add monitor name after a space | -| pin | pins a window (i.e. show it on all workspaces) *note: floating only* | left empty / `active` for current, or `window` for a specific window | +| pin | pins a window (i.e. show it on all workspaces) _note: floating only_ | left empty / `active` for current, or `window` for a specific window | | movefocus | moves the focus in a direction | direction | | movewindow | moves the active window in a direction or to a monitor. For floating windows, moves the window to the screen edge in that direction | direction or `mon:` and a monitor | | swapwindow | swaps the active window with another window in the given direction | direction | -| centerwindow | center the active window *note: floating only* | none (for monitor center) or 1 (to respect monitor reserved area) | +| centerwindow | center the active window _note: floating only_ | none (for monitor center) or 1 (to respect monitor reserved area) | | resizeactive | resizes the active window | resizeparams | | moveactive | moves the active window | resizeparams | | resizewindowpixel | resizes a selected window | `resizeparams,window`, e.g. `100 100,^(kitty)$` | @@ -57,12 +58,12 @@ layout pages (See the sidebar). | focusworkspaceoncurrentmonitor | Focuses the requested workspace on the current monitor, swapping the current workspace to a different monitor if necessary. If you want XMonad/Qtile-style workspace switching, replace `workspace` in your config with this. | workspace | | moveworkspacetomonitor | Moves a workspace to a monitor | workspace and a monitor separated by a space | | swapactiveworkspaces | Swaps the active workspaces between two monitors | two monitors separated by a space | -| bringactivetotop | *Deprecated* in favor of alterzorder. Brings the current window to the top of the stack | none | +| bringactivetotop | _Deprecated_ in favor of alterzorder. Brings the current window to the top of the stack | none | | alterzorder | Modify 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] | | togglespecialworkspace | toggles a special workspace on/off | none (for the first) or name for named (name has to be a special workspace's name) | | focusurgentorlast | Focuses the urgent window or the last window | none | | togglegroup | toggles the current active window into a group | none | -| changegroupactive | switches to the next window in a group. | b - back, f - forward, or index start at 1 | +| changegroupactive | switches to the next window in a group. | b - back, f - forward, or index start at 1 | | focuscurrentorlast | Switch focus from current to previously focused window | none | | lockgroups | Locks the groups (all groups will not accept new windows) | `lock` for locking, `unlock` for unlocking, `toggle` for toggle | | lockactivegroup | Lock 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 | @@ -72,35 +73,43 @@ layout pages (See the sidebar). | movegroupwindow | Swaps the active window with the next or previous in a group | `b` for back, anything else for forward | | denywindowfromgroup | Prohibit the active window from becoming or being inserted into group | `on`, `off` or, `toggle` | | setignoregrouplock | Temporarily enable or disable binds:ignore_group_lock | `on`, `off`, or `toggle` | -| global | Executes a Global Shortcut using the GlobalShortcuts portal. See [here](../Binds/#global-keybinds) | name | -| submap | Change the current mapping group. See [Submaps](../Binds/#submaps) | `reset` or name | +| global | Executes a Global Shortcut using the GlobalShortcuts portal. See [here](../binds/#global-keybinds) | name | +| submap | Change the current mapping group. See [Submaps](../binds/#submaps) | `reset` or name | -{{< hint type=warning >}} -it is NOT recommended to set DPMS with a keybind directly, as it -might cause undefined behavior. Instead, consider something like +{{< callout type=warning >}} + +it is NOT recommended to set DPMS with a keybind directly, as it might cause +undefined behavior. Instead, consider something like ```ini bind = MOD,KEY,exec,sleep 1 && hyprctl dispatch dpms off ``` -{{< /hint >}} +{{< /callout >}} -## Grouped (tabbed) windows +### Grouped (tabbed) windows -Hyprland allows you to make a group from the current active window with the `togglegroup` bind dispatcher. +Hyprland allows you to make a group from the current active window with the +`togglegroup` bind dispatcher. -A group is like i3wm’s “tabbed” container. It takes the space of one window, and you can change the window to the next one in the tabbed “group” with the `changegroupactive` bind dispatcher. +A group is like i3wm’s “tabbed” container. It takes the space of one window, and +you can change the window to the next one in the tabbed “group” with the +`changegroupactive` bind dispatcher. -The new group’s border colors are configurable with the appropriate `col.` settings in the `group` config section. +The new group’s border colors are configurable with the appropriate `col.` +settings in the `group` config section. -You can lock a group with the `lockactivegroup` dispatcher in order to stop new window from entering this group. -In addition, the `lockgroups` dispatcher can be used to toggle an independent global group lock that will prevent -new window from entering any groups, regardless of their local group lock stat. +You can lock a group with the `lockactivegroup` dispatcher in order to stop new +window from entering this group. In addition, the `lockgroups` dispatcher can be +used to toggle an independent global group lock that will prevent new window +from entering any groups, regardless of their local group lock stat. -You can prevent a window from being added to group or becoming a group with the `denywindowfromgroup` dispatcher. -`movewindoworgroup` will behave like `movewindow` if current active window or window in direction has this property set. +You can prevent a window from being added to group or becoming a group with the +`denywindowfromgroup` dispatcher. `movewindoworgroup` will behave like +`movewindow` if current active window or window in direction has this property +set. -# Workspaces +## Workspaces You have eight choices: @@ -122,28 +131,36 @@ You have eight choices: - Special Workspace: `special` or `special:name` for named special workspaces. -{{< hint type=warning >}} -`special` is supported ONLY on -`movetoworkspace` and `movetoworkspacesilent`. Any other dispatcher will result in undocumented behavior. -{{< /hint >}} +{{< callout type=warning >}} -{{< hint type=important >}} -Numerical workspaces (e.g. `1`, `2`, `13371337`) are allowed -**ONLY** between 1 and 2147483647 (inclusive) +`special` is supported ONLY on `movetoworkspace` and `movetoworkspacesilent`. +Any other dispatcher will result in undocumented behavior. + +{{< /callout >}} + +{{< callout >}} + +Numerical workspaces (e.g. `1`, `2`, `13371337`) are allowed **ONLY** between 1 +and 2147483647 (inclusive) Neither `0` nor negative numbers are allowed. -{{< /hint >}} -# Special Workspace +{{< /callout >}} + +## Special Workspace A special workspace is what is called a "scratchpad" in some other places. A workspace that you can toggle on/off on any monitor. -{{< hint >}} -You can define multiple named special workspaces, but the amount of those is limited to 97 at a time. -{{< /hint >}} +{{< callout type=info >}} -For example, to move a window/application to a special workspace you can use the following syntax: +You can define multiple named special workspaces, but the amount of those is +limited to 97 at a time. + +{{< /callout >}} + +For example, to move a window/application to a special workspace you can use the +following syntax: ``` bind = SUPER, C, movetoworkspace, special @@ -151,17 +168,20 @@ bind = SUPER, C, movetoworkspace, special #To see the hidden window you can use the togglespecialworkspace dispatcher mentioned above. ``` -# Executing with rules -The `exec` dispatcher supports adding rules. Please note some windows might work better, some -worse. It records the PID of the spawned process and uses that. If your process e.g. forks and then -the fork opens a window, this will not work. +## Executing with rules + +The `exec` dispatcher supports adding rules. Please note some windows might work +better, some worse. It records the PID of the spawned process and uses that. If +your process e.g. forks and then the fork opens a window, this will not work. The syntax is: + ``` bind = mod, key, exec, [rules...] command ``` For example: + ``` bind = SUPER, E, exec, [workspace 2 silent;float;noanim] kitty ``` diff --git a/pages/Configuring/Dwindle-Layout.md b/pages/Configuring/Dwindle-Layout.md index 0c97972..0702db3 100644 --- a/pages/Configuring/Dwindle-Layout.md +++ b/pages/Configuring/Dwindle-Layout.md @@ -1,47 +1,53 @@ -Dwindle is a BSPWM-like layout, where every window on a workspace is a member -of a binary tree. +--- +weight: 11 +title: Dwindle Layout +--- -# Quirks +Dwindle is a BSPWM-like layout, where every window on a workspace is a member of +a binary tree. + +## Quirks Dwindle splits are NOT PERMANENT. The split is determined dynamically with the W/H ratio of the parent node. If W > H, it's side-by-side. If H > W, it's top-and-bottom. You can make them permanent by enabling `preserve_split`. -# Config +## Config category name: `dwindle` | name | description | type | default | -|---|---|---|---| +| --- | --- | --- | --- | | pseudotile | enable pseudotiling. Pseudotiled windows retain their floating size when tiled. | bool | false | | force_split | 0 -> split follows mouse, 1 -> always split to the left (new = left or top) 2 -> always split to the right (new = right or bottom) | int | 0 | | preserve_split | if enabled, the split (side/top) will not change regardless of what happens to the container. | bool | false | | smart_split | if enabled, allows a more precise control over the window split direction based on the cursor's position. The window is conceptually divided into four triangles, and cursor's triangle determines the split direction. This feature also turns on preserve_split. | bool | false | | smart_resizing | if enabled, resizing direction will be determined by the mouse's position on the window (nearest to which corner). Else, it is based on the window's tiling position. | bool | true | -| permanent_direction_override | if enabled, makes the preselect direction persist until either this mode is turned off, another direction is specified, or a non-direction is specified (anything other than l,r,u/t,d/b) | bool | false | +| permanent_direction_override | if enabled, makes the preselect direction persist until either this mode is turned off, another direction is specified, or a non-direction is specified (anything other than l,r,u/t,d/b) | bool | false | | special_scale_factor | specifies the scale factor of windows on the special workspace [0 - 1] | float | 1 | | split_width_multiplier | specifies the auto-split width multiplier | float | 1.0 | | no_gaps_when_only | whether to apply gaps when there is only one window on a workspace, aka. smart gaps. (default: disabled - 0) no border - 1, with border - 2 [0/1/2] | int | 0 | | use_active_for_splits | whether to prefer the active window or the mouse position for splits | bool | true | | default_split_ratio | the default split ratio on window open. 1 means even 50/50 split. [0.1 - 1.9] | float | 1.0 | -# Bind Dispatchers +## Bind Dispatchers | dispatcher | description | params | -|---|---|---| +| --- | --- | --- | | pseudo | toggles the focused window's pseudo mode | none | -# Layout messages +## Layout messages Dispatcher `layoutmsg` params: | param | description | args | -|---|---|---| +| --- | --- | --- | | togglesplit | toggles the split (top/side) of the current window. `preserve_split` must be enabled for toggling to work. | none | | swapsplit | swaps the two halves of the split of the current window. | none | | preselect | A onetime override for the split direction. (valid for the next window to be opened, only works on tiled windows) | direction | e.g.: + ```ini bind = SUPER, A, layoutmsg, preselect l ``` diff --git a/pages/Configuring/Environment-variables.md b/pages/Configuring/Environment-variables.md index 3bfc73f..77eeb9d 100644 --- a/pages/Configuring/Environment-variables.md +++ b/pages/Configuring/Environment-variables.md @@ -1,81 +1,112 @@ -You can use the `env` keyword to set environment variables prior to the initialization of -the Display Server, e.g.: +--- +weight: 15 +title: Environment variables +--- + +You can use the `env` keyword to set environment variables prior to the +initialization of the Display Server, e.g.: + ```ini env = GTK_THEME,Nord ``` -{{< hint type=important >}} -Hyprland puts the raw string to the envvar with the `env` keyword. You should _not_ add quotes around the values. +{{< callout >}} + +Hyprland puts the raw string to the envvar with the `env` keyword. You should +_not_ add quotes around the values. e.g.: + ```ini env = QT_QPA_PLATFORM,wayland ``` -and ***NOT*** +and _**NOT**_ + ```ini env = QT_QPA_PLATFORM,"wayland" ``` -{{< /hint >}} -Please avoid putting those environment variables in /etc/environment. That will cause all -sessions (including Xorg ones) to pick up your wayland-specific environment on traditional -Linux distros. +{{< /callout >}} + +Please avoid putting those environment variables in /etc/environment. That will +cause all sessions (including Xorg ones) to pick up your wayland-specific +environment on traditional Linux distros. + +## Hyprland Environment Variables -# Hyprland Environment Variables - `HYPRLAND_LOG_WLR=1` - Enables more verbose logging of wlroots. - `HYPRLAND_NO_RT=1` - Disables realtime priority setting by Hyprland. - `HYPRLAND_NO_SD_NOTIFY=1` - If systemd, disables the `sd_notify` calls. -# Toolkit Backend Variables -- `GDK_BACKEND=wayland,x11` - GTK: Use wayland if available, fall back to x11 if not. -- `QT_QPA_PLATFORM="wayland;xcb"` - Qt: Use wayland if available, fall back to x11 if not. -- `SDL_VIDEODRIVER=wayland` - Run SDL2 applications on Wayland. Remove or set to `x11` if games that provide older versions of SDL cause - compatibility issues -- `CLUTTER_BACKEND=wayland` - Clutter package already has wayland enabled, this variable will force Clutter applications - to try and use the Wayland backend +## Toolkit Backend Variables -# XDG Specifications +- `GDK_BACKEND=wayland,x11` - GTK: Use wayland if available, fall back to x11 if + not. +- `QT_QPA_PLATFORM="wayland;xcb"` - Qt: Use wayland if available, fall back to + x11 if not. +- `SDL_VIDEODRIVER=wayland` - Run SDL2 applications on Wayland. Remove or set to + `x11` if games that provide older versions of SDL cause compatibility issues +- `CLUTTER_BACKEND=wayland` - Clutter package already has wayland enabled, this + variable will force Clutter applications to try and use the Wayland backend + +## XDG Specifications - `XDG_CURRENT_DESKTOP=Hyprland` - `XDG_SESSION_TYPE=wayland` - `XDG_SESSION_DESKTOP=Hyprland` -XDG specific environment variables are often detected through portals and applications that may -set those for you, however it is not a bad idea to set them explicitly. +XDG specific environment variables are often detected through portals and +applications that may set those for you, however it is not a bad idea to set +them explicitly. -# Qt Variables +## Qt Variables -- `QT_AUTO_SCREEN_SCALE_FACTOR=1` - [(From the Qt documentation)](https://doc.qt.io/qt-5/highdpi.html) -enables automatic scaling, based on the monitor's pixel density -- `QT_QPA_PLATFORM=wayland;xcb` - Tell Qt applications to use the Wayland backend, and fall back to x11 if Wayland is unavailable -- `QT_WAYLAND_DISABLE_WINDOWDECORATION=1` - Disables window decorations on Qt applications -- `QT_QPA_PLATFORMTHEME=qt5ct` - Tells Qt based applications to pick your theme from qt5ct, use with Kvantum. +- `QT_AUTO_SCREEN_SCALE_FACTOR=1` - + [(From the Qt documentation)](https://doc.qt.io/qt-5/highdpi.html) enables + automatic scaling, based on the monitor's pixel density +- `QT_QPA_PLATFORM=wayland;xcb` - Tell Qt applications to use the Wayland + backend, and fall back to x11 if Wayland is unavailable +- `QT_WAYLAND_DISABLE_WINDOWDECORATION=1` - Disables window decorations on Qt + applications +- `QT_QPA_PLATFORMTHEME=qt5ct` - Tells Qt based applications to pick your theme + from qt5ct, use with Kvantum. -# NVIDIA Specific +## NVIDIA Specific To force GBM as a backend, set the following environment variables: - `GBM_BACKEND=nvidia-drm` - `__GLX_VENDOR_LIBRARY_NAME=nvidia` -> See [Archwiki Wayland Page](https://wiki.archlinux.org/title/Wayland#Requirements) for more details on those variables. +> See +> [Archwiki Wayland Page](https://wiki.archlinux.org/title/Wayland#Requirements) +> for more details on those variables. - `LIBVA_DRIVER_NAME=nvidia` - Hardware acceleration on NVIDIA GPUs -> See [Archwiki Hardware Acceleration Page](https://wiki.archlinux.org/title/Hardware_video_acceleration) +> See +> [Archwiki Hardware Acceleration Page](https://wiki.archlinux.org/title/Hardware_video_acceleration) > for details and necessary values before setting this variable. -- `__GL_GSYNC_ALLOWED` - Controls if G-Sync capable monitors should use Variable Refresh Rate (VRR) +- `__GL_GSYNC_ALLOWED` - Controls if G-Sync capable monitors should use Variable + Refresh Rate (VRR) -> See [Nvidia Documentation](https://download.nvidia.com/XFree86/Linux-32bit-ARM/375.26/README/openglenvvariables.html) for details. +> See +> [Nvidia Documentation](https://download.nvidia.com/XFree86/Linux-32bit-ARM/375.26/README/openglenvvariables.html) +> for details. -- `__GL_VRR_ALLOWED` - Controls if Adaptive Sync should be used. Recommended to set as "0" to avoid having problems on some games. +- `__GL_VRR_ALLOWED` - Controls if Adaptive Sync should be used. Recommended to + set as "0" to avoid having problems on some games. -- `WLR_DRM_NO_ATOMIC=1` - use legacy DRM interface instead of atomic mode setting. Might fix flickering issues. +- `WLR_DRM_NO_ATOMIC=1` - use legacy DRM interface instead of atomic mode + setting. Might fix flickering issues. -# Theming Related Variables +## Theming Related Variables -- `GTK_THEME` - Set a GTK theme manually, for those who want to avoid appearance tools such as lxappearance or nwg-look -- `XCURSOR_THEME` - Set your cursor theme. The theme needs to be installed and readable by your user. -- `XCURSOR_SIZE` - Set cursor size. See [here](../../FAQ/) for why you might want this variable set. +- `GTK_THEME` - Set a GTK theme manually, for those who want to avoid appearance + tools such as lxappearance or nwg-look +- `XCURSOR_THEME` - Set your cursor theme. The theme needs to be installed and + readable by your user. +- `XCURSOR_SIZE` - Set cursor size. See [here](../../faq/) for why you might + want this variable set. diff --git a/pages/Configuring/Example-configurations.md b/pages/Configuring/Example-configurations.md index efc563f..c14ab48 100644 --- a/pages/Configuring/Example-configurations.md +++ b/pages/Configuring/Example-configurations.md @@ -1,37 +1,49 @@ -This page houses links to a few repositories with beautiful Hyprland configurations -for you to get inspired from or learn how to configure Hyprland from -a more tangible example. +--- +weight: 18 +title: Example configurations +--- + +This page houses links to a few repositories with beautiful Hyprland +configurations for you to get inspired from or learn how to configure Hyprland +from a more tangible example. ### end_4 + ![](https://camo.githubusercontent.com/5ca3a06db6bcbec4b51448a6989c941d76b4dcac2e150452a45ae913793adfe9/68747470733a2f2f63646e2e646973636f72646170702e636f6d2f6174746163686d656e74732f313039313536393837323533353831343138352f313130373637353836363130313732333237372f73637265656e73686f742d73756d6d65722e706e67) [https://github.com/end-4/dots-hyprland/tree/summer-gruv](https://github.com/end-4/dots-hyprland/tree/summer-gruv) ### fufexan + ![](https://user-images.githubusercontent.com/36706276/192147190-cf9cf4df-94cb-4a3b-b9d8-137ed0c2538f.png) [https://github.com/fufexan/dotfiles](https://github.com/fufexan/dotfiles) ### linuxmobile + ![](https://i.ibb.co/kGrhpKd/68747470733a2f2f692e696d6775722e636f6d2f553173336a69372e706e67.png) [https://github.com/linuxmobile/hyprland-dots](https://github.com/linuxmobile/hyprland-dots) ### flick0 + ![](https://raw.githubusercontent.com/flick0/dotfiles/aurora/assets/fetch.png) [https://github.com/flick0/dotfiles](https://github.com/flick0/dotfiles) ### iamverysimp1e + ![](https://github.com/iamverysimp1e/dots/raw/main/ScreenShots/HyprLand/Rice1.png) [https://github.com/iamverysimp1e/dots](https://github.com/iamverysimp1e/dots) ### notusknot + ![](https://github.com/notusknot/dotfiles-nix/raw/main/pics/screenshot.png) [https://github.com/notusknot/dotfiles-nix](https://github.com/notusknot/dotfiles-nix) ### coffebar + ![](https://github.com/coffebar/dotfiles/raw/6a5d595c594f108cd10219df08d338e98e1d2d7d/screenshot.png) [https://github.com/coffebar/dotfiles](https://github.com/coffebar/dotfiles) diff --git a/pages/Configuring/Expanding-functionality.md b/pages/Configuring/Expanding-functionality.md index 6c12252..4e78a67 100644 --- a/pages/Configuring/Expanding-functionality.md +++ b/pages/Configuring/Expanding-functionality.md @@ -1,13 +1,17 @@ +--- +weight: 13 +title: Expanding functionality +--- + Hyprland exposes two powerful sockets for you to use. The first, socket1, can be fully controlled with `hyprctl`, see its usage -[here](../Using-hyprctl). +[here](../using-hyprctl). The second, socket2, sends events for certain changes / actions and can be used -to react to different events. See its description -[here](../../IPC/). +to react to different events. See its description [here](../../ipc/). -# Example script +## Example script This bash script will change the outer gaps to 20 if the currently focused monitor is DP-1, and 30 otherwise. diff --git a/pages/Configuring/Keywords.md b/pages/Configuring/Keywords.md index 82167e9..9fa5ead 100644 --- a/pages/Configuring/Keywords.md +++ b/pages/Configuring/Keywords.md @@ -1,9 +1,15 @@ -Keywords are not variables, but "commands" for more advanced configuring. On this -page, you will be presented with some that do not deserve their own page. +--- +weight: 3 +title: Keywords +--- -See the sidebar for more keywords to control binds, animations, monitors, et cetera. +Keywords are not variables, but "commands" for more advanced configuring. On +this page, you will be presented with some that do not deserve their own page. -{{< hint type=important >}} +See the sidebar for more keywords to control binds, animations, monitors, et +cetera. + +{{< callout >}} 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 @@ -19,13 +25,9 @@ three_param_keyword = A, , C # OK three_param_keyword = A, B, # OK ``` -{{< /hint >}} +{{< /callout >}} -# Table of contents - -{{< toc format=html >}} - -# Executing +## Executing you can execute a shell script on startup of the compositor or on each time it's reloaded. @@ -34,7 +36,7 @@ reloaded. `exec=command` will execute on each reload -# Defining variables +## Defining variables You can define your own custom variables like this: @@ -60,7 +62,7 @@ You ARE allowed to do this: col.active_border=ff$MyRedValue1111 ``` -# Sourcing (multi-file) +## Sourcing (multi-file) Use the `source` keyword to source another file. @@ -75,14 +77,14 @@ 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. -# Gestures +## Gestures Use something like [libinput-gestures](https://github.com/bulletmark/libinput-gestures), with `hyprctl` if you want to expand Hyprland's gestures beyond what's offered in -[Variables](../Variables). +[Variables](../variables). -# Per-device input configs +## Per-device input configs Per-device config options will overwrite your options set in the `input` section. It's worth noting that ONLY values explicitly changed will be @@ -111,10 +113,11 @@ touchdevice:transform -> transform touchdevice:output -> output ``` -You can also use the `output` setting for tablets to bind them to outputs. Remember to -use the name of the `Tablet` and not `Tablet Pad` or `Tablet tool`. +You can also use the `output` setting for tablets to bind them to outputs. +Remember to use the name of the `Tablet` and not `Tablet Pad` or `Tablet tool`. Additional properties only present in per-device configs: + ```plain enabled -> (only for mice / touchpads / touchdevices / keyboards) enables / disables the device (connects / disconnects from the on-screen cursor) - default: Enabled ``` @@ -130,25 +133,28 @@ device { } ``` -{{< hint type=info >}} +{{< callout type=info >}} + Per-device layouts will by default not alter the keybind keymap, so for example with a global keymap of `us` and a per-device one of `fr`, the keybinds will still act as if you were on `us`. You can change this behavior by setting `resolve_binds_by_sym = 1`. In that case you'll need to type the symbol specified in the bind to activate it. -{{< /hint >}} -# Wallpapers +{{< /callout >}} + +## Wallpapers The hyprland background you see when you first start Hyprland is **NOT A WALLPAPER**, it's the default image rendered at the bottom of the render stack. To set a wallpaper, use a wallpaper utility like -[hyprpaper](https://github.com/hyprwm/hyprpaper) or [swaybg](https://github.com/swaywm/swaybg). +[hyprpaper](https://github.com/hyprwm/hyprpaper) or +[swaybg](https://github.com/swaywm/swaybg). -More can be found in [Useful Utilities](../../Useful-Utilities). +More can be found in [Useful Utilities](../../useful-utilities). -# Blurring layerSurfaces +## Blurring layerSurfaces LayerSurfaces are not windows. These are for example: Your wallpapers, notification overlays, bars, etc. @@ -175,32 +181,44 @@ For example: layerrule = unset,NAMESPACE ``` -# Setting the environment +## Setting the environment -{{< hint type=note >}} -The `env` keyword works just like `exec-once`, meaning it will only fire once on Hyprland's launch. -{{< /hint >}} +{{< callout type=info >}} + +The `env` keyword works just like `exec-once`, meaning it will only fire once on +Hyprland's launch. + +{{< /callout >}} + +You can use the `env` keyword to set environment variables at Hyprland's start, +e.g.: -You can use the `env` keyword to set environment variables at Hyprland's start, e.g.: ```ini env = XCURSOR_SIZE,24 ``` -You can also add a `d` flag if you want the env var to be exported to D-Bus (systemd only) +You can also add a `d` flag if you want the env var to be exported to D-Bus +(systemd only) + ```ini envd = XCURSOR_SIZE,24 ``` -{{< hint type=important >}} -Hyprland puts the raw string to the envvar. You should _not_ add quotes around the values. +{{< callout >}} + +Hyprland puts the raw string to the envvar. You should _not_ add quotes around +the values. e.g.: + ```ini env = QT_QPA_PLATFORM,wayland ``` -and ***NOT*** +and _**NOT**_ + ```ini env = QT_QPA_PLATFORM,"wayland" ``` -{{< /hint >}} + +{{< /callout >}} diff --git a/pages/Configuring/Master-Layout.md b/pages/Configuring/Master-Layout.md index 5f8cdfc..5faa057 100644 --- a/pages/Configuring/Master-Layout.md +++ b/pages/Configuring/Master-Layout.md @@ -1,15 +1,21 @@ -The master layout makes one (or more) window(s) be the "master", taking (by default) the left part of the -screen, and tiles the rest on the right. You can change the orientation on per-workspace basis -if you want to use anything other than the default left/right split. +--- +weight: 11 +title: Master Layout +--- + +The master layout makes one (or more) window(s) be the "master", taking (by +default) the left part of the screen, and tiles the rest on the right. You can +change the orientation on per-workspace basis if you want to use anything other +than the default left/right split. ![master1](https://user-images.githubusercontent.com/43317083/179357849-321f042c-f536-44b3-9e6f-371df5321836.gif) -# Config +## Config _category name `master`_ | name | description | type | default | -|---|---|---|---| +| --- | --- | --- | --- | | allow_small_split | enable adding additional master windows in a horizontal split style | bool | false | | special_scale_factor | the scale of the special workspace windows. [0.0 - 1.0] | float | 1 | | mfact | master split factor, the ratio of master split [0.0 - 1.0] | float | 0.55 | @@ -20,10 +26,9 @@ _category name `master`_ | inherit_fullscreen | inherit fullscreen status when cycling/swapping to another window (e.g. monocle layout) | bool | true | | always_center_master | when using orientation=center, keep the master window centered, even when it is the only window in the workspace. | bool | false | | smart_resizing | if enabled, resizing direction will be determined by the mouse's position on the window (nearest to which corner). Else, it is based on the window's tiling position. | bool | true | -| drop_at_cursor | when enabled, dragging and dropping windows will put them at the cursor position. Otherwise, when dropped at the stack side, they will go to the top/bottom of the stack depending on new_on_top. | bool | true | +| drop_at_cursor | when enabled, dragging and dropping windows will put them at the cursor position. Otherwise, when dropped at the stack side, they will go to the top/bottom of the stack depending on new_on_top. | bool | true | - -# Dispatchers +## Dispatchers `layoutmsg` commands: @@ -51,7 +56,8 @@ _category name `master`_ params for the commands are separated by a single space -{{< hint type=info >}} +{{< callout type=info >}} + example usage: ```ini @@ -60,15 +66,13 @@ bind=MOD,KEY,layoutmsg,cyclenext bind=MOD,KEY,layoutmsg,swapwithmaster master ``` -{{< /hint >}} +{{< /callout >}} +## Workspace Rules -# Workspace Rules - -`layoutopt` rules: -| rule | description | type | -| --- | --- | --- | -| orientation:[o] | Sets the orientation of a workspace. For available orientations, see [Config->orientation](#config) | string | +`layoutopt` rules: | rule | description | type | | --- | --- | --- | | +orientation:[o] | Sets the orientation of a workspace. For available +orientations, see [Config->orientation](#config) | string | Example usage: diff --git a/pages/Configuring/Monitors.md b/pages/Configuring/Monitors.md index 1eb5c82..d4531df 100644 --- a/pages/Configuring/Monitors.md +++ b/pages/Configuring/Monitors.md @@ -1,8 +1,9 @@ -# Table of contents +--- +weight: 4 +title: Monitors +--- -{{< toc format=html >}} - -# General +## General The general config of a monitor looks like this @@ -16,8 +17,8 @@ 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). +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 all available monitors (active and inactive): @@ -25,36 +26,41 @@ To list all available monitors (active and inactive): hyprctl monitors all ``` -Monitors are positioned on a virtual "layout". The `position` is the position of +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: + ```ini 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 + ```ini monitor=DP-1, 1920x1080, 1920x0, 1 monitor=DP-2, 1920x1080, 0x0, 1 ``` + will tell hyprland to make DP-1 on the _right_. The `position` may contain _negative_ values, so the above example could also be written as + ```ini monitor=DP-1, 1920x1080, 0x0, 1 monitor=DP-2, 1920x1080, -1920x0, 1 ``` -{{< hint type=tip >}} +{{< callout type=info >}} -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`. +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. @@ -62,8 +68,8 @@ 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. +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: @@ -89,9 +95,9 @@ for a focus on resolution this: monitor=,highres,auto,1 ``` -For more specific rules, you can also use the output's description -(see `hyprctl monitors` for more details). -If the output of `hyprctl monitors` looks like the following: +For more specific rules, you can also use the output's description (see +`hyprctl monitors` for more details). If the output of `hyprctl monitors` looks +like the following: ``` Monitor eDP-1 (ID 0): @@ -102,8 +108,8 @@ Monitor eDP-1 (ID 0): [...] ``` -then the `description` value up to the portname `(eDP-1)` can be used -to specify the monitor: +then the `description` value up to the portname `(eDP-1)` can be used to specify +the monitor: ``` monitor=desc:Chimei Innolux Corporation 0x150C,preferred,auto,1.5 @@ -111,15 +117,16 @@ monitor=desc:Chimei Innolux Corporation 0x150C,preferred,auto,1.5 Remember to remove the `(portname)`! -## Custom modelines +### Custom modelines -You can set up a custom modeline by changing the resolution field to a modeline, for example: +You can set up a custom modeline by changing the resolution field to a modeline, +for example: ``` monitor = DP-1, modeline 1071.101 3840 3848 3880 3920 2160 2263 2271 2277 +hsync -vsync, 0x0, 1 ``` -## Disabling a monitor +### Disabling a monitor To disable a monitor, use @@ -127,15 +134,16 @@ To disable a monitor, use monitor=name,disable ``` -{{< hint type=tip >}} +{{< callout >}} -Disabling a monitor will literally remove it from the layout, moving all windows and workspaces -to any remaining ones. If you want to disable your monitor in a screensaver style (just turn -off the monitor) use the `dpms` [dispatcher](../Dispatchers). +Disabling a monitor will literally remove it from the layout, moving all windows +and workspaces to any remaining ones. If you want to disable your monitor in a +screensaver style (just turn off the monitor) use the `dpms` +[dispatcher](../dispatchers). -{{}} +{{}} -# Custom reserved area +## Custom reserved area If your workflow requires custom reserved area, you can add it with @@ -147,18 +155,20 @@ Where `TOP` `BOTTOM` `LEFT` `RIGHT` are integers in pixels of the reserved area to add. This does stack on top of the calculated one, (e.g. bars) but you may only use one of these rules per monitor in the config. -# Extra args +## Extra args You can combine extra arguments at the end of the monitor rule, examples: + ```ini monitor=eDP-1,2880x1800@90,0x0,1,transform,1,mirror,DP-2,bitdepth,10 ``` + See bellow for more detail about each argument. -## Mirrored displays +### Mirrored displays -If you want to mirror a display, add a `,mirror,[NAME]` at the end of the monitor -rule, examples: +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 @@ -170,30 +180,36 @@ 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. -## 10 bit support +### 10 bit support + +If you want to enable 10 bit support for your display, add a `,bitdepth,10` at +the end of the monitor rule, e.g.: -If you want to enable 10 bit support for your display, add a `,bitdepth,10` at the -end of the monitor rule, e.g.: ```ini monitor=eDP-1,2880x1800@90,0x0,1,bitdepth,10 ``` -**NOTE** Colors registered in Hyprland (e.g. the border color) do _not_support 10 bit. + +**NOTE** Colors registered in Hyprland (e.g. the border color) do _not_support +10 bit. **NOTE** Some applications do _not_support screen capture with 10 bit enabled. -## VRR +### VRR -Per-display VRR can be done by adding `,vrr,X` where `X` is the mode from the [variables page](../Variables). +Per-display VRR can be done by adding `,vrr,X` where `X` is the mode from the +[variables page](../variables). -# Rotating +## 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.: -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.: ```ini monitor=eDP-1,2880x1800@90,0x0,1,transform,1 ``` Transform list: + ```ini normal (no transforms) -> 0 90 degrees -> 1 @@ -205,8 +221,10 @@ flipped + 180 degrees -> 6 flipped + 270 degrees -> 7 ``` -{{< hint type=note >}} -If you're using a touchscreen, you'll also have to rotate its digitizer to match: +{{< callout type=info >}} + +If you're using a touchscreen, you'll also have to rotate its digitizer to +match: ```ini input { @@ -216,13 +234,15 @@ input { } ``` -This will be done automatically when [#3544](https://github.com/hyprwm/Hyprland/pull/3544) lands. -{{< /hint >}} +This will be done automatically when +[#3544](https://github.com/hyprwm/Hyprland/pull/3544) lands. -# Default workspace +{{< /callout >}} -See [Workspace Rules](../Workspace-Rules). +## Default workspace -## Binding workspaces to a monitor +See [Workspace Rules](../workspace-rules). -See [Workspace Rules](../Workspace-Rules). +### Binding workspaces to a monitor + +See [Workspace Rules](../workspace-rules). diff --git a/pages/Configuring/Multi-GPU.md b/pages/Configuring/Multi-GPU.md index d0f1e24..b8efd1d 100644 --- a/pages/Configuring/Multi-GPU.md +++ b/pages/Configuring/Multi-GPU.md @@ -1,18 +1,18 @@ -# Table of contents +--- +weight: 16 +title: Multi-GPU +--- -{{< toc >}} - -# General +## General 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. +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 +## Detecting GPUs For this case, the writer is taking the example of their laptop. @@ -23,6 +23,7 @@ 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. @@ -39,12 +40,12 @@ 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 +## 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. -{{< hint type=info >}} +{{< callout type=info >}} 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 @@ -52,7 +53,7 @@ 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. -{{< /hint >}} +{{< /callout >}} We can do so by using the `WLR_DRM_DEVICES` variable. @@ -62,7 +63,7 @@ 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. +For our case, we want to use `card1` primarily and use it to render stuff. ```ini env = WLR_DRM_DEVICES,/dev/dri/card1:/dev/dri/card0 diff --git a/pages/Configuring/Performance.md b/pages/Configuring/Performance.md index 52c5678..afc0384 100644 --- a/pages/Configuring/Performance.md +++ b/pages/Configuring/Performance.md @@ -1,22 +1,36 @@ -This page documents known tricks and fixes to boost performance if by any chance you stumble upon problems or you do not care that much about animations. +--- +weight: 19 +title: Performance +--- -# Fractional scaling +This page documents known tricks and fixes to boost performance if by any chance +you stumble upon problems or you do not care that much about animations. -Wayland fractional scaling is a lot better than before, but it is not perfect. Some applications do not support it yet or the support is experimental at best. If you have problems with your graphics card having high usage and hyprland feeling laggy then try setting the scaling to integer numbers such as `1` or `2` like in this example `monitor=,preferred,auto,2`. +## Fractional scaling -# Low FPS/stutter/FPS drops on Intel iGPU with TLP (mainly laptops) +Wayland fractional scaling is a lot better than before, but it is not perfect. +Some applications do not support it yet or the support is experimental at best. +If you have problems with your graphics card having high usage and hyprland +feeling laggy then try setting the scaling to integer numbers such as `1` or `2` +like in this example `monitor=,preferred,auto,2`. -The TLP defaults are rather aggressive, setting `INTEL_GPU_MIN_FREQ_ON_AC` and/or `INTEL_GPU_MIN_FREQ_ON_BAT` in `/etc/tlp.conf` to something slightly higher (e.g. to 500 from 300) will reduce stutter significantly or, in the best case, remove it completely. +## Low FPS/stutter/FPS drops on Intel iGPU with TLP (mainly laptops) -# How do I make Hyprland draw as little power as possible on my laptop? +The TLP defaults are rather aggressive, setting `INTEL_GPU_MIN_FREQ_ON_AC` +and/or `INTEL_GPU_MIN_FREQ_ON_BAT` in `/etc/tlp.conf` to something slightly +higher (e.g. to 500 from 300) will reduce stutter significantly or, in the best +case, remove it completely. + +## How do I make Hyprland draw as little power as possible on my laptop? **_Useful Optimizations_**: -* `decoration:blur = false` and `decoration:drop_shadow = false` to disable - fancy but battery hungry effects. +- `decoration:blur = false` and `decoration:drop_shadow = false` to disable + fancy but battery hungry effects. -* `misc:vfr = true`, since it'll lower the amount of sent frames when nothing is happening on-screen. +- `misc:vfr = true`, since it'll lower the amount of sent frames when nothing is + happening on-screen. -# My games work poorly, especially proton ones +## My games work poorly, especially proton ones Use `gamescope`, tends to fix any and all issues with wayland/Hyprland. diff --git a/pages/Configuring/Tearing.md b/pages/Configuring/Tearing.md index 547afc0..a66062a 100644 --- a/pages/Configuring/Tearing.md +++ b/pages/Configuring/Tearing.md @@ -1,17 +1,29 @@ +--- +weight: 10 +title: Tearing +--- + Screen tearing is used to reduce latency and/or jitter in games. ## Enabling 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. -{{< hint type=note >}} -Please note that tearing will only be in effect when the game is in fullscreen and the only thing visible on the screen. -{{< /hint >}} +- 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. + +{{< callout >}} + +Please note that tearing will only be in effect when the game is in fullscreen +and the only thing visible on the screen. + +{{< /callout >}} Example snippet: + ```env general { allow_tearing = true @@ -22,46 +34,62 @@ env = WLR_DRM_NO_ATOMIC,1 windowrulev2 = immediate, class:^(cs2)$ ``` -{{< hint type=note >}} -`env = WLR_DRM_NO_ATOMIC,1` is not recommended. If your kernel ver is >= 6.8, you can remove it. +{{< callout >}} + +`env = WLR_DRM_NO_ATOMIC,1` is not recommended. If your kernel ver is >= 6.8, +you can remove it. For kernels < 6.8, this env is required. Check your kernel version with `uname -r`. -{{< /hint >}} -{{< hint type=warning >}} -If you experience graphical issues, you may be out of luck. Tearing support is experimental. +{{< /callout >}} + +{{< callout type=warning >}} + +If you experience graphical issues, you may be out of luck. Tearing support is +experimental. See the likely culprits below. -{{< /hint >}} + +{{< /callout >}} ## Common issues ### No tearing at all + Make sure your windowrules are matching and you have the master toggle enabled. -Also make sure nothing except for your game is showing on your monitor. No notifications, overlays, lockscreens, -bars, other windows, etc. (on a different monitor is fine) +Also make sure nothing except for your game is showing on your monitor. No +notifications, overlays, lockscreens, bars, other windows, etc. (on a different +monitor is fine) ### Apps that should tear, freeze -Almost definitely means your GPU driver does not support tearing, like e.g. Intel's. + +Almost definitely means your GPU driver does not support tearing, like e.g. +Intel's. Please _do not_ report issues if this is the culprit. ### Graphical artifacts (random colorful pixels, etc) + Likely issue with your graphics driver. -Please _do not_ report issues if this is the culprit. Unfortunately, it's most likely your GPU driver's fault. +Please _do not_ report issues if this is the culprit. Unfortunately, it's most +likely your GPU driver's fault. Could be the below as well -### Other graphical issues +### Other graphical issues + or + ### Hyprland instantly crashes on launch + Likely issue with `WLR_DRM_NO_ATOMIC`. NO_ATOMIC forces the use of a legacy, less tested drm API. -Please _do not_ report issues if this is the culprit. Unfortunately, you will have to wait for the Linux kernel to support -tearing page flips on the atomic API. \ No newline at end of file +Please _do not_ report issues if this is the culprit. Unfortunately, you will +have to wait for the Linux kernel to support tearing page flips on the atomic +API. diff --git a/pages/Configuring/Uncommon-tips-&-tricks.md b/pages/Configuring/Uncommon-tips-&-tricks.md index ad68696..0c3b093 100644 --- a/pages/Configuring/Uncommon-tips-&-tricks.md +++ b/pages/Configuring/Uncommon-tips-&-tricks.md @@ -1,6 +1,12 @@ -# Switchable keyboard layouts +--- +weight: 17 +title: Uncommon tips & tricks +--- -The easiest way to accomplish this is to set this using XKB settings, for example: +## Switchable keyboard layouts + +The easiest way to accomplish this is to set this using XKB settings, for +example: ``` input { @@ -9,11 +15,12 @@ input { } ``` -{{< hint type=important >}} +{{< callout >}} The first layout defined in the input section will be the one used for binds by default. -For example: `us,ua` -> config binds would be e.g. `SUPER, A`, while on `ua,us` -> `SUPER, Cyrillic_ef` +For example: `us,ua` -> config binds would be e.g. `SUPER, A`, while on `ua,us` +-> `SUPER, Cyrillic_ef` You can change this behavior globally or per-device by setting `resolve_binds_by_sym = 1`. In that case, binds will activate when the symbol typed matches the symbol specified in the bind. @@ -22,25 +29,28 @@ For example: if your layouts are `us,fr` and have a bind for `SUPER, A` you'd ne first letter on the second row while the `us` layout is active and the first letter on the first row while the `fr` layout is active. -{{< /hint >}} +{{< /callout >}} -You can also bind a key to execute `hyprctl switchxkblayout` for more keybind freedom. -See [Using hyprctl](../Using-hyprctl). +You can also bind a key to execute `hyprctl switchxkblayout` for more keybind +freedom. See [Using hyprctl](../Using-hyprctl). -To find the valid layouts and `kb_options`, you can check out the `/usr/share/X11/xkb/rules/base.lst`. For example: +To find the valid layouts and `kb_options`, you can check out the +`/usr/share/X11/xkb/rules/base.lst`. For example: To get the layout name of a language: + ```sh grep -i 'persian' /usr/share/X11/xkb/rules/base.lst ``` -To get the list of keyboard shortcuts you can put in the `kb_options` to toggle keyboard layouts: +To get the list of keyboard shortcuts you can put in the `kb_options` to toggle +keyboard layouts: ```sh grep 'grp:.*toggle' /usr/share/X11/xkb/rules/base.lst ``` -# Disabling keybinds with one master keybind +## Disabling keybinds with one master keybind If you want to disable all keybinds with another keybind (make a keybind toggle of sorts) you can just use a submap with only a keybind to exit it. @@ -51,7 +61,8 @@ submap=clean bind=MOD,KEY,submap,reset submap=reset ``` -# Remap Caps-Lock to Ctrl + +## Remap Caps-Lock to Ctrl ``` input { @@ -59,7 +70,7 @@ input { } ``` -# Swap Caps-Lock and Escape +## Swap Caps-Lock and Escape ``` input { @@ -67,10 +78,11 @@ input { } ``` -# Minimize Steam instead of killing +## Minimize Steam instead of killing -Steam will exit entirely when it's last window is closed using the `killactive` dispatcher. -To minimize Steam to tray, use the following script to close applications: +Steam will exit entirely when it's last window is closed using the `killactive` +dispatcher. To minimize Steam to tray, use the following script to close +applications: ```sh if [ "$(hyprctl activewindow -j | jq -r ".class")" = "Steam" ]; then @@ -80,14 +92,15 @@ else fi ``` -# Window Dancing +## Window Dancing -Some XWayland games like Rhythm Doctor and Friday Night Funkin' mods like to move -the windows by themselves, but that often doesn't work by default. +Some XWayland games like Rhythm Doctor and Friday Night Funkin' mods like to +move the windows by themselves, but that often doesn't work by default. For example, if you want to configure Rhythm Doctor, you'd have to: 1. Set input rules + ```ini input { # ... @@ -109,9 +122,11 @@ Click the GIF below to see a full demo video [![Demo GIF of Rhythm Doctor](https://cdn.discordapp.com/attachments/810799100940255260/1032843745864986644/ezgif.com-gif-maker18.gif)](https://pool.jortage.com/voringme/misskey/565b9dfb-125f-4ea0-9257-b371cb4c7195.mp4) -## Shimeji +### Shimeji -To use Shimeji programs like [this](https://codeberg.org/thatonecalculator/spamton-linux-shimeji), set the following rules: +To use Shimeji programs like +[this](https://codeberg.org/thatonecalculator/spamton-linux-shimeji), set the +following rules: ```ini windowrule=float, com-group_finity-mascot-Main @@ -121,19 +136,21 @@ windowrule=noshadow, com-group_finity-mascot-Main windowrule=noborder, com-group_finity-mascot-Main ``` -{{< hint >}} +{{< callout type=info >}} -The app indicator probably won't show, so you'll have to `killall -9 java` to kill them. +The app indicator probably won't show, so you'll have to `killall -9 java` to +kill them. -{{< /hint >}} +{{< /callout >}} ![Demo GIF of Spamton Shimeji](https://media.discordapp.net/attachments/810799100940255260/1032846469855727656/ezgif.com-gif-maker19.gif) -# Toggle animations/blur/etc hotkey +## Toggle animations/blur/etc hotkey For increased performance in games, or for less distractions at a keypress -1. create file `~/.config/hypr/gamemode.sh && chmod +x ~/.config/hypr/gamemode.sh` and add: +1. create file + `~/.config/hypr/gamemode.sh && chmod +x ~/.config/hypr/gamemode.sh` and add: ```bash #!/usr/bin/env sh @@ -152,7 +169,8 @@ fi hyprctl reload ``` -Edit to your liking of course. If animations are enabled, it disables all the pretty stuff. Otherwise, the script reloads your config to grab your defaults. +Edit to your liking of course. If animations are enabled, it disables all the +pretty stuff. Otherwise, the script reloads your config to grab your defaults. 2. Add this to your `hyprland.conf`: diff --git a/pages/Configuring/Using-hyprctl.md b/pages/Configuring/Using-hyprctl.md index e1b6c15..fd450b5 100644 --- a/pages/Configuring/Using-hyprctl.md +++ b/pages/Configuring/Using-hyprctl.md @@ -1,3 +1,8 @@ +--- +weight: 12 +title: 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. @@ -8,18 +13,15 @@ the terminal. If it's not, go to the repo root and `/hyprctl`. Issue a `make all` and then `sudo cp ./hyprctl /usr/bin`. -# Using Hyprctl +{{< callout type=warning >}} -{{< hint type=warning >}} +_hyprctl_ calls will be dispatched by the compositor _synchronously_, meaning +any spam of the utility will cause slowdowns. It's recommended to use `--batch` +for many control calls, and limiting the amount of info calls. -_hyprctl_ calls will be dispatched by the compositor _synchronously_, -meaning any spam of the utility will cause slowdowns. -It's recommended to use `--batch` for many control calls, and -limiting the amount of info calls. +For live event handling, see the [socket2](../../ipc/). -For live event handling, see the [socket2](../../IPC/). - -{{< /hint >}} +{{< /callout >}} ## Commands @@ -95,15 +97,17 @@ 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`. +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. +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.: + ```ini # will create a 1920x1080 headless display, for example to use with RDP. hyprctl output create headless @@ -117,6 +121,7 @@ hyprctl output remove HEADLESS-1 Sets the xkb layout index for a keyboard. For example, if you set: + ```ini device:my-epic-keyboard-v1 { kb_layout=us,pl,de @@ -128,9 +133,10 @@ You can use this command to switch between them. ```sh hyprctl switchxkblayout [DEVICE] [CMD] ``` -where `CMD` is either `next` for next, `prev` for previous, or `ID` -for a specific one (in the above case, `us`: 0, `pl`: 1, `de`: 2). -You can find the `DEVICE` using `hyprctl devices` command. + +where `CMD` is either `next` for next, `prev` for previous, or `ID` for a +specific one (in the above case, `us`: 0, `pl`: 1, `de`: 2). You can find the +`DEVICE` using `hyprctl devices` command. example command for a typical keyboard: @@ -138,9 +144,12 @@ example command for a typical keyboard: hyprctl switchxkblayout at-translated-set-2-keyboard next ``` -{{< hint >}} +{{< callout type=info >}} -If you want a single variant ie. pl/dvorak on one layout but us/qwerty on the other, xkb parameters can still be blank, however the amount of comma-separated parameters have to match. Alternatively, a single parameter can be specified for it to apply to all three. +If you want a single variant ie. pl/dvorak on one layout but us/qwerty on the +other, xkb parameters can still be blank, however the amount of comma-separated +parameters have to match. Alternatively, a single parameter can be specified for +it to apply to all three. ```ini input { @@ -150,7 +159,7 @@ input { } ``` -{{< /hint >}} +{{< /callout >}} ### seterror @@ -161,14 +170,16 @@ hyprctl seterror 'rgba(66ee66ff)' hello world this is my problem ``` or disable: + ```sh hyprctl seterror disable ``` ### setprop -Sets a window prop. Can be locked by adding `lock` at the end. If `lock` is not added, -will be unlocked. Locking means a dynamic windowrule _cannot_ override this setting. +Sets a window prop. Can be locked by adding `lock` at the end. If `lock` is not +added, will be unlocked. Locking means a dynamic windowrule _cannot_ override +this setting. Prop List: | prop | comment | @@ -212,6 +223,7 @@ hyprctl notify [ICON] [TIME_MS] [COLOR] [MESSAGE] ``` For example: + ```sh hyprctl notify -1 10000 "rgb(ff1ea3)" "Hello everyone!" ``` @@ -221,6 +233,7 @@ Icon of `-1` means "No icon" Color of `0` means "Default color for icon" Icon list: + ``` WARNING = 0 INFO = 1 @@ -270,8 +283,8 @@ instances - lists all running instances of hyprland with their info layouts - lists all layouts available (including plugin'd ones) ``` -For the getoption command, the option name should be written as `section:option`, -e.g.: +For the getoption command, the option name should be written as +`section:option`, e.g.: ```sh hyprctl getoption general:border_size @@ -280,7 +293,7 @@ hyprctl getoption general:border_size hyprctl getoption input:touchpad:disable_while_typing ``` -See [Variables](../Variables) for section and options you can use. +See [Variables](../variables) for section and options you can use. ## Batch diff --git a/pages/Configuring/Variables.md b/pages/Configuring/Variables.md index c1371de..6b27138 100644 --- a/pages/Configuring/Variables.md +++ b/pages/Configuring/Variables.md @@ -1,17 +1,21 @@ -For basic syntax info, see [Configuring Hyprland](../Configuring-Hyprland). +--- +weight: 2 +title: Variables +--- -This page documents all the "options" of Hyprland. For binds, monitors, animations, -etc. see the sidebar. For anything else, see [Keywords](../Keywords). +For basic syntax info, see [Configuring Hyprland](../configuring-hyprland). + +This page documents all the "options" of Hyprland. For binds, monitors, +animations, etc. see the sidebar. For anything else, see +[Keywords](../keywords). Please keep in mind some options that are layout-specific will be documented in the layout pages and not here. (See the Sidebar for Dwindle and Master layouts) -{{< toc >}} - -# Variable types +## Variable types | type | description | -|---|---| +| --- | --- | | int | integer | | bool | boolean, `true` or `false` (`yes` or `no`, `on` or `off`, `0` or `1`) - any numerical value that is not `0` or `1` will cause undefined behavior. | | float | floating point number | @@ -21,7 +25,7 @@ the layout pages and not here. (See the Sidebar for Dwindle and Master layouts) | str | a string | | gradient | a gradient, in the form of `color color ... [angle]` where `color` is a color (see above) and angle is an angle in degrees, in the format of `123deg` e.g. `45deg` (e.g. `rgba(11ee11ff) rgba(1111eeff) 45deg`) Angle is optional and will default to `0deg` | -{{< hint type=info >}} +{{< callout type=info >}} **_Colors:_** @@ -39,11 +43,11 @@ legacy, e.g. `0xeeb3ff1a` -> ARGB order SHIFT CAPS CTRL/CONTROL ALT MOD2 MOD3 SUPER/WIN/LOGO/MOD4 MOD5 ``` -{{< /hint >}} +{{< /callout >}} -# Sections +## Sections -## General +### General | name | description | type | default | |---|---|---|---| @@ -68,15 +72,17 @@ SHIFT CAPS CTRL/CONTROL ALT MOD2 MOD3 SUPER/WIN/LOGO/MOD4 MOD5 | allow_tearing | master switch for allowing tearing to occur. See [the Tearing page](../Tearing). | bool | false | | resize_corner | force floating windows to use a specific corner when being resized (1-4 going clockwise from top left, 0 to disable) | int | 0 | +{{< callout type=warning >}} -{{< hint type=warning >}} -Prefer using `input:sensitivity` over `general:sensitivity` to avoid bugs, especially with Wine/Proton apps. -{{< /hint >}} +Prefer using `input:sensitivity` over `general:sensitivity` to avoid bugs, +especially with Wine/Proton apps. -## Decoration +{{< /callout >}} + +### Decoration | name | description | type | default | -|---|---|---|---| +| --- | --- | --- | --- | | rounding | rounded corners' radius (in layout px) | int | 0 | | active_opacity | opacity of active windows. [0.0 - 1.0] | float | 1.0 | | inactive_opacity | opacity of inactive windows. [0.0 - 1.0] | float | 1.0 | @@ -95,11 +101,12 @@ Prefer using `input:sensitivity` over `general:sensitivity` to avoid bugs, espec | dim_around | how much the `dimaround` window rule should dim by. [0.0 - 1.0] | float | 0.4 | | screen_shader | a path to a custom shader to be applied at the end of rendering. See `examples/screenShader.frag` for an example. | str | \[\[Empty\]\] | -### Blur +#### Blur + _Subcategory `decoration:blur:`_ | name | description | type | default | -|---|---|---|---| +| --- | --- | --- | --- | | enabled | enable kawase window background blur | bool | true | | size | blur size (distance) | int | 8 | | passes | the amount of passes to perform | int | 1 | @@ -112,10 +119,11 @@ _Subcategory `decoration:blur:`_ | vibrancy | Increase saturation of blurred colors. [0.0 - 1.0] | float | 0.1696 | | vibrancy_darkness | How strong the effect of `vibrancy` is on dark areas . [0.0 - 1.0] | float | 0.0 | | special | whether to blur behind the special workspace (note: expensive) | bool | false | -| popups | whether to blur popups (e.g. right-click menus) | bool | false | -| popups_ignorealpha | works like ignorealpha in layer rules. If pixel opacity is below set value, will not blur. [0.0 - 1.0] | float | 0.2 | +| popups | whether to blur popups (e.g. right-click menus) | bool | false | +| popups_ignorealpha | works like ignorealpha in layer rules. If pixel opacity is below set value, will not blur. [0.0 - 1.0] | float | 0.2 | + +{{< callout type=important >}} -{{< hint type=important >}} A subcategory is a nested category: ```ini @@ -131,32 +139,33 @@ decoration { ``` Doing `decoration:blur {` is **invalid**! -{{< /hint >}} -{{< hint type=info >}} +{{< /callout >}} + +{{< callout type=info >}} `blur:size` and `blur:passes` have to be at least 1. -Increasing `blur:passes` is necessary to prevent blur looking wrong on higher `blur:size` values, -but remember that higher `blur:passes` will require more strain on the GPU. +Increasing `blur:passes` is necessary to prevent blur looking wrong on higher +`blur:size` values, but remember that higher `blur:passes` will require more +strain on the GPU. -{{< /hint >}} +{{< /callout >}} -## Animations +### Animations | name | description | type | default | -|---|---|---|---| +| --- | --- | --- | --- | | enabled | enable animations | bool | true | | first_launch_animation | enable first launch animation | bool | true | +{{< callout type=info >}} -{{< hint type=info >}} +_[More about Animations](../animations)._ -_[More about Animations](../Animations)._ +{{< /callout >}} -{{< /hint >}} - -## Input +### Input | name | description | type | default | |---|---|---|---| @@ -185,33 +194,40 @@ _[More about Animations](../Animations)._ | float_switch_override_focus | If 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. | int | 1 | | special_fallthrough | if enabled, having only floating windows in the special workspace will not block focusing windows in the regular workspace. | bool | false | -{{< hint type=info >}} -## XKB Settings +{{< callout type=info >}} -You can find a list of models, layouts, variants and options in [`/usr/share/X11/xkb/rules/base.lst`](file:///usr/share/X11/xkb/rules/base.lst). -Alternatively, you can use the `localectl` command to discover what is available on your system. +### XKB Settings -For switchable keyboard configurations, take a look at [the uncommon tips & tricks page entry](../Uncommon-tips--tricks/#switchable-keyboard-layouts). +You can find a list of models, layouts, variants and options in +[`/usr/share/X11/xkb/rules/base.lst`](file:///usr/share/X11/xkb/rules/base.lst). +Alternatively, you can use the `localectl` command to discover what is available +on your system. -{{< /hint >}} +For switchable keyboard configurations, take a look at +[the uncommon tips & tricks page entry](../uncommon-tips--tricks/#switchable-keyboard-layouts). -{{< hint type=info >}} -## Follow Mouse Cursor +{{< /callout >}} + +{{< callout type=info >}} + +### Follow Mouse Cursor - 0 - Cursor movement will not change focus. - 1 - Cursor movement will always change focus to the window under the cursor. -- 2 - Cursor focus will be detached from keyboard focus. Clicking on a window will move keyboard focus to that window. -- 3 - Cursor focus will be completely separate from keyboard focus. Clicking on a window will not change keyboard focus. +- 2 - Cursor focus will be detached from keyboard focus. Clicking on a window + will move keyboard focus to that window. +- 3 - Cursor focus will be completely separate from keyboard focus. Clicking on + a window will not change keyboard focus. -## Custom accel profiles +### Custom accel profiles -### `accel_profile` +#### `accel_profile` `custom ` for example `custom 200 0.0 0.5` -### `scroll_points` +#### `scroll_points` NOTE: Only works when `accel_profile` is set to `custom`. @@ -219,23 +235,24 @@ NOTE: Only works when `accel_profile` is set to `custom`. For example `0.2 0.0 0.5 1 1.2 1.5` -To mimic the Windows acceleration curves, take a look at [this script](https://gist.github.com/fufexan/de2099bc3086f3a6c83d61fc1fcc06c9). +To mimic the Windows acceleration curves, take a look at +[this script](https://gist.github.com/fufexan/de2099bc3086f3a6c83d61fc1fcc06c9). -See [the libinput doc](https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html) for more insights on -how it works. +See +[the libinput doc](https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html) +for more insights on how it works. -{{< /hint >}} +{{< /callout >}} - -### Touchpad +#### Touchpad _Subcategory `input:touchpad:`_ | name | description | type | default | -|---|---|---|---| +| --- | --- | --- | --- | | disable_while_typing | Disable the touchpad while typing. | bool | true | | natural_scroll | Inverts scrolling direction. When enabled, scrolling moves content directly instead of manipulating a scrollbar. | bool | false | -| scroll_factor | Multiplier applied to the amount of scroll movement. | float | 1.0 +| scroll_factor | Multiplier applied to the amount of scroll movement. | float | 1.0 | | middle_button_emulation | Sending 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-emulation](https://wayland.freedesktop.org/libinput/doc/latest/middle-button-emulation.html) | bool | false | | tap_button_map | Sets the tap button mapping for touchpad button emulation. Can be one of `lrm` (default) or `lmr` (Left, Middle, Right Buttons). [lrm/lmr] | str | \[\[Empty\]\] | | clickfinger_behavior | Button 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-behavior](https://wayland.freedesktop.org/libinput/doc/latest/clickpad-softbuttons.html#clickfinger-behavior) | bool | false | @@ -243,37 +260,36 @@ _Subcategory `input:touchpad:`_ | drag_lock | When enabled, lifting the finger off for a short time while dragging will not drop the dragged item. [libinput#tap-and-drag](https://wayland.freedesktop.org/libinput/doc/latest/tapping.html#tap-and-drag) | bool | false | | tap-and-drag | Sets the tap and drag mode for the touchpad | bool | false | -### Touchdevice +#### Touchdevice _Subcategory `input:touchdevice:`_ | name | description | type | default | -|---|---|---|---| -| transform | transform the input from touchdevices. The possible transformations are the same as [those of the monitors](../Monitors/#rotating) | int | 0 | +| --- | --- | --- | --- | +| transform | transform the input from touchdevices. The possible transformations are the same as [those of the monitors](../monitors/#rotating) | int | 0 | | output | the monitor to bind touch devices. The default is autodetection. To stop autotection use an empty string or the "\[\[Empty\]\]" value. | string | \[\[Auto\]\] | | enabled | Whether input is enabled for touch devices. | bool | true | - -### Tablet +#### Tablet _Subcategory `input:tablet:`_ | name | description | type | default | -|---|---|---|---| -| transform | transform the input from tablets. The possible transformations are the same as [those of the monitors](../Monitors/#rotating) | int | 0 | +| --- | --- | --- | --- | +| transform | transform the input from tablets. The possible transformations are the same as [those of the monitors](../monitors/#rotating) | int | 0 | | output | the monitor to bind tablets. Empty means unbound. | string | \[\[Empty\]\] | | region_position | position of the mapped region in monitor layout. | vec2 | [0, 0] | | region_size | size of the mapped region. When this variable is set, tablet input will be mapped to the region. [0, 0] or invalid size means unset. | vec2 | [0, 0] | | relative_input | whether the input should be relative | bool | false | -## Per-device input config +### Per-device input config -Described [here](../Keywords#per-device-input-configs). +Described [here](../keywords#per-device-input-configs). -## Gestures +### Gestures | name | description | type | default | -|---|---|---|---| +| --- | --- | --- | --- | | workspace_swipe | enable workspace swipe gesture | bool | false | | workspace_swipe_fingers | how many fingers for the gesture | int | 3 | | workspace_swipe_distance | in px, the distance of the gesture | int | 300 | @@ -287,9 +303,10 @@ Described [here](../Keywords#per-device-input-configs). | workspace_swipe_numbered | if enabled, swiping will swipe on consecutive numbered workspaces. | bool | false | | workspace_swipe_use_r | if enabled, swiping will use the `r` prefix instead of the `m` prefix for finding workspaces. (requires disabled `workspace_swipe_numbered`) | bool | false | -## Group +### Group + | name | description | type | default | -|---|---|---|---| +| --- | --- | --- | --- | | insert_after_current | whether new windows in a group spawn after current or at group tail | bool | true | | focus_removed_window | whether Hyprland should focus on the window that has just been moved out of the group | bool | true | | col.border_active | active group border color | gradient | 0x66ffff00 | @@ -297,11 +314,12 @@ Described [here](../Keywords#per-device-input-configs). | col.border_locked_active | active locked group border color | gradient | 0x66ff5500 | | col.border_locked_inactive | inactive locked group border color | gradient | 0x66775500 | -### Groupbar +#### Groupbar + _Subcategory `group:groupbar:`_ | name | description | type | default | -|---|---|---|---| +| --- | --- | --- | --- | | enabled | enables groupbars | bool | true | | font_family | font used to display groupbar titles | string | Sans | | font_size | font size for the above | int | 8 | @@ -316,7 +334,7 @@ _Subcategory `group:groupbar:`_ | col.locked_active | active locked group border color | gradient | 0x66ff5500 | | col.locked_inactive | inactive locked group border color | gradient | 0x66775500 | -## Misc +### Misc | name | description | type | default | |---|---|---|---| @@ -352,43 +370,43 @@ _Subcategory `group:groupbar:`_ | new_window_takes_over_fullscreen | if 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 window [0/1/2] | int | 0 | | enable_hyprcursor | whether to enable hyprcursor support | bool | true | -## Binds +### Binds | name | description | type | default | -|---|---|---|---| +| --- | --- | --- | --- | | 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 i3's *auto_back_and_forth*. | bool | false | +| workspace_back_and_forth | If enabled, an attempt to switch to the currently focused workspace will instead switch to the previous workspace. Akin to i3's _auto_back_and_forth_. | bool | false | | allow_workspace_cycles | If enabled, workspaces don't 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. | bool | true | -## XWayland +### XWayland | name | description | type | default | -|---|---|---|---| +| --- | --- | --- | --- | | use_nearest_neighbor | uses the nearest neigbor filtering for xwayland apps, making them pixelated rather than blurry | bool | true | | force_zero_scaling | forces a scale of 1 on xwayland windows on scaled displays. | bool | false | -## OpenGL +### OpenGL | name | description | type | default | -|---|---|---|---| +| --- | --- | --- | --- | | nvidia_anti_flicker | reduces flickering on nvidia at the cost of possible frame drops on lower-end GPUs. On non-nvidia, this is ignored. | bool | true | -| force_introspection | forces introspection at all times. Introspection is aimed at reducing GPU usage in certain cases, but might cause graphical glitches on nvidia. 0 - nothing, 1 - force always on, 2 - force always on if nvidia | int | 2 | +| force_introspection | forces introspection at all times. Introspection is aimed at reducing GPU usage in certain cases, but might cause graphical glitches on nvidia. 0 - nothing, 1 - force always on, 2 - force always on if nvidia | int | 2 | -## Debug +### Debug -{{< hint type=warning >}} +{{< callout type=warning >}} Only for developers. -{{< /hint >}} +{{< /callout >}} | name | description | type | default | -|---|---|---|---| +| --- | --- | --- | --- | | overlay | print the debug performance overlay. Disable VFR for accurate results. | bool | false | | damage_blink | (epilepsy warning!) flash areas updated with damage tracking | bool | false | | disable_logs | disable logging to a file | bool | true | @@ -396,11 +414,11 @@ Only for developers. | damage_tracking | redraw only the needed bits of the display. Do **not** change. (default: full - 2) monitor - 1, none - 0 | int | 2 | | enable_stdout_logs | enables logging to stdout | bool | false | | manual_crash | set to 1 and then back to 0 to crash Hyprland. | int | 0 | -| suppress_errors| if true, do not display config file parsing errors. | bool | false | +| suppress_errors | if true, do not display config file parsing errors. | bool | false | | watchdog_timeout | sets the timeout in seconds for watchdog to abort processing of a signal of the main thread. Set to 0 to disable. | int | 5 | -| disable_scale_checks | disables verifying of the scale factors. Will result in pixel alignment and rounding errors. | bool | false | +| disable_scale_checks | disables verifying of the scale factors. Will result in pixel alignment and rounding errors. | bool | false | -## More +### More There are more config options described in other pages, which are layout- or circumstance-specific. See the sidebar for more pages. diff --git a/pages/Configuring/Window-Rules.md b/pages/Configuring/Window-Rules.md index 45cb723..30054e6 100644 --- a/pages/Configuring/Window-Rules.md +++ b/pages/Configuring/Window-Rules.md @@ -1,25 +1,29 @@ -# Table of contents +--- +weight: 7 +title: Window Rules +--- -{{< toc >}} +{{< callout type=warning >}} -# Disclaimers +Window rules (both V1 and V2) are **case sensitive**. (e.g. `firefox` ≠ +`Firefox`) -{{< hint type=warning >}} -Window rules (both V1 and V2) are **case sensitive**. (e.g. `firefox` ≠ `Firefox`) -{{< /hint >}} +{{< /callout >}} -# Window Rules V1 +## Window Rules V1 -You can set window rules to achieve different behaviors from the active container. +You can set window rules to achieve different behaviors from the active +container. -## Syntax +### Syntax ```ini windowrule=RULE,WINDOW ``` - `RULE` is a [rule](#rules) (and a param if applicable) -- `WINDOW` is a [RegEx](https://en.wikipedia.org/wiki/Regular_expression), either: +- `WINDOW` is a [RegEx](https://en.wikipedia.org/wiki/Regular_expression), + either: - plain RegEx (for matching a window class); - `title:` followed by a regex (for matching a window's title) @@ -30,10 +34,10 @@ windowrule=float,^(kitty)$ windowrule=move 0 0,title:^(Firefox)(.*)$ ``` -# Window Rules V2 +## Window Rules V2 -In order to allow more flexible rules, while retaining compatibility with the above -rule system, window rules V2 were implemented. +In order to allow more flexible rules, while retaining compatibility with the +above rule system, window rules V2 were implemented. In V2, you are allowed to match multiple variables. @@ -44,17 +48,22 @@ for multiple values like so: windowrulev2 = float,class:(kitty),title:(kitty) ``` -{{< hint type=tip >}} -In the case of dynamic window titles such as browser windows keep in mind how powerful regex is. +{{< callout type=info >}} -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. +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. -{{< /hint >}} +for the `windowrulev2 = float,class:(kitty),title:(kitty)` example, the +`class:(kitty)` `WINDOW` field is what keeps the window rule specific to kitty +terminals. + +{{< /callout >}} For now, the supported fields are: @@ -69,17 +78,17 @@ fullscreen - 0/1 pinned - 0/1 focus - 0/1 workspace - id or name: and name -onworkspace (how many windows are on the workspace) - int +onworkspace (how many windows are on the workspace) - int ``` Keep in mind that you _have_ to declare at least one field, but not all. -{{< hint type=tip >}} +{{< callout type=info >}} -To get more information about a window's class, title, XWayland status or its size, -you can use `hyprctl clients`. +To get more information about a window's class, title, XWayland status or its +size, you can use `hyprctl clients`. -{{< /hint >}} +{{< /callout >}} ## Rules @@ -99,7 +108,7 @@ Static rules are evaluated once at window open and never again. | center (\[opt\]) | if the window is floating, will center it on the monitor. Set opt as 1 to respect monitor reserved area | | pseudo | pseudotiles 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 [dispatchers->workspaces](../Dispatchers#workspaces)). 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. | +| workspace \[w\] | sets the workspace on which a window should open (for workspace syntax, see [dispatchers->workspaces](../dispatchers#workspaces)). 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. | | nofocus | disables focus to the window | | noinitialfocus | disables the initial focus to the window | | forceinput | forces 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) | @@ -132,31 +141,38 @@ Dynamic rules are re-evaluated every time a property changes. | noshadow | disables shadows for the window | | noanim | disables the animations for the window | | keepaspectratio | forces aspect ratio when resizing window with the mouse | -| bordercolor \[c\] | force the bordercolor of the window. Options for c: `color`/`color ... color angle` -> sets the active border color/gradient OR `color color`/`color ... color angle color ... color [angle]` -> sets the active and inactive border color/gradient of the window. See [variables->colors](../Variables#variable_types) for color definition. | +| bordercolor \[c\] | force the bordercolor of the window. Options for c: `color`/`color ... color angle` -> sets the active border color/gradient OR `color color`/`color ... color angle color ... color [angle]` -> sets the active and inactive border color/gradient of the window. See [variables->colors](../variables#variable_types) for color definition. | | idleinhibit \[mode\] | sets an idle inhibit rule for the window. If active, apps like `hypridle` will not fire. Modes: `none`, `always`, `focus`, `fullscreen` | | dimaround | dims everything around the window . Please note this rule is meant for floating windows and using it on tiled ones may result in strange behavior. | | xray \[on\] | sets blur xray mode for the window (0 for off, 1 for on, unset for default) | -| immediate | forces the window to allow to be torn. See [the Tearing page](../Tearing). | +| immediate | forces the window to allow to be torn. See [the Tearing page](../tearing). | | nearestneighbor | forces the window to use the nearest neigbor filtering. | -{{< hint type=info >}} +{{< callout type=info >}} ## `group` window rule options - `set` \[`always`\] - Open window as a group. - `new` - Shorthand of `barred set`. -- `lock` \[`always`\] - Lock the group that added this window. Use with `set` or `new` (i.e. `new lock`) to create a new locked group. -- `barred` - Do not add the window to the focused group. By default, a window with a `group set` rule will be added to an active group if possible. -- `deny` - Do not allow window to be toggled as or added to group (see `denywindowfromgroup` dispatcher). +- `lock` \[`always`\] - Lock the group that added this window. Use with `set` or + `new` (i.e. `new lock`) to create a new locked group. +- `barred` - Do not add the window to the focused group. By default, a window + with a `group set` rule will be added to an active group if possible. +- `deny` - Do not allow window to be toggled as or added to group (see + `denywindowfromgroup` dispatcher). - `invade` - Force open window in the locked group. -- `override` \[other options\] - Override other `group` rules, e.g. You can make all windows in a particular workspace open as a group, and use `group override barred` to make windows with specific titles open as normal windows. +- `override` \[other options\] - Override other `group` rules, e.g. You can make + all windows in a particular workspace open as a group, and use + `group override barred` to make windows with specific titles open as normal + windows. - `unset` - Clear all `group` rules. The `group` rule without options is a shorthand for `group set`. -By default, `set` and `lock` only affect new windows once. The `always` qualifier makes them always effective. +By default, `set` and `lock` only affect new windows once. The `always` +qualifier makes them always effective. -{{< /hint >}} +{{< /callout >}} ### Example Rules @@ -174,39 +190,45 @@ windowrulev2 = stayfocused, class:^(pinentry-) # fix pinentry losing focus ### Notes -Rules that are marked as _Dynamic_ will be reevaluated if the matching property of the window changes. For instance, if a rule is defined that changes the bordercolor of a window when it is floating, then the bordercolor will change to the requested color when it is set to floating, and revert to the default color when it is tiled again. +Rules that are marked as _Dynamic_ will be reevaluated if the matching property +of the window changes. For instance, if a rule is defined that changes the +bordercolor of a window when it is floating, then the bordercolor will change to +the requested color when it is set to floating, and revert to the default color +when it is tiled again. -Rules will be processed from top to bottom, where the _last_ match will take precedence. -i.e. +Rules will be processed from top to bottom, where the _last_ match will take +precedence. i.e. ```ini windowrulev2 = opacity 0.8 0.8,class:^(kitty)$ windowrulev2 = opacity 0.5 0.5,floating:1 ``` --> all kitty windows will have opacity 0.8, except if they are floating. Then they will have opacity 0.5. --> all floating windows will have opacity 0.5. +-> all kitty windows will have opacity 0.8, except if they are floating. Then +they will have opacity 0.5. -> all floating windows will have opacity 0.5. ```ini windowrulev2 = opacity 0.5 0.5,floating:1 windowrulev2 = opacity 0.8 0.8,class:^(kitty)$ ``` --> all kitty windows will have opacity 0.8, also if they are floating. --> all other floating windows will have opacity 0.5. +-> all kitty windows will have opacity 0.8, also if they are floating. -> all +other floating windows will have opacity 0.5. +{{< callout type=info >}} -{{< hint type=tip >}} - -Opacity is _always_ a PRODUCT of all opacities. E.g. `active_opacity` to -0.5 and windowrule opacity to 0.5 will result in a total opacity 0.25. You are -allowed to set opacities over 1, but any opacity product over 1 will cause -graphical glitches. E.g. `0.5 * 2 = 1`, and it will be fine, `0.5 * 4` will cause +Opacity is _always_ a PRODUCT of all opacities. E.g. `active_opacity` to 0.5 and +windowrule opacity to 0.5 will result in a total opacity 0.25. You are allowed +to set opacities over 1, but any opacity product over 1 will cause graphical +glitches. E.g. `0.5 * 2 = 1`, and it will be fine, `0.5 * 4` will cause graphical glitches. -{{< /hint >}} -# Layer Rules -Some things in wayland are not windows, but layers. That includes for example most launchers, your status bar or wallpaper. +{{< /callout >}} + +## Layer Rules + +Some things in wayland are not windows, but layers. That includes for example +most launchers, your status bar or wallpaper. Those have specific rules separate from windows: @@ -215,10 +237,11 @@ layerrule = rule, namespace # or layerrule = rule, address ``` -where `rule` is the rule and `namespace` is the namespace regex (find namespaces in `hyprctl layers`) -or `address` is an address in the form of `address:0x[hex]` -## Rules +where `rule` is the rule and `namespace` is the namespace regex (find namespaces +in `hyprctl layers`) or `address` is an address in the form of `address:0x[hex]` + +### Rules | rule | description | | --- | --- | diff --git a/pages/Configuring/Workspace-Rules.md b/pages/Configuring/Workspace-Rules.md index a3e81df..9a08e3e 100644 --- a/pages/Configuring/Workspace-Rules.md +++ b/pages/Configuring/Workspace-Rules.md @@ -1,43 +1,54 @@ -# Table of contents +--- +weight: 8 +title: Workspace Rules +--- -{{< toc >}} +## Workspace Rules -# Workspace Rules -You can set workspace rules to achieve workspace-specific behaviors. For instance, you can define a workspace where all windows are drawn without borders or gaps. +You can set workspace rules to achieve workspace-specific behaviors. For +instance, you can define a workspace where all windows are drawn without borders +or gaps. -For layout-specific rules, see the specific layout page. For example: [Master Layout->Workspace Rules](../Master-Layout#workspace-rules) +For layout-specific rules, see the specific layout page. For example: +[Master Layout->Workspace Rules](../master-layout#workspace-rules) + +### Syntax -## Syntax ```ini workspace=WORKSPACE,RULES ``` -- WORKSPACE is a valid workspace identifier (see [Dispatchers->Workspaces](../Dispatchers#workspaces)). This field is mandatory; +- WORKSPACE is a valid workspace identifier (see + [Dispatchers->Workspaces](../dispatchers#workspaces)). This field is + mandatory; - RULES is one (or more) rule(s) as described here in [rules](#rules). ### Examples + ```ini workspace=name:myworkspace,gapsin:0,gapsout:0 workspace=3,rounding:false,bordersize:0 ``` ## Rules + | Rule | Description | type | -| ---- | ----------- | ---- | -| monitor:[m] | Binds a workspace to a monitor See [syntax](#syntax) and [Monitors](../Monitors).| string | +| --- | --- | --- | +| monitor:[m] | Binds a workspace to a monitor See [syntax](#syntax) and [Monitors](../monitors). | string | | default:[b] | Whether this workspace should be the default workspace for the given monitor | bool | -| gapsin:[x] | Set the gaps between windows (equivalent to [General->gaps_in](../Variables#general) except for not using commas as delimiter (spaces instead)) | int | -| gapsout:[x] | Set the gaps between windows and monitor edges (equivalent to [General->gaps_out](../Variables#general) except for not using commas as delimiter (spaces instead)) | int | -| bordersize:[x] | Set the border size around windows (equivalent to [General->border_size](../Variables#general)) | int | -| border:[b]| Whether to draw borders or not| bool | -| shadow:[b]| Whether to draw shadows or not| bool | +| gapsin:[x] | Set the gaps between windows (equivalent to [General->gaps_in](../variables#general)) | int | +| gapsout:[x] | Set the gaps between windows and monitor edges (equivalent to [General->gaps_out](../variables#general)) | int | +| bordersize:[x] | Set the border size around windows (equivalent to [General->border_size](../variables#general)) | int | +| border:[b] | Whether to draw borders or not | bool | +| shadow:[b] | Whether to draw shadows or not | bool | | rounding:[b] | Whether to draw rounded windows or not | bool | | decorate:[b] | Whether to draw window decorations or not | bool | | persistent:[b] | Keep this workspace alive even if empty and inactive | bool | -| on-created-empty:[c] | A command to be executed once a workspace is created empty (i.e. not created by moving a window to it). See the [command syntax](../Dispatchers#executing-with-rules) | string | +| on-created-empty:[c] | A command to be executed once a workspace is created empty (i.e. not created by moving a window to it). See the [command syntax](../dispatchers#executing-with-rules) | string | | defaultName:[s] | A default name for the workspace. | string | ### Example Rules + ```ini workspace = 3, rounding:false, decorate:false workspace = name:coding, rounding:false, decorate:false, gapsin:0, gapsout:0, border:false, decorate:false, monitor:DP-1 diff --git a/pages/Configuring/XWayland.md b/pages/Configuring/XWayland.md index e81cee4..37ae258 100644 --- a/pages/Configuring/XWayland.md +++ b/pages/Configuring/XWayland.md @@ -1,3 +1,8 @@ +--- +weight: 14 +title: XWayland +--- + XWayland is the bridging mechanism between legacy Xorg programs and Wayland compositors. @@ -6,8 +11,9 @@ compositors. XWayland currently looks pixelated on HiDPI screens, due to Xorg's inability to scale. -This problem is mitigated by the [`xwayland:force_zero_scaling`](../../Configuring/Variables/#xwayland) -option, which forces XWayland windows not to be scaled. +This problem is mitigated by the +[`xwayland:force_zero_scaling`](../../configuring/variables/#xwayland) option, +which forces XWayland windows not to be scaled. This will get rid of the pixelated look, but will not scale applications properly. To do this, each toolkit has its own mechanism. @@ -28,6 +34,8 @@ env = XCURSOR_SIZE,32 The GDK_SCALE variable won't conflict with Wayland-native GTK programs. -{{< hint type="important" >}} +{{< callout >}} + XWayland HiDPI patches are no longer supported. Do not use them. -{{}} + +{{}} diff --git a/pages/Configuring/_index.md b/pages/Configuring/_index.md new file mode 100644 index 0000000..6750924 --- /dev/null +++ b/pages/Configuring/_index.md @@ -0,0 +1,6 @@ +--- +weight: 3 +title: Configuring +sidebar: + open: true +--- diff --git a/pages/Contributing and Debugging/PR-Guidelines.md b/pages/Contributing and Debugging/PR-Guidelines.md index 82f5a19..c02bb44 100644 --- a/pages/Contributing and Debugging/PR-Guidelines.md +++ b/pages/Contributing and Debugging/PR-Guidelines.md @@ -1,23 +1,29 @@ -# PR Requirements +--- +title: PR Guidelines +--- + +## PR Requirements - Clean, not hacky code - Described changes and _why_ they were there - Following the style (see below) -## Code Style +### Code Style Hyprland's code style is governed by the `.clang-format` file. Make sure to format accordingly whenever you make a PR. -## Some code FAQ +### Some code FAQ > Why is the config variable getting so weird? -Every variable from the config needs to be found in a hashmap. To limit the amount of hashmap searches, getting a config option looks like this: +Every variable from the config needs to be found in a hashmap. To limit the +amount of hashmap searches, getting a config option looks like this: ```cpp static auto* const PFOLLOWMOUSE = &g_pConfigManager->getConfigValuePtr("input:follow_mouse")->intValue; ``` -Since the hashmap _cannot_ be mutated during runtime, this pointer will always be valid, and will not require hashmap lookups every single time it's read. +Since the hashmap _cannot_ be mutated during runtime, this pointer will always +be valid, and will not require hashmap lookups every single time it's read. diff --git a/pages/Contributing and Debugging/_index.md b/pages/Contributing and Debugging/_index.md index e9080bc..245ffe7 100644 --- a/pages/Contributing and Debugging/_index.md +++ b/pages/Contributing and Debugging/_index.md @@ -1,6 +1,11 @@ +--- +weight: 12 +title: Contributing and Debugging +--- + # Contributing guidelines -PR, code styling and code FAQs are [here](./PR-Guidelines) +PR, code styling and code FAQs are [here](./pr-guidelines) For issues, please see [the guidelines](https://github.com/hyprwm/Hyprland/blob/main/docs/ISSUE_GUIDELINES.md) @@ -23,7 +28,8 @@ _Arch_: Install the VSCode C/C++ and CMake Tools extensions and use that. -I've attached a [example/launch.json](https://github.com/hyprwm/Hyprland/blob/main/example/launch.json) +I've attached a +[example/launch.json](https://github.com/hyprwm/Hyprland/blob/main/example/launch.json) that you can copy to your .vscode/ folder in the repo root. With that, you can build in debug, go to the debugging tab and hit @@ -79,7 +85,8 @@ for live logs. (replace `hyprland` with `hyprlandd` for debug builds) ### How do I get a coredump? -See [`ISSUE_GUIDELINES.md`](https://github.com/hyprwm/Hyprland/blob/main/docs/ISSUE_GUIDELINES.md). +See +[`ISSUE_GUIDELINES.md`](https://github.com/hyprwm/Hyprland/blob/main/docs/ISSUE_GUIDELINES.md). ## Nesting Hyprland @@ -89,7 +96,9 @@ Hyprland can run nested in a window. For that, make sure you did the following: - removed ALL `exec=` and `exec-once=` keywords from your debug config (`hyprlandd.conf`) - set a resolution for `WL-1` and are not using `preferred` -- made sure no keybinds overlap (use a different mod for your keybinds altogether) +- made sure no keybinds overlap (use a different mod for your keybinds + altogether) -Once you launch, the display might be cropped. This can be fixed by setting the resolution for `WL-1` to -the exact dimensions of the window as reported by `hyprctl clients`. +Once you launch, the display might be cropped. This can be fixed by setting the +resolution for `WL-1` to the exact dimensions of the window as reported by +`hyprctl clients`. diff --git a/pages/Crashes and Bugs/_index.md b/pages/Crashes and Bugs/_index.md index fa56669..d80b620 100644 --- a/pages/Crashes and Bugs/_index.md +++ b/pages/Crashes and Bugs/_index.md @@ -1,4 +1,9 @@ -# Getting the log +--- +weight: 10 +title: Crashes and Bugs +--- + +## Getting the log If you are in a TTY, and the hyprland session that crashed was the last one you launched, the log will be printed with @@ -15,15 +20,18 @@ if you are in a Hyprland session, and you want the log of the last session, use cat /tmp/hypr/$(ls -t /tmp/hypr/ | head -n 2 | tail -n 1)/hyprland.log ``` -# Obtaining the Hyprland Crash Report +## Obtaining the Hyprland Crash Report -If you have `$XDG_CACHE_HOME` set, the crash report directory is `$XDG_CACHE_HOME/hyprland`. If not, it's `$HOME/.cache/hyprland`. +If you have `$XDG_CACHE_HOME` set, the crash report directory is +`$XDG_CACHE_HOME/hyprland`. If not, it's `$HOME/.cache/hyprland`. -Go to the crash report directory and you should find a file named `hyprlandCrashReport[XXXX].txt` where `[XXXX]` is the PID of the process that crashed. +Go to the crash report directory and you should find a file named +`hyprlandCrashReport[XXXX].txt` where `[XXXX]` is the PID of the process that +crashed. Attach that file to your issue. -# Crashes at launch +## Crashes at launch Diagnose the issue by what is in the log: @@ -39,18 +47,18 @@ Diagnose the issue by what is in the log: in the first point. - failing on `Hyprland` -> report an issue. -# Crashes not at launch +## Crashes not at launch Report an issue on GitHub or on the Discord server. -# Bugs +## Bugs -First of all, **_READ THE [FAQ PAGE](../FAQ)_** +First of all, **_READ THE [FAQ PAGE](../faq)_** If your bug is not listed there, you can ask on the Discord server or open an issue on GitHub. -# Building the Wayland stack with ASan +## Building the Wayland stack with ASan If requested, this is the deepest level of memory issue debugging possible. @@ -58,16 +66,11 @@ _Do this in the tty, with no Hyprland instances running_ Clone hyprland: `git clone --recursive https://github.com/hyprwm/Hyprland` -cd to it: `cd Hyprland` - `make asan` -This will compile everything and launch Hyprland. - Reproduce your crash. Hyprland will exit back to the tty. -You can now launch your regular Hyprland session. +Now, in either `cwd`, `~` or `./build`, search for file(s) named +`asan.log.XXXXX` where XXXXX is a number. -Now, in either `cwd`, `~` or `./build`, search for file(s) named `asan.log.XXXXX` where XXXXX is a number. - -Zip all of them up and attach to your issue. \ No newline at end of file +Zip all of them up and attach to your issue. diff --git a/pages/FAQ/_index.md b/pages/FAQ/_index.md index 17944eb..3ab9d6f 100644 --- a/pages/FAQ/_index.md +++ b/pages/FAQ/_index.md @@ -1,60 +1,66 @@ -# Table of Contents +--- +weight: 11 +title: FAQ +--- -{{< toc format=html >}} +### My apps are pixelated -# My apps are pixelated +This just means they are running through XWayland, which physically cannot scale +by fractional amounts. -This just means they are running through XWayland, which physically cannot scale by fractional amounts. +To force them to run in wayland-native mode, see +[the Master Tutorial](../../getting-started/master-tutorial/#force-apps-to-use-wayland). -To force them to run in wayland-native mode, see [the Master Tutorial](../../Getting-Started/Master-Tutorial/#force-apps-to-use-wayland). +If they can't, see [the XWayland page](../../configuring/xwayland). -If they can't, see [the XWayland page](../../Configuring/XWayland). - -# Nothing renders / screen is empty / crash on opening first app +### Nothing renders / screen is empty / crash on opening first app Possible causes: > Your themes are not set up properly, making apps crash. -Use something like `qt6ct` (Qt) and `nwg-look` (GTK) (\*for GTK you can also -set up themes with envvars) to set up your themes. +Use something like `qt6ct` (Qt) and `nwg-look` (GTK) (\*for GTK you can also set +up themes with envvars) to set up your themes. > Your PC is very, _very_ old. -In that case, see the -[Installation Page](../../Getting-Started/Installation) and -try compiling with LEGACY_RENDERER +In that case, see the [Installation Page](../../getting-started/installation) +and try compiling with LEGACY_RENDERER _For more info about bugs and crashes, see this_ -_[wiki page](../../Crashes-and-Bugs)_ +_[wiki page](../../crashes-and-bugs)_ -# Me cursor no render? +### Me cursor no render? Are you on NVIDIA? If so, then you have been a naughty boy and haven't listened to my tips on other pages. Use the `WLR_NO_HARDWARE_CURSORS=1` environment variable. -# My external monitor is blank / doesn't render / receives no signal (laptop) +### My external monitor is blank / doesn't render / receives no signal (laptop) -For Nvidia graphics - This issue appears to be resolved when using Nvidia Drivers 525.60.11 or later, but it may persist with older drivers. +For Nvidia graphics - This issue appears to be resolved when using Nvidia +Drivers 525.60.11 or later, but it may persist with older drivers. Outside those, there is a way to fix it that _might_ work for you though: **Option 1:** Use _only_ the external monitor -By using `WLR_DRM_DEVICES=/dev/dri/card1` (or `card0`) you can force Hyprland to use only your dGPU, -meaning your laptop's screen will be gone but your external one will work. +By using `WLR_DRM_DEVICES=/dev/dri/card1` (or `card0`) you can force Hyprland to +use only your dGPU, meaning your laptop's screen will be gone but your external +one will work. **Option 2:** Use all outputs, at the cost of battery life. -By switching your laptop to only use the dGPU in the BIOS, you _might_ be able to get everything to work, -at the cost of high battery usage. +By switching your laptop to only use the dGPU in the BIOS, you _might_ be able +to get everything to work, at the cost of high battery usage. -_Please note these are highly model-specific and might or might not work. If they don't, you're unfortunately out of luck._ +_Please note these are highly model-specific and might or might not work. If +they don't, you're unfortunately out of luck._ -You might try a USB-C to HDMI adapter though, maybe that could route the external monitor through the iGPU. +You might try a USB-C to HDMI adapter though, maybe that could route the +external monitor through the iGPU. -# How do I screenshot? +### How do I screenshot? Install `grim` and `slurp` @@ -62,42 +68,47 @@ Use a keybind (or execute) `grim -g "$(slurp)"`, select a region. A screenshot will pop into your `~/Pictures/` (You can configure grim and slurp, see their GitHub pages). -If you want those screenshots to go directly to your clipboard, consider using `wl-copy`, from [`wl-clipboard`](https://github.com/bugaevc/wl-clipboard). Here's an example binding: -`bind = , Print, exec, grim -g "$(slurp -d)" - | wl-copy` -For a more complete utility, try our own screenshotting utility: +If you want those screenshots to go directly to your clipboard, consider using +`wl-copy`, from [`wl-clipboard`](https://github.com/bugaevc/wl-clipboard). +Here's an example binding: +`bind = , Print, exec, grim -g "$(slurp -d)" - | wl-copy` For a more complete +utility, try our own screenshotting utility: [Grimblast](https://github.com/hyprwm/contrib). -For recording videos, [wf-recorder](https://github.com/ammen99/wf-recorder), [wl-screenrec](https://github.com/russelltg/wl-screenrec) or [OBS Studio](https://obsproject.com/) could be used. +For recording videos, [wf-recorder](https://github.com/ammen99/wf-recorder), +[wl-screenrec](https://github.com/russelltg/wl-screenrec) or +[OBS Studio](https://obsproject.com/) could be used. -# Screenshare / OBS no worky +### Screenshare / OBS no worky -Check [Screensharing](../Useful-Utilities/Screen-Sharing). +Check [Screensharing](../useful-utilities/screen-sharing). Also install `qt6-wayland` if you plan to use obs. -# How do I change my wallpaper? +### How do I change my wallpaper? -See [Wallpapers](../Useful-Utilities/Wallpapers). +See [Wallpapers](../useful-utilities/wallpapers). -# How heavy is this? +### How heavy is this? Not that much heavier than Xorg. If you want maximum performance, consider turning off the blur and animations. -# My monitor no worky +### My monitor no worky Try changing the mode in your config. If your preferred one doesn't work, try a lower one. A good way to list all modes is to get `wlr-randr` and do a `wlr-randr --dryrun` -# My monitor has flickering brightness when I turn on VRR +### My monitor has flickering brightness when I turn on VRR Change the VRR option to `2` (fullscreen), so that it is only used in games. This happens because the brightness on some monitors can depends on the refresh -rate, and rapidly changing refresh rates (for example, when the screen momentarily -updates after pressing a key) will cause rapid changes in brightness. +rate, and rapidly changing refresh rates (for example, when the screen +momentarily updates after pressing a key) will cause rapid changes in +brightness. -# How do I update? +### How do I update? Open a terminal where you cloned the repo. @@ -106,33 +117,47 @@ git pull make all && sudo make install ``` -If you are using the AUR (hyprland-git) package, you -will need to cleanbuild to update the package. Paru -has been problematic with updating before, use Yay. +If you are using the AUR (hyprland-git) package, you will need to cleanbuild to +update the package. Paru has been problematic with updating before, use Yay. -# How do I screen lock? +### How do I screen lock? Use a wayland-compatible locking utility using WLR protocols, e.g. `swaylock`. -# How do I change me mouse cursor? +### How do I change me mouse cursor? See [hyprcursor](../Hypr-Ecosystem/hyprcursor) +||||||| parent of 0fcc6e5 (treewide: replace hint with callout) +1. Set the GTK cursor using [nwg-look](https://github.com/nwg-piotr/nwg-look). +2. Add `exec-once=hyprctl setcursor [THEME] [SIZE]` to your config and restart Hyprland. -# GTK Settings no work / whatever +If using flatpak, run `flatpak override --env=~/.themes:ro --env=~/.icons:ro --user` and put your themes in both `/usr/share/themes` and `~/.themes`, and put your icons and cursors in both `/usr/share/icons` and `~/.icons`. + +For Qt applications, Hyprland exports XCURSOR_SIZE as 24, which is the default. +You can overwrite this by exporting XCURSOR_SIZE to a different value with `env`. + +You can also try running `gsettings set org.gnome.desktop.interface cursor-theme 'theme-name'` or adding it after `exec-once=` in your config. + +If you do not want to install a GTK settings editor, change the config files according to the +[XDG specification (Arch Wiki link)](https://wiki.archlinux.org/title/Cursor_themes#Configuration). +Make sure to also edit `~/.config/gtk-4.0/settings.ini` and `~/.gtkrc-2.0` if _not_ using a tool +(like `nwg-look`). + +### GTK Settings no work / whatever [https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland](https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland) -# My \[program name\] is freezing +### My \[program name\] is freezing Make sure you have a notification daemon running, for example `dunst`. Autostart it with the `exec-once` keyword. -# Waybar workspaces no worky??? +### Waybar workspaces no worky??? Waybar has a set of caveats or settings that you need to be aware of. See -[Status bars](../Useful-Utilities/Status-Bars) for solutions. +[Status bars](../useful-utilities/status-bars) for solutions. -# How do I autostart my favorite apps? +### How do I autostart my favorite apps? Using the window rules to assign apps to workspace you can open a bunch of applications on various workspaces. The following method will start these apps @@ -147,7 +172,7 @@ exec-once=[workspace 3 silent] mailspring exec-once=[workspace 4 silent] firefox ``` -# How do I move my favorite workspaces to a new monitor when I plug it in? +### How do I move my favorite workspaces to a new monitor when I plug it in? if you want workspaces to automatically go to a monitor upon connection, use the following: @@ -179,13 +204,13 @@ if you want workspaces 1 2 4 5 to go to monitor 1 when connecting it. Please note this requires `socat` to be installed. -# My tablet no worky?? +### My tablet no worky?? Use [Open Tablet Driver](https://github.com/OpenTabletDriver/OpenTabletDriver) to configure your tablet. In the future it will be supported in the config. Until then, OTD is the way to go. -# Some of my apps take a really long time to open...? +### Some of my apps take a really long time to open...? _~/.config/hypr/hyprland.conf_ @@ -208,11 +233,12 @@ sleep 4 /usr/lib/xdg-desktop-portal & ``` -launched with `exec-once` should fix all issues. Adjust the sleep durations to taste. +launched with `exec-once` should fix all issues. Adjust the sleep durations to +taste. -# How do I export envvars for Hyprland? +### How do I export envvars for Hyprland? -See [Environment Variables](../Configuring/Environment-variables) +See [Environment Variables](../configuring/environment-variables) The `env` keyword is used for this purpose. For example: @@ -220,60 +246,83 @@ The `env` keyword is used for this purpose. For example: env = XDG_CURRENT_DESKTOP,Hyprland ``` -# How to disable middle-click paste? +### How to disable middle-click paste? -You can simply intercept the middle-click action all together, via hyprland binds for example. The drawbacks to this solution are that 1. it disables the rest of the functionality of the middle-click action, such as auto scroll, closing browser tabs, etc., and 2. many applications (such as kitty) manually intercept the middle-click events and bind them to paste from the primary buffer themselves, bypassing the solution altogether. For this solution, add this bind to your config: +You can simply intercept the middle-click action all together, via hyprland +binds for example. The drawbacks to this solution are that 1. it disables the +rest of the functionality of the middle-click action, such as auto scroll, +closing browser tabs, etc., and 2. many applications (such as kitty) manually +intercept the middle-click events and bind them to paste from the primary buffer +themselves, bypassing the solution altogether. For this solution, add this bind +to your config: -`bind = , mouse:274, exec, ;`. Note that the exact bindcode may vary, so you may want to check it with `wev` first. +`bind = , mouse:274, exec, ;`. Note that the exact bindcode may vary, so you may +want to check it with `wev` first.
Alternative method using wl-paste (warning: major power consumption) - - The middle-click paste action pastes from a separate buffer (primary buffer) than what the regular clipboard uses (clipboard buffer). Since the primary buffer is unrelated to the clipboard buffer, it's easy to simply keep the primary buffer empty, allowing the middle-click action to retain the rest of its functionality without having anything to paste. Run the following command (in your config with `exec-once`, for example) to achieve this: - `wl-paste -p --watch wl-copy -p ''` (`wl-paste -p --watch` watches for changes to the primary buffer, `wl-copy -p ''` clears the primary buffer) +The middle-click paste action pastes from a separate buffer (primary buffer) +than what the regular clipboard uses (clipboard buffer). Since the primary +buffer is unrelated to the clipboard buffer, it's easy to simply keep the +primary buffer empty, allowing the middle-click action to retain the rest of its +functionality without having anything to paste. Run the following command (in +your config with `exec-once`, for example) to achieve this: - **As you can see, however, this creates an endless loop (found copied text -> copy -> found copied text...). Therefore this method is not recommended.** +`wl-paste -p --watch wl-copy -p ''` (`wl-paste -p --watch` watches for changes +to the primary buffer, `wl-copy -p ''` clears the primary buffer) + +**As you can see, however, this creates an endless loop (found copied text -> +copy -> found copied text...). Therefore this method is not recommended.**
-# How do I make Hyprland draw as little power as possible on my laptop? +### How do I make Hyprland draw as little power as possible on my laptop? **_Useful Optimizations_**: -* `decoration:blur = false` and `decoration:drop_shadow = false` to disable fancy but battery hungry effects. +- `decoration:blur = false` and `decoration:drop_shadow = false` to disable + fancy but battery hungry effects. -* `misc:vfr = true`, since it'll lower the amount of sent frames when nothing is happening on-screen. +- `misc:vfr = true`, since it'll lower the amount of sent frames when nothing is + happening on-screen. -# How to fix games with window dancing? +### How to fix games with window dancing? -Read [this trick](../Configuring/Uncommon-tips--tricks/#window-dancing). +Read [this trick](../configuring/uncommon-tips--tricks/#window-dancing). -# My apps take a long time to start / can't screenshare +### My apps take a long time to start / can't screenshare -See [The XDPH Page](../Useful-Utilities/Hyprland-desktop-portal). +See [The XDPH Page](../useful-utilities/xdg-desktop-portal-hyprland). You most likely have multiple portal impls / an impl is failing to launch. -# My screenshot utilities won't work with multiple screens +### My screenshot utilities won't work with multiple screens -Some programs like flameshot (currently) has limited wayland support so on most Wayland compositors, you will have to do few tweaks. -For Hyprland, you can add these window rules to your config to make said programs work with both of your screens. +Some programs like flameshot (currently) has limited wayland support so on most +Wayland compositors, you will have to do few tweaks. For Hyprland, you can add +these window rules to your config to make said programs work with both of your +screens. ```windowrulev2=float,title:^(flameshot) windowrulev2=move 0 0,title:^(flameshot) windowrulev2=nofullscreenrequest,title:^(flameshot) ``` -# I cannot bind SUPER as my mod key on my laptop +### I cannot bind SUPER as my mod key on my laptop -Many laptops have a built-in function to toggle `SUPER` between single key press mode and hold mode. This is usually indicated by a padlock on the `SUPER` key. +Many laptops have a built-in function to toggle `SUPER` between single key press +mode and hold mode. This is usually indicated by a padlock on the `SUPER` key. -First, install and run `wev`, then press `SUPER`. If you see a key press event followed by an instant key release event, then it's likely your `SUPER` key is set to single press mode. +First, install and run `wev`, then press `SUPER`. If you see a key press event +followed by an instant key release event, then it's likely your `SUPER` key is +set to single press mode. -On most laptops this can be fixed by pressing `FN+SUPER` and verified in `wev`. You should be able to hold `SUPER` and not see an instant release event. In case `FN+SUPER` doesn't work, consult your laptop's manual. +On most laptops this can be fixed by pressing `FN+SUPER` and verified in `wev`. +You should be able to hold `SUPER` and not see an instant release event. In case +`FN+SUPER` doesn't work, consult your laptop's manual. -# My VM doesn't receive keybinds I have set in Hyprland +### My VM doesn't receive keybinds I have set in Hyprland This is expected, as Hyprland takes precedence. @@ -288,15 +337,19 @@ submap = reset set `MOD` and `KEY` to desired values. -By pressing the selected combo you will enter a mode where hyprland ignores your keybinds and passes them on to the vm. +By pressing the selected combo you will enter a mode where hyprland ignores your +keybinds and passes them on to the vm. Then, pressing `SUPER + Escape` will leave that mode. -# Some of my drop-down/pop-up windows in apps disappear +### Some of my drop-down/pop-up windows in apps disappear -In some apps like Steam or VSCode, the drop-down windows may disappear if you hover over them. This can be fixed with window rules. +In some apps like Steam or VSCode, the drop-down windows may disappear if you +hover over them. This can be fixed with window rules. -First, find the title and class of the pop-up window with `hyprctl clients`. You can try something like `sleep 3 && hyprctl clients` so you have time to open the pop-up. It should look something like this: +First, find the title and class of the pop-up window with `hyprctl clients`. You +can try something like `sleep 3 && hyprctl clients` so you have time to open the +pop-up. It should look something like this: ```bash Window 55d794495400 -> : @@ -312,7 +365,8 @@ If the pop-up disappears as you hover over it, you can add to your config: windowrulev2 = stayfocused, title:^(TITLE)$, class:^(CLASS)$ ``` -This has a downside of not being able to click on anything in the main UI until you've interacted with the pop-up. +This has a downside of not being able to click on anything in the main UI until +you've interacted with the pop-up. If the pop-up disappears immediately, you can use: @@ -320,11 +374,11 @@ If the pop-up disappears immediately, you can use: windowrulev2 = minsize 1 1, title:^(TITLE)$, class:^(CLASS)$ ``` -# Steam's file picker no worky +### Steam's file picker no worky -On instances where you have a steam library on another drive that you have -to add, Hyprland's file picker would not normally appear when selecting -a directory from steam. +On instances where you have a steam library on another drive that you have to +add, Hyprland's file picker would not normally appear when selecting a directory +from steam. Steam has its own file picker, however, it's not functional. Install `xdg-desktop-portal-gtk` to show the desktop's file picker. diff --git a/pages/Getting Started/Installation.md b/pages/Getting Started/Installation.md index c05afa0..f58f7ee 100644 --- a/pages/Getting Started/Installation.md +++ b/pages/Getting Started/Installation.md @@ -1,9 +1,14 @@ +--- +weight: 2 +title: Installation +--- + # Foreword Due to their proprietary nature, Nvidia GPUs have limited compatibility with -Hyprland. If you want to try Hyprland on Nvidia regardless -(many people have reported successes), follow the [Nvidia page](../../Nvidia) -after installing Hyprland. +Hyprland. If you want to try Hyprland on Nvidia regardless (many people have +reported successes), follow the [Nvidia page](../../nvidia) after installing +Hyprland. ## Distros @@ -17,28 +22,29 @@ might have **major** issues running Hyprland. Installing Hyprland is very easy. Either you install it from your local package provider (if they provide pkgs for Hyprland) or you install/build it yourself. -{{< hint title=note >}} -This project is under development and is constantly -changing. If you want to keep up to date with the latest commits, please -consider updating your packages with `yay -Syu --devel`, or your other preferred -package manager. -{{< /hint >}} +{{< callout >}} + +This project is under development and is constantly changing. If you want to +keep up to date with the latest commits, please consider updating your packages +with `yay -Syu --devel`, or your other preferred package manager. + +{{< /callout >}} ### Packages **WARNING:** I do not maintain any packages. If they are broken, try building from source first. -{{< tabs "uniqueid" >}} +{{% details title="Arch" closed="true" %}} -{{< tab "Arch Linux" >}} ```plain hyprland-git (AUR) - compiles from latest source hyprland - binary x86 tagged release ``` -{{< /tab >}} -{{< tab "Nix" >}} +{{% /details %}} + +{{% details title="Nix" closed="true" %}} Enable Hyprland in your NixOS configuration: @@ -46,11 +52,14 @@ Enable Hyprland in your NixOS configuration: programs.hyprland.enable = true; ``` -For more details, read the [Nix page](../../Nix). +For more details, read the [Nix page](../../nix). -{{< /tab >}} -{{< tab "openSUSE*" >}} -Hyprland is part of factory, starting with snapshot 20230411. To install it simply use zypper +{{% /details %}} + +{{% details title="openSUSE*" closed="true" %}} + +Hyprland is part of factory, starting with snapshot 20230411. To install it +simply use zypper ```sh sudo zypper in hyprland @@ -58,12 +67,16 @@ sudo zypper in hyprland or install the "hyprland" package via YaST2 Software. -Alternatively, you can also follow the instructions under ["Manual (Manual Build)"](#manual-manual-build) -to build Hyprland yourself. +Alternatively, you can also follow the instructions under +["Manual (Manual Build)"](#manual-manual-build) to build Hyprland yourself. + +Note: _Hyprland is not available for Leap, as most libraries (and compiler) that +Hyprland needs are too old._ + +{{% /details %}} + +{{% details title="Fedora*" closed="true" %}} -Note: _Hyprland is not available for Leap, as most libraries (and compiler) that Hyprland needs are too old._ -{{< /tab >}} -{{< tab "Fedora*" >}} On Fedora 39 and Rawhide, run: ```sh @@ -71,18 +84,28 @@ sudo dnf install hyprland sudo dnf install hyprland-devel # If you want to build plugins ``` -Builds for Fedora 38 and additional packages are available in the [solopasha/hyprland](https://copr.fedorainfracloud.org/coprs/solopasha/hyprland) Copr repository. +Builds for Fedora 38 and additional packages are available in the +[solopasha/hyprland](https://copr.fedorainfracloud.org/coprs/solopasha/hyprland) +Copr repository. + +If you are on an older version of Fedora, you can also compile it yourself by +following the instructions +[here](https://github.com/hyprwm/Hyprland/discussions/284) + +{{% /details %}} + +{{% details title="Gentoo*" closed="true" %}} -If you are on an older version of Fedora, you can also compile it yourself by following the instructions [here](https://github.com/hyprwm/Hyprland/discussions/284) -{{< /tab >}} -{{< tab "Gentoo*" >}} The hyprland package is available in the main tree: ```sh emerge --ask gui-wm/hyprland ``` -Additional packages like hyprlock, hypridle, xdg-desktop-portal-hyprland, hyprland-plugins, hyprpaper and hyprpicker are available in the [GURU](https://wiki.gentoo.org/wiki/Project:GURU) overlay. Community-contributed scripts are also available in GURU as part of the hyprland-contrib package. +Additional packages like hyprlock, hypridle, xdg-desktop-portal-hyprland, +hyprland-plugins, hyprpaper and hyprpicker are available in the +[GURU](https://wiki.gentoo.org/wiki/Project:GURU) overlay. Community-contributed +scripts are also available in GURU as part of the hyprland-contrib package. ```sh eselect repository enable guru @@ -97,50 +120,84 @@ emerge --ask gui-apps/hyprpicker emerge --ask gui-wm/hyprland-contrib ``` -For USE flags and more details, read the [Gentoo wiki page](https://wiki.gentoo.org/wiki/Hyprland) about Hyprland. +For USE flags and more details, read the +[Gentoo wiki page](https://wiki.gentoo.org/wiki/Hyprland) about Hyprland. + +{{% /details %}} + +{{% details title="FreeBSD*" closed="true" %}} -{{}} -{{< tab "FreeBSD*" >}} Hyprland and related are in the default repository: + - [hyprland](https://www.freshports.org/x11-wm/hyprland) - [hyprpaper](https://www.freshports.org/x11/hyprpaper) - [hyprpicker](https://www.freshports.org/x11/hyprpicker) - [xdg-desktop-portal-hyprland](https://www.freshports.org/x11/xdg-desktop-portal-hyprland) - [Other Wayland stuff](https://www.freshports.org/wayland/) -{{}} -{{< tab "Ubuntu 23.04*" >}} + +{{% /details %}} + +{{% details title="Ubuntu 23.04*" closed="true" %}} + Build Dependencies: + ```bash sudo apt-get install -y meson wget build-essential ninja-build cmake-extras cmake gettext gettext-base fontconfig libfontconfig-dev libffi-dev libxml2-dev libdrm-dev libxkbcommon-x11-dev libxkbregistry-dev libxkbcommon-dev libpixman-1-dev libudev-dev libseat-dev seatd libxcb-dri3-dev libegl-dev libgles2 libegl1-mesa-dev glslang-tools libinput-bin libinput-dev libxcb-composite0-dev libavutil-dev libavcodec-dev libavformat-dev libxcb-ewmh2 libxcb-ewmh-dev libxcb-present-dev libxcb-icccm4-dev libxcb-render-util0-dev libxcb-res0-dev libxcb-xinput-dev xdg-desktop-portal-wlr libtomlplusplus3 ``` -you will also need to build the latest wayland, wayland-protocols, and libdisplay-info tagged releases from source -for more info refer to the [Ubuntu Guide For Installing And Building Hyprland Gist](https://gist.github.com/Vertecedoc4545/3b077301299c20c5b9b4db00f4ca6000) +you will also need to build the latest wayland, wayland-protocols, and +libdisplay-info tagged releases from source -{{< hint type=warning >}} +for more info refer to the +[Ubuntu Guide For Installing And Building Hyprland Gist](https://gist.github.com/Vertecedoc4545/3b077301299c20c5b9b4db00f4ca6000) -Please note that since Ubuntu is generally behind with dependencies, it's not guaranteed -that the build process will work at all. Even if it is, it's likely that it will break at some point in the future. +{{< callout type=warning >}} + +Please note that since Ubuntu is generally behind with dependencies, it's not +guaranteed that the build process will work at all. Even if it is, it's likely +that it will break at some point in the future. Refer to the gist if anything fails. -{{< /hint >}} +{{< /callout >}} -{{}} -{{< tab "Void Linux*" >}} -Hyprland is not available for Void Linux from the official repositories [as Hyprland doesn't build against tagged wlroots](https://github.com/void-linux/void-packages/issues/37544), -however template files are available [from a third party](https://github.com/Makrennel/hyprland-void) which can build Hyprland [using xbps-src](https://github.com/void-linux/void-packages). +{{% /details %}} -For further instructions on building with the third party resource, refer to the [README](https://github.com/Makrennel/hyprland-void/blob/master/README.md). +{{% details title="Void Linux*" closed="true" %}} -{{< hint type=warning >}} -As always, when using third party scripts exercise caution and understand what the script does. -{{< /hint>}} -{{< /tab >}} +Hyprland is not available for Void Linux from the official repositories +[as Hyprland doesn't build against tagged wlroots](https://github.com/void-linux/void-packages/issues/37544), +however template files are available +[from a third party](https://github.com/Makrennel/hyprland-void) which can build +Hyprland [using xbps-src](https://github.com/void-linux/void-packages). -{{< /tabs >}} +For further instructions on building with the third party resource, refer to the +[README](https://github.com/Makrennel/hyprland-void/blob/master/README.md). -***\* Unofficial, no official support is provided. These instructions are community-driven, and no guarantee is provided for their validity.*** +{{< callout type=warning >}} + +As always, when using third party scripts exercise caution and understand what +the script does. + +{{< /callout >}} + +{{% /details %}} + +{{% details title="Slackware*" closed="true" %}} + +```plain +hyprland-bin (SlackBuilds) - Prebuilt release for Slackware ready for install +``` + +Hyprland is not installed by default on the current release of Slackware. + +For detailed instructions on installing this build see +[here](https://slackbuilds.org/repository/15.0/desktop/hyprland-bin/) + +{{% /details %}} + +_**\* Unofficial, no official support is provided. These instructions are +community-driven, and no guarantee is provided for their validity.**_ ### Manual (Releases, Linux-only) @@ -170,15 +227,17 @@ _Arch dependencies_: yay -S gdb ninja gcc cmake meson libxcb xcb-proto xcb-util xcb-util-keysyms libxfixes libx11 libxcomposite xorg-xinput libxrender pixman wayland-protocols cairo pango seatd libxkbcommon xcb-util-wm xorg-xwayland libinput libliftoff libdisplay-info cpio tomlplusplus ``` -_(Please make a pull request or open an issue if any packages are missing from the list)_ +_(Please make a pull request or open an issue if any packages are missing from +the list)_ _openSUSE dependencies_: ```sh -zypper in gcc-c++ git meson cmake "pkgconfig(cairo)" "pkgconfig(egl)" "pkgconfig(gbm)" "pkgconfig(gl)" "pkgconfig(glesv2)" "pkgconfig(libdrm)" "pkgconfig(libinput)" "pkgconfig(libseat)" "pkgconfig(libudev)" "pkgconfig(pango)" "pkgconfig(pangocairo)" "pkgconfig(pixman-1)" "pkgconfig(vulkan)" "pkgconfig(wayland-client)" "pkgconfig(wayland-protocols)" "pkgconfig(wayland-scanner)" "pkgconfig(wayland-server)" "pkgconfig(xcb)" "pkgconfig(xcb-icccm)" "pkgconfig(xcb-renderutil)" "pkgconfig(xkbcommon)" "pkgconfig(xwayland)" "pkgconfig(xcb-errors)" glslang-devel Mesa-libGLESv3-devel tomlplusplus-devel +zypper in gcc-c++ git meson cmake "pkgconfig(cairo)" "pkgconfig(egl)" "pkgconfig(gbm)" "pkgconfig(gl)" "pkgconfig(glesv2)" "pkgconfig(libdrm)" "pkgconfig(libinput)" "pkgconfig(libseat)" "pkgconfig(libudev)" "pkgconfig(pango)" "pkgconfig(pangocairo)" "pkgconfig(pixman-1)" "pkgconfig(vulkan)" "pkgconfig(wayland-client)" "pkgconfig(wayland-protocols)" "pkgconfig(wayland-scanner)" "pkgconfig(wayland-server)" "pkgconfig(xcb)" "pkgconfig(xcb-icccm)" "pkgconfig(xcb-renderutil)" "pkgconfig(xkbcommon)" "pkgconfig(xwayland)" "pkgconfig(xcb-errors)" glslang-devel Mesa-libGLESv3-devel tomlplusplus-devel ``` -(this should also work on RHEL/Fedora if you remove `Mesa-libGLESv3-devel` and `pkgconfig(xcb-errors)`) +(this should also work on RHEL/Fedora if you remove `Mesa-libGLESv3-devel` and +`pkgconfig(xcb-errors)`) _FreeBSD dependencies_: @@ -188,17 +247,16 @@ pkg install meson jq `pkg rquery %dn wlroots` hwdata libdisplay-info libliftoff export CC=gcc CXX=g++ LDFLAGS="-static-libstdc++ -static-libgcc" ``` -_Ubuntu 23.04 dependencies_: -refer to the Ubuntu tab above +_Ubuntu 23.04 dependencies_: refer to the Ubuntu tab above Please note Hyprland builds `wlroots`. Make sure you have the dependencies of wlroots installed, you can make sure you have them by installing wlroots separately (Hyprland doesn't mind) -Also note that Hyprland uses the C++23 standard, so both your compiler -and your C++ library has to support that (`gcc>=13.0.0` or `clang>=15`). -On Clang-based systems libc++ may be used by default, so until libc++ -supports C++23 you have to pass `-stdlib=libstdc++` or switch to GCC. +Also note that Hyprland uses the C++23 standard, so both your compiler and your +C++ library has to support that (`gcc>=13.0.0` or `clang>=15`). On Clang-based +systems libc++ may be used by default, so until libc++ supports C++23 you have +to pass `-stdlib=libstdc++` or switch to GCC. ### CMake (recommended) @@ -208,7 +266,8 @@ cd Hyprland make all && sudo make install ``` -_CMake is always recommended as it's the intended way Hyprland should be installed._ +_CMake is always recommended as it's the intended way Hyprland should be +installed._ ### Meson @@ -219,12 +278,12 @@ ninja -C build ninja -C build install --tags runtime,man ``` -Refer to [Debugging](../../Contributing-and-Debugging) to see how to build & +Refer to [Debugging](../../contributing-and-debugging) to see how to build & debug. ## Crash on launch -See [Crashes and Bugs](../../Crashes-and-Bugs). +See [Crashes and Bugs](../../crashes-and-bugs). ## Custom installation (legacy renderer, etc) @@ -284,4 +343,5 @@ Now, of course, install manually. sudo cp ./build/Hyprland /usr/bin && sudo cp ./example/hyprland.desktop /usr/share/wayland-sessions ``` -Lastly, copy hyprctl, hyprpm, and wlroots as mentioned [here](#manual-releases-linux-only) +Lastly, copy hyprctl, hyprpm, and wlroots as mentioned +[here](#manual-releases-linux-only) diff --git a/pages/Getting Started/Master-Tutorial.md b/pages/Getting Started/Master-Tutorial.md index a7f21c2..999d665 100644 --- a/pages/Getting Started/Master-Tutorial.md +++ b/pages/Getting Started/Master-Tutorial.md @@ -1,33 +1,41 @@ -If you are coming to Hyprland for the first time, this is the main tutorial to read. +--- +weight: 1 +title: Master tutorial +--- -Due to a lot of people doing stupid stuff, this tutorial will cover literally everything -you need to just get things going. It does link to other pages where necessary. +If you are coming to Hyprland for the first time, this is the main tutorial to +read. -{{< toc >}} +Due to a lot of people doing stupid stuff, this tutorial will cover literally +everything you need to just get things going. It does link to other pages where +necessary. ## Install Hyprland -See [Installation](../Installation) and come back here once you have successfully -installed Hyprland. -Install `kitty` (default terminal emulator) terminal. This is available in most +See [Installation](../installation) and come back here once you have +successfully installed Hyprland. + +Install `kitty` (default terminal emulator) terminal. This is available in most distros' repositories. ## NVIDIA? + _If not using an NVIDIA card, skip this step_ -Please take a look at -[The Nvidia page](../../Nvidia) before launching. It has a lot of info regarding the needed -environment and tweaks. +Please take a look at [The Nvidia page](../../nvidia) before launching. It has a +lot of info regarding the needed environment and tweaks. ## VM? + _If not using a VM, skip this step_ -In a VM, make sure you have 3D acceleration enabled in your virtio config (or virt-manager) -otherwise Hyprland ***will not work***. +In a VM, make sure you have 3D acceleration enabled in your virtio config (or +virt-manager) otherwise Hyprland _**will not work**_. You can also passthru a GPU to make it work. Please bear in mind 3D accel in VMs may be pretty slow. + ## Launching Hyprland Now, you can just execute `Hyprland` in your tty. @@ -35,65 +43,82 @@ Now, you can just execute `Hyprland` in your tty. **!IMPORTANT**: Do **not** launch Hyprland with `root` permissions (don't `sudo`) -You can see some launch flags by doing `Hyprland -h`, these include setting the config -path, ignoring a check for the above, etc. +You can see some launch flags by doing `Hyprland -h`, these include setting the +config path, ignoring a check for the above, etc. Login managers are not officially supported, but here's a short compatibility list: -- SDDM → Works flawlessly. Install sddm ⩾ 0.20.0 or the [latest git version](https://github.com/sddm/sddm) (or [sddm-git](https://aur.archlinux.org/packages/sddm-git) from AUR) to prevent SDDM bug [1476](https://github.com/sddm/sddm/issues/1476) (90s shutdowns). +- SDDM → Works flawlessly. Install sddm ⩾ 0.20.0 or the + [latest git version](https://github.com/sddm/sddm) (or + [sddm-git](https://aur.archlinux.org/packages/sddm-git) from AUR) to prevent + SDDM bug [1476](https://github.com/sddm/sddm/issues/1476) (90s shutdowns). - GDM → Works with the caveat of crashing Hyprland on the first launch - ly → Works poorly ## In Hyprland + You're good to go with your adventure, technically. Use SUPER + Q to launch kitty. If you wish to choose the -default terminal before you proceed, you can do so in `~/.config/hypr/hyprland.conf` -([example config](https://github.com/hyprwm/Hyprland/blob/main/example/hyprland.conf)). +default terminal before you proceed, you can do so in +`~/.config/hypr/hyprland.conf` +([example config](https://github.com/hyprwm/Hyprland/blob/main/example/hyprland.conf)). If you want the best experience with less hassle googling, keep reading. ## Critical software -See the [Must-have Software page](../../Useful-Utilities/Must-have) for the crucial -things to make Wayland / Hyprland / other apps work correctly. + +See the [Must-have Software page](../../useful-utilities/must-have) for the +crucial things to make Wayland / Hyprland / other apps work correctly. ## Monitors config -See [Configuring Hyprland page](../../Configuring/Monitors) to learn all -about configuring your displays. + +See [Configuring Hyprland page](../../configuring/monitors) to learn all about +configuring your displays. ## Apps / X11 replacements -See the [Useful Utilities page](../../Useful-Utilities) and the + +See the [Useful Utilities page](../../useful-utilities) and the [Sway wiki page](https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway) just about that. You can also visit the [Awesome-Hyprland](https://github.com/hyprland-community/awesome-hyprland) repository for a more comprehensive list. ## Fully configure + Head onto the -[Configuring Hyprland page](../../Configuring/Configuring-Hyprland) to learn all +[Configuring Hyprland page](../../configuring/configuring-Hyprland) to learn all about configuring Hyprland to your likings. ## Cursors -Cursors are a notorious pain to set up when you don't know how. See -[this FAQ entry](../../FAQ#how-do-i-change-me-mouse-cursor) -If your cursor does not appear, then see [this FAQ entry](../../FAQ#me-cursor-no-render) +Cursors are a notorious pain to set up when you don't know how. See +[this FAQ entry](../../faq#how-do-i-change-me-mouse-cursor) + +If your cursor does not appear, then see +[this FAQ entry](../../faq#me-cursor-no-render) ## Themes -Since this is not a full fledged Desktop Environment, you will need to use tools such as -`lxappearance` and `nwg-look` (recommended) for GTK, and `qt5ct` / `qt6ct` for their -respective Qt versions. Some older applications may also require `qt4ct`. +Since this is not a full fledged Desktop Environment, you will need to use tools +such as `lxappearance` and `nwg-look` (recommended) for GTK, and `qt5ct` / +`qt6ct` for their respective Qt versions. Some older applications may also +require `qt4ct`. ## Force apps to use Wayland -A lot of apps will use Wayland by default. Chromium (and other browsers based on it or electron) -don't. You need to pass `--enable-features=UseOzonePlatform --ozone-platform=wayland` to them or use `.conf` files -where possible. Chromium-based browsers also should have a toggle in `chrome://flags`. Search for _"ozone"_ and select Wayland. -For most electron apps, you should put the above in `~/.config/electron-flags.conf`. VSCode is known -to not work with that though. +A lot of apps will use Wayland by default. Chromium (and other browsers based on +it or electron) don't. You need to pass +`--enable-features=UseOzonePlatform --ozone-platform=wayland` to them or use +`.conf` files where possible. Chromium-based browsers also should have a toggle +in `chrome://flags`. Search for _"ozone"_ and select Wayland. -A few more environment variables for forcing Wayland mode are documented [here](../../Configuring/Environment-variables). +For most electron apps, you should put the above in +`~/.config/electron-flags.conf`. VSCode is known to not work with that though. -You can check whether an app is running in xwayland or not with `hyprctl clients`. +A few more environment variables for forcing Wayland mode are documented +[here](../../configuring/environment-variables). + +You can check whether an app is running in xwayland or not with +`hyprctl clients`. diff --git a/pages/Getting Started/_index.md b/pages/Getting Started/_index.md new file mode 100644 index 0000000..162728b --- /dev/null +++ b/pages/Getting Started/_index.md @@ -0,0 +1,6 @@ +--- +weight: 2 +title: Getting Started +sidebar: + open: true +--- diff --git a/pages/Hypr Ecosystem/_index.md b/pages/Hypr Ecosystem/_index.md index 6b69b65..f229e9f 100644 --- a/pages/Hypr Ecosystem/_index.md +++ b/pages/Hypr Ecosystem/_index.md @@ -1,10 +1,15 @@ +--- +weight: 4 +title: Hypr Ecosystem +--- + This wiki section hosts docs for various hypr* projects. See a list bere: -{{< hint type=info >}} +{{< callout type=info >}} These docs always target latest -git branch of respective apps. -{{< /hint >}} +{{< /callout >}} ## Wiki pages - **[hyprpaper](./hyprpaper)** @@ -12,4 +17,4 @@ These docs always target latest -git branch of respective apps. - **[hypridle](./hypridle)** - **[hyprlock](./hyprlock)** - **[hyprcursor](./hyprcursor)** - - **[xdg-desktop-portal-hyprland](./xdg-desktop-portal-hyprland)** \ No newline at end of file + - **[xdg-desktop-portal-hyprland](./xdg-desktop-portal-hyprland)** diff --git a/pages/Hypr Ecosystem/hypridle.md b/pages/Hypr Ecosystem/hypridle.md index dca4929..bf93423 100644 --- a/pages/Hypr Ecosystem/hypridle.md +++ b/pages/Hypr Ecosystem/hypridle.md @@ -1,20 +1,22 @@ -hypridle is hyprland's idle management daemon. +--- +weight: 3 +title: hypridle +--- -{{< toc >}} +hypridle is hyprland's idle management daemon. ## Configuration -Configuration is done via the config file at `~/.config/hypr/hypridle.conf`. -A config file is required; hypridle won't run without one. -To run hypridle at startup edit `hyprland.conf` and add: -`exec-once = hypridle`. +Configuration is done via the config file at `~/.config/hypr/hypridle.conf`. A +config file is required; hypridle won't run without one. To run hypridle at +startup edit `hyprland.conf` and add: `exec-once = hypridle`. ### General Variables in the `general` category: | variable | description | type | default | -| -- | -- | -- | -- | +| --- | --- | --- | --- | | lock_cmd | command to run when receiving a dbus lock event (e.g. `loginctl lock-session`) | string | empty | | unlock_cmd | command to run when receiving a dbus unlock event (e.g. `loginctl unlock-session`) | string | empty | | before_sleep_cmd | command to run when receiving a dbus prepare_sleep event | string | empty | @@ -25,8 +27,9 @@ Variables in the `general` category: Hypridle uses listeners to define actions on idleness. -Every listener has a _timeout_ (in seconds). After idling for _timeout_ seconds, `on-timeout` will fire. -When action is resumed after idle, `on-resume` will fire. +Every listener has a _timeout_ (in seconds). After idling for _timeout_ seconds, +`on-timeout` will fire. When action is resumed after idle, `on-resume` will +fire. Example listener: diff --git a/pages/Hypr Ecosystem/hyprlock.md b/pages/Hypr Ecosystem/hyprlock.md index d2252ba..aa76f33 100644 --- a/pages/Hypr Ecosystem/hyprlock.md +++ b/pages/Hypr Ecosystem/hyprlock.md @@ -1,11 +1,16 @@ -hyprlock is a simple, yet fast, multi-threaded and GPU-accelerated screen -lock for hyprland. +--- +weight: 4 +title: hyprlock +--- -{{< toc >}} +hyprlock is a simple, yet fast, multi-threaded and GPU-accelerated screen lock +for hyprland. ## Configuration -Configuration is done via the config file at `~/.config/hypr/hyprlock.conf`. It is not required, but recommended. Without it, locking shows the current screen. +Configuration is done via the config file at `~/.config/hypr/hyprlock.conf`. It +is not required, but recommended. Without it, locking shows the current screen. + ### General Variables in the `general` category: @@ -33,10 +38,16 @@ widget_name { ## Widget List ### General remarks -- All rendered text supports [pango markup](https://docs.gtk.org/Pango/pango_markup.html). - - Additionally hyprlock will parse `
` for your convenience. (That's a linebreak) Remember to enable linebreaks in your spans with `allow_breaks="true"`. -- Positioning is done via halign, valign and position. Position is an added offset to the result of alignment. - - halign: `left`, `center`, `right`, `none`. valign: `top`, `center`, `bottom`, `none` + +- All rendered text supports + [pango markup](https://docs.gtk.org/Pango/pango_markup.html). + - Additionally hyprlock will parse `
` for your convenience. (That's a + linebreak) Remember to enable linebreaks in your spans with + `allow_breaks="true"`. +- Positioning is done via halign, valign and position. Position is an added + offset to the result of alignment. + - halign: `left`, `center`, `right`, `none`. valign: `top`, `center`, + `bottom`, `none` ### Shadowable @@ -52,7 +63,8 @@ Some widgets are shadowable, aka. can have a shadow. For those widgets, you get: Draws a background image or fills with color. -If `path` is empty or missing, will use `color`. Otherwise, the image will be used. +If `path` is empty or missing, will use `color`. Otherwise, the image will be +used. If `path` is `screenshot`, a screenshot of your desktop at launch will be used. @@ -142,9 +154,11 @@ Available variables for `text`: - `$ATTEMPTS` - failed attempts `text` also supports launching commands, for example: + ```ini text = cmd[update:1000] echo "$(date)" ``` + Worth noting: - `update:` - time is in ms. - label can be forcefully updated by specifying `update: