You are not logged in.

#251 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

#252 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

#253 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

#254 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

#255 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

#256 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

#257 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

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

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

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

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

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

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

#260 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

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

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: Screenshot info grabber - in development!

I'm working on a little something...

t.png

Offline

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

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

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

#263 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

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

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
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

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

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

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

#266 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

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

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

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

#268 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