SwayOS
SwayOS是一个面向生产力的极简主义和超级优雅的桌面程序,适用于类Unix操作系统。它适用于办公室,互联网,系统管理和编程工作,开箱即用。
快捷键
WIN + numbers : 切换工作区 / 打开预览 ( 长按 )
WIN + SPACE : 打开程序启动器
WIN + SHIFT + Q : 关闭当前窗口
WIN + SHIFT + numbers : 将当前窗口移动至工作区
WIN + arrows : 将相邻窗口设置为焦点
WIN + SHIFT + arrows : move window to a new position inside the workspace
WIN + R : resize mode, if there are more windows in a workspace you can press WIN + R, resize window with arrows, then press ESC
WIN + ENTER : 打开终端程序
WIN + SHIFT + ENTER : 打开浏览器
ALT + SPACE : switch keyboard layout if there are more
WIN + PrtScr : 窗口截图
WIN + SHIFT + SPACE : toggle/untoggle floating over a window
描述
SwayOS 是一个面向生产力、资源高效且优雅的桌面层,适用于类 unix 操作系统。它使用平铺窗口管理器,因此您不必再处理最小化/最大化/移动窗口。窗口会自动放置并始终打开。为了避免拥挤,您将窗户放在工作区上。工作区编号位于左上角。通过按 WIN + 数字选择工作区。WIN + 1 选择第一个工作区,WIN + 0 选择第 10 个工作区,WIN + SHIFT + 1 选择第 11 个工作区。您还可以通过单击其编号来选择工作区。使用 WIN + SHIFT + W 关闭应用程序。要打开应用程序,请按 WIN + 空格键打开启动器。键入要启动的程序名称,然后按回车键。An alternative way to open an application is to press it’s icon in the top right corner. The magnifier glass icon opens the launcher you opened before with WIN + SPACE. Press ESC to close it. The prompt icon opens the terminal. Another way to open the terminal is to press WIN + ENTER. The folder icon opens the file manager. The chrome icon opens google chrome. Another way to open google chrome is to press WIN + SHIFT + ENTER. The page icon opens LibreOffice. The media file icon open MultiMedia File Manager. The music icon opens Visual Music Player. The printer icon opens the printer settings. The shield icon opens the app store/software updates. The workspaces icon opens the workspace overview. Another way to open it is to long press workspace selector buttons, for example WIN + 1 The settings icon opens the system settings menu where you can set volume, display brightness, open audio settings, open display settings, select wifi channel, select bluetooth device and you can exit you session in different ways. If you have a lot of workspaces open with a lot of windows, use the workspace overview app, by long pressing WIN + workspace numbers or the workspace overview icon in the status bar. System information is always visible in the center of the status bar, from left to right : the cpu usage, available memory, available free space, battery percentage, display brightness, volume. You can adjust brightness and volume by just scrolling over their icon, it’s a nice shortcut if you don’t want to open up the system menu. You can install SwayOS on any kind of unix-like OS. The installer image downloadable from swayos.github.io is arch linux based, for further help, documentation and troubleshooting please use arch linux site/forums.
安装
SwayOS 安装脚本可用于 Void Linux、Arch Linux、Debian (>=12) 和 FreeBSD。从这些系统中任选一个,确保网络连接正常。然后执行以下命令
curl -O https://swayos.org/setup
bash setup
or
wget -O https://swayos.org/setup
bash setup
or install wget or curl if none of the above works
我推荐Void Linux,因为它的极简主义,速度和优雅符合SwayOS的理念。
Optional Post-installation todos
- set font sizes according to your display size and resolution in foot and sway and waybar config files
- setup pipewire support in chrome, go to url chrome://flags/#enable-webrtc-pipewire-capturer
- set google chrome’s appereance to GTK+ so it will use the dark theme
- set locale to your language ( will be added to installer later )
- set your keyboard language in sway config ( will be added to installer later )
- remove export WLR_NO_HARDWARE_CURSORS=1 from .zshrc ( will be added to installer later )
- remove swayos_setup_* log files from your home directory
- don’t forget to check for updates regularly!
- to open root GTK apps from wayland use sudo -EH appname
- on void linux install vaapi drivers for you gpu ( intel-video-accel, mesa-intel-dri ) for video acceleration
SwayOS 的 UI 结构
SwayOS的UI有两个部分:状态栏(默认在顶部)和状态栏下的窗口区域。状态栏从左到右有以下部分:工作区编号块(指示器)、硬件状态块(默认在中间)、快速启动图标块、硬件设置图标块和右侧的时钟/日历。
图标从右到左:
- 系统菜单(音量、亮度、音频设置、显示设置、wifi、蓝牙、会话处理)
- 工作区概述
- 应用商店/软件更新
- 蓝牙控制
- 无线设置
- 打印机设置
- 可视音乐播放器
- 多媒体文件管理器/查看器
- libreoffice
- 谷歌浏览器
- 文件管理器
- 终端
- 应用程序启动器
使用SwayOS
默认安装后包含以下程序 :
- Google Chrome浏览器
- LibreOffice
- Nautilus 文件管理器
- Foot终端程序
- Visual Music Player音乐播放器
- 多媒体文件管理器,用于媒体/文档查看和管理
您可以通过按 WIN 键 + 空格键或单击快速启动图标来打开应用程序。如果您需要其他任何东西,请单击状态栏右侧的盾牌图标打开应用商店,搜索它并单击绿色的下载按钮。
推荐多媒体软件 :
Photopea for Photoshop replacement ( www.photopea.com )
Inkscape for vector graphics ( Illustrator replacement )
Natron for video post processing ( After Effects replacement )
Davinci Resolve for video editing ( Premiere Pro replacement )
Shotcut for simpler video editing
Blender for 3D modelling and rendering ( 3DSMax/Cinema 4D replacement )
Steam for gaming. Enable proton in its settings and you can play 95% of all windows games
推荐系统工具 :
tlp for energy saving features
nvidia for nvidia/nvidia-intel hybrid gpus
ati for ati/ati-intel hybrud gpus
noisetorch for noise cancellation during meetings
qemu and virt-manager for virtualization
swaync for notification center
You should create a Documents and a Downloads folder under your home directory and save work and downloaded files there. The file manager opens in floating mode so you can drag and drop files on your applications if needed if you open the file managaer in the same workspace.
If you don’t have multimedia keys the you can change volume and display brightness by going over the lcd and vol entries in the center of the status bar and do a scroll over them.
各个组件和配置文件
- sway wm : Sway窗口管理器, 配置文件在
/home/youruser/.config/sway/config
, 更多配置可参考sway wiki - waybar : 状态栏管理, 配置文件在
/home/youruser/.config/waybar/config
, 更多配置可参考waybar wiki - wofi : 程序启动器, 配置文件在
/home/youruser/.config/wofi/config
,按 WIN + SPACE 快捷键唤醒。 - wob : Volume/Brightness overlay bar, visible when you change volumes with the dedicated keys on your laptop, configurable in sway config
- sov : Workspaces overview layer, visible when you press the WIN + numbers for a longer period or the workspaces icon in the status bar, config file is /home/youruser/.config/sway-overview/config
- wcp : Wayland Control Panel, visible when you press WIN + p or the settings icon in the status bar next to the clock, configurable in sway config
- swaylock : Screen locker, locks automatically or lock manually from the shutdown menu, set up in sway wm’s config
- swayidle : Idle time handler, locks screen automatically after 10 minuter, set up in sway wm’s config
- grim : Screen capture utility, activated with WIN + PRTSCR, set up ins sway wm’s config
- slurp : Screen region capture utility, activated with WIN + SHIFT + PRTSCR, set up ins sway wm’s config
- iwgtk : wifi selector app, no config file
- blueman : bluetooth selector app, no config file
- brightnessctl : lcd brightness control, set up ins sway wm’s config
- terminus-font : default font for desktop and terminal
- ubuntu-font : default font for applications
- pipewire : audio/video server, needed for chrome desktop sharing and faster bluetooth audio
- pamac-manager : app store/system updater
- pavucontrol : volume control ui
- polkit-gnome : GUI Authentication agent
- wdisplays : display manager
- wlogout : logout manager
- zsh : shell
- gnome-system-monitor : activity/process monitor ui
- qt5-style-plugings : to make qt apps look like gtk2 apps
- system-config-printer : printer manager
- visual music player : offline music/video player, parses files under ~/Music
- multimedia file manager : media/document file viewer/player/manager
常见问题
-
如何更改显示器亮度?
with brightness keys
by moving mouse over lcd pecentage in status bar and scroll -
如何更改音量?
with volume keys
by moving mouse over volume percentage in status bar and scroll
by clicking on the audio icon in the status bar -
如何挂载外部 USB 设备?
Just click on the file manager icon in the status bar, it will auto-mount connected usb drives. -
如何将新图标/应用程序添加到快速启动菜单
Edit waybar config at /home/youruser/.config/waybar/config , add new custom blocks for your desired applications, get symbols from (fontawesome)[https://fontawesome.com/search?s=solid%2Cbrands]. -
如何添加多个键盘输入源?
Edit sway config, add
input " your wanted device id " {
...
xkb_layout "us,hu"
xkb_options "grp:alt_space_toggle"
...
}
-
为什么谷歌浏览器而不是chromium?
SwayOS’s intention is to create a user-friendly tiling window manager experience for less experienced users/switchers, and for that Libreoffice and Google sync enabled chrome is mandatory, spotify and netflix are also a reason. -
在哪里可以查看所有已安装的应用程序?
Launch app store, under Installed you see all programs your system have and among them there are your desktop apps. -
How to make a specific program open in a floating window always?
Enable the program to be a floating in sway config. -
Chrome says its out of date
Open the app store, open preferences, go to third-party, Enable AUR support and enable check for updates
它是如何工作的
SwayOS基于Sway窗口管理器,这是一个窗口管理器和合成器,它为程序提供像素缓冲区,他们可以在其中绘制内容,并将这些缓冲区展平到屏幕上。它是一个独立的程序,可以手动或自动启动。
在 SwayOS 中,如果您登录默认控制台( tty0 或 ttyv0 ),则它会自动启动。如果你检查你的.zshrc(~/.zshrc)的内容,你会看到“exec sway”。它需要设置一个名为 XDG_RUNTIME_DIR 的环境变量。
这指向 sway 和其他程序在会话期间放置其临时文件的文件夹。在systemd系统上,它通常是/run/user/$UID,在SwayOS中是~/.config/xdg。在执行 sway 之前,它也在 .zshrc 中设置。
后续计划
重新编译第三方内容的 update.sh