Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
ximperconf
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
1
Merge Requests
1
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
ximperconf
Commits
e86cb735
Verified
Commit
e86cb735
authored
Jan 10, 2026
by
Kirill Unitsaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
preset/hyprland profile: use HyprlandManager
parent
a959dad7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
17 deletions
+16
-17
actions.go
preset/actions.go
+16
-17
No files found.
preset/actions.go
View file @
e86cb735
...
...
@@ -106,10 +106,10 @@ func handleReleaseReplace(src, dest, sysVer string, opts opOptions) string {
return
fmt
.
Sprintf
(
"Обновлён: %s (%s → %s)"
,
dest
,
fileVer
,
sysVer
)
}
func
processHyprVars
(
prof
config
.
PresetProfile
,
opts
opOptions
,
res
*
config
.
PresetResult
)
{
func
processHyprVars
(
manager
*
hyprland
.
HyprlandManager
,
prof
config
.
PresetProfile
,
opts
opOptions
,
res
*
config
.
PresetResult
)
{
for
_
,
v
:=
range
prof
.
Hyprland
.
Vars
{
if
!
v
.
Force
{
if
_
,
err
:=
hyprland
.
HyprlandVarGet
(
v
.
Var
);
err
==
nil
{
if
V
:=
manager
.
GetVar
(
v
.
Var
);
V
!=
""
{
res
.
HyprVars
=
append
(
res
.
HyprVars
,
fmt
.
Sprintf
(
"Уже существует: '%s' — пропущено"
,
v
.
Var
))
continue
...
...
@@ -122,7 +122,7 @@ func processHyprVars(prof config.PresetProfile, opts opOptions, res *config.Pres
continue
}
if
_
,
err
:=
hyprland
.
HyprlandVarSet
(
v
.
Var
,
v
.
Value
);
err
!=
nil
{
if
_
,
err
:=
manager
.
SetVar
(
v
.
Var
,
v
.
Value
);
err
!=
nil
{
res
.
HyprVars
=
append
(
res
.
HyprVars
,
fmt
.
Sprintf
(
"Ошибка установки %s: %v"
,
v
.
Var
,
err
))
}
else
{
...
...
@@ -132,7 +132,7 @@ func processHyprVars(prof config.PresetProfile, opts opOptions, res *config.Pres
}
}
func
processHyprModules
(
prof
config
.
PresetProfile
,
opts
opOptions
,
res
*
config
.
PresetResult
)
{
func
processHyprModules
(
manager
*
hyprland
.
HyprlandManager
,
prof
config
.
PresetProfile
,
opts
opOptions
,
res
*
config
.
PresetResult
)
{
for
_
,
m
:=
range
prof
.
Hyprland
.
Modules
{
if
m
.
Module
==
""
{
...
...
@@ -174,7 +174,7 @@ func processHyprModules(prof config.PresetProfile, opts opOptions, res *config.P
}
if
m
.
Init
&&
m
.
User
&&
m
.
Action
==
"enable"
{
modulefile
:=
hyprland
.
Hyprland
GetModuleFile
(
m
.
Module
,
m
.
User
)
modulefile
:=
manager
.
GetModuleFile
(
m
.
Module
,
m
.
User
)
if
_
,
err
:=
os
.
Stat
(
modulefile
);
os
.
IsNotExist
(
err
)
{
if
opts
.
DryRun
{
...
...
@@ -203,7 +203,7 @@ func processHyprModules(prof config.PresetProfile, opts opOptions, res *config.P
continue
}
if
_
,
err
:=
hyprland
.
Hyprland
SetModule
(
if
_
,
err
:=
manager
.
SetModule
(
m
.
Action
,
m
.
Module
,
m
.
User
,
...
...
@@ -226,7 +226,7 @@ func processHyprModules(prof config.PresetProfile, opts opOptions, res *config.P
}
}
func
processHyprLayoutSync
(
prof
config
.
PresetProfile
,
opts
opOptions
,
res
*
config
.
PresetResult
)
{
func
processHyprLayoutSync
(
manager
*
hyprland
.
HyprlandManager
,
prof
config
.
PresetProfile
,
opts
opOptions
,
res
*
config
.
PresetResult
)
{
if
!
prof
.
Hyprland
.
Option
.
SyncSystemLayouts
{
return
}
...
...
@@ -244,12 +244,7 @@ func processHyprLayoutSync(prof config.PresetProfile, opts opOptions, res *confi
return
}
hyprLayouts
,
err
:=
hyprland
.
HyprlandVarGet
(
"kb_layout"
)
if
err
!=
nil
{
res
.
SyncSystemLayouts
=
append
(
res
.
SyncSystemLayouts
,
"Не удалось получить раскладки Hyprland"
)
return
}
hyprLayouts
:=
manager
.
GetVar
(
"kb_layout"
)
if
hyprLayouts
==
""
{
hyprLayouts
=
"<empty>"
...
...
@@ -261,7 +256,7 @@ func processHyprLayoutSync(prof config.PresetProfile, opts opOptions, res *confi
fmt
.
Sprintf
(
"Раскладка Hyprland: %s"
,
hyprLayouts
))
if
hyprLayouts
==
"<empty>"
{
if
_
,
err
:=
hyprland
.
HyprlandVarSet
(
"kb_layout"
,
sysLayouts
);
err
!=
nil
{
if
_
,
err
:=
manager
.
SetVar
(
"kb_layout"
,
sysLayouts
);
err
!=
nil
{
res
.
SyncSystemLayouts
=
append
(
res
.
SyncSystemLayouts
,
"Не удалось обновить kb_layout"
)
return
...
...
@@ -305,9 +300,13 @@ func processProfile(prof config.PresetProfile, dryRun bool, res *config.PresetRe
if
config
.
Env
.
IsRoot
{
processSystemGrub
(
prof
,
opts
,
res
)
}
processHyprVars
(
prof
,
opts
,
res
)
processHyprModules
(
prof
,
opts
,
res
)
processHyprLayoutSync
(
prof
,
opts
,
res
)
manager
,
err
:=
hyprland
.
NewHyprlandManager
()
if
err
!=
nil
{
return
}
processHyprVars
(
manager
,
prof
,
opts
,
res
)
processHyprModules
(
manager
,
prof
,
opts
,
res
)
processHyprLayoutSync
(
manager
,
prof
,
opts
,
res
)
}
func
createProfile
(
profileName
string
,
prof
config
.
PresetProfile
,
dryRun
bool
,
res
*
config
.
PresetResult
)
{
...
...
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