You are not logged in.

#251 2010-01-02 22:35:15

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,321
Website

Re: Screenshot info grabber - in development!

Hi marinftw - welcome to the forums!

I think that you are after the monthly screenshot thread: http://bbs.archlinux.org/viewtopic.php?id=87851

Nice shot, btw...


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#252 2010-03-23 15:26:30

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

Re: Screenshot info grabber - in development!

I've got a Bash version version of archinfo out now. wink

http://github.com/KittyKatt/screenFetch

Previews: http://github.com/KittyKatt/screenFetch … r/gallery/


Edit:  Now also hosted at code.google.com:  http://code.google.com/p/screenfetch/

Edit 2:  Got semi-working distribution detection down. It's sketchy and a little hacky, but it's passed all tests so far. Haven't commited yet. Will do so when it's stable enough to do so. I'll post here when it's been commited. I could use some people to test various distributions. wink

Last edited by kittykatt (2010-03-29 17:46:02)


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

Offline

#253 2010-03-30 07:52:06

dmz
Member
Registered: 2008-08-27
Posts: 866
Website

Re: Screenshot info grabber - in development!

256.png

Offline

#254 2010-03-30 09:53:15

goran'agar
Member
From: Nothern Italy
Registered: 2009-05-19
Posts: 167

Re: Screenshot info grabber - in development!

kittykatt wrote:

I've got a Bash version version of archinfo out now. wink

http://github.com/KittyKatt/screenFetch

Previews: http://github.com/KittyKatt/screenFetch … r/gallery/


Edit:  Now also hosted at code.google.com:  http://code.google.com/p/screenfetch/

Edit 2:  Got semi-working distribution detection down. It's sketchy and a little hacky, but it's passed all tests so far. Haven't commited yet. Will do so when it's stable enough to do so. I'll post here when it's been commited. I could use some people to test various distributions. wink

A simple patch to make it fvwm-compliant :-)

--- screenFetch-v1.7.6.4.orig    2010-03-30 11:50:29.711351696 +0200
+++ screenFetch-v1.7.6.4    2010-03-30 11:49:35.493449165 +0200
@@ -50,7 +50,7 @@ display="OS Kernel Uptime DE WM Win_them
 # labelcolor="\e[1;34m"
 
 # WM & DE process names
-wmnames="fluxbox openbox blackbox xfwm4 metacity kwin icewm pekwm"
+wmnames="fluxbox openbox blackbox xfwm4 metacity kwin icewm pekwm fvwm"
 denames="gnome-session xfce-mcs-manage xfce4-session ksmserver lxsession"
 
 # Screenshot Settings
@@ -85,7 +85,7 @@ while getopts ":hsvVnc:D:" flags; do
       echo ""
       echo "Supported Distributions:      Arch Linux, Linux Mint, Ubuntu, Crunchbang, Debian, Fedora, and BSD"
       echo "Supported Desktop Managers:   KDE, GNOME, XFCE, and LXDE"
-      echo "Supported Window Managers:    PekWM, OpenBox, FluxBox, BlackBox, Xfwm4m, Metacity, KWin, and IceWM"
+      echo "Supported Window Managers:    PekWM, OpenBox, FluxBox, BlackBox, Xfwm4m, Metacity, KWin, IceWM and FVWM"
       echo ""
       echo "Options:"
       echo "   -v                 Verbose output."
@@ -209,6 +209,7 @@ detectwm(){
         'kwin') WM="KWin";;
         'icewm') WM="IceWM";;
         'pekwm') WM="PekWM";;
+        'fvwm') WM="FVWM";;
       esac
     fi
   done

Sony Vaio VPCM13M1E  - Arch Linux - ZFS - Syslinux - XFCE .
Samsung SGS - CM10.1 - Semaphore 2.8.0 .

Offline

#255 2010-03-30 12:53:33

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

Re: Screenshot info grabber - in development!

goran'agar wrote:
kittykatt wrote:

I've got a Bash version version of archinfo out now. wink

http://github.com/KittyKatt/screenFetch

Previews: http://github.com/KittyKatt/screenFetch … r/gallery/


Edit:  Now also hosted at code.google.com:  http://code.google.com/p/screenfetch/

Edit 2:  Got semi-working distribution detection down. It's sketchy and a little hacky, but it's passed all tests so far. Haven't commited yet. Will do so when it's stable enough to do so. I'll post here when it's been commited. I could use some people to test various distributions. wink

A simple patch to make it fvwm-compliant :-)

