Linux command
swaybar 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start swaybar
swaybar
Start with specific bar ID
swaybar -b [bar-0]
Start with custom config
swaybar -c [~/.config/sway/config]
Enable debug logging
swaybar -d
说明
swaybar is the default status bar for the Sway Wayland compositor. It displays workspace buttons, window titles, and a customizable status area. The status bar is typically started automatically by Sway based on the bar configuration in the sway config file. The status area content is generated by executing a status_command, which outputs text or JSON to stdout. Swaybar supports the i3bar JSON protocol for structured status output with colors and click events. It also provides a system tray for applications using the StatusNotifierItem protocol. Configuration including colors, position, fonts, and behavior is done through the sway configuration file within a bar block.
参数
- -b, --bar_id _id_
- Bar ID for which to get the configuration.
- -c, --config _file_
- Path to sway configuration file.
- -d, --debug
- Enable debug logging.
- -h, --help
- Display help message.
- -v, --version
- Display version information.
FAQ
What is the swaybar command used for?
swaybar is the default status bar for the Sway Wayland compositor. It displays workspace buttons, window titles, and a customizable status area. The status bar is typically started automatically by Sway based on the bar configuration in the sway config file. The status area content is generated by executing a status_command, which outputs text or JSON to stdout. Swaybar supports the i3bar JSON protocol for structured status output with colors and click events. It also provides a system tray for applications using the StatusNotifierItem protocol. Configuration including colors, position, fonts, and behavior is done through the sway configuration file within a bar block.
How do I run a basic swaybar example?
Run `swaybar` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -b, --bar_id _id_ do in swaybar?
Bar ID for which to get the configuration.