Sway no Arch Linux: configuração Inicial sem enrolação

Publicado por Xerxes em 23/04/2026

[ Hits: 66 ]

 


Sway no Arch Linux: configuração Inicial sem enrolação





Linux: Sway no Arch Linux: configuração Inicial sem enrolação

Pré-requisitos e Instalação

Instalação do compositor, terminal (foot), menu (wmenu), barra (waybar) e utilitários essenciais.

sudo pacman -S --needed sway swaybg swayidle swaylock foot wmenu polkit xorg-xwayland waybar networkmanager network-manager-applet ttf-font-awesome pavucontrol grim slurp wl-clipboard swappy mako polkit-gnome wlsunset cliphist

systemctl enable --now NetworkManager

Configuração do Terminal (foot)

Configuração de transparência.

mkdir -p ~/.config/foot cat << 'EOF' > ~/.config/foot/foot.ini [colors-dark] background=1e1e1e alpha=0.85 EOF

Configuração da Waybar

Módulos de volume interativo, rede, CPU, RAM, disco e relógio no topo.

mkdir -p ~/.config/waybar cat << 'EOF' > ~/.config/waybar/config { "layer": "bottom", "position": "top", "height": 30, "modules-left": ["sway/workspaces", "sway/mode"], "modules-center": ["sway/window"], "modules-right": ["pulseaudio", "network", "cpu", "memory", "disk", "tray", "clock"], "pulseaudio": { "format": "VOL: {volume}%", "format-muted": "MUDO", "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle", "on-click-right": "pavucontrol", "scroll-step": 5 }, "network": { "format-wifi": "WIFI: {essid} ({signalStrength}%)", "format-ethernet": "ETH: {ipaddr}", "format-disconnected": "Desconectado", "tooltip-format": "{ifname} via {gwaddr}", "on-click": "foot -e nmtui" }, "cpu": { "format": "CPU: {usage}%" }, "memory": { "format": "RAM: {}%" }, "disk": { "format": "HD: {percentage_used}%", "path": "/" }, "tray": { "spacing": 10 }, "clock": { "format": "{:%d/%m/%Y %H:%M}", "tooltip-format": "<big>{:%B de %Y}</big>\n<tt><small>{calendar}</small></tt>" } } EOF

cat << 'EOF' > ~/.config/waybar/style.css * { font-family: monospace, "Font Awesome 6 Free"; font-size: 13px; } window#waybar { background-color: #323232; color: #ffffff; } #workspaces button { padding: 0 8px; background-color: transparent; color: #ffffff; border: none; } #workspaces button.focused { background-color: #5c5c5c; } #pulseaudio, #network, #cpu, #memory, #disk, #clock, #tray { padding: 0 10px; } EOF

Configuração do Sway

Configuração centralizada com suporte a 100Hz (FreeSync), tema personalizado, utilitários em segundo plano e atalhos customizados. O arquivo abaixo sobrescreve a configuração padrão.

mkdir -p ~/.config/sway cat << 'EOF' > ~/.config/sway/config set $mod Mod4 set $left h set $down j set $up k set $right l set $term foot set $menu wmenu-run

# Integração do portal e Layout include /etc/sway/config.d/* exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway input * xkb_layout "br"

# Monitor e Papel de Parede (Exemplo para RX 5700 XT) output DP-3 mode 2560x1440@100Hz adaptive_sync on output * bg ~/Imagens/wallpaper.jpg fill

# Visual: Gaps e Bordas vermelhas smart_gaps off gaps inner 3 gaps outer 1 default_border pixel 4 default_floating_border pixel 4 for_window [app_id=".*"] border pixel 4 for_window [class=".*"] border pixel 4 client.focused #8B0000 #8B0000 #FFFFFF #8B0000 #8B0000

# Daemons bar { swaybar_command waybar } exec_always pkill nm-applet; nm-applet --indicator & exec mako exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec wlsunset -l -8.12 -L -35.09 exec wl-paste --type text --watch cliphist store exec wl-paste --type image --watch cliphist store

# Atalhos: Sistema bindsym $mod+Return exec $term bindsym $mod+d exec $menu bindsym $mod+Shift+q kill bindsym $mod+Shift+c reload bindsym $mod+Shift+e exec swaynag -t warning -m 'Sair do Sway?' -B 'Sim' 'swaymsg exit'

# Atalhos: Aplicativos e Utilitários bindsym $mod+b exec google-chrome-stable bindsym Print exec grim -g "$(slurp)" - | swappy -f - bindsym Shift+Print exec grim - | swappy -f - bindsym $mod+c exec cliphist list | wmenu | cliphist decode | wl-copy

# Atalhos: Navegação bindsym $mod+$left focus left bindsym $mod+$down focus down bindsym $mod+$up focus up bindsym $mod+$right focus right bindsym $mod+Shift+$left move left bindsym $mod+Shift+$down move down bindsym $mod+Shift+$up move up bindsym $mod+Shift+$right move right

# Atalhos: Workspaces bindsym $mod+1 workspace number 1 bindsym $mod+2 workspace number 2 bindsym $mod+3 workspace number 3 bindsym $mod+Shift+1 move container to workspace number 1 bindsym $mod+Shift+2 move container to workspace number 2 bindsym $mod+Shift+3 move container to workspace number 3

# Atalhos: Layout bindsym $mod+s layout stacking bindsym $mod+w layout tabbed bindsym $mod+e layout toggle split bindsym $mod+f fullscreen bindsym $mod+Shift+space floating toggle bindsym $mod+space focus mode_toggle EOF

Autostart via TTY

Início automático do compositor ao realizar login no console.

cat << 'EOF' >> ~/.bash_profile

if [ -z "$WAYLAND_DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then exec sway fi EOF
Outras dicas deste autor

Java da Oracle no Google Chrome

[Resolvido] VirtualBox can't enable the AMD-V extension

Cinnamon no Ubuntu 14.04 LTS

Ubuntu, Xubuntu e Kubuntu - tudo em um

Can't locate Unicode/EastAsianWidth.pm in @INC [Resolvido]

Leitura recomendada

Tema Nodoka no Fedora Xfce Spin

Liberando o usuário root para acesso remoto via ssh

MP3 no XMMS - Fedora Core 2

Renomeando um usuário no Linux

Aumentando a praticidade do Syslog

  

Comentários

Nenhum comentário foi encontrado.



Contribuir com comentário




Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts