Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pract_6sem
Project
Project
Details
Activity
Releases
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
Вольных Мария Валентиновна
pract_6sem
Commits
050fe3eb
Commit
050fe3eb
authored
Mar 05, 2023
by
Вольных Мария Валентиновна
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
f01022bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
powercontrol.sh
powercontrol.sh
+40
-0
No files found.
powercontrol.sh
0 → 100644
View file @
050fe3eb
#!/bin/bash
# Скрипт настройки отключения экрана
set
-e
while
true
;
do
read
-p
"Was user's profile loaded? "
yn
case
$yn
in
[
Yy]
*
)
if
[
!
-f
/home/astra-user/.fly/theme/current.themerc
]
;
then
# Отключение таймера блокировки экрана
sudo sed
-i
"/ScreenSaverDelay=/c
\S
creenSaverDelay=0"
/home/astra-user/.fly/theme/current.themerc
# Отключение выхода из сессии при переходе в сон
sudo sed
-i
"/LockerOnSleep=/c
\L
ockerOnSleep=false"
/home/astra-user/.fly/theme/current.themerc
# Отключение выхода из сессии при смене пользователя
sudo sed
-i
"/LockerOnSwitch=/c
\L
ockerOnSwitch=false"
/home/astra-user/.fly/theme/current.themerc
# Отключение выхода из сессии по настройкам питания
sudo sed
-i
"/LockerOnDPMS=/c
\L
ockerOnDPMS=false"
/home/astra-user/.fly/theme/current.themerc
# Отключение блокировки
sudo sed
-i
"/LockerOnLid=/c
\L
ockerOnLid=false"
/home/astra-user/.fly/theme/current.themerc
fi
break
;;
[
Nn]
*
)
break
;;
*
)
echo
"Please answer yes or no."
;;
esac
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