SEARCH

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

You are not logged in.

#1 2013-07-26 08:46:22

Naik
#! Die Hard
From: Leipzig
Registered: 2012-11-16
Posts: 595

[SOLVED] manipulate screenfetch refering to used repos

Hey Folks!

Roumors occuerd that it is totaly "in" nowadays to refer to crunchbang running in the unstable/sid repos as "#!-Animal" which is simply genius as i think!
now i thought of having screenfetch manipulated to take this in account, but looking throught the script i found no place to simply change names...

as far as i could get it the distro release and codename are fetched with

...
# read distro_detect distro_release distro_codename <<< $(lsb_release -sirc)
distro_detect=( $(lsb_release -sirc) )
 if [[ ${#distro_detect[@]} -eq 3 ]]; then
	distro_codename=${distro_detect[2]}
	distro_release=${distro_detect[1]}
	distro_detect=${distro_detect[0]}
...
    elif [[ "${distro_detect}" == "Debian" ]]; then
     if [[ -f /etc/crunchbang-lsb-release || -f /etc/lsb-release-crunchbang ]]; then
	distro="CrunchBang"
     else
	distro="Debian"

and i don`t consider it too complicated to snitch in another if-clause to decide whether it is unstable/sid or not and give the corelating output.
But as things appear it is far too complicated for me!
any help would be hoighly appreciated!!

greetz -naik

Last edited by Naik (2013-07-26 20:13:35)


*kaum macht man es richtig, funktioniert es sofort*

Offline

Help fund CrunchBang, donate to the project!

#2 2013-07-26 13:14:12

shem
#! Member
From: Universe 6.62606957(29)×10−34
Registered: 2012-05-16
Posts: 78

Re: [SOLVED] manipulate screenfetch refering to used repos

You could simply change /etc/lsb-release-crunchbang from

DISTRIB_ID=CrunchBang
DISTRIB_RELEASE=11
DISTRIB_CODENAME=waldorf
DISTRIB_DESCRIPTION="CrunchBang 11 waldorf"

to maybe

DISTRIB_ID=CrunchBang
DISTRIB_RELEASE=ꝏ
DISTRIB_CODENAME=animal
DISTRIB_DESCRIPTION="CrunchBang 11 animal"

Not sure how that infinity-symbol will be interpreted though  wink maybe a 0 would be better.

Last edited by shem (2013-07-26 15:46:43)

Offline

#3 2013-07-26 16:55:03

Naik
#! Die Hard
From: Leipzig
Registered: 2012-11-16
Posts: 595

Re: [SOLVED] manipulate screenfetch refering to used repos

allright!
Thank You for pointing it out shem!

Edit: Or not?

/etc/lsb-release-crunchbang wrote:

DISTRIB_ID=CrunchBang
DISTRIB_RELEASE=11
DISTRIB_CODENAME=waldorf
DISTRIB_DESCRIPTION="CrunchBang 11 waldorf"

but

screenfetch wrote:

OS: CrunchBang unstable sid

and

lsb_release --all wrote:

No LSB modules are available.
Distributor ID:    Debian
Description:    Debian GNU/Linux unstable (sid)
Release:    unstable
Codename:    sid

any further suggestion on where to change it?

thanks though! -naik

Last edited by Naik (2013-07-26 19:51:13)


*kaum macht man es richtig, funktioniert es sofort*

Offline

#4 2013-07-26 20:12:50

Naik
#! Die Hard
From: Leipzig
Registered: 2012-11-16
Posts: 595

Re: [SOLVED] manipulate screenfetch refering to used repos

PROBLEM SOLVED!

tweaking screenfetch from line 294 to:

elif [[ "${distro_detect}" == "Debian" ]]; then
	if [[ -f /etc/crunchbang-lsb-release || -f /etc/lsb-release-crunchbang ]]; then
		distro="CrunchBang"
		if [[ "${distro_release}" == "unstable" ]]; then
			distro_release="ANIMAL"
	         else
			distro_release="${distro_release}"
		fi
	else
        	distro="Debian"
	fi

did the job!

sf2013-07-26_zps398b0c77.png

if anyone wants the hacked script feel free to ask!

greetz and thanks -naik


*kaum macht man es richtig, funktioniert es sofort*

Offline

#5 2013-07-28 13:43:37

shem
#! Member
From: Universe 6.62606957(29)×10−34
Registered: 2012-05-16
Posts: 78

Re: [SOLVED] manipulate screenfetch refering to used repos

Sorry for replying too (?) late, been busy.

I downloaded newest screenfetch-3.0.5.tar.bz2 from http://git.silverirc.com/cgit.cgi/screenfetch.git/, extracted, did chmod +x, moved it elsewhere and ran it (without changing anything in the script):

shem@Nikita-CB:~$ /opt/screenfetch/screenfetch-dev
                                       shem@Nikita-CB
         ███        ███          ███   OS: CrunchBang 0 "CrunchBang Animal"
         ███        ███          ███   Kernel: x86_64 Linux 3.10-1-amd64
         ███        ███          ███   Uptime: 11h 10m
         ███        ███          ███   Packages: 3019
  ████████████████████████████   ███   Shell: bash 4.2.45
  ████████████████████████████   ███   Resolution: 1920x1080
         ███        ███          ███   WM: OpenBox
         ███        ███          ███   WM Theme: waldorf2
         ███        ███          ███   GTK2 Theme: waldorf2
         ███        ███          ███   GTK3 Theme: Adwaita
  ████████████████████████████   ███   Icon Theme: CrunchBang-Dark
  ████████████████████████████   ███   Font: DejaVu Sans Mono 9
         ███        ███                Disk: 1,9T / 2,3T (86%)
         ███        ███                CPU: Intel Core i7-2630QM CPU @ 2GHz
         ███        ███          ███   RAM: 1632MB / 7914MB
         ███        ███          ███  
                                      

(Yeah, I notice the difference in the logo too)

If I run lsb_release --all I get same as you.

I'm not a script-expert and when looking at the script it's not obvious to me where it's gets the distrib-info from (especially how it gets Debian in that elif-line, but I do have more files in /etc that could possibly influence the result:

shem@Nikita-CB:/etc$ cat issue
CrunchBang Linux animal \n \l

shem@Nikita-CB:/etc$ cat issue.distrib
Debian GNU/Linux jessie/sid \n \l

shem@Nikita-CB:/etc$ cat issue.net
CrunchBang Linux animal
shem@Nikita-CB:/etc$ cat issue.net.distrib 
Debian GNU/Linux jessie/sid
shem@Nikita-CB:/etc$ cat lsb-release-crunchbang
DISTRIB_ID=CrunchBang
DISTRIB_RELEASE=0
DISTRIB_CODENAME=Animal
DISTRIB_DESCRIPTION="CrunchBang Animal"

Offline

#6 2013-07-28 21:24:15

Naik
#! Die Hard
From: Leipzig
Registered: 2012-11-16
Posts: 595

Re: [SOLVED] manipulate screenfetch refering to used repos

ok, thats kind of strange...

I have got now idae how you got your /etc/lsb-release-crunchbang to show release = 0 and codename = animal but that obviously is the point where these informations are taken from and so it is no wonder this works for you. did you change your /etc/lsb-release-crunchbang file manually?

I am using an very old version of the script tweaked over and over, but it essentially still does the same as yours, only showing another logo i inserted myself.

-greetz naik


*kaum macht man es richtig, funktioniert es sofort*

Offline

#7 2013-07-29 16:40:39

shem
#! Member
From: Universe 6.62606957(29)×10−34
Registered: 2012-05-16
Posts: 78

Re: [SOLVED] manipulate screenfetch refering to used repos

Yes, changed it manually with

sudo nano /etc/lsb-release-crunchbang

To save changes and exit nano press CTRL-X then Y then RETURN/ENTER

Offline

#8 2013-07-31 21:18:02

Naik
#! Die Hard
From: Leipzig
Registered: 2012-11-16
Posts: 595

Re: [SOLVED] manipulate screenfetch refering to used repos

ah ok...
i knew how to do this allthough i`d probably used geany wink
but only was curiouse about if there would be any scenary where the system would change this by itself...
appearently there isn`t now.

greetz -naik


*kaum macht man es richtig, funktioniert es sofort*

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.
Server: acrobat

Debian Logo