--- screenFetch-v1.7.6.4.orig    2010-03-30 11:50:29.711351696 +0200
+++ screenFetch-v1.7.6.4    2010-03-30 11:49:35.493449165 +0200
@@ -50,7 +50,7 @@ display="OS Kernel Uptime DE WM Win_them
 # labelcolor="\e[1;34m"
 
 # WM & DE process names
-wmnames="fluxbox openbox blackbox xfwm4 metacity kwin icewm pekwm"
+wmnames="fluxbox openbox blackbox xfwm4 metacity kwin icewm pekwm fvwm"
 denames="gnome-session xfce-mcs-manage xfce4-session ksmserver lxsession"
 
 # Screenshot Settings
@@ -85,7 +85,7 @@ while getopts ":hsvVnc:D:" flags; do
       echo ""
       echo "Supported Distributions:      Arch Linux, Linux Mint, Ubuntu, Crunchbang, Debian, Fedora, and BSD"
       echo "Supported Desktop Managers:   KDE, GNOME, XFCE, and LXDE"
-      echo "Supported Window Managers:    PekWM, OpenBox, FluxBox, BlackBox, Xfwm4m, Metacity, KWin, and IceWM"
+      echo "Supported Window Managers:    PekWM, OpenBox, FluxBox, BlackBox, Xfwm4m, Metacity, KWin, IceWM and FVWM"
       echo ""
       echo "Options:"
       echo "   -v                 Verbose output."
@@ -209,6 +209,7 @@ detectwm(){
         'kwin') WM="KWin";;
         'icewm') WM="IceWM";;
         'pekwm') WM="PekWM";;
+        'fvwm') WM="FVWM";;
       esac
     fi
   done

Still need a line to grab the FVWM theme. Got that? o.O

Example:  The line that grabs the fluxbox theme...

    'FluxBox') if [ -f $HOME/.fluxbox/init ]; then Win_theme=`awk -F"/" '/styleFile/ {print $NF}' $HOME/.fluxbox/init`; fi;;

If you could get me that, I'll add it to the source and commit a new version. wink

And also, very nice shot dmz. big_smile

Last edited by kittykatt (2010-03-30 12:55:25)


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

Offline

#256 2010-03-30 19:04:59

goran'agar
Member
From: Nothern Italy
Registered: 2009-05-19
Posts: 167

Re: Screenshot info grabber - in development!

kittykatt wrote:

Still need a line to grab the FVWM theme. Got that? o.O

Example:  The line that grabs the fluxbox theme...

    'FluxBox') if [ -f $HOME/.fluxbox/init ]; then Win_theme=`awk -F"/" '/styleFile/ {print $NF}' $HOME/.fluxbox/init`; fi;;

If you could get me that, I'll add it to the source and commit a new version. wink

FVWM is configured with a single file, usually called .fvwm2rc of .fvwm/config and usually runs without a specific theme. For example, I run it without any theme.

There is a package called fvwm-themes that can also be used but it's not mandatory at all; I never used it.


Sony Vaio VPCM13M1E  - Arch Linux - ZFS - Syslinux - XFCE .
Samsung SGS - CM10.1 - Semaphore 2.8.0 .

Offline

#257 2010-03-30 20:00:00

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

Re: Screenshot info grabber - in development!

goran'agar wrote:
kittykatt wrote:

Still need a line to grab the FVWM theme. Got that? o.O

Example:  The line that grabs the fluxbox theme...

    'FluxBox') if [ -f $HOME/.fluxbox/init ]; then Win_theme=`awk -F"/" '/styleFile/ {print $NF}' $HOME/.fluxbox/init`; fi;;

If you could get me that, I'll add it to the source and commit a new version. wink

FVWM is configured with a single file, usually called .fvwm2rc of .fvwm/config and usually runs without a specific theme. For example, I run it without any theme.

There is a package called fvwm-themes that can also be used but it's not mandatory at all; I never used it.

So would something like the following be acceptable?

    'FVWM') Win_theme="Not Present";;

Until, of course, I can find an example of both of those files and parse them myself for the theme name, if it does exist. At that point, I'll add if statements for those cases.


By the way, official topic for screenFetch located here, though posts about it in this topic are acceptable as well, as it is a "Screenshot info grabber" and this is where I first posted information about it. I'll be checking both topics regularly.

Last edited by kittykatt (2010-03-30 20:02:36)


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

Offline

#258 2010-03-31 16:22:06

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: Screenshot info grabber - in development!

