Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PortProton_prefix_ManaGeR
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
Roman Alifanov
PortProton_prefix_ManaGeR
Commits
38b924df
Commit
38b924df
authored
Apr 22, 2024
by
Roman Alifanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implemented pfx_properties menu
parent
11589f1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
PPpMGR.sh
PPpMGR.sh
+16
-4
No files found.
PPpMGR.sh
View file @
38b924df
...
...
@@ -16,6 +16,18 @@ else
PP_default_prefixes_directory
=
"
$(
cat
"
$HOME
"
/.config/PortProton.conf
)
/prefixes"
fi
pfx_properties
()
{
local
pfx_name
=
"
$1
"
local
pfx_dir
=
"
$2
"
echo
"pfx_name:
$pfx_name
"
yad
--form
--image
=
folder
\
--field
=
"
$pfx_name
:LBL"
""
\
--field
=
"Вес префикса:
$(
du
-hs
"
$pfx_dir
"
|
awk
'{print $1}'
)
:LBL"
""
\
--field
=
"Местонахождение
\:
:MDIR"
"
$pfx_dir
"
}
export
-f
pfx_properties
percent_bar
()
{
local
percentage
=
$(
echo
"
$1
"
|
sed
's/%//'
)
local
total
=
$2
...
...
@@ -70,9 +82,9 @@ gui() {
IFS
=
$'
\n
'
for
pfx
in
$prefixes_in_mnt
;
do
((
button_count++
))
IFS
=
$'|'
read
-r
pfx_name pfx_dir
<<<
"
$pfx
"
local
PPpMGR_BUTTONS[button_count]
=
"--field=
$pfx_name
:FBTN"
echo
"
$pfx_name
"
PPpMGR_BUTTONS+
=(
--field
=
"
$pfx_name
:FBTN"
"bash -c
\"
pfx_properties
$pfx_name
$pfx_dir
\"
"
)
done
echo
"
$prefixes_in_mnt
"
...
...
@@ -83,9 +95,9 @@ gui() {
yad
--plug
=
"
$PPpMGR_RANDOM
"
--tabnum
=
$tab_count
--form
\
--separator
=
'|'
\
--field
=
"Занято на диске
$occupancy_percent
:
\n\
$occupancy_percent_bar
:LBL"
\
$occupancy_percent_bar
:LBL"
""
\
\
--field
=
"Тип файловой системы:
$mnt_fstype
:LBL"
\
--field
=
"Тип файловой системы:
$mnt_fstype
:LBL"
""
\
\
\
${
PPpMGR_BUTTONS
[*]
}
\
...
...
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