Code Monkey home page Code Monkey logo

screenfetch's Introduction

screenFetch - The Bash Screenshot Information Tool

What is screenFetch?

screenFetch is a "Bash Screenshot Information Tool". This handy Bash script can be used to generate one of those nifty terminal theme information + ASCII distribution logos you see in everyone's screenshots nowadays. It will auto-detect your distribution and display an ASCII version of that distribution's logo and some valuable information to the right. There are options to specify no ASCII art, colors, taking a screenshot upon displaying info, and even customizing the screenshot command! This script is very easy to add to and can easily be extended.

How do I get screenFetch?

Please see Installation.

Running screenfetch

To run screenFetch, open a terminal of some sort and type in the command screenfetch or wherever you saved the script to. This will generate an ASCII logo with the information printed to the side of the logo. There are some options that may be specified on the command line, and those are shown below or by executing screenfetch -h:

  -v                 Verbose output.
  -o 'OPTIONS'       Allows for setting script variables on the
                     command line. Must be in the following format...
                     'OPTION1="OPTIONARG1";OPTION2="OPTIONARG2"'
  -d '+var;-var;var' Allows for setting what information is displayed
                     on the command line. You can add displays with +var,var. You
                     can delete displays with -var,var. Setting without + or - will
                     set display to that explicit combination. Add and delete statements
                     may be used in conjunction by placing a ; between them as so:
                     +var,var,var;-var,var.
  -n                 Do not display ASCII distribution logo.
  -N                 Strip all color from output.
  -w                 Wrap long lines.
  -t                 Truncate output based on terminal width (Experimental!).
  -p                 Output in portrait mode, with logo above info.
  -s [-u IMGHOST]    Using this flag tells the script that you want it
                     to take a screenshot. Use the -m flag if you would like
                     to move it to a new location afterwards.
  -c string          You may change the outputted colors with -c. The format is
                     as follows: [0-9][0-9],[0-9][0-9]. The first argument controls the
                     ASCII logo colors and the label colors. The second argument
                     controls the colors of the information found. One argument may be
                     used without the other.
  -a 'PATH'          You can specify a custom ASCII art by passing the path
                     to a Bash script, defining `startline` and `fulloutput`
                     variables, and optionally `labelcolor` and `textcolor`.
                     See the `asciiText` function in the source code for more
                     information on the variables format.
  -S 'COMMAND'       Here you can specify a custom screenshot command for
                     the script to execute. Surrounding quotes are required.
  -D 'DISTRO'        Here you can specify your distribution for the script
                     to use. Surrounding quotes are required.
  -A 'DISTRO'        Here you can specify the distribution art that you want
                     displayed. This is for when you want your distro
                     detected but want to display a different logo.
  -E                 Suppress output of errors.
  -C                 Add custom (extra) lines.
                     For example:
                           screenfetch -C 'IP WAN=192.168.0.12,IP BRIDGED=10.1.1.10'
                     ... will add two extra lines:
                           IP WAN: 192.168.0.12
                           IP BRIDGED: 10.1.1.10
  -V, --version      Display current script version.
  -h, --help         Display this help.

Contact Me

If you would like to suggest something new, inform me of an issue in the script, become part of the project, or talk to me about anything else, you can either email me at [email protected] or you can connect to Rizon and reach me at irc://irc.rizon.net/screenFetch

screenfetch's People

Contributors

alexbaranowski avatar algmyr avatar cgoldberg avatar charliewoollard avatar crahan avatar damnwidget avatar darealshinji avatar dmitryhetman avatar erikdubois avatar felixonmars avatar idvoretskyi avatar justingallagher avatar kittykatt avatar konfou avatar kwpolska avatar l1kwidus avatar makise-homura avatar myralllka avatar n-a-m-e avatar nero avatar neuschaefer avatar rolinh avatar sdmoko avatar sol4ik avatar spaghetti2514 avatar stevestock avatar sulincix avatar thisisatest233 avatar valeriangalliat avatar vndroid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

screenfetch's Issues

Crunchbang support

lsb_release -sirc outputs the debian release and codename instead of reading the info from lsb-release-crunchbang. output then is Crunchbang 7.0 wheezy.
if the relevant code in the distro detection section is changed to:
elif [[ "${distro_detect}" == "Debian" ]]; then
distro="Debian"
elif [[ "${distro_detect}" == "CrunchBang" ]]; then
distro="CrunchBang"
and the /etc/lsb-release-crunchbang is renamed to /lsb-release, it works fine.
I think this is a known problem from former versions of the script and I haven't found any better solution than the above.

Syntax error on OS X 10.4.11

[06:42 PM] thomas@Vulpes: sh ./screenfetch-dev
./screenfetch-dev: line 325: conditional binary operator expected
./screenfetch-dev: line 325: syntax error near =~' ./screenfetch-dev: line 325: if [[ ${distro_detect[$i]} =~ ^[[:digit:]]+((.[[:digit:]]+|[[:digit:]]+|)+)$ ]]; then'

Not sure if it's just from having an outdated OS or what

Ubuntu logo incorrect

Hi there. I've only just discovered screenfetch, it's really cool. One thing I noticed is that the Ubuntu logo is not the current one. It's the older 3-colour circle of friends. We ditched that some years back now, and use a new logo which is all one colour.

http://design.ubuntu.com/brand/ubuntu-logo

Thanks!

Distribution not recognized.

When running the latest revision of screenfetch on Arch Linux without lsb-releases installed, the distribution that found is apparently just "Arch". And the logo shown is tux.

Error detecting Window Manager on OSX

Instead of getting 'Quartz Compositor', it now gets '_net_wm_name: not found'. Also, whenever I run screenfetch now, XQuartz (X11) opens as well.

Support for Antergos?

Great script!

I was wondering if there are plans in the works to support Antergos. It looks like it recognizes it but just doesn't have a kick ass ASCII logo yet.
This is the OS and Kernel from my current run:
OS: antergos
Kernel: x86_64 Linux 3.13.5-1-ARCH

Thank you!

FreeBSD issues

When the latest revision of screenfetch is invoked, on an X11-less installation of FreeBSD, the following output occurs on stderr:
No such schema 'org.gnome.desktop.interface'

This cannot be reproduced on an X11-less installation of a couple of GNU/Linux distributions.

Also on FreeBSD, the uptime is shown to be an incorrect amount:
Uptime: 15703d 1h 41m

Here is the output of uptime:
" 8:56PM up 15 mins, 1 user, load averages: 0.00, 0.01, 0.02"

OS X 10.9 gives an error but executes anyway

When I run screenfetch I get the following error:

The domain/default pair of (kCFPreferencesAnyApplication, AppleAquaColorVariant) does not exist

screenfetch still works and displays information in the terminal. Haven't been able to figure out what the error is saying.

Gala is not a customized Mutter

code.launchpad.net/gala

Gala is a Window Manager, not a customized Mutter, it just happens to use libmutter as its WM-stuff library.

LMDE architecture not detected

Hi again, very very small cosmetic issue :)

In linux mint debian edition the architecture is not detected, and the output is
OS: LMDE null null

Not a big issue since kernel info is displayed correctly

Red Hat Detection

I am getting incomplete RHEL detection with scriptVersion="2.7.5". It senses the OS enough to pick the ascii art, but not enough to print the correct os name.

The os detect algorithm looks like it's doing the right thing to first order; here's the info your script should be receiving:

[engineer@mel8585 Downloads]$ lsb_release -sirc
RedHatEnterpriseClient 5.7 Tikanga
[engineer@mel8585 Downloads]$ grep 'Red Hat' /etc/redhat-release
Red Hat Enterprise Linux Client release 5.7 (Tikanga)

and here's the ./screenfetch output with verbose on. Note the "OS: Unknown 5.7 Tikanga"

