You are not logged in.

#26 2010-08-31 02:54:57

kittykatt
Member
From: Missouri, USA
Registered: 2009-11-04
Posts: 260
Website

Re: screenFetch - The Bash Screenshot Information Tool

Well then! Let's see, is there anything in #! Statler that sets it apart from Debian/Crunchbang? Some sort of /etc/ file or a unique lsb_release output?

And are you running any xfce apps? I found that running just xfce4-power-manager started the xfce4-settings-daemon and caused screenfetch to assume you were running XFCE. I need a little better DE detection. It's on my personal to-do list.

So what WM are you running? It obviously found the standard openbox config file and parsed it correctly to find some values.


- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -

Offline

#27 2010-08-31 15:28:11

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: screenFetch - The Bash Screenshot Information Tool

kittykatt wrote:

Well then! Let's see, is there anything in #! Statler that sets it apart from Debian/Crunchbang? Some sort of /etc/ file or a unique lsb_release output?

There are two flavours of #! being used today:

#! v9.04.01 - based on Ubuntu 9.04

#! v10 - based on Debian "Squeeze" and has the #! codename "Statler".

#! v10 also comes in two flavours: OpenBox and Xfce

I installed OpenBox, but yes there are Xfce programs in use.  like thunar for example but there is no DM here at all.

kittykatt wrote:

And are you running any xfce apps? I found that running just xfce4-power-manager started the xfce4-settings-daemon and caused screenfetch to assume you were running XFCE. I need a little better DE detection. It's on my personal to-do list.

Yes, and xfce libraries as well but no Xfce4 Desktop.  Xfce4-power-manager is installed.

kittykatt wrote:

So what WM are you running? It obviously found the standard openbox config file and parsed it correctly to find some values.

That's it: OpenBox nothing else.

Wish I could help more.

Last edited by Sector11 (2010-08-31 15:28:30)

Offline

#28 2010-09-01 15:14:50

kittykatt
Member
From: Missouri, USA
Registered: 2009-11-04
Posts: 260
Website

Re: screenFetch - The Bash Screenshot Information Tool

I'll have to look into those versions and flavors of #!. Is lsb_release installed by default?

If xfce4-power-manager is running, then so is xfce4-settings-daemon which will trigger screenfetch to think you are using XFCE. It's a problem I personally have had as well as I also run xfce4-power-manager. It's at the top of my list as of yesterday and will be fixed (hopefully!) by tonight. The problem really is there isn't much of a better way to detect DE besides looking at the process list, even though if you are running one XFCE app and not the entire DE, it spawns that process. Maybe I just haven't singled out the right process? I'll test some more when I get home.

EDIT:  I made a BUNCH of changes to screenFetch last night, including a couple of new features. I have a couple more things to add tonight and some testing to do before I push it. I'll list all of the changes and new features here once I release it.

Last edited by kittykatt (2010-09-01 17:15:05)


- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -

Offline

#29 2010-09-01 17:34:00

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: screenFetch - The Bash Screenshot Information Tool

kittykatt wrote:

I'll have to look into those versions and flavors of #!. Is lsb_release installed by default?

Maybe I just haven't singled out the right process? I'll test some more when I get home.

lsb-release ... v3.2-23.1 is installed. Note the - not the _

Here's a list of programs that are the result of: Search: xfce

  • exo-utils

  • gamin

  • libexo-0.3-0

  • libthunar-vfs-1-2

  • libxfce4util-bin

  • libxfce4util-common

  • libxfce4util4

  • libxfce4util4-4

  • libxfconf-0-2

  • lxappearance

  • orage

  • shared-mime-info

  • statler-themes

  • thunar

  • wbar

  • wicd

  • wicd-gtk

  • xfburn

  • xfce-keyboard-shortcuts

  • xfce4-mixer

  • xfce4-panel

  • xfce4-power-manager

  • xfce4-power-manager-data

Now, when it comes to stuff like this, I'm real green behind the ears, but I see that:

  • xfdesktop4

  • xfdesktop4-data

  • xfwm4

are not installed, and they look like they are all about the Xfce4 Desktop and the last the Xfce4 window manager

Offline

#30 2010-09-01 17:35:15

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: screenFetch - The Bash Screenshot Information Tool

kittykatt wrote:

EDIT:  I made a BUNCH of changes to screenFetch last night, including a couple of new features. I have a couple more things to add tonight and some testing to do before I push it. I'll list all of the changes and new features here once I release it.


And I'll be watching - I love testing things.  big_smile

Offline

#31 2010-09-05 10:08:50

kittykatt
Member
From: Missouri, USA
Registered: 2009-11-04
Posts: 260
Website

Re: screenFetch - The Bash Screenshot Information Tool

ALRIGHT! Time for a huuuuuuge update!

Version 2.1.4

CHANGELOG

v2.1.4
  - Added crapload of new features. Keep reading.
  - Added function to set script variables on commandline execution. (i.e. screenfetch-dev -o 'baseurl="http://www.example.com"') [ See screenshot example #1 ]
  - Added function to export theme if wanted upon execution. Currently only supports the following window managers:  PekWM, OpenBox, BlackBox, FluxBox, Metacity (kind of), Xfwm4 (kind of).
    This is a really big addition, and quite experimental. Things that are currently sought out and exported are the following:  GTK Theme Folder, Icon Theme Folder, WM Theme Folder, Background
    Image, and screenshot taken by screenfetch. If you would like anything else exported with this let me know and I'll see what I can do. [ See screenshot example #1 ]
  - Added function to upload screenshot taken to server you have ssh access on after info is displayed. MUST set baseurl, serveraddr, and serverdir variables for this to work. See -o flag. [ See Screenshot Example #1 ]
  - Added new support for detecting the following window managers:  Musca, i3, Ratpoison, wmii, Wmfs, ScrotWM, and Beryl.
  - Attempted to fix XFCE detection by limiting the processes that result in XFCE to only "xfce4-desktop". Dunno if this will work or not. Email me.
  - Added function to detect hostname and user. Displayed in info output. [ See Screenshot Example #1 ]
  - Added function to detect resolution. Displayed in info output. Untested, and possibly not working, on multiple monitor setups. Email me. [ See Screenshot Example #1 ]
  - Added function to detect working shell. Might also add function to detect terminal type in the future. [ See Screenshot Example #1 ]
  - Fixed bug in GNOME background output. Was outputing entire pathname. Now only outputs the filename of the image.
  - Replaced old Arch Linux logo with new updated one. Don't really like the new one, but it was popular demand. Old one is still available through -D with the 'Arch Linux - Old' argument for
    those of us that are old school. [ See Screenshot Example #1 ]

screenFetch-2010-09-05-v213test-1.thumb.png

Gimme some feedback! Whenever I'm on IRC at all, I'm always in #archlinux and #archlinux-offtopic and on SilverIRC.

The exporting was a feature requested by a few people and I thought it would be really cool to do. If someone knows exactly how to export a few of the other WM's themes, let me know. Also, if you can think of anything that could be easily exported and added to this, let me know.

EDIT:  Updated the AUR package. Now correctly displaying 2.1.3 as the most updated version.

EDIT:  Updated AUR PKDGBUILD again with version as 2.1.4 because I'm an idiot.

Last edited by kittykatt (2010-09-05 13:23:49)


- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -

Offline

#32 2010-09-05 13:28:37

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: screenFetch - The Bash Screenshot Information Tool

@kittykatt

Dumb question: Where is the update?  I don't see a link.

EDIT: Dumber edit - your sig!!  DUH!

Last edited by Sector11 (2010-09-05 13:29:32)

Offline

#33 2010-09-05 13:58:40

kittykatt
Member
From: Missouri, USA
Registered: 2009-11-04
Posts: 260
Website

Re: screenFetch - The Bash Screenshot Information Tool

Sector11 wrote:

@kittykatt

Dumb question: Where is the update?  I don't see a link.

EDIT: Dumber edit - your sig!!  DUH!

It's also in the AUR. tongue

screenfetch-git


- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -

Offline

#34 2010-09-05 14:15:18

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: screenFetch - The Bash Screenshot Information Tool

kittykatt wrote:
Sector11 wrote:

@kittykatt

Dumb question: Where is the update?  I don't see a link.

EDIT: Dumber edit - your sig!!  DUH!

It's also in the AUR. tongue

screenfetch-git

Yea, but being a #! user I'm still taking baby steps in the ARCH world.  smile

And here you go "screenfetch-dev" on #! Statler - OpenBox (Debian)

  11:01 ~
         $ screenfetch-dev
         _,met$$$$$gg.
      ,g$$$$$$$$$$$$$$$P.
    ,g$$P""       """Y$$.".       sector11@sector11
   ,$$P'              `$$$.       OS: Debian x86_64
  ',$$P       ,ggs.     `$$b:     Kernel: 2.6.32-5-amd64
  `d$$'     ,$P"\'   .    $$$     Uptime: 47m
   $$P      d$\'     ,    $$P     Shell: bash
   $$:      $$.   -    ,d$$'      Resolution: 1280x1024
   $$\;      Y$b._   _,d$P'       DE: Not Present
   Y$$.    `.`"Y$$$$P"'           WM: OpenBox
   `$$b      "-.__                WM Theme: S11-OB3-A2
    `Y$$                          GTK Theme: S11-OB3-StatlerBox
     `Y$$.                        Icon Theme: ACYL_Icon_Theme_0.8.2
       `$$b.                      Font: Monospace 9
         `Y$$b.                  
            `"Y$b._
                `""""

  11:01 ~
         $ 

and everything is right on, except for the #! logo.  "Archey" gets that, maybe time to talk to the developer of archey to see what he is looking for.  And pass on the tip of looking for "xfce-desktop" to clean up that area.

Offline

#35 2010-09-05 15:59:09

kittykatt
Member
From: Missouri, USA
Registered: 2009-11-04
Posts: 260
Website

Re: screenFetch - The Bash Screenshot Information Tool

I totally forgot to fix that. Sorry 'bout that!

Please redownload/reinstall, I added a couple of lines that should detect your lsb-release output as Crunchbang now.


- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -

Offline

#36 2010-09-05 17:56:32

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: screenFetch - The Bash Screenshot Information Tool

kittykatt wrote:

I totally forgot to fix that. Sorry 'bout that!

Please redownload/reinstall, I added a couple of lines that should detect your lsb-release output as Crunchbang now.

Not yet... sorry, doesn't matter, it has a switch  big_smile

  14:55 ~
         $ screenfetch-dev
         _,met$$$$$gg.
      ,g$$$$$$$$$$$$$$$P.
    ,g$$P""       """Y$$.".       sector11@sector11
   ,$$P'              `$$$.       OS: Debian x86_64
  ',$$P       ,ggs.     `$$b:     Kernel: 2.6.32-5-amd64
  `d$$'     ,$P"\'   .    $$$     Uptime: 4h 40m
   $$P      d$\'     ,    $$P     Shell: bash
   $$:      $$.   -    ,d$$'      Resolution: 1280x1024
   $$\;      Y$b._   _,d$P'       DE: Not Present
   Y$$.    `.`"Y$$$$P"'           WM: OpenBox
   `$$b      "-.__                WM Theme: S11-OB3-A2
    `Y$$                          GTK Theme: S11-OB3-StatlerBox
     `Y$$.                        Icon Theme: ACYL_Icon_Theme_0.8.2
       `$$b.                      Font: Monospace 9
         `Y$$b.                  
            `"Y$b._
                `""""

  14:55 ~
         $ screenfetch-dev -D 'Crunchbang'
/home/sector11/bin/screenfetch-dev: line 626: \e[1;30m: command not found
                ___       ___      _
               /  /      /  /     | |  sector11@sector11
              /  /      /  /      | |  OS: Crunchbang x86_64
             /  /      /  /       | |  Kernel: 2.6.32-5-amd64
     _______/  /______/  /______  | |  Uptime: 4h 40m
    /______   _______   _______/  | |  Shell: bash
          /  /      /  /          | |  Resolution: 1280x1024
         /  /      /  /           | |  DE: Not Present
        /  /      /  /            | |  WM: OpenBox
 ______/  /______/  /______       | |  WM Theme: S11-OB3-A2
/_____   _______   _______/       | |  GTK Theme: S11-OB3-StatlerBox
     /  /      /  /               |_|  Icon Theme: ACYL_Icon_Theme_0.8.2
    /  /      /  /                 _   Font: Monospace 9
   /  /      /  /                 | | 
  /__/      /__/                  |_|

  14:55 ~
         $ 

Offline

#37 2010-09-05 18:44:57

kittykatt
Member
From: Missouri, USA
Registered: 2009-11-04
Posts: 260
Website

Re: screenFetch - The Bash Screenshot Information Tool

Yeah, but you shouldn't need to do that everytime and this needs to be fixed anyways.

I added in a couple lines to the Debian detection to see if lsb-release existed and if lsb-release -i contained the string "Crunchbang", it would turn up as Crunchbang. Please test again. Are you on IRC, by the way? Doing tests and revisions like this in rapid fashion is really hard via forums. xD


- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -

Offline

#38 2010-09-18 05:10:48

kittykatt
Member
From: Missouri, USA
Registered: 2009-11-04
Posts: 260
Website

Re: screenFetch - The Bash Screenshot Information Tool

Version 2.1.5 is out now!

screenfetch now supports detecting multiple monitors' resolutions and a couple more WM's. big_smile


- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -

Offline

#39 2010-09-18 05:48:06

clio
Member
From: Göteborg
Registered: 2009-07-16
Posts: 15

Re: screenFetch - The Bash Screenshot Information Tool

very nice tool thanks smile

Offline

#40 2010-10-07 14:21:18

kittykatt
Member
From: Missouri, USA
Registered: 2009-11-04
Posts: 260
Website

Re: screenFetch - The Bash Screenshot Information Tool

Question to all users and non-uses of screenFetch:

Is there a demand for system information in your screenshot?

I've noticed that tools like Archey and screenfo are more in use than screenFetch and that they both output system info like memory, processor usage, packages installed, etc. I never went about integrating stats like that into screenFetch because I thought that theme information about the screenshot ITSELF would be more useful. Was I wrong and are the system stats more in demand than the actual theme information? This question's been dragging at my mind for a while now.

clio wrote:

very nice tool thanks smile

And thanks. I'm glad you like it. big_smile


EDIT: I also fixed screenfetch-git's version numbering in the AUR. Before, the local version would show up as '20101007-1' because it was changing the $pkgver to the date of the last git commit when installing. I've uploaded a new PKGBUILD that fixes that so it should now reflect, if you have just updated, that it is version 2.1.5-2 that is installed. big_smile Feel free to have a look at the PKGBUILD and tell me if I'm doing it wrong. tongue

Last edited by kittykatt (2010-10-07 14:34:01)


- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -

Offline

#41 2010-10-07 15:20:03

igndenok
Member
From: Sidoarjo, Indonesia
Registered: 2010-06-07
Posts: 160

Re: screenFetch - The Bash Screenshot Information Tool

Some problem here.
1. I have .fehbg, but I use xsetroot to set my background and screenfetch detect my BG from .fehbg
2. Take a look my screenshot. (with .fehbg deleted)

My .gtkrc-2.0

# -- THEME AUTO-WRITTEN DO NOT EDIT
include "/usr/share/themes/Clearlooks/gtk-2.0/gtkrc"

style "user-font" {
    font_name = "Sans 8"
}

widget_class "*" style "user-font"

gtk-font-name="Sans 8"

include "/home/igndenok/.gtkrc.mine"

# -- THEME AUTO-WRITTEN DO NOT EDIT

And my .gtkrc.mine

# User config
gtk-icon-theme-name   = "elementary"

#gtk-toolbar-style     = GTK_TOOLBAR_ICONS
#gtk-toolbar-style     = GTK_TOOLBAR_TEXT
#gtk-toolbar-style     = GTK_TOOLBAR_BOTH
gtk-toolbar-style     = GTK_TOOLBAR_BOTH_HORIZ

Btw, It's a nice tool smile


Ask, and it shall be given you.
Seek, and ye shall find.
Knock, and it shall be opened unto you.

Offline

#42 2010-10-07 18:48:36

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: screenFetch - The Bash Screenshot Information Tool

kittykatt wrote:

Question to all users and non-uses of screenFetch:

Is there a demand for system information in your screenshot?

Actually - I use both.  ScreenFetch  doesn't "fetch" my screen, but I like the info, even if the logo is messed up.

  15:31 ~
         $ screenfetch
:: Finding distro...found as 'Debian'
:: Finding kernel version...found as '2.6.32-5-amd64'
:: Finding current uptime...found as '5h 5m'
/home/sector11/bin/screenfetch: line 181: xfce4-settings-manager: command not found
:: Finding desktop environment...found as 'XFCE'
:: Finding window manager...found as 'OpenBox'
:: Finding window manager theme...found as 'S11-OB3-A2'
:: Finding GTK theme...found as 'Shiki-Statler'
:: Finding icon theme...found as 'gnome-colors-statler'
:: Finding user font...found as 'Monospace 9'
:: Finding width of terminal...found as '80'
  _,met$$$$$gg.
  ,g$$$$$$$$$$$$$$$P.
  ,g$$P"" """Y$$.".
  ,$$P' `$$$.  OS: Debian x86_64 <-- should be --> CrunchBang 10 x86_64
 ',$$P ,ggs. `$$b:  Kernel: 2.6.32-5-amd64
 `d$$' ,$P"\' . $$$  Uptime: 5h 5m
  $$P d$\' , $$P  DE: XFCE <-- should be --> none
  $$: $$. - ,d$$'  WM: OpenBox
  $$\; Y$b._ _,d$P'  WM Theme: S11-OB3-A2 <-- should be --> S11-Window
  Y$$. `.`"Y$$$$P"'  GTK Theme: <-- should be -->S11-OB3-A2
  `$$b "-.__  Icon Theme: gnome-colors-statler <-- should be --> AnyColourYouLike
  `Y$$  Font: Monospace 9
  `Y$$. 
  `$$b.
  `Y$$b.
  `"Y$b._
  `""""

  15:31 ~
         $ archey
                               
                ___       ___      _  OS: CrunchBang 10 x86_64
               /  /      /  /     | | Hostname: sector11
              /  /      /  /      | | Kernel: 2.6.32-5-amd64
             /  /      /  /       | | Uptime: 5:05
     _______/  /______/  /______  | | Window Manager: Openbox
    /______   _______   _______/  | | Desktop Environment: Xfce
          /  /      /  /          | | Packages: 1163
         /  /      /  /           | | RAM: 390 MB / 2013 MB
        /  /      /  /            | | CPU: AMD Athlon(tm) 64 Processor 3500+
 ______/  /______/  /______       | | Shell: Bash
/_____   _______   _______/       | | Terminal: Xterm
     /  /      /  /               | | Root FS: 3.7G / 19G (ext3)
    /  /      /  /                |_| Home FS: 3.9G / 37G (ext3)
   /  /      /  /                  _  5 FS: 6.4G / 57G (ext3)
  /  /      /  /                  | | 6 FS: 180M / 57G (ext3) 
 /__/      /__/                   |_| 7 FS: 3.0G / 59G (ext3)
                                      
                                      


  15:31 ~
         $ 

Even though they both say I am using DE: Xfce  which should be DE: None

And ScreenFetch isn't 100% compatable with #!, it was never meant to be and as #! v10 is based on Debian it's not "wrong" in that aspect either.

what is screenfo?

Offline

#43 2010-10-07 21:01:56

Erus_Iluvatar
Member
Registered: 2010-04-01
Posts: 102

Re: screenFetch - The Bash Screenshot Information Tool

Here is a quick patch to have screenfetch working if you have an X running but you are in a tty :

--- /usr/bin/screenfetch    2010-10-07 22:56:39.000000000 +0200
+++ screenfetch    2010-10-07 22:59:23.951925434 +0200
@@ -259,7 +259,7 @@

 # Resolution Detection - Begin
 detectres () {
-  if [[ `ps ax | grep bin/X` ]]; then
+  if [[ -n $DISPLAY ]]; then
     old_IFS=$IFS      # save the field separator
     IFS=$'\n'     # new field separator, the end of line
     for line in $(xdpyinfo | grep dim)

Btw, here is an other patch to use only sed and get rid of your "space problem".

--- /usr/bin/screenfetch    2010-10-07 22:56:39.000000000 +0200
+++ screenfetch    2010-10-07 23:24:43.058744908 +0200
@@ -259,19 +259,8 @@

 # Resolution Detection - Begin
 detectres () {
-  if [[ `ps ax | grep bin/X` ]]; then
-    old_IFS=$IFS      # save the field separator
-    IFS=$'\n'     # new field separator, the end of line
-    for line in $(xdpyinfo | grep dim)
-    do
-      if [ "$xResolution" ]; then
-        xSingleres=$(echo "$line" | awk '/  dimensions:  /{print $2}' | sed 's/^ //')
-        xResolution=$(echo "$xResolution $xSingleres")
-      else
-        xResolution=$(echo "$line" | awk '/  dimensions:  /{print $2}' | sed 's/^ //')
-      fi
-    done
-    IFS=$old_IFS     # restore default field separator
+  if [[ -n $DISPLAY ]]; then
+        xResolution=$(xdpyinfo | sed -n 's/.*dim.* \([0-9]*x[0-9]*\) .*/\1/pg' | sed ':a;N;$!ba;s/\n/ /g')
   else
     xResolution="Not Found"
   fi
@@ -833,7 +822,7 @@
   kernel="$labelcolor Kernel:$textcolor $kernel"
   uptime="$labelcolor Uptime:$textcolor $uptime"
   myShell="$labelcolor Shell:$textcolor $myShell"
-  xResolution="$labelcolor Resolution:${textcolor}${xResolution}"
+  xResolution="$labelcolor Resolution:${textcolor} $xResolution"
   DE="$labelcolor DE:$textcolor $DE"
   WM="$labelcolor WM:$textcolor $WM"
   WM_theme="$labelcolor WM Theme:$textcolor $Win_theme"

This should work, please tell me if something is wrong with more than one screen.

Last edited by Erus_Iluvatar (2010-10-07 21:25:48)


I'm french, don't mind my mistakes in english.

Offline

#44 2010-10-07 22:06:08

kittykatt
Member
From: Missouri, USA
Registered: 2009-11-04
Posts: 260
Website

Re: screenFetch - The Bash Screenshot Information Tool

Thanks for all the feedback, guys! big_smile

@igndenok:  I'll look into that problem and try to fix both of your issues. big_smile

@Sector11:   I still don't know why your logo is all messed up. Doesn't really make much sense to me. I tested out my terminal with Monospace as my font and it still comes up fine for me. Have you updated to v2.1.5? I should have fixed the XFCE error in that one. If not, I'll have to look it over again.

@Erus_Iluvatar:  Thanks for the patches. I'll implement them as soon as I can and release a new version. big_smile

Last edited by kittykatt (2010-10-07 22:08:18)


- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -

Offline

#45 2010-10-08 00:31:29

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: screenFetch - The Bash Screenshot Information Tool

kittykatt wrote:

Thanks for all the feedback, guys! big_smile

@Sector11:   I still don't know why your logo is all messed up. Doesn't really make much sense to me. I tested out my terminal with Monospace as my font and it still comes up fine for me. Have you updated to v2.1.5? I should have fixed the XFCE error in that one. If not, I'll have to look it over again.

Feedback is my middle name ... SUCCESS is your suggestion; time to delete: screenfetch and rename screenfetch-dev

  21:22 ~
         $ screenfetch
:: Finding distro...found as 'Debian'
:: Finding kernel version...found as '2.6.32-5-amd64'
:: Finding current uptime...found as '10h 57m'
/home/sector11/bin/screenfetch: line 181: xfce4-settings-manager: command not found
:: Finding desktop environment...found as 'XFCE'
:: Finding window manager...found as 'OpenBox'
:: Finding window manager theme...found as 'S11-OB3-A2'
:: Finding GTK theme...found as 'Shiki-Statler'
:: Finding icon theme...found as 'gnome-colors-statler'
:: Finding user font...found as 'Monospace 9'
:: Finding width of terminal...found as '80'
  _,met$$$$$gg.
  ,g$$$$$$$$$$$$$$$P.
  ,g$$P"" """Y$$.".
  ,$$P' `$$$.  OS: Debian x86_64
 ',$$P ,ggs. `$$b:  Kernel: 2.6.32-5-amd64
 `d$$' ,$P"\' . $$$  Uptime: 10h 57m
  $$P d$\' , $$P  DE: XFCE
  $$: $$. - ,d$$'  WM: OpenBox
  $$\; Y$b._ _,d$P'  WM Theme: S11-OB3-A2
  Y$$. `.`"Y$$$$P"'  GTK Theme: Shiki-Statler
  `$$b "-.__  Icon Theme: gnome-colors-statler
  `Y$$  Font: Monospace 9
  `Y$$. 
  `$$b.
  `Y$$b.
  `"Y$b._
  `""""

  21:23 ~
         $ screenfetch-dev
         _,met$$$$$gg.
      ,g$$$$$$$$$$$$$$$P.
    ,g$$P""       """Y$$.".       sector11@sector11
   ,$$P'              `$$$.       OS: Debian x86_64
  ',$$P       ,ggs.     `$$b:     Kernel: 2.6.32-5-amd64
  `d$$'     ,$P"\'   .    $$$     Uptime: 10h 57m
   $$P      d$\'     ,    $$P     Shell: bash
   $$:      $$.   -    ,d$$'      Resolution: 1280x1024
   $$\;      Y$b._   _,d$P'       DE: Not Present
   Y$$.    `.`"Y$$$$P"'           WM: OpenBox
   `$$b      "-.__                WM Theme: S11-OB3-A2
    `Y$$                          GTK Theme: S11-Window
     `Y$$.                        Icon Theme: ACYL_Icon_Theme_0.8.2
       `$$b.                      Font: Monospace 9
         `Y$$b.                  
            `"Y$b._
                `""""

  21:23 ~
         $ 

The way I see it archey and screenfetch compliment each other.
Am I missing something with screenfetch - is it supposed to take a screenshot?

Thanks for this I like them both

Offline

#46 2010-10-08 00:39:40

kittykatt
Member
From: Missouri, USA
Registered: 2009-11-04
Posts: 260
Website

Re: screenFetch - The Bash Screenshot Information Tool

Sector11 wrote:

Am I missing something with screenfetch - is it supposed to take a screenshot?

First of all, I'm glad to see your logo rendering correct now. And second of all, screenfetch CAN take a screenshot for you, if you have scrot installed, via the the -s flag.

Also, I'm pushing to my git repository within the next 10 minutes some changes I've made to screenfetch, one of which should make your Crunchbang detection work. tongue

EDIT:  Updated to v2.1.7!

  • Added lsb_release support and distribution release support via LSB

  • Added suggested patches. All functions seem to still work correctly.

  • Shortened all "Linux Mint" instances to "Mint" to save horizontal space.

Last edited by kittykatt (2010-10-08 00:55:10)


- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -

Offline

#47 2010-10-08 10:32:50

Erus_Iluvatar
Member
Registered: 2010-04-01
Posts: 102

Re: screenFetch - The Bash Screenshot Information Tool

Here is another patch, to remove all $HOME/.config and use $XDG_CONFIG_DIR :

--- /usr/bin/screenfetch    2010-10-08 12:22:19.000000000 +0200
+++ ./screenfetch    2010-10-08 12:25:32.237681369 +0200
@@ -333,17 +333,17 @@
   Win_theme="Not Found"
   case $WM in
     'PekWM') if [ -f $HOME/.pekwm/config ]; then Win_theme=$(awk -F"/" '/Theme/ {gsub(/\"/,""); print $NF}' $HOME/.pekwm/config); fi;;
-    'OpenBox') if [ -f $HOME/.config/openbox/rc.xml ]; then Win_theme=$(awk -F"[<,>]" '/<theme/ { getline; print $3 }' $HOME/.config/openbox/rc.xml); elif [ -f $HOME/.config/openbox/lxde-rc.xml ]; then Win_theme=$(awk -F"[<,>]" '/<theme/ { getline; print $3 }' $HOME/.config/openbox/lxde-rc.xml); fi;;
+    'OpenBox') if [ -f $XDG_CONFIG_HOME/openbox/rc.xml ]; then Win_theme=$(awk -F"[<,>]" '/<theme/ { getline; print $3 }' $XDG_CONFIG_HOME/openbox/rc.xml); elif [ -f $XDG_CONFIG_HOME/openbox/lxde-rc.xml ]; then Win_theme=$(awk -F"[<,>]" '/<theme/ { getline; print $3 }' $XDG_CONFIG_HOME/openbox/lxde-rc.xml); fi;;
     'FluxBox') if [ -f $HOME/.fluxbox/init ]; then Win_theme=$(awk -F"/" '/styleFile/ {print $NF}' $HOME/.fluxbox/init); fi;;
     'BlackBox') if [ -f $HOME/.blackboxrc ]; then Win_theme=$(awk -F"/" '/styleFile/ {print $NF}' $HOME/.blackboxrc); fi;;
     'Metacity') if [ `gconftool-2 -g /apps/metacity/general/theme` ]; then Win_theme=$(gconftool-2 -g /apps/metacity/general/theme); fi;;
-    'Xfwm4') if [ -f $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml ]; then Win_theme=$(xfconf-query -c xfwm4 -p /general/theme); fi;;
+    'Xfwm4') if [ -f $XDG_CONFIG_HOME/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 }' $HOME/.config/openbox/rc.xml); fi;;
+    'KWin') if [ -f $HOME/.kde/share/config/kwinrc ]; then Win_theme=$(awk -F"[<,>]" '/<theme/ { getline; print $3 }' $XDG_CONFIG_HOME/openbox/rc.xml); 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";;
-    'Awesome') if [ -f $HOME/.config/awesome/rc.lua ]; then Win_theme=$(grep -e '^[^-].*\(theme\|beautiful\).*lua' $HOME/.config/awesome/rc.lua | grep '[a-zA-Z0-9]\+/[a-zA-Z0-9]\+.lua' -o | cut -d'/' -f1); fi;;
+    'Awesome') if [ -f $XDG_CONFIG_HOME/awesome/rc.lua ]; then Win_theme=$(grep -e '^[^-].*\(theme\|beautiful\).*lua' $XDG_CONFIG_HOME/awesome/rc.lua | grep '[a-zA-Z0-9]\+/[a-zA-Z0-9]\+.lua' -o | cut -d'/' -f1); fi;;
     'WindowMaker') Win_theme="Not Present";;
     'Compiz') if $(grep -iA 1 'gtk_theme' $HOME/.gconf/desktop/gnome/interface/%gconf.xml | grep -i 'stringvalue' | awk -F\> '{print $2}' | awk -F\< '{print Hola}'); then Win_theme=$(gconftool-2 -g /apps/metacity/general/theme); fi;;
     'XMonad') Win_theme="Not Present";;