Archey can't detect ratpoison? Also, is there a way to change the color in a config file? Or do I have to change the source code for that?

Offline

#259 2010-04-01 21:24:41

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

Re: Screenshot info grabber - in development!

Berticus wrote:

Archey can't detect ratpoison? Also, is there a way to change the color in a config file? Or do I have to change the source code for that?

The latest version of screenFetch that I'm working has support for detecting ratpoison. I'll post here when I finally commit it.


EDIT:  screenFetch now in the AUR!  package naw is "screenfetch-git". Page can be found here

Last edited by kittykatt (2010-04-02 14:36:58)


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

Offline

#260 2010-04-08 10:13:46

tawan
Member
Registered: 2010-03-02
Posts: 290
Website

Re: Screenshot info grabber - in development!

a little off topic, maybe should have its own thread, but may catch the attention of someone able.

How about something for Openbox, or maybe all systems, that grabs icons, theme and some configs and tars them up. This would result in that ability to save a wide range of settings as a themes.tar and then reload that theme in the future.

Say today I want to go tweaking, I need to backup my conky, tint2.. remember my theme settings, icon colours and so on. If I later find I've screwed up my new theme, don't like it or simply want to revert, then I can call upon this new tool and reload all those fiddly settings in one.

Offline

#261 2010-04-08 10:37:48

Chokkan
Member
Registered: 2009-04-06
Posts: 129

Re: Screenshot info grabber - in development!

I did something like that when I used Gnome. I used calls to gconf from little bash scripts and then made a gui which changed the gtk theme, icons, and conky. Something like that which worked outside gnome would be really cool.

Yeah it's OT. Go make a thread wink


< Daenyth> tomkx: my girlfriend is linux
< Daenyth> srsly
< Daenyth> she loves the way I «make install»
< Daenyth> all her /dev entries are mode 7 for me

Offline

#262 2010-04-08 16:33:00

melik
Member
Registered: 2009-10-11
Posts: 108

Re: Screenshot info grabber - in development!

Berticus wrote:

Archey can't detect ratpoison? Also, is there a way to change the color in a config file? Or do I have to change the source code for that?

Thanks, just added support for it. New version can be found in the AUR.

Also please use the following thread for anything related to archey: http://bbs.archlinux.org/viewtopic.php?id=87610

Last edited by melik (2010-04-08 16:34:55)

Offline

#263 2010-06-15 23:17:43

tamtam
Member
From: France
Registered: 2010-02-11
Posts: 47

Re: Screenshot info grabber - in development!

Can someone do one with pedobear plz?

   ∩___∩
   | ノ     ヽ
  /  ●   ● |
  |   ( _●_)  ミ
彡、   |∪|  、`\
/ __  ヽノ /´>  )
(___)   / (_/
|      /
|  /\ \
| /   )  )
∪    (  \
       \_)

Any other art will be good smile.


Lady, people aren't chocolates. Do you know what they are mostly? Bastards. Bastard-coated bastards with bastard filling. But I don't find them half as annoying as I find naive bobble-headed optimists who walk around vomiting sunshine.

Offline

#264 2010-07-21 23:46:02

quarkup
Member
From: Portugal
Registered: 2008-09-07
Posts: 497

Re: Screenshot info grabber - in development!

lol

you're missing one: "awesome"
the config file is into ~/.config/awesome/rc.lua

nice.. its easier to display things this way
I bet i will put a cron job to start windows; take the shot && upload wink

big_smile


If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.

Offline

#265 2010-07-22 07:26:44

toxygen
Member
Registered: 2008-08-22
Posts: 704

Re: Screenshot info grabber - in development!

tamtam wrote:

Can someone do one with pedobear plz?

   ∩___∩
   | ノ     ヽ
  /  ●   ● |
  |   ( _●_)  ミ
彡、   |∪|  、`\
/ __  ヽノ /´>  )
(___)   / (_/
|      /
|  /\ \
| /   )  )
∪    (  \
       \_)

Any other art will be good smile.

lolwut?


"I know what you're thinking, 'cause right now I'm thinking the same thing. Actually, I've been thinking it ever since I got here:
Why oh why didn't I take the BLUE pill?"

Offline

#266 2010-08-24 00:58:24

Osage
Member
Registered: 2010-08-17
Posts: 8

Re: Screenshot info grabber - in development!

EDIT: Ignore me, I'm out of my mind. I could've sworn this was the monthly post your picture thread.

Last edited by Osage (2011-04-12 15:02:35)

