Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
ximpershot
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
ximpershot
Commits
8f559b17
Verified
Commit
8f559b17
authored
Jun 23, 2025
by
Kirill Unitsaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix an empty OUTPUT
parent
db5087a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
ximpershot
ximpershot
+8
-9
No files found.
ximpershot
View file @
8f559b17
#!/bin/bash
#!/bin/bash
CLIPBOARD
=
0
COPY
=
false
RAW
=
0
print_error
()
{
print_error
()
{
printf
"
\0
33[1;31m%s
\0
33[0m
\n
"
"
$1
"
printf
"
\0
33[1;31m%s
\0
33[0m
\n
"
"
$1
"
...
@@ -98,16 +97,11 @@ process_screenshot() {
...
@@ -98,16 +97,11 @@ process_screenshot() {
local
app
=
"
$2
"
local
app
=
"
$2
"
local
geometry
=
"
$3
"
local
geometry
=
"
$3
"
if
[
-z
"
$output_file
"
]
&&
[
!
"
$COPY
"
]
;
then
print_error
"OUTPUT не указан"
return
1
fi
case
"
$app
"
in
case
"
$app
"
in
""
)
""
)
if
[
"
$output_file
"
=
"-"
]
;
then
if
[
"
$output_file
"
=
"-"
]
;
then
wayshot
-s
"
${
geometry
}
"
--stdout
wayshot
-s
"
${
geometry
}
"
--stdout
el
se
el
if
[
-n
"
$output_file
"
]
;
then
wayshot
-s
"
${
geometry
}
"
-f
"
$output_file
"
wayshot
-s
"
${
geometry
}
"
-f
"
$output_file
"
fi
fi
if
[
"
$COPY
"
==
"true"
]
;
then
if
[
"
$COPY
"
==
"true"
]
;
then
...
@@ -127,8 +121,13 @@ process_screenshot() {
...
@@ -127,8 +121,13 @@ process_screenshot() {
save_geometry
()
{
save_geometry
()
{
local
geometry
=
"
${
1
}
"
local
geometry
=
"
${
1
}
"
if
[
-z
"
$OUTPUT
"
]
&&
[
"
$COPY
"
==
"false"
]
;
then
OUTPUT
=
"
$(
xdg-user-dir PICTURES
)
/Снимки экрана/снимок-
$(
date
+%Y%m%d-%H%M%S
)
.png"
fi
if
[
-n
"
$OUTPUT
"
]
&&
[
"
$OUTPUT
"
!=
"-"
]
;
then
if
[
-n
"
$OUTPUT
"
]
&&
[
"
$OUTPUT
"
!=
"-"
]
;
then
mkdir
-p
$(
dirname
${
OUTPUT
})
OUTPUT_DIR
=
$(
dirname
"
${
OUTPUT
}
"
)
mkdir
-p
"
$OUTPUT_DIR
"
fi
fi
if
[
"
$COMMAND
"
]
;
then
if
[
"
$COMMAND
"
]
;
then
...
...
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