Skip to content
On this page
开机启动 Sway [[M1 Sway 全纪实]]
判断启动 [[tty1]] 的时候启动
取决于使用的 shell ,例如我使用的 bash 需要在 ~/.bash_profile 添加:
bash
if [ "$(tty)" = "/dev/tty1" ]; then
    exec sway
fi
Sway 使用 Flameshot [[M1 Sway 全纪实]]
安装 yay -S flameshot
在 sway 启动前注入一些环境变量,来源Sway and wlroots support
bash
if [ "$(tty)" = "/dev/tty1" ]; then
    export SDL_VIDEODRIVER=wayland
    export _JAVA_AWT_WM_NONREPARENTING=1
    export QT_QPA_PLATFORM=wayland
    export XDG_CURRENT_DESKTOP=sway
    export XDG_SESSION_DESKTOP=sway
    exec sway
fi
快捷键触发截图,在 ~/.config/sway/config 添加 bindsym $mod+Shift+a exec flameshot gui

Last updated: