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
8f220d87
Commit
8f220d87
authored
Dec 25, 2016
by
Muhammad Herdiansyah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Install Date: Add an option to use 24h or 12h in time format
parent
6ee92d42
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
4 deletions
+26
-4
config
config/config
+11
-0
neofetch
neofetch
+12
-4
neofetch.1
neofetch.1
+3
-0
No files found.
config/config
View file @
8f220d87
...
@@ -324,6 +324,17 @@ song_shorthand="off"
...
@@ -324,6 +324,17 @@ song_shorthand="off"
# off: 'Thu 14 Apr 2016'
# off: 'Thu 14 Apr 2016'
install_time
=
"on"
install_time
=
"on"
# Set time format in the output
#
# Default: '24h'
# Values: '12h', '24h'
# Flag: --install_time_format
#
# Example:
# 12h: 'Thu 14 Apr 2016 11:50 PM'
# 24h: 'Thu 14 Apr 2016 23:50'
install_time_format
=
"24h"
# Text Colors
# Text Colors
...
...
neofetch
View file @
8f220d87
...
@@ -3058,9 +3058,14 @@ convert_time() {
...
@@ -3058,9 +3058,14 @@ convert_time() {
esac
esac
# Convert 24 hour time to 12 hour time + AM/PM.
# Convert 24 hour time to 12 hour time + AM/PM.
case
"
$hour
"
in
case
"
$install_time_format
"
in
[
0-9]
|
0[0-9]
|
1[0-1]
)
time
=
"
${
hour
/00/12
}${
min
}
AM"
;;
"12h"
)
*
)
time
=
"
$((
hour
-
12
))${
min
}
PM"
;;
case
"
$hour
"
in
[
0-9]
|
0[0-9]
|
1[0-1]
)
time
=
"
${
hour
/00/12
}${
min
}
AM"
;;
*
)
time
=
"
$((
hour
-
12
))${
min
}
PM"
;;
esac
;;
*
)
time
=
"
${
hour
}${
min
}
"
;;
esac
esac
# Toggle showing the time.
# Toggle showing the time.
...
@@ -3174,7 +3179,9 @@ INFO
...
@@ -3174,7 +3179,9 @@ INFO
--shell_version on/off Enable/Disable showing
\$
SHELL version
--shell_version on/off Enable/Disable showing
\$
SHELL version
--ip_host url URL to query for public IP
--ip_host url URL to query for public IP
--song_shorthand on/off Print the Artist/Title on separate lines
--song_shorthand on/off Print the Artist/Title on separate lines
--install_time on/off Enable/Disable showing the time in Install Date output.
--install_time on/off Enable/Disable showing the time in Install Date output.
--install_time_format 12h/24h
Set time format in Install Date to be 12 hour or 24 hour.
TEXT FORMATTING
TEXT FORMATTING
...
@@ -3337,6 +3344,7 @@ get_args() {
...
@@ -3337,6 +3344,7 @@ get_args() {
"--ip_host"
)
public_ip_host
=
"
$2
"
;;
"--ip_host"
)
public_ip_host
=
"
$2
"
;;
"--song_shorthand"
)
song_shorthand
=
"
$2
"
;;
"--song_shorthand"
)
song_shorthand
=
"
$2
"
;;
"--install_time"
)
install_time
=
"
$2
"
;;
"--install_time"
)
install_time
=
"
$2
"
;;
"--install_time_format"
)
install_time_format
=
"
$2
"
;;
"--disable"
)
"--disable"
)
for
func
in
"
$@
"
;
do
for
func
in
"
$@
"
;
do
case
"
$func
"
in
case
"
$func
"
in
...
...
neofetch.1
View file @
8f220d87
...
@@ -96,6 +96,9 @@ Print the Artist/Title on separate lines
...
@@ -96,6 +96,9 @@ Print the Artist/Title on separate lines
.TP
.TP
\fB\-\-install_time\fR on/off
\fB\-\-install_time\fR on/off
Enable/Disable showing the time in Install Date output.
Enable/Disable showing the time in Install Date output.
.TP
\fB\-\-install_time_format\fR 12h/24h
Set time format in Install Date to be 12 hour or 24 hour.
.PP
.PP
TEXT FORMATTING
TEXT FORMATTING
.TP
.TP
...
...
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