SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2011-01-13 18:13:24

SuNjACk
#! Die Hard
Registered: 2010-05-23
Posts: 538

My "FetchScreen" script

Recently I made a script like screenfetch or arckey but It's colorable big_smile

30446084244305086907_thumb.jpg

#!/bin/zsh
# Script by SuNjACk
# Only for SuNjACk (muahahah! :D)
# Version: 0.2
# GPL License (do what do you what)

# --////////////////////////--
# --// Identify The Infos //--
# --////////////////////////--

# The GTK settings
gtkrc="$HOME/.gtkrc-2.0"
GtkTheme=$( grep "gtk-theme-name" "$gtkrc" | cut -d\" -f2 )
GtkIcon=$( grep "gtk-icon-theme-name" "$gtkrc" | cut -d\" -f2 )
GtkFont=$( grep "gtk-font-name" "$gtkrc" | cut -d\" -f2 )

# The Wallpaper set with nitrogen
nitroconf="$HOME/.config/nitrogen/bg-saved.cfg"
Wallpaper="$( basename $(grep file $nitroconf | cut -d\= -f2 ))"

# Settings from ~/.Xdefaults
xdef="~/.Xdefaults"
TermFont="$(grep 'urxvt\*font' ~/.Xdefaults | cut -d\: -f2- | sed -re 's/xft://g; s/:size=(.*):.*/ \1/g; s/^ *//g')"

# Time and date
time=$( date "+%H.%M")
date=$( date "+%a %d %b" )

# OS
OS=$(cat /etc/issue | sed 's/\\.//g')

# WM version
AwVer=$( awesome --version | head -1 | cut -d' ' -f2 | sed 's/debian\///g' )

# --//////////////////////////////--
# --// Color for the higllights //--
# --//////////////////////////////--

cat-highlights-color () {
#    col=$( echo $1 | sed 's/-c//g' )
    col=${1#-c}
    case $col in
        0)  export H='\e[30m';;
        1)  export H='\e[31m';;
        2)  export H='\e[32m';;
        3)  export H='\e[33m';;
        4)  export H='\e[34m';;
        5)  export H='\e[35m';;
        6)  export H='\e[36m';;
        7)  export H='\e[37m';;
        8)  export H='\e[1;30m';;
        9)  export H='\e[1;31m';;
        10) export H='\e[1;32m';;
        11) export H='\e[1;33m';;
        12) export H='\e[1;34m';;
        13) export H='\e[1;35m';;
        14) export H='\e[1;36m';;
        15) export H='\e[1;37m';;
    esac
}

# --////////////////////////--
# --// Color for the logo //--
# --////////////////////////--

cat-logo-color () {
#    col=$( echo $1 | sed 's/-C//g' )
    col=${1#-C} 
    case $col in
        0)  export L='\e[30m';;
        1)  export L='\e[31m';;
        2)  export L='\e[32m';;
        3)  export L='\e[33m';;
        4)  export L='\e[34m';;
        5)  export L='\e[35m';;
        6)  export L='\e[36m';;
        7)  export L='\e[37m';;
        8)  export L='\e[1;30m';;
        9)  export L='\e[1;31m';;
        10) export L='\e[1;32m';;
        11) export L='\e[1;33m';;
        12) export L='\e[1;34m';;
        13) export L='\e[1;35m';;
        14) export L='\e[1;36m';;
        15) export L='\e[1;37m';;
    esac
}

# --//////////////////////////////--
# --// Different Distros' Logos //--
# --//////////////////////////////--

# null color
NC='\e[0m'

