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
ac10bb4e
Verified
Commit
ac10bb4e
authored
Jan 10, 2026
by
Kirill Unitsaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hyprland: add HyprlandManager
parent
fcb380e1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
5 deletions
+33
-5
ctxkey.go
config/ctxkey.go
+5
-0
commands.go
hyprland/commands.go
+28
-5
manager.go
hyprland/manager.go
+0
-0
No files found.
config/ctxkey.go
0 → 100644
View file @
ac10bb4e
package
config
type
ctxKey
string
const
HyprManagerKey
ctxKey
=
"hyprManager"
hyprland/commands.go
View file @
ac10bb4e
...
@@ -13,6 +13,23 @@ func CommandList() *cli.Command {
...
@@ -13,6 +13,23 @@ func CommandList() *cli.Command {
Name
:
"hyprland"
,
Name
:
"hyprland"
,
Hidden
:
config
.
Env
.
Hyprland
==
nil
,
Hidden
:
config
.
Env
.
Hyprland
==
nil
,
Usage
:
"Hyprland Management"
,
Usage
:
"Hyprland Management"
,
Before
:
func
(
ctx
context
.
Context
,
command
*
cli
.
Command
)
(
context
.
Context
,
error
)
{
manager
,
err
:=
NewHyprlandManager
()
if
err
!=
nil
{
return
ctx
,
fmt
.
Errorf
(
"не удалось инициализировать HyprlandManager: %w"
,
err
)
}
ctx
=
context
.
WithValue
(
ctx
,
config
.
HyprManagerKey
,
manager
)
return
ctx
,
nil
},
After
:
func
(
ctx
context
.
Context
,
command
*
cli
.
Command
)
error
{
manager
,
err
:=
GetHyprlandManager
(
ctx
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
"не удалось инициализировать HyprlandManager: %w"
,
err
)
}
manager
.
Save
()
return
nil
},
Commands
:
[]
*
cli
.
Command
{
Commands
:
[]
*
cli
.
Command
{
{
{
Name
:
"check"
,
Name
:
"check"
,
...
@@ -202,9 +219,12 @@ func ShellCompleteVarList(ctx context.Context, cmd *cli.Command) {
...
@@ -202,9 +219,12 @@ func ShellCompleteVarList(ctx context.Context, cmd *cli.Command) {
if
cmd
.
NArg
()
>
0
{
if
cmd
.
NArg
()
>
0
{
return
return
}
}
data
,
_
:=
hyprlandVarList
()
manager
,
_
:=
NewHyprlandManager
()
for
_
,
t
:=
range
data
{
fmt
.
Println
(
t
)
data
:=
manager
.
Vars
for
_
,
v
:=
range
data
{
fmt
.
Println
(
v
.
Name
)
}
}
}
}
...
@@ -213,10 +233,11 @@ func ShellCompleteModule(filter string) func(ctx context.Context, cmd *cli.Comma
...
@@ -213,10 +233,11 @@ func ShellCompleteModule(filter string) func(ctx context.Context, cmd *cli.Comma
if
cmd
.
NArg
()
>
0
{
if
cmd
.
NArg
()
>
0
{
return
return
}
}
manager
,
_
:=
NewHyprlandManager
()
userFlag
:=
cmd
.
Bool
(
"user"
)
userFlag
:=
cmd
.
Bool
(
"user"
)
data
:=
hyprlandListModules
(
userFlag
,
filter
)
data
:=
manager
.
GetModulesList
(
userFlag
,
filter
)
for
_
,
t
:=
range
data
{
for
_
,
t
:=
range
data
{
fmt
.
Println
(
t
)
fmt
.
Println
(
t
)
}
}
...
@@ -229,7 +250,9 @@ func ShellCompletePlugin(filter string) func(ctx context.Context, cmd *cli.Comma
...
@@ -229,7 +250,9 @@ func ShellCompletePlugin(filter string) func(ctx context.Context, cmd *cli.Comma
return
return
}
}
data
:=
hyprlandPluginList
(
filter
)
manager
,
_
:=
NewHyprlandManager
()
data
:=
manager
.
GetPluginsList
(
filter
)
for
_
,
t
:=
range
data
{
for
_
,
t
:=
range
data
{
fmt
.
Println
(
t
)
fmt
.
Println
(
t
)
}
}
...
...
hyprland/manager.go
0 → 100644
View file @
ac10bb4e
This diff is collapsed.
Click to expand it.
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