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
eb38e6c5
Commit
eb38e6c5
authored
Jul 16, 2017
by
Dylan Araps
Committed by
GitHub
Jul 16, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #777 from mstraube/new
Various additions and enhancements
parents
2b44c993
b6b6083d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
4 deletions
+22
-4
neofetch
neofetch
+22
-4
No files found.
neofetch
View file @
eb38e6c5
...
@@ -1336,7 +1336,7 @@ get_memory() {
...
@@ -1336,7 +1336,7 @@ get_memory() {
get_song
()
{
get_song
()
{
# This is absurdly long.
# This is absurdly long.
player
=
"
$(
ps x |
awk
'!(/ awk|Helper|Cache|ibus|indicator/) && /mpd|mopidy|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|xmms2d|gnome-music|lollypop|clementine|pragha|exaile|juk|bluemindo|guayadeque|yarock|qmmp|quodlibet|deepin-music|tomahawk/ {printf $5 " " $6; exit}'
)
"
player
=
"
$(
ps x |
awk
'!(/ awk|Helper|Cache|ibus|indicator/) && /mpd|mopidy|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|xmms2d|gnome-music|lollypop|clementine|pragha|exaile|juk|bluemindo|guayadeque|yarock|qmmp|quodlibet|deepin-music|tomahawk
|pogo
/ {printf $5 " " $6; exit}'
)
"
get_song_dbus
()
{
get_song_dbus
()
{
# Multiple players use an almost identical dbus command to get the information.
# Multiple players use an almost identical dbus command to get the information.
...
@@ -1416,6 +1416,11 @@ get_song() {
...
@@ -1416,6 +1416,11 @@ get_song() {
awk
-F
'"'
'/artist/ {getline; a=$2} /title/ {getline; t=$2} END{print a " - " t}'
)
"
awk
-F
'"'
'/artist/ {getline; a=$2} /title/ {getline; t=$2} END{print a " - " t}'
)
"
;;
;;
"pogo"
*
)
song
=
"
$(
dbus-send
--print-reply
--dest
=
org.mpris.pogo /Player org.freedesktop.MediaPlayer.GetMetadata |
awk
-F
'"'
'/string "artist"/ {getline; a=$2} /string "title"/ {getline; t=$2} END{print a " - " t}'
)
"
;;
*
)
*
)
mpc
>
/dev/null 2>&1
&&
song
=
"
$(
mpc current
)
"
mpc
>
/dev/null 2>&1
&&
song
=
"
$(
mpc current
)
"
;;
;;
...
@@ -1762,7 +1767,8 @@ get_term_font() {
...
@@ -1762,7 +1767,8 @@ get_term_font() {
;;
;;
"Hyper"
*
)
"Hyper"
*
)
term_font
=
"
$(
awk
-F
","
'/fontFamily/ {a=$1} END{print a}'
"
${
HOME
}
/.hyper.js"
|
awk
-F
"'"
'{a=$2} END{print a}'
)
"
term_font
=
"
$(
awk
-F
':|,'
'/fontFamily/ {print $2; exit}'
"
${
HOME
}
/.hyper.js"
)
"
term_font
=
"
$(
trim_quotes
"
$term_font
"
)
"
;;
;;
"konsole"
*
)
"konsole"
*
)
...
@@ -1788,6 +1794,10 @@ get_term_font() {
...
@@ -1788,6 +1794,10 @@ get_term_font() {
[[
"
$profile_filename
"
]]
&&
term_font
=
"
$(
awk
-F
'=|,'
'/Font=/ {print $2 " " $3}'
"
$profile_filename
"
)
"
[[
"
$profile_filename
"
]]
&&
term_font
=
"
$(
awk
-F
'=|,'
'/Font=/ {print $2 " " $3}'
"
$profile_filename
"
)
"
;;
;;
"lxterminal"
*
)
term_font
=
"
$(
awk
-F
'='
'/fontname=/ {print $2; exit}'
"
${
XDG_CONFIG_HOME
}
/lxterminal/lxterminal.conf"
)
"
;;
"mate-terminal"
)
"mate-terminal"
)
# To get the actual config we have to create a temporarily file with the --save-config option.
# To get the actual config we have to create a temporarily file with the --save-config option.
mateterm_config
=
"/tmp/mateterm.cfg"
mateterm_config
=
"/tmp/mateterm.cfg"
...
@@ -1827,7 +1837,7 @@ get_term_font() {
...
@@ -1827,7 +1837,7 @@ get_term_font() {
;;
;;
"sakura"*)
"sakura"*)
term_font="$(awk -F '
=
' '
/^font=/ {
a=
$2
}
END{print a
}
' "
${
XDG_CONFIG_HOME
}
/sakura/sakura.conf
")"
term_font="$(awk -F '
=
' '
/^font=/ {
print
$2
; exit
}
' "${XDG_CONFIG_HOME}/sakura/sakura.conf")"
;;
;;
"terminology")
"terminology")
...
@@ -1859,7 +1869,15 @@ get_term_font() {
...
@@ -1859,7 +1869,15 @@ get_term_font() {
;;
;;
"
xfce4-terminal
")
"
xfce4-terminal
")
term_font="
$(
awk
-F
'='
'/^FontName/ {a=$2} END{print a}'
"
${
XDG_CONFIG_HOME
}
/xfce4/terminal/terminalrc"
)
"
term_font="
$(
awk
-F
'='
'/^FontName/ {a=$2} /^FontUseSystem=TRUE/ {a=$0} END{print a}'
"
${
XDG_CONFIG_HOME
}
/xfce4/terminal/terminalrc"
)
"
if [[ "
$term_font
" == "
FontUseSystem
=
TRUE
" ]]; then
term_font="
$(
gsettings get org.gnome.desktop.interface monospace-font-name
)
"
term_font="
$(
trim_quotes
"
$term_font
"
)
"
fi
# Default fallback font hardcoded in terminal-preferences.c
[[ -z "
$term_font
" ]] && term_font="
Monospace 12
"
;;
;;
esac
esac
}
}
...
...
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