# --// Debian Logo //--
logo-debian () {
    test "$L"  || L='\e[;31m'
    test "$H"  || H='\e[1;34m'
    
    echo -e "
$L          _,edm88888on.$NC
$L       ,d888888888888888P.$NC
$L     ,g88P\"\"       \"\"\"Y88.\".$NC\t$H $time$NC - $date$NC
$L    ,88P'              \`888.$NC\t ${USER} @ ${HOST}$NC
$L   ,88P       ,ggs.     \`88b:$NC
$L   d88'     ,8P\"'   .    888$NC\t GTK Theme »$H $GtkTheme$NC
$L  \`88P      d8'     ,    88P$NC\t GTK Icons »$H $GtkIcon$NC
$L  \`88:      88.   -    ,d88'$NC\t GTK Font  »$H $GtkFont$NC
$L  \`88;      Y8b._   _,d8P'  $NC\t Term Font »$H $TermFont$NC
$L   Y88.    \`.\`\"Y8888P\"'$NC  \t Wallpaper »$H $Wallpaper$NC
$L   \`88b      \"-.__$NC
$L    \`Y88b$NC                   \t OS »$H $OS$NC
$L     \`Y88.$NC                  \t WM »$H Awesome$NC $AwVer
$L       \`88b.$NC
$L         \`Y88b.$NC
$L           \`\"Y8b._$NC
$L               \`\"\"\"\"$NC
"
    }


# --// Crunchbang logo //--
logo-crunch () {
    if [ -z "$L" ]; then L='\e[1;37m' ; fi
    if [ -z "$H" ]; then H='\e[1;34m' ; fi

    echo -e "
$L      888    888       888$NC
$L      888    888       888$NC\t$H $time$NC - $date
$L      888    888       888$NC\t $USER @ $HOST
$L      888    888       888$NC
$L  888888888888888888   888$NC\t GTK Theme »$H $GtkTheme$NC
$L  888888888888888888   888$NC\t GTK Icons »$H $GtkIcon$NC
$L      888    888       888$NC\t GTK Font  »$H $GtkFont$NC
$L      888    888       888$NC\t Term Font »$H $TermFont$NC
$L  888888888888888888   888$NC\t Wallpaper »$H $Wallpaper$NC
$L  888888888888888888   888$NC
$L      888    888          $NC\t OS »$H $OS$NC
$L      888    888       888$NC\t WM »$H Awesome $WmVer$NC
$L      888    888       888$NC
$L      888    888       888$NC
"
    }

# --/////////////////////--
# --// Take Screenshot //--
# --/////////////////////--

take-shot () {
    # quick settings
    shotdir="$HOME/images/shots" # without the final slash
    shotname="shot_%Y-%m-%d_%H-%M-%S.png"
    quality="75" # [0-100]
    delay="5" # in seconds
    #does the shotdir exist?
    if [ ! -d "$shotdir" ]; then mkdir -p "$shotdir"; fi
    # take it!
    scrot "${shotdir}/$shotname" -q $quality -c -d $delay
}

# --//////////////////--
# --// Help Message //--
# --//////////////////--

script_name="$0"
help-message () {
echo "
USAGE: `basename $script_name` [options] [distro]

Options:
    -cn     n indicates the number of the color [0-15] of highlights
    -Cn     n indicates the number of the color [0-15] of logo
    -s      take a scheenshot (with scrot)

Available Distro (for now):
    crunch[bang]
    deb[ian]
"
}

# --///////////////////////--
# --// The Main Function //--
# --///////////////////////--

main () {
# Set the default logo (go down for available logo functions)
execute="logo-crunch"
# It will take screenshot? [0=no 1=yes]
confirm_shot="0"

    for i in "$@" ; do 
        case $i in
            -h|--help)      execute="help-message" ;;
            -c*)     cat-highlights-color $i ;;
            -C*)     cat-logo-color $i ;;
            -s)      confirm_shot="1" ;;
            deb*)    execute="logo-debian";;
            crunch*) execute="logo-crunch";;
            *)       echo -e "Unknow option ${i}\nUse the option -h for help\n\nExiting..." && exit 1;;
        esac
    done

$execute

if [ confirm_shot = "1" ] ; then
    take-shot
fi

}


# --////////////////////--
# --// EXECUTE SCRIPT //--
# --////////////////////--

main "$@"

The program is limited for now.
It read gtk configuration (theme, icon, font) from ~/.gtkrc-2.0 (the path can be changed).
For the wallpaper read the configuration of nitrogen ~/.config/nitrogen/bg-saved.cfg.
Read the .Xdefaults for Urxvt font (maybe I can extend it for terminator but I don't have it, can someone post a example of config?).
the OS from /etc/issue.
For now I don't have a function for identify the wm.
It's use zsh because it's my default shell.

I can extend it with more infos and with more logos but I need the ascii arts.

Enjoy the script. smile
Please signal any bugs.
Compliments and criticisms  are accepted. wink

P.s. sorry for my english, I'm bad at it


"I'd rather run Linux on a 6.5KHz machine through an ARM emulator than run Vista"

Offline

Be excellent to each other!

#2 2011-01-13 18:38:04

rstrcogburn
CrunchRanger
From: The Wild West
Registered: 2010-06-12
Posts: 1,798
Website

Re: My "FetchScreen" script

uh oh.. its out!! will be trying this today..


... and a kind word.  -Duke

Offline

#3 2011-01-13 19:29:31

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,472
Website

Re: My "FetchScreen" script

Change the top line to:

#!/bin/bash

and it works with #! OpenBox - almost - no Awesome here!

Count me as a: beta tester!

  16:12 ~
         $ fetchscreen
/home/sector11/bin/fetchscreen: line 33: awesome: command not found

      888    888       888
      888    888       888     16.12 - Thu 13 Jan
      888    888       888     sector11 @ 
      888    888       888
  888888888888888888   888     GTK Theme » S11-OB3-StatlerBox
  888888888888888888   888     GTK Icons » Shining Reprise
      888    888       888     GTK Font  » Monospace 9
      888    888       888     Term Font » 
  888888888888888888   888     Wallpaper » Something_went_wrong.jpg
  888888888888888888   888
      888    888               OS » CrunchBang Linux statler  
      888    888       888     WM » Awesome 
      888    888       888
      888    888       888


  16:12 ~
         $ 

There is a problem though, I am not using Awesome - pure OpenBox here.

SuNjACk wrote:

I can extend it with more infos and with more logos but I need the ascii arts.

Why not use the ASCII art found in screenfetch?
Be nice and add a commented line:

# ASCII art borrowed from ScreenFetch
# Distro logos and ASCII outputs
case $distro in
  "Arch Linux - Old")
    [ -z $c1 ] && c1="\e[1;37m" # White
    c2="\e[1;34m" # Light Blue
    fulloutput=("$c1              __"
"$c1          _=(SDGJT=_                  $myInfo"
"$c1        _GTDJHGGFCVS)                $OS"
"$c1       ,GTDJGGDTDFBGX0               $kernel"
"$c1      JDJDIJHRORVFSBSVL$c2-=+=,_        $uptime"
"$c1     IJFDUFHJNXIXCDXDSV,$c2  \"DEBL      $myShell"
"$c1    [LKDSDJTDU=OUSCSBFLD.$c2   '?ZWX,   $xResolution"
"$c1   ,LMDSDSWH'     \`DCBOSI$c2     DRDS], $DE"
"$c1   SDDFDFH'         !YEWD,$c2   )HDROD  $WM"
"$c1  !KMDOCG            &GSU|$c2\_GFHRGO\' $WM_theme"
"$c1  HKLSGP'$c2           __$c1\TKM0$c2\GHRBV)'  $GTK_theme"
"$c1 JSNRVW'$c2       __+MNAEC$c1\IOI,$c2\BN'     $GTK_icons"
"$c1 HELK['$c2    __,=OFFXCBGHC$c1\FD)         $GTK_font"
"$c1 ?KGHE $c2\_-#DASDFLSV='$c1    'EF         $GTK_bg"
"$c1 'EHTI                    !H"
"$c1  \`0F'                    '!")
  ;;

  "Arch Linux")
    [ -z $c1 ] && c1="\e[1;36m" # Light
    c2="\e[0;36m" # Dark
    fulloutput=("${c1}                   -\`"
"${c1}                  .o+\`"
"${c1}                 \`ooo/"
"${c1}                \`+oooo:               $myInfo"
"${c1}               \`+oooooo:             $OS"
"${c1}               -+oooooo+:            $kernel"
"${c1}             \`/:-:++oooo+:           $uptime"
"${c1}            \`/++++/+++++++:          $myShell"
"${c1}           \`/++++++++++++++:         $xResolution"
"${c1}          \`/+++o"${c2}"oooooooo"${c1}"oooo/\`       $DE"
"${c2}         "${c1}"./"${c2}"ooosssso++osssssso"${c1}"+\`      $WM"
"${c2}        .oossssso-\`\`\`\`/ossssss+\`     $WM_theme"
"${c2}       -osssssso.      :ssssssso.    $GTK_theme"
"${c2}      :osssssss/        osssso+++.   $GTK_icons"
"${c2}     /ossssssss/        +ssssooo/-   $GTK_font"
"${c2}   \`/ossssso+/:-        -:/+osssso+- $GTK_bg"
"${c2}  \`+sso+:-\`                 \`.-/+oso:"
"${c2} \`++:.                           \`-/+/"
"${c2} .\`                                 \`/")
  ;;

  "Linux Mint")
    [ -z $c1 ] && c1="\e[1;37m" # White
    c2="\e[1;32m" # Bold Green
    fulloutput=("$c2 MMMMMMMMMMMMMMMMMMMMMMMMMmds+."
"$c2 MMm----::-://////////////oymNMd+\`       $myInfo"
"$c2 MMd      "$c1"/++                "$c2"-sNMd:   $OS"
"$c2 MMNso/\`  "$c1"dMM    \`.::-. .-::.\` "$c2".hMN:  $kernel"
"$c2 ddddMMh  "$c1"dMM   :hNMNMNhNMNMNh: "$c2"\`NMm  $uptime"
"$c2     NMm  "$c1"dMM  .NMN/-+MMM+-/NMN\` "$c2"dMM  $myShell"
"$c2     NMm  "$c1"dMM  -MMm  \`MMM   dMM. "$c2"dMM  $xResolution"
"$c2     NMm  "$c1"dMM  -MMm  \`MMM   dMM. "$c2"dMM  $DE"
"$c2     NMm  "$c1"dMM  .mmd  \`mmm   yMM. "$c2"dMM  $WM"
"$c2     NMm  "$c1"dMM\`  ..\`   ...   ydm. "$c2"dMM  $WM_theme"
"$c2     hMM- "$c1"+MMd/-------...-:sdds  "$c2"dMM  $GTK_theme"
"$c2     -NMm- "$c1":hNMNNNmdddddddddy/\`  "$c2"dMM  $GTK_icons"
"$c2      -dMNs-"$c1"\`\`-::::-------.\`\`    "$c2"dMM  $GTK_font"
"$c2       \`/dMNmy+/:-------------:/yMMM  $GTK_bg"
"$c2          ./ydNMMMMMMMMMMMMMMMMMMMMM")
  ;;

  "Ubuntu")
    [ -z $c1 ] && c1="\e[1;37m" # White
    c2="\e[1;31m" # Light Red
    c3="\e[1;33m" # Bold Yellow
    fulloutput=("$c2                          ./+o+-"
"$c1                  yyyyy- $c2-yyyyyy+"
"$c1               $c1://+//////$c2-yyyyyyo      $myInfo"
"$c3           .++ $c1.:/++++++/-$c2.+sss/\`     $OS"
"$c3         .:++o:  $c1/++++++++/:--:/-     $kernel"
"$c3        o:+o+:++.$c1\`..\`\`\`.-/oo+++++/    $uptime"
"$c3       .:+o:+o/.$c1          \`+sssoo+/   $myShell"
"$c1  .++/+:$c3+oo+o:\`$c1             /sssooo.  $xResolution"
"$c1 /+++//+:$c3\`oo+o$c1               /::--:.  $DE"
"$c1 \+/+o+++$c3\`o++o$c2               ++////.  $WM"
"$c1  .++.o+$c3++oo+:\`$c2             /dddhhh.  $WM_theme"
"$c3       .+.o+oo:.$c2          \`oddhhhh+   $GTK_theme"
"$c3        \+.++o+o\`\`-\`\`$c2\`\`.:ohdhhhhh+    $GTK_icons"
"$c3         \`:o+++ $c2\`ohhhhhhhhyo++os:     $GTK_font"
"$c3           .o:$c2\`.syhhhhhhh/$c3.oo++o\`     $GTK_bg"
"$c2               /osyyyyyyo$c3++ooo+++/"
"$c2                   \`\`\`\`\` $c3+oo+++o\:"
"$c3                          \`oo++.")
  ;;

  "Debian")
    [ -z $c1 ] && c1="\e[1;37m" # White
    c2="\e[1;31m" # Light Red
    fulloutput=("  $c1       _,met\$\$\$\$\$gg."
"  $c1    ,g\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$P."
"  $c1  ,g\$\$P\"\"       \"\"\"Y\$\$.\".       $myInfo"
"  $c1 ,\$\$P'              \`\$\$\$.      $OS"
"  $c1',\$\$P       ,ggs.     \`\$\$b:    $kernel"
"  $c1\`d\$\$'     ,\$P\"\'   $c2.$c1    \$\$\$    $uptime"
"  $c1 \$\$P      d\$\'     $c2,$c1    \$\$P    $myShell"
"  $c1 \$\$:      \$\$.   $c2-$c1    ,d\$\$'     $xResolution"
"  $c1 \$\$\;      Y\$b._   _,d\$P'      $DE"
"  $c1 Y\$\$.    $c2\`.$c1\`\"Y\$\$\$\$P\"'          $WM"
"  $c1 \`\$\$b      $c2\"-.__               $WM_theme"
"  $c1  \`Y\$\$                         $GTK_theme"
"  $c1   \`Y\$\$.                       $GTK_icons"
"  $c1     \`\$\$b.                     $GTK_font"
"  $c1       \`Y\$\$b.                  $GTK_bg"
"  $c1          \`\"Y\$b._"
"  $c1              \`\"\"\"\"")
  ;;

  "Crunchbang")
    [ -z $c1 ] && c1="\e[1;37m" # White
    "\e[1;30m" # Dark Gray
    fulloutput=("$c1                ___       ___      _"
"$c1               /  /      /  /     | |  $myInfo"
"$c1              /  /      /  /      | | $OS"
"$c1             /  /      /  /       | | $kernel"
"$c1     _______/  /______/  /______  | | $uptime"
"$c1    /______   _______   _______/  | | $myShell"
"$c1          /  /      /  /          | | $xResolution"
"$c1         /  /      /  /           | | $DE"
"$c1        /  /      /  /            | | $WM"
"$c1 ______/  /______/  /______       | | $WM_theme"
"$c1/_____   _______   _______/       | | $GTK_theme"
"$c1     /  /      /  /               |_| $GTK_icons"
"$c1    /  /      /  /                 _  $GTK_font"
"$c1   /  /      /  /                 | | $GTK_bg"
"$c1  /__/      /__/                  |_|")
  ;;

  "Gentoo")
    [ -z $c1 ] && c1="\e[1;37m" # White
    c2="\e[1;35m" # Light Purple
    fulloutput=("$c2         -/oyddmdhs+:."
"$c2     -o"$c1"dNMMMMMMMMNNmhy+"$c2"-\`"
"$c2   -y"$c1"NMMMMMMMMMMMNNNmmdhy"$c2"+-           $myInfo"
"$c2 \`o"$c1"mMMMMMMMMMMMMNmdmmmmddhhy"$c2"/\`       $OS"
"$c2 om"$c1"MMMMMMMMMMMN"$c2"hhyyyo"$c1"hmdddhhhd"$c2"o\`     $kernel"
"$c2.y"$c1"dMMMMMMMMMMd"$c2"hs++so/s"$c1"mdddhhhhdm"$c2"+\`   $uptime"
"$c2 oy"$c1"hdmNMMMMMMMN"$c2"dyooy"$c1"dmddddhhhhyhN"$c2"d.  $myShell"
"$c2  :o"$c1"yhhdNNMMMMMMMNNNmmdddhhhhhyym"$c2"Mh  $xResolution"
"$c2    .:"$c1"+sydNMMMMMNNNmmmdddhhhhhhmM"$c2"my  $DE"
"$c2       /m"$c1"MMMMMMNNNmmmdddhhhhhmMNh"$c2"s:  $WM"
"$c2    \`o"$c1"NMMMMMMMNNNmmmddddhhdmMNhs"$c2"+\`   $WM_theme"
"$c2  \`s"$c1"NMMMMMMMMNNNmmmdddddmNMmhs"$c2"/.     $GTK_theme"
"$c2 /N"$c1"MMMMMMMMNNNNmmmdddmNMNdso"$c2":\`       $GTK_icons"
"$c2+M"$c1"MMMMMMNNNNNmmmmdmNMNdso"$c2"/-          $GTK_font"
"$c2yM"$c1"MNNNNNNNmmmmmNNMmhs+/"$c2"-\`              $GTK_bg"
"$c2/h"$c1"MMNNNNNNNNMNdhs++/"$c2"-\`"
"$c2\`/"$c1"ohdmmddhys+++/:"$c2".\`"
"$c2  \`-//////:--.")
  ;;

  "Fedora")
    [ -z $c1 ] && c1="\e[1;37m" # White
    c2="\e[1;34m" # Light Blue
    fulloutput=("$c2           :/------------://"
"$c2        :------------------://"
"$c2      :-----------"$c1"/shhdhyo/"$c2"-://"
"$c2    /-----------"$c1"omMMMNNNMMMd/"$c2"-:/      $myInfo"
"$c2   :-----------"$c1"sMMMdo:/"$c2"       -:/    $OS"
"$c2  :-----------"$c1":MMMd"$c2"-------    --:/   $kernel"
"$c2  /-----------"$c1":MMMy"$c2"-------    ---/   $uptime"
"$c2 :------    --"$c1"/+MMMh/"$c2"--        ---:  $myShell"
"$c2 :---     "$c1"oNMMMMMMMMMNho"$c2"     -----:  $xResolution"
"$c2 :--      "$c1"+shhhMMMmhhy++"$c2"   ------:   $DE"
"$c2 :-      -----"$c1":MMMy"$c2"--------------/   $WM"
"$c2 :-     ------"$c1"/MMMy"$c2"-------------:    $WM_theme"
"$c2 :-      ----"$c1"/hMMM+"$c2"------------:     $GTK_theme"
"$c2 :--"$c1":dMMNdhhdNMMNo"$c2"-----------:       $GTK_icons"
"$c2 :---"$c1":sdNMMMMNds:"$c2"----------:         $GTK_font"
"$c2 :------"$c1":://:"$c2"-----------://          $GTK_bg"
"$c2 :--------------------://")
  ;;

  "BSD")
    [ -z $c1 ] && c1="\e[1;37m" # White
    c2="\e[1;31m" # Light Red
    fulloutput=("$c2              ,        ,"
"$c2             /(        )\`"
"$c2             \ \___   / |"
"$c2             /- "$c1"_$c2  \`-/  '"
"$c2            ($c1/\/ \ $c2\   /\\       $myInfo"
"$c1            / /   |$c2 \`    \\     $OS"
"$c1            O O   )$c2 /    |     $kernel"
"$c1            \`-^--'\`$c2<     '     $uptime"
"$c2           (_.)  _  )   /      $myShell"
"$c2            \`.___/\`    /       $xResolution"
"$c2              \`-----' /        $DE"
"$c1 <----.     "$c2"__/ __   \\         $WM"
"$c1 <----|===="$c2"O}}}$c1==$c2} \} \/$c1====   $WM_theme"
"$c1 <----'    $c2\`--' \`.__,' \\       $GTK_theme"
"$c2              |        |       $GTK_icons"
"$c2               \       /       /\\ $GTK_font"
"$c2          ______( (_  / \______/  $GTK_bg"
"$c2        ,'  ,-----'   |"
"$c2        \`--{__________)")
  ;;

  "Mandriva"|"Mandrake")
    c1="\e[1;34m" # Light Blue
    c2="\e[1;33m" # Bold Yellow
    fulloutput=("$c2                         \`\`"
"$c2                        \`-.                 $myInfo"
"$c1       \`               $c2.---                $OS"
"$c1     -/               $c2-::--\`               $kernel"
"$c1   \`++    $c2\`----...\`\`\`-:::::.               $uptime"
"$c1  \`os.      $c2.::::::::::::::-\`\`\`     \`  \`   $myShell"
"$c1  +s+         $c2.::::::::::::::::---...--\`   $xResolution"
"$c1 -ss:          $c2\`-::::::::::::::::-.\`\`.\`\`   $DE"
"$c1 /ss-           $c2.::::::::::::-.\`\`   \`      $WM"
"$c1 +ss:          $c2.::::::::::::-              $WM_theme"
"$c1 /sso         $c2.::::::-::::::-              $GTK_theme"
"$c1 .sss/       $c2-:::-.\`   .:::::              $GTK_icons"
"$c1  /sss+.    $c2..\`$c1  \`--\`    $c2.:::              $GTK_font"
"$c1   -ossso+/:://+/-\`        $c2.:\`             $GTK_bg"
"$c1     -/+ooo+/-.              $c2\`")
  ;;

  "Red Hat Linux")
    [ -z $c1 ] && c1="\e[1;37m" # White
    c2="\e[1;31m" # Light Red
    fulloutput=("$c2              \`.-..........\`"
"$c2             \`////////::.\`-/."
"$c2             -: ....-////////.               $myInfo"
"$c2             //:-::///////////\`             $OS"
"$c2      \`--::: \`-://////////////:             $kernel"
"$c2      //////-    \`\`.-:///////// .\`          $uptime"
"$c2      \`://////:-.\`    :///////::///:\`       $myShell"
"$c2        .-/////////:---/////////////:       $xResolution"
"$c2           .-://////////////////////.       $DE"
"$c1          yMN+\`.-$c2::///////////////-\`        $WM"
"$c1       .-\`:NMMNMs\`  \`..-------..\`           $WM_theme"
"$c1        MN+/mMMMMMhoooyysshsss              $GTK_theme"
"$c1 MMM    MMMMMMMMMMMMMMyyddMMM+              $GTK_icons"
"$c1  MMMM   MMMMMMMMMMMMMNdyNMMh\`     hyhMMM   $GTK_font"
"$c1   MMMMMMMMMMMMMMMMyoNNNMMM+.   MMMMMMMM    $GTK_bg"
"$c1    MMNMMMNNMMMMMNM+ mhsMNyyyyMNMMMMsMM")
  ;;

  *)
    [ -z $c1 ] && c1="\e[1;37m" # White
    c2="\e[1;30m" # Light Gray
    c3="\e[1;33m" # Light Yellow
    fulloutput=("                             $myInfo"
"$c2         #####$c0              $OS"
"$c2        #######             $kernel"
"$c2        ##"$c1"O$c2#"$c1"O$c2##             $uptime"
"$c2        #$c3#####$c2#             $myShell"
"$c2      ##$c1##$c3###$c1##$c2##           $xResolution"
"$c2     #$c1##########$c2##          $DE"
"$c2    #$c1############$c2##         $WM"
"$c2    #$c1############$c2###        $WM_theme"
"$c3   ##$c2#$c1###########$c2##$c3#        $GTK_theme"
"$c3 ######$c2#$c1#######$c2#$c3######      $GTK_icons"
"$c3 #######$c2#$c1#####$c2#$c3#######      $GTK_font"
"$c3   #####$c2#######$c3#####        $GTK_bg"
"$c0")
  ;;
esac

Now I need to check and see why Screenfetch says I'm Debian, while your FetchScreen says I'm CrunchBang!

  16:12 ~
         $ screenfetch
         _,met$$$$$gg.
      ,g$$$$$$$$$$$$$$$P.
    ,g$$P""       """Y$$.".       sector11@sector11
   ,$$P'              `$$$.       OS: Debian x86_64
  ',$$P       ,ggs.     `$$b:     Kernel: 2.6.32-5-amd64
  `d$$'     ,$P"\'   .    $$$     Uptime: 7h 49m
   $$P      d$\'     ,    $$P     Shell: bash
   $$:      $$.   -    ,d$$'      Resolution: 1280x1024
   $$\;      Y$b._   _,d$P'       DE: Not Present
   Y$$.    `.`"Y$$$$P"'           WM: OpenBox
   `$$b      "-.__                WM Theme: S11-OB3-A2
    `Y$$                          GTK Theme: S11-OB3-StatlerBox
     `Y$$.                        Icon Theme: Shining Reprise
       `$$b.                      Font: Monospace 9
         `Y$$b.                  
            `"Y$b._
                `""""

  16:33 ~
         $ screenfetch-dev
         _,met$$$$$gg.
      ,g$$$$$$$$$$$$$$$P.
    ,g$$P""       """Y$$.".       sector11@sector11
   ,$$P'              `$$$.       OS: Debian n/a x86_64
  ',$$P       ,ggs.     `$$b:     Kernel: 2.6.32-5-amd64
  `d$$'     ,$P"'   .    $$$     Uptime: 7h 50m
   $$P      d$'     ,    $$P     Shell: bash
   $$:      $$.   -    ,d$$'      Resolution: 1280x1024
   $$\;      Y$b._   _,d$P'       DE: Not Present
   Y$$.    `.`"Y$$$$P"'           WM: OpenBox
   `$$b      "-.__                WM Theme: S11-OB3-A2
    `Y$$                          GTK Theme: S11-OB3-StatlerBox
     `Y$$.                        Icon Theme: Shining Reprise
       `$$b.                      Font: Monospace 9
         `Y$$b.                   BG: Something_went_wrong.jpg
            `"Y$b._
                `""""

  16:33 ~
         $ 

Last edited by Sector11 (2011-01-13 19:36:21)

Online

#4 2011-01-13 20:12:57

SuNjACk
#! Die Hard
Registered: 2010-05-23
Posts: 538

Re: My "FetchScreen" script

For the shell changing there no problem, I have only to change $HOST to $HOSTNAME.

The logos are OK, I have only to work on it to make it colorable.

I have already checked the distro detection of screenfetch
screenfetch use lsb_realese, if lsb_release fail it will check the presence of  some specific file

I only fetch the os from /etc/issue

Thanks Sector11

EDIT: for WM detection I will use the same method of screenfetch

Last edited by SuNjACk (2011-01-13 20:20:39)


"I'd rather run Linux on a 6.5KHz machine through an ARM emulator than run Vista"

Offline

#5 2011-01-19 01:48:05

gutterslob
#! Resident Bum
Registered: 2009-11-03
Posts: 2,671

Re: My "FetchScreen" script

Good stuff, Jacko.
Big thanks for sharing smile


Point & Squirt

Offline

#6 2012-02-02 22:04:32

kittykatt
New Member
From: Missouri, USA
Registered: 2009-10-31
Posts: 7
Website

Re: My "FetchScreen" script

Hey there. KittyKatt here, creator of screenFetch. Very cool. big_smile

I may steal some ideas, if you don't mind. Also, still curious why mine is detectin CrunchBang wrong. i will need to boot up a live CD to figure that one out, I think.

Keep up the good work and let me know if you need any help. Always willing to help similar projects. smile


- [ My deviantArt ] | [ My Blog ] | [ screenFetch ] | [ SilverIRC ] -

Offline

#7 2012-02-03 10:19:30

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: My "FetchScreen" script

^ so nice of you to join us!

Offline

#8 2012-02-03 15:04:58

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,472
Website

Re: My "FetchScreen" script

kittykatt wrote:

Hey there. KittyKatt here, creator of screenFetch. Very cool. big_smile

I may steal some ideas, if you don't mind. Also, still curious why mine is detectin CrunchBang wrong. i will need to boot up a live CD to figure that one out, I think.

Keep up the good work and let me know if you need any help. Always willing to help similar projects. smile

Hey there kittykatt how ya doing!  Welcome to #!
Nice to see you here.  As you know I've been using 'sf' for a while now.

  12:03:35 ~
         $ cb
basename: extra operand `/media/5/Wallpapers/Stream-100.jpg'
Try `basename --help' for more information.

      ###    ###       !!!
      ###    ###       !!!     12.03 - Fri 03 Feb
      ###    ###       !!!     User      » sector11 @ 
      ###    ###       !!!
  ##################   !!!     GTK Theme » statler
  ##################   !!!     GTK Icons » LinuxLex-BlackWhite
      ###    ###       !!!     GTK Font  » Liberation Sans 10
      ###    ###       !!!     Term Font » 
  ##################   !!!     Wallpaper » 
  ##################   !!!
      ###    ###               OS        » CrunchBang Linux statler  
      ###    ###       !!!     WM        » OpenBox
      ###    ###       !!!
      ###    ###       !!!


  12:03:39 ~
         $ sf
         _,met$$$$$gg.
      ,g$$$$$$$$$$$$$$$P.
    ,g$$P""       """Y$$.".     sector11@sector11
   ,$$P'              `$$$.     OS: Debian wheezy x86_64
  ',$$P       ,ggs.     `$$b:     Kernel: 3.1.0-8.dmz.1-liquorix-amd64
  `d$$'     ,$P"'   .    $$$     Uptime: 1h 59m
   $$P      d$'     ,    $$P     Shell: bash
   $$:      $$.   -    ,d$$'     Resolution: 1280x1024
   $$\;      Y$b._   _,d$P'     DE: Not Present
   Y$$.    `.`"Y$$$$P"'         WM: OpenBox
   `$$b      "-.__         WM Theme: S11-SR-71-Black
    `Y$$             GTK Theme: statler
     `Y$$.             Icon Theme: LinuxLex-BlackWhite
       `$$b.             Font: Liberation Sans 10
         `Y$$b.            
            `"Y$b._
                `""""

  12:03:49 ~
         $ 

Just noticed my fetchscreen (cb) isn't working right.  sad

Online

#9 2012-02-03 15:16:51

kittykatt
New Member
From: Missouri, USA
Registered: 2009-10-31
Posts: 7
Website

Re: My "FetchScreen" script

Glad to see you're still using it, Sector. I remember you posting in the Arch forums. By the way, I may or may not have actually managed to make a DEB package from screenFetch. I'll post it if anyone's interested. smile

@OP:  Feel free to use the layout I did for fetchscreen if you want to make a DEB. You may also use my ASCII logos, if you would like. ^^;

Last edited by kittykatt (2012-02-03 15:19:25)


- [ My deviantArt ] | [ My Blog ] | [ screenFetch ] | [ SilverIRC ] -

Offline

#10 2012-02-03 15:33:42

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,472
Website

Re: My "FetchScreen" script

kittykatt wrote:

Glad to see you're still using it, Sector. I remember you posting in the Arch forums. By the way, I may or may not have actually managed to make a DEB package from screenFetch. I'll post it if anyone's interested. smile

@OP:  Feel free to use the layout I did for fetchscreen if you want to make a DEB. You may also use my ASCII logos, if you would like. ^^;

One of the nice things I've liked about screenfetch from the beginning is; it's a bash script, it can go anywhere.  Why make it a deb?

But - saying that if you make it, I'll test it.  big_smile

SuNjACk is a nice guy, I think you two will get along just fine.

Maybe if you tow collaborate there will be a spawn: SuperScreen

Online

#11 2012-02-03 15:48:45

kittykatt
New Member
From: Missouri, USA
Registered: 2009-10-31
Posts: 7
Website

Re: My "FetchScreen" script

Sector11 wrote:
kittykatt wrote:

Glad to see you're still using it, Sector. I remember you posting in the Arch forums. By the way, I may or may not have actually managed to make a DEB package from screenFetch. I'll post it if anyone's interested. smile

@OP:  Feel free to use the layout I did for fetchscreen if you want to make a DEB. You may also use my ASCII logos, if you would like. ^^;

One of the nice things I've liked about screenfetch from the beginning is; it's a bash script, it can go anywhere.  Why make it a deb?

But - saying that if you make it, I'll test it.  big_smile

SuNjACk is a nice guy, I think you two will get along just fine.

Maybe if you tow collaborate there will be a spawn: SuperScreen

...SuperScreen. I like it. xD

I've had requests for a .deb in the past, so I figured I'd finally just sit down and do it. It's my first debian-based package I've EVER made. So, it probably sucks lolz. Anyways, feel free to test it:

http://served.kittykatt.us/projects/scr … -2.3.9.deb


- [ My deviantArt ] | [ My Blog ] | [ screenFetch ] | [ SilverIRC ] -

Offline

#12 2012-02-03 18:12:59

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,472
Website

Re: My "FetchScreen" script

@ kittykatt

Yea, SuperScreen has a nice ring to it.

kittykatt wrote:

I've had requests for a .deb in the past, so I figured I'd finally just sit down and do it. It's my first debian-based package I've EVER made. So, it probably sucks lolz. Anyways, feel free to test it:

http://served.kittykatt.us/projects/scr … -2.3.9.deb

I'll try it ... have fire extinguisher ready just in case....  big_smile

It works:

  15:18:13 ~
         $ screenfetch
         _,met$$$$$gg.
      ,g$$$$$$$$$$$$$$$P.
    ,g$$P""       """Y$$.".     sector11@sector11
   ,$$P'              `$$$.     OS: Debian wheezy x86_64
  ',$$P       ,ggs.     `$$b:     Kernel: 3.1.0-8.dmz.1-liquorix-amd64
  `d$$'     ,$P"'   .    $$$     Uptime: 5h 13m
   $$P      d$'     ,    $$P     Shell: bash
   $$:      $$.   -    ,d$$'     Resolution: 1280x1024
   $$\;      Y$b._   _,d$P'     DE: Not Present
   Y$$.    `.`"Y$$$$P"'         WM: OpenBox
   `$$b      "-.__         WM Theme: S11-SR-71-Black
    `Y$$             GTK Theme: statler
     `Y$$.             Icon Theme: LinuxLex-BlackWhite
       `$$b.             Font: Liberation Sans 10
         `Y$$b.            
            `"Y$b._
                `""""

  15:18:22 ~
         $ screenfetch -V
screenFetch - Version 2.3.9
{snip}

  15:19:22 ~
         $ 

In the terminal the lines are lined up!

Last edited by Sector11 (2012-02-03 18:24:19)

Online

#13 2012-02-03 21:24:49

kittykatt
New Member
From: Missouri, USA
Registered: 2009-10-31
Posts: 7
Website

Re: My "FetchScreen" script

Sector11 wrote:

@ kittykatt

Yea, SuperScreen has a nice ring to it.

kittykatt wrote:

I've had requests for a .deb in the past, so I figured I'd finally just sit down and do it. It's my first debian-based package I've EVER made. So, it probably sucks lolz. Anyways, feel free to test it:

http://served.kittykatt.us/projects/scr … -2.3.9.deb

I'll try it ... have fire extinguisher ready just in case....  big_smile

It works:

  15:18:13 ~
         $ screenfetch
         _,met$$$$$gg.
      ,g$$$$$$$$$$$$$$$P.
    ,g$$P""       """Y$$.".     sector11@sector11
   ,$$P'              `$$$.     OS: Debian wheezy x86_64
  ',$$P       ,ggs.     `$$b:     Kernel: 3.1.0-8.dmz.1-liquorix-amd64
  `d$$'     ,$P"'   .    $$$     Uptime: 5h 13m
   $$P      d$'     ,    $$P     Shell: bash
   $$:      $$.   -    ,d$$'     Resolution: 1280x1024
   $$\;      Y$b._   _,d$P'     DE: Not Present
   Y$$.    `.`"Y$$$$P"'         WM: OpenBox
   `$$b      "-.__         WM Theme: S11-SR-71-Black
    `Y$$             GTK Theme: statler
     `Y$$.             Icon Theme: LinuxLex-BlackWhite
       `$$b.             Font: Liberation Sans 10
         `Y$$b.            
            `"Y$b._
                `""""

  15:18:22 ~
         $ screenfetch -V
screenFetch - Version 2.3.9
{snip}

  15:19:22 ~
         $ 

In the terminal the lines are lined up!


Are you actually on Debian?

And I guess that's just the spacing getting screwed up from the \[code\] tags.


- [ My deviantArt ] | [ My Blog ] | [ screenFetch ] | [ SilverIRC ] -

Offline

#14 2012-02-03 22:42:04

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 7,472
Website

Re: My "FetchScreen" script

kittykatt wrote:

Are you actually on Debian?

And I guess that's just the spacing getting screwed up from the \[code\] tags.

#! Crunchbang Statler updated to Debian Wheezy via the smxi scripts in my sig.

It's still #! to me, all of the #! scripts are here.
And ... yes:
f1f13b173043106.jpg

Last edited by Sector11 (2012-02-03 22:45:50)

Online

#15 2012-02-08 11:52:35

kittykatt
New Member
From: Missouri, USA
Registered: 2009-10-31
Posts: 7
Website

Re: My "FetchScreen" script

Glad to see that working right (kinda tongue).

Anyways, once again, I'm willing to help in any way I can with this, if requested. I'll stop threadjacking now. tongue


- [ My deviantArt ] | [ My Blog ] | [ screenFetch ] | [ SilverIRC ] -

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo