first commit

This commit is contained in:
hdvt
2026-03-28 16:48:16 +00:00
commit 0c097ebf97
15478 changed files with 850272 additions and 0 deletions

123
waybar/config.jsonc Normal file
View File

@@ -0,0 +1,123 @@
{
"position": "bottom",
"modules-left": ["custom/arch", "hyprland/workspaces", "hyprland/window"],
"modules-center": ["clock"],
"modules-right": ["group/tray-drawer", "hyprland/language", "battery", "temperature"],
"group/tray-drawer": {
"orientation": "horizontal",
"drawer": {
"transition-duration": 500,
"children-class": "tray-child",
"transition-left-to-right": false, // Поменяйте на true, если панель слева
},
"modules": [
"custom/tray-arrow", // Иконка-стрелочка (первый элемент всегда виден)
"tray" // Сам трей (будет скрыт)
]
},
"custom/tray-arrow": {
"format": " ", //Иконка стрелочки (нужен шрифт Nerd Fonts)
"tooltip": false
},
"tray": {
"spacing": 10
},
"hyprland/language": {
"tooltip": false,
"format-ru": " RU",
"format-en": " US",
},
"custom/music": {
"format": "{icon} {text}",
"return-type": "json",
"max-length": 40,
"exec": "playerctl -a metadata --format '{\"text\": \"{{artist}} - {{title}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(artist)}} - {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F",
"on-click": "~/.config/eww/music/toggle_music.sh",
"format-icons": {
"Playing": "",
"Paused": ""
}
},
"custom/minimized": {
"format": "  ",
"tooltip": true,
"tooltip-format": "Открыть скрытые приложения",
"on-click": "~/.config/hypr/scripts/restore_window.sh"
},
"cava": {
"framerate": 60,
"sleep_timer": 1,
"format_silent" : "",
"autosens": 0,
"sensitivity": 1000,
"bars": 12,
"lower_cutoff_freq": 50,
"higher_cutoff_freq": 10000,
// "hide_on_silence": true,
"method": "pulse",
"source": "auto",
"stereo": true,
"reverse": false,
"bar_delimiter": 0,
"monstercat": false,
"noise_reduction": 0.37,
"input_delay": 0,
"format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"],
"actions": {
"on-click-right": "mode",
},
},
"battery": {
"states": {
"warning": 30,
"critical": 15,
},
"format": "{icon} {capacity}%",
"format-charging": " {capacity}%",
"format-plugged": " {capacity}%",
"format-icons": ["", "", "", "", ""],
},
"temperature": {
"interval": 1,
"critical-threshold": 80,
"warning-threshold": 65,
"format": "{icon} {temperatureC}°C",
"format-warning": " {temperatureC}°C",
"format-critical": " {temperatureC}°C",
"format-icons": ["", "", ""],
},
"clock": {
"interval": 1,
"format": "{:%H:%M:%S}",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}",
},
"hyprland/workspaces": {
"format": "{id}",
"on-click": "activate",
"all-outputs": false,
"persistent_workspaces": {
"*": 5,
},
},
"custom/arch": {
"format": "",
"tooltip": "Arch Linux",
"on-click": "hyprctl dispatch exec \"[float; center] missioncenter\"",
},
}

56
waybar/niri-config.jsonc Normal file
View File

@@ -0,0 +1,56 @@
{
"position": "bottom",
"modules-left": ["custom/arch", "niri/workspaces", "niri/window"],
"modules-center": ["clock"],
"modules-right": ["niri/language", "battery", "temperature"],
"niri/workspaces": {
"format": "{value}",
},
"niri/language": {
"format": " {}",
"format-ru": "RU",
"format-en": "US",
"format-us": "US",
},
"niri/window": {
"format": "{title}",
"separate-outputs": true,
},
"battery": {
"states": {
"warning": 30,
"critical": 15,
},
"format": "{icon} {capacity}%",
"format-charging": " {capacity}%",
"format-plugged": " {capacity}%",
"format-icons": ["", "", "", "", ""],
},
"temperature": {
"interval": 1,
"critical-threshold": 80,
"warning-threshold": 65,
"format": "{icon} {temperatureC}°C",
"format-warning": " {temperatureC}°C",
"format-critical": " {temperatureC}°C",
"format-icons": ["", "", ""],
},
"clock": {
"interval": 1,
"format": "{:%H:%M:%S}",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}",
},
"custom/arch": {
"format": "",
"tooltip": "Arch Linux",
},
}

30
waybar/scripts/cava.sh Executable file
View File

