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
53ac0612
Unverified
Commit
53ac0612
authored
Dec 09, 2019
by
dylan
Committed by
GitHub
Dec 09, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1362 from arisinfenix/de_version
Add initial support for DE version
parents
69bca7af
ba93e1bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
14 deletions
+50
-14
neofetch
neofetch
+47
-14
neofetch.1
neofetch.1
+3
-0
No files found.
neofetch
View file @
53ac0612
...
@@ -383,6 +383,17 @@ public_ip_host="http://ident.me"
...
@@ -383,6 +383,17 @@ public_ip_host="http://ident.me"
public_ip_timeout=2
public_ip_timeout=2
# Desktop Environment
# Show Desktop Environment version
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --de_version
de_version="off"
# Disk
# Disk
...
@@ -1581,24 +1592,41 @@ get_de() {
...
@@ -1581,24 +1592,41 @@ get_de() {
# Format strings.
# Format strings.
case $de in
case $de in
KDE_SESSION_VERSION*) de=KDE${de/* = } ;;
KDE_SESSION_VERSION*) de=KDE${de/* = } ;;
*xfce4*) de=Xfce4 ;;
*xfce4*) de=Xfce4 ;;
*xfce5*) de=Xfce5 ;;
*xfce5*) de=Xfce5 ;;
*xfce*) de=Xfce ;;
*xfce*) de=Xfce ;;
*mate*) de=MATE ;;
*mate*) de=MATE ;;
*GNOME*) de=GNOME ;;
*MUFFIN*|Cinnamon)
*MUFFIN*) de=Cinnamon ;;
de=$(cinnamon --version)
de=${de:-Cinnamon}
;;
*GNOME*)
de=$(gnome-shell --version)
de=${de/Shell }
;;
esac
esac
((KDE_SESSION_VERSION >= 4)) && de=${de/KDE/Plasma}
((KDE_SESSION_VERSION >= 4)) && de=${de/KDE/Plasma}
if [[ $de_version == on && $de ]]; then
case $de in
"Plasma"*) de_ver=$(plasmashell --version) ;;
"MATE"*) de_ver=$(mate-session --version) ;;
"Xfce"*) de_ver=$(xfce4-session --version) ;;
"GNOME"*) de_ver=$(gnome-shell --version) ;;
"Cinnamon"*) de_ver=$(cinnamon --version) ;;
"Deepin"*) de_ver=$(awk -F'=' '/Version/ {print $2}' /etc/deepin-version) ;;
"Budgie"*) de_ver=$(budgie-desktop --version) ;;
"LXQt"*) de_ver=$(lxqt-session --version) ;;
"Lumina"*) de_ver=$(lumina-desktop --version 2>&1) ;;
"Trinity"*) de_ver=$(tde-config --version) ;;
esac
de_ver=${de_ver/*TDE:}
de_ver=${de_ver/tde-config*}
de_ver=${de_ver/liblxqt*}
de_ver=${de_ver/Copyright*}
de_ver=${de_ver/)*}
de_ver=${de_ver/* }
de_ver=${de_ver//\"}
de="$de $de_ver"
fi
de_run=1
de_run=1
}
}
...
@@ -2752,6 +2780,9 @@ get_style() {
...
@@ -2752,6 +2780,9 @@ get_style() {
# Get DE if user has disabled the function.
# Get DE if user has disabled the function.
((de_run != 1)) && get_de
((de_run != 1)) && get_de
# Remove version from '$de'.
[[ $de_version == on ]] && de=${de/ *}
# Check for DE Theme.
# Check for DE Theme.
case $de in
case $de in
"KDE"* | "Plasma"*)
"KDE"* | "Plasma"*)
...
@@ -4523,6 +4554,7 @@ INFO:
...
@@ -4523,6 +4554,7 @@ INFO:
NOTE: This only supports Linux.
NOTE: This only supports Linux.
--de_version on/off Show/Hide Desktop Environment version
--gtk_shorthand on/off Shorten output of gtk theme/icons
--gtk_shorthand on/off Shorten output of gtk theme/icons
--gtk2 on/off Enable/Disable gtk2 theme/font/icons output
--gtk2 on/off Enable/Disable gtk2 theme/font/icons output
--gtk3 on/off Enable/Disable gtk3 theme/font/icons output
--gtk3 on/off Enable/Disable gtk3 theme/font/icons output
...
@@ -4698,6 +4730,7 @@ get_args() {
...
@@ -4698,6 +4730,7 @@ get_args() {
"--gpu_brand") gpu_brand="$2" ;;
"--gpu_brand") gpu_brand="$2" ;;
"--gpu_type") gpu_type="$2" ;;
"--gpu_type") gpu_type="$2" ;;
"--refresh_rate") refresh_rate="$2" ;;
"--refresh_rate") refresh_rate="$2" ;;
"--de_version") de_version="$2" ;;
"--gtk_shorthand") gtk_shorthand="$2" ;;
"--gtk_shorthand") gtk_shorthand="$2" ;;
"--gtk2") gtk2="$2" ;;
"--gtk2") gtk2="$2" ;;
"--gtk3") gtk3="$2" ;;
"--gtk3") gtk3="$2" ;;
...
...
neofetch.1
View file @
53ac0612
...
@@ -104,6 +104,9 @@ Which GPU to display. (all, dedicated, integrated)
...
@@ -104,6 +104,9 @@ Which GPU to display. (all, dedicated, integrated)
.IP
.IP
NOTE: This only supports Linux.
NOTE: This only supports Linux.
.TP
.TP
\fB\-\-de_version\fR on/off
Show/Hide Desktop Environment version
.TP
\fB\-\-gtk_shorthand\fR on/off
\fB\-\-gtk_shorthand\fR on/off
Shorten output of gtk theme/icons
Shorten output of gtk theme/icons
.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