Offline

#267 2010-08-24 02:33:08

dmz
Member
Registered: 2008-08-27
Posts: 866
Website

Re: Screenshot info grabber - in development!

I'm working on a little something...

t.png

Offline

#268 2010-08-25 22:19:31

ThomasAdam
Member
From: Southampton, England
Registered: 2005-10-26
Posts: 147

Re: Screenshot info grabber - in development!

rab wrote:

Updated::
+ recoded to be based of the PS list

If you want more WM to be supported please post their config files, Also i still need KDE's files.

XFCE is yet to be tested. Please post any errors, mistakes or improvements.

#!/usr/bin/perl

use Switch;

use strict?  use warnings?  You should *always* have these in a perl script.  Also, don't "use Switch" -- it's deprecated.  Live with your nested if statements, or if you have too many, you've simply programmed things incorrectly and should rethink it.

rab wrote:
@wm = ("fluxbox", "openbox", "blackbox",
       "xfwm", "metacity");
%de = ("gnome", "gnome-session",
       "xfce", "xfce",
       "kde", "kde");

Aligning a hash in this way is discouraged.  You either mean an array here, or you have explicit values you wish to set outright.

rab wrote:
$quite = 0; # Prints little debugging messages if set to 0;
$tryWP = 1; # trys to find your wallpaper if set to 0;

use strict would tell you here you need to put these in lexical scope -- hence "my".

