[ad_1]
有时在关键活动中,使用重叠的窗口会适得其反。 您可能会发现像 sway 这样的平铺窗口管理器是一个不错的选择。
Sway 是一个平铺的 Wayland 合成器。 它具有兼容现有 i3 配置的优点,因此您可以使用它来替换 i3 并使用 Wayland 作为显示协议。
安装摇摆
要设置摇摆,请打开一个新终端并键入以下命令
sudo dnf install sway
安装完成后,注销您的用户会话。 在登录屏幕上,选择您的用户帐户。 在输入密码之前,请从菜单中选择 Sway,如下图所示。
登录后,您的桌面如下所示:
配置
要开始配置,请将默认配置复制到您的用户目录中。 使用以下命令执行此操作。
mkdir -p .config/sway cp /etc/sway/config ~/.config/sway/
Sway 是高度可配置的。 建议你阅读项目的 维基页面 微调您的设置。 例如,要更改键盘布局,请打开一个新终端并运行以下命令:
$ swaymsg -t get_inputs [[email protected] ~]$ swaymsg -t get_inputs Input device: VirtualPS/2 VMware VMMouse Type: Mouse Identifier: 2:19:VirtualPS/2_VMware_VMMouse Product ID: 19 Vendor ID: 2 Libinput Send Events: enabled Input device: VirtualPS/2 VMware VMMouse Type: Mouse Identifier: 2:19:VirtualPS/2_VMware_VMMouse Product ID: 19 Vendor ID: 2 Libinput Send Events: enabled Input device: AT Translated Set 2 keyboard Type: Keyboard Identifier: 1:1:AT_Translated_Set_2_keyboard Product ID: 1 Vendor ID: 1 Active Keyboard Layout: Portuguese (Brazil) Libinput Send Events: enabled
复制标识符键盘代码。 使用文本编辑器打开 ~/.config/sway/config 文件并相应地编辑配置:
## Input configuration input "1:1:AT_Translated_Set_2_keyboard" { xkb_layout br }
Save 设置。 要重新加载配置,请按 超级+Shift+c. (通常情况下 极好的 键映射到 PC 上的徽标键。)
路标
Sway 的默认状态栏可能没有你想要的所有功能。 幸运的是,Waybar 是一个很好的替代品。 要安装,请运行以下命令。 (但是请注意,COPR 不是官方的 Fedora 存储库,不受支持 Fedora 项目。)
sudo dnf copr enable alebastr/waybar sudo dnf install waybar
打开您的 ~/.config/sway/config 文件。 像这样编辑栏配置:
bar { swaybar_command waybar }
重新加载配置,您现在将看到运行中的路标,如下所示。
要自定义路径栏,您可以访问此 维基页面 了解更多细节和想法。
欢快的
Alacritty 是一个使用 GPU 进行渲染的终端模拟器,是 urxvt 的一个很好的替代品。 要安装运行以下几行
sudo dnf copr enable pschyska/alacritty
sudo dnf install alacritty
要将其启用为默认终端模拟器,请编辑您的 ~/.config/sway/config。 改变这一行:
set $term urxvt256c-ml
到:
set $term alacritty
重新加载您的配置。
当您打开一个新终端时 超级+C, alacritty 将打开,如下图所示:
[ad_2]