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
b923299a
Verified
Commit
b923299a
authored
Jul 04, 2025
by
Kirill Unitsaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add ximper-create-configs
parent
23dcb0a6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
106 additions
and
3 deletions
+106
-3
README.md
README.md
+5
-2
ximper-create-configs
bin/ximper-create-configs
+80
-0
ximper-create-configs.service
data/userunits/ximper-create-configs.service
+11
-0
makefile
makefile
+10
-1
No files found.
README.md
View file @
b923299a
...
...
@@ -10,8 +10,11 @@ The set of utilities used in Ximper Linux includes various tools that help speed
## Available utilities
### wm-xdg-autostart
Script for automatically starting applications that support XDG Autostart.
Necessary for window managers that do not support this specification.
A script for automatically launching applications that support XDG Autostart.
Required for window managers that do not support this specification.
### ximper-create-configs
A script for creating symbolic links to the basic Ximper configuration
## License
...
...
bin/ximper-create-configs
0 → 100755
View file @
b923299a
#!/bin/bash
create_base
()
{
echo
"Создаётся базовая конфигурация..."
SYS_CONF
=
"/etc/ximperdistro/environment.d/ximper-qt.conf"
USER_CONF
=
"
$HOME
/.config/environment.d/ximper-qt.conf"
create_link_if_missing
"
$SYS_CONF
"
"
$USER_CONF
"
}
create_hyprland
()
{
echo
"Создаётся конфигурация Hyprland..."
# hypr
for
i
in
hyprlock hypridle hyprpaper
;
do
if
command
-v
$i
>
/dev/null 2>&1
;
then
USER_CONF
=
"
$HOME
/.config/hypr/
$i
.conf"
SYS_CONF
=
"/etc/ximperdistro/hyprland/hypr/
$i
.conf"
create_link_if_missing
"
$SYS_CONF
"
"
$USER_CONF
"
fi
done
# swappy wlogout wofi
for
i
in
swappy wlogout wofi
;
do
if
command
-v
$i
>
/dev/null 2>&1
;
then
USER_CONF
=
"
$HOME
/.config/
$i
"
SYS_CONF
=
"/etc/ximperdistro/hyprland/
$i
"
create_link_if_missing
"
$SYS_CONF
"
"
$USER_CONF
"
fi
done
}
create_link_if_missing
()
{
local
src
=
"
$1
"
local
dest
=
"
$2
"
if
[
!
-e
"
$src
"
]
;
then
return
fi
if
[
!
-e
"
$dest
"
]
;
then
mkdir
-p
"
$(
dirname
"
$dest
"
)
"
ln
-s
"
$src
"
"
$dest
"
echo
"Создана ссылка:
$dest
→
$src
"
else
echo
"Уже существует:
$dest
— пропущено"
fi
}
OPTS
=
$(
getopt
-o
h
--long
base,hyprland,help
--
"
$@
"
)
||
{
echo
"Ошибка обработки опций."
exit
1
}
eval set
--
"
$OPTS
"
while
true
;
do
case
"
$1
"
in
--base
)
create_base
shift
;;
--hyprland
)
create_hyprland
shift
;;
-h
|
--help
)
echo
"Использование:
$(
basename
$0
)
[--base] [--hyprland]"
exit
0
;;
--
)
shift
break
;;
*
)
echo
"Неверная опция:
$1
"
shift
;;
esac
done
data/userunits/ximper-create-configs.service
0 → 100644
View file @
b923299a
[Unit]
Description=Скрипт настройки конфигураций Ximper
After=graphical.target
[Service]
Type=oneshot
ExecStart=/usr/bin/ximper-create-configs --base
RemainAfterExit=yes
[Install]
WantedBy=default.target
makefile
View file @
b923299a
prefix
?=
/usr
bindir
?=
$(prefix)
/bin
userunitdir
?=
$(prefix)
/lib/systemd/user
DESTDIR
?=
EXECUTABLES
=
wm-xdg-autostart
EXECUTABLES
=
wm-xdg-autostart ximper-create-configs
USERUNITS
=
ximper-create-configs
all
:
install
install
:
@
mkdir
-p
$(DESTDIR)$(bindir)
@
mkdir
-p
$(DESTDIR)$(userunitdir)
@
for
file
in
$(EXECUTABLES)
;
do
\
install
-Dm755
bin/
$$
file
$(DESTDIR)$(bindir)
/
$$
file
;
\
done
@
for
file
in
$(USERUNITS)
;
do
\
install
-Dm755
data/userunits/
$$
file.service
$(DESTDIR)$(userunitdir)
/
$$
file.service
;
\
done
clean
:
@
for
file
in
$(EXECUTABLES)
;
do
\
rm
-f
$(DESTDIR)$(bindir)
/
$$
file
;
\
done
@
for
file
in
$(USERUNITS)
;
do
\
rm
-f
$(DESTDIR)$(userunitdir)
/
$$
file.service
;
\
done
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