You are not logged in.
I was checking out the Perl source for the original arch-info script.
I felt an urgent need to clean it up, but it was just a big mess, so I started hacking... and here's the result.
GIT: http://github.com/trapd00r/screenfo
AUR: http://aur.archlinux.org/packages.php?ID=40299
NAME
screenfo - screenshot information tool for nerdsSYNOPSIS
screenfo [OPTION]...DESCRIPTION
Everybody likes 'The monthly screenshot thread' where one is supposed to
show off their latest setup.Nobody likes screenshots that look awesome, but where there's no
information at all available.screenfo outputs a load of system information, including the running
window manager, GTK theme, icons, fonts, shell, terminal emulator, and
much more, while taking the screenshot.OPTIONS
-c, --color specify colorscheme to use
-l, --list list available colorschemes
-a, --ascii specify ascii art to use
-n, --noran dont randomize the colors
-s --shot take screenshot-h, --help show help and exit
-v, --version show version info and exitENVIRONMENT
The configuration file should be placed in either /etc/screenfo.conf or
$XDG_CONFIG_HOME/screenfo/screenfo.confREQUIREMENTS
Perl => 5.10The String::Utils module, available in AUR and
<http://github.com/trapd00r/String-Utils>Some standard UNIX tools
scrot for taking the actual screenshot
AUTHOR
Written by Magnus WoldrichREPORTING BUGS
Report bugs to trapd00r\@trapd00r.se or use the issue tracker located at
<http://github.com/trapd00r/screenfo/issues>screenfo homepage: <http://github.com/trapd00r/screenfo>
COPYRIGHT
Copyright (C) 2010 Magnus WoldrichLicense: GPLv2
HISTORY
Lets quote the Arch Linux user dtw from a post on the BBS, late 2006:OK, all the time in the screenshots thread we get "What gtk theme is that?",
"What is that in the corner?", blah blah blah.
Now, while we try to encourage people to post that with their screenie why
don't we make a simple script that grabs info from from the gtkrc's, .xinitrc,
etc, and outputs into a nice cowsay-like soundbite?Couple days later, user rab made the first Perl version simply named
'info.pl'. There were a lot of people in the community helping out,
making it better, bigger, more complicated and virtually unmaintainable
since absolutely no modularization or subroutines were used.People realized this and started to make their own versions in Bash and
Python.My intent was to fork the original project, clean it up and make it
maintainable, but that was no fun. Therefore, screenfo was born.THANKS
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.SEE ALSO
The original post:
<https://bbs.archlinux.org/viewtopic.php?id=24208&p=10>screenFetch: <http://github.com/KittyKatt/screenFetch>
archey: <http://github.com/djmelik/archey>
Offline
Looks really good, I'd help test it, but no more Arch Linux for the time being
Someone should make a wiki page for all the screenshot information tools.
Offline
Hi.
Very nice indeed. Some issues:
* musca is not recognized as a window manager
* theme / fonts etc. are not populated
* uptime less than 1 hour is reported as "-1 and 13 min"
* kernel 2.6.36-rc2+ is recognised as 2.6.36
Last edited by goran'agar (2010-08-27 21:14:59)
Sony Vaio VPCM13M1E - Arch Linux - LXDE
Offline
PKGBUILD and Makefile are bad. The PKGBUILD uses su for the Makefile to copy files to /usr/local/bin, and nothing is added to the package.
Disk free looks like disk usage (1TB / 5TB, generally means 4TB free)
I think instead of a Makefile it would be easier to leave the installation to the PKGBUILD. Maybe something like this:
install -D "$srcdir/$_gitname-build"/src/screenfo "$pkgdir/usr/bin/"
mkdir -p "$pkgdir/usr/share/screenfo"
cp -R "$srcdir/$_gitname-build"/ascii/ "$pkgdir/usr/share/screenfo/"
install -D -m 664 "$srcdir/$_gitname-build"/screenfo.conf "$pkgdir/usr/share/screenfo/screenfo.conf.example"
install -D -m 664 "$srcdir/$_gitname-build"/screenfo.conf "$pkgdir/etc/screenfo.conf"
Last edited by Procyon (2010-08-27 22:09:45)
Offline
Hi.
Very nice indeed. Some issues:
* musca is not recognized as a window manager
* theme / fonts etc. are not populated
* uptime less than 1 hour is reported as "-1 and 13 min"
* kernel 2.6.36-rc2+ is recognised as 2.6.36
Thank you.
Musca is added, the uptime bug is fixed, and so is the kernel detection.
Are you using a $HOME/.gtkrc-2.0, or are there other places where this could be specified?
Last edited by dmz (2010-08-28 03:25:52)
Offline
PKGBUILD and Makefile are bad. The PKGBUILD uses su for the Makefile to copy files to /usr/local/bin, and nothing is added to the package.
Disk free looks like disk usage (1TB / 5TB, generally means 4TB free)
I think instead of a Makefile it would be easier to leave the installation to the PKGBUILD. Maybe something like this:
install -D "$srcdir/$_gitname-build"/src/screenfo "$pkgdir/usr/bin/"
mkdir -p "$pkgdir/usr/share/screenfo"
cp -R "$srcdir/$_gitname-build"/ascii/ "$pkgdir/usr/share/screenfo/"
install -D -m 664 "$srcdir/$_gitname-build"/screenfo.conf "$pkgdir/usr/share/screenfo/screenfo.conf.example"
install -D -m 664 "$srcdir/$_gitname-build"/screenfo.conf "$pkgdir/etc/screenfo.conf"
har
Thanks a lot for the effort, that was indeed better and I knew the Makefile thingy couldn't be quite The Right Way.
I'm not certain installing the config file in /etc every time is such a good idea though, since it'll be overwritten (that was why I simply placed the example config in /usr/share/scrw.eenfo/).
But maybe there's a way one could simply specify that pacman should backup the config first, or install the new config as a .pacnew...
Edit: Got damn it, there even was a man PKGBUILD and a dedicated backup array. Thanks!
Edit again: It keeps on complaining on 'invalid backup entry' for some reason. Updated PKGBUILD - http://aur.archlinux.org/packages/scree … t/PKGBUILD
Last edited by dmz (2010-08-28 03:04:11)
Offline
Offline
Excellent, thank you.
Offline
goran'agar wrote:Hi.
Very nice indeed. Some issues:
* musca is not recognized as a window manager
* theme / fonts etc. are not populated
* uptime less than 1 hour is reported as "-1 and 13 min"
* kernel 2.6.36-rc2+ is recognised as 2.6.36Thank you.
Musca is added, the uptime bug is fixed, and so is the kernel detection.Are you using a $HOME/.gtkrc-2.0, or are there other places where this could be specified?
Thanks. Musca detection is ok.
The uptime is not really fixed; it's just a cosmetical issue but it reads "0 and 5 min" instead of "o hrs and 5 min" or just "5 min".
The kernel detection is almost ok, it reads 2.6.36-rc2 instead of 2.6.36-rc2+
I indeed use $HOME/.gtkrc-2.0 . FYI, it reads just:
[root@ratbert] - [~] cat .gtkrc-2.0
gtk-font-name = "Dejavu Sans 9"
gtk-theme-name = "OverglossedHybrid"
Sony Vaio VPCM13M1E - Arch Linux - LXDE
Offline
Uptime is now fixed, again. So should the kernel detection be, and if no data is found for a particular GTK item, we'll just show 'Not found' instead of emptyness.
Thank you for testing.
Offline
Could you add support for Compiz?
Offline
Uptime is now fixed, again. So should the kernel detection be, and if no data is found for a particular GTK item, we'll just show 'Not found' instead of emptyness.
Thank you for testing.
You're welcome.
And by the way, I found the bug which is preventing my GTK details to show: in your function "get_gtk_info" you assume that the entries are immediately followed by the "=" sign; this is not correct as they can be followed by any combination of blanks, tabs, etc.
So "gtk_theme_name=whatever" works and "gtk_theme_name = whatever " fails.
Another one small bug, the "Not found" phrase is printed only in place of a missing theme and is not printed in case of missing icon theme or toolbar, which by the way is my case. :-)
Anyway, I "fixed" my gtkrc-2.0 and everything is working for me now. Many thanks.
Sony Vaio VPCM13M1E - Arch Linux - LXDE
Offline
Could you add support for Compiz?
+1
< 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
Thank you for the investigation, goran'agar. I'm not to familiar with the GTK stuff so that was just guesswork. I've changed the regex now to allow the optional whitespace.
I've added compiz, metacity, beryl, kwin, xfwm4 and windowmaker support. Since I've never used either, I'm not sure if I got all the process names correct - please tell me the processname if requesting a new wm to be added.
Offline
Thank you for the investigation, goran'agar. I'm not to familiar with the GTK stuff so that was just guesswork. I've changed the regex now to allow the optional whitespace.
You're welcome. All the gtk stuff is ok now, but I just noticed that screenfo's uptime says:
Uptime: 2:36 days and 0 users
instead of 2:36 hours ...
Sony Vaio VPCM13M1E - Arch Linux - LXDE
Offline
You keep on having < 24h uptime, you. Fixed!
Offline
Offline
I really need to test this out ASAP. I also need to find you on IRC. *does a WHOIS on freenode* PSSSHH! Not in any channels. You should join SilverIRC once in awhile, too. We're still there, though collecting a little dust lately, unfortunately. The archlinux.gr community is really the thing that keeps it alive.
Anyways, enough unrelated postage.
- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -
Offline
I'm on freenode under the nick 'scp1'.
Offline
You keep on having < 24h uptime, you.
Fixed!
It now says 0 days and 46 min.
Last edited by goran'agar (2010-09-03 08:16:55)
Sony Vaio VPCM13M1E - Arch Linux - LXDE
Offline
Good.
Added Maemo and Matchbox support.
Remade the CPU finding function so that ARM processors could be identified as well.
Offline
Theme, Icons and Toolbar show 'None found', I think it should be 'Not found' ???
I used awesome WM, here my screenshot
Ask, and it shall be given you.
Seek, and ye shall find.
Knock, and it shall be opened unto you.
Offline
Theme, Icons and Toolbar show 'None found', I think it should be 'Not found' ???
I used awesome WM, here my screenshot
Could I see your $HOME/.gtkrc-2.0 if you have one please?
Offline
Could I see your $HOME/.gtkrc-2.0 if you have one please?
Here 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
Ask, and it shall be given you.
Seek, and ye shall find.
Knock, and it shall be opened unto you.
Offline
I suggest writing a couple lines in your GKT detection to detect "include" lines that reference a directory in /usr/share/themes/. Just a thought.
Also, keep up the good work, dmz. Looking good.
- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -
Offline