Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
ximper-tools
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
ximper-tools
Commits
cbe32a3d
Verified
Commit
cbe32a3d
authored
Aug 17, 2025
by
Kirill Unitsaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ximperconf: add hyprland sync-xkb-layouts
parent
5833d702
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
ximperconf
bin/ximperconf
+29
-0
No files found.
bin/ximperconf
View file @
cbe32a3d
...
...
@@ -30,6 +30,9 @@ show_help() {
print_white
""
print_white
" hyprland Управление модулями Hyprland"
print_yellow
" check Проверить конфиг"
print_yellow
" sync-xkb-layouts Синхронизировать раскладки с xkb"
print_blue
" Флаги:"
print_yellow
" --force Обновить принудительно"
print_white
" module Управление модулями"
print_blue
" Флаги:"
print_yellow
" --user Использовать пользовательские модули"
...
...
@@ -127,6 +130,23 @@ hyprland_check() {
'
}
hyprland_sync_system_layouts
()
{
local
force
=
"
${
1
:-
false
}
"
local
sys_layouts
sys_layouts
=
$(
localectl status |
sed
-n
's/.*X11 Layout:\s*//p'
)
local
hypr_layouts
hypr_layouts
=
$(
hyprland_var_get kb_layout |
sed
's/\x1b\[[0-9;]*m//g'
|
tr
-d
'[:space:]'
)
if
[
"
$force
"
=
"true"
]
||
[
-z
"
$hypr_layouts
"
]
;
then
hyprland_var_set kb_layout
"
$sys_layouts
"
>
/dev/null 2>&1
print_green
"Раскладка обновлена!"
else
print_error
"Раскладка уже установлена, используйте '--force' для принудительного обновления."
fi
}
hyprland_get_module_file
()
{
local
module
=
"
$1
"
local
user
=
"
${
2
:-
false
}
"
...
...
@@ -430,6 +450,15 @@ case "$cmd" in
hyprland
)
case
"
$subcmd
"
in
check
)
hyprland_check
;;
sync-xkb-layouts
)
force_sync
=
"false"
for
arg
in
"
$@
"
;
do
case
"
$arg
"
in
--force
)
force_sync
=
"true"
;;
esac
done
hyprland_sync_system_layouts
"
$force_sync
"
;;
module
)
user_flag
=
false
if
[
"
${
1
:-}
"
=
"--user"
]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment