Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
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
neofetch
Commits
1216c9d5
Commit
1216c9d5
authored
Apr 04, 2017
by
Dylan Araps
Committed by
GitHub
Apr 04, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #681 from dylanaraps/scrot_fix
Scrot: Make scrot easier to use.
parents
d23dcbe3
1e6804f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
22 deletions
+16
-22
config
config/config
+0
-10
neofetch
neofetch
+16
-12
No files found.
config/config
View file @
1216c9d5
...
...
@@ -681,16 +681,6 @@ scrot="off"
# Flag: --scrot_cmd
scrot_cmd
=
"auto"
# Screenshot Directory
# Where to save the screenshots
#
# Default: '~/Pictures/'
# Values: 'dir'
# Flag: --scrot_dir
#
# Note: Neofetch won't create the directory if it doesn't exist.
scrot_dir
=
"
$HOME
/Pictures/"
# Screenshot Filename
# What to name the screenshots
#
...
...
neofetch
View file @
1216c9d5
...
...
@@ -2516,11 +2516,9 @@ to_off() {
# SCREENSHOT
take_scrot
()
{
if
[[
-d
"
$scrot_dir
"
]]
;
then
scrot_program
"
${
scrot_dir
}${
scrot_name
}
"
2>/dev/null
else
printf
"%s
\n
"
"Screenshot:
$scrot_dir
doesn't exist. Edit the config file or create the directory to take screenshots."
fi
scrot_program
"
${
scrot_dir
}${
scrot_name
}
"
2>/dev/null
err
"Scrot: Saved screenshot as:
${
scrot_dir
}${
scrot_name
}
"
[[
"
$scrot_upload
"
==
"on"
]]
&&
scrot_upload
}
...
...
@@ -2561,13 +2559,16 @@ scrot_upload() {
scrot_args() {
scrot="
on
"
case "
$2
" in
"
-
"* | "") ;;
*)
scrot_name="
${
2
##*/
}
"
scrot_dir="
${
2
/
$scrot_name
}
"
;;
esac
if [[ "
$2
" =~
\.
(png|jpg|jpe|jpeg|gif)
$
]]; then
scrot_name="
${
2
##*/
}
"
scrot_dir="
${
2
/
$scrot_name
}
"
elif [[ -d "
$2
" ]]; then
scrot_dir="
$2
"
else
scrot_dir="
${
PWD
:+
${
PWD
}
/
}
"
fi
}
scrot_program() {
...
...
@@ -3658,6 +3659,9 @@ old_options() {
# Birthday was renamed to Install Date in 3.0
[[
-n
"
$birthday_time
"
]]
&&
{
err
"Config:
\$
birthday_time is deprecated, use
\3
install_time instead."
;
install_time
=
"
$birthday_time
"
;
}
# Scrot dir was removed in 3.1.0.
[[
-n
"
$scrot_dir
"
]]
&&
scrot_dir
=
}
cache_uname
()
{
...
...
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