[engineer@mel8585 Downloads]$ ./screenfetch-dev -v
:: Finding hostname and user...found as 'engineer@mel8585'
:: Finding distro...found as 'Red Hat Linux 5.7'
:: Finding kernel version...found as 'i686 Linux 2.6.18-274.el5'
:: Finding current uptime...found as '7d 21h 48m'
:: Finding current package count...found as '973'
:: Finding current shell...found as 'bash'
:: Finding current resolution(s)...found as '2970x1830'
:: Finding desktop environment...found as 'Not Present'
xprop: error: Invalid window id format: window..
:: Finding window manager...found as ''
:: Finding window manager theme...found as 'Not Found'
xprop: error: Invalid window id format: window..
:: Finding window manager...found as ''
:: Finding GTK2 theme...found as 'Clearlooks'
:: Finding GTK3 theme...found as 'Not Found'
:: Finding icon theme...found as 'Clearlooks'
:: Finding user font...found as 'Not Found'
:: Finding current CPU...found as 'VIA Esther processor 1000MHz'
:: Finding current RAM usage...found as '134MB / 945MB'
              `.-..........`               engineer@mel8585
             `////////::.`-/.              OS: Unknown 5.7 Tikanga
             -: ....-////////.             Kernel: i686 Linux 2.6.18-274.el5
             //:-::///////////`            Uptime: 7d 21h 48m
      `--::: `-://////////////:            Packages: 973
      //////-    ``.-:///////// .`         Shell: bash
      `://////:-.`    :///////::///:`      Resolution: 2970x1830
        .-/////////:---/////////////:      DE: Not Present
           .-://////////////////////.      WM:
          yMN+`.-::///////////////-`       WM Theme: Not Found
       .-`:NMMNMs`  `..-------..`          GTK2 Theme: Clearlooks
        MN+/mMMMMMhoooyysshsss             GTK3 Theme: Not Found
 MMM    MMMMMMMMMMMMMMyyddMMM+             Icon Theme: Clearlooks
  MMMM   MMMMMMMMMMMMMNdyNMMh`     hyhMMM  Font: Not Found
   MMMMMMMMMMMMMMMMyoNNNMMM+.   MMMMMMMM   CPU: VIA Esther processor 1000MHz
    MMNMMMNNMMMMMNM+ mhsMNyyyyMNMMMMsMM    RAM: 134MB / 945MB

osx screencapture bug

this line

if [ "$distro" == "Mac OS X" ]; then screencapture -xT 3 "${shotfile}"

should be

if [ "$distro" == "Mac OS X" ]; then screencapture -x -T 3 "${shotfile} 2>dev/null"

or else it will just error out after searching for the file because the outputted file will be named "3"

OS X - Screenshot error

In Mountain Lion and possibly Lion the screencapture command always outputs:
libpng warning: zero length keyword
libpng warning: Empty language field in iTXt chunk
even though it still takes the screenshot fine this is always printed under screenfetch.

after some trial and error I could only get this to go away after changing the screencapture command in the takeshot function

from: screencapture -xT 3 "${shotfile}"
to: screencapture -x -T 3 ${serverdir}${shotfile} &> /dev/null
(changed -xT to -x -T because it was messing up and calling screenshots "3". I think this has something to do with multiple monitors again, it was naming the second monitor shot properly but not the first. this way it only screenshots the first monitor and names it properly)
(added ${serverdir} because it want saving to defined save location)
(added &> /dev/null to suppress libpng warning)

but I also had to change the verboseOut error of that block to "echo -n" to stop it printing an unnecessary error.

I'm sure You could fix these better than I have, I'm a bash amateur.

I've uploaded my modified version if it helps at all https://mega.co.nz/#!ixZiiAJQ!ErL80XULjJhcOK1d02yJvSrX2mthNinIF58Eqb-VHvU

Any idea when you might get a chance to make changes and upload a fixed version?
Thanks.

Incorrect GPU detection on OS X with X11 installed

GPU: NVidia NVIDIA GeForce 320M OpenGL Engine

The elif [[ -n "$(type -p glxinfo)" && -z "$gpu" ]]; then line returns true on OS X with X11 installed, and therefore the script never gets to elif [[ "${distro}" == "Mac OS X" ]]; then
I would just recommend putting the checks for OS X and Cygwin above the check for glxinfo as a sufficient fix

In addition, the value of $gpu from glxinfo already contains the vendor, but it is still prepended by $gpu_info, resulting in the "NVidia NVIDIA" part

Distro not detected (and some other errors)

I have tested the script (commit ed8ea34, the latest as of writing this) with a Red Hat linux. The script doesn't detect the distro and generates the following errors:

./screenfetch: line 348: /etc/os-release: No such file or directory
./screenfetch: line 924: [: missing `]'
./screenfetch: line 931: [: missing `]'
which: no gsettings in (/usr/kerberos/bin:/opt/intel/Compiler/11.1/069/bin/intel64/:/opt/pgi/linux86-64/2011/bin:/usr/local/pbs/bin:.:/opt/pgi/linux86-64/2011/mpi/mpich/bin:/usr/local/bin:/bin:/usr/bin:/home/marting/bin)
./screenfetch: line 951: gsettings: command not found

Frequency from /proc/cpuinfo should be rounded to nearest integer

This issue will go (most liekly) undetected, until you start over-clocking to some decent extent

~$ cat /proc/cpuinfo |grep MHz
cpu MHz     : 3999.803
cpu MHz     : 3999.803
cpu MHz     : 3999.803
cpu MHz     : 3999.803
~$ sudo lshw -c cpu
  *-cpu                   
       description: CPU
       product: AMD Phenom(tm) II X4 965 Processor
       vendor: Advanced Micro Devices [AMD]
       physical id: 4
       bus info: cpu@0
       version: AMD Phenom(tm) II X4 965 Processor
       serial: To Be Filled By O.E.M.
       slot: AM3
       size: 4GHz
       capacity: 4GHz
       width: 64 bits
       clock: 200MHz
       capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate npt lbrv svm_lock nrip_save
       configuration: cores=4 enabledcores=4

Crunchbang Detection

It seems that Crunchbang detection is broken with version 2.7.5. I'm not sure if the distro detection has been overhauled since version 2.5.0, which is the "fixed" version i'm hosting here: https://github.com/jethr0-diggy/screenfetch-test

If it hasn't been updated, i'm guessing you can just pull the fix from this version. If things have changed i'm currently messing around (to no avail) to get something working.

EDIT: i have a crude version of a fix implemented in the new-fix branch of screenfetch-test(https://github.com/jethr0-diggy/screenfetch-test/tree/new-fix). I'm not sure how viable it is, but it hasn't broken anything so far, so i assume its somewhat viable.

KWin code incorrectly references openbox.

In fact this dumps a awk error if you happen to use kwin. Below patch seems to do the job.

From 419cd0999774944192497ab84cdc6bd6067df47c Mon Sep 17 00:00:00 2001
From: Adam Young [email protected]
Date: Thu, 21 Apr 2011 02:08:10 -0700
Subject: [PATCH] KWin parsing incorrectly references openbox.


screenfetch-dev | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/screenfetch-dev b/screenfetch-dev
index 7490c7e..6f9f4cc 100755
--- a/screenfetch-dev
+++ b/screenfetch-dev
@@ -352,7 +352,7 @@ detectwmtheme () {
'Metacity') if [ "gconftool-2 -g /apps/metacity/general/theme" ]; then Win_theme="$(gconftool-2 -g /apps/metacity/general/theme)"; fi ;;
'Xfwm4') if [ -f ${XDG_CONFIG_HOME:-${HOME}/.config}/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml ]; then Win_theme="$(xfconf-query -c xfwm4 -p /general/theme)"; fi;;
'IceWM') if [ -f $HOME/.icewm/theme ]; then Win_theme="$(awk -F"[",/]" '!/#/ {print $2}' $HOME/.icewm/theme)"; fi;;

  • 'KWin') if [ -f $HOME/.kde/share/config/kwinrc ]; then Win_theme="$(awk -F"[<,>]" '/<theme/ { getline; print $3 }' ${XDG_CONFIG_HOME:-${HOME}/.config}/openbox/rc.xml)"; fi;;
  • 'KWin') if [ -f $HOME/.kde/share/config/plasmarc ]; then Win_theme="$(awk -F"[<=>]" '/^name=/ { getline; print $2 }' ${HOME}/.kde/share/config/plasmarc)"; else Win_theme="Not Present"; fi;;
    'Emerald') if [ -f $HOME/.emerald/theme/theme.ini ]; then Win_theme="$(for a in /usr/share/emerald/themes/* $HOME/.emerald/themes/*; do cmp "$HOME/.emerald/theme/theme.ini" "$a/theme.ini" &>/dev/null && basename "$a"; done)"; fi;;
    'FVWM') Win_theme="Not Present";;
    'DWM') Win_theme="Not Present";;
    --
    1.7.4.4

OS X - Using multiple monitors

When using multiple monitors the resolution of the second monitor line breaks and is printed on a new line breaking the ascii.

gsettings crashes on OS X 10.8.5

Crash Log:
http://pastebin.com/BAEJpanJ
Verbose Output:
$ screenfetch-dev -v

:: Finding distro...found as 'Mac OS X '
:: Finding hostname and user...found as 'redacted@redacted'
:: Finding kernel version...found as 'x86_64 Darwin 12.5.0'
:: Finding current uptime...found as '3h 38m'
:: Finding current package count...found as '67'
:: Finding current shell...found as 'bash 3.2.48'
:: Finding current resolution(s)...found as '1366x768 1920x1200'
:: Finding desktop environment...found as 'Aqua'
:: Finding window manager...found as '_NET_WM_NAME: not found.'
:: Finding window manager theme...found as 'Not Found'
:: Finding GTK2 theme...found as 'Not Found'
:: Finding GTK3 theme...found as ''
:: Finding icon theme...found as 'Not Found'
:: Finding user font...found as 'Monaco 12'
:: Finding current CPU...found as 'Intel Core i5-2467M CPU @ 1.60GHz'
:: Finding current GPU...found as 'Intel Intel HD Graphics 3000 OpenGL Engine'
:: Finding current RAM usage...found as '4073MB / 4096MB'

I'm far from an expert, but why does it check window managers and GTKx themes on OS X?

Fluxbox WM Theme "Not Found"

When running the latest screenfetch revision in a Fluxbox session, the Fluxbox theme doesn't get listed in WM Theme when one is definitely assigned.

KDE matches too many fonts, breaks logo.

Fairly strait forward, logo breaks if there are too many matches, in the standard rc file the general font is lower case so I made a patch. Nice work.

From 1623424e0234849e08c1fecef50db66f6c3f1465 Mon Sep 17 00:00:00 2001
From: Adam Young [email protected]
Date: Thu, 21 Apr 2011 01:18:34 -0700
Subject: [PATCH] Quick change of case to make this work under kde without
breaking the logo.


screenfetch-dev | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/screenfetch-dev b/screenfetch-dev
index 91d9d9a..7490c7e 100755
--- a/screenfetch-dev
+++ b/screenfetch-dev
@@ -393,7 +393,7 @@ detectgtk () {
fi

         if grep -q "Font=" $HOME/.kde/share/config/kdeglobals; then
  •          gtkFont=$(awk -F"=" '/Font=/ {print $2}' $HOME/.kde/share/config/kdeglobals)
    
  •          gtkFont=$(awk -F"=" '/font=/ {print $2}' $HOME/.kde/share/config/kdeglobals)
         fi
       fi
    

    ;;

    1.7.4.4

No GPU Support (includes attempt code)

Test:

                          ./+o+-
                  yyyyy- -yyyyyy+      chad@M4A79XTD-EVO
               ://+//////-yyyyyyo      OS: Ubuntu 13.04 raring
           .++ .:/++++++/-.+sss/`      Kernel: x86_64 Linux 3.9.0-030900-generic
         .:++o:  /++++++++/:--:/-      Uptime: 8h 37m
        o:+o+:++.`..```.-/oo+++++/     Packages: 1815
       .:+o:+o/.          `+sssoo+/    Shell: bash 4.2.45
  .++/+:+oo+o:`             /sssooo.   Resolution: 1920x1080
 /+++//+:`oo+o               /::--:.   DE: XFCE4
 \+/+o+++`o++o               ++////.   WM: Xfwm4
  .++.o+++oo+:`             /dddhhh.   WM Theme: Albatross
       .+.o+oo:.          `oddhhhh+    GTK2 Theme: Albatross
        \+.++o+o``-````.:ohdhhhhh+     Icon Theme: elementary-xfce-dark
         `:o+++ `ohhhhhhhhyo++os:      Font: Droid Sans 10
           .o:`.syhhhhhhh/.oo++o`      CPU: AMD Phenom II X4 965 @ 3.7GHz
               /osyyyyyyo++ooo+++/     GPU: NVidia GeForce GTX 550 Ti
                   ````` +oo+++o\:     RAM: 1534MB / 12017MB
                          `oo++.

My attempt at GPU support

# GPU Detection - Begin
detectgpu () {
    if [ -f /usr/bin/lspci ];then
        gpu_info=$(lspci | grep VGA)
        gpu=$(echo "$gpu_info" | sed 's/\[/\n/;s/\]/\n/' | head -2 | tail -1)

    elif [ -f /usr/bin/glxinfo ];then
        gpu_info=$(glxinfo)
        gpu=$(echo "$gpu_info" | grep "OpenGL renderer string")
        gpu=$(echo "$gpu" | sed 's/: /\n/;s/\//\n/' | tail -2 | head -1)
        gpu_info=$(echo "$gpu_info" | grep "OpenGL vendor string")
    fi
    if [ -n "$gpu" ];then
        if [ $(echo "$gpu_info" | grep -i nvidia | wc -l) -gt 0 ];then
            gpu_info="NVidia "
        elif [ $(echo "$gpu_info" | grep -i intel | wc -l) -gt 0 ];then
            gpu_info="Intel "
        elif [ $(echo "$gpu_info" | grep -i amd | wc -l) -gt 0 ];then
            gpu_info="AMD "
        elif [ $(echo "$gpu_info" | grep -i ati | wc -l) -gt 0 ];then
            gpu_info="ATI "
        else
            gpu_info=""
        fi
        gpu="$gpu_info""$gpu"
    else
        gpu="No idea, Sorry :("
    fi
    [[ "$verbosity" -eq "1" ]] && verboseOut "Finding current GPU...found as '$gpu'"
}
# GPU Detection - End

It will need support for hybrid GPUs and dual GPUs

Wrong disk count while double mounted rootfs

In some distros (example - gentoo) there are two rootfs mount lines in mtab, and screenfetch thinks it's different devices.

For example, my df is:

rootfs                           20G  7.8G   12G  40% /
udev                             10M  4.0K   10M   1% /dev
/dev/mapper/vg_xanatos-lv_dom0   20G  7.8G   12G  40% /
tmpfs                           1.5G  3.4M  1.5G   1% /run
tmpfs                           1.5G     0  1.5G   0% /dev/shm
cgroup_root                      10M     0   10M   0% /sys/fs/cgroup
/dev/sda1                       477M   39M  409M   9% /boot

root is 20GB, boot is 500mb, thats all.

But screenfetch output is:
Disk: 16G / 43G (37%)

So, rootfs doubled, and tmpfs is counted like diskspace.

I have no idea how I noticed this

case $lcase in
            arch*linux*old) distro="Arch Linux - Old" ;;
            arch*linux) distro="Arch Linux" ;;
            arch) distro="Arch Linux";;
            elementary) distro="Elementary OS";;
            fedora) distro="Fedora" ;;
            mageia) distro="Mageia" ;;
            mandriva) distro="Mandriva" ;;
            mandrake) distro="Mandrake" ;;
            crunchbang) distro="CrunchBang" ;;   #  ◀━━
            mint) distro="Mint" ;;
            lmde) distro="LMDE" ;;
            opensuse) distro="openSUSE" ;;
            ubuntu) distro="Ubuntu" ;;
            debian) distro="Debian" ;;
            freebsd) distro="FreeBSD" ;;
            openbsd) distro="OpenBSD" ;;
            dragonflybsd) distro="DragonFlyBSD" ;;
            netbsd) distro="NetBSD" ;;
            red*hat*) distro="Red Hat Linux" ;;
            crunchbang) distro="CrunchBang" ;;   #  ◀━━
            gentoo) distro="Gentoo" ;;
            funtoo) distro="Funtoo" ;;
            slackware) distro="Slackware" ;;
            frugalware) distro="Frugalware" ;;
            peppermint) distro="Peppermint" ;;
            solusos) distro="SolusOS" ;;
            parabolagnu|parabolagnu/linux-libre) distro="ParabolaGNU/Linux-libre" ;;
            viperr) distro="Viperr" ;;
            linuxdeepin) distro="LinuxDeepin" ;;
            chakra) distro="Chakra" ;;
            mac*os*x) distro="Mac OS X" ;;
            fuduntu) distro="Fuduntu" ;;
            manjaro) distro="Manjaro" ;;
            cygwin) distro="Cygwin" ;;
        esac

XMonad detection broken again

I haven't ran screenfetch for a while but I did today and found that the WM detection is broken again. It currently doesn't show up at all.

The 7501a97 commit made it falsely report i3 as the WM. The 9e3ca6d commit makes it disappear all together (no string after WM:).

CentOS not detected

Thanks for this awesome script, I discovered today :)
I tried it on my server centos and I see that the distro is not recognized.

Can I help you in some way?

Lacking $

Line 1443 needs to contain $themeNumber and not just themeNumber

CPU Name Reported Incorrectonly on SPARC

When run on a Sunfire V480 the CPU is incorrectly reported as an "IBM PowerPC G3 TI UltraSparc III+ (Cheetah+). The correct reading shouldn't include "IBM PowerPC G3."

screenfetch-sparcerror

commented out .gtkrc-2.0 entries appear with active ones

Actual output:

         _,met$$$$$gg.           calvin@fulcrum
      ,g$$$$$$$$$$$$$$$P.        OS: Debian 7.0 wheezy
    ,g$$P""       """Y$$.".      Kernel: x86_64 Linux 3.2.0-4-amd64
   ,$$P'              `$$$.      Uptime: 8h 11m
  ',$$P       ,ggs.     `$$b:    Packages: 1599
  `d$$'     ,$P"'   .    $$$     Shell: bash 4.2.37
   $$P      d$'     ,    $$P     Resolution: 1680x1050
   $$:      $$.   -    ,d$$'     WM: i3
   $$\;      Y$b._   _,d$P'      GTK2 Theme: Monarch
MurrinaFancyCandy
   Y$$.    `.`"Y$$$$P"'          Icon Theme: Tango
gnome-human
   `$$b      "-.__               Font: Terminus 10
DejaVu Sans Condensed 9
    `Y$$                         CPU: Intel Pentium D CPU 3.00GHz @ 3GHz
     `Y$$.                       RAM: 539MB / 1002MB
      `$$b.                    
       `Y$$b.                 
        `"Y$b._             
            `""""

GTKRC:

#gtk-theme-name="Monarch"
#gtk-icon-theme-name="Tango"
gtk-theme-name="MurrinaFancyCandy"
gtk-icon-theme-name="gnome-human"
#gtk-font-name="Terminus 10"
#gtk-font-name="DejaVu Sans Condensed 9"

Detecting CPU speed (possible solution)

System Info:

                          ./+o+-
                  yyyyy- -yyyyyy+      chad@M4A79XTD-EVO
               ://+//////-yyyyyyo      OS: Ubuntu 13.04 raring
           .++ .:/++++++/-.+sss/`      Kernel: x86_64 Linux 3.9.0-030900-generic
         .:++o:  /++++++++/:--:/-      Uptime: 7h 38m
        o:+o+:++.`..```.-/oo+++++/     Packages: 1814
       .:+o:+o/.          `+sssoo+/    Shell: bash 4.2.45
  .++/+:+oo+o:`             /sssooo.   Resolution: 1920x1080
 /+++//+:`oo+o               /::--:.   DE: XFCE4
 \+/+o+++`o++o               ++////.   WM: Xfwm4
  .++.o+++oo+:`             /dddhhh.   WM Theme: Albatross
       .+.o+oo:.          `oddhhhh+    GTK2 Theme: Albatross
        \+.++o+o``-````.:ohdhhhhh+     Icon Theme: elementary-xfce-dark
         `:o+++ `ohhhhhhhhyo++os:      Font: Droid Sans 10
           .o:`.syhhhhhhh/.oo++o`      CPU: AMD Phenom II X4 965 @ 3.7GHz
               /osyyyyyyo++ooo+++/     RAM: 1592MB / 12017MB
                   ````` +oo+++o\:    
                          `oo++.

Before:

    # cpu_mhz=$(awk -F':' '/cpu MHz/{ print $2 }' /proc/cpuinfo | head -n 1)
    # cpu_ghz=$(echo "scale=2; ${cpu_mhz} / 1000" | bc )

After:

    loc="/sys/devices/system/cpu/cpu0/cpufreq"
    if [ -f $loc/bios_limit ];then
        cpu_mhz=$(cat $loc/bios_limit | awk '{print $1/1000}')
    elif [ -f $loc/scaling_max_freq ];then
        cpu_mhz=$(cat $loc/scaling_max_freq | awk '{print $1/1000}')
    fi
    if [ -n "$cpu_mhz" ];then
        cpu_ghz=$(echo $cpu_mhz | awk '{print $1/1000}')
    fi

Now if i can just figure out how to get it to show @ 3.7GHz in the output
EDIT:
You will need some if conditions to determine if cpu speed was detected and if it is under 1Ghz so it would be to be in MHz
Before:

        if [[ "${display[@]}" =~ "cpu" ]]; then mycpu=$(echo -e "$labelcolor CPU:$textcolor $cpu"); out_array=( "${out_array[@]}" "$mycpu" ); ((display_index++)); fi

After:

        if [[ "${display[@]}" =~ "cpu" ]]; then mycpu=$(echo -e "$labelcolor CPU:$textcolor $cpu"); out_array=( "${out_array[@]}" "$mycpu @ $cpu_ghz""GHz" ); ((display_index++)); fi

EDIT:
also noticed you strip out the (TM) text on the CPU name, the text on my cpu is lower case
Before:

else cpu=$(awk 'BEGIN{FS=":"} /model name/ { gsub(/  +/," ",$2); gsub(/^ /,"",$2); gsub(/\(R\)|\(TM\)/,"",$2); print $2; exit }' /proc/cpuinfo); fi

After:

else cpu=$(awk 'BEGIN{FS=":"} /model name/ { gsub(/  +/," ",$2); gsub(/^ /,"",$2); gsub(/\(R\)|\(TM\)|\(tm\)/,"",$2); print $2; exit }' /proc/cpuinfo); fi

After (Mod):

else cpu=$(awk 'BEGIN{FS=":"} /model name/ { gsub(/  +/," ",$2); gsub(/^ /,"",$2); gsub(/\(R\)|\(TM\)|\(tm\)| Processor/,"",$2); print $2; exit }' /proc/cpuinfo); fi

For Reference:

~$ cat /proc/cpuinfo | grep "model name" | head -1
model name  : AMD Phenom(tm) II X4 965 Processor

xprop errors

I get xprop errors on my box with X installed. Doesn't happen on my box with no X installed (fairly obviously).

It can also be seen on the attached image that screenfetch no longer detects my WM (xmonad) even though it used to (I should know, I was the one that fixed its detection few months back).

I was going to report this few days ago but GitHub went down while writing the report...

On both boxes, the newest revision is being used.
sfetch

GTK information line does not fit into 80x25 anymore.

With the change in af3ecdb the GTK information does not fit anymore into a 80x25 (Default) terminal. The line containing the GTK information will wrap around like this:

                          ./+o+-       robert@Dagon
                  yyyyy- -yyyyyy+      OS: Ubuntu 13.10 saucy
               ://+//////-yyyyyyo      Kernel: i686 Linux 3.11.0-18-generic
           .++ .:/++++++/-.+sss/`      Uptime: 1h 11m
         .:++o:  /++++++++/:--:/-      Packages: 2601
        o:+o+:++.`..```.-/oo+++++/     Shell: bash 4.2.45
       .:+o:+o/.          `+sssoo+/    Resolution: 3360x1080
  .++/+:+oo+o:`             /sssooo.   DE: MATE 1.6.0
 /+++//+:`oo+o               /::--:.   WM: Sawfish
 \+/+o+++`o++o               ++////.   WM Theme: mxflat
  .++.o+++oo+:`             /dddhhh.   GTK Theme: 'New Wave' [GTK2], 'New Wave'
[GTK3]
       .+.o+oo:.          `oddhhhh+    Icon Theme: Humanity-Dark
        \+.++o+o``-````.:ohdhhhhh+     Font: DejaVu Sans 8
         `:o+++ `ohhhhhhhhyo++os:      CPU: Intel Pentium CPU G620 @ 2.6GHz
           .o:`.syhhhhhhh/.oo++o`      GPU: GeForce GT 640
               /osyyyyyyo++ooo+++/     RAM: 928MB / 4017MB
                   ````` +oo+++o\:    
                          `oo++.      

Was that intended?

Needs to strip 'Processor' from cpu name

on line 740
cpu=$(echo "${cpu}" | sed 's/(\([Tt][Mm]\))//g;s/(\([Rr]\))//g;s/^ //g;s/ //g')
this line should be edited to remove " Processor"

~$ cat /proc/cpuinfo |grep 'model name' | head -1 | cut -d ':' -f 2
 AMD Phenom(tm) II X4 965 Processor

The word processor should not printed in the model name, as it is implied my the CPU label


Manpage

This is my help for this project.

.TH SCREENFETCH 1 "December 2013" "screenfetch v3.2.2" "The Bash Screenshot Information Tool"
.SH NAME
screenfetch - The Bash Screenshot Information Tool

.SH SYNOPSIS
\fBscreenfetch\fP [\fIflags\fP]

.SH DESCRIPTION
screenFetch is a "Bash Screenshot Information Tool". This handy Bash
script can be used to generate one of those nifty terminal theme
information + ASCII distribution logos you see in everyone's screenshots
nowadays. It will auto-detect your distribution and display an ASCII
version of that distribution's logo and some valuable information to the
right. There are options to specify no ascii art, colors, taking a
screenshot upon displaying info, and even customizing the screenshot
command! This script is very easy to add to and can easily be extended.

.SH OPTIONS
.TP
\fI-v\fP
Verbose output.
.TP
\fI-n\fP
Do no display ASCII distribution logo.
.TP
\fI-s\fP
Using this flag tells the script that you want it to take a screenshot.
.TP
\fI-l\fP
Specify that you have a light background. This turns all white text into dark gray text (in ascii logos and in information output).
.TP
\fI-c 'COMMAND'\fP
Here you can specify a custom screenshot command for the script to execute. Surrounding quotes are required.
.TP
\fI-D 'DISTRO'\fP
Here you can specify your distribution for the script to use. Surrounding quotes are required.
.TP
\fI-V\fP
Display current script version.
.TP
\fI-m\fP
Display this help.

.SH AUTHOR
screenFetch was originally written by Brett Bohnenkamper ([email protected])
If you would like to suggest something new, inform me of an issue in the
script, become part of the project, or talk to me about anything else,
you can either email me at kittykattATkittykattDOTus or you can connect
to my IRC server on SilverIRC at irc://kittykatt.silverirc.com/me0wz
.PP
This document is by Mad-Soft

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.