@@ -0,0 +1,30 @@
#! /bin/bash
bar="▁▂▃▄▅▆▇█"
dict="s/;//g;"
# creating "dictionary" to replace char with bar
i=0
while [ $i -lt ${#bar} ]
do
dict="${dict}s/$i/${bar:$i:1}/g;"
i=$((i=i+1))
done
# write cava config
config_file="/tmp/polybar_cava_config"
echo "
[general]
bars = 18
[output]
method = raw
raw_target = /dev/stdout
data_format = ascii
ascii_max_range = 7
" > $config_file
# read stdout from cava
cava -p $config_file | while read -r line; do
echo $line | sed $dict
done

26
waybar/scripts/niri-window.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
NIRI_SOCKET=$(find "$XDG_RUNTIME_DIR" -maxdepth 1 -name "niri*.sock" | head -n 1)
# Проверяем, был ли сокет найден и является ли он действительно файлом сокета
if [ -z "$NIRI_SOCKET" ] || [ ! -S "$NIRI_SOCKET" ]; then
echo '{"text": "Niri socket not found"}'
# Выходим, чтобы Waybar не перезапускал скрипт каждую секунду
sleep 5
exit 1
fi
# Используем socat для подписки на события
socat -u UNIX-CONNECT:"$NIRI_SOCKET" - | while read -r line; do
# Запрашиваем состояние при каждом событии
TITLE=$(echo 'get-state' | socat - UNIX-CONNECT:"$NIRI_SOCKET" | jq -r '
.outputs[] | .workspaces[] | .columns[] | .windows[] | select(.focused) | .title
')
# Обрезаем заголовок, если он слишком длинный
if [ ${#TITLE} -gt 50 ]; then
TITLE="$(echo "$TITLE" | cut -c 1-50)..."
fi
# Выводим в формате JSON для Waybar
echo "{\"text\": \"$TITLE\", \"tooltip\": \"$TITLE\"}"
done

View File

@@ -0,0 +1,33 @@
#!/bin/bash
# Скрипт для Niri, который динамически находит IPC-сокет
# Находим сокет в $XDG_RUNTIME_DIR, имя которого соответствует шаблону niri*.sock
# head -n 1 используется на случай, если по ошибке найдется несколько сокетов
NIRI_SOCKET=$(find "$XDG_RUNTIME_DIR" -maxdepth 1 -name "niri*.sock" | head -n 1)
# Проверяем, был ли сокет найден и является ли он действительно файлом сокета
if [ -z "$NIRI_SOCKET" ] || [ ! -S "$NIRI_SOCKET" ]; then
echo '{"text": "Niri socket not found"}'
# Выходим, чтобы Waybar не перезапускал скрипт каждую секунду
sleep 5
exit 1
fi
# Используем socat для подписки на события и вывода состояния
# -u отключает буферизацию для немедленного вывода
socat -u UNIX-CONNECT:"$NIRI_SOCKET" - | while read -r line; do
# Запрос текущего состояния при каждом изменении
STATE=$(echo 'get-state' | socat - UNIX-CONNECT:"$NIRI_SOCKET")
# Форматируем вывод в JSON для Waybar
echo "$STATE" | jq -c '
.outputs | map(.workspaces) | flatten | map(
{
"id": .name,
"name": .name,
"class": (if .focused then "focused" else (if .urgent then "urgent" else "default") end)
}
)
'
done

142
waybar/style.css Normal file
View File

@@ -0,0 +1,142 @@
* {
background-color: transparent;
border: none;
box-shadow: none;
}
/* --- Левые модули --- */
#clock, #workspaces {
background-color: rgba(14, 14, 14, 0.8);
margin: 4px 6px;
border-radius: 99px;
}
#clock {
font-weight: bold;
color: #f5f5f5;
padding: 0 10px;
}
#workspaces {
padding: 0 4px;
}
#workspaces button {
color: #f5f5f5;
background: transparent;
transition: all 0.3s ease;
padding: 0;
min-width: 25px;
border-radius: 99px;
margin: 4px;
font-weight: bold;
}
#workspaces button.active {
background: #f5f5f5;
color: #0e0e0e;
}
#cava {
color: #f5f5f5;
margin-top: 4px;
margin-bottom: 4px;
padding: 2px 6px;
}
#window {
color: #f5f5f5;
font-weight: bold;
padding: 0 10px;
}
#custom-arch {
font-family: "JetBrainsMono Nerd Font", "FiraCode Nerd Font", monospace;
font-size: 20px;
padding-left: 20px;
color: #f5f5f5;
margin-right: 10px;
}
/* =========================================
ПРАВАЯ ЧАСТЬ (Вариант с прозрачным треем)
========================================= */
/* Общие стили для "твердых" элементов */
#custom-tray-arrow,
#language,
#battery,
#temperature {
background-color: rgba(14, 14, 14, 0.8);
color: #f5f5f5;
margin-top: 4px;
margin-bottom: 4px;
padding-top: 2px;
padding-bottom: 2px;
}
/* Группа-контейнер прозрачная */
#group-tray-drawer {
background-color: transparent;
margin-right: 0;
margin-left: 6px;
}
/*
1. ИКОНКИ ТРЕЯ (Прозрачный остров)
Фон transparent, но отступы остались, чтобы иконки не слипались
*/
#tray {
background-color: transparent; /* Убрали фон */
padding: 0 4px; /* Чуть уменьшил отступ, раз нет границ */
margin-right: 4px; /* Отступ до буквы А */
}
/* Иконки внутри трея */
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
}
/*
2. СТРЕЛКА "A" (Начало темного острова)
*/
#custom-tray-arrow {
border-radius: 99px 0 0 99px; /* Закруглено слева */
margin-right: 0;
padding-right: 6px;
padding-left: 12px;
font-weight: bold;
}
/*
3. ЯЗЫК
*/
#language {
border-radius: 0;
margin-left: 0;
padding-left: 6px;
padding-right: 8px;
}
/*
4. БАТАРЕЯ
*/
#battery {
border-radius: 0;
margin-left: 0;
margin-right: 0;
padding: 0 8px;
}
/*
5. ТЕМПЕРАТУРА (Конец острова)
*/
#temperature {
border-radius: 0 99px 99px 0; /* Закруглено справа */
margin-left: 0;
padding-right: 14px;
margin-right: 6px;
}