@@ -433,17 +433,17 @@
           gtkFont=$(awk -F'"' '/gtk-font-name/ {print $2}' $HOME/.gtkrc-2.0)
       fi
     # LXDE
-    elif [ -f $HOME/.config/lxde/config ]; then
-      if grep -q "sNet\/ThemeName" $HOME/.config/lxde/config; then 
-         gtkTheme=$(awk -F'=' '/sNet\/ThemeName/ {print $2}' $HOME/.config/lxde/config)
+    elif [ -f $XDG_CONFIG_HOME/lxde/config ]; then
+      if grep -q "sNet\/ThemeName" $XDG_CONFIG_HOME/lxde/config; then 
+         gtkTheme=$(awk -F'=' '/sNet\/ThemeName/ {print $2}' $XDG_CONFIG_HOME/lxde/config)
       fi
 
-      if [[ "$display" =~ "Icons" ]] && grep -q IconThemeName $HOME/.config/lxde/config; then
-          gtkIcons=$(awk -F'=' '/sNet\/IconThemeName/ {print $2}' $HOME/.config/lxde/config)
+      if [[ "$display" =~ "Icons" ]] && grep -q IconThemeName $XDG_CONFIG_HOME/lxde/config; then
+          gtkIcons=$(awk -F'=' '/sNet\/IconThemeName/ {print $2}' $XDG_CONFIG_HOME/lxde/config)
       fi
 
