diff --git a/1.2.md b/1.2.md
new file mode 100644
index 00000000..fffcb4a1
--- /dev/null
+++ b/1.2.md
@@ -0,0 +1,117 @@
+# Fetch 1.2
+
+This new release comes with a few config breaking changes, see this wiki page
+for info on how you can workaround the issues.
+
+https://github.com/dylanaraps/fetch/wiki/Following-HEAD
+
+- Fetch now has a **gitter** chatroom. [](https://gitter.im/dylanaraps/fetch?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+- Fixed text padding when the user didn't have the locale `en_US.UTF8` installed.
+- Cleaned up parts of the script.
+
+### OS
+
+Fetch is now at support parity with Screenfetch. We support all the Linux distros
+Screenfetch supports excluding the distros that have been discontinued.
+
+Added support for these distros:
+- `Puppy Linux`
+- `Kali Linux`
+- `openSUSE`
+- `Raspbian`
+- `Mageia`
+- `PCLinuxOS`
+- `Zorin OS`
+- `Tails`
+- `BLAG`
+- `Void Linux`
+- `Trisquel`
+- `Solus`
+- `Peppermint`
+- `NixOS`
+- `Chakra`
+- `Mandriva`
+- `gNewSense`
+- `LMDE`
+- `KaOS`
+- `Sabayon`
+- `Frugalware`
+- `Chapeau`
+- `Slackware`
+- `Scientific Linux`
+- `Exherbo`
+- `Chrome OS`
+- `Chromium OS`
+
+
+### Makefile
+
+- Fixed makefile on OS X El Captain.
+- `$PREFIX` is now also used when installing ascii art and the default config
+
+
+### Wallpaper
+
+- Fetch now supports using `MATE` desktop's wallpapers.
+- Fetch now fallsback to ascii mode if the found wallpaper is an xml file. This
+fixes issues where the wallpaper set by gsettings is an xml file.
+
+
+### Info
+
+**Desktop Environment**:
+- Added support for showing the user's DE.
+
+**Window Manager**:
+- `xprop` is now a required dependency. See **[#79](https://github.com/dylanaraps/fetch/issues/79)**
+- Renamed 'windowmanager' to 'wm'
+
+**IP Address**:
+- Added function to get your local IP
+- Added function to get your public IP \[1\]
+- Added `--ip_host` and `$public_ip_host` which allow you to change the website we
+ping for the public IP.
+
+\[1\] Public IP requires an internet connection as we ping a website.
+
+**Packages**:
+- Check for packages based on which package manager is installed instead of
+using a hardcoded list of distros.
+
+**Theme**:
+- Added support for getting DE theme.
+- Added support for getting KDE theme.
+- Renamed `getgtk` to `getstyle`.
+- Dropped the `gtk` from these printinfo functions `gtktheme`, `gtkicons`
+and `gtkfont`. Theme output will be blank until you make these changes:
+
+```sh
+# Old Naming
+info "GTK Theme" gtktheme
+info "Icons" gtkicons
+info "Font" gtkfont
+
+# New Naming
+info "Theme" theme
+info "Icons" icons
+info "Font" font
+```
+
+**GPU**:
+- `gpu_shorthand` is now enabled by default.
+- We now favor showing the dedicated GPU over the integrated one.
+
+**Song**:
+- Added support for `MOC`.
+- We now check to see if the player is running before printing anything.
+- We now check playback state and show it if relevent.
+
+**Uptime**:
+- [Linux] Fixed uptime when it's under 1 minute.
+
+
+### Ascii Art
+- `--ascii_distro` now also enables ascii mode.
+- Fix missing ascii art when fetch is installed in /usr/local
+- Update Deepin's ascii art to their new logo
+
diff --git a/README.md b/README.md
index 3cf3b2ae..2c13943e 100644
--- a/README.md
+++ b/README.md
@@ -68,13 +68,10 @@ your distro's logo or any ascii art of your choice!
### Required dependencies:
- `Bash 4.0+`
+- `xprop` \[3\]
- `procps-ng`
- Not required on OS X
-##### Linux / BSD
-
-- `wmctrl` \[3\]
-
### Optional dependencies:
@@ -93,7 +90,7 @@ your distro's logo or any ascii art of your choice!
\[2\] You can enable the `iTerm2` image backend by using the launch flag `--image_backend iterm2` or by
changing the config option `$image_backend` to `iterm2`.
-\[3\] See **#75** about why this is now a required dependency.
+\[3\] See **[#79](https://github.com/dylanaraps/fetch/issues/79)** about why this is now a required dependency.
\[4\] You can use the launch flag `--scrot_cmd` or change the config option `$scrot_cmd` to your screenshot
program's cmd and fetch will use it instead of scrot.
diff --git a/fetch b/fetch
index d1dc44ea..9c9b09a1 100755
--- a/fetch
+++ b/fetch
@@ -6,13 +6,12 @@
#
# Required Dependencies:
# Bash 4.0+
-# Text formatting, dynamic image size and padding: tput
+# xprop
# [Linux / BSD / Windows] Uptime detection: procps or procps-ng
#
# Optional Dependencies: (You'll lose these features without them)
# Displaying Images: w3m + w3m-img
# Image Cropping: ImageMagick
-# More accurate window manager detection: wmctrl
# [ Linux / BSD ] Wallpaper Display: feh, nitrogen or gsettings
# [ Linux / BSD ] Current Song: mpc or cmus
# [ Linux / BSD ] Resolution detection: xorg-xdpyinfo
@@ -746,9 +745,13 @@ getde () {
# Window Manager {{{
getwm () {
- if type -p wmctrl >/dev/null 2>&1; then
- wm="$(wmctrl -m | head -n1)"
- wm=${wm/Name: }
+ if [ -n "$DISPLAY" ]; then
+ id="$(xprop -root -notype | \awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}')"
+ wm="$(xprop -id "$id" -notype -f _NET_WM_NAME 8t)"
+ wm=${wm/*_NET_WM_NAME = }
+ wm=${wm/\"}
+ wm=${wm/\"*}
+
else
case "$os" in
"Mac OS X") wm="Quartz Compositor" ;;