140
waybar/style.css.old Normal file
View File

@@ -0,0 +1,140 @@
* {
background-color: transparent;
border: none;
box-shadow: none;
}
/* --- Левые модули (Часы, Воркспейсы и т.д.) --- */
#clock, #workspaces {
background-color: rgba(14, 14, 14, 0.8);
margin: 4px 6px;
border-radius: 99px;
}
#clock {
font-weight: bold;
color: #f5f5f5;
padding: 0 10px;
}
#workspaces {
padding: 0 4px;
}
#workspaces button {
color: #f5f5f5;
background: transparent;
transition: all 0.3s ease;
padding: 0;
min-width: 25px;
border-radius: 99px;
margin: 4px;
font-weight: bold;
}
#workspaces button.active {
background: #f5f5f5;
color: #0e0e0e;
}
#cava {
color: #f5f5f5;
margin-top: 4px;
margin-bottom: 4px;
padding: 2px 6px;
}
#window {
color: #f5f5f5;
font-weight: bold;
padding: 0 10px;
}
#custom-arch {
font-family: "JetBrainsMono Nerd Font", "FiraCode Nerd Font", monospace;
font-size: 20px;
padding-left: 20px;
color: #f5f5f5;
margin-right: 10px;
}
/* =========================================
ПРАВАЯ ЧАСТЬ
========================================= */
/* Общие настройки цветов для активных элементов */
#tray,
#custom-tray-arrow,
#language,
#battery,
#temperature {
background-color: rgba(14, 14, 14, 0.8);
color: #f5f5f5;
margin-top: 4px;
margin-bottom: 4px;
padding-top: 2px;
padding-bottom: 2px;
}
/*
КОНТЕЙНЕР ТРЕЯ
Делаем его прозрачным, чтобы между Трэем и Стрелкой был виден фон обоев.
*/
#group-tray-drawer {
background-color: transparent;
margin-right: 0; /* Убираем отступ справа, чтобы А прилипла к Языку */
margin-left: 6px;
}
/*
1. ИКОНКИ ТРЕЯ (Выезжающий остров)
Это отдельный остров слева.
*/
#tray {
border-radius: 99px; /* Полный круг/овал */
padding: 0 12px;
margin-right: 8px; /* ЭТОТ ОТСТУП создает разрыв между иконками и буквой "А" */
}
/*
2. СТРЕЛКА "A" (Начало большого правого острова)
Приклеиваем её к языку.
*/
#custom-tray-arrow {
border-radius: 99px 0 0 99px; /* Закруглено только слева */
margin-right: 0; /* Убираем отступ справа */
padding-right: 6px; /* Чуть меньше паддинг справа для плотности */
padding-left: 12px;
font-weight: bold;
}
/*
3. ЯЗЫК (Продолжение острова)
Приклеиваем к "A".
*/
#language {
border-radius: 0; /* Прямые углы слева (стык с А) и справа (стык с батареей) */
margin-left: 0; /* Убираем отступ слева */
padding-left: 6px; /* Балансируем отступ текста */
padding-right: 8px;
}
/*
4. БАТАРЕЯ (Середина)
*/
#battery {
border-radius: 0;
margin-left: 0;
margin-right: 0;
padding: 0 8px;
}
/*
5. ТЕМПЕРАТУРА (Конец острова)
*/
#temperature {
border-radius: 0 99px 99px 0; /* Закруглено справа */
margin-left: 0;
padding-right: 14px;
margin-right: 6px;
}