Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
ximper-unified-theme-switcher
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
ximper-unified-theme-switcher
Commits
eb3dc8ed
Commit
eb3dc8ed
authored
Jul 20, 2024
by
Roman Alifanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed configs priority
parent
d5fd621b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
ximper-unified-theme-switcher-service
service/bin/ximper-unified-theme-switcher-service
+6
-5
No files found.
service/bin/ximper-unified-theme-switcher-service
View file @
eb3dc8ed
...
...
@@ -7,7 +7,7 @@ CONFIG_FILE="/etc/ximper-unified-theme-switcher/themes"
HOME_CONFIG_DIR
=
"
$HOME
/.config/ximper-unified-theme-switcher"
HOME_CONFIG_FILE
=
"
$HOME_CONFIG_DIR
/themes"
# Функция для создания конфига в домашнем каталоге
# Функция для создания конфига в домашнем каталоге
(TODO: перенести в GUI)
create_home_config
()
{
mkdir
-p
"
$HOME_CONFIG_DIR
"
touch
"
$HOME_CONFIG_FILE
"
...
...
@@ -17,14 +17,15 @@ create_home_config() {
cfg_check
()
{
# Проверка наличия конфига в /etc
if
[
-f
"
$CONFIG_FILE
"
]
;
then
echo
"
$CONFIG_FILE
"
else
# Если нет конфига в /etc, ищем в домашнем каталоге
if
[
-f
"
$HOME_CONFIG_FILE
"
]
;
then
echo
"
$HOME_CONFIG_FILE
"
else
create_home_config
echo
"
$CONFIG_FILE
"
fi
elif
[
-f
"
$HOME_CONFIG_FILE
"
]
;
then
echo
"
$HOME_CONFIG_FILE
"
else
create_home_config
fi
}
...
...
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