Exemplo de barra simples

2

Gostaria de ter uma barra de status simples e tranquila para o Sway que uso com o Arch Linux.

As configurações que encontrei usam um programa separado como i3status mas eu gostaria de manter as coisas simples e use status_command mencionado em man sway-bar diretamente.

    
por Matthias Braun 07.10.2018 / 16:09

1 resposta

2

Eu tenho este script em ~/.config/sway/status.sh :

# The Sway configuration file in ~/.config/sway/config calls this script.
# You should see changes to the status bar after saving this script.
# If not, do "killall swaybar" and $mod+Shift+c to reload the configuration.

# Produces "21 days", for example
uptime_formatted=$(uptime | cut -d ',' -f1  | cut -d ' ' -f4,5)

# The abbreviated weekday (e.g., "Sat"), followed by the ISO-formatted date
# like 2018-10-06 and the time (e.g., 14:01)
date_formatted=$(date "+%a %F %H:%M")

# Get the Linux version but remove the "-1-ARCH" part
linux_version=$(uname -r | cut -d '-' -f1)

# Returns the battery status: "Full", "Discharging", or "Charging".
battery_status=$(cat /sys/class/power_supply/BAT0/status)

# Emojis and characters for the status bar
#                                     
por 07.10.2018 / 16:09

Tags