-      if [[ "$display" =~ "Font" ]] && grep -q FontName $HOME/.config/lxde/config; then
-          gtkFont=$(awk -F'=' '/sGtk\/FontName/ {print $2}' $HOME/.config/lxde/config)
+      if [[ "$display" =~ "Font" ]] && grep -q FontName $XDG_CONFIG_HOME/lxde/config; then
+          gtkFont=$(awk -F'=' '/sGtk\/FontName/ {print $2}' $XDG_CONFIG_HOME/lxde/config)
       fi
     fi
     # $HOME/.gtkrc.mine theme detect only
@@ -456,8 +456,8 @@
       fi
     fi
     # ROX-Filer icon detect only
-    if [ -a $HOME/.config/rox.sourceforge.net/ROX-Filer/Options ]; then
-      gtkIcons=$(awk -F'[>,<]' '/icon_theme/ {print $3}' $HOME/.config/rox.sourceforge.net/ROX-Filer/Options)
+    if [ -a $XDG_CONFIG_HOME/rox.sourceforge.net/ROX-Filer/Options ]; then
+      gtkIcons=$(awk -F'[>,<]' '/icon_theme/ {print $3}' $XDG_CONFIG_HOME/rox.sourceforge.net/ROX-Filer/Options)
     fi
     # Background Detection (feh, nitrogen)
     if [[ "$display" =~ "Background" ]]; then

