hyprland 配置
安装软件包 sudo apt update sudo apt install -y \ hyprland waybar \ kitty dolphin \ wofi firefox-esr spectacle \ pavucontrol blueman brightnessctl wl-clipboard \ hyprpaper swayidle 检查显示器名称并写入配置 先运行: hyprctl monitors 示例输出: Monitor eDP-1 (ID 0): 1920x1080@60.000Hz Monitor HDMI-A-1 (ID 1): 2560x1440@144.000Hz 配置文件写法(~/.config/hypr/hyprland.conf): monitor=eDP-1,1920x1080@60,0x0,1 monitor=HDMI-A-1,2560x1440@144,1920x0,1 swayidle 用法 在配置中添加: exec-once = swayidle -w \ timeout 300 'hyprctl dispatch dpms off' \ resume 'hyprctl dispatch dpms on' 解释: -w :阻塞运行,保证进程驻留 timeout 300 'cmd' :空闲 300 秒执行命令(这里是关闭屏幕) resume 'cmd' :恢复活动后执行命令(这里是点亮屏幕) 输入设备配置 input { kb_layout = us touchpad { natural_scroll = true # 反向滚动 } } 快捷键设置 # 基础 bind=SUPER,RETURN,exec,kitty bind=SUPER,E,exec,dolphin bind=SUPER,B,exec,firefox bind=SUPER,D,exec,wofi --show drun # 窗口管理 bind=SUPER,Q,killactive bind=SUPER,F,fullscreen # 真全屏 bind=SUPER,SHIFT,F,fullscreen,1 # maximized (伪全屏,保留UI) bind=SUPER,SPACE,togglefloating bind=SUPER,P,togglepseudo # 浮动窗口操作(仅对浮动窗口有效) bind=SUPER,arrowup,moveactive,0 -50 bind=SUPER,arrowdown,moveactive,0 50 bind=SUPERCTRL,arrowup,resizeactive,0 -50 bind=SUPERCTRL,arrowdown,resizeactive,0 50 # 截图(Spectacle) bind=SUPER,SHIFT,S,exec,spectacle bind=SHIFT,PRINT,exec,spectacle -f -o ~/Pictures # 全屏保存 bind=CTRL,PRINT,exec,spectacle -c # 截图复制到剪贴板 # 音量 bind=XF86AudioRaiseVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ +5% bind=XF86AudioLowerVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ -5% bind=XF86AudioMute,exec,pactl set-sink-mute @DEFAULT_SINK@ toggle # 亮度 bind=XF86MonBrightnessUp,exec,brightnessctl s +10% bind=XF86MonBrightnessDown,exec,brightnessctl s 10%- 窗口美化 decoration { active_opacity = 0.9 inactive_opacity = 0.8 blur = yes blur_size = 5 blur_passes = 3 blur_new_optimizations = on rounding = 8 } 说明: ...