Linux command
sm 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
sm "Hello World!"
Example
sm -i "Hello World!"
Example
sm -f blue "Hello World!"
Example
sm -b "#008888" "Hello World!"
Rotate
sm -r 3 "Hello World!"
Example
echo "Hello World!" | sm -
Kiosk mode
sm -k "Message"
说明
sm (screen-message) displays text as large as possible on the screen, automatically scaling to fill the available space. It creates a fullscreen window with the message, useful for presentations, signage, or displaying information at events. In interactive mode, users can edit the displayed text by typing. Press Escape to clear text, Ctrl-I to invert colors, and Ctrl-Q or double-Escape to quit. When reading from stdin with -, the display updates at form-feed characters (\f).
参数
- -f, --foreground _color_
- Set text color (name or hex code like #RRGGBB)
- -b, --background _color_
- Set background color
- -i, --invert
- Swap foreground and background colors
- -r, --rotate _n_
- Rotate display (n * 90 degrees counterclockwise)
- -k, --kiosk
- Non-interactive mode (ignores input except Ctrl-Q)
- -n, --font _fontspec_
- Specify font family
- -a, --align _alignment_
- Text alignment: 0=center, 1=left, 2=right
- -m, --markup
- Enable Pango markup XML formatting
- -
- Read text from standard input
- -h, --help
- Display help
- -V, --version
- Display version
FAQ
What is the sm command used for?
sm (screen-message) displays text as large as possible on the screen, automatically scaling to fill the available space. It creates a fullscreen window with the message, useful for presentations, signage, or displaying information at events. In interactive mode, users can edit the displayed text by typing. Press Escape to clear text, Ctrl-I to invert colors, and Ctrl-Q or double-Escape to quit. When reading from stdin with -, the display updates at form-feed characters (\f).
How do I run a basic sm example?
Run `sm "Hello World!"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -f, --foreground _color_ do in sm?
Set text color (name or hex code like #RRGGBB)