migrate to i3blocks

This commit is contained in:
thek4n 2025-05-19 18:47:33 +03:00
parent 84350f5842
commit c655e40f6d
4 changed files with 51 additions and 84 deletions

View File

@ -11,7 +11,7 @@ ssh:
git:.config/git
ranger:.config/ranger
gpg:
i3:.xinitrc .xprofile .Xresources .config/i3 .config/i3status .local/bin/i3status_wrapper .config/rofi .config/picom .local/bin/slm .local/bin/slm_rofi.sh .local/bin/power_rofi.sh .local/bin/i3_switch_workspace.sh .config/mimeapps.list .local/bin/screenshot
i3:.xinitrc .xprofile .Xresources .config/i3 .config/i3blocks .config/rofi .config/picom .local/bin/slm .local/bin/slm_rofi.sh .local/bin/power_rofi.sh .local/bin/i3_switch_workspace.sh .config/mimeapps.list .local/bin/screenshot
bat:.config/bat
font:
termux:.termux

View File

@ -221,7 +221,7 @@ bar {
output primary
output nonprimary
tray_output primary
status_command exec ~/.local/bin/i3status_wrapper
status_command i3blocks
}
bindsym Print exec --no-startup-id screenshot select copy

View File

@ -0,0 +1,49 @@
# Общие настройки
command=$SCRIPT_DIR/$BLOCK_NAME
separator_block_width=15
markup=none
# Цвета (в формате #RRGGBB)
color=#FFFFFF
# Интервал обновления (в секундах)
interval=5
# Блоки (модули)
[time]
command=date '+%H:%M:%S %d.%m.%Y'
label=
interval=5
color=#f1fa8c
[memory]
command=free -h | awk '/^Mem/ {print $3 "/" $2}' | sed 's/i//g'
label=
interval=5
color=#50fa7b
[cpu_usage]
command=top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print 100 - $1"%"}'
label=
interval=5
color=#ff79c6
[disk]
command=df -h / | awk '/\// {print $4}'
label=
interval=30
color=#8be9fd
[network]
command=echo "$(LANG=C nmcli -t -f active,ssid dev wifi | grep '^yes' | cut -d: -f2) $(ip -o -4 addr show | awk '{print $4}' | cut -d/ -f1 | head -1)"
label=
interval=10
color=#bd93f9
[volume]
command=amixer get Master | awk -F'[][]' '/%/ {print $2}' | head -n 1
label=
interval=1
signal=10 # Для обновления по сигналу (например, после изменения громкости)

View File

@ -1,82 +0,0 @@
general {
colors = true
interval = 5
output_format = i3bar
}
order += "wireless _first_"
order += "ethernet _first_"
order += "disk /"
order += "disk /home"
order += "memory"
order += "cpu_usage"
order += "cpu_temperature 0"
order += "tztime holder__headphones"
order += "battery all"
order += "volume master"
order += "tztime local"
wireless _first_ {
format_up = " (%quality at %essid %frequency) %ip"
format_down = " down"
color_bad = "#454545"
}
ethernet _first_ {
format_up = " %ip"
format_down = " down"
}
battery all {
format = "%status %percentage"
last_full_capacity = false
format_down = ""
status_chr = "⚡"
status_bat = "🔋"
status_unk = "?"
status_full = ""
path = "/sys/class/power_supply/BAT%d/uevent"
low_threshold = 15
}
disk "/" {
format = "/ %used/%total"
}
disk "/home" {
format = " %used/%total"
}
memory {
format = " %used/%total"
threshold_degraded = "1G"
threshold_critical = "200M"
format_degraded = "MEMORY < %available"
}
cpu_usage {
format = " %usage"
}
cpu_temperature 0 {
format = " %degrees°"
max_threshold = "80"
format_above_threshold = " %degrees"
}
tztime local {
format = " %d.%m.%y %a  %H:%M"
}
volume master {
format = " %volume"
format_muted = ": muted %volume"
device = "default"
mixer = "Master"
mixer_idx = 0
}
tztime holder__headphones {
format = "holder__headphones"
}