You are not logged in.
screenFetch
The title pretty much explains it. screenFetch is a screenshot information tool, similar to archinfo and archey, except in Bash instead of Perl or Python.
Features:
- Detects Desktop Environment, Kernel, Uptime, Window Manager, Window Manager Theme, GTK Theme, GTK Icon Theme, and GTK Font. It also attempts to detect running distribution, but it's a little sketchy at the moment and needs a lot of testing.
- Supported distros: Arch Linux (yay!), Linux Mint, LMDE, Ubuntu, Debian, Fedora (untested), SuSe (untested), Mandriva/Mandrake (untested), Crunchbang (somewhat tested), Gentoo (untested), Red Hat Linux (untested), and Tiny Core.
- Supported Desktop Environments: KDE, GNOME, XFCE, LXDE, and "Not Present".
- Supported Window Managers: PekWM, FluxBox, OpenBox, BlackBox, Xfwm4, Metacity, Kwin (reported as not working), IceWM, FVWM, DWM, Awesome, WindowMaker, XMonad, Musca, i3, Ratpoison, ScrotWM, WMFS, wmii, subtle, E16, Sawfish, and Beryl (if you can find files or syntaxes to detect the theme of more window managers, let me know!)
- Outputs ASCII logo with information, though you may specify to only output information and no ASCII art.
- Flag to execute a scrot command to take screenshot named 'screenFetch-(YEAR)-(MONTH)-(DAY).png'
- Ability to specify custom distribution name and custom screenshot command in execution on command-line.
- Verbose output
Screenshots:
My official screenshots
Current
Old
I made most of these ASCII logos myself, so don't be too critical.
More to come!
And finally, the source code can be found at either github or code.google.com (github will be more up to date as I am personally maintaining that one):
http://github.com/KittyKatt/screenFetch
http://code.google.com/p/screenfetch/
http://git.silverirc.com/cgit.cgi/screenfetch-dev.git/
Current Latest Version: v2.4.0
Latest version can always be found in this folder: http://github.com/KittyKatt/screenFetch … er/latest/
Latest version can always be found at SilverIRC's Git Repository: http://git.silverirc.com/cgit.cgi/screenfetch-dev.git/
AUR Packages
screenfetch-git - Always up to date with latest commit.
screenfetch - Up to date with latest release, not latest commit.
Before you say it, yes I do realize some of this is horribly ugly coding. This is one of my first big projects, so I'm welcome to constructive criticism. I'd rather not get "Go home. Try again." types of responses, if you wouldn't mind. ^^;
Any suggestions will be welcome! email me at kittykattATsilverircDOTcom or stop by my IRC network, SilverIRC, at irc://kittykatt.silverirc.com/randomz
Last edited by kittykatt (2012-02-10 12:46:10)
- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -
Offline
Well, the ascii logo for Arch is the old (startrekky) one. No reason to use a deprecated logo.
Offline
Well, the ascii logo for Arch is the old (startrekky) one. No reason to use a deprecated logo.
There's a couple others on file if you look in the ascii folder on the github repository. I personally like that one best, so I used it.
- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -
Offline
I'm trying 1.7.6.4 but `-s` didn't work, I think some `exit` in your Bash code should be removed or to be `return`?
Last edited by livibetter (2010-03-30 16:05:32)
Offline
Nice program. Went ahead an created a PKGBUILD for it:
# Contributor: Todd Partridge (Gen2ly) toddrpartridge (at) gmail
pkgname=screenfetch-git
pkgver=20100330
pkgrel=1
pkgdesc="Bash screenshot information tool"
arch=(any)
url="http://github.com/KittyKatt/screenFetch"
license=('GPL')
depends=('bash')
makedepends=('git')
_gitroot="git://github.com/KittyKatt/screenFetch.git"
_gitname="screenFetch"
build() {
# Git
cd "$srcdir"
msg "Connecting to GIT server...."
if [ -d $_gitname ] ; then
cd $_gitname && git pull origin
msg "The local files are updated."
else
git clone $_gitroot $_gitname
fi
msg "GIT checkout done or server timeout"
msg "Starting make..."
rm -rf "$srcdir/$_gitname-build"
git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
cd "$srcdir/$_gitname-build"
# Create pkgdir folders
install -d $pkgdir/usr/bin
install -d $pkgdir/usr/share/screenFetch
# Install
cp -r screenFetch $pkgdir/usr/share/screenFetch
cp -r ascii $pkgdir/usr/share/screenFetch
ln -s /usr/share/screenFetch/screenFetch/latest/screenFetch-v1.7.6.4 $pkgdir/usr/bin/screenfetch
}
Be free to put it on the AUR or whatever. To better create the package a few ideas (not sure if they meld with the development philosophy). The script in latest could be a link to the newest. Also the script could be lowercase (I think people have becomed accustomed to that [both programs and scripts] and is the general recommendation. Last but least (I really do like this script btw ) there is no '--help' option. Yes I found '-h' but in my experiences '--help' is more prevalant. Thanks for the script, very nice.
Setting Up a Scripting Environment | Proud donor to wikipedia - link
Offline
Why do you have a ton of sub directories in there? I... ugh. Isn't the point of using a VCS to avoid that sort of hackery?
[git] | [AURpkgs] | [arch-games]
Offline
First, of all, thank you very much for this and for the praise/support Gen2ly! It's much appreciated. Here's a couple things I'd like to ask/point out/discuss/whatnot with you:
The script in latest could be a link to the newest.
Thought about this. The only crappy part is updating the symlink everytime I update to a new version. Though I'm already copying the new version into the "latest" folder anyways, so I suppose that's feasible. I'll get on that.
Also the script could be lowercase (I think people have becomed accustomed to that [both programs and scripts] and is the general recommendation.
Hm. I'll consider that.
Last but least (I really do like this script btw ) there is no '--help' option. Yes I found '-h' but in my experiences '--help' is more prevalant.
I'm a noob with getopts (this is literally my first time extensively using it), and as I understand it does not support long options. I had a very hacky method to "redirect" all double hyphen "--" options to their short option "-" equivalent, but it had many issues. Any ideas would be appreciated as I do support the need for both --help and --version.
I'm also a huge newbie with hosting on the AUR. Any good guides to getting a package up on there? And where do I put in the copyright-ish stuff? >.>
Why do you have a ton of sub directories in there? I... ugh. Isn't the point of using a VCS to avoid that sort of hackery?
This is my first attempt at dealing with hosting any kind of repository through a VCS, so forgive my design flaws for the moment, if you will. Any suggestions you have would be more than welcome.
I'm trying 1.7.6.4 but `-s` didn't work, I think some `exit` in your Bash code should be removed or to be `return`?
Huh. I guess I should have tested that a little more thoroughly. I see that it doesn't work now. I'll get back to you on that.
Last edited by kittykatt (2010-03-31 00:51:14)
- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -
Offline
Fixed "-s" flag. You were right and it was my many, many unnecessary "exit"s. Thanks.
I'll upload the fix now.
- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -
Offline
Sure be glad to point you to a couple links. Using the AUR is pretty simple.
About Submitting and Maintaining a package in the AUR:
[wiki]AUR#Submitting_Packages_to_UNSUPPORTED[/wiki]
About Creating PKGBUILDS:
[wiki]Creating_Packages[/wiki]
It may look like a bit of details, but really it's pretty straightforward. If unclear on any details, please ask.
Setting Up a Scripting Environment | Proud donor to wikipedia - link
Offline
Sure be glad to point you to a couple links. Using the AUR is pretty simple.
About Submitting and Maintaining a package in the AUR:
[wiki]AUR#Submitting_Packages_to_UNSUPPORTED[/wiki]
About Creating PKGBUILDS:
[wiki]Creating_Packages[/wiki]
It may look like a bit of details, but really it's pretty straightforward. If unclear on any details, please ask.
Thank you VERY much. I'll be using those ASAP.
Also, v1.7.6.5 is out with the -s flag fix. Screenshots should be possible now.
I also reworked the directory structure. Let me know if anyone thinks it's no good.
Last edited by kittykatt (2010-03-31 03:06:02)
- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -
Offline
Uploaded that PKGBUILD. screenFetch is officially in the AUR.
Package Name: screenfetch-git
- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -
Offline
Hi, just trying this out now. Found that your install script doesn't chmod+x /usr/share/screenFetch/latest/screenFetch.
Offline
Yeah, I'm horrible with PKGBUILD's. Tried to add it in there, but failed miserably. If you wanna go ahead and throw me a fixed PKGBUILD that'd be great.
I tried adding...
chmod +x /usr/share/screenFetch/latest/screenFetch
To the end of the file as well as...
chmod +x $pkgdir/usr/bin/screenfetch
But both failed.
I'm a noob at PKGBUILD's. >.>
Also, what'd you think of the script itself? Feedback == Awesome. xD
Last edited by kittykatt (2010-03-31 06:40:14)
- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -
Offline
just chmod +x the file on the git server.
Offline
just chmod +x the file on the git server.
I agreed with this because I cloned your git repo. (I'm not using Arch) and make a symbolic link to the latest. This would be better for me.
Offline
chmodded the file that the PKGBUILD downloads. symlinks absolutely failed to upload to github correctly. >.<
- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -
Offline
Pushed/Committed to v1.7.7
Changes:
- Added FVWM support as per request of goran'agar on these forums. Actual forum post [url=http://bbs.archlinux.org/viewtopic.php?pid=734003#p734003]here[/here].
Latest source: Folder Raw Source
I also added REAL thumbnails to the first post. I'll be updating that post whenever any changes occur.
We're in the AUR! screenfetch-git
Pushed/Committed to v1.7.9
Changes:
- Added support to DETECT the following window managers: DWM, Awesome, and WindowMaker. Currently, none of the theme detections I have for these are fool-proof, so if anyone has any ideas, that'd be amazing.
Latest source: Folder Raw Source
Edit: Holy cheez whiz. screenFetch got featured in the April Article of the ALM. Thank you so very much!
Last edited by kittykatt (2010-04-06 03:01:56)
- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -
Offline
First thanks for this cute proggy
Daenyth wrote:Why do you have a ton of sub directories in there? I... ugh. Isn't the point of using a VCS to avoid that sort of hackery?
This is my first attempt at dealing with hosting any kind of repository through a VCS, so forgive my design flaws for the moment, if you will. Any suggestions you have would be more than welcome.
Actually, using folders like these to store versions is at best VERY BAD it's like you're on subversion days, instead of having folders like these, you should use tags http://www.kernel.org/pub/software/scm/ … t-tag.html a small howto:
$ git tag -s v1.2 -m 'Release Version 1.2'
$ git push --tags
NOTE: the -s tells git to sign (using gpg) the tag, which you should omit if you don't use/have gpg configured..
You can also create tags for the version as they were by appending the hash of latest commit of that version to the end of the git tag command..
If you have questions don't hesitate to ask
Offline
I have a small note about the way you detect window manager or desktop environment etc.. you use pidof to check if it's running, but imagine that there's two or more users with open sessions, one using Gnome, one using Awesome and another using KDE, how would you know which one the current user is running?
To solve this, instead of getting all PIDs of all process matching your search, look for the PIDs under the current user using the pgrep function, example:
userId="$(id -u ${USER})"
for each in $wmnames; do
PID="$(pgrep -U ${userId} $each)
if $PID; then ...
Last edited by eMxyzptlk (2010-04-14 21:55:28)
Offline
Thanks for the suggestions! I never thought about the multiple session/user problem before because I do most of my testing on my laptop. ^^; I'll be sure to integrate that into the next version.
Also, I'll look into those tags. I've revamped the structuring just a bit at the moment, but it's still ugly. I'll have another go at it sometime soon.
- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -
Offline
Detecting the gtk theme doesn't work for me. Specifically, this line:
awk -F"/" '/^include/ { getline; print $5}' $HOME/.gtkrc.mine
returns an empty string or a newline (or something):
2 18:25 asdf@myhost ~
$ awk -F"/" '/^include/ { getline; print $5}' $HOME/.gtkrc.mine
2 18:27 asdf@myhost ~
$
My .gtkrc.mine:
include "/usr/share/themes/Clearlooks/gtk-2.0/gtkrc"
gtk-toolbar-style = GTK_TOOLBAR_ICONS
gtk-icon-theme-name = "gnome"
This works for me:
$ grep '^include.*gtkrc' $HOME/.gtkrc.mine | awk -F "/" '{ print $5 }'
Clearlooks
Also, screenfetch detects two Awesome themes, because of this part of my rc.lua:
$ grep themes .config/awesome/rc.lua
theme_file = awful.util.getdir("config") .. "/themes/default/theme.lua"
--theme_file = "/usr/share/awesome/themes/sky/theme.lua"
Perhaps change this:
Win_theme=`grep -e '\(theme\|beautiful\).*lua' $HOME/.config/awesome/rc.lua
to
Win_theme=`grep -e '^[^-].*\(theme\|beautiful\).*lua' $HOME/.config/awesome/rc.lua
so it ignores any lines that start with a dash.
I set my gtk icon theme in .gtkrc.mine. You could make it look like this:
if [ -f $HOME/.gtkrc.mine ]; then
if grep -q "^include" $HOME/.gtkrc.mine; then
gtkTheme=$(awk -F"/" '/^include/ { getline; print $5}' $HOME/.gtkrc.mine)
fi
+ if grep -q "^gtk-icon-theme-name" $HOME/.gtkrc.mine; then
+ gtkIcons=$(grep 'gtk-icon-theme-name' $HOME/.gtkrc.mine | awk -F '"' '{print $2}')
+ fi
fi
Anyway, here's the diff containing the changes I made: http://pasteit.ghost1227.com/2151
Before:
After:
If I do screenfetch -s more than once a day in the same folder, the old shot is overwritten without any sort of warning. Perhaps make the filename screenFetch-YYYY-MM-DD-hhmmss.png
screenfetch version: 20100413-1
Last edited by francisc1701 (2010-04-18 16:57:56)
Offline
@francisc1701: Thanks for all of the input! I'll look into the bugs you've mentioned and fix them.
Before:
http://omploader.org/tNDcycg
After:
http://omploader.org/tNDcydA
I think you switched those around, because it looks like your "After" screenshot is pretty broken in several places. ^^;
Other than these little bugs, do you like screenFetch so far?
@eMxyzptlk: I've encountered an error. What if the user is using GDM? KDM? LXDM? SLiM? As far as I know, those run the window managers under their own user (I know for a fact that GDM does, tested it today) and therefore it would not sense ANY window manager using the method you posted and that I've integrated. Any ideas there?
Last edited by kittykatt (2010-04-19 02:01:43)
- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -
Offline
francisc1701 wrote:Before:
http://omploader.org/tNDcycg
After:
http://omploader.org/tNDcydAI think you switched those around, because it looks like your "After" screenshot is pretty broken in several places. ^^;
I dunno, they look right to me
Other than these little bugs, do you like screenFetch so far?
Yes, I like it.
Offline
Very good program, I recommend use it to anyone who makes screenshots:)
Offline
OK I do see a few "Oops! that's not good!" things in there. When I did a verbose output I see more.
Keep in mind that this is #! Statler - OpenBox and Xfce as a DM doesn't really exist.
Also I am NOT complaining as this is an ARCH tool, just thought you might like to know.
09:24 ~
$ screenfetch
:: Finding distro...found as 'Debian'
:: Finding kernel version...found as '2.6.32-5-amd64'
:: Finding current uptime...found as '35m'
/home/sector11/bin/screenfetch: line 181: xfce4-settings-manager: command not found
:: Finding desktop environment...found as 'XFCE' <<----- not really there
:: Finding window manager...found as 'OpenBox'
:: Finding window manager theme...found as 'S11-OB3-A2' <<----- S11-OB3-StatlerBox
:: Finding GTK theme...found as 'S11-Window' <<----- S11-OB3-StatlerBox
:: Finding icon theme...found as 'kover' <<----- AnyColorYouLike
:: Finding user font...found as 'Monospace 9'
:: Finding width of terminal...found as '88'
_,met$$$$$gg.
,g$$$$$$$$$$$$$$$P.
,g$$P"" """Y$$.".
,$$P' `$$$. OS: Debian x86_64
',$$P ,ggs. `$$b: Kernel: 2.6.32-5-amd64
`d$$' ,$P"\' . $$$ Uptime: 35m
$$P d$\' , $$P DE: XFCE
$$: $$. - ,d$$' WM: OpenBox
$$\; Y$b._ _,d$P' WM Theme: S11-OB3-A2
Y$$. `.`"Y$$$$P"' GTK Theme: S11-Window
`$$b "-.__ Icon Theme: kover
`Y$$ Font: Monospace 9
`Y$$.
`$$b.
`Y$$b.
`"Y$b._
`""""
09:24 ~
$
Offline