rab wrote:
    if( !open(GTKRC, "<", "$ENV{HOME}/.gtkrc-2.0")  ) {
        print "$ENV{HOME}.gtkrc-2.0 -> $!...n";

Couple of things here:

* Don't use bareword filehandles -- that is "FOO", as these are package global and will bugger things up in the long-run.  Instead use a lexical scalar, as in:

open( my $file_h, '<', $some_file );

* The use of "!open(...)" is OK, but better is to do this:

open( ... ) or die "Couldn't open $foo: $!\n";
rab wrote:
            if( /gtk-icon-theme-name.*=.*"(.+)"/ ) {

That's a greedy match - do you mean that?

 /gtk-icon-theme-name.*?=.*?"(.*?)"/

 

rab wrote:
sub parsePS {
    my $x = 0;
    my $y = 0;
    my $found = 0;
    my $psl = `ps -A | awk {'print $4'}`;
    @psl = split(/n/, $psl);

Dangerous.  Better off opening a pipe and reading the output from that.

rab wrote:
    switch (shift @_) {

Ugh -- never shift off @_ like this directly -- always assign it first:

my( $foo ) = @_;

The same comments apply to the other areas of the code where the above is present.

-- Thomas Adam

Offline

#269 2010-08-27 15:29:13

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

Re: Screenshot info grabber - in development!

dmz wrote:

I'm working on a little something...

t.png

Psshhh...using screenfetch's ASCII logos with different colors! I see what's going on here lol. wink

Awesome anyways, dmz. I look forward to testing it out. big_smile


Osage wrote:

nLrC1s.jpg

screenfetch doesn't show it, but I'm using xmonad.

EDIT: Ignore me, I'm out of my mind. I could've sworn this was the monthly post your picture thread. A terrible way to start off my forum career.


It does now. Check out the new version at SilverIRC's Public Git Repository, http://git.silverirc.com/cgit.cgi/screenfetch-dev.git/

The package in the AUR (screenfetch-git) has also been updated to v2.0.3.

Also, nice incognito window there. xD

Last edited by kittykatt (2010-08-27 15:35:30)


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

Offline

#270 2010-08-27 16:23:03

dmz
Member
Registered: 2008-08-27
Posts: 866
Website

Re: Screenshot info grabber - in development!

kittykatt wrote:

Psshhh...using screenfetch's ASCII logos with different colors! I see what's going on here lol. wink

man screenfo wrote:

       I'd like to thank the Archlinux community for being awesome, kittykatt for providing some ASCII art that I stole without asking, and slush- for coming up with this awesome name.

https://bbs.archlinux.org/viewtopic.php?pid=816274 smile

Offline

#271 2010-08-29 13:06:38

ThomasAdam
Member
From: Southampton, England
Registered: 2005-10-26
Posts: 147

Re: Screenshot info grabber - in development!

dtw wrote:

I use fvwm and I'd say it's impossible to do it.

Odd.  I use FVWM, and I'd say it is *possible* to do, but you won't get any meaningful information from it whatsoever.

-- Thomas Adam

Offline

#272 2010-08-30 03:42:45

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

Re: Screenshot info grabber - in development!

dmz wrote:
kittykatt wrote:

Psshhh...using screenfetch's ASCII logos with different colors! I see what's going on here lol. wink

man screenfo wrote:

       I'd like to thank the Archlinux community for being awesome, kittykatt for providing some ASCII art that I stole without asking, and slush- for coming up with this awesome name.

https://bbs.archlinux.org/viewtopic.php?pid=816274 smile

That second quote made me giggle. xD

We need to make a wiki page for all the screenshot information tools we've got going on here. Anyone wanna join me in creating one and actually keeping it up to date? I have all of these apps installed besides screenfo currently and I'll know when an updated version comes out for anyone so that I can update the page, but I don't think I can do it alone due to 2 jobs and school. Who's in? tongue


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

Offline

#273 2010-10-01 21:41:04

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819

Re: Screenshot info grabber - in development!

tNXA1cQ

Seems screenfetch is choking on the input, this is how my .gtkrc-2.0 looks:

# -- THEME AUTO-WRITTEN DO NOT EDIT
include "/home/stijn/.themes/Fundamental-Round-2-Blue-GTK/gtk-2.0/gtkrc"

style "user-font" {
    font_name = "Bitstream Vera Sans 9"
}

widget_class "*" style "user-font"

gtk-font-name="Bitstream Vera Sans 9"

include "/home/stijn/.gtkrc.mine"

# -- THEME AUTO-WRITTEN DO NOT EDIT

Don't know if that's helpful for you to 'debug'....


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#274 2012-03-24 00:52:24

mynameisneo
Member
Registered: 2011-11-25
Posts: 45

Re: Screenshot info grabber - in development!

I'd like to run the perl script every time I launch urxvt. However,

urxvt -e perl info.pl

and

urxvt -e sh -c perl info.pl 

fail to launch the script. There is no error output. How can I do this?

Also, how can I change the color output of the script?

I am using this script:

#!/usr/bin/perl
use Switch;
use strict;
use File::Basename;

####################
## Config options ##
####################

## What distro logo to use to use, Available "Archlinux Debian Ubuntu None" ##
my $distro = "Archlinux";
my $myArchVersion = "ArchLinux (Core Dump)";

## what values to display. Use "OS Kernel DE WM win_theme Theme Font Icons" ##
my $display = "OS Kernel DE WM Win_theme Theme Icons Font Background";

## Takes a screen shot if set to 0 ##
my $shot = 0;
## Command to run to take screen shot ##
my $command = "scrot -d 10";

## What colors to use for the variables. ##
my $textcolor = "\e[0m";

## Prints little debugging messages if set to 0 ##
my $quite = 1;



########################
## Script starts here ##
########################
## Define some thing to work with strict ##
my @line = ();
my $found = 0;
my $DE = "NONE";
my $WM = "Beryl";

## Hash of WMs and the process they run ##
my %WMlist = ("Beryl", "beryl",
              "Fluxbox", "fluxbox",
              "Openbox", "openbox",
              "Blackbox", "blackbox",
              "Xfwm4", "xfwm4",
              "Metacity", "metacity",
              "Kwin", "kwin",
              "FVWM", "fvwm",
              "Enlightenment", "enlightenment",
              "IceWM", "icewm",
              "Window Maker", "wmaker",
              "PekWM","pekwm" );

## Hash of DEs and the process they run ##     
my %DElist = ("Gnome", "gnome-session",
              "Xfce4", "xfce-mcs-manage",
          "Xfce4.6", "xfconfd",
              "KDE", "ksmserver");

## Get Kernel version ##
if ( $display =~ "Kernel"){
  print "\::$textcolor Finding Kernel version\n" unless $quite == 1;
  my $kernel = `uname -r`;
  $kernel =~ s/\s+/ /g;
  $kernel = " Kernel:$textcolor $kernel";
  push(@line, "$kernel");
}

## Find running processes ##
print "\::$textcolor Getting processes \n" unless $quite == 1;
my $processes = `ps -A | awk {'print \$4'}`;

## Find DE ##
while( (my $DEname, my $DEprocess) = each(%DElist) ) {
  print "\::$textcolor Testing $DEname process: $DEprocess \n" unless $quite == 1;
  if ( $processes =~ m/$DEprocess/ ) {
    $DE = $DEname;
    print "\::$textcolor DE found as $DE\n" unless $quite == 1;
    if( $display =~ m/DE/ ) {
      push(@line, " DE:$textcolor $DE");
    }
    last;
  }
}

## Find WM ##
while( (my $WMname, my $WMprocess) = each(%WMlist) ) {
 print "\::$textcolor Testing $WMname process: $WMprocess \n" unless $quite == 1;
  if ( $processes =~ m/$WMprocess/ ) {
    $WM = $WMname;
    print "\::$textcolor WM found as $WM\n" unless $quite == 1;
    if( $display =~ m/WM/ ) {
      push(@line, " WM:$textcolor $WM");
    }
    last;
  }
}

## Find WM theme ##
if ( $display =~ m/Win_theme/ ){
  switch($WM) {
    case "Openbox" {
      print "\::$textcolor Finding $WM theme\n" unless $quite == 1;
      open(FILE, "$ENV{HOME}/.config/openbox/rc.xml")
      || die "\e[0;31m<Failed>\n";
      while( <FILE> ) {
        if( /<name>(.+)<\/name>/ ) {
          while ( $found == 0 ) {
            print "\::$textcolor $WM theme found as $1\n" unless $quite == 1;
            push(@line, " WM Theme:$textcolor $1");
            $found = 1;
          }
        }
      }
      close(FILE);
    }
    case "Metacity" {
      print "\::$textcolor Finding $WM theme\n" unless $quite == 1;
      my $gconf = `gconftool-2 -g /apps/metacity/general/theme`;
      print "\::$textcolor $WM theme found as $gconf\n" unless $quite == 1;
      chomp ($gconf);
      push(@line, " WM Theme:$textcolor $gconf");
    }
    case "Fluxbox" {
      print "\::$textcolor Finding $WM theme\n" unless $quite == 1;
      open(FILE, "$ENV{HOME}/.fluxbox/init")
      || die "\e[0;31m<Failed>\n";
      while( <FILE> ) {
        if( /session.styleFile:.*\/(.+)/ ) {
          print "\::$textcolor $WM theme found as $1\n" unless $quite == 1;
          push(@line, " WM Theme:$textcolor $1");
        }
      }
      close(FILE);
    }
    case "Blackbox" {
      print "\::$textcolor Finding $WM theme\n" unless $quite == 1;
      open(FILE, "$ENV{HOME}/.blackboxrc")
      || die "\e[0;31m<Failed>\n";
      while( <FILE> ) {
        if( /session.styleFile:.*\/(.+)/ ) {
          print "\::$textcolor $WM theme found as $1\n" unless $quite == 1;
          push(@line, " WM Theme:$textcolor $1");
        }
      }
      close(FILE);
    }
    case "Xfwm4" {
      print "\::$textcolor Finding $WM theme\n" unless $quite == 1;
      switch($DE) {
    case "Xfce4" {
          open(FILE, "$ENV{HOME}/.config/xfce4/mcs_settings/xfwm4.xml")
          || die "\e[0;31m<Failed>\n";
            while( <FILE> ) {
            if( /<option name="Xfwm\/ThemeName" type="string" value="(.+)"\/>/ ) {
              print "\::$textcolor $WM theme found as $1\n" unless $quite == 1;
              push(@line, " WM Theme:$textcolor $1");
            }
          }
            close(FILE);
    }
    case "Xfce4.6" {
      my $xfconf = `xfconf-query -c xfwm4 -p /general/theme`;
      chomp($xfconf);
      push(@line, " WM Theme:$textcolor $xfconf");
    }
      }    
    }
    case "Kwin" {
      print "\::$textcolor Finding $WM theme\n" unless $quite == 1;
      open(FILE, "$ENV{HOME}/.kde/share/config/kwinrc")
      || die "\e[0;31m<Failed>\n";
      while( <FILE> ) {
        if( /PluginLib=kwin3_(.+)/ ) {
          print "\::$textcolor $WM theme found as $1\n" unless $quite == 1;
          push(@line, " WM Theme:$textcolor $1");
        }
      }
      close(FILE);
    }
    case "Enlightenment" {
      print "\::$textcolor Finding $WM theme\n" unless $quite == 1;
      my $remote = `enlightenment_remote -theme-get theme` ;
      if( $remote =~ m/.*FILE="(.+).edj"/ ) {
        print "\::$textcolor $WM theme found as $1\n" unless $quite == 1;
        push(@line, " WM Theme:$textcolor $1");
      }     
    }       
    case "IceWM" { 
      print "\::$textcolor Finding $WM theme\n" unless $quite == 1;
      open(FILE, "$ENV{HOME}/.icewm/theme")
      || die "\e[0;31m<Failed>\n";
      while( <FILE> ) {
        if( /Theme="(.+)\/.*.theme/ ) {
          while( $found == 0 ) {
            print "\::$textcolor $WM theme found as $1\n" unless $quite == 1;
            push(@line, " WM Theme:$textcolor $1");
            $found = 1;
          }
        }
      }   
      close(FILE);
    }   
    case "PekWM" {
      print "\::$textcolor Finding $WM theme\n" unless $quite == 1;
      open(FILE, "$ENV{HOME}/.pekwm/config")
      || die "\e[0;31m<Failed>\n";
      while( <FILE> ) {
        if( /Theme.*\/(.*)"/ ) {
            print "\::$textcolor $WM theme found as $1\n" unless $quite == 1;
            push(@line, " WM Theme:$textcolor $1");
        }
      }
      close(FILE); 
    } 
  }   
}     
      
## Find Theme Icon and Font ##
if ( $display =~ m/[Theme, Icons, Font, Background]/) {
  switch($DE) {
    case "Gnome" {
      print "\::$textcolor Finding $DE variables\n" unless $quite == 1;
      if ( $display =~ m/Theme/ ) {
        my $gconf = `gconftool-2 -g /desktop/gnome/interface/gtk_theme`;
        chomp ($gconf);
        print "\::$textcolor GTK Theme found as $1\n" unless $quite == 1;
        push(@line, " GTK Theme:$textcolor $gconf");
      }
      if ( $display =~ m/Icons/ ) {
        my $gconf = `gconftool-2 -g /desktop/gnome/interface/icon_theme`;
        chomp ($gconf);
        push(@line, " Icons:$textcolor $gconf");
      } 
      if ( $display =~ m/Font/ ) {
        my $gconf = `gconftool-2 -g /desktop/gnome/interface/font_name`;
        chomp ($gconf);
        push(@line, " Font:$textcolor $gconf");
      }
      if ( $display =~ m/Background/ ) {
        my $gconf = `gconftool-2 -g /desktop/gnome/background/picture_filename`;
        chomp ($gconf);
        my $bname = basename($gconf);
        push(@line, " Background:$textcolor $bname");
      }

    } 
    case "Xfce4" {
      my @sort = ();
      print "\::$textcolor Finding $DE variables\n" unless $quite == 1;
      open(FILE, "$ENV{HOME}/.config/xfce4/mcs_settings/gtk.xml")
      || die "\e[0;31m<Failed>\n";
      while( <FILE> ) {
        if ( $display =~ m/Theme/ ) {
          if (/<option name="Net\/ThemeName" type="string" value="(.+)"\/>/ ) {
            print "\::$textcolor GTK Theme found as $1\n" unless $quite == 1;
            unshift(@sort, " GTK Theme:$textcolor $1");
          } 
        }
        if ( $display =~ m/Icons/ ) {
          if (/<option name="Net\/IconThemeName" type="string" value="(.+)"\/>/ ) {
            print "\::$textcolor Icons found as $1\n" unless $quite == 1;
            unshift(@sort, " Icons:$textcolor $1");
          }
        }
        if ( $display =~ m/Font/ ) {
          if ( /<option name="Gtk\/FontName" type="string" value="(.+)"\/>/ ) {
            print "\::$textcolor Font found as $1\n" unless $quite == 1;
            unshift(@sort, " Font:$textcolor $1");
          } 
        }
      }
      close(FILE);
      ## Sort variables so they're ordered "Theme Icon Font" ##
      foreach my $i (@sort) {
        push(@line, "$i");
      }
    } 
    case "Xfce4.6" {
      my @sort = ();
      print "\::$textcolor Finding $DE variables\n" unless $quite == 1;
        if ( $display =~ m/Theme/ ) {
        my $xfconf = `xfconf-query -c xsettings -p /Net/ThemeName`;
        chomp($xfconf);
            push(@line, " GTK Theme:$textcolor $xfconf");
        }
        if ( $display =~ m/Icons/ ) {
        my $xfconf = `xfconf-query -c xsettings -p /Net/IconThemeName`;
        chomp($xfconf);
            push(@line, " Icons:$textcolor $xfconf");
        }
        if ( $display =~ m/Font/ ) {
        my $xfconf = `xfconf-query -c xsettings -p /Gtk/FontName`;
        chomp($xfconf);
            push(@line, " Font:$textcolor $xfconf");
        }
      if ( $display =~ m/Background/ ) {
        my $xfconf = `xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path`;
        chomp($xfconf);
        my $bname = basename($xfconf);
            push(@line, " Background:$textcolor $bname");
      }
    } 
    case "KDE" { 
      print "\::$textcolor Finding $DE variables\n" unless $quite == 1;
      open(FILE, "$ENV{HOME}/.kde/share/config/kdeglobals")
      || die "\e[0;31m<Failed>\n";
      while( <FILE> ) { 
        if ( $display =~ m/Theme/ ) {
          if ( /widgetStyle=(.+)/  ) {
            print "\::$textcolor Wiget Style found as $1\n" unless $quite == 1;
            push(@line, " Wiget Style:$textcolor $1");
          }
          if (/colorScheme=(.+).kcsrc/ ) {
            print "\::$textcolor Color Scheme found as $1\n" unless $quite == 1;
            push(@line, " Color Scheme:$textcolor $1");
          }
        }
        if ( $display =~ m/Icons/ ) {
          if ( /Theme=(.+)/ ) {
            print "\::$textcolor Icons found as $1\n" unless $quite == 1;
            push(@line, " Icons:$textcolor $1");
          } 
        }   
        if ( $display =~ m/Font/ ) {
          if ( /font=(.+)/ ) {
            my $font = (split/,/, $1)[0];
            print "\::$textcolor Font found as $font\n" unless $quite == 1;
            push(@line, " Font:$textcolor $font");
          }
        }
      }
      close(FILE);
  
    }
    else {
      my @files = ("$ENV{HOME}/.gtkrc-2.0", "$ENV{HOME}/.gtkrc.mine",);
      foreach my $file (@files) {
        if ( -e $file ) {
          print "\::$textcolor Opening $file\n" unless $quite == 1; 
          open(FILE, $file)
          || die "\e[0;31m<Failed>\n";
          while( <FILE> ) {
            if ( $display =~ m/Theme/ ) {
              if( /include ".*themes\/(.+)\/gtk-(1|2)\.0\/gtkrc"/ ){
                print "\::$textcolor GTK theme found as $1\n" unless $quite == 1;
                push(@line, " GTK Theme:$textcolor $1");
              }
            }
            if ( $display =~ m/Icons/ ) {
              if( /.*gtk-icon-theme-name.*"(.+)"/ ) {
                print "\::$textcolor Icons found as $1\n" unless $quite == 1;
                push(@line, " Icons:$textcolor $1");
              }
            }
            if ( $display =~ m/Font/ ) {
              if( /.*gtk-font-name.*"(.+)"/ ) {
                print "\::$textcolor Font found as $1\n" unless $quite == 1;
                push(@line, " Font:$textcolor $1");
             }
            }
          }
          close(FILE);
        }
      }
    }
  }
}

## Display the system info ##

if ( $distro =~ m/Archlinux/ ) {

## Get Archlinux version ##
if ( $display =~ "OS"){
  print "\::$textcolor Finding Archlinux version\n" unless $quite == 1;
  my $version = $myArchVersion;
  $version =~ s/\s+/ /g;
  $version = " OS:$textcolor $version";
  unshift(@line, "$version");
}

my $c1 = "\e[1;36m";
my $c2 = "\e[0;36m";

system("clear");

print "
${c1}                   -`                   
${c1}                  .o+`                  
${c1}                 `ooo/                  
${c1}                `+oooo:                 
${c1}               `+oooooo:
${c1}               -+oooooo+:
${c1}             `/:-:++oooo+:                       $c1@line[0]
${c1}            `/++++/+++++++:                      $c1@line[1]
${c1}           `/++++++++++++++:                     $c1@line[2]
${c1}          `/+++${c2}ooooooooooooo/`                   $c1@line[3]
${c2}         ./ooosssso++osssssso+`                  $c1@line[4]
${c2}        .oossssso-````/ossssss+`                 $c1@line[5]
${c2}       -osssssso.      :ssssssso.                $c1@line[6]
${c2}      :osssssss/        osssso+++.               $c1@line[7]
${c2}     /ossssssss/        +ssssooo/-               $c1@line[8]
${c2}   `/ossssso+/:-        -:/+osssso+-    
${c2}  `+sso+:-`                 `.-/+oso:   
${c2} `++:.                           `-/+/  
${c2} .`                                  ``
${c2} 
\e[0m";
}

#system("scrot -d 1");

Offline

Board footer

Powered by FluxBB