And I suggest you to use

awk -F"'" '/feh --bg/{print $2}' $HOME/.fehbg

for your background detection, since not only --bg-scale can be used to set a background, but also --bg-center, --bg-fill, --bg-seamless, and --bg-tile.

Btw, bug with uptime :

$ ./screenfetch -v
:: Finding hostname and user...found as 'erus@toshiba'
:: Finding distro...found as 'Arch Linux '
:: Finding kernel version...found as '2.6.33-ARCH'
:: Finding current uptime...found as '48m'
:: Finding current shell...found as 'zsh'
:: Finding current resolution(s)...found as '2720x1024'
:: Finding desktop environment...found as 'Not Present'
:: Finding window manager...found as 'WMFS'
:: Finding window manager theme...found as 'Not Present'
:: Finding GTK theme...found as 'Minimum Black Suite'
:: Finding icon theme...found as 'ALLBLACK'
:: Finding user font...found as 'snap 8'
:: Finding background...found as 'conky.png'
                   -`
                  .o+`
                 `ooo/
                `+oooo:               erus@toshiba
               `+oooooo:              OS: Arch Linux x86_64
               -+oooooo+:             Kernel: 2.6.33-ARCH
             `/:-:++oooo+:            Uptime: 48m
            `/++++/+++++++:           Shell: zsh
           `/++++++++++++++:          Resolution: 2720x1024
          `/+++ooooooooooooo/`        DE: Not Present
         ./ooosssso++osssssso+`       WM: WMFS
        .oossssso-````/ossssss+`      WM Theme: Not Present
       -osssssso.      :ssssssso.     GTK Theme: Minimum Black Suite
      :osssssss/        osssso+++.    Icon Theme: ALLBLACK
     /ossssssss/        +ssssooo/-    Font: snap 8
   `/ossssso+/:-        -:/+osssso+-  BG: conky.png
  `+sso+:-`                 `.-/+oso:
 `++:.                           `-/+/
 .`                                 `/
