### Setup libvirt and VM Environment on Arch Linux Source: https://wiki.hypr.land/0.41.2/Getting-Started/Installation Installs and configures libvirt, virt-viewer, and QEMU components on Arch Linux for running virtual machines. It also enables and starts the libvirtd service and adds the user to the libvirt group. ```bash # Install libvirt and qemu things. sudo pacman -S libvirt virt-viewer qemu-common # Enable and start libvirtd. systemctl enable libvirtd systemctl start libvirtd # Add yourself to the libvirt group. sudo usermod -a -G libvirt USER # Replace 'USER' with your username. # You may need to restart the libvirtd service. systemctl restart libvirtd ``` -------------------------------- ### Example Monitor Configuration Command Source: https://wiki.hypr.land/0.18.0beta/Getting-Started/Quick-start An example of the `hyprctl keyword monitor` command, demonstrating how to set a specific monitor's resolution, refresh rate, position, and scale. ```sh hyprctl keyword monitor DP-3,1920x1080@240,1920x0,1 ``` -------------------------------- ### Hyprland Command Syntax Example Source: https://wiki.hypr.land/0.44.0/Configuring Demonstrates the basic line style for Hyprland configuration, where a command is followed by its value. Trailing spaces are optional for readability. ```hyprlang COMMAND = VALUE ``` -------------------------------- ### Install Hyprland with Custom Preset Source: https://wiki.hypr.land/0.19.0beta/Getting-Started/Installation Installs Hyprland with a specified build preset (e.g., 'release', 'debug', 'legacyrenderer'). This command sequence cleans, configures, builds, and installs Hyprland. Requires `make` and `sudo`. ```bash sudo make clear && sudo make config && make [PRESET] && sudo cp ./build/Hyprland /usr/bin && sudo cp ./example/hyprland.desktop /usr/share/wayland-sessions ``` -------------------------------- ### Custom Installation with Legacy Renderer Source: https://wiki.hypr.land/0.31.0/Getting-Started/Installation This method allows for custom installations, such as enabling the legacy renderer. It involves navigating to the Hyprland repository, running `make` with the specific preset, and then copying the necessary files to system directories. ```shell make legacyrenderer && sudo cp ./build/Hyprland /usr/bin && sudo cp ./example/hyprland.desktop /usr/share/wayland-sessions ``` -------------------------------- ### Install Hyprland with Legacy Renderer Source: https://wiki.hypr.land/0.19.0beta/Getting-Started/Installation Installs Hyprland using the legacy renderer. This method may not support all graphical features. It requires `make` and `sudo` privileges for installation. ```bash sudo make clear && sudo make config && make legacyrenderer && sudo cp ./build/Hyprland /usr/bin && sudo cp ./example/hyprland.desktop /usr/share/wayland-sessions ``` -------------------------------- ### Manual Hyprland Installation Steps Source: https://wiki.hypr.land/0.25.0/Getting-Started/Installation Manually installs Hyprland by copying pre-compiled binaries and configuration files to their respective system directories. This method is for Linux-only and involves placing files in `/usr/bin/`, `/usr/lib/`, and `/usr/share/wayland-sessions/`. ```bash # Copy binaries cp Hyprland /usr/bin/ cp hyprctl /usr/bin/ # Copy wlroots library cp libwlroots.so.XX032 /usr/lib/ # Copy desktop entry cp examples/hyprland.desktop /usr/share/wayland-sessions/ # Example config is in examples/hyprland.conf ``` -------------------------------- ### Install Hyprland on FreeBSD Source: https://wiki.hypr.land/0.37.0/getting-started/installation Installs Hyprland and related packages from the default FreeBSD repository. Available packages include hyprland, hyprpaper, hyprpicker, and xdg-desktop-portal-hyprland. ```bash # hyprland # hyprpaper # hyprpicker # xdg-desktop-portal-hyprland # Other Wayland stuff ``` -------------------------------- ### Custom Build Presets with Make Source: https://wiki.hypr.land/0.31.0/Getting-Started/Installation This command demonstrates how to build Hyprland with different presets like 'release', 'debug', or 'legacyrenderer'. After building, the Hyprland binary and desktop entry are copied to system paths. ```shell make [PRESET] && sudo cp ./build/Hyprland /usr/bin && sudo cp ./example/hyprland.desktop /usr/share/wayland-sessions ``` -------------------------------- ### Build Hyprland using CMake (Recommended) Source: https://wiki.hypr.land/0.31.0/Getting-Started/Installation This is the recommended method for installing Hyprland using CMake. It involves cloning the repository recursively, navigating into the directory, and then using `make` to build and install. ```shell git clone --recursive https://github.com/hyprwm/Hyprland cd Hyprland make all && sudo make install ``` -------------------------------- ### Install Qt5 Wayland Support Source: https://wiki.hypr.land/0.22.0beta/Useful-Utilities/Must-have Install the `qt5-wayland` package to ensure Qt5 applications function correctly in the Wayland environment. This is a library and does not require manual starting. ```shell # For Arch Linux pacman -S qt5-wayland ``` -------------------------------- ### Manual Hyprland Installation (Binary Copy) Source: https://wiki.hypr.land/0.27.2/Getting-Started/Installation Manually installs Hyprland by copying pre-compiled binaries and configuration files to their respective system directories. This method bypasses package managers and is suitable for users who prefer direct control or are on systems without readily available Hyprland packages. ```bash cp hyprland /usr/bin/ ``` ```bash cp hyprctl /usr/bin/ ``` ```bash cp libwlroots.so.XX032 /usr/lib/ ``` ```bash cp examples/hyprland.desktop /usr/share/wayland-sessions/ ``` -------------------------------- ### Manual Hyprland Installation (Linux) Source: https://wiki.hypr.land/0.22.0beta/Getting-Started/Installation This describes the manual steps for installing Hyprland from a release, including copying binaries and configuration files to their respective system directories. ```bash # Download the most recent release. # copy the binary (Hyprland) to /usr/bin/. # copy hyprctl to /usr/bin/. # copy the wlroots .so (`libwlroots.so.XX032`) to /usr/lib/. # copy the desktop entry (`examples/hyprland.desktop`) to /usr/share/wayland-sessions/ # the example config is in `examples/hyprland.conf`. # For updating later on, you can overwrite the binaries (hyprctl, hyprland and libwlroots), you don’t need to update anything else. ``` -------------------------------- ### Install Qt6 Wayland Support Source: https://wiki.hypr.land/0.22.0beta/Useful-Utilities/Must-have Install the `qt6-wayland` package to ensure Qt6 applications function correctly in the Wayland environment. This is a library and does not require manual starting. ```shell # For Arch Linux pacman -S qt6-wayland ``` -------------------------------- ### Animation Configuration Examples Source: https://wiki.hypr.land/0.45.0/Configuring/Animations Provides concrete examples of how to set up different animations using the 'animation' keyword. These examples demonstrate varying parameters for workspaces, windows, and fade effects, including custom curves and styles. ```plaintext animation = workspaces, 1, 8, default animation = windows, 1, 10, myepiccurve, slide animation = fade, 0 ``` -------------------------------- ### Manual Hyprland Installation Steps Source: https://wiki.hypr.land/0.32.0/Getting-Started/Installation Provides manual steps to install Hyprland by copying pre-compiled binaries and configuration files to system directories. This method is distribution-agnostic but requires manual management. ```bash copy the binary (Hyprland) to `/usr/bin/`. copy hyprctl to `/usr/bin/`. copy the wlroots .so (`libwlroots.so.XX032`) to `/usr/lib/`. copy the desktop entry (`example/hyprland.desktop`) to `/usr/share/wayland-sessions/` the example config is in `example/hyprland.conf`. ``` -------------------------------- ### Start CopyQ Clipboard Manager Source: https://wiki.hypr.land/0.28.0/Useful-Utilities/Clipboard-Managers This snippet demonstrates how to automatically start the CopyQ clipboard manager when Hyprland launches. It requires CopyQ to be installed and configured to run as a server. ```Shell exec-once = copyq --start-server ``` -------------------------------- ### Install Hyprland with Custom Preset (Shell) Source: https://wiki.hypr.land/0.20.0beta/Getting-Started/Installation Installs Hyprland with a user-defined preset. Replace `[PRESET]` with your desired configuration like `release`, `debug`, `legacyrenderer`, or `legacyrendererdebug`. The steps are similar to the legacy renderer installation, involving cleaning, configuration, and copying files. ```shell sudo make clear && sudo make config && make protocols && make [PRESET] && sudo cp ./build/Hyprland /usr/bin && sudo cp ./example/hyprland.desktop /usr/share/wayland-sessions ``` -------------------------------- ### Install Hyprland on openSUSE Source: https://wiki.hypr.land/0.25.0/Getting-Started/Installation Installs the Hyprland package on openSUSE using the zypper package manager. This is available in the factory snapshot starting from 20230411. YaST2 can also be used for installation. ```bash sudo zypper in hyprland ``` -------------------------------- ### Create and Initialize a Hyprtoolkit Window Source: https://wiki.hypr.land/0.52.0/Hypr-Ecosystem/hyprtoolkit/development Demonstrates the basic steps to create a backend and initialize a window using Hyprtoolkit. This involves creating a `CBackend` instance and a `CWindowBuilder` to set window properties before opening it. ```cpp using namespace Hyprtoolkit; auto backend = CBackend::create(); auto window = CWindowBuilder::begin()->appTitle("Hello")->appClass("hyprtoolkit")->commence(); ``` -------------------------------- ### Install Hyprland Nvidia Patches (AUR) Source: https://wiki.hypr.land/0.28.0/Nvidia Installs unofficial Hyprland Nvidia patches from the Arch User Repository (AUR). These patches are not officially supported by Hyprland developers. Ensure you have an AUR helper installed before proceeding. ```bash hyprland-nvidia (AUR) ``` ```bash hyprland-nvidia-git (AUR) ``` -------------------------------- ### Install Hyprland with Custom Preset Source: https://wiki.hypr.land/0.16.0beta/Getting-Started/Installation Installs Hyprland with a user-defined preset. This command cleans the build, configures it, builds the specified preset (e.g., 'release', 'debug'), and installs the necessary files. Replace '[PRESET]' with your desired build configuration. ```bash sudo make clear && sudo make config && make [PRESET] && sudo cp ./build/Hyprland /usr/bin && sudo cp ./example/hyprland.desktop /usr/share/wayland-sessions ``` -------------------------------- ### Start KDE Polkit Authentication Agent Source: https://wiki.hypr.land/0.29.1/Useful-Utilities/Must-have An authentication agent is needed for applications requiring elevated privileges. The KDE agent is recommended. The startup path may vary by distribution; examples for Arch, general Linux, and Gentoo are provided. ```shell exec-once=/usr/lib/polkit-kde-authentication-agent-1 # or on some distributions: # exec-once=/usr/libexec/polkit-kde-authentication-agent-1 # or on Gentoo: # exec-once=/usr/lib64/libexec/polkit-kde-authentication-agent-1 ``` -------------------------------- ### Install libvirt and QEMU Packages (Bash) Source: https://wiki.hypr.land/0.42.0/Getting-Started/Installation Installs necessary packages for running QEMU virtual machines with libvirt. It also adds the user to the 'libvirt' group and enables the libvirtd service. ```bash # Install libvirt and qemu things. sudo pacman -S libvirt virt-viewer qemu-common # Add yourself to the libvirt group. sudo usermod -a -G libvirt USER # Replace 'USER' with your username. # Enable and start libvirtd. systemctl enable --now libvirtd ``` -------------------------------- ### Solus Package Installation Source: https://wiki.hypr.land/0.45.0/Getting-Started/Installation Installs Hyprland on Solus using eopkg. ```Shell sudo eopkg install hyprland ``` -------------------------------- ### Start XDG Desktop Portal Source: https://wiki.hypr.land/0.29.0/Useful-Utilities/Must-have XDG Desktop Portal handles various desktop functionalities like file pickers and screensharing. It starts automatically on systems with Systemd, but may require manual configuration otherwise. Refer to the Hyprland Desktop Portal page for detailed setup. ```shell # On Systemd systems, it should start automatically. # For manual startup, consult Hyprland documentation. ``` -------------------------------- ### Plugin Initialization and Exit Functions Source: https://wiki.hypr.land/0.23.0beta/Plugins/Development/Getting-Started Implement the core initialization and exit functions for a Hyprland plugin. PLUGIN_INIT is required for setup and returning plugin description, while PLUGIN_EXIT is optional for cleanup. ```cpp APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) { PHANDLE = handle; // ... return {"MyPlugin", "An amazing plugin that is going to change the world!", "Me", "1.0"}; } APICALL EXPORT void PLUGIN_EXIT() { // ... } ``` -------------------------------- ### Install Qt Wayland Support Source: https://wiki.hypr.land/0.42.0/Useful-Utilities/Must-have Provides Wayland support for Qt applications. This is a library installation and does not require a specific startup command. ```Shell # Install necessary packages: # sudo pacman -S qt5-wayland qt6-wayland (Arch Linux example) # sudo apt install qtwayland5 qt6-wayland-generic (Debian/Ubuntu example) ``` -------------------------------- ### Install Flameshot Screenshot Tool Source: https://wiki.hypr.land/0.44.0/FAQ Describes the installation of `flameshot`, a feature-rich screenshot tool with drawing and annotation capabilities. Notes potential issues on Wayland and HiDPI/multi-monitor setups. ```bash sudo pacman -S flameshot ``` -------------------------------- ### Install xdg-desktop-portal-wlr on Ubuntu Source: https://wiki.hypr.land/0.49.0/Getting-Started/Installation Installs the xdg-desktop-portal-wlr package for screensharing support on Ubuntu. ```bash sudo apt install -y xdg-desktop-portal-wlr ``` -------------------------------- ### Example Hyprland Window Rule Configurations Source: https://wiki.hypr.land/Configuring/Window-Rules Demonstrates various `windowrule` configurations for common tasks such as moving windows, disabling blur, changing border colors based on window state or title, setting opacity, rounding corners, and maintaining window focus. ```ini windowrule { name = move-kitty match:class = kitty move = 100 100 animation = popin } ``` ```ini windowrule = no_blur on, match:class firefox # Disable blur for firefox ``` ```ini windowrule = move (cursor_x-(window_w*0.5)) (cursor_y-(window_h*0.5)), match:class kitty # Move kitty to the center of the cursor ``` ```ini windowrule = border_color rgb(FF0000) rgb(880808), match:fullscreen 1 # Set border color to red if window is fullscreen ``` ```ini windowrule = border_color rgb(FFFF00), match:title .*Hyprland.* # Set border color to yellow when title contains Hyprland ``` ```ini windowrule = opacity 1.0 override 0.5 override 0.8 override, match:class kitty # Set opacity to 1.0 active, 0.5 inactive and 0.8 fullscreen for kitty ``` ```ini windowrule = match:class kitty, rounding 10 # Set rounding to 10 for kitty ``` ```ini windowrule = match:class (pinentry-)(.*), stay_focused on # Fix pinentry losing focus ``` -------------------------------- ### Setting Default Terminal in Hyprland Config Source: https://wiki.hypr.land/0.41.2/Getting-Started/Master-Tutorial Configure the default terminal emulator for Hyprland by editing the 'hyprland.conf' file. This example shows how to set 'kitty' as the default terminal, which can be launched with SUPER + Q. ```ini # Example config # $HOME/.config/hypr/hyprland.conf # Set default terminal # ... other configurations ... # For example, to set kitty as default: # terminal=kitty # Launch kitty with SUPER + Q # bind = SUPER, Q, exec, kitty ``` -------------------------------- ### Hyprland Opacity Override Example Source: https://wiki.hypr.land/Configuring/Window-Rules Illustrates how to use the 'override' keyword to set exact opacity values instead of multipliers, and how to ensure fullscreen windows are fully opaque. ```text windowrule = match:class kitty, opacity 0.8 override 0.8 override 1.0 override ``` -------------------------------- ### Install Hyprland without Flakes (using flake-compat) Source: https://wiki.hypr.land/0.31.0/Nix/Hyprland-on-Home-Manager This configuration demonstrates how to install Hyprland using the `flake-compat` package, which allows you to use flake-like inputs in a non-flake setup. It fetches Hyprland from its GitHub repository and integrates its Home Manager module. An example of custom `extraConfig` for keybindings is also included. ```nix # home config {pkgs, ...}: let flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz"; hyprland = (import flake-compat { src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz"; }).defaultNix; in { imports = [hyprland.homeManagerModules.default]; wayland.windowManager.hyprland = { enable = true; extraConfig = '' bind = SUPER, Return, exec, kitty # ... ''; }; } ``` -------------------------------- ### Basic Window Configuration with `windowrule` Source: https://wiki.hypr.land/0.46.0/Configuring/Window-Rules This snippet illustrates basic window configuration using `windowrule`. It covers simple actions like moving windows, setting animation styles, disabling blur, and adjusting opacity and rounding. These rules apply to windows matching the provided regex. ```shell windowrule = move 100 100, ^(kitty)$ # moves kitty to 100 100 windowrule = animation popin, ^(kitty)$ # sets the animation style for kitty windowrule = noblur, ^(kitty)$ # disables blur for firefox windowrule = move cursor -50% -50%, ^(kitty)$ # moves kitty to the center of the cursor windowrule = opacity 1.0 override 0.5 override 0.8 override, ^(kitty)$ # set opacity to 1.0 active, 0.5 inactive and 0.8 fullscreen for kitty windowrule = rounding 10, ^(kitty)$ # set rounding to 10 for kitty ``` -------------------------------- ### Build Hyprland from source using CMake (Recommended) Source: https://wiki.hypr.land/0.17.0beta/Getting-Started/Installation This sequence of commands clones the Hyprland repository recursively to include submodules, navigates into the directory, and then installs Hyprland using the 'make install' command. It's important to note that 'sudo make install' will overwrite existing .desktop files. ```bash git clone --recursive https://github.com/hyprwm/Hyprland cd Hyprland sudo make install ``` -------------------------------- ### Hyprland Nested Monitor Configuration Source: https://wiki.hypr.land/0.27.1/Plugins/Development/Getting-Started A configuration line to set up a monitor within the nested Hyprland session. This is part of the setup process for running Hyprland inside another Hyprland instance for debugging purposes. ```ini monitor = WL-1, 1920x1080, 0x0, 1 ``` -------------------------------- ### Hyprland Example Bind Configurations Source: https://wiki.hypr.land/0.45.0/Configuring/Binds Provides practical examples of how to use different bind flags in Hyprland's configuration file. These examples illustrate volume control with hold-press, activation during inhibitors, toggling applications, and adding descriptions to binds. ```shell # Example volume button with press and hold, volume limited to 150% binde = , XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+ # Example volume button that will activate even while an input inhibitor is active bindl = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- # Start wofi opens wofi on first press, closes it on second bindr = SUPER, SUPER_L, exec, pkill wofi || wofi # Describe a bind bindd = SUPER, Q, Open my favourite terminal, exec, kitty ``` -------------------------------- ### Manual Hyprland Binary Installation Source: https://wiki.hypr.land/0.45.0/Getting-Started/Installation Manually installs Hyprland binaries by copying them to /usr/bin/ and the desktop entry to /usr/share/wayland-sessions/. ```Shell 1. Download the most recent release. 2. copy the binaries (Hyprland, hyprctl, hyprpm) to `/usr/bin/`. 3. copy the desktop entry (`example/hyprland.desktop`) to `/usr/share/wayland-sessions/` ``` -------------------------------- ### Fix Electron App Crashes with Nvidia VAAPI Source: https://wiki.hypr.land/0.24.1/Nvidia To resolve crashes in Electron-based applications when using Nvidia, install the `nvidia-vaapi-driver-git` package from the AUR. This provides a VAAPI driver compatible with Nvidia, improving media decoding and application stability. ```bash # Install nvidia-vaapi-driver-git from AUR (using an AUR helper like yay) yay -S nvidia-vaapi-driver-git ``` -------------------------------- ### Basic Window Rules Examples Source: https://wiki.hypr.land/0.47.0/Configuring/Window-Rules Provides examples of common `windowrule` and `windowrulev2` configurations for actions such as moving windows, setting animations, disabling blur, and centering windows relative to the cursor. ```bash windowrule = move 100 100, kitty windowrule = animation popin, kitty windowrule = noblur, firefox windowrule = move cursor -50% -50%, kitty ``` -------------------------------- ### Create VM with virt-install Source: https://wiki.hypr.land/0.41.0/Getting-Started/Installation This command uses `virt-install` to create a new virtual machine named 'hypr-vm'. It configures the VM to use a downloaded QEMU disk image, allocates 2048MB of memory, and enables SPICE graphics with GL rendering. The `--os-variant archlinux` flag helps optimize settings for Arch Linux. ```bash virt-install \ --graphics spice,listen=none,gl.enable=yes,rendernode=/dev/dri/renderD128 \ --name hypr-vm \ --os-variant archlinux \ --memory 2048 \ --disk ~/Downloads/arch-qemu.qcow2 \ --import ``` -------------------------------- ### Install Hyprland on Fedora using dnf Source: https://wiki.hypr.land/0.33.0/Getting-Started/Installation Installs the Hyprland package on Fedora 39 and Rawhide using the dnf package manager. This command installs a pre-compiled version of Hyprland. ```bash sudo dnf install hyprland ``` -------------------------------- ### Hyprland Input Configuration Example Source: https://wiki.hypr.land/0.27.1/Configuring/Variables A structural example of how input and touchpad settings are nested within the Hyprland configuration. Note the invalid syntax for subcategory definition. ```hyprland input { # ... # ... touchpad { # ... # ... } } # Invalid syntax: input:touchpad { # # ... # } ``` -------------------------------- ### Install Hyprland on Gentoo Source: https://wiki.hypr.land/0.38.0/Getting-Started/Installation Installs the hyprland package from the main tree on Gentoo using the emerge package manager. It also demonstrates enabling the GURU overlay and installing additional Hyprland-related packages. ```bash emerge --ask gui-wm/hyprland eselect repository enable guru emaint sync -r guru emerge --ask gui-apps/hyprlock emerge --ask gui-apps/hypridle emerge --ask gui-libs/xdg-desktop-portal-hyprland emerge --ask gui-apps/hyprland-plugins emerge --ask gui-apps/hyprpaper emerge --ask gui-apps/hyprpicker emerge --ask gui-wm/hyprland-contrib ``` -------------------------------- ### Install Screenshot and Screen Recording Tools Source: https://wiki.hypr.land/0.34.0/FAQ This section lists necessary tools for taking screenshots and recording the screen. It mentions `grim`, `slurp`, `wl-copy` (from `wl-clipboard`), `wf-recorder`, `wl-screenrec`, and `OBS Studio`. ```bash grim slurp wl-copy wf-recorder wl-screenrec OBS Studio ``` -------------------------------- ### Setup Nested Hyprland Debug Session Source: https://wiki.hypr.land/0.27.2/Plugins/Development/Getting-Started Command sequence to set up a nested Hyprland debug session. This involves configuring Hyprland, generating protocols, and building the debug binary, allowing for safe testing and debugging of plugins without affecting the main session. ```bash sudo make config && sudo make protocols && sudo make debug ``` -------------------------------- ### Install Hyprland Binaries (Manual Release) Source: https://wiki.hypr.land/0.40.0/Getting-Started/Installation This snippet details the manual installation process for Hyprland from a release archive. It involves copying binaries and shared libraries to their respective system directories and placing the desktop entry for session management. Updating Hyprland can be done by overwriting these files. ```shell cp Hyprland /usr/bin/ cp hyprctl /usr/bin/ cp hyprpm /usr/bin/ cp libwlroots.so.XX032 /usr/lib/ cp example/hyprland.desktop /usr/share/wayland-sessions/ ``` -------------------------------- ### Install Hyprland Packages on Gentoo Source: https://wiki.hypr.land/0.28.0/Getting-Started/Installation Commands for installing Hyprland and related packages on Gentoo Linux. It includes installing the main Hyprland package, the portal, plugins, and other community-contributed packages from the GURU overlay. ```bash emerge --ask gui-wm/hyprland emerge --ask gui-libs/xdg-desktop-portal-hyprland eselect repository enable guru emaint sync -r guru emerge --ask gui-apps/hyprland-plugins emerge --ask gui-apps/hyprpaper emerge --ask gui-apps/hyprpicker emerge --ask gui-wm/hyprland-contrib ``` -------------------------------- ### Troubleshoot Monitor Configuration in hyprland.conf Source: https://wiki.hypr.land/0.17.0beta/Getting-Started/Quick-start This snippet shows how to configure a specific monitor's settings within the `hyprland.conf` file for persistent display setup. It includes monitor name, resolution, refresh rate, offset, and scale. This method is recommended for permanent display configurations. ```shell monitor=DP-1,1920x1080@60,0x0,1 ``` -------------------------------- ### Build and Install Hyprland (Debug or Custom) Source: https://wiki.hypr.land/0.52.0/Getting-Started/Installation Commands to build Hyprland with a debug build or a custom preset, followed by installation. This includes copying necessary files to system directories. ```shell make debug sudo make install ``` ```shell make && sudo cp ./build/Hyprland /usr/bin && sudo cp ./example/hyprland.desktop /usr/share/wayland-sessions ``` -------------------------------- ### Install Hyprland Build Dependencies on Ubuntu Source: https://wiki.hypr.land/0.25.0/Getting-Started/Installation Installs the necessary build dependencies for Hyprland on Ubuntu using apt-get. This command installs a comprehensive list of development tools and libraries required for compiling Hyprland from source. ```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 libvulkan-dev libvulkan-volk-dev vulkan-validationlayers-dev libvkfft-dev libgulkan-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 ``` -------------------------------- ### Run hyprpaper at Startup Source: https://wiki.hypr.land/0.48.0/Hypr-Ecosystem/hyprpaper Configures hyprpaper to start automatically when Hyprland or uwsm sessions begin. This ensures your wallpaper is set upon login. ```bash # Add to Hyprland config exec-once = hyprpaper # Enable hyprpaper service for uwsm systemctl --user enable --now hyprpaper.service ``` -------------------------------- ### General Window Rule Examples Source: https://wiki.hypr.land/0.51.0/Configuring/Window-Rules Provides a collection of `windowrule` examples demonstrating how to manipulate various window properties such as position, animation, blur, border color, opacity, rounding, and focus behavior for specific applications or window states. ```ini windowrule = move 100 100, class:kitty ``` ```ini windowrule = animation popin, class:kitty ``` ```ini windowrule = noblur, class:firefox ``` ```ini windowrule = move cursor -50% -50%, class:kitty ``` ```ini windowrule = bordercolor rgb(FF0000) rgb(880808), fullscreen:1 ``` ```ini windowrule = bordercolor rgb(00FF00), fullscreenstate:* 1 ``` ```ini windowrule = bordercolor rgb(FFFF00), title:.*Hyprland.* ``` ```ini windowrule = opacity 1.0 override 0.5 override 0.8 override, class:kitty ``` ```ini windowrule = rounding 10, class:kitty ``` ```ini windowrule = stayfocused, class:(pinentry-)(.*) ``` -------------------------------- ### Install Hyprland on Gentoo Source: https://wiki.hypr.land/0.30.0/Getting-Started/Installation Installs Hyprland and related packages on Gentoo Linux using the emerge package manager. This includes the core Hyprland compositor and the xdg-desktop-portal-hyprland integration. ```bash emerge --ask gui-wm/hyprland emerge --ask gui-libs/xdg-desktop-portal-hyprland ``` -------------------------------- ### Install Arch Linux Dependencies for Hyprland Source: https://wiki.hypr.land/0.28.0/Getting-Started/Installation Installs necessary packages for building Hyprland on Arch Linux using yay. Ensure all listed dependencies are present before proceeding. ```shell 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 ``` -------------------------------- ### Autostart Polkit KDE Authentication Agent Source: https://wiki.hypr.land/0.24.1/Useful-Utilities/Must-have Manually starting the KDE authentication agent using 'exec-once' for applications requiring elevated privileges. The exact path may vary between distributions. ```Shell exec-once=/usr/lib/polkit-kde-authentication-agent-1 # or for newer versions: exec-once=/usr/lib64/libexec/polkit-kde-authentication-agent-1 ``` -------------------------------- ### Arch Linux Dependencies for Hyprland Source: https://wiki.hypr.land/0.38.0/Getting-Started/Installation This is a list of packages required to build Hyprland on Arch Linux, typically installed using 'yay'. Ensure all listed dependencies are installed before attempting to build. ```bash 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 hyprlang hyprcursor ``` -------------------------------- ### Hyprland Keybinding Example for Dispatchers Source: https://wiki.hypr.land/0.50.0/Configuring/Master-Layout Example of how to bind Hyprland dispatchers to keys using the 'bind' configuration. This demonstrates using 'layoutmsg' to swap windows with the master and cycle through windows. ```text bind = MOD, KEY, layoutmsg, cyclenext bind = MOD, KEY, layoutmsg, swapwithmaster master ``` -------------------------------- ### Create Hyprland Launcher Script (Shell) Source: https://wiki.hypr.land/0.16.0beta/Getting-Started/Quick-start Creates a wrapper script to launch Hyprland with specific environment variables. This is recommended for custom setups and ensures consistent behavior. It's placed in the user's PATH for easy access. ```shell #!/bin/sh cd ~ export _JAVA_AWT_WM_NONREPARENTING=1 export XCURSOR_SIZE=24 exec Hyprland ``` -------------------------------- ### Install FreeBSD Dependencies for Hyprland Source: https://wiki.hypr.land/0.25.0/Getting-Started/Installation Installs necessary packages on FreeBSD for building Hyprland, including build tools and Wayland-related libraries. Sets environment variables for static linking. ```shell pkg install git pkgconf gmake gcc evdev-proto cmake wayland-protocols wayland libglvnd libxkbcommon libinput cairo pango pixman libxcb pkg install meson jq `pkg rquery %dn wlroots` hwdata libdisplay-info libliftoff export CC=gcc CXX=g++ LDFLAGS="-static-libstdc++ -static-libgcc" ``` -------------------------------- ### Hyprland: Example Expressions for Window Geometry Source: https://wiki.hypr.land/Configuring/Window-Rules Demonstrates Hyprland's expression syntax for dynamic window positioning and sizing. Variables like `monitor_w`, `window_h`, and `cursor_y` are available. Expressions are space-separated. ```hyprland window_w*0.5 ``` ```hyprland (monitor_w/2)+17 ``` ```hyprland (monitor_w*0.5) (monitor_h*0.5) ``` ```hyprland ((monitor_w*0.5)+17) (monitor_h*0.2) ``` -------------------------------- ### Hyprland Window Rules V1 Examples Source: https://wiki.hypr.land/0.16.0beta/Configuring/Window-Rules Illustrates the usage of Hyprland window rules V1 with practical examples. These examples show how to float a window based on its class and move a window based on its title. ```text windowrule=float,^(kitty)$ windowrule=move 0 0,title:^(Firefox)(.*)$ ``` -------------------------------- ### Install hyprland-git from AUR on Arch Linux Source: https://wiki.hypr.land/0.33.0/Getting-Started/Installation Installs the hyprland-git package from the Arch User Repository (AUR), which compiles Hyprland from the latest source. This is suitable for users who want the most up-to-date version. ```bash yay -Syu --devel hyprland-git (AUR) - compiles from latest source hyprland - binary x86 tagged release ``` -------------------------------- ### Enable Systemd User Services for Autostart Source: https://wiki.hypr.land/0.48.0/Useful-Utilities/Systemd-start Provides examples of enabling systemd user services for autostarting applications within a UWSM-managed session. This includes enabling existing services and manually adding dependencies for services missing the 'Install' section. ```shell systemctl --user enable [some-app.service] systemctl --user add-wants graphical-session.target [some-app.service] ``` -------------------------------- ### Manual Hyprland Installation after CMake Build Source: https://wiki.hypr.land/0.19.0beta/Getting-Started/Installation Manually installs Hyprland by copying the built binary and desktop file to their respective system locations after a custom CMake build. Requires `sudo` privileges. ```bash sudo cp ./build/Hyprland /usr/bin && sudo cp ./example/hyprland.desktop /usr/share/wayland-sessions ``` -------------------------------- ### Hyprland Plugin Initialization and API Version (C++) Source: https://wiki.hypr.land/0.47.0/Plugins/Development/Getting-Started This C++ code demonstrates the essential parts of a Hyprland plugin: the API version function and the initialization function. The PLUGIN_API_VERSION ensures compatibility with the Hyprland API, while PLUGIN_INIT handles plugin setup, including essential header version checks and returning plugin metadata. ```cpp #include inline HANDLE PHANDLE = nullptr; // Do NOT change this function. APICALL EXPORT std::string PLUGIN_API_VERSION() { return HYPRLAND_API_VERSION; } APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) { PHANDLE = handle; const std::string HASH = __hyprland_api_get_hash(); // ALWAYS add this to your plugins. It will prevent random crashes coming from // mismatched header versions. if (HASH != GIT_COMMIT_HASH) { HyprlandAPI::addNotification(PHANDLE, "[MyPlugin] Mismatched headers! Can't proceed.", CHyprColor{1.0, 0.2, 0.2, 1.0}, 5000); throw std::runtime_error("[MyPlugin] Version mismatch"); } // ... return {"MyPlugin", "An amazing plugin that is going to change the world!", "Me", "1.0"}; } APICALL EXPORT void PLUGIN_EXIT() { // ... } ``` -------------------------------- ### Build Hyprland from source using Meson Source: https://wiki.hypr.land/0.17.0beta/Getting-Started/Installation This set of commands uses the Meson build system to compile Hyprland. It first configures the build in an '_build' directory, then compiles the project using Ninja, and finally installs the runtime components and man pages. ```bash meson _build ninja -C _build ninja -C _build install --tags runtime,man ``` -------------------------------- ### Install Hyprland Nvidia Patches (AUR) Source: https://wiki.hypr.land/0.26.0/Nvidia These are unofficial AUR packages for Hyprland that include Nvidia-specific patches. Ensure you have an AUR helper installed to use these. Installation requires the nvidia-dkms driver to be set up prior. ```bash hyprland-nvidia (AUR) hyprland-nvidia-git (AUR) ``` -------------------------------- ### Run hyprpaper at startup Source: https://wiki.hypr.land/0.45.0/Hypr-Ecosystem/hyprpaper Configuration snippets to ensure hyprpaper runs automatically when Hyprland starts. This can be done via hyprland.conf or systemd services. ```bash exec-once = hyprpaper ``` ```bash systemctl --user enable --now hyprpaper.service ``` -------------------------------- ### Hyprland Label Configuration Example Source: https://wiki.hypr.land/0.49.0/Hypr-Ecosystem/hyprlock A complete example demonstrating the configuration of a Hyprland label. It includes settings for monitor, text content with user variable substitution, color, font properties, position, and alignment. ```config label { monitor = text = Hi there, $USER color = rgba(200, 200, 200, 1.0) font_size = 25 font_family = Noto Sans position = 0, 80 halign = center valign = center } ``` -------------------------------- ### Install and Configure Pipewire for Screensharing Source: https://wiki.hypr.land/0.22.0beta/Useful-Utilities/Must-have Install Pipewire and Wireplumber (not pipewire-media-session) to enable screensharing functionality in Hyprland. Pipewire is automatically started by the system. ```shell # For Arch Linux pacman -S pipewire wireplumber ``` -------------------------------- ### Hyprland Window Rule Examples Source: https://wiki.hypr.land/0.16.0beta/Configuring/Window-Rules Provides practical examples of Hyprland window rules, demonstrating how to move windows, apply animations, and disable blur based on window properties. ```text windowrule = move 100 100,^(kitty)$ windowrule = animation popin,^(kitty)$ windowrule = noblur,^(firefox)$ ``` -------------------------------- ### Hyprland Bind Flag Syntax and Examples Source: https://wiki.hypr.land/0.47.0/Configuring/Binds Demonstrates the basic syntax for Hyprland bind flags and provides practical examples of their usage. This includes setting up keybinds with specific behaviors like repeating on hold, activating on release, or working with input inhibitors. ```shell bind[flags] = MOD, KEY, exec, COMMAND # Example volume button that allows press and hold, volume limited to 150% binde = , XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+ # Example volume button that will activate even while an input inhibitor is active bindl = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- # Start wofi opens wofi on first press, closes it on second bindr = SUPER, SUPER_L, exec, pkill wofi || wofi # Describe a bind bindd = SUPER, Q, Open my favourite terminal, exec, kitty # Skip player on long press and only skip 5s on normal press bindo = SUPER, XF86AudioNext, exec, playerctl next bind = SUPER, XF86AudioNext, exec, playerctl position +5 ``` -------------------------------- ### Install and Verify hyprctl Source: https://wiki.hypr.land/0.42.0/Configuring/Using-hyprctl Instructions on how to install `hyprctl` if it's not automatically included with the Hyprland installation. It also shows how to verify the installation by running the command in the terminal. ```bash hyprctl ``` ```bash cd /path/to/hyprctl/repo make all sudo cp ./hyprctl /usr/bin ``` -------------------------------- ### Hyprpaper Startup Source: https://wiki.hypr.land/Hypr-Ecosystem/hyprpaper Instructions for running hyprpaper at startup, either via Hyprland's configuration or systemd services. ```APIDOC ## Run at Startup To run hyprpaper at startup edit `hyprland.conf` and add: `exec-once = hyprpaper`. If you start Hyprland with uwsm, you can also use the `systemctl --user enable --now hyprpaper.service` command. ``` -------------------------------- ### Start Notification Daemon in Hyprland Source: https://wiki.hypr.land/0.41.0/Useful-Utilities/Must-have Manually start a notification daemon using `exec-once` for applications like Discord to function correctly. Examples include `dunst`, `mako`, and `swaync`. ```shell exec-once=dunst exec-once=mako exec-once=swaync ``` -------------------------------- ### Custom Hyprland Build and Installation (Debug) Source: https://wiki.hypr.land/0.51.0/Getting-Started/Installation Performs a custom build of Hyprland, specifically a debug build, and installs it. This involves navigating to the repository, running 'make debug', and then installing the executable and Wayland session file. ```shell make debug sudo make install ``` -------------------------------- ### Force Linear Blit for Hybrid Graphics Stuttering Source: https://wiki.hypr.land/0.50.0/Nvidia Addresses stuttering or slow performance in multi-monitor setups with hybrid graphics by forcing linear modifiers on buffers. This environment variable aims to resolve potential blitting issues. ```shell AQ_FORCE_LINEAR_BLIT=1 ``` -------------------------------- ### Hyprland Configuration Versioning Example Source: https://wiki.hypr.land/Configuring/Uncommon-tips--tricks Demonstrates how to use Hyprland's version variables for conditional configuration. This allows developers to write configs that adapt to different Hyprland versions, ensuring compatibility with breaking changes introduced in specific releases. ```hyprlang # hyprlang if HYPRLAND_V_0_53 someValue = 0.53 # hyprlang endif # hyprlang if !HYPRLAND_V_0_53 someValue = 0.52 # hyprlang endif ``` -------------------------------- ### Hyprland Comment Syntax Source: https://wiki.hypr.land/0.35.0/Configuring/Configuring-Hyprland Illustrates how to add comments in Hyprland configuration files. Single '#' starts a comment, while '##' escapes '#' to be treated as a literal character. ```config # This is a comment ``` ```config ## This is not a comment, it's a literal # ``` -------------------------------- ### Ensure Hyprland Desktop Portal Starts Automatically Source: https://wiki.hypr.land/0.22.0beta/Useful-Utilities/Hyprland-desktop-portal This bash script is a 'nuclear option' to ensure `xdg-desktop-portal-hyprland` is running. It kills existing portal processes and then starts the Hyprland-specific portal and the generic one. This can be used with `exec-once` in your Hyprland config. Adjust paths if they differ on your system. ```bash #!/bin/bash sleep 1 killall xdg-desktop-portal-hyprland killall xdg-desktop-portal-wlr killall xdg-desktop-portal /usr/lib/xdg-desktop-portal-hyprland & sleep 2 /usr/lib/xdg-desktop-portal & ``` -------------------------------- ### Install Screenshot Tools Grim and Slurp Source: https://wiki.hypr.land/0.44.0/FAQ Provides instructions to install `grim` for taking screenshots and `slurp` for selecting screen regions. Configuration is mentioned as possible via their respective GitHub pages. ```bash sudo pacman -S grim slurp ``` -------------------------------- ### Start an Authentication Agent for Hyprland Source: https://wiki.hypr.land/0.41.2/Useful-Utilities/Must-have Authentication agents provide graphical prompts for password entry when applications need to elevate privileges. The KDE polkit agent is recommended. Its startup path can vary between distributions. ```shell # Example for Arch Linux (common path): exec-once = /usr/lib/polkit-kde-authentication-agent-1 # Example for Gentoo (common path): # exec-once = /usr/lib64/libexec/polkit-kde-authentication-agent-1 # Other potential paths: # exec-once = /usr/libexec/polkit-kde-authentication-agent-1 # exec-once = /usr/libexec/kf5/polkit-kde-authentication-agent-1 # exec-once = /usr/libexec/kf6/polkit-kde-authentication-agent-1 ``` -------------------------------- ### Hyprland Example Keybinds Source: https://wiki.hypr.land/0.46.0/Configuring/Binds Provides practical examples of how to use Hyprland's bind flags for common actions such as volume control, opening applications, and controlling media playback. These examples illustrate the application of flags like 'e' for repeat, 'l' for locked, 'r' for release, 'd' for description, and 'o' for long press. ```ini # Example volume button that allows press and hold, volume limited to 150% binde = , XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+ # Example volume button that will activate even while an input inhibitor is active bindl = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- # Start wofi opens wofi on first press, closes it on second bindr = SUPER, SUPER_L, exec, pkill wofi || wofi # Describe a bind bindd = SUPER, Q, Open my favourite terminal, exec, kitty # Skip player on long press and only skip 5s on normal press bindo = SUPER, XF86AudioNext, exec, playerctl next bind = SUPER, XF86AudioNext, exec, playerctl position +5 ``` -------------------------------- ### Reload Hyprland Plugin via hyprctl Source: https://wiki.hypr.land/0.52.0/Plugins/Development/Getting-Started Reloads a Hyprland plugin by first unloading it and then loading it again using `hyprctl`. This is a common one-liner for development. ```bash hyprctl plugin unload /absolute/path/to/plugin.so ; hyprctl plugin load /absolute/path/to/plugin.so ``` -------------------------------- ### Enable Hyprland using Nixpkgs Source: https://wiki.hypr.land/0.27.0/Nix/Hyprland-on-NixOS Enables the Hyprland display server by setting the `programs.hyprland.enable` option in your NixOS configuration. This is the simplest way to get started with Hyprland on NixOS. ```nix # configuration.nix { pkgs, ... }: { programs.hyprland.enable = true; } ``` -------------------------------- ### Include Hyprland Plugin API Source: https://wiki.hypr.land/0.23.0beta/Plugins/Development/Getting-Started Include the necessary header file to access the Hyprland plugin API. This is a fundamental step for any Hyprland plugin development. ```cpp #include ``` -------------------------------- ### Hyprland Keybinding Examples for Layoutmsg Source: https://wiki.hypr.land/0.34.0/Configuring/Master-Layout Example Hyprland keybindings demonstrating the use of the `layoutmsg` dispatcher for manipulating the master layout. These examples show how to bind specific layout commands to keyboard shortcuts for quick access. ```ini bind=MOD,KEY,layoutmsg,cyclenext bind=MOD,KEY,layoutmsg,swapwithmaster master ``` -------------------------------- ### Configure Spotify for Wayland Source: https://wiki.hypr.land/0.50.0/Nvidia Sets up Spotify to use Wayland by enabling specific command-line flags through its configuration file. This ensures consistent behavior for the Spotify client. ```ini [spotify] extra_arguments = ["--enable-features=UseOzonePlatform", "--ozone-platform=wayland"] ``` -------------------------------- ### Hyprland Configuration Block Example Source: https://wiki.hypr.land/0.49.0/Configuring/Variables This example demonstrates the correct syntax for defining nested configuration blocks in Hyprland. It shows how to group related settings, such as 'snap' settings within the 'general' block, and highlights the invalid syntax for direct subcategory definition. ```plaintext general { # ... # ... snap { # ... # ... } } Doing `general:snap {` is **invalid**! ``` -------------------------------- ### Configure GTK 3 settings on Wayland Source: https://wiki.hypr.land/0.22.0beta/FAQ Provides a link to a guide on configuring GTK 3 settings specifically for Wayland environments, which may differ from traditional Xorg setups. ```markdown [https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland](https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland) ``` -------------------------------- ### Install Qt Wayland for OBS Source: https://wiki.hypr.land/0.38.0/FAQ If you plan to use OBS Studio for screensharing or recording, ensure you have the `qt6-wayland` package installed. This provides the necessary Wayland backend for Qt applications like OBS. ```bash # Install qt6-wayland package (package name may vary by distribution) ``` -------------------------------- ### Run hyprpaper at Startup Source: https://wiki.hypr.land/0.40.0/Hypr-Ecosystem/hyprpaper Ensures hyprpaper is executed once when Hyprland starts by adding the 'exec-once' command to the hyprland.conf file. ```Shell exec-once = hyprpaper ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.