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
2490a452
Commit
2490a452
authored
Dec 16, 2016
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Birthday: Rename get_birthday() to get_install_date()
parent
d375aa24
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
25 deletions
+27
-25
config
config/config
+4
-4
travis
config/travis
+1
-1
neofetch
neofetch
+20
-18
neofetch.1
neofetch.1
+2
-2
No files found.
config/config
View file @
2490a452
...
...
@@ -39,7 +39,7 @@ print_info() {
# info "Local IP" local_ip
# info "Public IP" public_ip
# info "Users" users
# info "
Birthday" birthday
# info "
Install Date" install_date
info line_break
info cols
...
...
@@ -292,19 +292,19 @@ public_ip_host="http://ident.me"
song_shorthand
=
"off"
#
Birthday
#
Install Date
# Whether to show the time in the output
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --
birthday
_time
# Flag: --
install
_time
#
# Example:
# on: 'Thu 14 Apr 2016 11:50 PM'
# off: 'Thu 14 Apr 2016'
birthday
_time
=
"on"
install
_time
=
"on"
# Text Colors
...
...
config/travis
View file @
2490a452
...
...
@@ -33,7 +33,7 @@ print_info() {
info
"Local IP"
local_ip
info
"Public IP"
public_ip
info
"Users"
users
info
"
Birthday"
birthday
info
"
Install Date"
install_date
info line_break
info cols
...
...
neofetch
View file @
2490a452
...
...
@@ -1726,51 +1726,51 @@ get_users() {
users="
${
users
%\,*
}
"
}
get_
birthday
() {
get_
install_date
() {
case "
$os
" in
"
Linux
" | "
GNU
" | "
iPhone OS
")
birthday
="
$(
ls
-alct
--full-time
/ |
awk
'/lost\+found|private/ {printf $6 " " $7}'
)
"
install_date
="
$(
ls
-alct
--full-time
/ |
awk
'/lost\+found|private/ {printf $6 " " $7}'
)
"
;;
"
Mac OS X
")
birthday
="
$(
ls
-lUT
/var/log/install.log |
awk
'{printf $9 " " $6 " " $7 " " $8}'
)
"
install_date
="
$(
ls
-lUT
/var/log/install.log |
awk
'{printf $9 " " $6 " " $7 " " $8}'
)
"
;;
"
BSD
")
case "
$kernel_name
" in
"
OpenBSD
"* | "
Bitrig
"*)
birthday
_file="
/
"
install
_file="
/
"
;;
"
FreeBSD
"*)
birthday
_file="
/etc/hostid
"
install
_file="
/etc/hostid
"
;;
"
NetBSD
"* | "
DragonFly
"*)
birthday
_file="
/etc/defaults/rc.conf
"
install
_file="
/etc/defaults/rc.conf
"
;;
esac
birthday="
$(
ls
-alctT
"
$birthday
_file
"
|
awk
'{printf $9 " " $6 " " $7 " " $8 " "}'
)
"
install_date="
$(
ls
-alctT
"
$install
_file
"
|
awk
'{printf $9 " " $6 " " $7 " " $8 " "}'
)
"
;;
"
Windows
")
birthday
="
$(
ls
-alct
--full-time
/cygdrive/c/Windows/explorer.exe |
awk
'{printf $8 " " $9}'
)
"
install_date
="
$(
ls
-alct
--full-time
/cygdrive/c/Windows/explorer.exe |
awk
'{printf $8 " " $9}'
)
"
;;
"
Solaris
")
birthday
="
$(
ls
-alct
--full-time
/var/sadm/system/logs/install_log |
awk
'{printf $6 " " $7}'
)
"
install_date
="
$(
ls
-alct
--full-time
/var/sadm/system/logs/install_log |
awk
'{printf $6 " " $7}'
)
"
;;
"
Haiku
")
birthday
="
$(
ls
-alctd
--full-time
/boot |
awk
'{printf $6 " " $7}'
)
"
install_date
="
$(
ls
-alctd
--full-time
/boot |
awk
'{printf $6 " " $7}'
)
"
;;
esac
birthday="
${
birthday
//-/
}
"
birthday="
${
birthday
%
:
*
}
"
birthday=(
$birthday
)
birthday="
$(
convert_time
"
${
birthday
[@]
}
"
)
"
install_date="
${
install_date
//-/
}
"
install_date="
${
install_date
%
:
*
}
"
install_date=(
$install_date
)
install_date="
$(
convert_time
"
${
install_date
[@]
}
"
)
"
}
get_cols() {
...
...
@@ -2883,6 +2883,8 @@ old_functions() {
get_publicip
()
{
get_public_ip
;
publicip
=
"
$public_ip
"
;
}
get_linebreak
()
{
get_line_break
;
linebreak
=
"
$line_break
"
;
}
fi
get_birthday
()
{
get_install_date
;
birthday
=
"
$install_date
"
;
}
}
old_options
()
{
...
...
@@ -2970,9 +2972,9 @@ convert_time() {
esac
# Toggle showing the time
[[
"
$
birthday
_time
"
==
"off"
]]
&&
unset time
[[
"
$
install
_time
"
==
"off"
]]
&&
unset time
# Print the
birthday
.
# Print the
install date
.
printf
"%s"
"
$week_day
$day
$month
$year
$time
"
}
...
...
@@ -3034,7 +3036,7 @@ INFO
--shell_version on/off Enable/Disable showing
\$
SHELL version
--ip_host url URL to query for public IP
--song_shorthand on/off Print the Artist/Title on seperate lines
--
birthday_time on/off Enable/Disable showing the time in birthday
output.
--
install_time on/off Enable/Disable showing the time in Install Date
output.
TEXT FORMATTING
...
...
@@ -3203,7 +3205,7 @@ get_args() {
"--shell_version"
)
shell_version
=
"
$2
"
;;
"--ip_host"
)
public_ip_host
=
"
$2
"
;;
"--song_shorthand"
)
song_shorthand
=
"
$2
"
;;
"--
birthday_time"
)
birthday
_time
=
"
$2
"
;;
"--
install_time"
)
install
_time
=
"
$2
"
;;
"--disable"
)
for
func
in
"
$@
"
;
do
case
"
$func
"
in
...
...
neofetch.1
View file @
2490a452
...
...
@@ -89,8 +89,8 @@ URL to query for public IP
\fB\-\-song_shorthand\fR on/off
Print the Artist/Title on seperate lines
.TP
\fB\-\-
birthday
_time\fR on/off
Enable/Disable showing the time in
birthday
output.
\fB\-\-
install
_time\fR on/off
Enable/Disable showing the time in
Install Date
output.
.PP
TEXT FORMATTING
.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