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
40e77788
Commit
40e77788
authored
Aug 02, 2017
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
general: Enforce 100 chars per line.
parent
3a41c45b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
14 deletions
+27
-14
neofetch
neofetch
+27
-14
No files found.
neofetch
View file @
40e77788
...
...
@@ -796,7 +796,7 @@ get_wm_theme() {
"PekWM"
)
[[ -f
"
${
HOME
}
/.pekwm/config"
]] && \
wm_theme=
"
$(
awk
-F
"/"
'/Theme/
{gsub(/\"/,""); print $NF}'
"
${
HOME
}
/.pekwm/config"
)
"
wm_theme=
"
$(
awk
-F
"/"
'/Theme/{gsub(/\"/,""); print $NF}'
"
${
HOME
}
/.pekwm/config"
)
"
;;
"Xfwm4"
)
...
...
@@ -809,11 +809,16 @@ get_wm_theme() {
kwinrc=
"
${
kde_config_dir
}
/kwinrc"
kdebugrc=
"
${
kde_config_dir
}
/kdebugrc"
# TODO
:
Fix line length here.
if [[ -f
"
$kwinrc
"
]]; then
wm_theme=
"
$(
awk
'/theme=/{gsub(/theme=.*qml_|theme=.*svg__/,"",$0); print $0; exit}'
"
$kwinrc
"
)
"
[[ -z
"
$wm_theme
"
]] && wm_theme=
"
$(
awk
'/library=org.kde/{gsub(/library=org.kde./,"",$0); print $0; exit}'
"
$kwinrc
"
)
"
[[ -z
"
$wm_theme
"
]] && wm_theme=
"
$(
awk
'/PluginLib=kwin3_/{gsub(/PluginLib=kwin3_/,"",$0); print $0; exit}'
"
$kwinrc
"
)
"
wm_theme=
"
$(
awk
'/theme=/{gsub(/theme=.*qml_|theme=.*svg__/,"",$0);
print $0; exit}'
"
$kwinrc
"
)
"
[[ -z
"
$wm_theme
"
]] && \
wm_theme=
"
$(
awk
'/library=org.kde/{gsub(/library=org.kde./,"",$0);
print $0; exit}'
"
$kwinrc
"
)
"
[[ -z
"
$wm_theme
"
]] && \
wm_theme=
"
$(
awk
'/PluginLib=kwin3_/{gsub(/PluginLib=kwin3_/,"",$0);
print $0; exit}'
"
$kwinrc
"
)
"
elif [[ -f
"
$kdebugrc
"
]]; then
wm_theme=
"
$(
awk
'/(decoration)/ {gsub(/\[/,"",$1); print $1; exit}'
"
$kdebugrc
"
)
"
...
...
@@ -881,9 +886,11 @@ get_cpu() {
;;
*)
# TODO
:
Fix line length here.
cpu=
"
$(
awk
-F
': | @'
'/model name|Processor|^cpu model|chip type|^cpu type/ {printf $2; exit}'
"
$cpu_file
"
)
"
[[
"
$cpu
"
== *
"processor rev"
* ]] && cpu=
"
$(
awk
-F
':'
'/Hardware/ {print $2; exit}'
"
$cpu_file
"
)
"
cpu=
"
$(
awk
-F
': | @'
'/model name|Processor|^cpu model|chip type|^cpu type/
{printf $2; exit}'
"
$cpu_file
"
)
"
[[
"
$cpu
"
== *
"processor rev"
* ]] && \
cpu=
"
$(
awk
-F
':'
'/Hardware/ {print $2; exit}'
"
$cpu_file
"
)
"
;;
esac
...
...
@@ -1384,8 +1391,11 @@ get_memory() {
}
get_song() {
# TODO: Fix line length here.
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}'
)
"
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() {
# Multiple players use an almost identical dbus command to get the information.
...
...
@@ -1855,7 +1865,6 @@ get_term_font() {
for i in "
${
konsole_instances
[@]
}
"; do
konsole_sessions=(
$(
qdbus
"
${
i
}
"
|
grep
'/Sessions/'
)
)
# TODO: Swap to a while loop here.
for session in "
${
konsole_sessions
[@]
}
"; do
if ((child == "
$(
qdbus
"
${
i
}
"
"
${
session
}
"
processId
)
")); then
profile="
$(
qdbus
"
${
i
}
"
"
${
session
}
"
environment |
\
...
...
@@ -1898,11 +1907,15 @@ get_term_font() {
rm -f
"
$mateterm_config
"
# TODO
:
Limit line length here.
if [[
"
$(
gsettings get org.mate.terminal.profile:/org/mate/terminal/profiles/
"
${
profile
}
"
/ use-system-font
)
"
==
"true"
]]; then
mate_get() {
gsettings get org.mate.terminal.profile
:
\
/org/mate/terminal/profiles/
"
$1
"
/
"
$2
"
}
if [[
"
$(
mate_get
"
$profile
"
"use-system-font"
)
"
==
"true"
]]; then
term_font=
"
$(
gsettings get org.mate.interface monospace-font-name
)
"
else
term_font=
"
$(
gsettings get org.mate.terminal.profile:/org/mate/terminal/profiles/
"
${
profile
}
"
/ font
)
"
term_font=
"
$(
mate_get
"
$profile
"
"font"
)
"
fi
term_font=
"
$(
trim_quotes
"
$term_font
"
)
"
fi
...
...
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