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
e7645597
Unverified
Commit
e7645597
authored
Jun 05, 2018
by
Birger J. Nordølum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
awk: Space around END
parent
428b73fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
neofetch
neofetch
+12
-12
No files found.
neofetch
View file @
e7645597
...
@@ -1777,7 +1777,7 @@ get_cpu() {
...
@@ -1777,7 +1777,7 @@ get_cpu() {
# Get CPU cores.
# Get CPU cores.
case "$cpu_cores" in
case "$cpu_cores" in
"logical" | "on") cores="$(grep -c "^processor" "$cpu_file")" ;;
"logical" | "on") cores="$(grep -c "^processor" "$cpu_file")" ;;
"physical") cores="$(awk '/^core id/&&!a[$0]++{++i}
END
{print i}' "$cpu_file")" ;;
"physical") cores="$(awk '/^core id/&&!a[$0]++{++i}
END
{print i}' "$cpu_file")" ;;
esac
esac
;;
;;
...
@@ -2024,7 +2024,7 @@ get_gpu() {
...
@@ -2024,7 +2024,7 @@ get_gpu() {
"Linux")
"Linux")
# Read GPUs into array.
# Read GPUs into array.
gpu_cmd="$(lspci -mm | awk -F '\\"|\\" \\"|\\(' \
gpu_cmd="$(lspci -mm | awk -F '\\"|\\" \\"|\\(' \
'/"Display|"3D|"VGA/ {a[$0] = $3 " " $4} END{for(i in a)
'/"Display|"3D|"VGA/ {a[$0] = $3 " " $4} END
{for(i in a)
{if(!seen[a[i]]++) print a[i]}}')"
{if(!seen[a[i]]++) print a[i]}}')"
IFS=$'\n' read -d "" -ra gpus <<< "$gpu_cmd"
IFS=$'\n' read -d "" -ra gpus <<< "$gpu_cmd"
...
@@ -2229,13 +2229,13 @@ get_memory() {
...
@@ -2229,13 +2229,13 @@ get_memory() {
;;
;;
"OpenBSD"*) ;;
"OpenBSD"*) ;;
*) mem_free="$(($(vmstat | awk 'END{printf $5}') / 1024))" ;;
*) mem_free="$(($(vmstat | awk 'END
{printf $5}') / 1024))" ;;
esac
esac
# Mem used.
# Mem used.
case "$kernel_name" in
case "$kernel_name" in
"OpenBSD"*)
"OpenBSD"*)
mem_used="$(vmstat | awk 'END{printf $3}')"
mem_used="$(vmstat | awk 'END
{printf $3}')"
mem_used="${mem_used/M}"
mem_used="${mem_used/M}"
;;
;;
...
@@ -2405,18 +2405,18 @@ get_song() {
...
@@ -2405,18 +2405,18 @@ get_song() {
"banshee"*)
"banshee"*)
song="$(banshee --query-artist --query-album --query-title |\
song="$(banshee --query-artist --query-album --query-title |\
awk -F':' '/^artist/ {a=$2} /^album/ {b=$2} /^title/ {t=$2}
awk -F':' '/^artist/ {a=$2} /^album/ {b=$2} /^title/ {t=$2}
END{print a " \n " b " \n "t}')"
END
{print a " \n " b " \n "t}')"
;;
;;
"amarok"*)
"amarok"*)
song="$(qdbus org.kde.amarok /Player GetMetadata |\
song="$(qdbus org.kde.amarok /Player GetMetadata |\
awk -F':' '/^artist:/ {a=$2} /^album:/ {b=$2} /^title:/ {t=$2}
awk -F':' '/^artist:/ {a=$2} /^album:/ {b=$2} /^title:/ {t=$2}
END{print a " \n " b " \n " t}')"
END
{print a " \n " b " \n " t}')"
;;
;;
"pragha"*)
"pragha"*)
song="$(pragha -c | awk -F':' '/^artist/ {a=$2} /^album/ {b=$2} /^title/ {t=$2}
song="$(pragha -c | awk -F':' '/^artist/ {a=$2} /^album/ {b=$2} /^title/ {t=$2}
END{print a " \n " b " \n " t}')"
END
{print a " \n " b " \n " t}')"
;;
;;
"exaile"*)
"exaile"*)
...
@@ -2429,7 +2429,7 @@ get_song() {
...
@@ -2429,7 +2429,7 @@ get_song() {
song="$(dbus-send --print-reply --dest=net.sacredchao.QuodLibet \
song="$(dbus-send --print-reply --dest=net.sacredchao.QuodLibet \
/net/sacredchao/QuodLibet net.sacredchao.QuodLibet.CurrentSong |\
/net/sacredchao/QuodLibet net.sacredchao.QuodLibet.CurrentSong |\
awk -F'"' '/artist/ {getline; a=$2} /album/ {getline; b=$2}
awk -F'"' '/artist/ {getline; a=$2} /album/ {getline; b=$2}
/title/ {getline; t=$2} END{print a " \n " b " \n " t}')"
/title/ {getline; t=$2} END
{print a " \n " b " \n " t}')"
;;
;;
"pogo"*)
"pogo"*)
...
@@ -2837,13 +2837,13 @@ END
...
@@ -2837,13 +2837,13 @@ END
;;
;;
"deepin-terminal"*)
"deepin-terminal"*)
term_font="$(awk -F '=' '/font=/ {a=$2} /font_size/ {b=$2} END{print a " " b}' \
term_font="$(awk -F '=' '/font=/ {a=$2} /font_size/ {b=$2} END
{print a " " b}' \
"${XDG_CONFIG_HOME}/deepin/deepin-terminal/config.conf")"
"${XDG_CONFIG_HOME}/deepin/deepin-terminal/config.conf")"
;;
;;
"GNUstep_Terminal")
"GNUstep_Terminal")
term_font="$(awk -F '>|<' '/>TerminalFont</ {getline; f=$3}
term_font="$(awk -F '>|<' '/>TerminalFont</ {getline; f=$3}
/>TerminalFontSize</ {getline; s=$3} END{print f " " s}' \
/>TerminalFontSize</ {getline; s=$3} END
{print f " " s}' \
"${HOME}/GNUstep/Defaults/Terminal.plist")"
"${HOME}/GNUstep/Defaults/Terminal.plist")"
;;
;;
...
@@ -2953,7 +2953,7 @@ END
...
@@ -2953,7 +2953,7 @@ END
;;
;;
"qterminal")
"qterminal")
term_font="$(awk -F '=' '/fontFamily=/ {a=$2} /fontSize=/ {b=$2} END{print a " " b}' \
term_font="$(awk -F '=' '/fontFamily=/ {a=$2} /fontSize=/ {b=$2} END
{print a " " b}' \
"${XDG_CONFIG_HOME}/qterminal.org/qterminal.ini")"
"${XDG_CONFIG_HOME}/qterminal.org/qterminal.ini")"
;;
;;
...
@@ -3045,7 +3045,7 @@ END
...
@@ -3045,7 +3045,7 @@ END
;;
;;
"xfce4-terminal")
"xfce4-terminal")
term_font="$(awk -F '=' '/^FontName/{a=$2}/^FontUseSystem=TRUE/{a=$0}
END
{print a}' \
term_font="$(awk -F '=' '/^FontName/{a=$2}/^FontUseSystem=TRUE/{a=$0}
END
{print a}' \
"${XDG_CONFIG_HOME}/xfce4/terminal/terminalrc")"
"${XDG_CONFIG_HOME}/xfce4/terminal/terminalrc")"
[[ "$term_font" == "FontUseSystem=TRUE" ]] && \
[[ "$term_font" == "FontUseSystem=TRUE" ]] && \
...
...
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