← 返回命令列表

Linux command

i3-nagbar 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Display a warning message

i3-nagbar -t warning -m "[message]"

Display error message

i3-nagbar -t error -m "[message]"

Add button with terminal action

i3-nagbar -m "[message]" -b "[button text]" "[command]"

Add button with direct action

i3-nagbar -m "[message]" -B "[button text]" "[command]"

Show on primary monitor

i3-nagbar -p -m "[message]"

Specify font

i3-nagbar -f "[pango:monospace 10]" -m "[message]"

说明

i3-nagbar displays a notification bar for the i3 window manager. Used by i3 to report configuration errors and for user-defined warnings or confirmations. Supports buttons that execute shell commands either in a terminal or directly.

参数

-m _message_
Message to display.
-t _type_
Type: warning or error.
-b _button_ _action_
Button that runs action in terminal.
-B _button_ _action_
Button that runs action directly.
-f _font_
Font specification.
-p
Show on primary monitor.
-v
Verbose mode.

FAQ

What is the i3-nagbar command used for?

i3-nagbar displays a notification bar for the i3 window manager. Used by i3 to report configuration errors and for user-defined warnings or confirmations. Supports buttons that execute shell commands either in a terminal or directly.

How do I run a basic i3-nagbar example?

Run `i3-nagbar -t warning -m "[message]"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -m _message_ do in i3-nagbar?

Message to display.