You are not logged in.
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.
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
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
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
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
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
< 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
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
Can someone do one with pedobear plz?
∩___∩
| ノ ヽ
/ ● ● |
| ( _●_) ミ
彡、 |∪| 、`\
/ __ ヽノ /´> )
(___) / (_/
| /
| /\ \
| / ) )
∪ ( \
\_)
Any other art will be good .
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
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
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
Can someone do one with pedobear plz?
∩___∩
| ノ ヽ
/ ● ● |
| ( _●_) ミ
彡、 |∪| 、`\
/ __ ヽノ /´> )
(___) / (_/
| /
| /\ \
| / ) )
∪ ( \
\_)Any other art will be good .
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
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
Offline
Updated::
+ recoded to be based of the PS listIf 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.
@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.
$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".
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";
if( /gtk-icon-theme-name.*=.*"(.+)"/ ) {
That's a greedy match - do you mean that?
/gtk-icon-theme-name.*?=.*?"(.*?)"/
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.
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
Psshhh...using screenfetch's ASCII logos with different colors! I see what's going on here lol.
Awesome anyways, dmz. I look forward to testing it out.
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
Psshhh...using screenfetch's ASCII logos with different colors! I see what's going on here lol.
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.
Offline
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
kittykatt wrote:Psshhh...using screenfetch's ASCII logos with different colors! I see what's going on here lol.
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.
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?
- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -
Offline
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
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