$ uptime
 13:25:21 up 3 days, 48 min,  1 user,  load average: 0.02, 0.07, 0.09
$ cat /proc/uptime
262123.79 470062.59

Would have done the uptime part that way :

  uptime=`cut -d ' ' -f 1 /proc/uptime | cut -d '.' -f 1`
  days=$(($uptime / 60 / 60 / 24))
  hours=$(($uptime / 60 / 60))
  hours=$(($hours-($days*24)))
  mins=$(($uptime / 60))
  mins=$(($mins-($days*24*60)-($hours*60)))
  secs=$uptime
  secs=$(($secs-($days*24*60)-($hours*60*60)-($mins*60)))
  if [ "$days" = 0 ] ; then
      days=''
  else
      days="${days}d "
  fi
  if [ "$hours" = 0 ] ; then
      hours=''
  else
      hours="${hours}h "
  fi
  if [ "$mins" = 0 ] ; then
      mins=''
  else
      mins="${mins}m "
  fi
  if [ "$secs" = 0 -o "$mins" > 0 ] ; then
      secs=''
  else
      secs="${secs}s "
  fi
  uptime="$days$hours$mins$secs"

Looks uggly, but has a clean output.

Last edited by Erus_Iluvatar (2010-10-08 11:42:59)


I'm french, don't mind my mistakes in english.

