shell: add panel management commands

parent d6d0309d
......@@ -8,6 +8,7 @@ import (
"ximperconf/locale"
"ximperconf/preset"
"ximperconf/repo"
"ximperconf/shell"
"ximperconf/system"
"ximperconf/ui"
......@@ -32,6 +33,7 @@ func main() {
repo.CommandList(),
preset.CommandList(),
hyprland.CommandList(),
shell.CommandList(),
system.CommandList(),
{
Name: "help",
......
hyprland/actions.go
hyprland/binds.go
hyprland/commands.go
hyprland/keyboard-actions.go
hyprland/manager.go
......@@ -11,6 +12,9 @@ preset/helpers.go
preset/result.go
repo/actions.go
repo/commands.go
shell/commands.go
shell/panel/actions.go
shell/panel/commands.go
system/commands.go
system/grub-actions.go
ui/help.go
......@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ximperconf\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-02-14 21:56+0300\n"
"POT-Creation-Date: 2026-05-22 23:41+0300\n"
"PO-Revision-Date: 2026-02-14 17:13+0300\n"
"Last-Translator: \n"
"Language-Team: Russian\n"
......@@ -17,94 +17,187 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: hyprland/actions.go:27
#: hyprland/actions.go:22 hyprland/manager.go:519
msgid "invalid module name"
msgstr "недопустимое название для модуля"
#: hyprland/actions.go:36
#, fuzzy, c-format
msgid "failed to read config: %s"
msgstr "не удалось прочитать %s: %w"
#: hyprland/actions.go:39
#, fuzzy, c-format
msgid "failed to create backup: %s"
msgstr "не удалось прочитать %s: %w"
#: hyprland/actions.go:44
msgid "Configuration fixed"
msgstr "Конфигурация исправлена"
#: hyprland/actions.go:43 hyprland/actions.go:93
#: hyprland/actions.go:45
#, fuzzy, c-format
msgid "Backup: %s"
msgstr "Заблокирован: %s"
#: hyprland/actions.go:66 hyprland/actions.go:77
msgid "Config has errors, not reloading:"
msgstr ""
#: hyprland/actions.go:69
#, fuzzy
msgid "Hyprland reload"
msgstr "Переменные Hyprland"
#: hyprland/actions.go:85
#, fuzzy, c-format
msgid "failed to reload: %s"
msgstr "не удалось прочитать %s: %w"
#. 5 = Ok, цвет 0 (дефолтный для иконки), 3000ms
#: hyprland/actions.go:90 hyprland/actions.go:92
#, fuzzy
msgid "Config reloaded"
msgstr "Строка в конфиге"
#: hyprland/actions.go:116 hyprland/actions.go:171
msgid "No errors"
msgstr "Ошибок нет"
#: hyprland/actions.go:62 hyprland/actions.go:83 hyprland/actions.go:262
#: hyprland/actions.go:298 hyprland/manager.go:343
msgid "invalid module name"
msgstr "недопустимое название для модуля"
#: hyprland/actions.go:72 hyprland/actions.go:287
#: hyprland/actions.go:144 hyprland/actions.go:502
msgid "specify module name"
msgstr "укажите имя модуля"
#: hyprland/actions.go:186
#: hyprland/actions.go:270
msgid "no available modules"
msgstr "нет доступных модулей"
#: hyprland/actions.go:226
#: hyprland/actions.go:312
#, c-format
msgid "(errors: %d)"
msgstr "(ошибки: %d)"
#: hyprland/actions.go:240
msgid "Modules"
msgstr "Модули"
#: hyprland/actions.go:343
#, fuzzy
msgid "System modules"
msgstr "использовать пользовательские модули"
#: hyprland/actions.go:266 hyprland/manager.go:347
#, c-format
msgid "module '%s' not found: %s"
msgstr "модуль '%s' не найден: %s"
#: hyprland/actions.go:351
#, fuzzy
msgid "User modules"
msgstr "использовать пользовательские модули"
#: hyprland/actions.go:395
#, fuzzy
msgid "module name not specified"
msgstr "плагин не указан"
#: hyprland/actions.go:412
#, fuzzy, c-format
msgid "name '%s' is reserved"
msgstr "модуль '%s' уже включён"
#: hyprland/actions.go:416
#, fuzzy, c-format
msgid "module '%s' already exists"
msgstr "модуль '%s' уже отключён"
#: hyprland/actions.go:278
#: hyprland/actions.go:424
#, fuzzy, c-format
msgid "failed to create module: %s"
msgstr "не удалось прочитать %s: %w"
#: hyprland/actions.go:429
#, fuzzy
msgid "Module created:"
msgstr "Модуль '%s' удалён"
#: hyprland/actions.go:438 hyprland/actions.go:493
#, c-format
msgid "failed to start editor: %s"
msgstr "не удалось запустить редактор: %s"
#: hyprland/actions.go:315
#: hyprland/actions.go:451
msgid "Module has errors, not enabling:"
msgstr ""
#: hyprland/actions.go:481 hyprland/manager.go:160
#, c-format
msgid "module '%s' not found"
msgstr "модуль '%s' не найден"
#: hyprland/actions.go:529
msgid "Module"
msgstr "Модуль"
#: hyprland/actions.go:318
#: hyprland/actions.go:532
msgid "Group"
msgstr "Группа"
#: hyprland/actions.go:321
#: hyprland/actions.go:535
msgid "Summary"
msgstr "Краткое"
#: hyprland/actions.go:324
#: hyprland/actions.go:538
msgid "Description"
msgstr "Описание"
#: hyprland/actions.go:327
#: hyprland/actions.go:541 shell/panel/actions.go:250
msgid "Status"
msgstr "Статус"
#: hyprland/actions.go:328
#: hyprland/actions.go:551
msgid "Dependencies"
msgstr ""
#: hyprland/actions.go:553
msgid "Path"
msgstr "Путь"
#: hyprland/actions.go:329
#: hyprland/actions.go:554
msgid "Config path"
msgstr "Путь в конфиге"
#: hyprland/actions.go:330
#: hyprland/actions.go:555
msgid "Config line"
msgstr "Строка в конфиге"
#: hyprland/actions.go:332 hyprland/actions.go:334
#: hyprland/actions.go:557 hyprland/actions.go:559
msgid "Available"
msgstr "Доступен"
#: hyprland/actions.go:332
#: hyprland/actions.go:557 preset/actions.go:531 preset/actions.go:582
#: preset/actions.go:585 shell/panel/actions.go:257 shell/panel/actions.go:264
msgid "yes"
msgstr "да"
#: hyprland/actions.go:334
#: hyprland/actions.go:559 shell/panel/actions.go:259
#: shell/panel/actions.go:266
msgid "no"
msgstr "нет"
#: hyprland/actions.go:338
#: hyprland/actions.go:563
msgid "Errors"
msgstr "Ошибки"
#: hyprland/actions.go:587
msgid "The following modules were disabled due to errors:"
msgstr "Следующие модули были отключены из-за ошибок:"
#: hyprland/actions.go:592
msgid "Hyprland configuration errors"
msgstr "Ошибки конфигурации Hyprland"
#: hyprland/binds.go:50
#, fuzzy, c-format
msgid "failed to get binds: %s"
msgstr "не удалось прочитать %s: %w"
#: hyprland/binds.go:55
#, fuzzy, c-format
msgid "failed to parse binds: %s"
msgstr "не удалось прочитать %s: %w"
#: hyprland/commands.go:16
msgid "Hyprland Management"
msgstr "Управление Hyprland"
......@@ -114,118 +207,154 @@ msgid "failed to initialize HyprlandManager: %w"
msgstr "не удалось инициализировать HyprlandManager: %w"
#: hyprland/commands.go:37
msgid "Show error notification dialog"
msgstr "Показать диалог об ошибках"
#: hyprland/commands.go:42
msgid "Check the Hyprland config"
msgstr "Проверить конфигурацию Hyprland"
#: hyprland/commands.go:42
#: hyprland/commands.go:48
msgid "Fix config: sort modules into sections by order"
msgstr "Исправить конфиг: отсортировать модули по секциям и порядку"
#: hyprland/commands.go:47
#: hyprland/commands.go:53
msgid "Verify config and reload Hyprland"
msgstr ""
#: hyprland/commands.go:57
#, fuzzy
msgid "Show errors in a dialog window"
msgstr "Показать диалог об ошибках"
#: hyprland/commands.go:64
msgid "Show keybindings"
msgstr ""
#: hyprland/commands.go:68
msgid "Show all binds including hardware keys (XF86)"
msgstr ""
#: hyprland/commands.go:77
msgid "Sync layouts with xkb"
msgstr "Синхронизировать раскладки с xkb"
#: hyprland/commands.go:52
#: hyprland/commands.go:82
msgid "Forced update"
msgstr "Принудительное обновление"
#: hyprland/commands.go:60
#: hyprland/commands.go:90
msgid "Hyprland modules"
msgstr "Модули Hyprland"
#: hyprland/commands.go:64
msgid "use user modules"
msgstr "использовать пользовательские модули"
#: hyprland/commands.go:94
#, fuzzy
msgid "Create a new module"
msgstr "Создан пустой модуль: %s"
#: hyprland/commands.go:72
#: hyprland/commands.go:99
msgid "Check and enable module after editing"
msgstr ""
#: hyprland/commands.go:107
msgid "Check Hyprland module"
msgstr "Проверить модуль Hyprland"
#: hyprland/commands.go:79
#: hyprland/commands.go:115
msgid "Edit module file"
msgstr "Редактировать файл модуля"
#: hyprland/commands.go:86
#: hyprland/commands.go:122
msgid "Hyprland module status"
msgstr "Статус модуля Hyprland"
#: hyprland/commands.go:93
#: hyprland/commands.go:129
msgid "Show detailed module info"
msgstr "Показать подробную информацию о модуле"
#: hyprland/commands.go:103
#: hyprland/commands.go:139
#, fuzzy
msgid "List module names"
msgstr "недопустимое название для модуля"
#: hyprland/commands.go:143 hyprland/commands.go:156
msgid ""
"module filter (e.g. status:enabled, type:user, group:themes, deps:installed)"
msgstr ""
#: hyprland/commands.go:152
msgid "Information about modules"
msgstr "Информация о модулях"
#: hyprland/commands.go:107 hyprland/commands.go:210
msgid "status filter"
msgstr "фильтр по статусу"
#: hyprland/commands.go:117
#: hyprland/commands.go:165
msgid "enable module"
msgstr "включить модуль"
#: hyprland/commands.go:124
#: hyprland/commands.go:172
msgid "disable module"
msgstr "отключить модуль"
#: hyprland/commands.go:128
#: hyprland/commands.go:176
msgid "delete module line from config"
msgstr "удалить строку модуля из конфига"
#: hyprland/commands.go:139
#: hyprland/commands.go:187
msgid "toggle module"
msgstr "переключить модуль"
#: hyprland/commands.go:148
#: hyprland/commands.go:196
msgid "Hyprland vars"
msgstr "Переменные Hyprland"
#: hyprland/commands.go:152
#: hyprland/commands.go:200
msgid "vars list"
msgstr "список переменных"
#: hyprland/commands.go:160
#: hyprland/commands.go:208
msgid "vars info"
msgstr "информация о переменных"
#: hyprland/commands.go:168
#: hyprland/commands.go:216
msgid "get var value"
msgstr "получить значение переменной"
#: hyprland/commands.go:174
#: hyprland/commands.go:222
msgid "set var value"
msgstr "установить значение переменной"
#: hyprland/commands.go:179
#: hyprland/commands.go:227
msgid "unset var"
msgstr "удалить переменную"
#: hyprland/commands.go:187
#: hyprland/commands.go:235
msgid "Hyprland plugins"
msgstr "Плагины Hyprland"
#: hyprland/commands.go:191
#: hyprland/commands.go:239
msgid "Hyprland plugins list"
msgstr "Список плагинов Hyprland"
#: hyprland/commands.go:199
#: hyprland/commands.go:247
msgid "Hyprland plugin status"
msgstr "Статус плагина Hyprland"
#: hyprland/commands.go:206
#: hyprland/commands.go:254
msgid "Information about plugins"
msgstr "Информация о плагинах"
#: hyprland/commands.go:220
#: hyprland/commands.go:258
msgid "status filter"
msgstr "фильтр по статусу"
#: hyprland/commands.go:268
msgid "load plugin"
msgstr "загрузить плагин"
#: hyprland/commands.go:227
#: hyprland/commands.go:275
msgid "unload plugin"
msgstr "выгрузить плагин"
#: hyprland/commands.go:234
#: hyprland/commands.go:282
msgid "toggle plugin"
msgstr "переключить плагин"
......@@ -233,83 +362,94 @@ msgstr "переключить плагин"
msgid "failed to get system layouts: %w"
msgstr "не удалось получить системные раскладки: %w"
#: hyprland/keyboard-actions.go:50
#: hyprland/keyboard-actions.go:49
msgid "layout is already set, use '--force' for forced update"
msgstr ""
"раскладка уже установлена, используйте '--force' для принудительного "
"обновленияраскладка уже установлена, используйте '--force' для "
"принудительного обновления"
#: hyprland/keyboard-actions.go:53
msgid "failed to update kb_layout in Hyprland: %w"
msgstr "не удалось обновить kb_layout в Hyprland: %w"
#: hyprland/keyboard-actions.go:52
#: hyprland/keyboard-actions.go:56
msgid "Layout updated!"
msgstr "Раскладка обновлена!"
#: hyprland/keyboard-actions.go:54
msgid "layout is already set, use '--force' for forced update"
msgstr "раскладка уже установлена, используйте '--force' для принудительного обновления"
"раскладка уже установлена, используйте '--force' для принудительного "
"обновления"
#: hyprland/manager.go:109
#: hyprland/manager.go:118
msgid "HyprlandManager not found in context"
msgstr "HyprlandManager не найден в контексте"
#: hyprland/manager.go:140
#: hyprland/manager.go:149
msgid "check failed"
msgstr "проверка не удалась"
#: hyprland/manager.go:155
#: hyprland/manager.go:523
#, c-format
msgid "module '%s' not found"
msgstr "модуль '%s' не найден"
msgid "module '%s' not found: %s"
msgstr "модуль '%s' не найден: %s"
#: hyprland/manager.go:530
#, c-format
msgid "missing module dependencies: %s"
msgstr ""
#: hyprland/manager.go:355
#: hyprland/manager.go:536
msgid "cannot enable this module"
msgstr "нельзя включить данный модуль"
#: hyprland/manager.go:360
#: hyprland/manager.go:541
#, c-format
msgid "module '%s' is already enabled"
msgstr "модуль '%s' уже включён"
#: hyprland/manager.go:382
#: hyprland/manager.go:563
#, c-format
msgid "module '%s' already present in config (commented) — skipped"
msgstr "модуль '%s' уже присутствует в конфиге (закомментирован) — пропущено"
#: hyprland/manager.go:400
#: hyprland/manager.go:581 hyprland/manager.go:599
#, c-format
msgid "module '%s' not changed"
msgstr "модуль '%s' не изменён"
#: hyprland/manager.go:407
#: hyprland/manager.go:587
#, c-format
msgid "module '%s' is already disabled"
msgstr "модуль '%s' уже отключён"
#: hyprland/manager.go:416
#: hyprland/manager.go:596
#, c-format
msgid "Module '%s' disabled"
msgstr "Модуль '%s' отключён"
#: hyprland/manager.go:422
#: hyprland/manager.go:604
#, c-format
msgid "module '%s' not found in config"
msgstr "модуль '%s' не найден в конфигурации"
#: hyprland/manager.go:428
#: hyprland/manager.go:610
#, c-format
msgid "Module '%s' removed"
msgstr "Модуль '%s' удалён"
#: hyprland/manager.go:434
#: hyprland/manager.go:613 hyprland/manager.go:1042
#, fuzzy, c-format
msgid "unsupported action: %s"
msgstr "Модуль '%s': неподдерживаемый action"
#: hyprland/manager.go:618
#, c-format
msgid "Module '%s' enabled"
msgstr "Модуль '%s' включён"
#: hyprland/manager.go:436
#: hyprland/manager.go:620
#, c-format
msgid "Module '%s' disabled (group)"
msgstr "Модуль '%s' отключён (группа)"
#: hyprland/manager.go:439
#: hyprland/manager.go:623
msgid ""
"Warning: modules found outside sections. Run 'ximperconf hyprland fix' to "
"fix."
......@@ -317,61 +457,61 @@ msgstr ""
"Внимание: обнаружены модули вне секций. Выполните 'ximperconf hyprland fix' "
"для исправления."
#: hyprland/manager.go:794 hyprland/manager.go:822
#: hyprland/manager.go:978 hyprland/manager.go:1006
msgid "plugin not specified"
msgstr "плагин не указан"
#: hyprland/manager.go:799
#: hyprland/manager.go:983
msgid "plugin not found"
msgstr "плагин не найден"
#: hyprland/manager.go:835
#: hyprland/manager.go:1019
msgid "plugin is already loaded"
msgstr "плагин уже загружен"
#: hyprland/manager.go:843
#: hyprland/manager.go:1027
#, c-format
msgid "Plugin '%s' loaded"
msgstr "Плагин '%s' загружен"
#: hyprland/manager.go:847
#: hyprland/manager.go:1031
msgid "plugin is not loaded"
msgstr "плагин не загружен"
#: hyprland/manager.go:855
#: hyprland/manager.go:1039
#, c-format
msgid "Plugin '%s' unloaded"
msgstr "Плагин '%s' выгружен"
#: hyprland/manager.go:886 hyprland/manager.go:925 hyprland/var-actions.go:116
#: hyprland/manager.go:1071 hyprland/manager.go:1110
msgid "specify variable name"
msgstr "укажите имя переменной"
#: hyprland/manager.go:889
#: hyprland/manager.go:1074
msgid "specify variable value"
msgstr "укажите значение переменной"
#: hyprland/manager.go:895
#: hyprland/manager.go:1080
#, c-format
msgid "variable '%s' is already '%s'"
msgstr "переменная '%s' уже '%s'"
#: hyprland/manager.go:900
#: hyprland/manager.go:1085
#, c-format
msgid "Variable '%s' updated: %s"
msgstr "Переменная '%s' обновлена: %s"
#: hyprland/manager.go:913
#: hyprland/manager.go:1098
#, c-format
msgid "Variable '%s' set: %s"
msgstr "Переменная '%s' установлена: %s"
#: hyprland/manager.go:920
#: hyprland/manager.go:1105
#, c-format
msgid "VARS block created, variable '%s' set: %s"
msgstr "Блок VARS создан, переменная '%s' установлена: %s"
#: hyprland/manager.go:935 hyprland/var-actions.go:144
#: hyprland/manager.go:1120
#, c-format
msgid "variable '%s' not found"
msgstr "переменная '%s' не найдена"
......@@ -380,189 +520,226 @@ msgstr "переменная '%s' не найдена"
msgid "no available plugins"
msgstr "нет доступных плагинов"
#: hyprland/plugin-actions.go:81
#: hyprland/plugin-actions.go:77
msgid "Plugins"
msgstr "Плагины"
#: hyprland/var-actions.go:51
#: hyprland/var-actions.go:47
msgid "No variables in configuration"
msgstr "Нет переменных в конфигурации"
#: hyprland/var-actions.go:76
#: hyprland/var-actions.go:72
msgid "Vars"
msgstr "Переменные"
#: hyprland/var-actions.go:93
#: hyprland/var-actions.go:89
#, c-format
msgid "variable '%s' is not set"
msgstr "переменная '%s' не установлена"
#: hyprland/var-actions.go:120
#, c-format
msgid "Invalid variable name: %s"
msgstr "Недопустимое имя переменной: %s"
#: hyprland/var-actions.go:124
#, c-format
msgid "Configuration not found: %s"
msgstr "Конфигурация не найдена: %s"
#: hyprland/var-actions.go:148
#: hyprland/var-actions.go:121
#, c-format
msgid "Variable '%s' removed"
msgstr "Переменная '%s' удалена"
#: main.go:27
#: main.go:29
msgid "Ximper Linux Configuration Tool"
msgstr "Инструмент настройки Ximper Linux"
#: main.go:38 ui/help.go:16
#: main.go:41 ui/help.go:16
msgid "show help"
msgstr "показать справку"
#: preset/actions.go:30
#: preset/actions.go:32 preset/actions.go:539
msgid "copy"
msgstr "копия"
#: preset/actions.go:40
#: preset/actions.go:42 preset/actions.go:547
msgid "link"
msgstr "ссылка"
#: preset/actions.go:64
#: preset/actions.go:66 preset/actions.go:559
msgid "replace"
msgstr "замена"
#: preset/actions.go:70
#: preset/actions.go:72
#, c-format
msgid "Not found: '%s'"
msgstr "Не найден: '%s'"
#: preset/actions.go:75
#: preset/actions.go:77
msgid "Failed to read %s: %v"
msgstr "Не удалось прочитать %s: %v"
#: preset/actions.go:79
#: preset/actions.go:81
#, c-format
msgid "Locked: %s"
msgstr "Заблокирован: %s"
#: preset/actions.go:88
#: preset/actions.go:90
#, c-format
msgid "Up to date: '%s'"
msgstr "Актуально: '%s'"
#: preset/actions.go:97
#: preset/actions.go:99
msgid "Replace error %s: %v"
msgstr "Ошибка замены %s: %v"
#: preset/actions.go:111 preset/actions.go:113 preset/actions.go:119
#: preset/actions.go:123 preset/actions.go:125
#: preset/actions.go:113 preset/actions.go:115 preset/actions.go:121
#: preset/actions.go:125 preset/actions.go:127 preset/actions.go:567
msgid "system"
msgstr "система"
#: preset/actions.go:119
#: preset/actions.go:121
msgid "GRUB error: %v"
msgstr "Ошибка GRUB: %v"
#: preset/actions.go:123 system/grub-actions.go:86
#: preset/actions.go:125 system/grub-actions.go:86
msgid "GRUB_GFXMODE fixed"
msgstr "GRUB_GFXMODE исправлен"
#: preset/actions.go:125 system/grub-actions.go:89
#: preset/actions.go:127 system/grub-actions.go:89
msgid "update-grub completed"
msgstr "update-grub выполнен"
#: preset/actions.go:133 preset/actions.go:139 preset/actions.go:144
#: preset/actions.go:146
#: preset/actions.go:132 preset/actions.go:616
msgid "var"
msgstr "переменная"
#: preset/actions.go:133
#: preset/actions.go:136
#, c-format
msgid "Already exists: %s"
msgstr "Уже существует: %s"
#: preset/actions.go:144
#: preset/actions.go:151
msgid "Error setting %s: %v"
msgstr "Ошибка установки %s: %v"
#: preset/actions.go:154 preset/actions.go:159 preset/actions.go:167
#: preset/actions.go:173 preset/actions.go:181 preset/actions.go:184
#: preset/actions.go:190 preset/actions.go:195 preset/actions.go:197
#: preset/actions.go:159 preset/actions.go:589
msgid "module"
msgstr "модуль"
#: preset/actions.go:154
#: preset/actions.go:162
msgid "Skipped module without name"
msgstr "Пропущен модуль без имени"
#: preset/actions.go:159
#: preset/actions.go:167
#, c-format
msgid "Module '%s': unsupported action"
msgstr "Модуль '%s': неподдерживаемый action"
#: preset/actions.go:167
#: preset/actions.go:175
#, c-format
msgid "Module '%s': condition not met"
msgstr "Модуль '%s': условие не выполнено"
#: preset/actions.go:173
#: preset/actions.go:181
#, c-format
msgid "Module '%s': binary '%s' not found"
msgstr "Модуль '%s': бинарник '%s' не найден"
#: preset/actions.go:181 preset/actions.go:184
#: preset/actions.go:189 preset/actions.go:192
#, c-format
msgid "Created empty module: %s"
msgstr "Создан пустой модуль: %s"
#: preset/actions.go:195
#: preset/actions.go:203
msgid "Error (%s): %v"
msgstr "Ошибка (%s): %v"
#: preset/actions.go:208 preset/actions.go:214 preset/actions.go:222
#: preset/actions.go:225 preset/actions.go:227
#: preset/actions.go:215
msgid "cleanup"
msgstr ""
#: preset/actions.go:224
#, fuzzy
msgid "file not found"
msgstr "Профиль %s не найден"
#: preset/actions.go:227
#, c-format
msgid "missing dependencies: %s"
msgstr ""
#: preset/actions.go:235
#, fuzzy, c-format
msgid "Module '%s' removed (%s)"
msgstr "Модуль '%s' удалён"
#: preset/actions.go:243
#, fuzzy
msgid "Failed to remove '%s': %v"
msgstr "Не удалось прочитать %s: %v"
#: preset/actions.go:255
msgid "check"
msgstr "проверка"
#: preset/actions.go:265
msgid "Check failed: %v"
msgstr "Проверка не удалась: %v"
#. Удаляем лог от предыдущего запуска
#: preset/actions.go:271
msgid "No errors found"
msgstr "Ошибок не найдено"
#: preset/actions.go:302
#, fuzzy
msgid "Failed to disable '%s': %v"
msgstr "Не удалось прочитать %s: %v"
#: preset/actions.go:306
#, c-format
msgid "Module '%s' disabled (errors)"
msgstr "Модуль '%s' отключён (ошибки)"
#: preset/actions.go:318
msgid "Failed to enable notification module: %v"
msgstr ""
#: preset/actions.go:327
msgid "layout"
msgstr "раскладка"
#: preset/actions.go:208
#: preset/actions.go:330
msgid "Sync Hyprland layouts"
msgstr "Синхронизация раскладок Hyprland"
#: preset/actions.go:214
#: preset/actions.go:336
msgid "Failed to get system layouts"
msgstr "Не удалось получить системные раскладки"
#: preset/actions.go:222
#: preset/actions.go:344
msgid "Failed to update kb_layout"
msgstr "Не удалось обновить kb_layout"
#: preset/actions.go:225
#: preset/actions.go:347
#, c-format
msgid "Layout updated: %s"
msgstr "Раскладка обновлена: %s"
#: preset/actions.go:227
#: preset/actions.go:349
#, c-format
msgid "Layout already set: %s"
msgstr "Раскладка уже установлена: %s"
#: preset/actions.go:270
#: preset/actions.go:394 preset/actions.go:501
#, c-format
msgid "Profile %s not found"
msgstr "Профиль %s не найден"
#: preset/actions.go:275
#: preset/actions.go:399
#, c-format
msgid "Profile %s unavailable"
msgstr "Профиль %s недоступен"
#: preset/actions.go:287 preset/actions.go:338
#: preset/actions.go:414 preset/actions.go:469
#, c-format
msgid "Applying profile: %s"
msgstr "Применяем профиль: %s"
#: preset/actions.go:321 preset/helpers.go:73
#: preset/actions.go:449 preset/helpers.go:80
msgid "no available profiles"
msgstr "нет доступных профилей"
......@@ -583,14 +760,18 @@ msgid "Show information about preset profiles"
msgstr "Показать информацию о профилях"
#: preset/commands.go:38
msgid "Show profile details"
msgstr ""
#: preset/commands.go:46
msgid "Apply a profile"
msgstr "Применить профиль"
#: preset/commands.go:45
#: preset/commands.go:53
msgid "Apply all available profiles"
msgstr "Применить все доступные профили"
#: preset/helpers.go:93
#: preset/helpers.go:100
msgid "Profiles"
msgstr "Профили"
......@@ -641,6 +822,118 @@ msgstr "Дата архива Sisyphus"
msgid "Date of last update"
msgstr "Дата последнего обновления"
#: shell/commands.go:13
msgid "Ximper Shell Management"
msgstr "Управление Ximper Shell"
#: shell/panel/actions.go:65
msgid "specify option and value"
msgstr "укажите параметр и значение"
#: shell/panel/actions.go:98
#, c-format
msgid "unsupported panel option: %s"
msgstr "неподдерживаемый параметр панели: %s"
#: shell/panel/actions.go:109
msgid "Panel config updated, but safe mode is enabled; restart skipped"
msgstr ""
"Конфиг панели обновлён, но включён безопасный режим; перезапуск пропущен"
#: shell/panel/actions.go:116
msgid "Panel config updated"
msgstr "Конфиг панели обновлён"
#: shell/panel/actions.go:155
msgid "parse panel status: %w"
msgstr "ошибка разбора статуса панели: %w"
#: shell/panel/actions.go:173
#, c-format
msgid "unknown panel module: %s"
msgstr "неизвестный модуль панели: %s"
#: shell/panel/actions.go:199
msgid "parse panel modules: %w"
msgstr "ошибка разбора модулей панели: %w"
#: shell/panel/actions.go:211 shell/panel/actions.go:223
#, c-format
msgid "failed to find %s"
msgstr "не удалось найти %s"
#: shell/panel/actions.go:242
msgid "Config"
msgstr "Конфиг"
#: shell/panel/actions.go:243
msgid "Position"
msgstr "Положение"
#: shell/panel/actions.go:244
msgid "Type"
msgstr "Тип"
#: shell/panel/actions.go:245
msgid "Modules"
msgstr "Модули"
#: shell/panel/actions.go:246
msgid "Left"
msgstr "Слева"
#: shell/panel/actions.go:247
msgid "Center"
msgstr "По центру"
#: shell/panel/actions.go:248
msgid "Right"
msgstr "Справа"
#: shell/panel/actions.go:251
msgid "Running"
msgstr "Запущена"
#: shell/panel/actions.go:252
msgid "Safe mode"
msgstr "Безопасный режим"
#: shell/panel/commands.go:13
msgid "Panel management"
msgstr "Управление панелью"
#: shell/panel/commands.go:17
msgid "Panel information"
msgstr "Информация о панели"
#: shell/panel/commands.go:23
msgid "Set panel option"
msgstr "Установить параметр панели"
#: shell/panel/commands.go:29
msgid "List available panel modules"
msgstr "Список доступных модулей панели"
#: shell/panel/commands.go:34
msgid "show full Waybar module names"
msgstr "показать полные имена модулей Waybar"
#: shell/panel/commands.go:41
msgid "Start panel"
msgstr "Запустить панель"
#: shell/panel/commands.go:46
msgid "Stop panel"
msgstr "Остановить панель"
#: shell/panel/commands.go:51
msgid "Toggle panel"
msgstr "Переключить панель"
#: shell/panel/commands.go:56
msgid "Restart panel"
msgstr "Перезапустить панель"
#: system/commands.go:17
msgid "System Management"
msgstr "Управление системой"
......@@ -715,44 +1008,24 @@ msgstr "Категория:"
msgid "Global options:"
msgstr "Глобальные параметры:"
#: preset/actions.go
msgid "check"
msgstr "проверка"
#: preset/actions.go
#, c-format
msgid "Check failed: %v"
msgstr "Проверка не удалась: %v"
#: ui/help.go:125
msgid "default"
msgstr "по умолчанию"
#: preset/actions.go
msgid "No errors found"
msgstr "Ошибок не найдено"
#~ msgid "Runtime"
#~ msgstr "Выполнение"
#: preset/actions.go
#, c-format
msgid "Module '%s' disabled (errors)"
msgstr "Модуль '%s' отключён (ошибки)"
#~ msgid "Invalid variable name: %s"
#~ msgstr "Недопустимое имя переменной: %s"
#: preset/actions.go
#, c-format
msgid "Disabled %d module(s) with errors, log saved"
msgstr "Отключено модулей с ошибками: %d, лог сохранён"
#~ msgid "Configuration not found: %s"
#~ msgstr "Конфигурация не найдена: %s"
#: hyprland/actions.go
msgid "Show error notification dialog"
msgstr "Показать диалог об ошибках"
#: hyprland/actions.go
msgid "The following modules were disabled due to errors:"
msgstr "Следующие модули были отключены из-за ошибок:"
#: hyprland/actions.go
msgid "Hyprland configuration errors"
msgstr "Ошибки конфигурации Hyprland"
#: ui/help.go:125
msgid "default"
msgstr "по умолчанию"
#, c-format
#~ msgid "Disabled %d module(s) with errors, log saved"
#~ msgstr "Отключено модулей с ошибками: %d, лог сохранён"
#, c-format
#~ msgid "Module '%s': command '%s' failed"
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ximperconf\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-02-14 21:56+0300\n"
"POT-Creation-Date: 2026-05-22 23:41+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -18,94 +18,181 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: hyprland/actions.go:27
#: hyprland/actions.go:22 hyprland/manager.go:519
msgid "invalid module name"
msgstr ""
#: hyprland/actions.go:36
#, c-format
msgid "failed to read config: %s"
msgstr ""
#: hyprland/actions.go:39
#, c-format
msgid "failed to create backup: %s"
msgstr ""
#: hyprland/actions.go:44
msgid "Configuration fixed"
msgstr ""
#: hyprland/actions.go:43 hyprland/actions.go:93
msgid "No errors"
#: hyprland/actions.go:45
#, c-format
msgid "Backup: %s"
msgstr ""
#: hyprland/actions.go:62 hyprland/actions.go:83 hyprland/actions.go:262
#: hyprland/actions.go:298 hyprland/manager.go:343
msgid "invalid module name"
#: hyprland/actions.go:66 hyprland/actions.go:77
msgid "Config has errors, not reloading:"
msgstr ""
#: hyprland/actions.go:72 hyprland/actions.go:287
#: hyprland/actions.go:69
msgid "Hyprland reload"
msgstr ""
#: hyprland/actions.go:85
#, c-format
msgid "failed to reload: %s"
msgstr ""
#. 5 = Ok, цвет 0 (дефолтный для иконки), 3000ms
#: hyprland/actions.go:90 hyprland/actions.go:92
msgid "Config reloaded"
msgstr ""
#: hyprland/actions.go:116 hyprland/actions.go:171
msgid "No errors"
msgstr ""
#: hyprland/actions.go:144 hyprland/actions.go:502
msgid "specify module name"
msgstr ""
#: hyprland/actions.go:186
#: hyprland/actions.go:270
msgid "no available modules"
msgstr ""
#: hyprland/actions.go:226
#: hyprland/actions.go:312
#, c-format
msgid "(errors: %d)"
msgstr ""
#: hyprland/actions.go:240
msgid "Modules"
#: hyprland/actions.go:343
msgid "System modules"
msgstr ""
#: hyprland/actions.go:351
msgid "User modules"
msgstr ""
#: hyprland/actions.go:266 hyprland/manager.go:347
#: hyprland/actions.go:395
msgid "module name not specified"
msgstr ""
#: hyprland/actions.go:412
#, c-format
msgid "module '%s' not found: %s"
msgid "name '%s' is reserved"
msgstr ""
#: hyprland/actions.go:416
#, c-format
msgid "module '%s' already exists"
msgstr ""
#: hyprland/actions.go:278
#: hyprland/actions.go:424
#, c-format
msgid "failed to create module: %s"
msgstr ""
#: hyprland/actions.go:429
msgid "Module created:"
msgstr ""
#: hyprland/actions.go:438 hyprland/actions.go:493
#, c-format
msgid "failed to start editor: %s"
msgstr ""
#: hyprland/actions.go:315
#: hyprland/actions.go:451
msgid "Module has errors, not enabling:"
msgstr ""
#: hyprland/actions.go:481 hyprland/manager.go:160
#, c-format
msgid "module '%s' not found"
msgstr ""
#: hyprland/actions.go:529
msgid "Module"
msgstr ""
#: hyprland/actions.go:318
#: hyprland/actions.go:532
msgid "Group"
msgstr ""
#: hyprland/actions.go:321
#: hyprland/actions.go:535
msgid "Summary"
msgstr ""
#: hyprland/actions.go:324
#: hyprland/actions.go:538
msgid "Description"
msgstr ""
#: hyprland/actions.go:327
#: hyprland/actions.go:541 shell/panel/actions.go:250
msgid "Status"
msgstr ""
#: hyprland/actions.go:328
#: hyprland/actions.go:551
msgid "Dependencies"
msgstr ""
#: hyprland/actions.go:553
msgid "Path"
msgstr ""
#: hyprland/actions.go:329
#: hyprland/actions.go:554
msgid "Config path"
msgstr ""
#: hyprland/actions.go:330
#: hyprland/actions.go:555
msgid "Config line"
msgstr ""
#: hyprland/actions.go:332 hyprland/actions.go:334
#: hyprland/actions.go:557 hyprland/actions.go:559
msgid "Available"
msgstr ""
#: hyprland/actions.go:332
#: hyprland/actions.go:557 preset/actions.go:531 preset/actions.go:582
#: preset/actions.go:585 shell/panel/actions.go:257 shell/panel/actions.go:264
msgid "yes"
msgstr ""
#: hyprland/actions.go:334
#: hyprland/actions.go:559 shell/panel/actions.go:259
#: shell/panel/actions.go:266
msgid "no"
msgstr ""
#: hyprland/actions.go:338
#: hyprland/actions.go:563
msgid "Errors"
msgstr ""
#: hyprland/actions.go:587
msgid "The following modules were disabled due to errors:"
msgstr ""
#: hyprland/actions.go:592
msgid "Hyprland configuration errors"
msgstr ""
#: hyprland/binds.go:50
#, c-format
msgid "failed to get binds: %s"
msgstr ""
#: hyprland/binds.go:55
#, c-format
msgid "failed to parse binds: %s"
msgstr ""
#: hyprland/commands.go:16
msgid "Hyprland Management"
msgstr ""
......@@ -115,118 +202,151 @@ msgid "failed to initialize HyprlandManager: %w"
msgstr ""
#: hyprland/commands.go:37
msgid "Check the Hyprland config"
msgid "Show error notification dialog"
msgstr ""
#: hyprland/commands.go:42
msgid "Check the Hyprland config"
msgstr ""
#: hyprland/commands.go:48
msgid "Fix config: sort modules into sections by order"
msgstr ""
#: hyprland/commands.go:47
#: hyprland/commands.go:53
msgid "Verify config and reload Hyprland"
msgstr ""
#: hyprland/commands.go:57
msgid "Show errors in a dialog window"
msgstr ""
#: hyprland/commands.go:64
msgid "Show keybindings"
msgstr ""
#: hyprland/commands.go:68
msgid "Show all binds including hardware keys (XF86)"
msgstr ""
#: hyprland/commands.go:77
msgid "Sync layouts with xkb"
msgstr ""
#: hyprland/commands.go:52
#: hyprland/commands.go:82
msgid "Forced update"
msgstr ""
#: hyprland/commands.go:60
#: hyprland/commands.go:90
msgid "Hyprland modules"
msgstr ""
#: hyprland/commands.go:64
msgid "use user modules"
#: hyprland/commands.go:94
msgid "Create a new module"
msgstr ""
#: hyprland/commands.go:72
#: hyprland/commands.go:99
msgid "Check and enable module after editing"
msgstr ""
#: hyprland/commands.go:107
msgid "Check Hyprland module"
msgstr ""
#: hyprland/commands.go:79
#: hyprland/commands.go:115
msgid "Edit module file"
msgstr ""
#: hyprland/commands.go:86
#: hyprland/commands.go:122
msgid "Hyprland module status"
msgstr ""
#: hyprland/commands.go:93
#: hyprland/commands.go:129
msgid "Show detailed module info"
msgstr ""
#: hyprland/commands.go:103
msgid "Information about modules"
#: hyprland/commands.go:139
msgid "List module names"
msgstr ""
#: hyprland/commands.go:107 hyprland/commands.go:210
msgid "status filter"
#: hyprland/commands.go:143 hyprland/commands.go:156
msgid ""
"module filter (e.g. status:enabled, type:user, group:themes, deps:installed)"
msgstr ""
#: hyprland/commands.go:117
#: hyprland/commands.go:152
msgid "Information about modules"
msgstr ""
#: hyprland/commands.go:165
msgid "enable module"
msgstr ""
#: hyprland/commands.go:124
#: hyprland/commands.go:172
msgid "disable module"
msgstr ""
#: hyprland/commands.go:128
#: hyprland/commands.go:176
msgid "delete module line from config"
msgstr ""
#: hyprland/commands.go:139
#: hyprland/commands.go:187
msgid "toggle module"
msgstr ""
#: hyprland/commands.go:148
#: hyprland/commands.go:196
msgid "Hyprland vars"
msgstr ""
#: hyprland/commands.go:152
#: hyprland/commands.go:200
msgid "vars list"
msgstr ""
#: hyprland/commands.go:160
#: hyprland/commands.go:208
msgid "vars info"
msgstr ""
#: hyprland/commands.go:168
#: hyprland/commands.go:216
msgid "get var value"
msgstr ""
#: hyprland/commands.go:174
#: hyprland/commands.go:222
msgid "set var value"
msgstr ""
#: hyprland/commands.go:179
#: hyprland/commands.go:227
msgid "unset var"
msgstr ""
#: hyprland/commands.go:187
#: hyprland/commands.go:235
msgid "Hyprland plugins"
msgstr ""
#: hyprland/commands.go:191
#: hyprland/commands.go:239
msgid "Hyprland plugins list"
msgstr ""
#: hyprland/commands.go:199
#: hyprland/commands.go:247
msgid "Hyprland plugin status"
msgstr ""
#: hyprland/commands.go:206
#: hyprland/commands.go:254
msgid "Information about plugins"
msgstr ""
#: hyprland/commands.go:220
#: hyprland/commands.go:258
msgid "status filter"
msgstr ""
#: hyprland/commands.go:268
msgid "load plugin"
msgstr ""
#: hyprland/commands.go:227
#: hyprland/commands.go:275
msgid "unload plugin"
msgstr ""
#: hyprland/commands.go:234
#: hyprland/commands.go:282
msgid "toggle plugin"
msgstr ""
......@@ -234,141 +354,151 @@ msgstr ""
msgid "failed to get system layouts: %w"
msgstr ""
#: hyprland/keyboard-actions.go:50
msgid "failed to update kb_layout in Hyprland: %w"
#: hyprland/keyboard-actions.go:49
msgid "layout is already set, use '--force' for forced update"
msgstr ""
#: hyprland/keyboard-actions.go:52
msgid "Layout updated!"
#: hyprland/keyboard-actions.go:53
msgid "failed to update kb_layout in Hyprland: %w"
msgstr ""
#: hyprland/keyboard-actions.go:54
msgid "layout is already set, use '--force' for forced update"
#: hyprland/keyboard-actions.go:56
msgid "Layout updated!"
msgstr ""
#: hyprland/manager.go:109
#: hyprland/manager.go:118
msgid "HyprlandManager not found in context"
msgstr ""
#: hyprland/manager.go:140
#: hyprland/manager.go:149
msgid "check failed"
msgstr ""
#: hyprland/manager.go:155
#: hyprland/manager.go:523
#, c-format
msgid "module '%s' not found"
msgid "module '%s' not found: %s"
msgstr ""
#: hyprland/manager.go:530
#, c-format
msgid "missing module dependencies: %s"
msgstr ""
#: hyprland/manager.go:355
#: hyprland/manager.go:536
msgid "cannot enable this module"
msgstr ""
#: hyprland/manager.go:360
#: hyprland/manager.go:541
#, c-format
msgid "module '%s' is already enabled"
msgstr ""
#: hyprland/manager.go:382
#: hyprland/manager.go:563
#, c-format
msgid "module '%s' already present in config (commented) — skipped"
msgstr ""
#: hyprland/manager.go:400
#: hyprland/manager.go:581 hyprland/manager.go:599
#, c-format
msgid "module '%s' not changed"
msgstr ""
#: hyprland/manager.go:407
#: hyprland/manager.go:587
#, c-format
msgid "module '%s' is already disabled"
msgstr ""
#: hyprland/manager.go:416
#: hyprland/manager.go:596
#, c-format
msgid "Module '%s' disabled"
msgstr ""
#: hyprland/manager.go:422
#: hyprland/manager.go:604
#, c-format
msgid "module '%s' not found in config"
msgstr ""
#: hyprland/manager.go:428
#: hyprland/manager.go:610
#, c-format
msgid "Module '%s' removed"
msgstr ""
#: hyprland/manager.go:434
#: hyprland/manager.go:613 hyprland/manager.go:1042
#, c-format
msgid "unsupported action: %s"
msgstr ""
#: hyprland/manager.go:618
#, c-format
msgid "Module '%s' enabled"
msgstr ""
#: hyprland/manager.go:436
#: hyprland/manager.go:620
#, c-format
msgid "Module '%s' disabled (group)"
msgstr ""
#: hyprland/manager.go:439
#: hyprland/manager.go:623
msgid ""
"Warning: modules found outside sections. Run 'ximperconf hyprland fix' to "
"fix."
msgstr ""
#: hyprland/manager.go:794 hyprland/manager.go:822
#: hyprland/manager.go:978 hyprland/manager.go:1006
msgid "plugin not specified"
msgstr ""
#: hyprland/manager.go:799
#: hyprland/manager.go:983
msgid "plugin not found"
msgstr ""
#: hyprland/manager.go:835
#: hyprland/manager.go:1019
msgid "plugin is already loaded"
msgstr ""
#: hyprland/manager.go:843
#: hyprland/manager.go:1027
#, c-format
msgid "Plugin '%s' loaded"
msgstr ""
#: hyprland/manager.go:847
#: hyprland/manager.go:1031
msgid "plugin is not loaded"
msgstr ""
#: hyprland/manager.go:855
#: hyprland/manager.go:1039
#, c-format
msgid "Plugin '%s' unloaded"
msgstr ""
#: hyprland/manager.go:886 hyprland/manager.go:925 hyprland/var-actions.go:116
#: hyprland/manager.go:1071 hyprland/manager.go:1110
msgid "specify variable name"
msgstr ""
#: hyprland/manager.go:889
#: hyprland/manager.go:1074
msgid "specify variable value"
msgstr ""
#: hyprland/manager.go:895
#: hyprland/manager.go:1080
#, c-format
msgid "variable '%s' is already '%s'"
msgstr ""
#: hyprland/manager.go:900
#: hyprland/manager.go:1085
#, c-format
msgid "Variable '%s' updated: %s"
msgstr ""
#: hyprland/manager.go:913
#: hyprland/manager.go:1098
#, c-format
msgid "Variable '%s' set: %s"
msgstr ""
#: hyprland/manager.go:920
#: hyprland/manager.go:1105
#, c-format
msgid "VARS block created, variable '%s' set: %s"
msgstr ""
#: hyprland/manager.go:935 hyprland/var-actions.go:144
#: hyprland/manager.go:1120
#, c-format
msgid "variable '%s' not found"
msgstr ""
......@@ -377,189 +507,223 @@ msgstr ""
msgid "no available plugins"
msgstr ""
#: hyprland/plugin-actions.go:81
#: hyprland/plugin-actions.go:77
msgid "Plugins"
msgstr ""
#: hyprland/var-actions.go:51
#: hyprland/var-actions.go:47
msgid "No variables in configuration"
msgstr ""
#: hyprland/var-actions.go:76
#: hyprland/var-actions.go:72
msgid "Vars"
msgstr ""
#: hyprland/var-actions.go:93
#: hyprland/var-actions.go:89
#, c-format
msgid "variable '%s' is not set"
msgstr ""
#: hyprland/var-actions.go:120
#, c-format
msgid "Invalid variable name: %s"
msgstr ""
#: hyprland/var-actions.go:124
#, c-format
msgid "Configuration not found: %s"
msgstr ""
#: hyprland/var-actions.go:148
#: hyprland/var-actions.go:121
#, c-format
msgid "Variable '%s' removed"
msgstr ""
#: main.go:27
#: main.go:29
msgid "Ximper Linux Configuration Tool"
msgstr ""
#: main.go:38 ui/help.go:16
#: main.go:41 ui/help.go:16
msgid "show help"
msgstr ""
#: preset/actions.go:30
#: preset/actions.go:32 preset/actions.go:539
msgid "copy"
msgstr ""
#: preset/actions.go:40
#: preset/actions.go:42 preset/actions.go:547
msgid "link"
msgstr ""
#: preset/actions.go:64
#: preset/actions.go:66 preset/actions.go:559
msgid "replace"
msgstr ""
#: preset/actions.go:70
#: preset/actions.go:72
#, c-format
msgid "Not found: '%s'"
msgstr ""
#: preset/actions.go:75
#: preset/actions.go:77
msgid "Failed to read %s: %v"
msgstr ""
#: preset/actions.go:79
#: preset/actions.go:81
#, c-format
msgid "Locked: %s"
msgstr ""
#: preset/actions.go:88
#: preset/actions.go:90
#, c-format
msgid "Up to date: '%s'"
msgstr ""
#: preset/actions.go:97
#: preset/actions.go:99
msgid "Replace error %s: %v"
msgstr ""
#: preset/actions.go:111 preset/actions.go:113 preset/actions.go:119
#: preset/actions.go:123 preset/actions.go:125
#: preset/actions.go:113 preset/actions.go:115 preset/actions.go:121
#: preset/actions.go:125 preset/actions.go:127 preset/actions.go:567
msgid "system"
msgstr ""
#: preset/actions.go:119
#: preset/actions.go:121
msgid "GRUB error: %v"
msgstr ""
#: preset/actions.go:123 system/grub-actions.go:86
#: preset/actions.go:125 system/grub-actions.go:86
msgid "GRUB_GFXMODE fixed"
msgstr ""
#: preset/actions.go:125 system/grub-actions.go:89
#: preset/actions.go:127 system/grub-actions.go:89
msgid "update-grub completed"
msgstr ""
#: preset/actions.go:133 preset/actions.go:139 preset/actions.go:144
#: preset/actions.go:146
#: preset/actions.go:132 preset/actions.go:616
msgid "var"
msgstr ""
#: preset/actions.go:133
#: preset/actions.go:136
#, c-format
msgid "Already exists: %s"
msgstr ""
#: preset/actions.go:144
#: preset/actions.go:151
msgid "Error setting %s: %v"
msgstr ""
#: preset/actions.go:154 preset/actions.go:159 preset/actions.go:167
#: preset/actions.go:173 preset/actions.go:181 preset/actions.go:184
#: preset/actions.go:190 preset/actions.go:195 preset/actions.go:197
#: preset/actions.go:159 preset/actions.go:589
msgid "module"
msgstr ""
#: preset/actions.go:154
#: preset/actions.go:162
msgid "Skipped module without name"
msgstr ""
#: preset/actions.go:159
#: preset/actions.go:167
#, c-format
msgid "Module '%s': unsupported action"
msgstr ""
#: preset/actions.go:167
#: preset/actions.go:175
#, c-format
msgid "Module '%s': condition not met"
msgstr ""
#: preset/actions.go:173
#: preset/actions.go:181
#, c-format
msgid "Module '%s': binary '%s' not found"
msgstr ""
#: preset/actions.go:181 preset/actions.go:184
#: preset/actions.go:189 preset/actions.go:192
#, c-format
msgid "Created empty module: %s"
msgstr ""
#: preset/actions.go:195
#: preset/actions.go:203
msgid "Error (%s): %v"
msgstr ""
#: preset/actions.go:208 preset/actions.go:214 preset/actions.go:222
#: preset/actions.go:225 preset/actions.go:227
#: preset/actions.go:215
msgid "cleanup"
msgstr ""
#: preset/actions.go:224
msgid "file not found"
msgstr ""
#: preset/actions.go:227
#, c-format
msgid "missing dependencies: %s"
msgstr ""
#: preset/actions.go:235
#, c-format
msgid "Module '%s' removed (%s)"
msgstr ""
#: preset/actions.go:243
msgid "Failed to remove '%s': %v"
msgstr ""
#: preset/actions.go:255
msgid "check"
msgstr ""
#: preset/actions.go:265
msgid "Check failed: %v"
msgstr ""
#. Удаляем лог от предыдущего запуска
#: preset/actions.go:271
msgid "No errors found"
msgstr ""
#: preset/actions.go:302
msgid "Failed to disable '%s': %v"
msgstr ""
#: preset/actions.go:306
#, c-format
msgid "Module '%s' disabled (errors)"
msgstr ""
#: preset/actions.go:318
msgid "Failed to enable notification module: %v"
msgstr ""
#: preset/actions.go:327
msgid "layout"
msgstr ""
#: preset/actions.go:208
#: preset/actions.go:330
msgid "Sync Hyprland layouts"
msgstr ""
#: preset/actions.go:214
#: preset/actions.go:336
msgid "Failed to get system layouts"
msgstr ""
#: preset/actions.go:222
#: preset/actions.go:344
msgid "Failed to update kb_layout"
msgstr ""
#: preset/actions.go:225
#: preset/actions.go:347
#, c-format
msgid "Layout updated: %s"
msgstr ""
#: preset/actions.go:227
#: preset/actions.go:349
#, c-format
msgid "Layout already set: %s"
msgstr ""
#: preset/actions.go:270
#: preset/actions.go:394 preset/actions.go:501
#, c-format
msgid "Profile %s not found"
msgstr ""
#: preset/actions.go:275
#: preset/actions.go:399
#, c-format
msgid "Profile %s unavailable"
msgstr ""
#: preset/actions.go:287 preset/actions.go:338
#: preset/actions.go:414 preset/actions.go:469
#, c-format
msgid "Applying profile: %s"
msgstr ""
#: preset/actions.go:321 preset/helpers.go:73
#: preset/actions.go:449 preset/helpers.go:80
msgid "no available profiles"
msgstr ""
......@@ -580,14 +744,18 @@ msgid "Show information about preset profiles"
msgstr ""
#: preset/commands.go:38
msgid "Show profile details"
msgstr ""
#: preset/commands.go:46
msgid "Apply a profile"
msgstr ""
#: preset/commands.go:45
#: preset/commands.go:53
msgid "Apply all available profiles"
msgstr ""
#: preset/helpers.go:93
#: preset/helpers.go:100
msgid "Profiles"
msgstr ""
......@@ -637,6 +805,117 @@ msgstr ""
msgid "Date of last update"
msgstr ""
#: shell/commands.go:13
msgid "Ximper Shell Management"
msgstr ""
#: shell/panel/actions.go:65
msgid "specify option and value"
msgstr ""
#: shell/panel/actions.go:98
#, c-format
msgid "unsupported panel option: %s"
msgstr ""
#: shell/panel/actions.go:109
msgid "Panel config updated, but safe mode is enabled; restart skipped"
msgstr ""
#: shell/panel/actions.go:116
msgid "Panel config updated"
msgstr ""
#: shell/panel/actions.go:155
msgid "parse panel status: %w"
msgstr ""
#: shell/panel/actions.go:173
#, c-format
msgid "unknown panel module: %s"
msgstr ""
#: shell/panel/actions.go:199
msgid "parse panel modules: %w"
msgstr ""
#: shell/panel/actions.go:211 shell/panel/actions.go:223
#, c-format
msgid "failed to find %s"
msgstr ""
#: shell/panel/actions.go:242
msgid "Config"
msgstr ""
#: shell/panel/actions.go:243
msgid "Position"
msgstr ""
#: shell/panel/actions.go:244
msgid "Type"
msgstr ""
#: shell/panel/actions.go:245
msgid "Modules"
msgstr ""
#: shell/panel/actions.go:246
msgid "Left"
msgstr ""
#: shell/panel/actions.go:247
msgid "Center"
msgstr ""
#: shell/panel/actions.go:248
msgid "Right"
msgstr ""
#: shell/panel/actions.go:251
msgid "Running"
msgstr ""
#: shell/panel/actions.go:252
msgid "Safe mode"
msgstr ""
#: shell/panel/commands.go:13
msgid "Panel management"
msgstr ""
#: shell/panel/commands.go:17
msgid "Panel information"
msgstr ""
#: shell/panel/commands.go:23
msgid "Set panel option"
msgstr ""
#: shell/panel/commands.go:29
msgid "List available panel modules"
msgstr ""
#: shell/panel/commands.go:34
msgid "show full Waybar module names"
msgstr ""
#: shell/panel/commands.go:41
msgid "Start panel"
msgstr ""
#: shell/panel/commands.go:46
msgid "Stop panel"
msgstr ""
#: shell/panel/commands.go:51
msgid "Toggle panel"
msgstr ""
#: shell/panel/commands.go:56
msgid "Restart panel"
msgstr ""
#: system/commands.go:17
msgid "System Management"
msgstr ""
......
package shell
import (
"ximperconf/locale"
"ximperconf/shell/panel"
"github.com/urfave/cli/v3"
)
func CommandList() *cli.Command {
return &cli.Command{
Name: "shell",
Usage: locale.T("Ximper Shell Management"),
Commands: []*cli.Command{
panel.CommandList(),
},
}
}
package panel
import (
"context"
"encoding/json"
"errors"
"fmt"
"os"
"os/exec"
"strings"
"ximperconf/config"
"ximperconf/locale"
"ximperconf/ui"
"github.com/fatih/color"
"github.com/urfave/cli/v3"
)
const panelBinary = "ximper-shell-panel"
type runtimeStatus struct {
Running bool `json:"running"`
SafeMode bool `json:"safe_mode"`
}
type panelStatus struct {
Running bool `json:"running"`
PID *int `json:"pid"`
RuntimeDir string `json:"runtime_dir"`
SafeMode bool `json:"safe_mode"`
}
type infoOutput struct {
Config Config `json:"config"`
Runtime runtimeStatus `json:"runtime"`
}
func InfoCommand(ctx context.Context, cmd *cli.Command) error {
cfg, err := loadConfig()
if err != nil {
return err
}
status, err := getPanelStatus()
if err != nil {
return err
}
output := infoOutput{
Config: cfg,
Runtime: runtimeStatus{
Running: status.Running,
SafeMode: status.SafeMode,
},
}
if config.IsJSON(cmd) {
return ui.PrintJSON(output)
}
printPanelInfo(cfg, output.Runtime)
return nil
}
func SetCommand(ctx context.Context, cmd *cli.Command) error {
key := cmd.Args().Get(0)
if key == "" || cmd.NArg() < 2 {
return errors.New(locale.T("specify option and value"))
}
cfg, err := loadConfig()
if err != nil {
return err
}
values := argValues(cmd, 1)
switch key {
case "position":
cfg.Position = values[0]
case "type":
cfg.Type = values[0]
case "modules-left":
modules, err := parseAndValidateModuleList(values)
if err != nil {
return err
}
cfg.ModulesLeft = modules
case "modules-center":
modules, err := parseAndValidateModuleList(values)
if err != nil {
return err
}
cfg.ModulesCenter = modules
case "modules-right":
modules, err := parseAndValidateModuleList(values)
if err != nil {
return err
}
cfg.ModulesRight = modules
default:
return fmt.Errorf(locale.T("unsupported panel option: %s"), key)
}
if err := saveConfig(cfg); err != nil {
return err
}
status, err := getPanelStatus()
if err != nil {
return err
}
if status.SafeMode {
color.Yellow(locale.T("Panel config updated, but safe mode is enabled; restart skipped"))
return nil
}
if err := runPanelCommand("restart"); err != nil {
return err
}
color.Green(locale.T("Panel config updated"))
return nil
}
func ListModulesCommand(ctx context.Context, cmd *cli.Command) error {
args := []string{"list-modules"}
if cmd.Bool("all") {
args = append(args, "--all")
}
if config.IsJSON(cmd) {
args = append(args, "-o", "json")
}
return runPanelCommand(args...)
}
func StartCommand(ctx context.Context, cmd *cli.Command) error {
return runPanelCommand("start")
}
func StopCommand(ctx context.Context, cmd *cli.Command) error {
return runPanelCommand("stop")
}
func ToggleCommand(ctx context.Context, cmd *cli.Command) error {
return runPanelCommand("toggle")
}
func RestartCommand(ctx context.Context, cmd *cli.Command) error {
return runPanelCommand("restart")
}
func getPanelStatus() (panelStatus, error) {
out, err := runPanelCommandOutput("status", "-o", "json")
if err != nil {
return panelStatus{}, err
}
var status panelStatus
if err := json.Unmarshal(out, &status); err != nil {
return panelStatus{}, fmt.Errorf(locale.T("parse panel status: %w"), err)
}
return status, nil
}
func validateModuleNames(names []string) error {
available, err := availablePanelModules()
if err != nil {
return err
}
var unknown []string
for _, name := range names {
if _, ok := available[name]; !ok {
unknown = append(unknown, name)
}
}
if len(unknown) > 0 {
return fmt.Errorf(locale.T("unknown panel module: %s"), strings.Join(unknown, ", "))
}
return nil
}
func parseAndValidateModuleList(values []string) ([]string, error) {
modules := parseModuleList(values)
if err := validateModuleNames(modules); err != nil {
return nil, err
}
return modules, nil
}
func availablePanelModules() (map[string]struct{}, error) {
names := make(map[string]struct{})
for _, args := range [][]string{
{"list-modules", "-o", "json"},
{"list-modules", "--all", "-o", "json"},
} {
out, err := runPanelCommandOutput(args...)
if err != nil {
return nil, err
}
var list []string
if err := json.Unmarshal(out, &list); err != nil {
return nil, fmt.Errorf(locale.T("parse panel modules: %w"), err)
}
for _, name := range list {
names[name] = struct{}{}
}
}
return names, nil
}
func runPanelCommand(args ...string) error {
path, err := exec.LookPath(panelBinary)
if err != nil {
return fmt.Errorf(locale.T("failed to find %s"), panelBinary)
}
c := exec.Command(path, args...)
c.Stdout = os.Stdout
c.Stderr = os.Stderr
c.Stdin = os.Stdin
return c.Run()
}
func runPanelCommandOutput(args ...string) ([]byte, error) {
path, err := exec.LookPath(panelBinary)
if err != nil {
return nil, fmt.Errorf(locale.T("failed to find %s"), panelBinary)
}
c := exec.Command(path, args...)
c.Stderr = os.Stderr
c.Stdin = os.Stdin
return c.Output()
}
func argValues(cmd *cli.Command, start int) []string {
values := make([]string, 0, cmd.NArg()-start)
for i := start; i < cmd.NArg(); i++ {
values = append(values, cmd.Args().Get(i))
}
return values
}
func printPanelInfo(cfg Config, runtime runtimeStatus) {
blue := color.New(color.FgBlue).SprintFunc()
fmt.Printf("%s:\n", blue(locale.T("Config")))
fmt.Printf(" %s: %s\n", blue(locale.T("Position")), cfg.Position)
fmt.Printf(" %s: %s\n", blue(locale.T("Type")), cfg.Type)
fmt.Printf(" %s:\n", blue(locale.T("Modules")))
fmt.Printf(" %s: %s\n", blue(locale.T("Left")), strings.Join(cfg.ModulesLeft, " "))
fmt.Printf(" %s: %s\n", blue(locale.T("Center")), strings.Join(cfg.ModulesCenter, " "))
fmt.Printf(" %s: %s\n", blue(locale.T("Right")), strings.Join(cfg.ModulesRight, " "))
fmt.Printf("\n%s:\n", blue(locale.T("Status")))
fmt.Printf(" %s: %s\n", blue(locale.T("Running")), coloredYesNo(runtime.Running))
fmt.Printf(" %s: %s\n", blue(locale.T("Safe mode")), coloredSafeMode(runtime.SafeMode))
}
func coloredYesNo(value bool) string {
if value {
return color.GreenString(locale.T("yes"))
}
return color.RedString(locale.T("no"))
}
func coloredSafeMode(value bool) string {
if value {
return color.YellowString(locale.T("yes"))
}
return color.GreenString(locale.T("no"))
}
package panel
import (
"ximperconf/config"
"ximperconf/locale"
"github.com/urfave/cli/v3"
)
func CommandList() *cli.Command {
return &cli.Command{
Name: "panel",
Usage: locale.T("Panel management"),
Commands: []*cli.Command{
{
Name: "info",
Usage: locale.T("Panel information"),
Flags: []cli.Flag{config.FormatFlag},
Action: InfoCommand,
},
{
Name: "set",
Usage: locale.T("Set panel option"),
ArgsUsage: "option value",
Action: SetCommand,
},
{
Name: "list-modules",
Usage: locale.T("List available panel modules"),
Flags: []cli.Flag{
config.FormatFlag,
&cli.BoolFlag{
Name: "all",
Usage: locale.T("show full Waybar module names"),
},
},
Action: ListModulesCommand,
},
{
Name: "start",
Usage: locale.T("Start panel"),
Action: StartCommand,
},
{
Name: "stop",
Usage: locale.T("Stop panel"),
Action: StopCommand,
},
{
Name: "toggle",
Usage: locale.T("Toggle panel"),
Action: ToggleCommand,
},
{
Name: "restart",
Usage: locale.T("Restart panel"),
Action: RestartCommand,
},
},
}
}
package panel
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"os"
"path/filepath"
"strings"
)
type Config struct {
Position string `json:"position"`
Type string `json:"type"`
ModulesLeft []string `json:"modules_left"`
ModulesCenter []string `json:"modules_center"`
ModulesRight []string `json:"modules_right"`
}
func defaultConfig() Config {
return Config{
Position: "top",
Type: "panel",
ModulesLeft: []string{"image#menu"},
ModulesCenter: []string{"workspaces"},
ModulesRight: []string{"group/volume", "network", "clock"},
}
}
func configPath() string {
home, _ := os.UserHomeDir()
return filepath.Join(home, ".config", "ximper-shell", "panel", "config.json")
}
func loadConfig() (Config, error) {
cfg := defaultConfig()
data, err := os.ReadFile(configPath())
if err != nil {
if errors.Is(err, os.ErrNotExist) {
return cfg, nil
}
return cfg, err
}
if len(bytes.TrimSpace(data)) == 0 {
return cfg, nil
}
if err := json.Unmarshal(data, &cfg); err != nil {
return cfg, fmt.Errorf("parse panel config: %w", err)
}
return cfg, cfg.validate()
}
func saveConfig(cfg Config) error {
if err := cfg.validate(); err != nil {
return err
}
data, err := json.MarshalIndent(cfg, "", " ")
if err != nil {
return err
}
path := configPath()
if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil {
return err
}
return os.WriteFile(path, append(data, '\n'), 0644)
}
func (c Config) validate() error {
switch c.Position {
case "top", "bottom", "left", "right":
default:
return fmt.Errorf("unsupported position %q", c.Position)
}
switch c.Type {
case "panel", "floating", "islands":
default:
return fmt.Errorf("unsupported panel type %q", c.Type)
}
for _, name := range append(append([]string{}, c.ModulesLeft...), append(c.ModulesCenter, c.ModulesRight...)...) {
if strings.TrimSpace(name) == "" {
return errors.New("module name cannot be empty")
}
}
return nil
}
func parseModuleList(parts []string) []string {
raw := strings.Join(parts, " ")
raw = strings.ReplaceAll(raw, ",", " ")
return strings.Fields(raw)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment