Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn’t sacrifice on its looks.
0. 安装
这可能是最麻烦的一部分了
如果您的Debian不是sid,那么您可能需要手动安装大量软件
每天的依赖都不一定一样,请根据您meson的提示手动安装缺少的dev包
请先去看Installation Guide
如果您还想让您的Nvidia显卡正常工作,那我只能祝福您可以顺利安装,然后请您根据这篇教程猜怎么打Patch
正式操作
开始
找块好地方(就是你下载这一堆src的文件夹)
不过咱还是先来装依赖吧
sudo apt install -y build-essential git ninja-build meson libwlroots-dev libcairo2-dev libpango1.0-dev libtomlplusplus-dev
hyprlang
git clone https://github.com/hyprwm/hyprlang.git
cd hyprlang
cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
cmake --build ./build --config Release --target hyprlang -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
sudo cmake --install ./build
libdrm
debian的libdrm更新很慢,有时候就没办法编译,仅在没办法编译,而且缺的就是libdrm的时候才需要手动编译
git clone https://gitlab.freedesktop.org/mesa/drm.git --depth=1 libdrm &&
cd libdrm &&
mkdir build &&
cd build &&
meson setup -Dudev=true \
-Dvalgrind=disabled \
.. &&
ninja
sudo ninja install
Hyprland
git clone --recursive https://github.com/hyprwm/Hyprland
cd Hyprland
cd subprojects
git clone https://gitlab.freedesktop.org/emersion/libdisplay-info
cd ..
meson build
ninja -C build
sudo ninja -C build install
参考了这段讨论
如果安装完成了就可以继续操作了(您可以看看有没有Hyprland二进制/去登录界面看看有没有Hyprland
安装Hyprland下常用工具
不一定都要安装,所以没有一键
- kitty (终端)
- network-manager-gnome (提供连接wifi功能)
- waybar (提供顶栏,可能还需要
fonts-font-awesome
) - wofi (wayland优化的rofi,提供软件启动)
1. 配置
在~/.config/hypr/hyprland.conf
下是您的配置文件
官方示例文件
看到exec-once
一行,如果您在上面安装了network-manager-gnome,请加入nm-applet --indicator &
,你有多少个需要启动的软件就写多少个exec-once
如果您的键盘上有音量控制键,麦克风控制键,亮度控制键您可以分别安装wpctl
,pactl
,brightnessctl
加入下面的内容
为了配置文件整齐,建议您将此块内容放在文件最后面bind区域
# Volume
bind = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bind = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bind = , XF86AudioMute, exec, pactl set-sink-mute
# Microphone
@DEFAULT_SINK@ toggle
bind = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle
# Brightness
bind = , XF86MonBrightnessDown, exec, brightnessctl set 5%-
bind = , XF86MonBrightnessUp, exec, brightnessctl set 5%+
如果您想让NumLock自动打开,请在hyprland.conf
中input{}
段内添加numlock_by_default = true
(参考)
2. 示例
3. 其他
wayland下输入法
fcitx5是咱自己在wayland下用过的最好用的输入法。安装很简单,您可以自己去网上搜索。
具体来说,配置如下:
~/.config/hypr/hyprland.conf
exec-once=fcitx5-remote -r
exec-once=fcitx5 -d --replace
exec-once=fcitx5-remote -r
windowrule = pseudo,fcitx
软件支持
此段落不受到经常更新,如果有问题请联系我
软件 | 怎么支持输入法 | 关键参数 |
---|---|---|
chrome | /usr/bin/google-chrome --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime |
–enable-wayland-ime |
code | /usr/share/code/code --ozone-platform-hint=x11 --unity-launch |
–ozone-platform-hint=x11 |
剪贴板
Hyprland下也有很多剪贴板管理工具,我使用的是cliphist
,在debian官方源有提供
具体配置:
~/.config/hypr/hyprland.conf
exec-once = wl-paste --type text --watch cliphist store #Stores only text data
exec-once = wl-paste --type image --watch cliphist store #Stores only image databind =
$mainMod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy
按下mainMod+V就会在wofi中弹出剪贴板历史
hyprpaper
很好用的壁纸提供程序
安装
能编译Hyprland以后就可以编译了
git clone https://github.com/hyprwm/hyprpaper
cd hyprpaper
make all
sudo cp build/hyprpaper /usr/bin/hyprpaper
Comments | NOTHING