Offline

#48 2010-10-08 14:26:31

kittykatt
Member
From: Missouri, USA
Registered: 2009-11-04
Posts: 260
Website

Re: screenFetch - The Bash Screenshot Information Tool

Thanks for the patches, I'll look 'em over and add them tonight. ^^;


- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -

Offline

#49 2010-10-08 15:24:41

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: screenFetch - The Bash Screenshot Information Tool

kittykatt wrote:
Sector11 wrote:

Am I missing something with screenfetch - is it supposed to take a screenshot?

First of all, I'm glad to see your logo rendering correct now. And second of all, screenfetch CAN take a screenshot for you, if you have scrot installed, via the the -s flag.

Also, I'm pushing to my git repository within the next 10 minutes some changes I've made to screenfetch, one of which should make your Crunchbang detection work. tongue

EDIT:  Updated to v2.1.7!

  • Added lsb_release support and distribution release support via LSB

  • Added suggested patches. All functions seem to still work correctly.

  • Shortened all "Linux Mint" instances to "Mint" to save horizontal space.

Yes, works vey well, I'll have to try the new update as well.

5da32b101193068.jpg

EDIT: But there is always something! .D

30da46101194486.jpg

I think I'll keep em both. Now if I could "Fudge-it" (fake it)  and have the New Version with TUX use:

