From 9ad9d4d75e368736649ef45d3ffbe68c4eaa6033 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Sun, 17 Dec 2017 20:43:41 +1100 Subject: [PATCH 1/3] wm: Better wayland detection --- neofetch | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/neofetch b/neofetch index 1724d6c3..7fb09fd9 100755 --- a/neofetch +++ b/neofetch @@ -677,7 +677,7 @@ get_de() { esac # Fallback to using xprop. - [[ -n "$DISPLAY" && -z "$de" ]] && \ + [[ "$DISPLAY" && -z "$de" ]] && \ de="$(xprop -root | awk '/KDE_SESSION_VERSION|^_MUFFIN|xfce4|xfce5/')" # Format strings. @@ -703,7 +703,30 @@ get_wm() { # If function was run, stop here. ((wm_run == 1)) && return - if [[ -n "$DISPLAY" && "$os" != "Mac OS X" ]]; then + if [[ "$WAYLAND_DISPLAY" ]]; then + if [[ "$SWAYSOCK" ]]; then + wm="sway" + + else + wm="$(ps -e | grep -m 1 -o -F -e "asc" \ + -e "fireplace" \ + -e "grefsen" \ + -e "mazecompositor" \ + -e "maynard" \ + -e "motorcar" \ + -e "orbment" \ + -e "orbital" \ + -e "perceptia" \ + -e "rustland" \ + -e "velox" \ + -e "wavy" \ + -e "wayhouse" \ + -e "way-cooler" \ + -e "westford" \ + -e "weston")" + fi + + elif [[ "$DISPLAY" && "$os" != "Mac OS X" ]]; then id="$(xprop -root -notype _NET_SUPPORTING_WM_CHECK)" id="${id##* }" wm="$(xprop -id "$id" -notype -len 100 -f _NET_WM_NAME 8t)" @@ -714,13 +737,6 @@ get_wm() { # Window Maker does not set _NET_WM_NAME [[ "$wm" =~ "WINDOWMAKER" ]] && wm="wmaker" - # Fallback for Wayland wms. - [[ "$wm" == "xwlc" ]] && \ - wm="$(ps -e | grep -m 1 -o -F -e "sway" \ - -e "orbment" \ - -e "orbital" \ - -e "way-cooler")" - else case "$os" in "Mac OS X") @@ -1634,7 +1650,7 @@ get_style() { # Fix weird output when the function is run multiple times. unset gtk2_theme gtk3_theme theme path - if [[ -n "$DISPLAY" && "$os" != "Mac OS X" ]]; then + if [[ "$DISPLAY" && "$os" != "Mac OS X" ]]; then # Get DE if user has disabled the function. ((de_run != 1)) && get_de From 4870a863ac3c3f2ab818eb38b44bb23cc3a03935 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Sun, 17 Dec 2017 21:10:48 +1100 Subject: [PATCH 2/3] wm: cleanup --- neofetch | 51 +++++++++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/neofetch b/neofetch index 7fb09fd9..05c441cd 100755 --- a/neofetch +++ b/neofetch @@ -704,27 +704,24 @@ get_wm() { ((wm_run == 1)) && return if [[ "$WAYLAND_DISPLAY" ]]; then - if [[ "$SWAYSOCK" ]]; then - wm="sway" - - else - wm="$(ps -e | grep -m 1 -o -F -e "asc" \ - -e "fireplace" \ - -e "grefsen" \ - -e "mazecompositor" \ - -e "maynard" \ - -e "motorcar" \ - -e "orbment" \ - -e "orbital" \ - -e "perceptia" \ - -e "rustland" \ - -e "velox" \ - -e "wavy" \ - -e "wayhouse" \ - -e "way-cooler" \ - -e "westford" \ - -e "weston")" - fi + wm="$(ps -e | grep -m 1 -o -F \ + -e "asc" \ + -e "fireplace" \ + -e "grefsen" \ + -e "mazecompositor" \ + -e "maynard" \ + -e "motorcar" \ + -e "orbment" \ + -e "orbital" \ + -e "perceptia" \ + -e "rustland" \ + -e "sway" \ + -e "velox" \ + -e "wavy" \ + -e "wayhouse" \ + -e "way-cooler" \ + -e "westford" \ + -e "weston")" elif [[ "$DISPLAY" && "$os" != "Mac OS X" ]]; then id="$(xprop -root -notype _NET_SUPPORTING_WM_CHECK)" @@ -752,11 +749,13 @@ get_wm() { ;; "Windows") - wm="$(tasklist | grep -m 1 -o -F -e "bugn" \ - -e "Windawesome" \ - -e "blackbox" \ - -e "emerge" \ - -e "litestep")" + wm="$(tasklist | grep -m 1 -o -F \ + -e "bugn" \ + -e "Windawesome" \ + -e "blackbox" \ + -e "emerge" \ + -e "litestep")" + [[ "$wm" == "blackbox" ]] && wm="bbLean (Blackbox)" wm="${wm:+$wm, }Explorer" ;; From 2e5384581f86c46de5fdb81829916f8bb1baa1db Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 17 Dec 2017 21:41:27 +1100 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 57 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5427d5fc..30a557da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,25 +14,62 @@ - Fixed detection bug with TrueOS. [**@dawidd6**](https://github.com/dawidd6) - Added support for macOS High Sierra. [**@yslgirl**](https://github.com/yslgirl) - Added support for Container Linux by CoreOS. [**@chrisweeksnz**](https://github.com/chrisweeksnz) -- Added support for 2017 iOS devices [**@iandrewt**](https://github.com/iandrewt) +- Added support for 2017 iOS devices. [**@iandrewt**](https://github.com/iandrewt) - Added support for LEDE. [**@dawidd6**](https://github.com/dawidd6) +- Added support for Pop!\_OS. [**@jliles**](https://github.com/jliles) +- Added support for Lunar Linux. + + +## General + +- Added more info to verbose mode for debugging. +- Fixed bug in prompt location calculation. + + +## Ascii + +- Added color updates for Kubuntu logo. **Maulik Mistry** ## Images -- [MacOS/iTerm2] Fixed thumbnail not appearing (replaced by placeholder) [**@StarryTony**](https://github.com/StarryTony) - +- [MacOS/iTerm2] Fixed thumbnail not appearing. [**@StarryTony**](https://github.com/StarryTony) +- Fixed bug with getting wallpaper from feh. +- Added `pixterm` backend. ## Info +**Desktop Environment** + +- Added GNOME version. + **Window Manager** -- [macOS] Fixed chunkwm being detected as Kwm. [**@iandrewt**](https://github.com/iandrewt) +- Added support for most (*if not all*) current Wayland compositors/window manager's. +- [macOS] Fixed `chunkwm` being detected as `Kwm`. [**@iandrewt**](https://github.com/iandrewt) + +**Window Manager Theme** + +- Fixed `sawfish` detection. **Install Date** - [macOS] Fixed Install Date. [**@iandrewt**](https://github.com/iandrewt) +**Theme** + +- Fixed KDE font issue. [**@mstraube**](https://github.com/mstraube) + +**CPU** + +- [linux] Detect the correct temperature file to use. +- [windows] Removed `$temp` usage as it's an envar. + +**GPU** + +- [linux] Added driver version to NVIDIA output. +- [macOS] Added NVIDIA support. [**@iandrewt**](https://github.com/iandrewt) + **Package Manager** - Added detection for Sabotage Linux's `butch` [**@MitchWeaver**](https://github.com/MitchWeaver) @@ -40,3 +77,15 @@ **Resolution** - [macOS] Fixed errors on non-retina screens. [**@iandrewt**](https://github.com/iandrewt) + +**Song** + +- Added support for Elisa. [**@mstraube**](https://github.com/mstraube) + +**Model** + +- Remove more unneeded outputs. [**@konimex**](https://github.com/konimex) + +**Disk** + +- Update Haiku's detection. [**@dawidd6**](https://github.com/dawidd6)