OS: Sector11-v0.2_x86_64

... don't mind me I'm just kidding ya.  big_smile

Last edited by Sector11 (2010-10-08 15:36:39)

Offline

#50 2010-10-08 15:47:01

kmason
Member
From: Tempe, Arizona, USA
Registered: 2010-03-23
Posts: 245
Website

Re: screenFetch - The Bash Screenshot Information Tool

kittykatt wrote:

Question to all users and non-uses of screenFetch:

Is there a demand for system information in your screenshot?

I've noticed that tools like Archey and screenfo are more in use than screenFetch and that they both output system info like memory, processor usage, packages installed, etc. I never went about integrating stats like that into screenFetch because I thought that theme information about the screenshot ITSELF would be more useful. Was I wrong and are the system stats more in demand than the actual theme information? This question's been dragging at my mind for a while now.

Definitely.  I'd love to see this.  I also have a question:  for my custom build of ArchLinux (you've seen the thread about it), what part of the system would I tweak to make it possible for you or someone to make an addition to the code of screenFetch to detect that it isn't just ArchLinux, and instead my custom build, outputting a custom logo as well?  I'm actually thinking about including this in the upcoming livecd that I am making, and this addition would make it that much better.


Current WM Setup: PekWM with stalonetray/conky piped to dzen2 instead of a panel
Asus Eee PC Seashell:  Atom N550 @ 1.5 GHz | 2 GB RAM
HP Pavilion dv4: Core i5 M430 @ 2.27 GHz | Intel HD Graphics | 4GB RAM
Desktop: Core 2 Duo E8400 @ 3.0 GHz | GeForce GT220 | 4GB RAM

Offline

Board footer

Powered by FluxBB