screenfetch 212 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393
  1. #!/usr/bin/env bash
  2. # screenFetch - a CLI Bash script to show system/theme info in screenshots
  3. # Copyright (c) 2010-2017 Brett Bohnenkamper <kittykatt@kittykatt.us>
  4. # This program is free software: you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation, either version 3 of the License, or
  7. # (at your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. # Yes, I do realize some of this is horribly ugly coding. Any ideas/suggestions would be
  17. # appreciated by emailing me or by stopping by http://github.com/KittyKatt/screenFetch. You
  18. # could also drop in on the IRC channel at irc://irc.rizon.net/screenFetch.
  19. # to put forth suggestions/ideas. Thank you.
  20. # Requires: bash 4.0+
  21. # Optional dependencies: xorg-xdpyinfo (resoluton detection)
  22. # scrot (screenshot taking)
  23. # curl (screenshot uploading)
  24. #LANG=C
  25. #LANGUAGE=C
  26. #LC_ALL=C
  27. scriptVersion="3.8.0"
  28. ######################
  29. # Settings for fetcher
  30. ######################
  31. # This setting controls what ASCII logo is displayed.
  32. distro="Milis Linux 1.0 Atilla"
  33. # This sets the information to be displayed. Available: distro, Kernel, DE, WM, Win_theme, Theme, Icons, Font, Background, ASCII. To get just the information, and not a text-art logo, you would take "ASCII" out of the below variable.
  34. #display="distro host kernel uptime pkgs shell res de wm wmtheme gtk disk cpu gpu mem"
  35. valid_display=( distro host kernel uptime pkgs shell res de wm wmtheme gtk disk cpu gpu mem )
  36. display=( distro host kernel uptime pkgs shell res de wm wmtheme gtk cpu gpu mem )
  37. # Display Type: ASCII or Text
  38. display_type="ASCII"
  39. # Plain logo
  40. display_logo="no"
  41. # Colors to use for the information found. These are set below according to distribution. If you would like to set your OWN color scheme for these, uncomment the lines below and edit them to your heart's content.
  42. # textcolor="\e[0m"
  43. # labelcolor="\e[1;34m"
  44. # WM & DE process names
  45. # Removed WM's: compiz
  46. wmnames=( fluxbox openbox blackbox xfwm4 metacity kwin twin icewm pekwm flwm flwm_topside fvwm dwm awesome wmaker stumpwm musca xmonad.* i3 ratpoison scrotwm spectrwm wmfs wmii beryl subtle e16 enlightenment sawfish emerald monsterwm dminiwm compiz Finder herbstluftwm howm notion bspwm cinnamon 2bwm echinus swm budgie-wm dtwm 9wm chromeos-wm deepin-wm sway )
  47. denames=( gnome-session xfce-mcs-manage xfce4-session xfconfd ksmserver lxsession lxqt-session gnome-settings-daemon mate-session mate-settings-daemon Finder deepin )
  48. # Screenshot Settings
  49. # This setting lets the script know if you want to take a screenshot or not. 1=Yes 0=No
  50. screenshot=
  51. # This setting lets the script know if you want to upload the screenshot to a filehost. 1=Yes 0=No
  52. upload=
  53. # This setting lets the script know where you would like to upload the file to. Valid hosts are: teknik, mediacrush, imgur, hmp, and a configurable local.
  54. uploadLoc=
  55. # You can specify a custom screenshot command here. Just uncomment and edit. Otherwise, we'll be using the default command: scrot -cd3.
  56. # screenCommand="scrot -cd5"
  57. shotfile=$(printf "screenFetch-`date +'%Y-%m-%d_%H-%M-%S'`.png")
  58. # Verbose Setting - Set to 1 for verbose output.
  59. verbosity=
  60. # The below function will allow you to add custom lines of text to the screenfetch output.
  61. # It will automatically be executed at the right moment if use_customlines is set to 1.
  62. use_customlines=
  63. customlines () {
  64. # The following line can serve as an example.
  65. # feel free to let the computer generate the output: e. g. using $(cat /etc/motd) or $(upower -d | grep THISORTHAT)
  66. # In the example cutom0 line replace <YOUR LABEL> and <your text> with options specified by you.
  67. # Also make sure the $custom0 variable in out_array=... matches the one at the beginning of the line
  68. #
  69. custom0=$(echo -e "$labelcolor YOUR LABEL:$textcolor your text"); out_array=( "${out_array[@]}" "$custom0" ); ((display_index++));
  70. # Battery percentage and time to full/empty:
  71. # (uncomment lines below to use)
  72. #
  73. #custom1=$(echo -e "$labelcolor Battery:$textcolor $(upower -d | grep percentage | head -n1 | cut -d ' ' -f 15-)"); out_array=( "${out_array[@]}" "$custom1" ); ((display_index++));
  74. #if [ "$(upower -d | grep time)" ]; then
  75. # battery_time="$(upower -d | grep time | head -n1 | cut -d ' ' -f 14-) $(upower -d | grep time | head -n1 | cut -d ' ' -f 6-7 | cut -d ':' -f1)"
  76. #else
  77. # battery_time="power supply plugged in"
  78. #fi
  79. #custom2=$(echo -e "$labelcolor $(echo ' `->')$textcolor $battery_time"); out_array=( "${out_array[@]}" "$custom2" ); ((display_index++));
  80. # Display public IP:
  81. #custom3=$(echo -e "$labelcolor Public IP:$textcolor $(curl -s ipinfo.io/ip)"); out_array=( "${out_array[@]}" "$custom3" ); ((display_index++));
  82. ###########################################
  83. ## MY CUSTOM LINES
  84. ###########################################
  85. #custom4=...
  86. }
  87. #############################################
  88. #### CODE No need to edit past here CODE ####
  89. #############################################
  90. #########################################
  91. # Static Variables and Common Functions #
  92. #########################################
  93. c0="\033[0m" # Reset Text
  94. bold="\033[1m" # Bold Text
  95. underline="\033[4m" # Underline Text
  96. display_index=0
  97. # User options
  98. gtk_2line="no"
  99. # Static Color Definitions
  100. colorize () {
  101. printf "\033[38;5;$1m"
  102. }
  103. getColor () {
  104. if [[ -n "$1" ]]; then
  105. if [[ ${BASH_VERSINFO[0]} -ge 4 ]]; then
  106. if [[ ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -gt 1 ]] || [[ ${BASH_VERSINFO[0]} -gt 4 ]]; then
  107. tmp_color=${1,,}
  108. else
  109. tmp_color="$(tr '[:upper:]' '[:lower:]' <<< ${1})"
  110. fi
  111. else
  112. tmp_color="$(tr '[:upper:]' '[:lower:]' <<< ${1})"
  113. fi
  114. case "${tmp_color}" in
  115. 'black') color_ret='\033[0m\033[30m';;
  116. 'red') color_ret='\033[0m\033[31m';;
  117. 'green') color_ret='\033[0m\033[32m';;
  118. 'brown') color_ret='\033[0m\033[33m';;
  119. 'blue') color_ret='\033[0m\033[34m';;
  120. 'purple') color_ret='\033[0m\033[35m';;
  121. 'cyan') color_ret='\033[0m\033[36m';;
  122. 'yellow') color_ret='\033[0m\033[1;33m';;
  123. 'white') color_ret='\033[0m\033[1;37m';;
  124. 'dark grey') color_ret='\033[0m\033[1;30m';;
  125. 'light red') color_ret='\033[0m\033[1;31m';;
  126. 'light green') color_ret='\033[0m\033[1;32m';;
  127. 'light blue') color_ret='\033[0m\033[1;34m';;
  128. 'light purple') color_ret='\033[0m\033[1;35m';;
  129. 'light cyan') color_ret='\033[0m\033[1;36m';;
  130. 'light grey') color_ret='\033[0m\033[37m';;
  131. # Some 256 colors
  132. 'orange') color_ret="$(colorize '202')";;
  133. # HaikuOS
  134. 'black_haiku') color_ret="$(colorize '7')";;
  135. #ROSA color
  136. 'rosa_blue') color_ret='\033[01;38;05;25m';;
  137. esac
  138. [[ -n "${color_ret}" ]] && echo "${color_ret}"
  139. else
  140. :
  141. fi
  142. }
  143. verboseOut () {
  144. if [[ "$verbosity" -eq "1" ]]; then
  145. printf "\033[1;31m:: \033[0m$1\n"
  146. fi
  147. }
  148. errorOut () {
  149. printf "\033[1;37m[[ \033[1;31m! \033[1;37m]] \033[0m$1\n"
  150. }
  151. stderrOut () {
  152. while IFS='' read -r line; do printf "\033[1;37m[[ \033[1;31m! \033[1;37m]] \033[0m${line}\n"; done
  153. }
  154. ####################
  155. # Color Defines
  156. ####################
  157. colorNumberToCode () {
  158. number="$1"
  159. if [[ "${number}" == "na" ]]; then
  160. unset code
  161. elif [[ $(tput colors) -eq "256" ]]; then
  162. code=$(colorize "${number}")
  163. else
  164. case "$number" in
  165. 0|00) code=$(getColor 'black');;
  166. 1|01) code=$(getColor 'red');;
  167. 2|02) code=$(getColor 'green');;
  168. 3|03) code=$(getColor 'brown');;
  169. 4|04) code=$(getColor 'blue');;
  170. 5|05) code=$(getColor 'purple');;
  171. 6|06) code=$(getColor 'cyan');;
  172. 7|07) code=$(getColor 'light grey');;
  173. 8|08) code=$(getColor 'dark grey');;
  174. 9|09) code=$(getColor 'light red');;
  175. 10) code=$(getColor 'light green');;
  176. 11) code=$(getColor 'yellow');;
  177. 12) code=$(getColor 'light blue');;
  178. 13) code=$(getColor 'light purple');;
  179. 14) code=$(getColor 'light cyan');;
  180. 15) code=$(getColor 'white');;
  181. *) unset code;;
  182. esac
  183. fi
  184. echo -n "${code}"
  185. }
  186. detectColors () {
  187. my_colors=$(sed 's/^,/na,/;s/,$/,na/;s/,/ /' <<< "${OPTARG}")
  188. my_lcolor=$(awk -F' ' '{print $1}' <<< "${my_colors}")
  189. my_lcolor=$(colorNumberToCode "${my_lcolor}")
  190. my_hcolor=$(awk -F' ' '{print $2}' <<< "${my_colors}")
  191. my_hcolor=$(colorNumberToCode "${my_hcolor}")
  192. }
  193. supported_distros="Alpine Linux, Antergos, Arch Linux (Old and Current Logos), BLAG, BunsenLabs, CentOS, Chakra, Chapeau, Chrome OS, Chromium OS, CrunchBang, CRUX, Debian, Deepin, DesaOS,Devuan, Dragora, elementary OS, Evolve OS, Exherbo, Fedora, Frugalware, Fuduntu, Funtoo, Fux, Gentoo, gNewSense, Jiyuu Linux, Kali Linux, KaOS, KDE neon, Kogaion, Korora, LinuxDeepin, Linux Mint, LMDE, Logos, Mageia, Mandriva/Mandrake, Manjaro, Mer, Netrunner, NixOS, openSUSE, Oracle Linux, Parabola GNU/Linux-libre, Pardus, Parrot Security, PCLinuxOS, PeppermintOS, Qubes OS, Raspbian, Red Hat Enterprise Linux, ROSA, Sabayon, SailfishOS, Scientific Linux, Slackware, Solus, SparkyLinux, SteamOS, SUSE Linux Enterprise, SwagArch, TinyCore, Trisquel, Ubuntu, Viperr and Void."
  194. supported_other="Dragonfly/Free/Open/Net BSD, Haiku, Mac OS X, Windows+Cygwin and Windows+MSYS2."
  195. supported_dms="KDE, GNOME, Unity, Xfce, LXDE, Cinnamon, MATE, Deepin, CDE, RazorQt and Trinity."
  196. supported_wms="2bwm, 9wm, Awesome, Beryl, Blackbox, Cinnamon, chromeos-wm, Compiz, deepin-wm, dminiwm, dwm, dtwm, E16, E17, echinus, Emerald, FluxBox, FLWM, FVWM, herbstluftwm, howm, IceWM, KWin, Metacity, monsterwm, Musca, Gala, Mutter, Muffin, Notion, OpenBox, PekWM, Ratpoison, Sawfish, ScrotWM, SpectrWM, StumpWM, subtle, sway, TWin, WindowMaker, WMFS, wmii, Xfwm4, XMonad and i3."
  197. displayHelp () {
  198. printf "${underline}Usage${c0}:\n"
  199. printf " ${0} [OPTIONAL FLAGS]\n\n"
  200. printf "screenFetch - a CLI Bash script to show system/theme info in screenshots.\n\n"
  201. printf "${underline}Supported GNU/Linux Distributions${c0}:\n"
  202. printf "${supported_distros}" | fold -s | sed 's/^/\t/g'
  203. printf "\n\n"
  204. printf "${underline}Other Supported Systems${c0}:\n"
  205. printf "${supported_other}" | fold -s | sed 's/^/\t/g'
  206. printf "\n\n"
  207. printf "${underline}Supported Desktop Managers${c0}:\n"
  208. printf "${supported_dms}" | fold -s | sed 's/^/\t/g'
  209. printf "\n\n"
  210. printf "${underline}Supported Window Managers${c0}:\n"
  211. printf "${supported_wms}" | fold -s | sed 's/^/\t/g'
  212. printf "\n\n"
  213. printf "${underline}Options${c0}:\n"
  214. printf " ${bold}-v${c0} Verbose output.\n"
  215. printf " ${bold}-o 'OPTIONS'${c0} Allows for setting script variables on the\n"
  216. printf " command line. Must be in the following format...\n"
  217. printf " 'OPTION1=\"OPTIONARG1\";OPTION2=\"OPTIONARG2\"'\n"
  218. printf " ${bold}-d '+var;-var;var'${c0} Allows for setting what information is displayed\n"
  219. printf " on the command line. You can add displays with +var,var. You\n"
  220. printf " can delete displays with -var,var. Setting without + or - will\n"
  221. printf " set display to that explicit combination. Add and delete statements\n"
  222. printf " may be used in conjunction by placing a ; between them as so:\n"
  223. printf " +var,var,var;-var,var.\n"
  224. printf " ${bold}-n${c0} Do not display ASCII distribution logo.\n"
  225. printf " ${bold}-L${c0} Display ASCII distribution logo only.\n"
  226. printf " ${bold}-N${c0} Strip all color from output.\n"
  227. printf " ${bold}-w${c0} Wrap long lines.\n"
  228. printf " ${bold}-t${c0} Truncate output based on terminal width (Experimental!).\n"
  229. printf " ${bold}-p${c0} Portrait output.\n"
  230. printf " ${bold}-s [-u IMGHOST]${c0} Using this flag tells the script that you want it\n"
  231. printf " to take a screenshot. Use the -u flag if you would like\n"
  232. printf " to upload the screenshots to one of the pre-configured\n"
  233. printf " locations. These include: teknik, imgur, mediacrush and hmp.\n"
  234. printf " ${bold}-c string${c0} You may change the outputted colors with -c. The format is\n"
  235. printf " as follows: [0-9][0-9],[0-9][0-9]. The first argument controls the\n"
  236. printf " ASCII logo colors and the label colors. The second argument\n"
  237. printf " controls the colors of the information found. One argument may be\n"
  238. printf " used without the other.\n"
  239. printf " ${bold}-a 'PATH'${c0} You can specify a custom ASCII art by passing the path\n"
  240. printf " to a Bash script, defining \`startline\` and \`fulloutput\`\n"
  241. printf " variables, and optionally \`labelcolor\` and \`textcolor\`.\n"
  242. printf " See the \`asciiText\` function in the source code for more\n"
  243. printf " informations on the variables format.\n"
  244. printf " ${bold}-S 'COMMAND'${c0} Here you can specify a custom screenshot command for\n"
  245. printf " the script to execute. Surrounding quotes are required.\n"
  246. printf " ${bold}-D 'DISTRO'${c0} Here you can specify your distribution for the script\n"
  247. printf " to use. Surrounding quotes are required.\n"
  248. printf " ${bold}-A 'DISTRO'${c0} Here you can specify the distribution art that you want\n"
  249. printf " displayed. This is for when you want your distro\n"
  250. printf " detected but want to display a different logo.\n"
  251. printf " ${bold}-E${c0} Suppress output of errors.\n"
  252. printf " ${bold}-V, --version${c0} Display current script version.\n"
  253. printf " ${bold}-h, --help${c0} Display this help.\n"
  254. }
  255. displayVersion () {
  256. printf ${underline}"screenFetch"${c0}" - Version ${scriptVersion}\n"
  257. printf "Created by and licensed to Brett Bohnenkamper <kittykatt@kittykatt.us>\n"
  258. printf "OS X porting done almost solely by shrx (https://github.com/shrx) and John D. Duncan, III (https://github.com/JohnDDuncanIII).\n\n"
  259. printf "This is free software; see the source for copying conditions. There is NO warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
  260. }
  261. #####################
  262. # Begin Flags Phase
  263. #####################
  264. case $1 in
  265. --help) displayHelp; exit 0;;
  266. --version) displayVersion; exit 0;;
  267. esac
  268. while getopts ":hsu:evVEnLNtlS:A:D:o:c:d:pa:w" flags; do
  269. case $flags in
  270. h) displayHelp; exit 0 ;;
  271. s) screenshot='1' ;;
  272. S) screenCommand="${OPTARG}" ;;
  273. u) upload='1'; uploadLoc="${OPTARG}" ;;
  274. v) verbosity=1 ;;
  275. V) displayVersion; exit 0 ;;
  276. E) errorSuppress='1' ;;
  277. D) distro="${OPTARG}" ;;
  278. A) asc_distro="${OPTARG}" ;;
  279. t) truncateSet='Yes' ;;
  280. n) display_type='Text' ;;
  281. L) display_type='ASCII'; display_logo='Yes' ;;
  282. o) overrideOpts="${OPTARG}" ;;
  283. c) detectColors "${OPTARGS}" ;;
  284. d) overrideDisplay="${OPTARG}" ;;
  285. N) no_color='1' ;;
  286. p) portraitSet='Yes' ;;
  287. a) art="${OPTARG}" ;;
  288. w) lineWrap='Yes' ;;
  289. :) errorOut "Error: You're missing an argument somewhere. Exiting."; exit 1 ;;
  290. ?) errorOut "Error: Invalid flag somewhere. Exiting."; exit 1 ;;
  291. *) errorOut "Error"; exit 1 ;;
  292. esac
  293. done
  294. ###################
  295. # End Flags Phase
  296. ###################
  297. ############################
  298. # Override Options/Display
  299. ############################
  300. if [[ "$overrideOpts" ]]; then
  301. verboseOut "Found 'o' flag in syntax. Overriding some script variables..."
  302. OLD_IFS="$IFS"
  303. IFS=";"
  304. for overopt in "${overrideOpts}"; do
  305. eval "${overrideOpts}"
  306. done
  307. IFS="$OLD_IFS"
  308. fi
  309. #########################
  310. # Begin Detection Phase
  311. #########################
  312. # Distro Detection - Begin
  313. detectdistro () {
  314. if [[ -z "${distro}" ]]; then
  315. distro="Unknown"
  316. # LSB Release Check
  317. if type -p lsb_release >/dev/null 2>&1; then
  318. # read distro_detect distro_release distro_codename <<< $(lsb_release -sirc)
  319. distro_detect=( $(lsb_release -sirc) )
  320. if [[ ${#distro_detect[@]} -eq 3 ]]; then
  321. distro_codename=${distro_detect[2]}
  322. distro_release=${distro_detect[1]}
  323. distro_detect=${distro_detect[0]}
  324. else
  325. for ((i=0; i<${#distro_detect[@]}; i++)); do
  326. if [[ ${distro_detect[$i]} =~ ^[[:digit:]]+((.[[:digit:]]+|[[:digit:]]+|)+)$ ]]; then
  327. distro_release=${distro_detect[$i]}
  328. distro_codename=${distro_detect[@]:$(($i+1)):${#distro_detect[@]}+1}
  329. distro_detect=${distro_detect[@]:0:${i}}
  330. break 1
  331. elif [[ ${distro_detect[$i]} =~ [Nn]/[Aa] || ${distro_detect[$i]} == "rolling" ]]; then
  332. distro_release=${distro_detect[$i]}
  333. distro_codename=${distro_detect[@]:$(($i+1)):${#distro_detect[@]}+1}
  334. distro_detect=${distro_detect[@]:0:${i}}
  335. break 1
  336. fi
  337. done
  338. fi
  339. case "${distro_detect}" in
  340. "CentOS"|"Chapeau"|"Deepin"|"Devuan"|"DesaOS"|"Fedora"|"gNewSense"|"Jiyuu Linux"|"Kogaion"|"Korora"|"Mageia"|"Netrunner"|"NixOS"|"Pardus"|"Raspbian"|"Sabayon"|"Solus"|"SteamOS"|"Trisquel"|"Ubuntu"|"GrombyangOS"|"Scientific Linux")
  341. # no need to fix $distro/$distro_codename/$distro_release
  342. distro="${distro_detect}"
  343. ;;
  344. "archlinux"|"Arch Linux"|"arch"|"Arch"|"archarm")
  345. distro="Arch Linux"
  346. distro_release="n/a"
  347. if grep -q 'antergos' /etc/os-release; then
  348. distro="Antergos"
  349. distro_release="n/a"
  350. fi
  351. if grep -q -i 'logos' /etc/os-release; then
  352. distro="Logos"
  353. distro_release="n/a"
  354. fi
  355. if grep -q -i 'swagarch' /etc/os-release; then
  356. distro="SwagArch"
  357. distro_release="n/a"
  358. fi
  359. ;;
  360. "BLAG")
  361. distro="BLAG"
  362. distro_more="$(head -n1 /etc/fedora-release)"
  363. ;;
  364. "Chakra")
  365. distro="Chakra"
  366. distro_release=""
  367. ;;
  368. "BunsenLabs")
  369. distro=$(source /etc/lsb-release; echo "$DISTRIB_ID")
  370. distro_release=$(source /etc/lsb-release; echo "$DISTRIB_RELEASE")
  371. distro_codename=$(source /etc/lsb-release; echo "$DISTRIB_CODENAME")
  372. ;;
  373. "Debian")
  374. if [[ -f /etc/crunchbang-lsb-release || -f /etc/lsb-release-crunchbang ]]; then
  375. distro="CrunchBang"
  376. distro_release=$(awk -F'=' '/^DISTRIB_RELEASE=/ {print $2}' /etc/lsb-release-crunchbang)
  377. distro_codename=$(awk -F'=' '/^DISTRIB_DESCRIPTION=/ {print $2}' /etc/lsb-release-crunchbang)
  378. elif [[ -f /etc/os-release ]]; then
  379. if [[ "$(cat /etc/os-release)" =~ "Raspbian" ]]; then
  380. distro="Raspbian"
  381. distro_release=$(awk -F'=' '/^PRETTY_NAME=/ {print $2}' /etc/os-release)
  382. fi
  383. if [[ "$(cat /etc/os-release)" =~ "BlankOn" ]]; then
  384. distro="BlankOn"
  385. distro_release=$(awk -F'=' '/^PRETTY_NAME=/ {print $2}' /etc/os-release)
  386. else
  387. distro="Debian"
  388. fi
  389. else
  390. distro="Debian"
  391. fi
  392. ;;
  393. "elementary"|"elementary OS")
  394. distro="elementary OS"
  395. ;;
  396. "EvolveOS")
  397. distro="Evolve OS"
  398. ;;
  399. "KaOS"|"kaos")
  400. distro="KaOS"
  401. ;;
  402. "frugalware")
  403. distro="Frugalware"
  404. distro_codename=null
  405. distro_release=null
  406. ;;
  407. "Fuduntu")
  408. distro="Fuduntu"
  409. distro_codename=null
  410. ;;
  411. "Fux")
  412. distro="Fux"
  413. distro_codename=null
  414. ;;
  415. "Gentoo")
  416. if [[ "$(lsb_release -sd)" =~ "Funtoo" ]]; then
  417. distro="Funtoo"
  418. else
  419. distro="Gentoo"
  420. fi
  421. . /etc/portage/make.conf #detecting release stable/testing/experimental
  422. case $ACCEPT_KEYWORDS in
  423. [a-z]*) distro_release=stable ;;
  424. ~*) distro_release=testing ;;
  425. '**') distro_release=experimental ;; #experimental usually includes git-versions.
  426. esac
  427. ;;
  428. "LinuxDeepin")
  429. distro="LinuxDeepin"
  430. distro_codename=null
  431. ;;
  432. "Kali"|"Debian Kali Linux")
  433. distro="Kali Linux"
  434. if [[ "${distro_codename}" =~ "kali-rolling" ]]; then
  435. distro_codename="n/a"
  436. distro_release="n/a"
  437. fi
  438. ;;
  439. "Lunar Linux"|"lunar")
  440. distro="Lunar Linux"
  441. ;;
  442. "MandrivaLinux")
  443. distro="Mandriva"
  444. case "${distro_codename}" in
  445. "turtle"|"Henry_Farman"|"Farman"|"Adelie"|"pauillac")
  446. distro="Mandriva-${distro_release}"
  447. distro_codename=null
  448. ;;
  449. esac
  450. ;;
  451. "ManjaroLinux")
  452. distro="Manjaro"
  453. ;;
  454. "Mer")
  455. distro="Mer"
  456. if [[ -f /etc/os-release ]]; then
  457. if grep -q 'SailfishOS' /etc/os-release; then
  458. distro="SailfishOS"
  459. distro_codename="$(grep 'VERSION=' /etc/os-release | cut -d '(' -f2 | cut -d ')' -f1)"
  460. distro_release="$(awk -F'=' '/^VERSION=/ {print $2}' /etc/os-release)"
  461. fi
  462. fi
  463. ;;
  464. "neon"|"KDE neon")
  465. distro="KDE neon"
  466. distro_codename="n/a"
  467. distro_release="n/a"
  468. if [[ -f /etc/issue ]]; then
  469. if grep -q "^KDE neon" /etc/issue ; then
  470. distro_release="$(grep '^KDE neon' /etc/issue | cut -d ' ' -f3)"
  471. fi
  472. fi
  473. ;;
  474. "Ol"|"ol"|"Oracle Linux")
  475. distro="Oracle Linux"
  476. [ -f /etc/oracle-release ] && distro_release="$(sed 's/Oracle Linux //' /etc/oracle-release)"
  477. ;;
  478. "LinuxMint")
  479. distro="Mint"
  480. if [[ "${distro_codename}" == "debian" ]]; then
  481. distro="LMDE"
  482. distro_codename="n/a"
  483. distro_release="n/a"
  484. fi
  485. ;;
  486. "openSUSE"|"openSUSE project"|"SUSE LINUX")
  487. distro="openSUSE"
  488. if [ -f /etc/os-release ]; then
  489. if [[ "$(cat /etc/os-release)" =~ "SUSE Linux Enterprise" ]]; then
  490. distro="SUSE Linux Enterprise"
  491. distro_codename="n/a"
  492. distro_release=$(awk -F'=' '/^VERSION_ID=/ {print $2}' /etc/os-release | tr -d '"')
  493. fi
  494. fi
  495. if [[ "${distro_codename}" == "Tumbleweed" ]]; then
  496. distro_release="n/a"
  497. fi
  498. ;;
  499. "Parabola GNU/Linux-libre"|"Parabola")
  500. distro="Parabola GNU/Linux-libre"
  501. distro_codename="n/a"
  502. distro_release="n/a"
  503. ;;
  504. "Parrot"|"Parrot Security")
  505. distro="Parrot Security"
  506. ;;
  507. "PCLinuxOS")
  508. distro="PCLinuxOS"
  509. distro_codename="n/a"
  510. distro_release="n/a"
  511. ;;
  512. "Peppermint")
  513. distro="Peppermint"
  514. distro_codename=null
  515. ;;
  516. "rhel")
  517. distro="Red Hat Enterprise Linux"
  518. ;;
  519. "RosaDesktopFresh")
  520. distro="ROSA"
  521. distro_release=$(grep 'VERSION=' /etc/os-release | cut -d ' ' -f3 | cut -d "\"" -f1)
  522. distro_codename=$(grep 'PRETTY_NAME=' /etc/os-release | cut -d ' ' -f4,4)
  523. ;;
  524. "SailfishOS")
  525. distro="SailfishOS"
  526. if [[ -f /etc/os-release ]]; then
  527. distro_codename="$(grep 'VERSION=' /etc/os-release | cut -d '(' -f2 | cut -d ')' -f1)"
  528. distro_release="$(awk -F'=' '/^VERSION=/ {print $2}' /etc/os-release)"
  529. fi
  530. ;;
  531. "Sparky"|"SparkyLinux")
  532. distro="SparkyLinux"
  533. ;;
  534. "Viperr")
  535. distro="Viperr"
  536. distro_codename=null
  537. ;;
  538. *)
  539. if [ "x$(printf "${distro_detect}" | od -t x1 | sed -e 's/^\w*\ *//' | tr '\n' ' ' | grep 'eb b6 89 ec 9d 80 eb b3 84 ')" != "x" ]; then
  540. distro="Red Star OS"
  541. distro_codename="n/a"
  542. distro_release=$(printf "${distro_release}" | grep -o '[0-9.]' | tr -d '\n')
  543. fi
  544. ;;
  545. esac
  546. if [[ "${distro_detect}" =~ "RedHatEnterprise" ]]; then distro="Red Hat Enterprise Linux"; fi
  547. if [[ "${distro_detect}" =~ "SUSELinuxEnterprise" ]]; then distro="SUSE Linux Enterprise"; fi
  548. if [[ -n ${distro_release} && ${distro_release} != "n/a" ]]; then distro_more="$distro_release"; fi
  549. if [[ -n ${distro_codename} && ${distro_codename} != "n/a" ]]; then distro_more="$distro_more $distro_codename"; fi
  550. fi
  551. # Existing File Check
  552. if [ "$distro" == "Unknown" ]; then
  553. if [ $(uname -o 2>/dev/null) ]; then
  554. os="$(uname -o)"
  555. case "$os" in
  556. "Cygwin"|"FreeBSD"|"OpenBSD"|"NetBSD")
  557. distro="$os"
  558. fake_distro="${distro}"
  559. ;;
  560. "DragonFly")
  561. distro="DragonFlyBSD"
  562. fake_distro="${distro}"
  563. ;;
  564. "Msys")
  565. distro="Msys"
  566. fake_distro="${distro}"
  567. distro_more="${distro} $(uname -r | head -c 1)"
  568. ;;
  569. "Haiku")
  570. distro="Haiku"
  571. distro_more="$(uname -v | tr ' ' '\n' | grep 'hrev')"
  572. ;;
  573. "GNU/Linux")
  574. if type -p crux >/dev/null 2>&1; then
  575. distro="CRUX"
  576. distro_more="$(crux | awk '{print $3}')"
  577. fi
  578. if type -p nixos-version >/dev/null 2>&1; then
  579. distro="NixOS"
  580. distro_more="$(nixos-version)"
  581. fi
  582. ;;
  583. esac
  584. fi
  585. if [[ "${distro}" == "Cygwin" || "${distro}" == "Msys" ]]; then
  586. # https://msdn.microsoft.com/en-us/library/ms724832%28VS.85%29.aspx
  587. if [ "$(wmic os get version | grep -o '^\(6\.[23]\|10\)')" ]; then
  588. fake_distro="Windows - Modern"
  589. fi
  590. fi
  591. if [[ "${distro}" == "Unknown" ]]; then
  592. if [ -f /etc/os-release ]; then
  593. distrib_id=$(</etc/os-release);
  594. for l in $(echo $distrib_id); do
  595. if [[ ${l} =~ ^ID= ]]; then
  596. distrib_id=${l//*=}
  597. distrib_id=${distrib_id//\"/}
  598. break 1
  599. fi
  600. done
  601. if [[ -n ${distrib_id} ]]; then
  602. if [[ -n ${BASH_VERSINFO} && ${BASH_VERSINFO} -ge 4 ]]; then
  603. distrib_id=$(for i in ${distrib_id}; do echo -n "${i^} "; done)
  604. distro=${distrib_id% }
  605. unset distrib_id
  606. else
  607. distrib_id=$(for i in ${distrib_id}; do FIRST_LETTER=$(echo -n "${i:0:1}" | tr "[:lower:]" "[:upper:]"); echo -n "${FIRST_LETTER}${i:1} "; done)
  608. distro=${distrib_id% }
  609. unset distrib_id
  610. fi
  611. fi
  612. # Hotfixes
  613. [[ "${distro}" == "void" ]] && distro="Void"
  614. [[ "${distro}" == "evolveos" ]] && distro="Evolve OS"
  615. [[ "${distro}" == "antergos" ]] && distro="Antergos"
  616. [[ "${distro}" == "logos" ]] && distro="Logos"
  617. [[ "${distro}" == "Arch" || "${distro}" == "Archarm" || "${distro}" == "archarm" ]] && distro="Arch Linux"
  618. [[ "${distro}" == "elementary" ]] && distro="elementary OS"
  619. [[ "${distro}" == "Fedora" && -d /etc/qubes-rpc ]] && distro="qubes" # Inner VM
  620. [[ "${distro}" == "Ol" || "${distro}" == "ol" ]] && distro="Oracle Linux"
  621. if [[ "${distro}" == "Oracle Linux" ]] && [ -f /etc/oracle-release ]; then
  622. distro_more="$(sed 's/Oracle Linux //' /etc/oracle-release)"
  623. fi
  624. [[ "${distro}" == "rhel" ]] && distro="Red Hat Enterprise Linux"
  625. [[ "${distro}" == "Neon" ]] && distro="KDE neon"
  626. [[ "${distro}" == "SLED" || "${distro}" == "sled" || "${distro}" == "SLES" || "${distro}" == "sles" ]] && distro="SUSE Linux Enterprise"
  627. if [[ "${distro}" == "SUSE Linux Enterprise" ]] && [ -f /etc/os-release ]; then
  628. distro_more="$(awk -F'=' '/^VERSION_ID=/ {print $2}' /etc/os-release | tr -d '"')"
  629. fi
  630. fi
  631. fi
  632. if [[ "${distro}" == "Unknown" ]]; then
  633. if [[ "${OSTYPE}" == "linux-gnu" || "${OSTYPE}" == "linux" ]]; then
  634. if [ -f /etc/lsb-release ]; then
  635. LSB_RELEASE=$(</etc/lsb-release)
  636. distro=$(echo ${LSB_RELEASE} | awk 'BEGIN {
  637. distro = "Unknown"
  638. }
  639. {
  640. if ($0 ~ /[Uu][Bb][Uu][Nn][Tt][Uu]/) {
  641. distro = "Ubuntu"
  642. exit
  643. }
  644. else if ($0 ~ /[Mm][Ii][Nn][Tt]/ && $0 ~ /[Dd][Ee][Bb][Ii][Aa][Nn]/) {
  645. distro = "LMDE"
  646. exit
  647. }
  648. else if ($0 ~ /[Mm][Ii][Nn][Tt]/) {
  649. distro = "Mint"
  650. exit
  651. }
  652. } END {
  653. print distro
  654. }')
  655. fi
  656. fi
  657. fi
  658. if [[ "${distro}" == "Unknown" ]]; then
  659. if [[ "${OSTYPE}" == "linux-gnu" || "${OSTYPE}" == "linux" || "${OSTYPE}" == "gnu" ]]; then
  660. if [ -f /etc/arch-release ]; then distro="Arch Linux"
  661. elif [ -f /etc/chakra-release ]; then distro="Chakra"
  662. elif [ -f /etc/crunchbang-lsb-release ]; then distro="CrunchBang"
  663. elif [ -f /etc/debian_version ]; then
  664. if [ -f /etc/issue ]; then
  665. if grep -q "gNewSense" /etc/issue ; then
  666. distro="gNewSense"
  667. elif grep -q "^KDE neon" /etc/issue ; then
  668. distro="KDE neon"
  669. distro_more="$(cut -d ' ' -f3 /etc/issue)"
  670. else
  671. distro="Debian"
  672. fi
  673. fi
  674. if grep -q "Kali" /etc/debian_version ; then
  675. distro="Kali Linux"
  676. fi
  677. elif [ -f /etc/dragora-version ]; then distro="Dragora" && distro_more="$(cut -d, -f1 /etc/dragora-version)"
  678. elif [ -f /etc/evolveos-release ]; then distro="Evolve OS"
  679. elif [ -f /etc/exherbo-release ]; then distro="Exherbo"
  680. elif [ -f /etc/fedora-release ]; then
  681. if grep -q "Korora" /etc/fedora-release; then
  682. distro="Korora"
  683. elif grep -q "BLAG" /etc/fedora-release; then
  684. distro="BLAG"
  685. distro_more="$(head -n1 /etc/fedora-release)"
  686. else
  687. distro="Fedora"
  688. fi
  689. elif [ -f /etc/frugalware-release ]; then distro="Frugalware"
  690. elif [ -f /etc/fux-release ]; then distro="Fux"
  691. elif [ -f /etc/gentoo-release ]; then
  692. if grep -q "Funtoo" /etc/gentoo-release ; then
  693. distro="Funtoo"
  694. else
  695. distro="Gentoo"
  696. fi
  697. elif [ -f /etc/kogaion-release ]; then distro="Kogaion"
  698. elif [ -f /etc/mageia-release ]; then distro="Mageia"
  699. elif [ -f /etc/mandrake-release ]; then
  700. if grep -q "PCLinuxOS" /etc/mandrake-release ; then
  701. distro="PCLinuxOS"
  702. else
  703. distro="Mandrake"
  704. fi
  705. elif [ -f /etc/mandriva-release ]; then
  706. if grep -q "PCLinuxOS" /etc/mandriva-release ; then
  707. distro="PCLinuxOS"
  708. else
  709. distro="Mandriva"
  710. fi
  711. elif [ -f /etc/NIXOS ]; then distro="NixOS"
  712. elif [ -f /etc/obarun-release ]; then distro="Obarun"
  713. elif [ -f /etc/oracle-release ]; then
  714. distro="Oracle Linux"
  715. distro_more="$(sed 's/Oracle Linux //' /etc/oracle-release)"
  716. elif [ -f /etc/SuSE-release ]; then
  717. distro="openSUSE"
  718. if [ -f /etc/os-release ]; then
  719. if [[ "$(cat /etc/os-release)" =~ "SUSE Linux Enterprise" ]]; then
  720. distro="SUSE Linux Enterprise"
  721. distro_more=$(awk -F'=' '/^VERSION_ID=/ {print $2}' /etc/os-release | tr -d '"')
  722. fi
  723. fi
  724. if [[ "${distro_more}" =~ "Tumbleweed" ]]; then distro_more="Tumbleweed"; fi
  725. elif [ -f /etc/pardus-release ]; then distro="Pardus"
  726. elif [ -f /etc/pclinuxos-release ]; then distro="PCLinuxOS"
  727. elif [ -f /etc/redstar-release ]; then
  728. distro="Red Star OS"
  729. distro_more=$(grep -o '[0-9.]' /etc/redstar-release | tr -d '\n')
  730. elif [ -f /etc/redhat-release ]; then
  731. if grep -q "CentOS" /etc/redhat-release; then
  732. distro="CentOS"
  733. elif grep -q "PCLinuxOS" /etc/redhat-release; then
  734. distro="PCLinuxOS"
  735. elif [ "x$(od -t x1 /etc/redhat-release | sed -e 's/^\w*\ *//' | tr '\n' ' ' | grep 'eb b6 89 ec 9d 80 eb b3 84 ')" != "x" ]; then
  736. distro="Red Star OS"
  737. distro_more=$(grep -o '[0-9.]' /etc/redhat-release | tr -d '\n')
  738. else
  739. distro="Red Hat Enterprise Linux"
  740. fi
  741. elif [ -f /etc/rosa-release ]; then distro="ROSA"
  742. elif [ -f /etc/slackware-version ]; then distro="Slackware"
  743. elif [ -f /usr/share/doc/tc/release.txt ]; then
  744. distro="TinyCore"
  745. distro_more="$(cat /usr/share/doc/tc/release.txt)"
  746. elif [ -f /etc/sabayon-edition ]; then distro="Sabayon"; fi
  747. else
  748. if [[ -x /usr/bin/sw_vers ]] && /usr/bin/sw_vers | grep -i "Mac OS X" >/dev/null; then
  749. distro="Mac OS X"
  750. elif [[ -f /var/run/dmesg.boot ]]; then
  751. distro=$(awk 'BEGIN {
  752. distro = "Unknown"
  753. }
  754. {
  755. if ($0 ~ /DragonFly/) {
  756. distro = "DragonFlyBSD"
  757. exit
  758. }
  759. else if ($0 ~ /FreeBSD/) {
  760. distro = "FreeBSD"
  761. exit
  762. }
  763. else if ($0 ~ /NetBSD/) {
  764. distro = "NetBSD"
  765. exit
  766. }
  767. else if ($0 ~ /OpenBSD/) {
  768. distro = "OpenBSD"
  769. exit
  770. }
  771. } END {
  772. print distro
  773. }' /var/run/dmesg.boot)
  774. fi
  775. fi
  776. fi
  777. if [[ "${distro}" == "Unknown" ]] && [[ "${OSTYPE}" == "linux-gnu" || "${OSTYPE}" == "linux" || "${OSTYPE}" == "gnu" ]]; then
  778. if [[ -f /etc/issue ]]; then
  779. distro=$(awk 'BEGIN {
  780. distro = "Unknown"
  781. }
  782. {
  783. if ($0 ~ /"LinuxDeepin"/) {
  784. distro = "LinuxDeepin"
  785. exit
  786. }
  787. else if ($0 ~ /"Obarun"/) {
  788. distro = "Obarun"
  789. exit
  790. }
  791. else if ($0 ~ /"Parabola GNU\/Linux-libre"/) {
  792. distro = "Parabola GNU/Linux-libre"
  793. exit
  794. }
  795. else if ($0 ~ /"Solus"/) {
  796. distro = "Solus"
  797. exit
  798. }
  799. } END {
  800. print distro
  801. }' /etc/issue)
  802. fi
  803. fi
  804. if [[ "${distro}" == "Unknown" ]] && [[ "${OSTYPE}" == "linux-gnu" || "${OSTYPE}" == "linux" || "${OSTYPE}" == "gnu" ]]; then
  805. if [[ -f /etc/system-release ]]; then
  806. if grep -q "Scientific Linux" /etc/system-release; then
  807. distro="Scientific Linux"
  808. elif grep -q "Oracle Linux" /etc/system-release; then
  809. distro="Oracle Linux"
  810. fi
  811. elif [[ -f /etc/lsb-release ]]; then
  812. if grep -q "CHROMEOS_RELEASE_NAME" /etc/lsb-release; then
  813. distro="$(awk -F'=' '/^CHROMEOS_RELEASE_NAME=/ {print $2}' /etc/lsb-release)"
  814. distro_more="$(awk -F'=' '/^CHROMEOS_RELEASE_VERSION=/ {print $2}' /etc/lsb-release)"
  815. fi
  816. fi
  817. fi
  818. fi
  819. fi
  820. if [[ -n ${distro_more} ]]; then
  821. distro_more="${distro} ${distro_more}"
  822. fi
  823. if [[ "${distro}" != "Haiku" ]]; then
  824. if [[ ${BASH_VERSINFO[0]} -ge 4 ]]; then
  825. if [[ ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -gt 1 ]] || [[ ${BASH_VERSINFO[0]} -gt 4 ]]; then
  826. distro=${distro,,}
  827. else
  828. distro="$(tr '[:upper:]' '[:lower:]' <<< ${distro})"
  829. fi
  830. else
  831. distro="$(tr '[:upper:]' '[:lower:]' <<< ${distro})"
  832. fi
  833. fi
  834. case $distro in
  835. alpine) distro="Alpine Linux" ;;
  836. antergos) distro="Antergos" ;;
  837. arch*linux*old) distro="Arch Linux - Old" ;;
  838. arch|arch*linux) distro="Arch Linux" ;;
  839. blag) distro="BLAG" ;;
  840. bunsenlabs) distro="BunsenLabs" ;;
  841. centos) distro="CentOS" ;;
  842. chakra) distro="Chakra" ;;
  843. chapeau) distro="Chapeau" ;;
  844. chrome*|chromium*) distro="Chrome OS" ;;
  845. crunchbang) distro="CrunchBang" ;;
  846. crux) distro="CRUX" ;;
  847. cygwin) distro="Cygwin" ;;
  848. debian) distro="Debian" ;;
  849. devuan) distro="Devuan" ;;
  850. deepin) distro="Deepin" ;;
  851. desaos) distro="DesaOS" ;;
  852. dragonflybsd) distro="DragonFlyBSD" ;;
  853. dragora) distro="Dragora" ;;
  854. elementary|'elementary os') distro="elementary OS";;
  855. evolveos) distro="Evolve OS" ;;
  856. exherbo|exherbo*linux) distro="Exherbo" ;;
  857. fedora) distro="Fedora" ;;
  858. freebsd) distro="FreeBSD" ;;
  859. freebsd*old) distro="FreeBSD - Old" ;;
  860. frugalware) distro="Frugalware" ;;
  861. fuduntu) distro="Fuduntu" ;;
  862. funtoo) distro="Funtoo" ;;
  863. fux) distro="Fux" ;;
  864. gentoo) distro="Gentoo" ;;
  865. gnewsense) distro="gNewSense" ;;
  866. haiku) distro="Haiku" ;;
  867. kali*linux) distro="Kali Linux" ;;
  868. kaos) distro="KaOS";;
  869. kde*neon|neon) distro="KDE neon" ;;
  870. kogaion) distro="Kogaion" ;;
  871. korora) distro="Korora" ;;
  872. linuxdeepin) distro="LinuxDeepin" ;;
  873. lmde) distro="LMDE" ;;
  874. logos) distro="Logos" ;;
  875. lunar|lunar*linux) distro="Lunar Linux";;
  876. mac*os*x|os*x) distro="Mac OS X" ;;
  877. manjaro) distro="Manjaro" ;;
  878. mageia) distro="Mageia" ;;
  879. mandrake) distro="Mandrake" ;;
  880. mandriva) distro="Mandriva" ;;
  881. mer) distro="Mer" ;;
  882. mint|linux*mint) distro="Mint" ;;
  883. msys|msys2) distro="Msys" ;;
  884. netbsd) distro="NetBSD" ;;
  885. netrunner) distro="Netrunner" ;;
  886. nix|nix*os) distro="NixOS" ;;
  887. obarun) distro="Obarun" ;;
  888. ol|oracle*linux) distro="Oracle Linux" ;;
  889. openbsd) distro="OpenBSD" ;;
  890. opensuse) distro="openSUSE" ;;
  891. parabolagnu|parabolagnu/linux-libre|'parabola gnu/linux-libre'|parabola) distro="Parabola GNU/Linux-libre" ;;
  892. pardus) distro="Pardus" ;;
  893. parrot|parrot*security) distro="Parrot Security" ;;
  894. pclinuxos|pclos) distro="PCLinuxOS" ;;
  895. peppermint) distro="Peppermint" ;;
  896. qubes) distro="Qubes OS" ;;
  897. raspbian) distro="Raspbian" ;;
  898. red*hat*|rhel) distro="Red Hat Enterprise Linux" ;;
  899. rosa) distro="ROSA" ;;
  900. red*star|red*star*os) distro="Red Star OS" ;;
  901. sabayon) distro="Sabayon" ;;
  902. sailfish|sailfish*os) distro="SailfishOS" ;;
  903. slackware) distro="Slackware" ;;
  904. solus) distro="Solus" ;;
  905. sparky|sparky*linux) distro="SparkyLinux" ;;
  906. steam|steam*os) distro="SteamOS" ;;
  907. suse*linux*enterprise) distro="SUSE Linux Enterprise" ;;
  908. swagarch) distro="SwagArch" ;;
  909. tinycore|tinycore*linux) distro="TinyCore" ;;
  910. trisquel) distro="Trisquel";;
  911. grombyangos) distro="GrombyangOS" ;;
  912. ubuntu)
  913. distro="Ubuntu"
  914. if grep -q 'Microsoft' /proc/version 2>/dev/null || \
  915. grep -q 'Microsoft' /proc/sys/kernel/osrelease 2>/dev/null
  916. then
  917. uow=$(echo -e "$(getColor 'yellow') [Ubuntu on Windows 10]")
  918. fi
  919. ;;
  920. viperr) distro="Viperr" ;;
  921. void) distro="Void" ;;
  922. esac
  923. verboseOut "Finding distro...found as '${distro} ${distro_release}'"
  924. }
  925. # Distro Detection - End
  926. # Host and User detection - Begin
  927. detecthost () {
  928. myUser=${USER}
  929. myHost=${HOSTNAME}
  930. if [[ -z "$USER" ]]; then myUser=$(whoami); fi
  931. if [[ "${distro}" == "Mac OS X" ]]; then myHost=${myHost/.local}; fi
  932. verboseOut "Finding hostname and user...found as '${myUser}@${myHost}'"
  933. }
  934. # Find Number of Running Processes
  935. # processnum="$(( $( ps aux | wc -l ) - 1 ))"
  936. # Kernel Version Detection - Begin
  937. detectkernel () {
  938. if [[ "$distro" == "OpenBSD" ]]; then
  939. kernel=$(sysctl kern.version|awk -F'[ =:]' 'NR==1{print $3" "$4" "$5}')
  940. else
  941. # compatibility for older versions of OS X:
  942. kernel=$(uname -m && uname -sr)
  943. kernel=${kernel//$'\n'/ }
  944. #kernel=( $(uname -srm) )
  945. #kernel="${kernel[${#kernel[@]}-1]} ${kernel[@]:0:${#kernel[@]}-1}"
  946. verboseOut "Finding kernel version...found as '${kernel}'"
  947. fi
  948. }
  949. # Kernel Version Detection - End
  950. # Uptime Detection - Begin
  951. detectuptime () {
  952. unset uptime
  953. if [[ "${distro}" == "Mac OS X" || "${distro}" == "FreeBSD" || "${distro}" == "DragonFlyBSD" ]]; then
  954. boot=$(sysctl -n kern.boottime | cut -d "=" -f 2 | cut -d "," -f 1)
  955. now=$(date +%s)
  956. uptime=$(($now-$boot))
  957. elif [[ "${distro}" == "OpenBSD" ]]; then
  958. boot=$(sysctl -n kern.boottime)
  959. now=$(date +%s)
  960. uptime=$((${now} - ${boot}))
  961. elif [[ "${distro}" == "Haiku" ]]; then
  962. uptime=$(uptime | cut -d ',' -f2,3 | sed 's/ up //; s/ hour,/h/; s/ minutes/m/;')
  963. else
  964. if [[ -f /proc/uptime ]]; then
  965. uptime=$(</proc/uptime)
  966. uptime=${uptime//.*}
  967. fi
  968. fi
  969. if [[ -n ${uptime} ]] && [[ "${distro}" != "Haiku" ]]; then
  970. secs=$((${uptime}%60))
  971. mins=$((${uptime}/60%60))
  972. hours=$((${uptime}/3600%24))
  973. days=$((${uptime}/86400))
  974. uptime="${mins}m"
  975. if [ "${hours}" -ne "0" ]; then
  976. uptime="${hours}h ${uptime}"
  977. fi
  978. if [ "${days}" -ne "0" ]; then
  979. uptime="${days}d ${uptime}"
  980. fi
  981. else
  982. if [[ "$distro" =~ "NetBSD" ]]; then uptime=$(awk -F. '{print $1}' /proc/uptime); fi
  983. if [[ "$distro" =~ "BSD" ]]; then uptime=$(uptime | awk '{$1=$2=$(NF-6)=$(NF-5)=$(NF-4)=$(NF-3)=$(NF-2)=$(NF-1)=$NF=""; sub(" days","d");sub(",","");sub(":","h ");sub(",","m"); print}'); fi
  984. fi
  985. verboseOut "Finding current uptime...found as '${uptime}'"
  986. }
  987. # Uptime Detection - End
  988. # Package Count - Begin
  989. detectpkgs () {
  990. pkgs="Unknown"
  991. case "${distro}" in
  992. 'Alpine Linux') pkgs=$(apk info | wc -l) ;;
  993. 'Arch Linux'|'Parabola GNU/Linux-libre'|'Chakra'|'Manjaro'|'Antergos'|'Netrunner'|'KaOS'|'Obarun'|'SwagArch') pkgs=$(pacman -Qq | wc -l) ;;
  994. 'Chrome OS')
  995. if [ -d "/usr/local/lib/crew/packages" ]; then
  996. pkgs=$(ls -l /usr/local/etc/crew/meta/*.filelist | wc -l)
  997. else
  998. pkgs=$(ls -d /var/db/pkg/*/* | wc -l)
  999. fi
  1000. ;;
  1001. 'Dragora') pkgs=$(ls -1 /var/db/pkg | wc -l) ;;
  1002. 'Frugalware') pkgs=$(pacman-g2 -Q | wc -l) ;;
  1003. 'Debian'|'Ubuntu'|'Mint'|'Fuduntu'|'KDE neon'|'Devuan'|'Raspbian'|'LMDE'|'CrunchBang'|'Peppermint'|'LinuxDeepin'|'Deepin'|'Kali Linux'|'Trisquel'|'elementary OS'|'gNewSense'|'BunsenLabs'|'SteamOS'|'Parrot Security'|'GrombyangOS'| 'DesaOS') pkgs=$(dpkg -l | grep -c ^i) ;;
  1004. 'Slackware') pkgs=$(ls -1 /var/log/packages | wc -l) ;;
  1005. 'Gentoo'|'Sabayon'|'Funtoo'|'Kogaion') pkgs=$(ls -d /var/db/pkg/*/* | wc -l) ;;
  1006. 'NixOS') pkgs=$(ls -d -1 /nix/store/*/ | wc -l) ;;
  1007. 'Fedora'|'Fux'|'Korora'|'BLAG'|'Chapeau'|'openSUSE'|'SUSE Linux Enterprise'|'Red Hat Enterprise Linux'|'ROSA'|'Oracle Linux'|'CentOS'|'Mandriva'|'Mandrake'|'Mageia'|'Mer'|'SailfishOS'|'PCLinuxOS'|'Viperr'|'Qubes OS'|'Red Star OS') pkgs=$(rpm -qa | wc -l) ;;
  1008. 'Void') pkgs=$(xbps-query -l | wc -l) ;;
  1009. 'Evolve OS'|'Solus') pkgs=$(pisi list-installed | wc -l) ;;
  1010. 'CRUX') pkgs=$(pkginfo -i | wc -l) ;;
  1011. 'Lunar Linux') pkgs=$(lvu installed | wc -l) ;;
  1012. 'TinyCore') pkgs=$(tce-status -i | wc -l) ;;
  1013. 'Exherbo')
  1014. xpkgs=$(ls -d -1 /var/db/paludis/repositories/cross-installed/*/data/* | wc -l)
  1015. pkgs=$(ls -d -1 /var/db/paludis/repositories/installed/data/* | wc -l)
  1016. pkgs=$((${pkgs} + ${xpkgs}))
  1017. ;;
  1018. 'Mac OS X')
  1019. if [ -d "/usr/local/bin" ]; then
  1020. loc_pkgs=$(ls -l /usr/local/bin/ | grep -v "\(../Cellar/\|brew\)" | wc -l)
  1021. pkgs=$((${loc_pkgs} -1));
  1022. fi
  1023. if type -p port >/dev/null 2>&1; then
  1024. port_pkgs=$(port installed 2>/dev/null | wc -l)
  1025. pkgs=$((${pkgs} + (${port_pkgs} -1)))
  1026. fi
  1027. if type -p brew >/dev/null 2>&1; then
  1028. brew_pkgs=$(brew list -1 2>/dev/null | wc -l)
  1029. pkgs=$((${pkgs} + ${brew_pkgs}))
  1030. fi
  1031. if type -p pkgin >/dev/null 2>&1; then
  1032. pkgsrc_pkgs=$(pkgin list 2>/dev/null | wc -l)
  1033. pkgs=$((${pkgs} + ${pkgsrc_pkgs}))
  1034. fi
  1035. ;;
  1036. 'DragonFlyBSD')
  1037. pkgs=$(if TMPDIR=/dev/null ASSUME_ALWAYS_YES=1 PACKAGESITE=file:///nonexistent pkg info pkg >/dev/null 2>&1; then
  1038. pkg info | wc -l | awk '{print $1}'; else pkg_info | wc -l | tr -d ' '; fi)
  1039. ;;
  1040. 'OpenBSD')
  1041. pkgs=$(pkg_info | grep -c .)
  1042. ;;
  1043. 'FreeBSD')
  1044. pkgs=$(if TMPDIR=/dev/null ASSUME_ALWAYS_YES=1 PACKAGESITE=file:///nonexistent pkg info pkg >/dev/null 2>&1; then
  1045. pkg info | wc -l | awk '{print $1}'; else pkg_info | wc -l | awk '{sub(" ", "");print $1}'; fi)
  1046. ;;
  1047. 'NetBSD')
  1048. pkgs=$(pkg_info | wc -l | tr -d ' ')
  1049. ;;
  1050. 'Cygwin')
  1051. cygfix=2
  1052. pkgs=$(($(cygcheck -cd | wc -l) - ${cygfix}))
  1053. if [ -d "/cygdrive/c/ProgramData/chocolatey/lib" ]; then
  1054. chocopkgs=$(( $(ls -1 /cygdrive/c/ProgramData/chocolatey/lib | wc -l) ))
  1055. pkgs=$((${pkgs} + ${chocopkgs}))
  1056. fi
  1057. ;;
  1058. 'Msys')
  1059. pkgs=$(pacman -Qq | wc -l)
  1060. if [ -d "/c/ProgramData/chocolatey/lib" ]; then
  1061. chocopkgs=$(( $(ls -1 /c/ProgramData/chocolatey/lib | wc -l) ))
  1062. pkgs=$((${pkgs} + ${chocopkgs}))
  1063. fi
  1064. ;;
  1065. 'Haiku')
  1066. haikualpharelease="no"
  1067. if [ -d /boot/system/package-links ]; then
  1068. pkgs=$(ls /boot/system/package-links | wc -l)
  1069. elif type -p installoptionalpackage >/dev/null 2>&1; then
  1070. haikualpharelease="yes"
  1071. pkgs=$(installoptionalpackage -l | sed -n '3p' | wc -w)
  1072. fi
  1073. ;;
  1074. esac
  1075. verboseOut "Finding current package count...found as '$pkgs'"
  1076. }
  1077. # CPU Detection - Begin
  1078. detectcpu () {
  1079. REGEXP="-r"
  1080. if [ "$distro" == "Mac OS X" ]; then
  1081. cpu=$(machine)
  1082. if [[ $cpu == "ppc750" ]]; then
  1083. cpu="IBM PowerPC G3"
  1084. elif [[ $cpu == "ppc7400" || $cpu == "ppc7450" ]]; then
  1085. cpu="IBM PowerPC G4"
  1086. elif [[ $cpu == "ppc970" ]]; then
  1087. cpu="IBM PowerPC G5"
  1088. else
  1089. cpu=$(sysctl -n machdep.cpu.brand_string)
  1090. fi
  1091. REGEXP="-E"
  1092. elif [ "$OSTYPE" == "gnu" ]; then
  1093. # no /proc/cpuinfo on GNU/Hurd
  1094. if [ "$(uname -m | grep 'i.86')" ]; then
  1095. cpu="Unknown x86"
  1096. else
  1097. cpu="Unknown"
  1098. fi
  1099. elif [ "$distro" == "FreeBSD" ]; then
  1100. cpu=$(dmesg | grep 'CPU:' | head -n 1 | sed -r 's/CPU: //' | sed -e 's/([^()]*)//g')
  1101. elif [ "$distro" == "DragonFlyBSD" ]; then
  1102. cpu=$(sysctl -n hw.model)
  1103. elif [ "$distro" == "OpenBSD" ]; then
  1104. cpu=$(sysctl -n hw.model | sed 's/@.*//')
  1105. elif [ "$distro" == "Haiku" ]; then
  1106. cpu=$(sysinfo -cpu | grep 'CPU #0' | cut -d'"' -f2 | awk 'BEGIN{FS=" @"; OFS="\n"} { print $1; exit }')
  1107. cpu_mhz=$(sysinfo -cpu | grep 'running at' | awk 'BEGIN{FS="running at "} { print $2; exit }' | cut -d'M' -f1)
  1108. if [ $(echo $cpu_mhz) -gt 999 ]; then
  1109. cpu_ghz=$(awk '{print $1/1000}' <<< "${cpu_mhz}")
  1110. cpufreq="${cpu_ghz}GHz"
  1111. else
  1112. cpufreq="${cpu_mhz}MHz"
  1113. fi
  1114. else
  1115. cpu=$(awk 'BEGIN{FS=":"} /model name/ { print $2; exit }' /proc/cpuinfo | awk 'BEGIN{FS=" @"; OFS="\n"} { print $1; exit }')
  1116. cpun=$(grep -c '^processor' /proc/cpuinfo)
  1117. if [ -z "$cpu" ]; then
  1118. cpu=$(awk 'BEGIN{FS=":"} /Hardware/ { print $2; exit }' /proc/cpuinfo)
  1119. fi
  1120. if [ -z "$cpu" ]; then
  1121. cpu=$(awk 'BEGIN{FS=":"} /^cpu/ { gsub(/ +/," ",$2); print $2; exit}' /proc/cpuinfo | sed 's/, altivec supported//;s/^ //')
  1122. if [[ $cpu =~ ^(PPC)*9.+ ]]; then
  1123. model="IBM PowerPC G5 "
  1124. elif [[ $cpu =~ 740/750 ]]; then
  1125. model="IBM PowerPC G3 "
  1126. elif [[ $cpu =~ ^74.+ ]]; then
  1127. model="Motorola PowerPC G4 "
  1128. elif [[ "$(cat /proc/cpuinfo)" =~ "BCM2708" ]]; then
  1129. model="Broadcom BCM2835 ARM1176JZF-S"
  1130. else
  1131. arch=$(uname -m)
  1132. if [ "$arch" = "s390x" ] || [ "$arch" = "s390" ]; then
  1133. cpu=""
  1134. args=$(grep 'machine' /proc/cpuinfo | sed 's/^.*://g; s/ //g; s/,/\n/g' | grep '^machine=.*')
  1135. eval $args
  1136. case "$machine" in
  1137. # information taken from https://github.com/SUSE/s390-tools/blob/master/cputype
  1138. 2064) model="IBM eServer zSeries 900" ;;
  1139. 2066) model="IBM eServer zSeries 800" ;;
  1140. 2084) model="IBM eServer zSeries 990" ;;
  1141. 2086) model="IBM eServer zSeries 890" ;;
  1142. 2094) model="IBM System z9 Enterprise Class" ;;
  1143. 2096) model="IBM System z9 Business Class" ;;
  1144. 2097) model="IBM System z10 Enterprise Class" ;;
  1145. 2098) model="IBM System z10 Business Class" ;;
  1146. 2817) model="IBM zEnterprise 196" ;;
  1147. 2818) model="IBM zEnterprise 114" ;;
  1148. 2827) model="IBM zEnterprise EC12" ;;
  1149. 2828) model="IBM zEnterprise BC12" ;;
  1150. 2964) model="IBM z13" ;;
  1151. *) model="IBM S/390 machine type $machine" ;;
  1152. esac
  1153. else
  1154. model="Unkown"
  1155. fi
  1156. fi
  1157. cpu="${model}${cpu}"
  1158. fi
  1159. loc="/sys/devices/system/cpu/cpu0/cpufreq"
  1160. bl="${loc}/bios_limit"
  1161. smf="${loc}/scaling_max_freq"
  1162. if [ -f "$bl" ] && [ -r "$bl" ]; then
  1163. cpu_mhz=$(awk '{print $1/1000}' "$bl")
  1164. elif [ -f "$smf" ] && [ -r "$smf" ]; then
  1165. cpu_mhz=$(awk '{print $1/1000}' "$smf")
  1166. else
  1167. cpu_mhz=$(awk -F':' '/cpu MHz/{ print int($2+.5) }' /proc/cpuinfo | head -n 1)
  1168. fi
  1169. if [ -n "$cpu_mhz" ]; then
  1170. if [ $(echo $cpu_mhz | cut -d. -f1) -gt 999 ]; then
  1171. cpu_ghz=$(awk '{print $1/1000}' <<< "${cpu_mhz}")
  1172. cpufreq="${cpu_ghz}GHz"
  1173. else
  1174. cpufreq="${cpu_mhz}MHz"
  1175. fi
  1176. fi
  1177. fi
  1178. if [[ "${cpun}" -gt "1" ]]; then
  1179. cpun="${cpun}x "
  1180. else
  1181. cpun=""
  1182. fi
  1183. if [ -z "$cpufreq" ]; then
  1184. cpu="${cpun}${cpu}"
  1185. else
  1186. cpu="$cpu @ ${cpun}${cpufreq}"
  1187. fi
  1188. thermal="/sys/class/hwmon/hwmon0/temp1_input"
  1189. if [ -e $thermal ]; then
  1190. temp=$(bc <<< "scale=1; $(cat $thermal)/1000")
  1191. fi
  1192. if [ -n "$temp" ]; then
  1193. cpu="$cpu [${temp}°C]"
  1194. fi
  1195. cpu=$(sed $REGEXP 's/\([tT][mM]\)|\([Rr]\)|[pP]rocessor|CPU//g' <<< "${cpu}" | xargs)
  1196. verboseOut "Finding current CPU...found as '$cpu'"
  1197. }
  1198. # CPU Detection - End
  1199. # GPU Detection - Begin (EXPERIMENTAL!)
  1200. detectgpu () {
  1201. if [[ "${distro}" == "FreeBSD" || "${distro}" == "DragonFlyBSD" ]]; then
  1202. nvisettexist=$(which nvidia-settings)
  1203. if [ -x "$nvisettexist" ]; then
  1204. gpu="$(nvidia-settings -t -q gpus | grep \( | sed 's/.*(\(.*\))/\1/')"
  1205. else
  1206. gpu_info=$(pciconf -lv 2> /dev/null | grep -B 4 VGA)
  1207. gpu_info=$(grep -E 'device.*=.*' <<< "${gpu_info}")
  1208. gpu="${gpu_info##*device*= }"
  1209. gpu="${gpu//\'}"
  1210. # gpu=$(sed 's/.*device.*= //' <<< "${gpu_info}" | sed "s/'//g")
  1211. fi
  1212. elif [[ "${distro}" == "OpenBSD" ]]; then
  1213. gpu=$(glxinfo 2> /dev/null | grep 'OpenGL renderer string' | sed 's/OpenGL renderer string: //')
  1214. elif [[ "${distro}" == "Mac OS X" ]]; then
  1215. gpu=$(system_profiler SPDisplaysDataType | awk -F': ' '/^\ *Chipset Model:/ {print $2}' | awk '{ printf "%s / ", $0 }' | sed -e 's/\/ $//g')
  1216. elif [[ "${distro}" == "Cygwin" || "${distro}" == "Msys" ]]; then
  1217. gpu=$(wmic path Win32_VideoController get caption | sed -n '2p')
  1218. elif [[ "${distro}" == "Haiku" ]]; then
  1219. gpu="$(listdev | grep -A2 -e 'device Display controller' | tail -n1 | sed 's/ device ....: //')"
  1220. else
  1221. if [[ -n "$(PATH="/opt/bin:$PATH" type -p nvidia-smi)" ]]; then
  1222. gpu=$($(PATH="/opt/bin:$PATH" type -p nvidia-smi | cut -f1) -q | awk -F':' '/Product Name/ {gsub(/: /,":"); print $2}' | sed ':a;N;$!ba;s/\n/, /g')
  1223. elif [[ -n "$(PATH="/usr/sbin:$PATH" type -p glxinfo)" && -z "${gpu}" ]]; then
  1224. gpu_info=$($(PATH="/usr/sbin:$PATH" type -p glxinfo | cut -f1) 2>/dev/null)
  1225. gpu=$(grep "OpenGL renderer string" <<< "${gpu_info}" | cut -d ':' -f2 | sed -n '1h;2,$H;${g;s/\n/,/g;p}')
  1226. gpu="${gpu:1}"
  1227. gpu_info=$(grep "OpenGL vendor string" <<< "${gpu_info}")
  1228. elif [[ -n "$(PATH="/usr/sbin:$PATH" type -p lspci)" && -z "$gpu" ]]; then
  1229. gpu_info=$($(PATH="/usr/bin:$PATH" type -p lspci | cut -f1) 2> /dev/null | grep VGA)
  1230. gpu=$(grep -oE '\[.*\]' <<< "${gpu_info}" | sed 's/\[//;s/\]//' | sed -n '1h;2,$H;${g;s/\n/, /g;p}')
  1231. fi
  1232. fi
  1233. if [ -n "$gpu" ];then
  1234. if [ $(grep -i nvidia <<< "${gpu_info}" | wc -l) -gt 0 ];then
  1235. gpu_info="NVidia "
  1236. elif [ $(grep -i intel <<< "${gpu_info}" | wc -l) -gt 0 ];then
  1237. gpu_info="Intel "
  1238. elif [ $(grep -i amd <<< "${gpu_info}" | wc -l) -gt 0 ];then
  1239. gpu_info="AMD "
  1240. elif [[ $(grep -i ati <<< "${gpu_info}" | wc -l) -gt 0 || $(grep -i radeon <<< "${gpu_info}" | wc -l) -gt 0 ]]; then
  1241. gpu_info="ATI "
  1242. else
  1243. gpu_info=$(cut -d ':' -f2 <<< "${gpu_info}")
  1244. gpu_info="${gpu_info:1} "
  1245. fi
  1246. gpu="${gpu}"
  1247. else
  1248. gpu="Not Found"
  1249. fi
  1250. verboseOut "Finding current GPU...found as '$gpu'"
  1251. }
  1252. # GPU Detection - End
  1253. # Detect Intel GPU #works in dash
  1254. # Run it only on Intel Processors if GPU is unknown
  1255. DetectIntelGPU() {
  1256. gpu=$(awk '{print $2}' /proc/fb)
  1257. case $gpu in
  1258. *intel*) gpu=intel ;;
  1259. esac
  1260. if [[ $gpu = intel ]]; then
  1261. #Detect CPU
  1262. local CPU=$(uname -p | awk '{print $3}')
  1263. CPU=${CPU#*'-'}; #Detect CPU number
  1264. #Detect Intel GPU
  1265. case $CPU in
  1266. [3-6][3-9][0-5]|[3-6][3-9][0-5][K-Y]) gpu='Intel HD Graphics' ;; #1st
  1267. 2[1-5][0-3][0-2]*|2390T|2600S) gpu='Intel HD Graphics 2000' ;; #2nd
  1268. 2[1-5][1-7][0-8]*|2105|2500K) gpu='Intel HD Graphics 3000' ;; #2nd
  1269. 32[1-5]0*|3[4-5][5-7]0*|33[3-4]0*) gpu='Intel HD Graphics 2500' ;; #3rd
  1270. 3570K|3427U) gpu='Intel HD Graphics 4000' ;; #3rd
  1271. 4[3-7][0-9][0-5]*) gpu='Intel HD Graphics 4600' ;; #4th Haswell
  1272. 5[5-6]75[C-R]|5350H) gpu='Intel Iris Pro Graphics 6200' ;; #5th Broadwell
  1273. #6th Skylake
  1274. #7th Kabylake
  1275. #8th Cannonlake
  1276. esac
  1277. fi
  1278. }
  1279. # Disk Usage Detection - Begin
  1280. detectdisk () {
  1281. diskusage="Unknown"
  1282. if type -p df >/dev/null 2>&1; then
  1283. if [[ "${distro}" =~ (Free|Net|Open|DragonFly)BSD ]]; then
  1284. totaldisk=$(df -h -c 2>/dev/null | tail -1)
  1285. elif [[ "${distro}" == "Mac OS X" ]]; then
  1286. totaldisk=$(df -H / 2>/dev/null | tail -1)
  1287. else
  1288. totaldisk=$(df -h -x aufs -x tmpfs --total 2>/dev/null | tail -1)
  1289. fi
  1290. disktotal=$(awk '{print $2}' <<< "${totaldisk}")
  1291. diskused=$(awk '{print $3}' <<< "${totaldisk}")
  1292. diskusedper=$(awk '{print $5}' <<< "${totaldisk}")
  1293. diskusage="${diskused} / ${disktotal} (${diskusedper})"
  1294. diskusage_verbose=$(sed 's/%/%%/' <<< $diskusage)
  1295. fi
  1296. verboseOut "Finding current disk usage...found as '$diskusage_verbose'"
  1297. }
  1298. # Disk Usage Detection - End
  1299. # Memory Detection - Begin
  1300. detectmem () {
  1301. if [ "$distro" == "Mac OS X" ]; then
  1302. totalmem=$(echo "$(sysctl -n hw.memsize)" / 1024^2 | bc)
  1303. wiredmem=$(vm_stat | grep wired | awk '{ print $4 }' | sed 's/\.//')
  1304. activemem=$(vm_stat | grep ' active' | awk '{ print $3 }' | sed 's/\.//')
  1305. compressedmem=$(vm_stat | grep occupied | awk '{ print $5 }' | sed 's/\.//')
  1306. if [[ ! -z "$compressedmem | tr -d" ]]; then
  1307. compressedmem=0
  1308. fi
  1309. usedmem=$(((${wiredmem} + ${activemem} + ${compressedmem}) * 4 / 1024))
  1310. elif [[ "${distro}" == "Cygwin" || "${distro}" == "Msys" ]]; then
  1311. total_mem=$(awk '/MemTotal/ { print $2 }' /proc/meminfo)
  1312. totalmem=$((${total_mem} / 1024))
  1313. free_mem=$(awk '/MemFree/ { print $2 }' /proc/meminfo)
  1314. used_mem=$((${total_mem} - ${free_mem}))
  1315. usedmem=$((${used_mem} / 1024))
  1316. elif [[ "$distro" == "FreeBSD" || "$distro" == "DragonFlyBSD" ]]; then
  1317. phys_mem=$(sysctl -n hw.physmem)
  1318. size_mem=$phys_mem
  1319. size_chip=1
  1320. guess_chip=`echo "$size_mem / 8 - 1" | bc`
  1321. while [ $guess_chip != 0 ]; do
  1322. guess_chip=`echo "$guess_chip / 2" | bc`
  1323. size_chip=`echo "$size_chip * 2" | bc`
  1324. done
  1325. round_mem=`echo "( $size_mem / $size_chip + 1 ) * $size_chip " | bc`
  1326. totalmem=$(($round_mem / 1024^2 ))
  1327. pagesize=$(sysctl -n hw.pagesize)
  1328. inactive_count=$(sysctl -n vm.stats.vm.v_inactive_count)
  1329. inactive_mem=$(($inactive_count * $pagesize))
  1330. cache_count=$(sysctl -n vm.stats.vm.v_cache_count)
  1331. cache_mem=$(($cache_count * $pagesize))
  1332. free_count=$(sysctl -n vm.stats.vm.v_free_count)
  1333. free_mem=$(($free_count * $pagesize))
  1334. avail_mem=$(($inactive_mem + $cache_mem + $free_mem))
  1335. used_mem=$(($round_mem - $avail_mem))
  1336. usedmem=$(($used_mem / 1024^2 ))
  1337. elif [ "$distro" == "OpenBSD" ]; then
  1338. totalmem=$(($(sysctl -n hw.physmem) / 1024 / 1024))
  1339. usedmem=$(($(vmstat | awk '!/[a-z]/{print $4}') / 1024))
  1340. elif [ "$distro" == "NetBSD" ]; then
  1341. phys_mem=$(awk '/MemTotal/ { print $2 }' /proc/meminfo)
  1342. totalmem=$((${phys_mem} / 1024))
  1343. if grep -q 'Cached' /proc/meminfo; then
  1344. cache=$(awk '/Cached/ {print $2}' /proc/meminfo)
  1345. usedmem=$((${cache} / 1024))
  1346. else
  1347. free_mem=$(awk '/MemFree/ { print $2 }' /proc/meminfo)
  1348. used_mem=$((${phys_mem} - ${free_mem}))
  1349. usedmem=$((${used_mem} / 1024))
  1350. fi
  1351. elif [ "$distro" == "Haiku" ]; then
  1352. totalmem=$(( $(sysinfo -mem | head -n1 | cut -d'/' -f3 | tr -d ' ' | tr -d ')') / 1024^2 ))
  1353. usedmem=$(( $(sysinfo -mem | head -n1 | cut -d'/' -f2 | sed 's/max//; s/ //g') / 1024^2 ))
  1354. else
  1355. # MemUsed = Memtotal + Shmem - MemFree - Buffers - Cached - SReclaimable
  1356. # Source: https://github.com/dylanaraps/neofetch/pull/391/files#diff-e863270127ca6116fd30e708cdc582fc
  1357. mem_info=$(</proc/meminfo)
  1358. mem_info=$(echo $(echo $(mem_info=${mem_info// /}; echo ${mem_info//kB/})))
  1359. for m in $mem_info; do
  1360. case ${m//:*} in
  1361. "MemTotal") usedmem=$((usedmem+=${m//*:})); totalmem=${m//*:} ;;
  1362. "ShMem") usedmem=$((usedmem+=${m//*:})) ;;
  1363. "MemFree"|"Buffers"|"Cached"|"SReclaimable") usedmem=$((usedmem-=${m//*:})) ;;
  1364. esac
  1365. done
  1366. usedmem=$((usedmem / 1024))
  1367. totalmem=$((totalmem / 1024))
  1368. fi
  1369. mem="${usedmem}MiB / ${totalmem}MiB"
  1370. verboseOut "Finding current RAM usage...found as '$mem'"
  1371. }
  1372. # Memory Detection - End
  1373. # Shell Detection - Begin
  1374. detectshell_ver () {
  1375. local version_data='' version='' get_version='--version'
  1376. case $1 in
  1377. # ksh sends version to stderr. Weeeeeeird.
  1378. ksh)
  1379. version_data="$( $1 $get_version 2>&1 )"
  1380. ;;
  1381. *)
  1382. version_data="$( $1 $get_version 2>/dev/null )"
  1383. ;;
  1384. esac
  1385. if [[ -n $version_data ]];then
  1386. version=$(awk '
  1387. BEGIN {
  1388. IGNORECASE=1
  1389. }
  1390. /'$2'/ {
  1391. gsub(/(,|v|V)/, "",$'$3')
  1392. if ($2 ~ /[Bb][Aa][Ss][Hh]/) {
  1393. gsub(/\(.*|-release|-version\)/,"",$4)
  1394. }
  1395. print $'$3'
  1396. exit # quit after first match prints
  1397. }' <<< "$version_data")
  1398. fi
  1399. echo "$version"
  1400. }
  1401. detectshell () {
  1402. if [[ ! "${shell_type}" ]]; then
  1403. if [[ "${distro}" == "Cygwin" || "${distro}" == "Msys" || "${distro}" == "Haiku" || "${distro}" == "Alpine Linux" || "${OSTYPE}" == "gnu" || "${distro}" == "TinyCore" || "${distro}" == "Raspbian" ]]; then
  1404. shell_type=$(echo "$SHELL" | awk -F'/' '{print $NF}')
  1405. elif readlink -f "$SHELL" | grep -q "busybox"; then
  1406. shell_type="BusyBox"
  1407. else
  1408. if [[ "${OSTYPE}" == "linux-gnu" || "${OSTYPE}" == "linux" || "${OSTYPE}" == "linux-musl" ]]; then
  1409. shell_type=$(cat /proc/$PPID/cmdline|tr '\0' '\n'|head -n 1)
  1410. elif [[ "${distro}" == "Mac OS X" || "${distro}" == "DragonFlyBSD" || "${distro}" == "FreeBSD" || "${distro}" == "OpenBSD" || "${distro}" == "NetBSD" ]]; then
  1411. shell_type=$(ps -p $PPID -o command | tail -1)
  1412. else
  1413. shell_type=$(ps -p $(ps -p $PPID | awk '$1 !~ /PID/ {print $1}') | awk 'FNR>1 {print $1}')
  1414. fi
  1415. shell_type=${shell_type/-}
  1416. shell_type=${shell_type//*\/}
  1417. fi
  1418. fi
  1419. case $shell_type in
  1420. bash)
  1421. shell_version_data=$( detectshell_ver "$shell_type" "^GNU.bash,.version" "4" )
  1422. ;;
  1423. BusyBox)
  1424. shell_version_data=$( busybox | head -n1 | cut -d ' ' -f2 )
  1425. ;;
  1426. csh)
  1427. shell_version_data=$( detectshell_ver "$shell_type" "$shell_type" "3" )
  1428. ;;
  1429. dash)
  1430. shell_version_data=$( detectshell_ver "$shell_type" "$shell_type" "3" )
  1431. ;;
  1432. ksh)
  1433. shell_version_data=$( detectshell_ver "$shell_type" "version" "5" )
  1434. ;;
  1435. tcsh)
  1436. shell_version_data=$( detectshell_ver "$shell_type" "^tcsh" "2" )
  1437. ;;
  1438. zsh)
  1439. shell_version_data=$( detectshell_ver "$shell_type" "^zsh" "2" )
  1440. ;;
  1441. fish)
  1442. shell_version_data=$( fish --version | awk '{print $3}' )
  1443. ;;
  1444. esac
  1445. if [[ -n $shell_version_data ]];then
  1446. shell_type="$shell_type $shell_version_data"
  1447. fi
  1448. myShell=${shell_type}
  1449. verboseOut "Finding current shell...found as '$myShell'"
  1450. }
  1451. # Shell Detection - End
  1452. # Resolution Detection - Begin
  1453. detectres () {
  1454. if [[ ${distro} != "Mac OS X" && ${distro} != "Cygwin" && "${distro}" != "Msys" && ${distro} != "Haiku" ]]; then
  1455. if [[ -n ${DISPLAY} ]]; then
  1456. if type -p xdpyinfo >/dev/null 2>&1; then
  1457. if [[ "$distro" =~ "BSD" ]]; then
  1458. xResolution=$(xdpyinfo | sed -n 's/.*dim.* \([0-9]*x[0-9]*\) .*/\1/pg' | tr '\n' ' ')
  1459. else
  1460. xResolution=$(xdpyinfo | sed -n 's/.*dim.* \([0-9]*x[0-9]*\) .*/\1/pg' | sed ':a;N;$!ba;s/\n/ /g')
  1461. fi
  1462. fi
  1463. fi
  1464. elif [[ ${distro} == "Mac OS X" ]]; then
  1465. xResolution=$(system_profiler SPDisplaysDataType | awk '/Resolution:/ {print $2"x"$4" "}')
  1466. if [[ "$(echo $xResolution | wc -l)" -ge 1 ]]; then
  1467. xResolution=$(echo $xResolution | tr "\\n" "," | sed 's/\(.*\),/\1/')
  1468. fi
  1469. elif [[ "${distro}" == "Cygwin" || "${distro}" == "Msys" ]]; then
  1470. xResolution=$(wmic path Win32_VideoController get CurrentHorizontalResolution,CurrentVerticalResolution | awk 'NR==2 {print $1"x"$2}')
  1471. elif [[ "${distro}" == "Haiku" ]]; then
  1472. width=$(screenmode | cut -d ' ' -f2)
  1473. height=$(screenmode | cut -d ' ' -f3 | tr -d ',')
  1474. xResolution="$(echo ${width}x${height})"
  1475. else
  1476. xResolution="No X Server"
  1477. fi
  1478. verboseOut "Finding current resolution(s)...found as '$xResolution'"
  1479. }
  1480. # Resolution Detection - End
  1481. # DE Detection - Begin
  1482. detectde () {
  1483. DE="Not Present"
  1484. if [[ ${distro} != "Mac OS X" && ${distro} != "Cygwin" && "${distro}" != "Msys" ]]; then
  1485. if [[ -n ${DISPLAY} ]]; then
  1486. if type -p xprop >/dev/null 2>&1;then
  1487. xprop_root="$(xprop -root 2>/dev/null)"
  1488. if [[ -n ${xprop_root} ]]; then
  1489. DE=$(echo "${xprop_root}" | awk 'BEGIN {
  1490. de = "Not Present"
  1491. }
  1492. {
  1493. if ($1 ~ /^_DT_SAVE_MODE/) {
  1494. de = $NF
  1495. gsub(/\"/,"",de)
  1496. de = toupper(de)
  1497. exit
  1498. }
  1499. else if ($1 ~/^KDE_SESSION_VERSION/) {
  1500. de = "KDE"$NF
  1501. exit
  1502. }
  1503. else if ($1 ~ /^_MUFFIN/) {
  1504. de = "Cinnamon"
  1505. exit
  1506. }
  1507. else if ($1 ~ /^TDE_FULL_SESSION/) {
  1508. de = "Trinity"
  1509. exit
  1510. }
  1511. else if ($0 ~ /"xfce4"/) {
  1512. de = "Xfce4"
  1513. exit
  1514. }
  1515. else if ($0 ~ /"xfce5"/) {
  1516. de = "Xfce5"
  1517. exit
  1518. }
  1519. } END {
  1520. print de
  1521. }')
  1522. fi
  1523. fi
  1524. if [[ ${DE} == "Not Present" ]]; then
  1525. # Let's use xdg-open code for GNOME/Enlightment/KDE/LXDE/MATE/Xfce detection
  1526. # http://bazaar.launchpad.net/~vcs-imports/xdg-utils/master/view/head:/scripts/xdg-utils-common.in#L251
  1527. if [ -n "${XDG_CURRENT_DESKTOP}" ]; then
  1528. case "${XDG_CURRENT_DESKTOP}" in
  1529. ENLIGHTENMENT)
  1530. DE=Enlightenment;
  1531. ;;
  1532. GNOME)
  1533. DE=GNOME;
  1534. ;;
  1535. KDE)
  1536. DE=KDE;
  1537. ;;
  1538. LUMINA|Lumina)
  1539. DE=Lumina;
  1540. ;;
  1541. LXDE)
  1542. DE=LXDE;
  1543. ;;
  1544. MATE)
  1545. DE=MATE;
  1546. ;;
  1547. XFCE)
  1548. DE=Xfce
  1549. ;;
  1550. 'X-Cinnamon')
  1551. DE=Cinnamon
  1552. ;;
  1553. Unity)
  1554. DE=Unity
  1555. ;;
  1556. LXQt)
  1557. DE=LXQt
  1558. ;;
  1559. esac
  1560. fi
  1561. if [ -n "$DE" ]; then
  1562. # classic fallbacks
  1563. if [ -n "$KDE_FULL_SESSION" ]; then DE=KDE;
  1564. elif [ -n "$TDE_FULL_SESSION" ]; then DE=Trinity;
  1565. elif [ -n "$GNOME_DESKTOP_SESSION_ID" ]; then DE=GNOME;
  1566. elif [ -n "$MATE_DESKTOP_SESSION_ID" ]; then DE=MATE;
  1567. elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=GNOME;
  1568. elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=Xfce;
  1569. elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=Xfce
  1570. elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=Enlightenment;
  1571. fi
  1572. fi
  1573. case "$DESKTOP_SESSION" in
  1574. gnome|gnome-fallback|gnome-fallback-compiz )
  1575. DE=GNOME
  1576. ;;
  1577. deepin)
  1578. DE=Deepin
  1579. ;;
  1580. esac
  1581. if [ -n "$DE" ]; then
  1582. # fallback to checking $DESKTOP_SESSION
  1583. case "$DESKTOP_SESSION" in
  1584. gnome)
  1585. DE=GNOME;
  1586. ;;
  1587. LUMINA|Lumina)
  1588. DE=Lumina;
  1589. ;;
  1590. LXDE|Lubuntu)
  1591. DE=LXDE;
  1592. ;;
  1593. MATE)
  1594. DE=MATE;
  1595. ;;
  1596. xfce|xfce4|'Xfce Session')
  1597. DE=Xfce;
  1598. ;;
  1599. 'budgie-desktop')
  1600. DE=Budgie
  1601. ;;
  1602. Cinnamon)
  1603. DE=Cinnamon
  1604. ;;
  1605. trinity)
  1606. DE=Trinity
  1607. ;;
  1608. esac
  1609. fi
  1610. if [ -n "$DE" ]; then
  1611. # fallback to checking $GDMSESSION
  1612. case "$GDMSESSION" in
  1613. Lumina*|LUMINA*|lumina*)
  1614. DE=Lumina
  1615. ;;
  1616. MATE|mate)
  1617. DE=MATE
  1618. ;;
  1619. esac
  1620. fi
  1621. if [[ ${DE} == "GNOME" ]]; then
  1622. if type -p xprop >/dev/null 2>&1; then
  1623. if xprop -name "unity-launcher" >/dev/null 2>&1; then
  1624. DE="Unity"
  1625. elif xprop -name "launcher" >/dev/null 2>&1 &&
  1626. xprop -name "panel" >/dev/null 2>&1; then
  1627. DE="Unity"
  1628. fi
  1629. fi
  1630. fi
  1631. if [[ ${DE} == "KDE" ]]; then
  1632. if [[ -n ${KDE_SESSION_VERSION} ]]; then
  1633. if [[ ${KDE_SESSION_VERSION} == '5' ]]; then
  1634. DE="KDE5"
  1635. elif [[ ${KDE_SESSION_VERSION} == '4' ]]; then
  1636. DE="KDE4"
  1637. fi
  1638. elif [[ "x${KDE_FULL_SESSION}" == "xtrue" ]]; then
  1639. DE="KDE"
  1640. DEver_data=$(kded --version 2>/dev/null)
  1641. DEver=$(grep -si '^KDE:' <<< "$DEver_data" | awk '{print $2}')
  1642. fi
  1643. fi
  1644. fi
  1645. if [[ ${DE} != "Not Present" ]]; then
  1646. if [[ ${DE} == "Cinnamon" ]]; then
  1647. if type -p >/dev/null 2>&1; then
  1648. DEver=$(cinnamon --version)
  1649. DE="${DE} ${DEver//* }"
  1650. fi
  1651. elif [[ ${DE} == "GNOME" ]]; then
  1652. if type -p gnome-session >/dev/null 2>&1; then
  1653. DEver=$(gnome-session --version 2> /dev/null)
  1654. DE="${DE} ${DEver//* }"
  1655. elif type -p gnome-session-properties >/dev/null 2>&1; then
  1656. DEver=$(gnome-session-properties --version 2> /dev/null)
  1657. DE="${DE} ${DEver//* }"
  1658. fi
  1659. elif [[ ${DE} == "KDE4" || ${DE} == "KDE5" ]]; then
  1660. if type -p kded${DE#KDE} >/dev/null 2>&1; then
  1661. DEver=$(kded${DE#KDE} --version)
  1662. if [[ $(( $(echo "$DEver" | wc -w) )) -eq 2 ]] && [[ "$(echo "$DEver" | cut -d ' ' -f1)" == "kded${DE#KDE}" ]]; then
  1663. DEver=$(echo "$DEver" | cut -d ' ' -f2)
  1664. DE="KDE ${DEver}"
  1665. else
  1666. for l in $(echo "${DEver// /_}"); do
  1667. if [[ ${l//:*} == "KDE_Development_Platform" ]]; then
  1668. DEver=${l//*:_}
  1669. DE="KDE ${DEver//_*}"
  1670. fi
  1671. done
  1672. fi
  1673. if pgrep plasmashell >/dev/null 2>&1; then
  1674. DEver=$(plasmashell --version | cut -d ' ' -f2)
  1675. DE="$DE / Plasma $DEver"
  1676. fi
  1677. fi
  1678. elif [[ ${DE} == "Lumina" ]]; then
  1679. if type -p Lumina-DE.real >/dev/null 2>&1; then
  1680. lumina="$(type -p Lumina-DE.real)"
  1681. elif type -p Lumina-DE >/dev/null 2>&1; then
  1682. lumina="$(type -p Lumina-DE)"
  1683. fi
  1684. if [ -n "$lumina" ]; then
  1685. if grep -e '--version' "$lumina" >/dev/null; then
  1686. DEver=$("$lumina" --version 2>&1 | tr -d \")
  1687. DE="${DE} ${DEver}"
  1688. fi
  1689. fi
  1690. elif [[ ${DE} == "MATE" ]]; then
  1691. if type -p mate-session >/dev/null 2>&1; then
  1692. DEver=$(mate-session --version)
  1693. DE="${DE} ${DEver//* }"
  1694. fi
  1695. elif [[ ${DE} == "Unity" ]]; then
  1696. if type -p unity >/dev/null 2>&1; then
  1697. DEver=$(unity --version)
  1698. DE="${DE} ${DEver//* }"
  1699. fi
  1700. elif [[ ${DE} == "Deepin" ]]; then
  1701. if [[ -f /etc/deepin-version ]]; then
  1702. DEver="$(awk -F '=' '/Version/ {print $2}' /etc/deepin-version)"
  1703. DE="${DE} ${DEver//* }"
  1704. fi
  1705. elif [[ ${DE} == "Trinity" ]]; then
  1706. if type -p tde-config >/dev/null 2>&1; then
  1707. DEver="$(tde-config --version | awk -F ' ' '/TDE:/ {print $2}')"
  1708. DE="${DE} ${DEver//* }"
  1709. fi
  1710. fi
  1711. fi
  1712. if [[ "${DE}" == "Not Present" ]]; then
  1713. if pgrep -U ${UID} lxsession >/dev/null 2>&1; then
  1714. DE="LXDE"
  1715. if type -p lxpanel >/dev/null 2>&1; then
  1716. DEver=$(lxpanel -v)
  1717. DE="${DE} $DEver"
  1718. fi
  1719. elif pgrep -U ${UID} lxqt-session >/dev/null 2>&1; then
  1720. DE="LXQt"
  1721. elif pgrep -U ${UID} razor-session >/dev/null 2>&1; then
  1722. DE="RazorQt"
  1723. elif pgrep -U ${UID} dtsession >/dev/null 2>&1; then
  1724. DE="CDE"
  1725. fi
  1726. fi
  1727. fi
  1728. elif [[ "${distro}" == "Mac OS X" ]]; then
  1729. if ps -U ${USER} | grep [F]inder >/dev/null 2>&1; then
  1730. DE="Aqua"
  1731. fi
  1732. elif [[ "${distro}" == "Cygwin" || "${distro}" == "Msys" ]]; then
  1733. # https://msdn.microsoft.com/en-us/library/ms724832%28VS.85%29.aspx
  1734. if [ "$(wmic os get version | grep -o '^\(6\.[01]\)')" ]; then
  1735. DE='Aero'
  1736. elif [ "$(wmic os get version | grep -o '^\(6\.[23]\|10\)')" ]; then
  1737. DE='Modern UI/Metro'
  1738. else
  1739. DE='Luna'
  1740. fi
  1741. fi
  1742. verboseOut "Finding desktop environment...found as '$DE'"
  1743. }
  1744. ### DE Detection - End
  1745. # WM Detection - Begin
  1746. detectwm () {
  1747. WM="Not Found"
  1748. if [[ ${distro} != "Mac OS X" && ${distro} != "Cygwin" && "${distro}" != "Msys" ]]; then
  1749. if [[ -n ${DISPLAY} ]]; then
  1750. for each in "${wmnames[@]}"; do
  1751. PID="$(pgrep -U ${UID} "^$each$")"
  1752. if [ "$PID" ]; then
  1753. case $each in
  1754. '2bwm') WM="2bwm";;
  1755. '9wm') WM="9wm";;
  1756. 'awesome') WM="Awesome";;
  1757. 'beryl') WM="Beryl";;
  1758. 'blackbox') WM="BlackBox";;
  1759. 'bspwm') WM="bspwm";;
  1760. 'budgie-wm') WM="BudgieWM";;
  1761. 'chromeos-wm') WM="chromeos-wm";;
  1762. 'cinnamon') WM="Muffin";;
  1763. 'compiz') WM="Compiz";;
  1764. 'deepin-wm') WM="deepin-wm";;
  1765. 'dminiwm') WM="dminiwm";;
  1766. 'dtwm') WM="dtwm";;
  1767. 'dwm') WM="dwm";;
  1768. 'e16') WM="E16";;
  1769. 'emerald') WM="Emerald";;
  1770. 'enlightenment') WM="E17";;
  1771. 'fluxbox') WM="FluxBox";;
  1772. 'flwm'|'flwm_topside') WM="FLWM";;
  1773. 'fvwm') WM="FVWM";;
  1774. 'herbstluftwm') WM="herbstluftwm";;
  1775. 'howm') WM="howm";;
  1776. 'i3') WM="i3";;
  1777. 'icewm') WM="IceWM";;
  1778. 'kwin') WM="KWin";;
  1779. 'metacity') WM="Metacity";;
  1780. 'monsterwm') WM="monsterwm";;
  1781. 'musca') WM="Musca";;
  1782. 'notion') WM="Notion";;
  1783. 'openbox') WM="OpenBox";;
  1784. 'pekwm') WM="PekWM";;
  1785. 'ratpoison') WM="Ratpoison";;
  1786. 'sawfish') WM="Sawfish";;
  1787. 'scrotwm') WM="ScrotWM";;
  1788. 'spectrwm') WM="SpectrWM";;
  1789. 'stumpwm') WM="StumpWM";;
  1790. 'subtle') WM="subtle";;
  1791. 'sway') WM="sway";;
  1792. 'swm') WM="swm";;
  1793. 'twin') WM="TWin";;
  1794. 'wmaker') WM="WindowMaker";;
  1795. 'wmfs') WM="WMFS";;
  1796. 'wmii') WM="wmii";;
  1797. 'xfwm4') WM="Xfwm4";;
  1798. 'xmonad.*') WM="XMonad";;
  1799. esac
  1800. fi
  1801. if [[ ${WM} != "Not Found" ]]; then
  1802. break 1
  1803. fi
  1804. done
  1805. if [[ ${WM} == "Not Found" ]]; then
  1806. if type -p xprop >/dev/null 2>&1; then
  1807. WM=$(xprop -root _NET_SUPPORTING_WM_CHECK)
  1808. if [[ "$WM" =~ 'not found' ]]; then
  1809. WM="Not Found"
  1810. elif [[ "$WM" =~ 'Not found' ]]; then
  1811. WM="Not Found"
  1812. elif [[ "$WM" =~ '[Ii]nvalid window id format' ]]; then
  1813. WM="Not Found"
  1814. elif [[ "$WM" =~ "no such" ]]; then
  1815. WM="Not Found"
  1816. else
  1817. WM=${WM//* }
  1818. WM=$(xprop -id ${WM} 8s _NET_WM_NAME)
  1819. WM=$(echo $(WM=${WM//*= }; echo ${WM//\"}))
  1820. fi
  1821. fi
  1822. else
  1823. if [[ ${BASH_VERSINFO[0]} -ge 4 ]]; then
  1824. if [[ ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -gt 1 ]] || [[ ${BASH_VERSINFO[0]} -gt 4 ]]; then
  1825. WM=${WM,,}
  1826. else
  1827. WM="$(tr '[:upper:]' '[:lower:]' <<< ${WM})"
  1828. fi
  1829. else
  1830. WM="$(tr '[:upper:]' '[:lower:]' <<< ${WM})"
  1831. fi
  1832. case ${WM} in
  1833. *'gala'*) WM="Gala";;
  1834. '2bwm') WM="2bwm";;
  1835. 'awesome') WM="Awesome";;
  1836. 'beryl') WM="Beryl";;
  1837. 'blackbox') WM="BlackBox";;
  1838. 'budgiewm') WM="BudgieWM";;
  1839. 'chromeos-wm') WM="chromeos-wm";;
  1840. 'cinnamon') WM="Cinnamon";;
  1841. 'compiz') WM="Compiz";;
  1842. 'deepin-wm') WM="Deepin WM";;
  1843. 'dminiwm') WM="dminiwm";;
  1844. 'dwm') WM="dwm";;
  1845. 'e16') WM="E16";;
  1846. 'echinus') WM="echinus";;
  1847. 'emerald') WM="Emerald";;
  1848. 'enlightenment') WM="E17";;
  1849. 'fluxbox') WM="FluxBox";;
  1850. 'flwm'|'flwm_topside') WM="FLWM";;
  1851. 'fvwm') WM="FVWM";;
  1852. 'gnome shell'*) WM="Mutter";;
  1853. 'herbstluftwm') WM="herbstluftwm";;
  1854. 'howm') WM="howm";;
  1855. 'i3') WM="i3";;
  1856. 'icewm') WM="IceWM";;
  1857. 'kwin') WM="KWin";;
  1858. 'metacity') WM="Metacity";;
  1859. 'monsterwm') WM="monsterwm";;
  1860. 'muffin') WM="Muffin";;
  1861. 'musca') WM="Musca";;
  1862. 'mutter'*) WM="Mutter";;
  1863. 'notion') WM="Notion";;
  1864. 'openbox') WM="OpenBox";;
  1865. 'pekwm') WM="PekWM";;
  1866. 'ratpoison') WM="Ratpoison";;
  1867. 'sawfish') WM="Sawfish";;
  1868. 'scrotwm') WM="ScrotWM";;
  1869. 'spectrwm') WM="SpectrWM";;
  1870. 'stumpwm') WM="StumpWM";;
  1871. 'subtle') WM="subtle";;
  1872. 'sway') WM="sway";;
  1873. 'swm') WM="swm";;
  1874. 'twin') WM="TWin";;
  1875. 'wmaker') WM="WindowMaker";;
  1876. 'wmfs') WM="WMFS";;
  1877. 'wmii') WM="wmii";;
  1878. 'xfwm4') WM="Xfwm4";;
  1879. 'xmonad') WM="XMonad";;
  1880. esac
  1881. fi
  1882. fi
  1883. elif [[ ${distro} == "Mac OS X" && "${WM}" == "Not Found" ]]; then
  1884. if ps -U ${USER} | grep Finder >/dev/null 2>&1; then
  1885. WM="Quartz Compositor"
  1886. fi
  1887. elif [[ "${distro}" == "Cygwin" || "${distro}" == "Msys" ]]; then
  1888. bugn=$(tasklist | grep -o 'bugn' | tr -d '\r \n')
  1889. wind=$(tasklist | grep -o 'Windawesome' | tr -d '\r \n')
  1890. blackbox=$(tasklist | grep -o 'blackbox' | tr -d '\r \n')
  1891. if [ "$bugn" = "bugn" ]; then WM="bug.n"
  1892. elif [ "$wind" = "Windawesome" ]; then WM="Windawesome"
  1893. elif [ "$blackbox" = "blackbox" ]; then WM="Blackbox"
  1894. else WM="DWM/Explorer"; fi
  1895. fi
  1896. verboseOut "Finding window manager...found as '$WM'"
  1897. }
  1898. # WM Detection - End
  1899. # WM Theme Detection - BEGIN
  1900. detectwmtheme () {
  1901. Win_theme="Not Found"
  1902. case $WM in
  1903. '2bwm') Win_theme="Not Applicable";;
  1904. '9wm') Win_theme="Not Applicable";;
  1905. 'Awesome') if [ -f ${XDG_CONFIG_HOME:-${HOME}/.config}/awesome/rc.lua ]; then Win_theme="$(grep -e '^[^-].*\(theme\|beautiful\).*lua' ${XDG_CONFIG_HOME:-${HOME}/.config}/awesome/rc.lua | grep '[a-zA-Z0-9]\+/[a-zA-Z0-9]\+.lua' -o | cut -d'/' -f1 | head -n1)"; fi;;
  1906. 'BlackBox') if [ -f $HOME/.blackboxrc ]; then Win_theme="$(awk -F"/" '/styleFile/ {print $NF}' $HOME/.blackboxrc)"; fi;;
  1907. 'Beryl') Win_theme="Not Applicable";;
  1908. 'bspwm') Win_theme="Not Applicable";;
  1909. 'BudgieWM')
  1910. Win_theme="$(gsettings get org.gnome.desktop.wm.preferences theme)"
  1911. Win_theme="${Win_theme//\'}"
  1912. ;;
  1913. 'Cinnamon'|'Muffin')
  1914. de_theme="$(gsettings get org.cinnamon.theme name)"
  1915. de_theme=${de_theme//"'"}
  1916. win_theme="$(gsettings get org.cinnamon.desktop.wm.preferences theme)"
  1917. win_theme=${win_theme//"'"}
  1918. Win_theme="${de_theme} (${win_theme})"
  1919. ;;
  1920. 'Compiz'|'Mutter'*|'GNOME Shell'|'Gala')
  1921. if type -p gsettings >/dev/null 2>&1; then
  1922. Win_theme="$(gsettings get org.gnome.shell.extensions.user-theme name 2>/dev/null)"
  1923. if [[ -z "$Win_theme" ]]; then
  1924. Win_theme="$(gsettings get org.gnome.desktop.wm.preferences theme)"
  1925. fi
  1926. Win_theme=${Win_theme//"'"}
  1927. elif type -p gconftool-2 >/dev/null 2>&1; then
  1928. Win_theme=$(gconftool-2 -g /apps/metacity/general/theme)
  1929. fi
  1930. ;;
  1931. 'Deepin WM')
  1932. if type -p gsettings >/dev/null 2>&1; then
  1933. Win_theme="$(gsettings get com.deepin.wrap.gnome.desktop.wm.preferences theme)"
  1934. Win_theme=${Win_theme//"'"}
  1935. fi
  1936. ;;
  1937. 'dminiwm') Win_theme="Not Applicable";;
  1938. 'dwm') Win_theme="Not Applicable";;
  1939. 'E16') Win_theme="$(awk -F"= " '/theme.name/ {print $2}' $HOME/.e16/e_config--0.0.cfg)";;
  1940. 'E17'|'Enlightenment')
  1941. if [ "$(which eet 2>/dev/null)" ]; then
  1942. econfig="$(eet -d $HOME/.e/e/config/standard/e.cfg config | awk '/value \"file\" string.*.edj/{ print $4 }')"
  1943. econfigend="${econfig##*/}"
  1944. Win_theme=${econfigend%.*}
  1945. fi
  1946. ;;
  1947. #E17 doesn't store cfg files in text format so for now get the profile as opposed to theme. atyoung
  1948. #TODO: Find a way to extract and read E17 .cfg files ( google seems to have nothing ). atyoung
  1949. 'E17') Win_theme=${E_CONF_PROFILE};;
  1950. 'echinus') Win_theme="Not Applicable";;
  1951. 'Emerald') if [ -f $HOME/.emerald/theme/theme.ini ]; then Win_theme="$(for a in /usr/share/emerald/themes/* $HOME/.emerald/themes/*; do cmp "$HOME/.emerald/theme/theme.ini" "$a/theme.ini" &>/dev/null && basename "$a"; done)"; fi;;
  1952. 'Finder') Win_theme="Not Applicable";;
  1953. 'FluxBox'|'Fluxbox') if [ -f $HOME/.fluxbox/init ]; then Win_theme="$(awk -F"/" '/styleFile/ {print $NF}' $HOME/.fluxbox/init)"; fi;;
  1954. 'FVWM') Win_theme="Not Applicable";;
  1955. 'howm') Win_theme="Not Applicable";;
  1956. 'i3') Win_theme="Not Applicable";;
  1957. 'IceWM') if [ -f $HOME/.icewm/theme ]; then Win_theme="$(awk -F"[\",/]" '!/#/ {print $2}' $HOME/.icewm/theme)"; fi;;
  1958. 'KWin'*)
  1959. if [[ -z $KDE_CONFIG_DIR ]]; then
  1960. if type -p kde5-config >/dev/null 2>&1; then
  1961. KDE_CONFIG_DIR=$(kde5-config --localprefix)
  1962. elif type -p kde4-config >/dev/null 2>&1; then
  1963. KDE_CONFIG_DIR=$(kde4-config --localprefix)
  1964. elif type -p kde-config >/dev/null 2>&1; then
  1965. KDE_CONFIG_DIR=$(kde-config --localprefix)
  1966. fi
  1967. fi
  1968. if [[ -n $KDE_CONFIG_DIR ]]; then
  1969. Win_theme="Not Applicable"
  1970. KDE_CONFIG_DIR=${KDE_CONFIG_DIR%/}
  1971. if [[ -f $KDE_CONFIG_DIR/share/config/kwinrc ]]; then
  1972. Win_theme="$(awk '/PluginLib=kwin3_/{gsub(/PluginLib=kwin3_/,"",$0); print $0; exit}' $KDE_CONFIG_DIR/share/config/kwinrc)"
  1973. if [[ -z "$Win_theme" ]]; then Win_theme="Not Applicable"; fi
  1974. fi
  1975. if [[ "$Win_theme" == "Not Applicable" ]]; then
  1976. if [[ -f $KDE_CONFIG_DIR/share/config/kdebugrc ]]; then
  1977. Win_theme="$(awk '/(decoration)/ {gsub(/\[/,"",$1); print $1; exit}' $KDE_CONFIG_DIR/share/config/kdebugrc)"
  1978. if [[ -z "$Win_theme" ]]; then Win_theme="Not Applicable"; fi
  1979. fi
  1980. fi
  1981. if [[ "$Win_theme" == "Not Applicable" ]]; then
  1982. if [[ -f $KDE_CONFIG_DIR/share/config/kdeglobals ]]; then
  1983. Win_theme="$(awk '/\[General\]/ {flag=1;next} /^$/{flag=0} flag {print}' $KDE_CONFIG_DIR/share/config/kdeglobals | grep -oP 'Name=\K.*')"
  1984. if [[ -z "$Win_theme" ]]; then Win_theme="Not Applicable"; fi
  1985. fi
  1986. fi
  1987. if [[ "$Win_theme" != "Not Applicable" ]]; then
  1988. if [[ ${BASH_VERSINFO[0]} -ge 4 ]]; then
  1989. if [[ ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -gt 1 ]] || [[ ${BASH_VERSINFO[0]} -gt 4 ]]; then
  1990. Win_theme="${Win_theme^}"
  1991. else
  1992. Win_theme="$(tr '[:lower:]' '[:upper:]' <<< ${Win_theme:0:1})${Win_theme:1}"
  1993. fi
  1994. else
  1995. Win_theme="$(tr '[:lower:]' '[:upper:]' <<< ${Win_theme:0:1})${Win_theme:1}"
  1996. fi
  1997. fi
  1998. fi
  1999. ;;
  2000. 'Marco')
  2001. Win_theme="$(gsettings get org.mate.Marco.general theme)"
  2002. Win_theme=${Win_theme//"'"}
  2003. ;;
  2004. 'Metacity') if [ "`gconftool-2 -g /apps/metacity/general/theme`" ]; then Win_theme="$(gconftool-2 -g /apps/metacity/general/theme)"; fi ;;
  2005. 'monsterwm') Win_theme="Not Applicable";;
  2006. 'Musca') Win_theme="Not Applicable";;
  2007. 'Notion') Win_theme="Not Applicable";;
  2008. 'OpenBox'|'Openbox')
  2009. if [ -f ${XDG_CONFIG_HOME:-${HOME}/.config}/openbox/rc.xml ]; then
  2010. Win_theme="$(awk -F"[<,>]" '/<theme/ { getline; print $3 }' ${XDG_CONFIG_HOME:-${HOME}/.config}/openbox/rc.xml)";
  2011. elif [[ -f ${XDG_CONFIG_HOME:-${HOME}/.config}/openbox/lxde-rc.xml && $DE == "LXDE" ]]; then
  2012. Win_theme="$(awk -F"[<,>]" '/<theme/ { getline; print $3 }' ${XDG_CONFIG_HOME:-${HOME}/.config}/openbox/lxde-rc.xml)";
  2013. fi
  2014. ;;
  2015. 'PekWM') if [ -f $HOME/.pekwm/config ]; then Win_theme="$(awk -F"/" '/Theme/ {gsub(/\"/,""); print $NF}' $HOME/.pekwm/config)"; fi;;
  2016. 'Ratpoison') Win_theme="Not Applicable";;
  2017. 'Sawfish') Win_theme="$(awk -F")" '/\(quote default-frame-style/{print $2}' $HOME/.sawfish/custom | sed 's/ (quote //')";;
  2018. 'ScrotWM') Win_theme="Not Applicable";;
  2019. 'SpectrWM') Win_theme="Not Applicable";;
  2020. 'swm') Win_theme="Not Applicable";;
  2021. 'subtle') Win_theme="Not Applicable";;
  2022. 'TWin')
  2023. if [[ -z $TDE_CONFIG_DIR ]]; then
  2024. if type -p tde-config >/dev/null 2>&1; then
  2025. TDE_CONFIG_DIR=$(tde-config --localprefix)
  2026. fi
  2027. fi
  2028. if [[ -n $TDE_CONFIG_DIR ]]; then
  2029. TDE_CONFIG_DIR=${TDE_CONFIG_DIR%/}
  2030. if [[ -f $TDE_CONFIG_DIR/share/config/kcmthememanagerrc ]]; then
  2031. Win_theme=$(awk '/CurrentTheme=/ {gsub(/CurrentTheme=/,"",$0); print $0; exit}' $TDE_CONFIG_DIR/share/config/kcmthememanagerrc)
  2032. fi
  2033. if [[ -z $Win_theme ]]; then
  2034. Win_theme="Not Applicable"
  2035. fi
  2036. fi
  2037. ;;
  2038. 'WindowMaker') Win_theme="Not Applicable";;
  2039. 'WMFS') Win_theme="Not Applicable";;
  2040. 'wmii') Win_theme="Not Applicable";;
  2041. 'Xfwm4') if [ -f ${XDG_CONFIG_HOME:-${HOME}/.config}/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml ]; then Win_theme="$(xfconf-query -c xfwm4 -p /general/theme)"; fi;;
  2042. 'XMonad') Win_theme="Not Applicable";;
  2043. esac
  2044. if [[ "${distro}" == "Mac OS X" ]]; then
  2045. themeNumber="$(defaults read NSGlobalDomain AppleAquaColorVariant 2>/dev/null)"
  2046. if [ "${themeNumber}" == "1" ] || [ "${themeNumber}x" == "x" ]; then
  2047. Win_theme="Blue"
  2048. else
  2049. Win_theme="Graphite"
  2050. fi
  2051. elif [[ "${distro}" == "Cygwin" || "${distro}" == "Msys" ]]; then
  2052. if [ "${WM}" == "Blackbox" ]; then
  2053. if [ "${distro}" == "Msys" ]; then
  2054. Blackbox_loc=$(reg query 'HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon' //v 'Shell')
  2055. else
  2056. Blackbox_loc=$(reg query 'HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon' /v 'Shell')
  2057. fi
  2058. Blackbox_loc="$(echo ${Blackbox_loc} | sed 's/.*REG_SZ//' | sed -e 's/^[ \t]*//' | sed 's/.\{4\}$//')"
  2059. Win_theme=$(cat "${Blackbox_loc}.rc" | grep "session.styleFile" | sed 's/ //g' | sed 's/session\.styleFile://g' | sed 's/.*\\//g')
  2060. else
  2061. if [[ "${distro}" == "Msys" ]]; then
  2062. themeFile="$(reg query 'HKCU\Software\Microsoft\Windows\CurrentVersion\Themes' //v 'CurrentTheme')"
  2063. else
  2064. themeFile="$(reg query 'HKCU\Software\Microsoft\Windows\CurrentVersion\Themes' /v 'CurrentTheme')"
  2065. fi
  2066. Win_theme=$(echo $themeFile| awk -F"\\" '{print $NF}' | sed 's|\.theme$||')
  2067. fi
  2068. fi
  2069. verboseOut "Finding window manager theme...found as '$Win_theme'"
  2070. }
  2071. # WM Theme Detection - END
  2072. # GTK Theme\Icon\Font Detection - BEGIN
  2073. detectgtk () {
  2074. gtk2Theme="Not Found"
  2075. gtk3Theme="Not Found"
  2076. gtkIcons="Not Found"
  2077. gtkFont="Not Found"
  2078. # Font detection (OS X)
  2079. if [[ ${distro} == "Mac OS X" ]]; then
  2080. gtk2Theme="Not Applicable"
  2081. gtk3Theme="Not Applicable"
  2082. gtkIcons="Not Applicable"
  2083. if ps -U ${USER} | grep [F]inder >/dev/null 2>&1; then
  2084. if [[ ${TERM_PROGRAM} == "iTerm.app" ]] && [ -f ~/Library/Preferences/com.googlecode.iterm2.plist ]; then
  2085. # iTerm2
  2086. iterm2_theme_uuid=$(defaults read com.googlecode.iTerm2 "Default Bookmark Guid")
  2087. OLD_IFS=$IFS
  2088. IFS=$'\n'
  2089. iterm2_theme_info=($(defaults read com.googlecode.iTerm2 "New Bookmarks" | grep -e Guid -e "Normal Font"))
  2090. IFS=$OLD_IFS
  2091. for i in $(seq 0 $((${#iterm2_theme_info[*]}/2-1))); do
  2092. found_uuid=$(str1=${iterm2_theme_info[$i*2]};echo ${str1:16:${#str1}-16-2})
  2093. if [[ $found_uuid == $iterm2_theme_uuid ]]; then
  2094. gtkFont=$(str2=${iterm2_theme_info[$i*2+1]};echo ${str2:25:${#str2}-25-2})
  2095. break
  2096. fi
  2097. done
  2098. else
  2099. # Terminal.app
  2100. termapp_theme_name=$(defaults read com.apple.Terminal "Default Window Settings")
  2101. OLD_IFS=$IFS
  2102. IFS=$'\n'
  2103. termapp_theme_info=($(defaults read com.apple.Terminal "Window Settings" | grep -e "name = " -e "Font = "))
  2104. IFS=$OLD_IFS
  2105. for i in $(seq 0 $((${#termapp_theme_info[*]}/2-1))); do
  2106. found_name=$(str1=${termapp_theme_info[$i*2+1]};echo ${str1:15:${#str1}-15-1})
  2107. if [[ $found_name == $termapp_theme_name ]]; then
  2108. gtkFont=$(str2=${termapp_theme_info[$i*2]};echo ${str2:288:${#str2}-288})
  2109. gtkFont=$(echo ${gtkFont%%[dD]2*;} | xxd -r -p)
  2110. break
  2111. fi
  2112. done
  2113. fi
  2114. fi
  2115. else
  2116. case $DE in
  2117. 'KDE'*) # Desktop Environment found as "KDE"
  2118. if type - p kde4-config >/dev/null 2>&1; then
  2119. KDE_CONFIG_DIR=$(kde4-config --localprefix)
  2120. if [[ -d ${KDE_CONFIG_DIR} ]]; then
  2121. if [[ -f "${KDE_CONFIG_DIR}/share/config/kdeglobals" ]]; then
  2122. KDE_CONFIG_FILE="${KDE_CONFIG_DIR}/share/config/kdeglobals"
  2123. fi
  2124. fi
  2125. elif type -p kde5-config >/dev/null 2>&1; then
  2126. KDE_CONFIG_DIR=$(kde5-config --localprefix)
  2127. if [[ -d ${KDE_CONFIG_DIR} ]]; then
  2128. if [[ -f "${KDE_CONFIG_DIR}/share/config/kdeglobals" ]]; then
  2129. KDE_CONFIG_FILE="${KDE_CONFIG_DIR}/share/config/kdeglobals"
  2130. fi
  2131. fi
  2132. elif type -p kde-config >/dev/null 2>&1; then
  2133. KDE_CONFIG_DIR=$(kde-config --localprefix)
  2134. if [[ -d ${KDE_CONFIG_DIR} ]]; then
  2135. if [[ -f "${KDE_CONFIG_DIR}/share/config/kdeglobals" ]]; then
  2136. KDE_CONFIG_FILE="${KDE_CONFIG_DIR}/share/config/kdeglobals"
  2137. fi
  2138. fi
  2139. fi
  2140. if [[ -n ${KDE_CONFIG_FILE} ]]; then
  2141. if grep -q "widgetStyle=" "${KDE_CONFIG_FILE}"; then
  2142. gtk2Theme=$(awk -F"=" '/widgetStyle=/ {print $2}' "${KDE_CONFIG_FILE}")
  2143. elif grep -q "colorScheme=" "${KDE_CONFIG_FILE}"; then
  2144. gtk2Theme=$(awk -F"=" '/colorScheme=/ {print $2}' "${KDE_CONFIG_FILE}")
  2145. fi
  2146. if grep -q "Theme=" "${KDE_CONFIG_FILE}"; then
  2147. gtkIcons=$(awk -F"=" '/Theme=/ {print $2}' "${KDE_CONFIG_FILE}")
  2148. fi
  2149. if grep -q "Font=" "${KDE_CONFIG_FILE}"; then
  2150. gtkFont=$(awk -F"=" '/font=/ {print $2}' "${KDE_CONFIG_FILE}")
  2151. fi
  2152. fi
  2153. if [[ -f $HOME/.gtkrc-2.0 ]]; then
  2154. gtk2Theme=$(grep '^gtk-theme-name' $HOME/.gtkrc-2.0 | awk -F'=' '{print $2}')
  2155. gtk2Theme=${gtk2Theme//\"/}
  2156. gtkIcons=$(grep '^gtk-icon-theme-name' $HOME/.gtkrc-2.0 | awk -F'=' '{print $2}')
  2157. gtkIcons=${gtkIcons//\"/}
  2158. gtkFont=$(grep 'font_name' $HOME/.gtkrc-2.0 | awk -F'=' '{print $2}')
  2159. gtkFont=${gtkFont//\"/}
  2160. fi
  2161. if [[ -f $HOME/.config/gtk-3.0/settings.ini ]]; then
  2162. gtk3Theme=$(grep '^gtk-theme-name=' $HOME/.config/gtk-3.0/settings.ini | awk -F'=' '{print $2}')
  2163. fi
  2164. ;;
  2165. 'Cinnamon'*) # Desktop Environment found as "Cinnamon"
  2166. if type -p gsettings >/dev/null 2>&1; then
  2167. gtk3Theme=$(gsettings get org.cinnamon.desktop.interface gtk-theme)
  2168. gtk3Theme=${gtk3Theme//"'"}
  2169. gtk2Theme=${gtk3Theme}
  2170. gtkIcons=$(gsettings get org.cinnamon.desktop.interface icon-theme)
  2171. gtkIcons=${gtkIcons//"'"}
  2172. gtkFont=$(gsettings get org.cinnamon.desktop.interface font-name)
  2173. gtkFont=${gtkFont//"'"}
  2174. if [ "$background_detect" == "1" ]; then gtkBackground=$(gsettings get org.gnome.desktop.background picture-uri); fi
  2175. fi
  2176. ;;
  2177. 'GNOME'*|'Unity'*|'Budgie') # Desktop Environment found as "GNOME"
  2178. if type -p gsettings >/dev/null 2>&1; then
  2179. gtk3Theme=$(gsettings get org.gnome.desktop.interface gtk-theme)
  2180. gtk3Theme=${gtk3Theme//"'"}
  2181. gtk2Theme=${gtk3Theme}
  2182. gtkIcons=$(gsettings get org.gnome.desktop.interface icon-theme)
  2183. gtkIcons=${gtkIcons//"'"}
  2184. gtkFont=$(gsettings get org.gnome.desktop.interface font-name)
  2185. gtkFont=${gtkFont//"'"}
  2186. if [ "$background_detect" == "1" ]; then gtkBackground=$(gsettings get org.gnome.desktop.background picture-uri); fi
  2187. elif type -p gconftool-2 >/dev/null 2>&1; then
  2188. gtk2Theme=$(gconftool-2 -g /desktop/gnome/interface/gtk_theme)
  2189. gtkIcons=$(gconftool-2 -g /desktop/gnome/interface/icon_theme)
  2190. gtkFont=$(gconftool-2 -g /desktop/gnome/interface/font_name)
  2191. if [ "$background_detect" == "1" ]; then
  2192. gtkBackgroundFull=$(gconftool-2 -g /desktop/gnome/background/picture_filename)
  2193. gtkBackground=$(echo "$gtkBackgroundFull" | awk -F"/" '{print $NF}')
  2194. fi
  2195. fi
  2196. ;;
  2197. 'MATE'*) # MATE desktop environment
  2198. #if type -p gsettings >/dev/null 2&>1; then
  2199. gtk3Theme=$(gsettings get org.mate.interface gtk-theme)
  2200. # gtk3Theme=${gtk3Theme//"'"}
  2201. gtk2Theme=${gtk3Theme}
  2202. gtkIcons=$(gsettings get org.mate.interface icon-theme)
  2203. gtkIcons=${gtkIcons//"'"}
  2204. gtkFont=$(gsettings get org.mate.interface font-name)
  2205. gtkFont=${gtkFont//"'"}
  2206. #fi
  2207. ;;
  2208. 'Xfce'*) # Desktop Environment found as "Xfce"
  2209. if [ "$distro" == "BunsenLabs" ] ; then
  2210. gtk2Theme=$(awk -F'"' '/^gtk-theme/ {print $2}' $HOME/.gtkrc-2.0)
  2211. gtk3Theme=$(awk -F'=' '/^gtk-theme-name/ {print $2}' $HOME/.config/gtk-3.0/settings.ini)
  2212. gtkIcons=$(awk -F'"' '/^gtk-icon-theme/ {print $2}' $HOME/.gtkrc-2.0)
  2213. gtkFont=$(awk -F'"' '/^gtk-font-name/ {print $2}' $HOME/.gtkrc-2.0)
  2214. else
  2215. if type -p xfconf-query >/dev/null 2>&1; then
  2216. gtk2Theme=$(xfconf-query -c xsettings -p /Net/ThemeName)
  2217. fi
  2218. if type -p xfconf-query >/dev/null 2>&1; then
  2219. gtkIcons=$(xfconf-query -c xsettings -p /Net/IconThemeName)
  2220. fi
  2221. if type -p xfconf-query >/dev/null 2>&1; then
  2222. gtkFont=$(xfconf-query -c xsettings -p /Gtk/FontName)
  2223. fi
  2224. fi
  2225. ;;
  2226. 'LXDE'*)
  2227. config_home="${XDG_CONFIG_HOME:-${HOME}/.config}"
  2228. if [ -f "$config_home/lxde/config" ]; then
  2229. lxdeconf="/lxde/config"
  2230. elif [ "$distro" == "Trisquel" ] || [ "$distro" == "FreeBSD" ]; then
  2231. lxdeconf=""
  2232. elif [ -f "$config_home/lxsession/Lubuntu/desktop.conf" ]; then
  2233. lxdeconf="/lxsession/Lubuntu/desktop.conf"
  2234. else
  2235. lxdeconf="/lxsession/LXDE/desktop.conf"
  2236. fi
  2237. if grep -q "sNet\/ThemeName" "${config_home}${lxdeconf}" 2>/dev/null; then
  2238. gtk2Theme=$(awk -F'=' '/sNet\/ThemeName/ {print $2}' ${config_home}${lxdeconf})
  2239. fi
  2240. if grep -q IconThemeName "${config_home}${lxdeconf}" 2>/dev/null; then
  2241. gtkIcons=$(awk -F'=' '/sNet\/IconThemeName/ {print $2}' ${config_home}${lxdeconf})
  2242. fi
  2243. if grep -q FontName "${config_home}${lxdeconf}" 2>/dev/null; then
  2244. gtkFont=$(awk -F'=' '/sGtk\/FontName/ {print $2}' ${config_home}${lxdeconf})
  2245. fi
  2246. ;;
  2247. # /home/me/.config/rox.sourceforge.net/ROX-Session/Settings.xml
  2248. *) # Lightweight or No DE Found
  2249. if [ -f "$HOME/.gtkrc-2.0" ]; then
  2250. if grep -q gtk-theme $HOME/.gtkrc-2.0; then
  2251. gtk2Theme=$(awk -F'"' '/^gtk-theme/ {print $2}' $HOME/.gtkrc-2.0)
  2252. fi
  2253. if grep -q icon-theme $HOME/.gtkrc-2.0; then
  2254. gtkIcons=$(awk -F'"' '/^gtk-icon-theme/ {print $2}' $HOME/.gtkrc-2.0)
  2255. fi
  2256. if grep -q font $HOME/.gtkrc-2.0; then
  2257. gtkFont=$(awk -F'"' '/^gtk-font-name/ {print $2}' $HOME/.gtkrc-2.0)
  2258. fi
  2259. fi
  2260. # $HOME/.gtkrc.mine theme detect only
  2261. if [[ -f "$HOME/.gtkrc.mine" ]]; then
  2262. minegtkrc="$HOME/.gtkrc.mine"
  2263. elif [[ -f "$HOME/.gtkrc-2.0.mine" ]]; then
  2264. minegtkrc="$HOME/.gtkrc-2.0.mine"
  2265. fi
  2266. if [ -f "$minegtkrc" ]; then
  2267. if grep -q "^include" "$minegtkrc"; then
  2268. gtk2Theme=$(grep '^include.*gtkrc' "$minegtkrc" | awk -F "/" '{ print $5 }')
  2269. fi
  2270. if grep -q "^gtk-icon-theme-name" "$minegtkrc"; then
  2271. gtkIcons=$(grep '^gtk-icon-theme-name' "$minegtkrc" | awk -F '"' '{print $2}')
  2272. fi
  2273. fi
  2274. # /etc/gtk-2.0/gtkrc compatability
  2275. if [[ -f /etc/gtk-2.0/gtkrc && ! -f "$HOME/.gtkrc-2.0" && ! -f "$HOME/.gtkrc.mine" && ! -f "$HOME/.gtkrc-2.0.mine" ]]; then
  2276. if grep -q gtk-theme-name /etc/gtk-2.0/gtkrc; then
  2277. gtk2Theme=$(awk -F'"' '/^gtk-theme-name/ {print $2}' /etc/gtk-2.0/gtkrc)
  2278. fi
  2279. if grep -q gtk-fallback-theme-name /etc/gtk-2.0/gtkrc && ! [ "x$gtk2Theme" = "x" ]; then
  2280. gtk2Theme=$(awk -F'"' '/^gtk-fallback-theme-name/ {print $2}' /etc/gtk-2.0/gtkrc)
  2281. fi
  2282. if grep -q icon-theme /etc/gtk-2.0/gtkrc; then
  2283. gtkIcons=$(awk -F'"' '/^icon-theme/ {print $2}' /etc/gtk-2.0/gtkrc)
  2284. fi
  2285. if grep -q gtk-fallback-icon-theme /etc/gtk-2.0/gtkrc && ! [ "x$gtkIcons" = "x" ]; then
  2286. gtkIcons=$(awk -F'"' '/^gtk-fallback-icon-theme/ {print $2}' /etc/gtk-2.0/gtkrc)
  2287. fi
  2288. if grep -q font /etc/gtk-2.0/gtkrc; then
  2289. gtkFont=$(awk -F'"' '/^gtk-font-name/ {print $2}' /etc/gtk-2.0/gtkrc)
  2290. fi
  2291. fi
  2292. # EXPERIMENTAL gtk3 Theme detection
  2293. if [ -f "$HOME/.config/gtk-3.0/settings.ini" ]; then
  2294. if grep -q gtk-theme-name $HOME/.config/gtk-3.0/settings.ini; then
  2295. gtk3Theme=$(awk -F'=' '/^gtk-theme-name/ {print $2}' $HOME/.config/gtk-3.0/settings.ini)
  2296. fi
  2297. fi
  2298. # Proper gtk3 Theme detection
  2299. #if type -p gsettings >/dev/null 2>&1; then
  2300. # gtk3Theme=$(gsettings get org.gnome.desktop.interface gtk-theme 2>/dev/null)
  2301. # gtk3Theme=${gtk3Theme//"'"}
  2302. #fi
  2303. # ROX-Filer icon detect only
  2304. if [ -a "${XDG_CONFIG_HOME:-${HOME}/.config}/rox.sourceforge.net/ROX-Filer/Options" ]; then
  2305. gtkIcons=$(awk -F'[>,<]' '/icon_theme/ {print $3}' ${XDG_CONFIG_HOME:-${HOME}/.config}/rox.sourceforge.net/ROX-Filer/Options)
  2306. fi
  2307. # E17 detection
  2308. if [ $E_ICON_THEME ]; then
  2309. gtkIcons=${E_ICON_THEME}
  2310. gtk2Theme="Not available."
  2311. gtkFont="Not available."
  2312. fi
  2313. # Background Detection (feh, nitrogen)
  2314. if [ "$background_detect" == "1" ]; then
  2315. if [ -a $HOME/.fehbg ]; then
  2316. gtkBackgroundFull=$(awk -F"'" '/feh --bg/{print $2}' $HOME/.fehbg 2>/dev/null)
  2317. gtkBackground=$(echo "$gtkBackgroundFull" | awk -F"/" '{print $NF}')
  2318. elif [ -a ${XDG_CONFIG_HOME:-${HOME}/.config}/nitrogen/bg-saved.cfg ]; then
  2319. gtkBackground=$(awk -F"/" '/file=/ {print $NF}' ${XDG_CONFIG_HOME:-${HOME}/.config}/nitrogen/bg-saved.cfg)
  2320. fi
  2321. fi
  2322. if [[ "$distro" == "Cygwin" || "$distro" == "Msys" ]]; then
  2323. if [ "$gtkFont" == "Not Found" ]; then
  2324. if [ -f "$HOME/.minttyrc" ]; then
  2325. gtkFont="$(grep '^Font=.*' "$HOME/.minttyrc" | grep -o '[0-9A-z ]*$')"
  2326. fi
  2327. fi
  2328. fi
  2329. ;;
  2330. esac
  2331. fi
  2332. verboseOut "Finding GTK2 theme...found as '$gtk2Theme'"
  2333. verboseOut "Finding GTK3 theme...found as '$gtk3Theme'"
  2334. verboseOut "Finding icon theme...found as '$gtkIcons'"
  2335. verboseOut "Finding user font...found as '$gtkFont'"
  2336. [[ $gtkBackground ]] && verboseOut "Finding background...found as '$gtkBackground'"
  2337. }
  2338. # GTK Theme\Icon\Font Detection - END
  2339. # Android-specific detections
  2340. detectdroid () {
  2341. distro_ver=$(getprop ro.build.version.release)
  2342. hostname=$(getprop net.hostname)
  2343. _device=$(getprop ro.product.device)
  2344. _model=$(getprop ro.product.model)
  2345. device="${_model} (${_device})"
  2346. if [[ $(getprop ro.build.host) == "cyanogenmod" ]]; then
  2347. rom=$(getprop ro.cm.version)
  2348. else
  2349. rom=$(getprop ro.build.display.id)
  2350. fi
  2351. baseband=$(getprop ro.baseband)
  2352. cpu=$(grep '^Processor' /proc/cpuinfo)
  2353. cpu=$(echo "$cpu" | sed 's/Processor.*: //')
  2354. }
  2355. #######################
  2356. # End Detection Phase
  2357. #######################
  2358. takeShot () {
  2359. if [[ -z $screenCommand ]]; then
  2360. shotfiles[1]=${shotfile}
  2361. if [ "$distro" == "Mac OS X" ]; then
  2362. displays="$(system_profiler SPDisplaysDataType | grep 'Resolution:' | wc -l | tr -d ' ')"
  2363. for (( i=2; i<=$displays; i++))
  2364. do
  2365. shotfiles[$i]="$(echo ${shotfile} | sed "s/\(.*\)\./\1_${i}./")"
  2366. done
  2367. printf "Taking shot in 3.. "; sleep 1; printf "2.. "; sleep 1; printf "1.. "; sleep 1; printf "0.\n"; screencapture -x ${shotfiles[@]} &> /dev/null
  2368. else
  2369. if type -p scrot >/dev/null 2>&1; then
  2370. scrot -cd3 "${shotfile}"
  2371. else
  2372. errorOut "Cannot take screenshot! \`scrot' not in \$PATH"
  2373. fi
  2374. fi
  2375. if [ -f "${shotfile}" ]; then
  2376. verboseOut "Screenshot saved at '${shotfiles[@]}'"
  2377. if [[ "${upload}" == "1" ]]; then
  2378. if type -p curl >/dev/null 2>&1; then
  2379. printf "${bold}==>${c0} Uploading your screenshot now..."
  2380. case "${uploadLoc}" in
  2381. 'teknik')
  2382. baseurl='https://u.teknik.io'
  2383. uploadurl='https://api.teknik.io/upload/post'
  2384. ret=$(curl -sf -F file="@${shotfiles[@]}" ${uploadurl})
  2385. desturl="${ret##*url\":\"}"
  2386. desturl="${desturl%%\"*}"
  2387. desturl="${desturl//\\}"
  2388. ;;
  2389. 'mediacrush')
  2390. baseurl='https://mediacru.sh'
  2391. uploadurl='https://mediacru.sh/api/upload/file'
  2392. ret=$(curl -sf -F file="@${shotfiles[@]};type=image/png" ${uploadurl})
  2393. filehash=$(echo "${ret}" | grep "hash" | cut -d '"' -f4)
  2394. desturl="${baseurl}/${filehash}"
  2395. ;;
  2396. 'imgur')
  2397. baseurl='http://imgur.com'
  2398. uploadurl='http://imgur.com/upload'
  2399. ret=$(curl -sf -F file="@${shotfiles[@]}" ${uploadurl})
  2400. filehash="${ret##*hash\":\"}"
  2401. filehash="${filehash%%\"*}"
  2402. desturl="${baseurl}/${filehash}"
  2403. ;;
  2404. 'hmp')
  2405. baseurl='http://i.hmp.me/m'
  2406. uploadurl='http://hmp.me/ap/?uf=1'
  2407. ret=$(curl -sf -F a="@${shotfiles[@]};type=image/png" ${uploadurl})
  2408. desturl="${ret##*img_path\":\"}"
  2409. desturl="${desturl%%\"*}"
  2410. desturl="${desturl//\\}"
  2411. ;;
  2412. 'local-example')
  2413. baseurl="http://www.example.com"
  2414. serveraddr="www.example.com"
  2415. scptimeout="20"
  2416. serverdir="/path/to/directory"
  2417. scp -qo ConnectTimeout="${scptimeout}" "${shotfiles[@]}" "${serveraddr}:${serverdir}"
  2418. desturl="${baseurl}/${shotfile}"
  2419. ;;
  2420. esac
  2421. printf "your screenshot can be viewed at ${desturl}\n"
  2422. else
  2423. errorOut "Cannot upload screenshot! \`curl' not in \$PATH"
  2424. fi
  2425. fi
  2426. else
  2427. if type -p scrot >/dev/null 2>&1; then
  2428. errorOut "ERROR: Problem saving screenshot to ${shotfiles[@]}"
  2429. fi
  2430. fi
  2431. else
  2432. $screenCommand
  2433. fi
  2434. }
  2435. asciiText () {
  2436. # Distro logos and ASCII outputs
  2437. if [[ "$asc_distro" ]]; then myascii="${asc_distro}"
  2438. elif [[ "$art" ]]; then myascii="custom"
  2439. elif [[ "$fake_distro" ]]; then myascii="${fake_distro}"
  2440. else myascii="${distro}"; fi
  2441. case ${myascii} in
  2442. "custom") source "$art" ;;
  2443. "Alpine Linux")
  2444. if [[ "$no_color" != "1" ]]; then
  2445. c1=$(getColor 'light blue') # Light
  2446. c2=$(getColor 'blue') # Dark
  2447. fi
  2448. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  2449. startline="0"
  2450. logowidth="34"
  2451. fulloutput=(
  2452. "${c1} ................ %s"
  2453. "${c1} ∴::::::::::::::::∴ %s"
  2454. "${c1} ∴::::::::::::::::::∴ %s"
  2455. "${c1} ∴::::::::::::::::::::∴ %s"
  2456. "${c1} ∴:::::::. :::::':::::::∴ %s"
  2457. "${c1} ∴:::::::. ;::; ::::::::∴ %s"
  2458. "${c1} ∴::::::; ∵ :::::::∴ %s"
  2459. "${c1} ∴:::::. . .::::::∴ %s"
  2460. "${c1} :::::: :::. . :::::: %s"
  2461. "${c1} ∵:::: ::::::. ::. ::::∵ %s"
  2462. "${c1} ∵:.. .:;::::::: :::. :::∵ %s"
  2463. "${c1} ∵::::::::::::::::::::::::∵ %s"
  2464. "${c1} ∵::::::::::::::::::::::∵ %s"
  2465. "${c1} ∵::::::::::::::::::::∵ %s"
  2466. "${c1} :::::::::::::::::::: %s"
  2467. "${c1} ∵::::::::::::::::∵ %s")
  2468. ;;
  2469. "Arch Linux - Old")
  2470. if [[ "$no_color" != "1" ]]; then
  2471. c1=$(getColor 'white') # White
  2472. c2=$(getColor 'light blue') # Light Blue
  2473. fi
  2474. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  2475. startline="0"
  2476. logowidth="37"
  2477. fulloutput=(
  2478. "${c1} __ %s"
  2479. "${c1} _=(SDGJT=_ %s"
  2480. "${c1} _GTDJHGGFCVS) %s"
  2481. "${c1} ,GTDJGGDTDFBGX0 %s"
  2482. "${c1} JDJDIJHRORVFSBSVL${c2}-=+=,_ %s"
  2483. "${c1} IJFDUFHJNXIXCDXDSV,${c2} \"DEBL %s"
  2484. "${c1} [LKDSDJTDU=OUSCSBFLD.${c2} '?ZWX, %s"
  2485. "${c1} ,LMDSDSWH' \`DCBOSI${c2} DRDS], %s"
  2486. "${c1} SDDFDFH' !YEWD,${c2} )HDROD %s"
  2487. "${c1} !KMDOCG &GSU|${c2}\_GFHRGO\' %s"
  2488. "${c1} HKLSGP'${c2} __${c1}\TKM0${c2}\GHRBV)' %s"
  2489. "${c1} JSNRVW'${c2} __+MNAEC${c1}\IOI,${c2}\BN' %s"
  2490. "${c1} HELK['${c2} __,=OFFXCBGHC${c1}\FD) %s"
  2491. "${c1} ?KGHE ${c2}\_-#DASDFLSV='${c1} 'EF %s"
  2492. "${c1} 'EHTI !H %s"
  2493. "${c1} \`0F' '! %s"
  2494. "${c1} %s"
  2495. "${c1} %s")
  2496. ;;
  2497. "Arch Linux")
  2498. if [[ "$no_color" != "1" ]]; then
  2499. c1=$(getColor 'light cyan') # Light
  2500. c2=$(getColor 'cyan') # Dark
  2501. fi
  2502. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  2503. startline="1"
  2504. logowidth="38"
  2505. fulloutput=(
  2506. "${c1} -\` "
  2507. "${c1} .o+\` %s"
  2508. "${c1} \`ooo/ %s"
  2509. "${c1} \`+oooo: %s"
  2510. "${c1} \`+oooooo: %s"
  2511. "${c1} -+oooooo+: %s"
  2512. "${c1} \`/:-:++oooo+: %s"
  2513. "${c1} \`/++++/+++++++: %s"
  2514. "${c1} \`/++++++++++++++: %s"
  2515. "${c1} \`/+++o${c2}oooooooo${c1}oooo/\` %s"
  2516. "${c2} ${c1}./${c2}ooosssso++osssssso${c1}+\` %s"
  2517. "${c2} .oossssso-\`\`\`\`/ossssss+\` %s"
  2518. "${c2} -osssssso. :ssssssso. %s"
  2519. "${c2} :osssssss/ osssso+++. %s"
  2520. "${c2} /ossssssss/ +ssssooo/- %s"
  2521. "${c2} \`/ossssso+/:- -:/+osssso+- %s"
  2522. "${c2} \`+sso+:-\` \`.-/+oso: %s"
  2523. "${c2} \`++:. \`-/+/%s"
  2524. "${c2} .\` \`/%s")
  2525. ;;
  2526. "Mint")
  2527. if [[ "$no_color" != "1" ]]; then
  2528. c1=$(getColor 'white') # White
  2529. c2=$(getColor 'light green') # Bold Green
  2530. fi
  2531. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  2532. startline="0"
  2533. logowidth="38"
  2534. fulloutput=(
  2535. "${c2} %s"
  2536. "${c2} MMMMMMMMMMMMMMMMMMMMMMMMMmds+. %s"
  2537. "${c2} MMm----::-://////////////oymNMd+\` %s"
  2538. "${c2} MMd ${c1}/++ ${c2}-sNMd: %s"
  2539. "${c2} MMNso/\` ${c1}dMM \`.::-. .-::.\` ${c2}.hMN: %s"
  2540. "${c2} ddddMMh ${c1}dMM :hNMNMNhNMNMNh: ${c2}\`NMm %s"
  2541. "${c2} NMm ${c1}dMM .NMN/-+MMM+-/NMN\` ${c2}dMM %s"
  2542. "${c2} NMm ${c1}dMM -MMm \`MMM dMM. ${c2}dMM %s"
  2543. "${c2} NMm ${c1}dMM -MMm \`MMM dMM. ${c2}dMM %s"
  2544. "${c2} NMm ${c1}dMM .mmd \`mmm yMM. ${c2}dMM %s"
  2545. "${c2} NMm ${c1}dMM\` ..\` ... ydm. ${c2}dMM %s"
  2546. "${c2} hMM- ${c1}+MMd/-------...-:sdds ${c2}dMM %s"
  2547. "${c2} -NMm- ${c1}:hNMNNNmdddddddddy/\` ${c2}dMM %s"
  2548. "${c2} -dMNs-${c1}\`\`-::::-------.\`\` ${c2}dMM %s"
  2549. "${c2} \`/dMNmy+/:-------------:/yMMM %s"
  2550. "${c2} ./ydNMMMMMMMMMMMMMMMMMMMMM %s"
  2551. "${c2} \.MMMMMMMMMMMMMMMMMMM %s"
  2552. "${c2} %s")
  2553. ;;
  2554. "LMDE")
  2555. if [[ "$no_color" != "1" ]]; then
  2556. c1=$(getColor 'white') # White
  2557. c2=$(getColor 'light green') # Bold Green
  2558. fi
  2559. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  2560. startline="0"
  2561. logowidth="31"
  2562. fulloutput=(
  2563. "${c1} \`.-::---.. %s"
  2564. "${c2} .:++++ooooosssoo:. %s"
  2565. "${c2} .+o++::. \`.:oos+. %s"
  2566. "${c2} :oo:.\` -+oo${c1}: %s"
  2567. "${c2} ${c1}\`${c2}+o/\` .${c1}::::::${c2}-. .++-${c1}\` %s"
  2568. "${c2} ${c1}\`${c2}/s/ .yyyyyyyyyyo: +o-${c1}\` %s"
  2569. "${c2} ${c1}\`${c2}so .ss ohyo\` :s-${c1}: %s"
  2570. "${c2} ${c1}\`${c2}s/ .ss h m myy/ /s\`${c1}\` %s"
  2571. "${c2} \`s: \`oo s m Myy+-o:\` %s"
  2572. "${c2} \`oo :+sdoohyoydyso/. %s"
  2573. "${c2} :o. .:////////++: %s"
  2574. "${c2} \`/++ ${c1}-:::::- %s"
  2575. "${c2} ${c1}\`${c2}++- %s"
  2576. "${c2} ${c1}\`${c2}/+- %s"
  2577. "${c2} ${c1}.${c2}+/. %s"
  2578. "${c2} ${c1}.${c2}:+-. %s"
  2579. "${c2} \`--.\`\` %s"
  2580. "${c2} %s")
  2581. ;;
  2582. "Ubuntu")
  2583. if [[ "$no_color" != "1" ]]; then
  2584. c1=$(getColor 'white') # White
  2585. c2=$(getColor 'light red') # Light Red
  2586. c3=$(getColor 'yellow') # Bold Yellow
  2587. fi
  2588. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; fi
  2589. startline="0"
  2590. logowidth="38"
  2591. fulloutput=(
  2592. "${c2} ./+o+- %s"
  2593. "${c1} yyyyy- ${c2}-yyyyyy+ %s"
  2594. "${c1} ${c1}://+//////${c2}-yyyyyyo %s"
  2595. "${c3} .++ ${c1}.:/++++++/-${c2}.+sss/\` %s"
  2596. "${c3} .:++o: ${c1}/++++++++/:--:/- %s"
  2597. "${c3} o:+o+:++.${c1}\`..\`\`\`.-/oo+++++/ %s"
  2598. "${c3} .:+o:+o/.${c1} \`+sssoo+/ %s"
  2599. "${c1} .++/+:${c3}+oo+o:\`${c1} /sssooo. %s"
  2600. "${c1} /+++//+:${c3}\`oo+o${c1} /::--:. %s"
  2601. "${c1} \+/+o+++${c3}\`o++o${c2} ++////. %s"
  2602. "${c1} .++.o+${c3}++oo+:\`${c2} /dddhhh. %s"
  2603. "${c3} .+.o+oo:.${c2} \`oddhhhh+ %s"
  2604. "${c3} \+.++o+o\`${c2}\`-\`\`\`\`.:ohdhhhhh+ %s"
  2605. "${c3} \`:o+++ ${c2}\`ohhhhhhhhyo++os: %s"
  2606. "${c3} .o:${c2}\`.syhhhhhhh/${c3}.oo++o\` %s"
  2607. "${c2} /osyyyyyyo${c3}++ooo+++/ %s"
  2608. "${c2} \`\`\`\`\` ${c3}+oo+++o\: %s"
  2609. "${c3} \`oo++. %s")
  2610. ;;
  2611. "KDE neon")
  2612. if [[ "$no_color" != "1" ]]; then
  2613. c1=$(getColor 'light green') # Bold Green
  2614. fi
  2615. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  2616. startline="0"
  2617. logowidth="43"
  2618. fulloutput=(
  2619. "${c1} \`..---+/---..\` %s"
  2620. "${c1} \`---.\`\` \`\` \`.---.\` %s"
  2621. "${c1} .--.\` \`\` \`-:-. %s"
  2622. "${c1} \`:/: \`.----//----.\` :/- %s"
  2623. "${c1} .:. \`---\` \`--.\` .:\` %s"
  2624. "${c1} .:\` \`--\` .:- \`:. %s"
  2625. "${c1} \`/ \`:. \`.-::-.\` -:\` \`/\` %s"
  2626. "${c1} /. /. \`:++++++++:\` .: .: %s"
  2627. "${c1} \`/ .: \`+++++++++++/ /\` \`+\` %s"
  2628. "${c1} /+\` -- .++++++++++++\` :. .+: %s"
  2629. "${c1} \`/ .: \`+++++++++++/ /\` \`+\` %s"
  2630. "${c1} /\` /. \`:++++++++:\` .: .: %s"
  2631. "${c1} ./ \`:. \`.:::-.\` -:\` \`/\` %s"
  2632. "${c1} .:\` \`--\` .:- \`:. %s"
  2633. "${c1} .:. \`---\` \`--.\` .:\` %s"
  2634. "${c1} \`:/: \`.----//----.\` :/- %s"
  2635. "${c1} .-:.\` \`\` \`-:-. %s"
  2636. "${c1} \`---.\`\` \`\` \`.---.\` %s"
  2637. "${c1} \`..---+/---..\` %s")
  2638. ;;
  2639. "Debian")
  2640. if [[ "$no_color" != "1" ]]; then
  2641. c1=$(getColor 'white') # White
  2642. c2=$(getColor 'light red') # Light Red
  2643. fi
  2644. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  2645. startline="0"
  2646. logowidth="32"
  2647. fulloutput=(
  2648. "${c1} _,met\$\$\$\$\$gg. %s"
  2649. "${c1} ,g\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$P. %s"
  2650. "${c1} ,g\$\$P\"\" \"\"\"Y\$\$.\". %s"
  2651. "${c1} ,\$\$P' \`\$\$\$. %s"
  2652. "${c1} ',\$\$P ,ggs. \`\$\$b: %s"
  2653. "${c1} \`d\$\$' ,\$P\"\' ${c2}.${c1} \$\$\$ %s"
  2654. "${c1} \$\$P d\$\' ${c2},${c1} \$\$P %s"
  2655. "${c1} \$\$: \$\$. ${c2}-${c1} ,d\$\$' %s"
  2656. "${c1} \$\$\; Y\$b._ _,d\$P' %s"
  2657. "${c1} Y\$\$. ${c2}\`.${c1}\`\"Y\$\$\$\$P\"' %s"
  2658. "${c1} \`\$\$b ${c2}\"-.__ %s"
  2659. "${c1} \`Y\$\$ %s"
  2660. "${c1} \`Y\$\$. %s"
  2661. "${c1} \`\$\$b. %s"
  2662. "${c1} \`Y\$\$b. %s"
  2663. "${c1} \`\"Y\$b._ %s"
  2664. "${c1} \`\"\"\"\" %s"
  2665. "${c1} %s")
  2666. ;;
  2667. "Devuan")
  2668. if [[ "$no_color" != "1" ]]; then
  2669. c1=$(getColor 'light purple') # Light purple
  2670. fi
  2671. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  2672. startline="0"
  2673. logowidth="36"
  2674. fulloutput=(
  2675. "${c1} %s"
  2676. "${c1} ..,,;;;::;,.. %s"
  2677. "${c1} \`':ddd;:,. %s"
  2678. "${c1} \`'dPPd:,. %s"
  2679. "${c1} \`:b\$\$b\`. %s"
  2680. "${c1} 'P\$\$\$d\` %s"
  2681. "${c1} .\$\$\$\$\$\` %s"
  2682. "${c1} ;\$\$\$\$\$P %s"
  2683. "${c1} .:P\$\$\$\$\$\$\` %s"
  2684. "${c1} .,:b\$\$\$\$\$\$\$;' %s"
  2685. "${c1} .,:dP\$\$\$\$\$\$\$\$b:' %s"
  2686. "${c1} .,:;db\$\$\$\$\$\$\$\$\$\$Pd'\` %s"
  2687. "${c1} ,db\$\$\$\$\$\$\$\$\$\$\$\$\$\$b:'\` %s"
  2688. "${c1} :\$\$\$\$\$\$\$\$\$\$\$\$b:'\` %s"
  2689. "${c1} \`\$\$\$\$\$bd:''\` %s"
  2690. "${c1} \`'''\` %s"
  2691. "${c1} %s")
  2692. ;;
  2693. "Raspbian")
  2694. if [[ "$no_color" != "1" ]]; then
  2695. c1=$(getColor 'light green') # Light Green
  2696. c2=$(getColor 'light red') # Light Red
  2697. fi
  2698. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  2699. startline="0"
  2700. logowidth="32"
  2701. fulloutput=(
  2702. "${c1} .',;:cc;,'. .,;::c:,,. %s"
  2703. "${c1} ,ooolcloooo: 'oooooccloo: %s"
  2704. "${c1} .looooc;;:ol :oc;;:ooooo' %s"
  2705. "${c1} ;oooooo: ,ooooooc. %s"
  2706. "${c1} .,:;'. .;:;'. %s"
  2707. "${c2} .... ..'''''. .... %s"
  2708. "${c2} .''. ..'''''. ..''. %s"
  2709. "${c2} .. ..... ..... .. %s"
  2710. "${c2} . .''''''' .''''''. . %s"
  2711. "${c2} .'' .'''''''' .'''''''. ''. %s"
  2712. "${c2} ''' ''''''' .'''''' ''' %s"
  2713. "${c2} .' ........... ... .'. %s"
  2714. "${c2} .... ''''''''. .''. %s"
  2715. "${c2} '''''. ''''''''. .''''' %s"
  2716. "${c2} '''''. .'''''. .'''''. %s"
  2717. "${c2} ..''. . .''.. %s"
  2718. "${c2} .''''''' %s"
  2719. "${c2} ...... %s")
  2720. ;;
  2721. "CrunchBang")
  2722. if [[ "$no_color" != "1" ]]; then
  2723. c1=$(getColor 'white') # White
  2724. fi
  2725. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  2726. startline="0"
  2727. logowidth="38"
  2728. fulloutput=(
  2729. "${c1} %s"
  2730. "${c1} ███ ███ ███ %s"
  2731. "${c1} ███ ███ ███ %s"
  2732. "${c1} ███ ███ ███ %s"
  2733. "${c1} ███ ███ ███ %s"
  2734. "${c1} ████████████████████████████ ███ %s"
  2735. "${c1} ████████████████████████████ ███ %s"
  2736. "${c1} ███ ███ ███ %s"
  2737. "${c1} ███ ███ ███ %s"
  2738. "${c1} ███ ███ ███ %s"
  2739. "${c1} ███ ███ ███ %s"
  2740. "${c1} ████████████████████████████ ███ %s"
  2741. "${c1} ████████████████████████████ ███ %s"
  2742. "${c1} ███ ███ %s"
  2743. "${c1} ███ ███ %s"
  2744. "${c1} ███ ███ ███ %s"
  2745. "${c1} ███ ███ ███ %s"
  2746. "${c1} %s")
  2747. ;;
  2748. "CRUX")
  2749. if [[ "$no_color" != "1" ]]; then
  2750. c1=$(getColor 'light cyan')
  2751. c2=$(getColor 'yellow')
  2752. c3=$(getColor 'white')
  2753. fi
  2754. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; fi
  2755. startline="1"
  2756. logowidth="27"
  2757. fulloutput=(""
  2758. "${c1} odddd "
  2759. "${c1} oddxkkkxxdoo %s"
  2760. "${c1} ddcoddxxxdoool %s"
  2761. "${c1} xdclodod olol %s"
  2762. "${c1} xoc xdd olol %s"
  2763. "${c1} xdc ${c2}k00${c1}Okdlol %s"
  2764. "${c1} xxd${c2}kOKKKOkd${c1}ldd %s"
  2765. "${c1} xdco${c2}xOkdlo${c1}dldd %s"
  2766. "${c1} ddc:cl${c2}lll${c1}oooodo %s"
  2767. "${c1} odxxdd${c3}xkO000kx${c1}ooxdo %s"
  2768. "${c1} oxdd${c3}x0NMMMMMMWW0od${c1}kkxo %s"
  2769. "${c1} oooxd${c3}0WMMMMMMMMMW0o${c1}dxkx %s"
  2770. "${c1} docldkXW${c3}MMMMMMMWWN${c1}Odolco %s"
  2771. "${c1} xx${c2}dx${c1}kxxOKN${c3}WMMWN${c1}0xdoxo::c %s"
  2772. "${c2} xOkkO${c1}0oo${c3}odOW${c2}WW${c1}XkdodOxc:l %s"
  2773. "${c2} dkkkxkkk${c3}OKX${c2}NNNX0Oxx${c1}xc:cd %s"
  2774. "${c2} odxxdx${c3}xllod${c2}ddooxx${c1}dc:ldo %s"
  2775. "${c2} lodd${c1}dolccc${c2}ccox${c1}xoloo %s"
  2776. "${c1} %s")
  2777. ;;
  2778. "Chrome OS")
  2779. if [[ "$no_color" != "1" ]]; then
  2780. c1=$(getColor 'green') # Green
  2781. c2=$(getColor 'light red') # Light Red
  2782. c3=$(getColor 'yellow') # Bold Yellow
  2783. c4=$(getColor 'light blue') # Light Blue
  2784. c5=$(getColor 'white') # White
  2785. fi
  2786. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; c4="${my_lcolor}"; c5="${my_lcolor}"; fi
  2787. startline="0"
  2788. logowidth="38"
  2789. fulloutput=(
  2790. "${c2} .,:loool:,. %s"
  2791. "${c2} .,coooooooooooooc,. %s"
  2792. "${c2} .,lllllllllllllllllllll,. %s"
  2793. "${c2} ;ccccccccccccccccccccccccc; %s"
  2794. "${c1} '${c2}ccccccccccccccccccccccccccccc. %s"
  2795. "${c1} ,oo${c2}c::::::::okO${c5}000${c3}0OOkkkkkkkkkkk: %s"
  2796. "${c1} .ooool${c2};;;;:x${c5}K0${c4}kxxxxxk${c5}0X${c3}K0000000000. %s"
  2797. "${c1} :oooool${c2};,;O${c5}K${c4}ddddddddddd${c5}KX${c3}000000000d %s"
  2798. "${c1} lllllool${c2};l${c5}N${c4}dllllllllllld${c5}N${c3}K000000000 %s"
  2799. "${c1} lllllllll${c2}o${c5}M${c4}dccccccccccco${c5}W${c3}K000000000 %s"
  2800. "${c1} ;cllllllllX${c5}X${c4}c:::::::::c${c5}0X${c3}000000000d %s"
  2801. "${c1} .ccccllllllO${c5}Nk${c4}c;,,,;cx${c5}KK${c3}0000000000. %s"
  2802. "${c1} .cccccclllllxOO${c5}OOO${c1}Okx${c3}O0000000000; %s"
  2803. "${c1} .:ccccccccllllllllo${c3}O0000000OOO, %s"
  2804. "${c1} ,:ccccccccclllcd${c3}0000OOOOOOl. %s"
  2805. "${c1} '::ccccccccc${c3}dOOOOOOOkx:. %s"
  2806. "${c1} ..,::cccc${c3}xOOOkkko;. %s"
  2807. "${c1} ..,:${c3}dOkxl:. %s")
  2808. ;;
  2809. "DesaOS")
  2810. if [[ "$no_color" != "1" ]]; then
  2811. c1=$(getColor 'light green') #Hijau
  2812. fi
  2813. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  2814. startline="0"
  2815. logowidth="33"
  2816. fulloutput=(
  2817. "${c1} ████████████████████████████ %s"
  2818. "${c1} ████████████████████████████ %s"
  2819. "${c1} ████████████████████████████ %s"
  2820. "${c1} ████████████████████████████ %s"
  2821. "${c1} █████████████ ███████████ %s"
  2822. "${c1} █████████████ ███████████ %s"
  2823. "${c1} █████████████ ███████████ %s"
  2824. "${c1} █████████████ ███████████ %s"
  2825. "${c1} █████████████ ███████████ %s"
  2826. "${c1} █████████████ ███████████ %s"
  2827. "${c1} █████████████ ███████████ %s"
  2828. "${c1} █████████████ ███████████ %s"
  2829. "${c1} █████████████ ███████████ %s"
  2830. "${c1} ████████████████████████████ %s"
  2831. "${c1} ████████████████████████████ %s"
  2832. "${c1} ████████████████████████████ %s"
  2833. "${c1} ████████████████████████████ %s"
  2834. " %s")
  2835. ;;
  2836. "Gentoo")
  2837. if [[ "$no_color" != "1" ]]; then
  2838. c1=$(getColor 'white') # White
  2839. c2=$(getColor 'light purple') # Light Purple
  2840. fi
  2841. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  2842. startline="0"
  2843. logowidth="37"
  2844. fulloutput=(
  2845. "${c2} -/oyddmdhs+:. %s"
  2846. "${c2} -o${c1}dNMMMMMMMMNNmhy+${c2}-\` %s"
  2847. "${c2} -y${c1}NMMMMMMMMMMMNNNmmdhy${c2}+- %s"
  2848. "${c2} \`o${c1}mMMMMMMMMMMMMNmdmmmmddhhy${c2}/\` %s"
  2849. "${c2} om${c1}MMMMMMMMMMMN${c2}hhyyyo${c1}hmdddhhhd${c2}o\` %s"
  2850. "${c2}.y${c1}dMMMMMMMMMMd${c2}hs++so/s${c1}mdddhhhhdm${c2}+\` %s"
  2851. "${c2} oy${c1}hdmNMMMMMMMN${c2}dyooy${c1}dmddddhhhhyhN${c2}d. %s"
  2852. "${c2} :o${c1}yhhdNNMMMMMMMNNNmmdddhhhhhyym${c2}Mh %s"
  2853. "${c2} .:${c1}+sydNMMMMMNNNmmmdddhhhhhhmM${c2}my %s"
  2854. "${c2} /m${c1}MMMMMMNNNmmmdddhhhhhmMNh${c2}s: %s"
  2855. "${c2} \`o${c1}NMMMMMMMNNNmmmddddhhdmMNhs${c2}+\` %s"
  2856. "${c2} \`s${c1}NMMMMMMMMNNNmmmdddddmNMmhs${c2}/. %s"
  2857. "${c2} /N${c1}MMMMMMMMNNNNmmmdddmNMNdso${c2}:\` %s"
  2858. "${c2}+M${c1}MMMMMMNNNNNmmmmdmNMNdso${c2}/- %s"
  2859. "${c2}yM${c1}MNNNNNNNmmmmmNNMmhs+/${c2}-\` %s"
  2860. "${c2}/h${c1}MMNNNNNNNNMNdhs++/${c2}-\` %s"
  2861. "${c2}\`/${c1}ohdmmddhys+++/:${c2}.\` %s"
  2862. "${c2} \`-//////:--. %s")
  2863. ;;
  2864. "Funtoo")
  2865. if [[ "$no_color" != "1" ]]; then
  2866. c1=$(getColor 'white') # White
  2867. c2=$(getColor 'light purple') # Light Purple
  2868. fi
  2869. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  2870. startline="0"
  2871. logowidth="52"
  2872. fulloutput=(
  2873. "${c1} %s"
  2874. "${c1} %s"
  2875. "${c1} %s"
  2876. "${c1} %s"
  2877. "${c1} _______ ____ %s"
  2878. "${c1} /MMMMMMM/ /MMMM| _____ _____ %s"
  2879. "${c1} __/M${c2}.MMM.${c1}M/_____________|M${c2}.M${c1}MM|/MMMMM\/MMMMM\ %s"
  2880. "${c1}|MMMM${c2}MM'${c1}MMMMMMMMMMMMMMMMMMM${c2}MM${c1}MMMM${c2}.MMMM..MMMM.${c1}MM\ %s"
  2881. "${c1}|MM${c2}MMMMMMM${c1}/m${c2}MMMMMMMMMMMMMMMMMMMMMM${c1}MMMM${c2}MM${c1}MMMM${c2}MM${c1}MM| %s"
  2882. "${c1}|MMMM${c2}MM${c1}MMM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MMMMM${c2}\MMM${c1}MMM${c2}MM${c1}MMMM${c2}MM${c1}MMMM${c2}MM${c1}MM| %s"
  2883. "${c1} |MM${c2}MM${c1}MMM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MMM${c1}MMMM${c2}'MMMM''MMMM'${c1}MM/ %s"
  2884. "${c1} |MM${c2}MM${c1}MMM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MMM${c1}MMM\MMMMM/\MMMMM/ %s"
  2885. "${c1} |MM${c2}MM${c1}MMM${c2}MM${c1}MMMMMM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MMMMM'${c1}M| %s"
  2886. "${c1} |MM${c2}MM${c1}MMM${c2}MMMMMMMMMMMMMMMMM MM'${c1}M/ %s"
  2887. "${c1} |MMMMMMMMMMMMMMMMMMMMMMMMMMMM/ %s"
  2888. "${c1} %s"
  2889. "${c1} %s"
  2890. "${c1} %s")
  2891. ;;
  2892. "Kogaion")
  2893. if [[ "$no_color" != "1" ]]; then
  2894. c1=$(getColor 'light blue') # Light Blue
  2895. fi
  2896. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  2897. startline="0"
  2898. logowidth="41"
  2899. fulloutput=(
  2900. "${c1} ;; ,; %s"
  2901. "${c1} ;;; ,;; %s"
  2902. "${c1} ,;;;; ;;;; %s"
  2903. "${c1} ,;;;;;;;; ;;;; %s"
  2904. "${c1} ;;;;;;;;;;; ;;;;; %s"
  2905. "${c1} ,;;;;;;;;;;;; ';;;;;, %s"
  2906. "${c1} ;;;;;;;;;;;;;;, ';;;;;;; %s"
  2907. "${c1} ;;;;;;;;;;;;;;;;;, ';;;;; %s"
  2908. "${c1} ; ';;;;;;;;;;;;;;;;;;, ;;; %s"
  2909. "${c1} ;;;, ';;;;;;;;;;;;;;;;;;;,;; %s"
  2910. "${c1} ;;;;;, ';;;;;;;;;;;;;;;;;;, %s"
  2911. "${c1} ;;;;;;;;, ';;;;;;;;;;;;;;;;, %s"
  2912. "${c1} ;;;;;;;;;;;;, ';;;;;;;;;;;;;; %s"
  2913. "${c1} ';;;;;;;;;;;;; ';;;;;;;;;;;;; %s"
  2914. "${c1} ';;;;;;;;;;;;;, ';;;;;;;;;;; %s"
  2915. "${c1} ';;;;;;;;;;;;; ;;;;;;;;;; %s"
  2916. "${c1} ';;;;;;;;;;;; ;;;;;;;; %s"
  2917. "${c1} ';;;;;;;; ;;;;;; %s"
  2918. "${c1} ';;;;; ;;;; %s"
  2919. "${c1} ';;; ;; %s")
  2920. ;;
  2921. "Fedora")
  2922. if [[ "$no_color" != "1" ]]; then
  2923. c1=$(getColor 'white') # White
  2924. c2=$(getColor 'light blue') # Light Blue
  2925. fi
  2926. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  2927. startline="0"
  2928. logowidth="37"
  2929. fulloutput=(
  2930. "${c2} /:-------------:\ %s"
  2931. "${c2} :-------------------:: %s"
  2932. "${c2} :-----------${c1}/shhOHbmp${c2}---:\\ %s"
  2933. "${c2} /-----------${c1}omMMMNNNMMD ${c2}---: %s"
  2934. "${c2} :-----------${c1}sMMMMNMNMP${c2}. ---: %s"
  2935. "${c2} :-----------${c1}:MMMdP${c2}------- ---\ %s"
  2936. "${c2} ,------------${c1}:MMMd${c2}-------- ---: %s"
  2937. "${c2} :------------${c1}:MMMd${c2}------- .---: %s"
  2938. "${c2} :---- ${c1}oNMMMMMMMMMNho${c2} .----: %s"
  2939. "${c2} :-- .${c1}+shhhMMMmhhy++${c2} .------/ %s"
  2940. "${c2} :- -------${c1}:MMMd${c2}--------------: %s"
  2941. "${c2} :- --------${c1}/MMMd${c2}-------------; %s"
  2942. "${c2} :- ------${c1}/hMMMy${c2}------------: %s"
  2943. "${c2} :--${c1} :dMNdhhdNMMNo${c2}------------; %s"
  2944. "${c2} :---${c1}:sdNMMMMNds:${c2}------------: %s"
  2945. "${c2} :------${c1}:://:${c2}-------------:: %s"
  2946. "${c2} :---------------------:// %s"
  2947. "${c2} %s")
  2948. ;;
  2949. "Fux")
  2950. if [[ "$no_color" != "1" ]]; then
  2951. c1=$(getColor 'white') # White
  2952. c2=$(getColor 'light blue') # Light Blue
  2953. fi
  2954. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  2955. startline="0"
  2956. fulloutput=(
  2957. "${c2} --/+osssso+/-- %s"
  2958. "${c2} -/oshhhhhhhhhhhhso/- %s"
  2959. "${c2} :oyhhhhhso+//+oshhhhhso: %s"
  2960. "${c2} -+yhhhh+. ss+/ .+hhhhs+- %s"
  2961. "${c2} :/hhhh/ shhhy/ /hhhh/: %s"
  2962. "${c2} ./hhhh- .++:..dhhb..:++. -hhhh/. %s"
  2963. "${c2} +ohhh: -hoyhohhoohhohyoh- :hhho+ %s"
  2964. "${c2} /hhhh shhy-ohyyho-yhhs hhhh/ %s"
  2965. "${c2} /hhhh shy\+hhhh+/yhs hhhh/ %s"
  2966. "${c2} +ohhh: .:d. +:ys:+ .b:. :hhho+ %s"
  2967. "${c2} ./hhhh- do / oo \ ob -hhhh/. %s"
  2968. "${c2} :/hhhh/ - ss - /hhhh/: %s"
  2969. "${c2} -+shhhh+. // .+hhhhs+- %s"
  2970. "${c2} :oshhhhhso+//+oshhhhhso: %s"
  2971. "${c2} -/oshhhhhhhhhhhhso/- %s"
  2972. "${c2} --/+osssso+/-- %s")
  2973. ;;
  2974. "Chapeau")
  2975. if [[ "$no_color" != "1" ]]; then
  2976. c1=$(getColor 'white') # White
  2977. c2=$(getColor 'light green') # Light Green
  2978. fi
  2979. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  2980. startline="0"
  2981. logowidth="35"
  2982. fulloutput=(
  2983. "${c2} .-/-. %s"
  2984. "${c2} ////////. %s"
  2985. "${c2} ////////${c1}y+${c2}//. %s"
  2986. "${c2} ////////${c1}mMN${c2}/////. %s"
  2987. "${c2} ////////${c1}mMN+${c2}////////. %s"
  2988. "${c2} ////////////////////////. %s"
  2989. "${c2} /////////+${c1}shhddhyo${c2}+////////. %s"
  2990. "${c2} ////////${c1}ymMNmdhhdmNNdo${c2}///////. %s"
  2991. "${c2} ///////+${c1}mMms${c2}////////${c1}hNMh${c2}///////. %s"
  2992. "${c2} ///////${c1}NMm+${c2}//////////${c1}sMMh${c2}/////// %s"
  2993. "${c2} //////${c1}oMMNmmmmmmmmmmmmMMm${c2}/////// %s"
  2994. "${c2} //////${c1}+MMmssssssssssssss+${c2}/////// %s"
  2995. "${c2} \`//////${c1}yMMy${c2}//////////////////// %s"
  2996. "${c2} \`//////${c1}smMNhso++oydNm${c2}//////// %s"
  2997. "${c2} \`///////${c1}ohmNMMMNNdy+${c2}/////// %s"
  2998. "${c2} \`//////////${c1}++${c2}////////// %s"
  2999. "${c2} \`////////////////. %s"
  3000. "${c2} -////////- %s"
  3001. "${c2} %s")
  3002. ;;
  3003. "Korora")
  3004. if [[ "$no_color" != "1" ]]; then
  3005. c1=$(getColor 'white')
  3006. c2=$(getColor 'light blue')
  3007. fi
  3008. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  3009. startline="0"
  3010. logowidth="32"
  3011. fulloutput=(
  3012. "${c1} ____________ %s"
  3013. "${c1} _add55555555554${c2}: %s"
  3014. "${c1} _w?'${c2}\`\`\`\`\`\`\`\`\`\`'${c1})k${c2}: %s"
  3015. "${c1} _Z'${c2}\`${c1} ]k${c2}: %s"
  3016. "${c1} m(${c2}\`${c1} )k${c2}: %s"
  3017. "${c1} _.ss${c2}\`${c1}m[${c2}\`${c1}, ]e${c2}: %s"
  3018. "${c1} .uY\"^\`${c2}\`${c1}Xc${c2}\`${c1}?Ss. d(${c2}\` %s"
  3019. "${c1} jF'${c2}\`${c1} \`@. ${c2}\`${c1}Sc .jr${c2}\` %s"
  3020. "${c1} jr${c2}\`${c1} \`?n_ ${c2}\`${c1}$; _a2\"${c2}\` %s"
  3021. "${c1} .m${c2}:${c1} \`~M${c2}\`${c1}1k${c2}\`${c1}5?!\`${c2}\` %s"
  3022. "${c1} :#${c2}:${c1} ${c2}\`${c1})e${c2}\`\`\` %s"
  3023. "${c1} :m${c2}:${c1} ,#'${c2}\` %s"
  3024. "${c1} :#${c2}:${c1} .s2'${c2}\` %s"
  3025. "${c1} :m,________.aa7^${c2}\` %s"
  3026. "${c1} :#baaaaaaas!J'${c2}\` %s"
  3027. "${c2} \`\`\`\`\`\`\`\`\`\`\` %s")
  3028. ;;
  3029. "gNewSense")
  3030. if [[ "$no_color" != "1" ]]; then
  3031. c1=$(getColor 'light blue') # Light Blue
  3032. fi
  3033. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  3034. startline="0"
  3035. logowidth="52"
  3036. fulloutput=(
  3037. "${c1} ..,,,,.. %s"
  3038. "${c1} .oocchhhhhhhhhhccoo. %s"
  3039. "${c1} .ochhlllllllc hhhhhh ollllllhhco. %s"
  3040. "${c1} ochlllllllllll hhhllllllhhh lllllllllllhco %s"
  3041. "${c1} .cllllllllllllll hlllllo +hllh llllllllllllllc. %s"
  3042. "${c1} ollllllllllhco\'\' hlllllo +hllh \`\`ochllllllllllo %s"
  3043. "${c1} hllllllllc\' hllllllllllllh \`cllllllllh %s"
  3044. "${c1} ollllllh +llllllllllll+ hllllllo %s"
  3045. "${c1} \`cllllh. ohllllllho .hllllc\' %s"
  3046. "${c1} ochllc. ++++ .cllhco %s"
  3047. "${c1} \`+occooo+. .+ooocco+\' %s"
  3048. "${c1} \`+oo++++ ++++oo+\' %s"
  3049. "${c1} %s")
  3050. ;;
  3051. "BLAG")
  3052. if [[ "$no_color" != "1" ]]; then
  3053. c1=$(getColor 'light purple')
  3054. fi
  3055. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  3056. startline="0"
  3057. logowidth="36"
  3058. fulloutput=(
  3059. "${c1} d %s"
  3060. "${c1} ,MK: %s"
  3061. "${c1} xMMMX: %s"
  3062. "${c1} .NMMMMMX; %s"
  3063. "${c1} lMMMMMMMM0clodkO0KXWW: %s"
  3064. "${c1} KMMMMMMMMMMMMMMMMMMX' %s"
  3065. "${c1} .;d0NMMMMMMMMMMMMMMMMMMK. %s"
  3066. "${c1} .;dONMMMMMMMMMMMMMMMMMMMMMMx %s"
  3067. "${c1} 'dKMMMMMMMMMMMMMMMMMMMMMMMMl %s"
  3068. "${c1} .:xKWMMMMMMMMMMMMMMMMMMM0. %s"
  3069. "${c1} .:xNMMMMMMMMMMMMMMMMMK. %s"
  3070. "${c1} lMMMMMMMMMMMMMMMMMMK. %s"
  3071. "${c1} ,MMMMMMMMWkOXWMMMMMM0 %s"
  3072. "${c1} .NMMMMMNd. \`':ldko %s"
  3073. "${c1} OMMMK: %s"
  3074. "${c1} oWk, %s"
  3075. "${c1} ;: %s")
  3076. ;;
  3077. "FreeBSD")
  3078. if [[ "$no_color" != "1" ]]; then
  3079. c1=$(getColor 'white') # white
  3080. c2=$(getColor 'light red') # Light Red
  3081. fi
  3082. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  3083. startline="0"
  3084. logowidth="37"
  3085. fulloutput=(
  3086. "${c1} %s"
  3087. "${c1} \`\`\` ${c2}\` %s"
  3088. "${c1} \` \`.....---...${c2}....--.\`\`\` -/ %s"
  3089. "${c1} +o .--\` ${c2}/y:\` +. %s"
  3090. "${c1} yo\`:. ${c2}:o \`+- %s"
  3091. "${c1} y/ ${c2}-/\` -o/ %s"
  3092. "${c1} .- ${c2}::/sy+:. %s"
  3093. "${c1} / ${c2}\`-- / %s"
  3094. "${c1} \`: ${c2}:\` %s"
  3095. "${c1} \`: ${c2}:\` %s"
  3096. "${c1} / ${c2}/ %s"
  3097. "${c1} .- ${c2}-. %s"
  3098. "${c1} -- ${c2}-. %s"
  3099. "${c1} \`:\` ${c2}\`:\` %s"
  3100. "${c2} .-- \`--. %s"
  3101. "${c2} .---.....----. %s"
  3102. "${c2} %s"
  3103. "${c2} %s")
  3104. ;;
  3105. "FreeBSD - Old")
  3106. if [[ "$no_color" != "1" ]]; then
  3107. c1=$(getColor 'white') # white
  3108. c2=$(getColor 'light red') # Light Red
  3109. fi
  3110. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  3111. startline="0"
  3112. logowidth="34"
  3113. fulloutput=(
  3114. "${c2} , , %s"
  3115. "${c2} /( )\` %s"
  3116. "${c2} \ \___ / | %s"
  3117. "${c2} /- ${c1}_${c2} \`-/ ' %s"
  3118. "${c2} (${c1}/\/ \ ${c2}\ /\\ %s"
  3119. "${c1} / / |${c2} \` \\ %s"
  3120. "${c1} O O )${c2} / | %s"
  3121. "${c1} \`-^--'\`${c2}< ' %s"
  3122. "${c2} (_.) _ ) / %s"
  3123. "${c2} \`.___/\` / %s"
  3124. "${c2} \`-----' / %s"
  3125. "${c1} <----. ${c2}__/ __ \\ %s"
  3126. "${c1} <----|====${c2}O}}}${c1}==${c2}} \} \/${c1}==== %s"
  3127. "${c1} <----' ${c2}\`--' \`.__,' \\ %s"
  3128. "${c2} | | %s"
  3129. "${c2} \ / /\\ %s"
  3130. "${c2} ______( (_ / \______/ %s"
  3131. "${c2} ,' ,-----' | %s"
  3132. "${c2} \`--{__________) %s"
  3133. "${c2} %s")
  3134. ;;
  3135. "OpenBSD")
  3136. if [[ "$no_color" != "1" ]]; then
  3137. c1=$(getColor 'yellow') # Light Yellow
  3138. c2=$(getColor 'brown') # Bold Yellow
  3139. c3=$(getColor 'light cyan') # Light Cyan
  3140. c4=$(getColor 'light red') # Light Red
  3141. c5=$(getColor 'dark grey')
  3142. fi
  3143. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; c4="${my_lcolor}"; c5="${my_lcolor}"; fi
  3144. startline="3"
  3145. logowidth="44"
  3146. fulloutput=(
  3147. "${c3} _ "
  3148. "${c3} (_) "
  3149. "${c1} | . "
  3150. "${c1} . |L /| . ${c3} _ %s"
  3151. "${c1} _ . |\ _| \--+._/| . ${c3}(_) %s"
  3152. "${c1} / ||\| Y J ) / |/| ./ %s"
  3153. "${c1} J |)'( | \` F\`.'/ ${c3} _ %s"
  3154. "${c1} -<| F __ .-< ${c3}(_) %s"
  3155. "${c1} | / .-'${c3}. ${c1}\`. /${c3}-. ${c1}L___ %s"
  3156. "${c1} J \ < ${c3}\ ${c1} | | ${c5}O${c3}\\\\${c1}|.-' ${c3} _ %s"
  3157. "${c1} _J \ .- \\\\${c3}/ ${c5}O ${c3}| ${c1}| \ |${c1}F ${c3}(_) %s"
  3158. "${c1} '-F -<_. \ .-' \`-' L__ %s"
  3159. "${c1}__J _ _. >-' ${c2})${c4}._. ${c1}|-' %s"
  3160. "${c1} \`-|.' /_. ${c4}\_| ${c1} F %s"
  3161. "${c1} /.- . _.< %s"
  3162. "${c1} /' /.' .' \`\ %s"
  3163. "${c1} /L /' |/ _.-'-\ %s"
  3164. "${c1} /'J ___.---'\| %s"
  3165. "${c1} |\ .--' V | \`. \` %s"
  3166. "${c1} |/\`. \`-. \`._) %s"
  3167. "${c1} / .-.\ %s"
  3168. "${c1} \ ( \`\ %s"
  3169. "${c1} \`.\ %s")
  3170. ;;
  3171. "DragonFlyBSD")
  3172. if [[ "$no_color" != "1" ]]; then
  3173. c1=$(getColor 'light red') # Red
  3174. c2=$(getColor 'white') # White
  3175. c3=$(getColor 'yellow')
  3176. c4=$(getColor 'light red')
  3177. fi
  3178. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; c4="${my_lcolor}"; fi
  3179. startline="0"
  3180. logowidth="43"
  3181. fulloutput=(
  3182. "${c1} | %s"
  3183. "${c1} .-. %s"
  3184. "${c3} ()${c1}I${c3}() %s"
  3185. "${c1} \"==.__:-:__.==\" %s"
  3186. "${c1} \"==.__/~|~\__.==\" %s"
  3187. "${c1} \"==._( Y )_.==\" %s"
  3188. "${c2} .-'~~\"\"~=--...,__${c1}\/|\/${c2}__,...--=~\"\"~~'-. %s"
  3189. "${c2} ( ..=${c1}\\\\=${c1}/${c2}=.. )%s"
  3190. "${c2} \`'-. ,.-\"\`;${c1}/=\\\\${c2} ;\"-.,_ .-'\`%s"
  3191. "${c2} \`~\"-=-~\` .-~\` ${c1}|=|${c2} \`~-. \`~-=-\"~\` %s"
  3192. "${c2} .-~\` /${c1}|=|${c2}\ \`~-. %s"
  3193. "${c2} .~\` / ${c1}|=|${c2} \ \`~. %s"
  3194. "${c2} .-~\` .' ${c1}|=|${c2} \\\\\`. \`~-. %s"
  3195. "${c2} (\` _,.-=\"\` ${c1}|=|${c2} \`\"=-.,_ \`) %s"
  3196. "${c2} \`~\"~\"\` ${c1}|=|${c2} \`\"~\"~\` %s"
  3197. "${c1} /=\ %s"
  3198. "${c1} \=/ %s"
  3199. "${c1} ^ %s")
  3200. ;;
  3201. "NetBSD")
  3202. if [[ "$no_color" != "1" ]]; then
  3203. c1=$(getColor 'orange') # Orange
  3204. c2=$(getColor 'white') # White
  3205. fi
  3206. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  3207. startline="0"
  3208. logowidth="60"
  3209. fulloutput=(
  3210. "${c1} __,gnnnOCCCCCOObaau,_ %s"
  3211. "${c2} _._ ${c1}__,gnnCCCCCCCCOPF\"'' %s"
  3212. "${c2} (N\\\\\\\\${c1}XCbngg,._____.,gnnndCCCCCCCCCCCCF\"___,,,,___ %s"
  3213. "${c2} \\\\N\\\\\\\\${c1}XCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCOOOOPYvv. %s"
  3214. "${c2} \\\\N\\\\\\\\${c1}XCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCPF\"'' %s"
  3215. "${c2} \\\\N\\\\\\\\${c1}XCCCCCCCCCCCCCCCCCCCCCCCCCOF\"' %s"
  3216. "${c2} \\\\N\\\\\\\\${c1}XCCCCCCCCCCCCCCCCCCCCOF\"' %s"
  3217. "${c2} \\\\N\\\\\\\\${c1}XCCCCCCCCCCCCCCCPF\"' %s"
  3218. "${c2} \\\\N\\\\\\\\${c1}\"PCOCCCOCCFP\"\" %s"
  3219. "${c2} \\\\N\ %s"
  3220. "${c2} \\\\N\ %s"
  3221. "${c2} \\\\N\ %s"
  3222. "${c2} \\\\NN\ %s"
  3223. "${c2} \\\\NN\ %s"
  3224. "${c2} \\\\NNA. %s"
  3225. "${c2} \\\\NNA, %s"
  3226. "${c2} \\\\NNN, %s"
  3227. "${c2} \\\\NNN\ %s"
  3228. "${c2} \\\\NNN\ %s"
  3229. "${c2} \\\\NNNA %s")
  3230. ;;
  3231. "Mandriva"|"Mandrake")
  3232. if [[ "$no_color" != "1" ]]; then
  3233. c1=$(getColor 'light blue') # Light Blue
  3234. c2=$(getColor 'yellow') # Bold Yellow
  3235. fi
  3236. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  3237. startline="0"
  3238. logowidth="41"
  3239. fulloutput=(
  3240. "${c2} %s"
  3241. "${c2} \`\` %s"
  3242. "${c2} \`-. %s"
  3243. "${c1} \` ${c2}.--- %s"
  3244. "${c1} -/ ${c2}-::--\` %s"
  3245. "${c1} \`++ ${c2}\`----...\`\`\`-:::::. %s"
  3246. "${c1} \`os. ${c2}.::::::::::::::-\`\`\` \` \` %s"
  3247. "${c1} +s+ ${c2}.::::::::::::::::---...--\` %s"
  3248. "${c1} -ss: ${c2}\`-::::::::::::::::-.\`\`.\`\` %s"
  3249. "${c1} /ss- ${c2}.::::::::::::-.\`\` \` %s"
  3250. "${c1} +ss: ${c2}.::::::::::::- %s"
  3251. "${c1} /sso ${c2}.::::::-::::::- %s"
  3252. "${c1} .sss/ ${c2}-:::-.\` .::::: %s"
  3253. "${c1} /sss+. ${c2}..\`${c1} \`--\` ${c2}.::: %s"
  3254. "${c1} -ossso+/:://+/-\` ${c2}.:\` %s"
  3255. "${c1} -/+ooo+/-. ${c2}\` %s"
  3256. "${c1} %s"
  3257. "${c1} %s")
  3258. ;;
  3259. "openSUSE"|"SUSE Linux Enterprise")
  3260. if [[ "$no_color" != "1" ]]; then
  3261. c1=$(getColor 'light green') # Bold Green
  3262. c2=$c0$bold
  3263. fi
  3264. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  3265. startline="0"
  3266. logowidth="44"
  3267. fulloutput=(
  3268. "${c2} .;ldkO0000Okdl;. %s"
  3269. "${c2} .;d00xl:^''''''^:ok00d;. %s"
  3270. "${c2} .d00l' 'o00d. %s"
  3271. "${c2} .d0Kd'${c1} Okxol:;,. ${c2}:O0d. %s"
  3272. "${c2} .OK${c1}KKK0kOKKKKKKKKKKOxo:, ${c2}lKO. %s"
  3273. "${c2} ,0K${c1}KKKKKKKKKKKKKKK0P^${c2},,,${c1}^dx:${c2} ;00, %s"
  3274. "${c2} .OK${c1}KKKKKKKKKKKKKKKk'${c2}.oOPPb.${c1}'0k.${c2} cKO. %s"
  3275. "${c2} :KK${c1}KKKKKKKKKKKKKKK: ${c2}kKx..dd ${c1}lKd${c2} 'OK: %s"
  3276. "${c2} dKK${c1}KKKKKKKKKOx0KKKd ${c2}^0KKKO' ${c1}kKKc${c2} dKd %s"
  3277. "${c2} dKK${c1}KKKKKKKKKK;.;oOKx,..${c2}^${c1}..;kKKK0.${c2} dKd %s"
  3278. "${c2} :KK${c1}KKKKKKKKKK0o;...^cdxxOK0O/^^' ${c2}.0K: %s"
  3279. "${c2} kKK${c1}KKKKKKKKKKKKK0x;,,......,;od ${c2}lKk %s"
  3280. "${c2} '0K${c1}KKKKKKKKKKKKKKKKKKKK00KKOo^ ${c2}c00' %s"
  3281. "${c2} 'kK${c1}KKOxddxkOO00000Okxoc;'' ${c2}.dKk' %s"
  3282. "${c2} l0Ko. .c00l' %s"
  3283. "${c2} 'l0Kk:. .;xK0l' %s"
  3284. "${c2} 'lkK0xl:;,,,,;:ldO0kl' %s"
  3285. "${c2} '^:ldxkkkkxdl:^' %s")
  3286. ;;
  3287. "Slackware")
  3288. if [[ "$no_color" != "1" ]]; then
  3289. c1=$(getColor 'light blue') # Light Blue
  3290. c2=$(getColor 'white') # Bold White
  3291. fi
  3292. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  3293. startline="1"
  3294. logowidth="46"
  3295. fulloutput=(
  3296. "${c1} ::::::: "
  3297. "${c1} ::::::::::::::::::: %s"
  3298. "${c1} ::::::::::::::::::::::::: %s"
  3299. "${c1} ::::::::${c2}cllcccccllllllll${c1}:::::: %s"
  3300. "${c1} :::::::::${c2}lc dc${c1}::::::: %s"
  3301. "${c1} ::::::::${c2}cl clllccllll oc${c1}::::::::: %s"
  3302. "${c1} :::::::::${c2}o lc${c1}::::::::${c2}co oc${c1}:::::::::: %s"
  3303. "${c1} ::::::::::${c2}o cccclc${c1}:::::${c2}clcc${c1}:::::::::::: %s"
  3304. "${c1} :::::::::::${c2}lc cclccclc${c1}::::::::::::: %s"
  3305. "${c1} ::::::::::::::${c2}lcclcc lc${c1}:::::::::::: %s"
  3306. "${c1} ::::::::::${c2}cclcc${c1}:::::${c2}lccclc oc${c1}::::::::::: %s"
  3307. "${c1} ::::::::::${c2}o l${c1}::::::::::${c2}l lc${c1}::::::::::: %s"
  3308. "${c1} :::::${c2}cll${c1}:${c2}o clcllcccll o${c1}::::::::::: %s"
  3309. "${c1} :::::${c2}occ${c1}:${c2}o clc${c1}::::::::::: %s"
  3310. "${c1} ::::${c2}ocl${c1}:${c2}ccslclccclclccclclc${c1}::::::::::::: %s"
  3311. "${c1} :::${c2}oclcccccccccccccllllllllllllll${c1}::::: %s"
  3312. "${c1} ::${c2}lcc1lcccccccccccccccccccccccco${c1}:::: %s"
  3313. "${c1} :::::::::::::::::::::::::::::::: %s"
  3314. "${c1} :::::::::::::::::::::::::::: %s"
  3315. "${c1} :::::::::::::::::::::: %s"
  3316. "${c1} :::::::::::: %s")
  3317. ;;
  3318. "ROSA")
  3319. if [[ "$no_color" != "1" ]]; then
  3320. c1=$(getColor 'rosa_blue') # special blue color from ROSA
  3321. fi
  3322. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  3323. startline="3"
  3324. logowidth="41"
  3325. fulloutput=(
  3326. "${c1} ROSAROSAROSAROSAR "
  3327. "${c1} ROSA AROS "
  3328. "${c1} ROS SAROSAROSAROSAR AROS "
  3329. "${c1} RO ROSAROSAROSAROSAROSAR RO %s"
  3330. "${c1} ARO AROSAROSAROSARO AROS ROS %s"
  3331. "${c1} ARO ROSAROS OSAR ROSA ROS %s"
  3332. "${c1} RO AROSA ROSAROSAROSA ROSAR RO %s"
  3333. "${c1} RO ROSAR ROSAROSAROSAR R ROSARO RO %s"
  3334. "${c1} RO ROSA AROSAROSAROSA AR ROSARO AR %s"
  3335. "${c1} RO AROS ROSAROSAROSA ROS AROSARO AR %s"
  3336. "${c1} RO AROS ROSAROSARO ROSARO ROSARO AR %s"
  3337. "${c1} RO ROS AROSAROS ROSAROSA AROSAR AR %s"
  3338. "${c1} RO ROSA ROS ROSAROSAR ROSARO RO %s"
  3339. "${c1} RO ROS AROSAROSAROSA ROSARO AR %s"
  3340. "${c1} ARO ROSA ROSAROSAROS AROSAR ARO %s"
  3341. "${c1} ARO OROSA R ROSAROS ROS %s"
  3342. "${c1} RO AROSAROS AROSAROSAR RO %s"
  3343. "${c1} AROS AROSAROSAROSARO AROS %s"
  3344. "${c1} ROSA SARO %s"
  3345. "${c1} ROSAROSAROSAROSAR %s")
  3346. ;;
  3347. "Red Hat Enterprise Linux")
  3348. if [[ "$no_color" != "1" ]]; then
  3349. c1=$(getColor 'white') # White
  3350. c2=$(getColor 'light red') # Light Red
  3351. fi
  3352. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  3353. startline="0"
  3354. logowidth="42"
  3355. fulloutput=(
  3356. "${c2} %s"
  3357. "${c2} \`.-..........\` %s"
  3358. "${c2} \`////////::.\`-/. %s"
  3359. "${c2} -: ....-////////. %s"
  3360. "${c2} //:-::///////////\` %s"
  3361. "${c2} \`--::: \`-://////////////: %s"
  3362. "${c2} //////- \`\`.-:///////// .\` %s"
  3363. "${c2} \`://////:-.\` :///////::///:\` %s"
  3364. "${c2} .-/////////:---/////////////: %s"
  3365. "${c2} .-://////////////////////. %s"
  3366. "${c1} yMN+\`.-${c2}::///////////////-\` %s"
  3367. "${c1} .-\`:NMMNMs\` \`..-------..\` %s"
  3368. "${c1} MN+/mMMMMMhoooyysshsss %s"
  3369. "${c1} MMM MMMMMMMMMMMMMMyyddMMM+ %s"
  3370. "${c1} MMMM MMMMMMMMMMMMMNdyNMMh\` hyhMMM %s"
  3371. "${c1} MMMMMMMMMMMMMMMMyoNNNMMM+. MMMMMMMM %s"
  3372. "${c1} MMNMMMNNMMMMMNM+ mhsMNyyyyMNMMMMsMM %s"
  3373. "${c1} %s")
  3374. ;;
  3375. "Frugalware")
  3376. if [[ "$no_color" != "1" ]]; then
  3377. c1=$(getColor 'white') # White
  3378. c2=$(getColor 'light blue') # Light Blue
  3379. fi
  3380. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  3381. startline="3"
  3382. logowidth="50"
  3383. fulloutput=(
  3384. "${c2} \`++/::-.\` "
  3385. "${c2} /o+++++++++/::-.\` "
  3386. "${c2} \`o+++++++++++++++o++/::-.\` "
  3387. "${c2} /+++++++++++++++++++++++oo++/:-.\`\` %s"
  3388. "${c2} .o+ooooooooooooooooooosssssssso++oo++/:-\` %s"
  3389. "${c2} ++osoooooooooooosssssssssssssyyo+++++++o: %s"
  3390. "${c2} -o+ssoooooooooooosssssssssssssyyo+++++++s\` %s"
  3391. "${c2} o++ssoooooo++++++++++++++sssyyyyo++++++o: %s"
  3392. "${c2} :o++ssoooooo${c1}/-------------${c2}+syyyyyo+++++oo %s"
  3393. "${c2} \`o+++ssoooooo${c1}/-----${c2}+++++ooosyyyyyyo++++os: %s"
  3394. "${c2} /o+++ssoooooo${c1}/-----${c2}ooooooosyyyyyyyo+oooss %s"
  3395. "${c2} .o++++ssooooos${c1}/------------${c2}syyyyyyhsosssy- %s"
  3396. "${c2} ++++++ssooooss${c1}/-----${c2}+++++ooyyhhhhhdssssso %s"
  3397. "${c2} -s+++++syssssss${c1}/-----${c2}yyhhhhhhhhhhhddssssy. %s"
  3398. "${c2} sooooooyhyyyyyh${c1}/-----${c2}hhhhhhhhhhhddddyssy+ %s"
  3399. "${c2} :yooooooyhyyyhhhyyyyyyhhhhhhhhhhdddddyssy\` %s"
  3400. "${c2} yoooooooyhyyhhhhhhhhhhhhhhhhhhhddddddysy/ %s"
  3401. "${c2}-ysooooooydhhhhhhhhhhhddddddddddddddddssy %s"
  3402. "${c2} .-:/+osssyyyysyyyyyyyyyyyyyyyyyyyyyyssy: %s"
  3403. "${c2} \`\`.-/+oosysssssssssssssssssssssss %s"
  3404. "${c2} \`\`.:/+osyysssssssssssssh. %s"
  3405. "${c2} \`-:/+osyyssssyo %s"
  3406. "${c2} .-:+++\` %s")
  3407. ;;
  3408. "Peppermint")
  3409. if [[ "$no_color" != "1" ]]; then
  3410. c1=$(getColor 'white') # White
  3411. c2=$(getColor 'light red') # Light Red
  3412. fi
  3413. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  3414. startline="0"
  3415. logowidth="39"
  3416. fulloutput=(
  3417. "${c2} 8ZZZZZZ${c1}MMMMM %s"
  3418. "${c2} .ZZZZZZZZZ${c1}MMMMMMM. %s"
  3419. "${c1} MM${c2}ZZZZZZZZZ${c1}MMMMMMM${c2}ZZZZ %s"
  3420. "${c1} MMMMM${c2}ZZZZZZZZ${c1}MMMMM${c2}ZZZZZZZM %s"
  3421. "${c1} MMMMMMM${c2}ZZZZZZZ${c1}MMMM${c2}ZZZZZZZZZ. %s"
  3422. "${c1} MMMMMMMMM${c2}ZZZZZZ${c1}MMM${c2}ZZZZZZZZZZZI %s"
  3423. "${c1} MMMMMMMMMMM${c2}ZZZZZZ${c1}MM${c2}ZZZZZZZZZZ${c1}MMM %s"
  3424. "${c2} .ZZZ${c1}MMMMMMMMMM${c2}IZZ${c1}MM${c2}ZZZZZ${c1}MMMMMMMMM %s"
  3425. "${c2} ZZZZZZZ${c1}MMMMMMMM${c2}ZZ${c1}M${c2}ZZZZ${c1}MMMMMMMMMMM %s"
  3426. "${c2} ZZZZZZZZZZZZZZZZ${c1}M${c2}Z${c1}MMMMMMMMMMMMMMM %s"
  3427. "${c2} .ZZZZZZZZZZZZZ${c1}MMM${c2}Z${c1}M${c2}ZZZZZZZZZZ${c1}MMMM %s"
  3428. "${c2} .ZZZZZZZZZZZ${c1}MMM${c2}7ZZ${c1}MM${c2}ZZZZZZZZZZ7${c1}M %s"
  3429. "${c2} ZZZZZZZZZ${c1}MMMM${c2}ZZZZ${c1}MMMM${c2}ZZZZZZZ77 %s"
  3430. "${c1} MMMMMMMMMMMM${c2}ZZZZZ${c1}MMMM${c2}ZZZZZ77 %s"
  3431. "${c1} MMMMMMMMMM${c2}7ZZZZZZ${c1}MMMMM${c2}ZZ77 %s"
  3432. "${c1} .MMMMMMM${c2}ZZZZZZZZ${c1}MMMMM${c2}Z7Z %s"
  3433. "${c1} MMMMM${c2}ZZZZZZZZZ${c1}MMMMMMM %s"
  3434. "${c2} NZZZZZZZZZZZ${c1}MMMMM %s"
  3435. "${c2} ZZZZZZZZZ${c1}MM %s")
  3436. ;;
  3437. "Grombyang"|"GrombyangOS")
  3438. if [[ "$no_color" != "1" ]]; then
  3439. c1=$(getColor 'light blue')
  3440. c2=$(getColor 'light green')
  3441. c3=$(getColor 'light red')
  3442. fi
  3443. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  3444. startline="0"
  3445. fulloutput=(
  3446. "${c1} eeeeeeeeeeee %s"
  3447. "${c1} eeeeeeeeeeeeeeeee %s"
  3448. "${c1} eeeeeeeeeeeeeeeeeeeeeee %s"
  3449. "${c1} eeeee "${c2}".o+ "${c1}"eeee %s"
  3450. "${c1} eeee "${c2}"\`ooo/ "${c1}"eeee %s"
  3451. "${c1} eeee "${c2}"\`+oooo: "${c1}"eeee %s"
  3452. "${c1} eee "${c2}"\`+oooooo: "${c1}"eee %s"
  3453. "${c1} eee "${c2}"-+oooooo+: "${c1}"eee %s"
  3454. "${c1} ee "${c2}"\`/:oooooooo+: "${c1}"ee %s"
  3455. "${c1} ee "${c2}"\`/+ +++ +: "${c1}"ee %s"
  3456. "${c1} ee "${c2}"+o+\ "${c1}"ee %s"
  3457. "${c1} eee "${c2}"+o+\ "${c1}"eee %s"
  3458. "${c1} eee "${c2}"// \\ooo/ \\\ "${c1}"eee %s"
  3459. "${c1} eee "${c2}"//++++oooo++++\\\ "${c1}"eee %s"
  3460. "${c1} eeee "${c2}"::::++oooo+::::: "${c1}"eeee %s"
  3461. "${c1} eeeee "${c3}"Grombyang OS "${c1}" eeee %s"
  3462. "${c1} eeeeeeeeeeeeeeeeeeeeeee %s"
  3463. "${c1} eeeeeeeeeeeeeeeee %s"
  3464. " %s"
  3465. " %s")
  3466. ;;
  3467. "Solus")
  3468. if [[ "$no_color" != "1" ]]; then
  3469. c1=$(getColor 'white') # White
  3470. c2=$(getColor 'blue') # Blue
  3471. c3=$(getColor 'black') # Black
  3472. fi
  3473. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  3474. startline="0"
  3475. logowidth="36"
  3476. fulloutput=(
  3477. "${c3} ...... %s"
  3478. "${c3} .'${c1}D${c3}lddddddddddd'. %s"
  3479. "${c3} .'ddd${c1}XM${c3}xdddddddddddddd. %s"
  3480. "${c3} .dddddx${c1}MMM0${c3};dddddddddddddd. %s"
  3481. "${c3} 'dddddl${c1}MMMMMN${c3}cddddddddddddddd. %s"
  3482. "${c3} ddddddc${c1}WMMMMMMW${c3}lddddddddddddddd. %s"
  3483. "${c3} ddddddc${c1}WMMMMMMMMO${c3}ddoddddddddddddd. %s"
  3484. "${c3}.ddddd:${c1}NMMMMMMMMMK${c3}dd${c1}NX${c3}od;c${c1}lxl${c3}dddddd %s"
  3485. "${c3}dddddc${c1}WMMMMMMMMMMNN${c3}dd${c1}MMXl${c3};d${c1}00xl;${c3}ddd.%s"
  3486. "${c3}ddddl${c1}WMMMMMMMMMMMMM${c3}d;${c1}MMMM0${c3}:dl${c1}XMMXk:${c3}'%s"
  3487. "${c3}dddo${c1}WMMMMMMMMMMMMMM${c3}dd${c1}MMMMMW${c3}od${c3};${c1}XMMMOd%s"
  3488. "${c3}.dd${c1}MMMMMMMMMMMMMMMM${c3}d:${c1}MMMMMMM${c3}kd${c1}lMKll %s"
  3489. "${c3}.;dk0${c1}KXNWWMMMMMMMMM${c3}dx${c1}MMMMMMM${c3}Xl;lxK; %s"
  3490. "${c3} 'dddddddd;:cclodcddxddolloxO0O${c1}d' %s"
  3491. "${c1} ckkxxxddddddddxxkOOO000Okdool. %s"
  3492. "${c2} .lddddxxxxxxddddooooooooood %s"
  3493. "${c2} .:oooooooooooooooooooc' %s"
  3494. "${c2} .,:looooooooooc;. %s")
  3495. ;;
  3496. "Mageia")
  3497. if [[ "$no_color" != "1" ]]; then
  3498. c1=$(getColor 'white') # White
  3499. c2=$(getColor 'light cyan') # Light Cyan
  3500. fi
  3501. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  3502. startline="0"
  3503. logowidth="33"
  3504. fulloutput=(
  3505. "${c2} .°°. %s"
  3506. "${c2} °° .°°. %s"
  3507. "${c2} .°°°. °° %s"
  3508. "${c2} . . %s"
  3509. "${c2} °°° .°°°. %s"
  3510. "${c2} .°°°. '___' %s"
  3511. "${c1} .${c2}'___' ${c1} . %s"
  3512. "${c1} :dkxc;'. ..,cxkd; %s"
  3513. "${c1} .dkk. kkkkkkkkkk .kkd. %s"
  3514. "${c1} .dkk. ';cloolc;. .kkd %s"
  3515. "${c1} ckk. .kk; %s"
  3516. "${c1} xO: cOd %s"
  3517. "${c1} xO: lOd %s"
  3518. "${c1} lOO. .OO: %s"
  3519. "${c1} .k00. .00x %s"
  3520. "${c1} .k00; ;00O. %s"
  3521. "${c1} .lO0Kc;,,,,,,;c0KOc. %s"
  3522. "${c1} ;d00KKKKKK00d; %s"
  3523. "${c1} .,KKKK,. %s")
  3524. ;;
  3525. "Parabola GNU/Linux-libre")
  3526. if [[ "$no_color" != "1" ]]; then
  3527. c1=$(getColor 'light purple') # Light Purple
  3528. c2=$(getColor 'white') # White
  3529. fi
  3530. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  3531. startline="0"
  3532. logowidth="33"
  3533. fulloutput=(
  3534. "${c1} %s"
  3535. "${c1} eeeeeeeee %s"
  3536. "${c1} eeeeeeeeeeeeeee %s"
  3537. "${c1} eeeeee${c2}//////////${c1}eeeee %s"
  3538. "${c1} eeeee${c2}///////////////${c1}eeeee %s"
  3539. "${c1} eeeee${c2}/// ////${c1}eeee %s"
  3540. "${c1} eeee${c2}// ///${c1}eeeee %s"
  3541. "${c1} eee ${c2}///${c1}eeeee %s"
  3542. "${c1}ee ${c2}//${c1}eeeeee %s"
  3543. "${c1}e ${c2}/${c1}eeeeeee %s"
  3544. "${c1} eeeeeee %s"
  3545. "${c1} eeeeee %s"
  3546. "${c1} eeeeee %s"
  3547. "${c1} eeeee %s"
  3548. "${c1} eeee %s"
  3549. "${c1} eee %s"
  3550. "${c1} ee %s"
  3551. "${c1} e %s")
  3552. ;;
  3553. "Viperr")
  3554. if [[ "$no_color" != "1" ]]; then
  3555. c1=$(getColor 'white') # White
  3556. c2=$(getColor 'dark grey') # Dark Gray
  3557. fi
  3558. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  3559. startline="0"
  3560. logowidth="31"
  3561. fulloutput=(
  3562. "${c1} wwzapd dlzazw %s"
  3563. "${c1} an${c2}#${c1}zncmqzepweeirzpas${c2}#${c1}xz %s"
  3564. "${c1} apez${c2}##${c1}qzdkawweemvmzdm${c2}##${c1}dcmv %s"
  3565. "${c1}zwepd${c2}####${c1}qzdweewksza${c2}####${c1}ezqpa %s"
  3566. "${c1}ezqpdkapeifjeeazezqpdkazdkwqz %s"
  3567. "${c1} ezqpdksz${c2}##${c1}wepuizp${c2}##${c1}wzeiapdk %s"
  3568. "${c1} zqpakdpa${c2}#${c1}azwewep${c2}#${c1}zqpdkqze %s"
  3569. "${c1} apqxalqpewenwazqmzazq %s"
  3570. "${c1} mn${c2}##${c1}==${c2}#######${c1}==${c2}##${c1}qp %s"
  3571. "${c1} qw${c2}##${c1}=${c2}#######${c1}=${c2}##${c1}zl %s"
  3572. "${c1} z0${c2}######${c1}=${c2}######${c1}0a %s"
  3573. "${c1} qp${c2}#####${c1}=${c2}#####${c1}mq %s"
  3574. "${c1} az${c2}####${c1}===${c2}####${c1}mn %s"
  3575. "${c1} ap${c2}#########${c1}qz %s"
  3576. "${c1} 9qlzskwdewz %s"
  3577. "${c1} zqwpakaiw %s"
  3578. "${c1} qoqpe %s"
  3579. "${c1} %s")
  3580. ;;
  3581. "LinuxDeepin")
  3582. if [[ "$no_color" != "1" ]]; then
  3583. c1=$(getColor 'light green') # Bold Green
  3584. fi
  3585. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  3586. startline="0"
  3587. logowidth="33"
  3588. fulloutput=(
  3589. "${c1} eeeeeeeeeeeeeeeeeeeeeeeeeeee %s"
  3590. "${c1} eee eeeeeee eeeeeeee %s"
  3591. "${c1}ee eeeeeeeee eeeeeeeee ee %s"
  3592. "${c1}e eeeeeeeee eeeeeeeee e %s"
  3593. "${c1}e eeeeeee eeeeeeeeee e %s"
  3594. "${c1}e eeeeee eeeee e %s"
  3595. "${c1}e eeeee eee eee e %s"
  3596. "${c1}e eeeee ee eeeeee e %s"
  3597. "${c1}e eeeee eee eee e %s"
  3598. "${c1}e eeeeeeeeee eeee e %s"
  3599. "${c1}e eeeee eeee e %s"
  3600. "${c1}e eeeeee e %s"
  3601. "${c1}e eeeeeee e %s"
  3602. "${c1}e eee eeeeeeee e %s"
  3603. "${c1}eeeeeeeeeeeeeeee e %s"
  3604. "${c1}eeeeeeeeeeeee ee %s"
  3605. "${c1} eeeeeeeeeee eee %s"
  3606. "${c1} eeeeeeeeeeeeeeeeeeeeeeeeeeee %s"
  3607. "${c1} %s")
  3608. ;;
  3609. "Deepin")
  3610. if [[ "$no_color" != "1" ]]; then
  3611. c1=$(getColor 'cyan') # Bold Green
  3612. fi
  3613. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  3614. startline="0"
  3615. logowidth="41"
  3616. fulloutput=(
  3617. "${c1} ............ %s"
  3618. "${c1} .';;;;;. .,;,. %s"
  3619. "${c1} .,;;;;;;;. ';;;;;;;. %s"
  3620. "${c1} .;::::::::' .,::;;,''''',. %s"
  3621. "${c1} ,'.:::::::: .;;'. '; %s"
  3622. "${c1} ;' 'cccccc, ,' :: '.. .: %s"
  3623. "${c1} ,, :ccccc. ;: .c, '' :. ,; %s"
  3624. "${c1} .l. cllll' ., .lc :; .l' l. %s"
  3625. "${c1} .c :lllc ;cl: .l' .ll. :' %s"
  3626. "${c1} .l 'looc. . ,o: 'oo' c, %s"
  3627. "${c1} .o. .:ool::coc' .ooo' o. %s"
  3628. "${c1} :: ..... .;dddo ;c %s"
  3629. "${c1} l:... .';lddddo. ,o %s"
  3630. "${c1} lxxxxxdoolllodxxxxxxxxxc :l %s"
  3631. "${c1} ,dxxxxxxxxxxxxxxxxxxl. 'o, %s"
  3632. "${c1} ,dkkkkkkkkkkkkko;. .;o; %s"
  3633. "${c1} .;okkkkkdl;. .,cl:. %s"
  3634. "${c1} .,:cccccccc:,. %s")
  3635. ;;
  3636. "Chakra")
  3637. if [[ "$no_color" != "1" ]]; then
  3638. c1=$(getColor 'light blue') # Light Blue
  3639. fi
  3640. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  3641. startline="0"
  3642. logowidth="38"
  3643. fulloutput=(
  3644. "${c1} _ _ _ \"kkkkkkkk. %s"
  3645. "${c1} ,kkkkkkkk., \'kkkkkkkkk, %s"
  3646. "${c1} ,kkkkkkkkkkkk., \'kkkkkkkkk. %s"
  3647. "${c1} ,kkkkkkkkkkkkkkkk,\'kkkkkkkk, %s"
  3648. "${c1} ,kkkkkkkkkkkkkkkkkkk\'kkkkkkk. %s"
  3649. "${c1} \"\'\'\"\'\'\',;::,,\"\'\'kkk\'\'kkkkk; __ %s"
  3650. "${c1} ,kkkkkkkkkk, \"k\'\'kkkkk\' ,kkkk %s"
  3651. "${c1} ,kkkkkkk\' ., \' .: \'kkkk\',kkkkkk %s"
  3652. "${c1} ,kkkkkkkk\'.k\' , ,kkkk;kkkkkkkkk %s"
  3653. "${c1} ,kkkkkkkk\';kk \'k \"\'k\',kkkkkkkkkkkk %s"
  3654. "${c1} .kkkkkkkkk.kkkk.\'kkkkkkkkkkkkkkkkkk\' %s"
  3655. "${c1} ;kkkkkkkk\'\'kkkkkk;\'kkkkkkkkkkkkk\'\' %s"
  3656. "${c1} \'kkkkkkk; \'kkkkkkkk.,\"\"\'\'\"\'\'\"\" %s"
  3657. "${c1} \'\'kkkk; \'kkkkkkkkkk., %s"
  3658. "${c1} \';\' \'kkkkkkkkkkkk., %s"
  3659. "${c1} ';kkkkkkkkkk\' %s"
  3660. "${c1} ';kkkkkk\' %s"
  3661. "${c1} \"\'\'\" %s")
  3662. ;;
  3663. "Fuduntu")
  3664. if [[ "$no_color" != "1" ]]; then
  3665. c1=$(getColor 'dark grey') # Dark Gray
  3666. c2=$(getColor 'yellow') # Bold Yellow
  3667. c3=$(getColor 'light red') # Light Red
  3668. c4=$(getColor 'white') # White
  3669. fi
  3670. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; c4="${my_lcolor}"; fi
  3671. startline="1"
  3672. logowidth="49"
  3673. fulloutput=(
  3674. "${c1} \`dwoapfjsod\`${c2} \`dwoapfjsod\` "
  3675. "${c1} \`xdwdsfasdfjaapz\`${c2} \`dwdsfasdfjaapzx\` %s"
  3676. "${c1} \`wadladfladlafsozmm\`${c2} \`wadladfladlafsozmm\` %s"
  3677. "${c1} \`aodowpwafjwodisosoaas\`${c2} \`odowpwafjwodisosoaaso\` %s"
  3678. "${c1} \`adowofaowiefawodpmmxs\`${c2} \`dowofaowiefawodpmmxso\` %s"
  3679. "${c1} \`asdjafoweiafdoafojffw\`${c2} \`sdjafoweiafdoafojffwq\` %s"
  3680. "${c1} \`dasdfjalsdfjasdlfjdd\`${c2} \`asdfjalsdfjasdlfjdda\` %s"
  3681. "${c1} \`dddwdsfasdfjaapzxaw\`${c2} \`ddwdsfasdfjaapzxawo\` %s"
  3682. "${c1} \`dddwoapfjsowzocmw\`${c2} \`ddwoapfjsowzocmwp\` %s"
  3683. "${c1} \`ddasowjfowiejao\`${c2} \`dasowjfowiejaow\` %s"
  3684. "${c1} %s"
  3685. "${c3} \`ddasowjfowiejao\`${c4} \`dasowjfowiejaow\` %s"
  3686. "${c3} \`dddwoapfjsowzocmw\`${c4} \`ddwoapfjsowzocmwp\` %s"
  3687. "${c3} \`dddwdsfasdfjaapzxaw\`${c4} \`ddwdsfasdfjaapzxawo\` %s"
  3688. "${c3} \`dasdfjalsdfjasdlfjdd\`${c4} \`asdfjalsdfjasdlfjdda\` %s"
  3689. "${c3} \`asdjafoweiafdoafojffw\`${c4} \`sdjafoweiafdoafojffwq\` %s"
  3690. "${c3} \`adowofaowiefawodpmmxs\`${c4} \`dowofaowiefawodpmmxso\` %s"
  3691. "${c3} \`aodowpwafjwodisosoaas\`${c4} \`odowpwafjwodisosoaaso\` %s"
  3692. "${c3} \`wadladfladlafsozmm\`${c4} \`wadladfladlafsozmm\` %s"
  3693. "${c3} \`dwdsfasdfjaapzx\`${c4} \`dwdsfasdfjaapzx\` %s"
  3694. "${c3} \`woapfjsod\`${c4} \`woapfjsod\` %s")
  3695. ;;
  3696. "Mac OS X")
  3697. if [[ "$no_color" != "1" ]]; then
  3698. c1=$(getColor 'green') # Green
  3699. c2=$(getColor 'brown') # Yellow
  3700. c3=$(getColor 'light red') # Orange
  3701. c4=$(getColor 'red') # Red
  3702. c5=$(getColor 'purple') # Purple
  3703. c6=$(getColor 'blue') # Blue
  3704. fi
  3705. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; c4="${my_lcolor}"; c5="${my_lcolor}"; c6="${my_lcolor}"; fi
  3706. startline="1"
  3707. logowidth="31"
  3708. fulloutput=(
  3709. "${c1} "
  3710. "${c1} -/+:. %s"
  3711. "${c1} :++++. %s"
  3712. "${c1} /+++/. %s"
  3713. "${c1} .:-::- .+/:-\`\`.::- %s"
  3714. "${c1} .:/++++++/::::/++++++/:\` %s"
  3715. "${c2} .:///////////////////////:\` %s"
  3716. "${c2} ////////////////////////\` %s"
  3717. "${c3} -+++++++++++++++++++++++\` %s"
  3718. "${c3} /++++++++++++++++++++++/ %s"
  3719. "${c4} /sssssssssssssssssssssss. %s"
  3720. "${c4} :ssssssssssssssssssssssss- %s"
  3721. "${c5} osssssssssssssssssssssssso/\` %s"
  3722. "${c5} \`syyyyyyyyyyyyyyyyyyyyyyyy+\` %s"
  3723. "${c6} \`ossssssssssssssssssssss/ %s"
  3724. "${c6} :ooooooooooooooooooo+. %s"
  3725. "${c6} \`:+oo+/:-..-:/+o+/- %s"
  3726. "${c6} %s")
  3727. ;;
  3728. "Mac OS X - Classic")
  3729. if [[ "$no_color" != "1" ]]; then
  3730. c1=$(getColor 'blue') # Blue
  3731. c2=$(getColor 'light blue') # Light blue
  3732. c3=$(getColor 'light grey') # Gray
  3733. c4=$(getColor 'dark grey') # Dark Ggray
  3734. fi
  3735. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; c4="${my_lcolor}"; fi
  3736. startline="1"
  3737. logowidth="39"
  3738. fulloutput=(
  3739. "${c3} "
  3740. "${c3} .. %s"
  3741. "${c3} dWc %s"
  3742. "${c3} ,X0' %s"
  3743. "${c1} ;;;;;;;;;;;;;;;;;;${c3}0Mk${c2}::::::::::::::: %s"
  3744. "${c1} ;;;;;;;;;;;;;;;;;${c3}KWo${c2}:::::::::::::::: %s"
  3745. "${c1} ;;;;;;;;;${c4}NN${c1};;;;;${c3}KWo${c2}:::::${c3}NN${c2}:::::::::: %s"
  3746. "${c1} ;;;;;;;;;${c4}NN${c1};;;;${c3}0Md${c2}::::::${c3}NN${c2}:::::::::: %s"
  3747. "${c1} ;;;;;;;;;${c4}NN${c1};;;${c3}xW0${c2}:::::::${c3}NN${c2}:::::::::: %s"
  3748. "${c1} ;;;;;;;;;;;;;;${c3}KMc${c2}::::::::::::::::::: %s"
  3749. "${c1} ;;;;;;;;;;;;;${c3}lWX${c2}:::::::::::::::::::: %s"
  3750. "${c1} ;;;;;;;;;;;;;${c3}xWWXXXXNN7${c2}::::::::::::: %s"
  3751. "${c1} ;;;;;;;;;;;;;;;;;;;;${c3}WK${c2}:::::::::::::: %s"
  3752. "${c1} ;;;;;${c4}TKX0ko.${c1};;;;;;;${c3}kMx${c2}:::${c3}.cOKNF${c2}::::: %s"
  3753. "${c1} ;;;;;;;;${c4}\`kO0KKKKKKK${c3}NMNXK0OP*${c2}:::::::: %s"
  3754. "${c1} ;;;;;;;;;;;;;;;;;;;${c3}kMx${c2}:::::::::::::: %s"
  3755. "${c1} ;;;;;;;;;;;;;;;;;;;;${c3}WX${c2}:::::::::::::: %s"
  3756. "${c3} lMc %s"
  3757. "${c3} kN. %s"
  3758. "${c3} o' %s"
  3759. "${c3} %s")
  3760. ;;
  3761. "Windows"|"Cygwin"|"Msys")
  3762. if [[ "$no_color" != "1" ]]; then
  3763. c1=$(getColor 'light red') # Red
  3764. c2=$(getColor 'light green') # Green
  3765. c3=$(getColor 'light blue') # Blue
  3766. c4=$(getColor 'yellow') # Yellow
  3767. fi
  3768. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; c4="${my_lcolor}"; fi
  3769. startline="0"
  3770. logowidth="37"
  3771. fulloutput=(
  3772. "${c1} ,.=:!!t3Z3z., %s"
  3773. "${c1} :tt:::tt333EE3 %s"
  3774. "${c1} Et:::ztt33EEEL${c2} @Ee., .., %s"
  3775. "${c1} ;tt:::tt333EE7${c2} ;EEEEEEttttt33# %s"
  3776. "${c1} :Et:::zt333EEQ.${c2} \$EEEEEttttt33QL %s"
  3777. "${c1} it::::tt333EEF${c2} @EEEEEEttttt33F %s"
  3778. "${c1} ;3=*^\`\`\`\"*4EEV${c2} :EEEEEEttttt33@. %s"
  3779. "${c3} ,.=::::!t=., ${c1}\`${c2} @EEEEEEtttz33QF %s"
  3780. "${c3} ;::::::::zt33)${c2} \"4EEEtttji3P* %s"
  3781. "${c3} :t::::::::tt33.${c4}:Z3z..${c2} \`\`${c4} ,..g. %s"
  3782. "${c3} i::::::::zt33F${c4} AEEEtttt::::ztF %s"
  3783. "${c3} ;:::::::::t33V${c4} ;EEEttttt::::t3 %s"
  3784. "${c3} E::::::::zt33L${c4} @EEEtttt::::z3F %s"
  3785. "${c3}{3=*^\`\`\`\"*4E3)${c4} ;EEEtttt:::::tZ\` %s"
  3786. "${c3} \`${c4} :EEEEtttt::::z7 %s"
  3787. "${c4} \"VEzjt:;;z>*\` %s")
  3788. ;;
  3789. "Windows - Modern")
  3790. if [[ "$no_color" != "1" ]]; then
  3791. c1=$(getColor 'light blue') # Blue
  3792. fi
  3793. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  3794. startline="0"
  3795. logowidth="38"
  3796. fulloutput=(
  3797. "${c1} .., %s"
  3798. "${c1} ....,,:;+ccllll %s"
  3799. "${c1} ...,,+:; cllllllllllllllllll %s"
  3800. "${c1} ,cclllllllllll lllllllllllllllllll %s"
  3801. "${c1} llllllllllllll lllllllllllllllllll %s"
  3802. "${c1} llllllllllllll lllllllllllllllllll %s"
  3803. "${c1} llllllllllllll lllllllllllllllllll %s"
  3804. "${c1} llllllllllllll lllllllllllllllllll %s"
  3805. "${c1} llllllllllllll lllllllllllllllllll %s"
  3806. "${c1} %s"
  3807. "${c1} llllllllllllll lllllllllllllllllll %s"
  3808. "${c1} llllllllllllll lllllllllllllllllll %s"
  3809. "${c1} llllllllllllll lllllllllllllllllll %s"
  3810. "${c1} llllllllllllll lllllllllllllllllll %s"
  3811. "${c1} llllllllllllll lllllllllllllllllll %s"
  3812. "${c1} \`'ccllllllllll lllllllllllllllllll %s"
  3813. "${c1} \`'\"\"*:: :ccllllllllllllllll %s"
  3814. "${c1} \`\`\`\`''\"*::cll %s"
  3815. "${c1} \`\` %s")
  3816. ;;
  3817. "Haiku")
  3818. if [[ "$no_color" != "1" ]]; then
  3819. if [ "$haikualpharelease" == "yes" ]; then
  3820. c1=$(getColor 'black_haiku') # Black
  3821. c2=$(getColor 'light grey') # Light Gray
  3822. else
  3823. c1=$(getColor 'black') # Black
  3824. c2=${c1}
  3825. fi
  3826. c3=$(getColor 'green') # Green
  3827. fi
  3828. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; fi
  3829. startline="0"
  3830. logowidth="36"
  3831. fulloutput=(
  3832. "${c1} :dc' %s"
  3833. "${c1} 'l:;'${c2},${c1}'ck. .;dc:. %s"
  3834. "${c1} co ${c2}..${c1}k. .;; ':o. %s"
  3835. "${c1} co ${c2}..${c1}k. ol ${c2}.${c1}0. %s"
  3836. "${c1} co ${c2}..${c1}k. oc ${c2}..${c1}0. %s"
  3837. "${c1} co ${c2}..${c1}k. oc ${c2}..${c1}0. %s"
  3838. "${c1}.Ol,. co ${c2}...''${c1}Oc;kkodxOdddOoc,. %s"
  3839. "${c1} ';lxxlxOdxkxk0kd${c3}oooll${c1}dl${c3}ccc:${c1}clxd; %s"
  3840. "${c1} ..${c3}oOolllllccccccc:::::${c1}od; %s"
  3841. "${c1} cx:ooc${c3}:::::::;${c1}cooolcX. %s"
  3842. "${c1} cd${c2}.${c1}''cloxdoollc' ${c2}...${c1}0. %s"
  3843. "${c1} cd${c2}......${c1}k;${c2}.${c1}xl${c2}.... .${c1}0. %s"
  3844. "${c1} .::c${c2};..${c1}cx;${c2}.${c1}xo${c2}..... .${c1}0. %s"
  3845. "${c1} '::c'${c2}...${c1}do${c2}..... .${c1}K, %s"
  3846. "${c1} cd,.${c2}....:${c1}O,${c2}...... %s"
  3847. "${c1} ':clod:'${c2}...... %s"
  3848. "${c1} ${c2}. %s")
  3849. ;;
  3850. "Trisquel")
  3851. if [[ "$no_color" != "1" ]]; then
  3852. c1=$(getColor 'light blue') # Light Blue
  3853. c2=$(getColor 'light cyan') # Blue
  3854. fi
  3855. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  3856. startline="0"
  3857. logowidth="38"
  3858. fulloutput=(
  3859. "${c1} ▄▄▄▄▄▄ %s"
  3860. "${c1} ▄█████████▄ %s"
  3861. "${c1} ▄▄▄▄▄▄ ████▀ ▀████ %s"
  3862. "${c1} ▄██████████▄ ████▀ ▄▄ ▀███ %s"
  3863. "${c1} ▄███▀▀ ▀▀████ ███▄ ▄█ ███ %s"
  3864. "${c1} ▄███ ▄▄▄ ████▄ ▀██████ ▄███ %s"
  3865. "${c1} ███ █▀▀██▄ █████▄ ▀▀ ▄████ %s"
  3866. "${c1} ▀███ ███ ███████▄▄ ▄▄██████ %s"
  3867. "${c1} ▀███▄ ▄███ █████████████${c2}████▀ %s"
  3868. "${c1} ▀█████████ ███████${c2}███▀▀▀ %s"
  3869. "${c1} ▀▀███▀▀ ██${c2}████▀▀ %s"
  3870. "${c2} ██████▀ ▄▄▄▄ %s"
  3871. "${c2} █████▀ ████████ %s"
  3872. "${c2} █████ ███▀ ▀███ %s"
  3873. "${c2} ████▄ ██▄▄▄ ███ %s"
  3874. "${c2} █████▄ ▀▀ ▄██ %s"
  3875. "${c2} ██████▄▄▄████ %s"
  3876. "${c2} █████▀▀ %s")
  3877. ;;
  3878. "Manjaro")
  3879. if [[ "$no_color" != "1" ]]; then
  3880. c1=$(getColor 'light green') # Green
  3881. fi
  3882. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  3883. startline="0"
  3884. logowidth="33"
  3885. fulloutput=(
  3886. "${c1} ██████████████████ ████████ %s"
  3887. "${c1} ██████████████████ ████████ %s"
  3888. "${c1} ██████████████████ ████████ %s"
  3889. "${c1} ██████████████████ ████████ %s"
  3890. "${c1} ████████ ████████ %s"
  3891. "${c1} ████████ ████████ ████████ %s"
  3892. "${c1} ████████ ████████ ████████ %s"
  3893. "${c1} ████████ ████████ ████████ %s"
  3894. "${c1} ████████ ████████ ████████ %s"
  3895. "${c1} ████████ ████████ ████████ %s"
  3896. "${c1} ████████ ████████ ████████ %s"
  3897. "${c1} ████████ ████████ ████████ %s"
  3898. "${c1} ████████ ████████ ████████ %s"
  3899. "${c1} ████████ ████████ ████████ %s"
  3900. " %s")
  3901. ;;
  3902. "Netrunner")
  3903. if [[ "$no_color" != "1" ]]; then
  3904. c1=$(getColor 'light blue') # Blue
  3905. fi
  3906. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  3907. startline="0"
  3908. logowidth="43"
  3909. fulloutput=(
  3910. "${c1} nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn %s"
  3911. "${c1} nnnnnnnnnnnnnn nnnnnnnnnnnnnn %s"
  3912. "${c1} nnnnnnnnnn nnnnnnnnnn nnnnnnnnnn %s"
  3913. "${c1} nnnnnnn nnnnnnnnnnnnnnnnnnnn nnnnnnn %s"
  3914. "${c1} nnnn nnnnnnnnnnnnnnnnnnnnnnnnnn nnnn %s"
  3915. "${c1} nnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnn %s"
  3916. "${c1} nn nnnnnnnnnnnnnnnnnnnnnn nnnnnnnn nn %s"
  3917. "${c1} n nnnnnnnnnnnnnnnnn nnnnnnnnnn n %s"
  3918. "${c1} n nnnnnnnnnnn nnnnnnnnnnn n %s"
  3919. "${c1} n nnnnnn nnnnnnnnnnnn n %s"
  3920. "${c1} n nnnnnnnnnnn nnnnnnnnnnnn n %s"
  3921. "${c1} n nnnnnnnnnnnnn nnnnnnnnnnnn n %s"
  3922. "${c1} n nnnnnnnnnnnnnnnn nnnnnnnnnnnnn n %s"
  3923. "${c1} n nnnnnnnnnnnnnnnnn nnnnnnnnnnnnn n %s"
  3924. "${c1} n nnnnnnnnnnnnnnnnnn nnnnnnnnnnnn n %s"
  3925. "${c1} nn nnnnnnnnnnnnnnnnn nnnnnnnnnnnn nn %s"
  3926. "${c1} nnn nnnnnnnnnnnnnnn nnnnnnnnnnn nnn %s"
  3927. "${c1} nnnnn nnnnnnnnnnnnnn nnnnnnnnn nnnnn %s"
  3928. "${c1} nnnnnnn nnnnnnnnnnnnnnnnnnnn nnnnnnn %s"
  3929. "${c1} nnnnnnnnnn nnnnnnnnnn nnnnnnnnnn %s"
  3930. "${c1} nnnnnnnnnnnnnn nnnnnnnnnnnnnn %s"
  3931. "${c1} nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn %s"
  3932. "${c1} %s")
  3933. ;;
  3934. "Logos")
  3935. if [[ "$no_color" != "1" ]]; then
  3936. c1=$(getColor 'green') # Green
  3937. fi
  3938. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  3939. startline="0"
  3940. logowidth="25"
  3941. fulloutput=(
  3942. "${c1} ..:.:. %s"
  3943. "${c1} ..:.:.:.:. %s"
  3944. "${c1} ..:.:.:.:.:.:. %s"
  3945. "${c1} ..:.:.:.:.:.:.:.:. %s"
  3946. "${c1} .:.::;.::::..:.:.:. %s"
  3947. "${c1} .:.:.::.::.::.;;/ %s"
  3948. "${c1} .:.::.:::///// %s"
  3949. "${c1} ..;;/////// %s"
  3950. "${c1} /////////// %s"
  3951. "${c1} ////////////// %s"
  3952. "${c1} ///////////////// %s"
  3953. "${c1} /////////////////// %s"
  3954. "${c1} ////////////////// %s"
  3955. "${c1} ////////////// %s"
  3956. "${c1} ////////// %s"
  3957. "${c1} ////// %s"
  3958. "${c1} // %s")
  3959. ;;
  3960. "Manjaro-tree")
  3961. if [[ "$no_color" != "1" ]]; then
  3962. c1="\e[1;32m" # Green
  3963. c2="\e[1;33m" # Yellow
  3964. fi
  3965. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  3966. startline="0"
  3967. logowidth="33"
  3968. fulloutput=(
  3969. "${c1} ### %s"
  3970. "${c1} ### #### %s"
  3971. "${c1} ### #### %s"
  3972. "${c1} ##### ##### %s"
  3973. "${c1} ################# %s"
  3974. "${c1} ### ##### #### %s"
  3975. "${c1} ## ${c2}OOO ${c1}### %s"
  3976. "${c1} # ${c2}WW ${c1}## %s"
  3977. "${c1} ${c2}WW ${c1}# %s"
  3978. "${c2} WW %s"
  3979. "${c2} WW %s"
  3980. "${c2} WW %s"
  3981. "${c2} WW %s"
  3982. "${c2} WW %s"
  3983. "${c2} WW %s"
  3984. "${c2} WW %s"
  3985. "${c2} WW %s"
  3986. "${c2} %s")
  3987. ;;
  3988. "elementary OS"|"elementary os")
  3989. if [[ "$no_color" != "1" ]]; then
  3990. c1=$(getColor 'white') # White
  3991. fi
  3992. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  3993. startline="0"
  3994. logowidth="36"
  3995. fulloutput=(
  3996. "${c1} %s"
  3997. "${c1} eeeeeeeeeeeeeeeee %s"
  3998. "${c1} eeeeeeeeeeeeeeeeeeeeeee %s"
  3999. "${c1} eeeee eeeeeeeeeeee eeeee %s"
  4000. "${c1} eeee eeeee eee eeee %s"
  4001. "${c1} eeee eeee eee eeee %s"
  4002. "${c1}eee eee eee eee %s"
  4003. "${c1}eee eee eee eee %s"
  4004. "${c1}ee eee eeee eeee %s"
  4005. "${c1}ee eee eeeee eeeeee %s"
  4006. "${c1}ee eee eeeee eeeee ee %s"
  4007. "${c1}eee eeee eeeeee eeeee eee %s"
  4008. "${c1}eee eeeeeeeeee eeeeee eee %s"
  4009. "${c1} eeeeeeeeeeeeeeeeeeeeeeee eeeee %s"
  4010. "${c1} eeeeeeee eeeeeeeeeeee eeee %s"
  4011. "${c1} eeeee eeeee %s"
  4012. "${c1} eeeeeee eeeeeee %s"
  4013. "${c1} eeeeeeeeeeeeeeeee %s")
  4014. ;;
  4015. "Android")
  4016. if [[ "$no_color" != "1" ]]; then
  4017. c1=$(getColor 'light green') # Bold Green
  4018. fi
  4019. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  4020. startline="2"
  4021. logowidth="24"
  4022. fulloutput=(
  4023. "${c1} ╲ ▁▂▂▂▁ ╱ "
  4024. "${c1} ▄███████▄ "
  4025. "${c1} ▄██ ███ ██▄ %s"
  4026. "${c1} ▄███████████▄ %s"
  4027. "${c1} ▄█ ▄▄▄▄▄▄▄▄▄▄▄▄▄ █▄ %s"
  4028. "${c1} ██ █████████████ ██ %s"
  4029. "${c1} ██ █████████████ ██ %s"
  4030. "${c1} ██ █████████████ ██ %s"
  4031. "${c1} ██ █████████████ ██ %s"
  4032. "${c1} █████████████ %s"
  4033. "${c1} ███████████ %s"
  4034. "${c1} ██ ██ %s"
  4035. "${c1} ██ ██ %s")
  4036. ;;
  4037. "Scientific Linux")
  4038. if [[ "$no_color" != "1" ]]; then
  4039. c1=$(getColor 'light blue')
  4040. c2=$(getColor 'light red')
  4041. c3=$(getColor 'white')
  4042. fi
  4043. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; fi
  4044. startline="1"
  4045. logowidth="44"
  4046. fulloutput=(
  4047. "${c1} =/;;/- "
  4048. "${c1} +: // %s"
  4049. "${c1} /; /; %s"
  4050. "${c1} -X H. %s"
  4051. "${c1} .//;;;:;;-, X= :+ .-;:=;:;#;. %s"
  4052. "${c1} M- ,=;;;#:, ,:#;;:=, ,@ %s"
  4053. "${c1} :# :#.=/++++/=.$= #= %s"
  4054. "${c1} ,#; #/:+/;,,/++:+/ ;+. %s"
  4055. "${c1} ,+/. ,;@+, ,#H;, ,/+, %s"
  4056. "${c1} ;+;;/= @. ${c2}.H${c3}#${c2}#X ${c1}-X :///+; %s"
  4057. "${c1} ;+=;;;.@, ${c3}.X${c2}M${c3}@$. ${c1}=X.//;=#/. %s"
  4058. "${c1} ,;: :@#= =\$H: .+#- %s"
  4059. "${c1} ,#= #;-///==///-// =#, %s"
  4060. "${c1} ;+ :#-;;;:;;;;-X- +: %s"
  4061. "${c1} @- .-;;;;M- =M/;;;-. -X %s"
  4062. "${c1} :;;::;;-. #- :+ ,-;;-;:== %s"
  4063. "${c1} ,X H. %s"
  4064. "${c1} ;/ #= %s"
  4065. "${c1} // +; %s"
  4066. "${c1} '////' %s")
  4067. ;;
  4068. "BackTrack Linux")
  4069. if [[ "$no_color" != "1" ]]; then
  4070. c1=$(getColor 'white') # White
  4071. c2=$(getColor 'light red') # Light Red
  4072. fi
  4073. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  4074. startline="1"
  4075. logowidth="48"
  4076. fulloutput=(
  4077. "${c1}.............. "
  4078. "${c1} ..,;:ccc,. %s"
  4079. "${c1} ......''';lxO. %s"
  4080. "${c1}.....''''..........,:ld; %s"
  4081. "${c1} .';;;:::;,,.x, %s"
  4082. "${c1} ..'''. 0Xxoc:,. ... %s"
  4083. "${c1} .... ,ONkc;,;cokOdc',. %s"
  4084. "${c1} . OMo ':${c2}dd${c1}o. %s"
  4085. "${c1} dMc :OO; %s"
  4086. "${c1} 0M. .:o. %s"
  4087. "${c1} ;Wd %s"
  4088. "${c1} ;XO, %s"
  4089. "${c1} ,d0Odlc;,.. %s"
  4090. "${c1} ..',;:cdOOd::,. %s"
  4091. "${c1} .:d;.':;. %s"
  4092. "${c1} 'd, .' %s"
  4093. "${c1} ;l ..%s"
  4094. "${c1} .o %s"
  4095. "${c1} c %s"
  4096. "${c1} .' %s"
  4097. "${c1} . %s")
  4098. ;;
  4099. "Kali Linux")
  4100. if [[ "$no_color" != "1" ]]; then
  4101. c1=$(getColor 'light blue') # White
  4102. c2=$(getColor 'black') # Light Red
  4103. fi
  4104. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  4105. startline="1"
  4106. logowidth="48"
  4107. fulloutput=(
  4108. "${c1}.............. "
  4109. "${c1} ..,;:ccc,. %s"
  4110. "${c1} ......''';lxO. %s"
  4111. "${c1}.....''''..........,:ld; %s"
  4112. "${c1} .';;;:::;,,.x, %s"
  4113. "${c1} ..'''. 0Xxoc:,. ... %s"
  4114. "${c1} .... ,ONkc;,;cokOdc',. %s"
  4115. "${c1} . OMo ':${c2}dd${c1}o. %s"
  4116. "${c1} dMc :OO; %s"
  4117. "${c1} 0M. .:o. %s"
  4118. "${c1} ;Wd %s"
  4119. "${c1} ;XO, %s"
  4120. "${c1} ,d0Odlc;,.. %s"
  4121. "${c1} ..',;:cdOOd::,. %s"
  4122. "${c1} .:d;.':;. %s"
  4123. "${c1} 'd, .' %s"
  4124. "${c1} ;l ..%s"
  4125. "${c1} .o %s"
  4126. "${c1} c %s"
  4127. "${c1} .' %s"
  4128. "${c1} . %s")
  4129. ;;
  4130. "Sabayon")
  4131. if [[ "$no_color" != "1" ]]; then
  4132. c1=$(getColor 'white') # White
  4133. c2=$(getColor 'light blue') # Blue
  4134. fi
  4135. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  4136. startline="0"
  4137. logowidth="38"
  4138. fulloutput=(
  4139. "${c2} ........... %s"
  4140. "${c2} .. .. %s"
  4141. "${c2} .. .. %s"
  4142. "${c2} .. ${c1}o ${c2}.. %s"
  4143. "${c2} .. ${c1}:W' ${c2}.. %s"
  4144. "${c2} .. ${c1}.d. ${c2}.. %s"
  4145. "${c2}:. ${c1}.KNO ${c2}.: %s"
  4146. "${c2}:. ${c1}cNNN. ${c2}.: %s"
  4147. "${c2}: ${c1}dXXX, ${c2}: %s"
  4148. "${c2}: ${c1}. dXXX, .cd, ${c2}: %s"
  4149. "${c2}: ${c1}'kc .. dKKK. ,ll;:' ${c2}: %s"
  4150. "${c2}: ${c1}.xkkxc;..dkkkc',cxkkl ${c2}: %s"
  4151. "${c2}:. ${c1}.,cdddddddddddddo:. ${c2}.: %s"
  4152. "${c2} .. ${c1}:lllllll: ${c2}.. %s"
  4153. "${c2} .. ${c1}',,,,, ${c2}.. %s"
  4154. "${c2} .. .. %s"
  4155. "${c2} .. .. %s"
  4156. "${c2} ............... %s")
  4157. ;;
  4158. "KaOS")
  4159. if [[ "$no_color" != "1" ]]; then
  4160. c1=$(getColor 'light blue')
  4161. fi
  4162. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  4163. startline="0"
  4164. logowidth="35"
  4165. fulloutput=(
  4166. "${c1} .. %s"
  4167. "${c1} ..... ..OSSAAAAAAA.. %s"
  4168. "${c1} .KKKKSS. .SSAAAAAAAAAAA. %s"
  4169. "${c1}.KKKKKSO. .SAAAAAAAAAA... %s"
  4170. "${c1}KKKKKKS. .OAAAAAAAA. %s"
  4171. "${c1}KKKKKKS. .OAAAAAA. %s"
  4172. "${c1}KKKKKKS. .SSAA.. %s"
  4173. "${c1}.KKKKKS..OAAAAAAAAAAAA........ %s"
  4174. "${c1} DKKKKO.=AA=========A===AASSSO.. %s"
  4175. "${c1} AKKKS.==========AASSSSAAAAAASS. %s"
  4176. "${c1} .=KKO..========ASS.....SSSSASSSS.%s"
  4177. "${c1} .KK. .ASS..O.. =SSSSAOSS:%s"
  4178. "${c1} .OK. .ASSSSSSSO...=A.SSA.%s"
  4179. "${c1} .K ..SSSASSSS.. ..SSA. %s"
  4180. "${c1} .SSS.AAKAKSSKA. %s"
  4181. "${c1} .SSS....S.. %s")
  4182. ;;
  4183. "CentOS")
  4184. if [[ "$no_color" != "1" ]]; then
  4185. c1=$(getColor 'yellow')
  4186. c2=$(getColor 'light green')
  4187. c3=$(getColor 'light blue')
  4188. c4=$(getColor 'light purple')
  4189. fi
  4190. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; c4="${my_lcolor}"; fi
  4191. startline="0"
  4192. logowidth="40"
  4193. fulloutput=(
  4194. "${c1} .. %s"
  4195. "${c1} .PLTJ. %s"
  4196. "${c1} <><><><> %s"
  4197. "${c2} KKSSV' 4KKK ${c1}LJ${c4} KKKL.'VSSKK %s"
  4198. "${c2} KKV' 4KKKKK ${c1}LJ${c4} KKKKAL 'VKK %s"
  4199. "${c2} V' ' 'VKKKK ${c1}LJ${c4} KKKKV' ' 'V %s"
  4200. "${c2} .4MA.' 'VKK ${c1}LJ${c4} KKV' '.4Mb. %s"
  4201. "${c4} . ${c2}KKKKKA.' 'V ${c1}LJ${c4} V' '.4KKKKK ${c3}. %s"
  4202. "${c4} .4D ${c2}KKKKKKKA.'' ${c1}LJ${c4} ''.4KKKKKKK ${c3}FA. %s"
  4203. "${c4} <QDD ++++++++++++ ${c3}++++++++++++ GFD> %s"
  4204. "${c4} 'VD ${c3}KKKKKKKK'.. ${c2}LJ ${c1}..'KKKKKKKK ${c3}FV %s"
  4205. "${c4} ' ${c3}VKKKKK'. .4 ${c2}LJ ${c1}K. .'KKKKKV ${c3}' %s"
  4206. "${c3} 'VK'. .4KK ${c2}LJ ${c1}KKA. .'KV' %s"
  4207. "${c3} A. . .4KKKK ${c2}LJ ${c1}KKKKA. . .4 %s"
  4208. "${c3} KKA. 'KKKKK ${c2}LJ ${c1}KKKKK' .4KK %s"
  4209. "${c3} KKSSA. VKKK ${c2}LJ ${c1}KKKV .4SSKK %s"
  4210. "${c2} <><><><> %s"
  4211. "${c2} 'MKKM' %s"
  4212. "${c2} '' %s")
  4213. ;;
  4214. "Jiyuu Linux")
  4215. if [[ "$no_color" != "1" ]]; then
  4216. c1=$(getColor 'light blue') # Light Blue
  4217. fi
  4218. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  4219. startline="0"
  4220. logowidth="31"
  4221. fulloutput=(
  4222. "${c1}+++++++++++++++++++++++. %s"
  4223. "${c1}ss:-......-+so/:----.os- %s"
  4224. "${c1}ss +s/ os- %s"
  4225. "${c1}ss :s+ os- %s"
  4226. "${c1}ss os. os- %s"
  4227. "${c1}ss .so os- %s"
  4228. "${c1}ss :s+ os- %s"
  4229. "${c1}ss /s/ os- %s"
  4230. "${c1}ss /s: os- %s"
  4231. "${c1}ss +s- os- %s"
  4232. "${c1}ss-.....os:..........os- %s"
  4233. "${c1}++++++++os+++++++++oooo. %s"
  4234. "${c1} os. ./oo/. %s"
  4235. "${c1} os. ./oo: %s"
  4236. "${c1} os. ./oo: %s"
  4237. "${c1} os oo+- %s"
  4238. "${c1} os+- %s"
  4239. "${c1} /. %s")
  4240. ;;
  4241. "Antergos")
  4242. if [[ "$no_color" != "1" ]]; then
  4243. c1=$(getColor 'blue') # Light Blue
  4244. c2=$(getColor 'light blue') # Light Blue
  4245. fi
  4246. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  4247. startline="1"
  4248. logowidth="41"
  4249. fulloutput=(
  4250. "${c1} \`.-/::/-\`\` "
  4251. "${c1} .-/osssssssso/. %s"
  4252. "${c1} :osyysssssssyyys+- %s"
  4253. "${c1} \`.+yyyysssssssssyyyyy+. %s"
  4254. "${c1} \`/syyyyyssssssssssyyyyys-\` %s"
  4255. "${c1} \`/yhyyyyysss${c2}++${c1}ssosyyyyhhy/\` %s"
  4256. "${c1} .ohhhyyyys${c2}o++/+o${c1}so${c2}+${c1}syy${c2}+${c1}shhhho. %s"
  4257. "${c1} .shhhhys${c2}oo++//+${c1}sss${c2}+++${c1}yyy${c2}+s${c1}hhhhs. %s"
  4258. "${c1} -yhhhhs${c2}+++++++o${c1}ssso${c2}+++${c1}yyy${c2}s+o${c1}hhddy: %s"
  4259. "${c1} -yddhhy${c2}o+++++o${c1}syyss${c2}++++${c1}yyy${c2}yooy${c1}hdddy- %s"
  4260. "${c1} .yddddhs${c2}o++o${c1}syyyyys${c2}+++++${c1}yyhh${c2}sos${c1}hddddy\` %s"
  4261. "${c1}\`odddddhyosyhyyyyyy${c2}++++++${c1}yhhhyosddddddo %s"
  4262. "${c1}.dmdddddhhhhhhhyyyo${c2}+++++${c1}shhhhhohddddmmh. %s"
  4263. "${c1}ddmmdddddhhhhhhhso${c2}++++++${c1}yhhhhhhdddddmmdy %s"
  4264. "${c1}dmmmdddddddhhhyso${c2}++++++${c1}shhhhhddddddmmmmh %s"
  4265. "${c1}-dmmmdddddddhhys${c2}o++++o${c1}shhhhdddddddmmmmd- %s"
  4266. "${c1} .smmmmddddddddhhhhhhhhhdddddddddmmmms. %s"
  4267. "${c1} \`+ydmmmdddddddddddddddddddmmmmdy/. %s"
  4268. "${c1} \`.:+ooyyddddddddddddyyso+:.\` %s")
  4269. ;;
  4270. "Void")
  4271. if [[ "$no_color" != "1" ]]; then
  4272. c1=$(getColor 'green') # Dark Green
  4273. c2=$(getColor 'light green') # Light Green
  4274. c3=$(getColor 'dark grey') # Black
  4275. fi
  4276. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; fi
  4277. startline="0"
  4278. logowidth="47"
  4279. fulloutput=(
  4280. "${c2} __.;=====;.__ %s"
  4281. "${c2} _.=+==++=++=+=+===;. %s"
  4282. "${c2} -=+++=+===+=+=+++++=_ %s"
  4283. "${c1} . ${c2}-=:\`\` \`--==+=++==. %s"
  4284. "${c1} _vi, ${c2}\` --+=++++: %s"
  4285. "${c1} .uvnvi. ${c2}_._ -==+==+. %s"
  4286. "${c1} .vvnvnI\` ${c2}.;==|==;. :|=||=|. %s"
  4287. "${c3} +QmQQm${c1}pvvnv; ${c3}_yYsyQQWUUQQQm #QmQ#${c2}:${c3}QQQWUV\$QQmL %s"
  4288. "${c3} -QQWQW${c1}pvvo${c3}wZ?.wQQQE${c2}==<${c3}QWWQ/QWQW.QQWW${c2}(: ${c3}jQWQE %s"
  4289. "${c3} -\$QQQQmmU' jQQQ@${c2}+=<${c3}QWQQ)mQQQ.mQQQC${c2}+;${c3}jWQQ@' %s"
  4290. "${c3} -\$WQ8Y${c1}nI: ${c3}QWQQwgQQWV${c2}\`${c3}mWQQ.jQWQQgyyWW@! %s"
  4291. "${c1} -1vvnvv. ${c2}\`~+++\` ++|+++ %s"
  4292. "${c1} +vnvnnv, ${c2}\`-|=== %s"
  4293. "${c1} +vnvnvns. . ${c2}:=- %s"
  4294. "${c1} -Invnvvnsi..___..=sv=. ${c2}\` %s"
  4295. "${c1} +Invnvnvnnnnnnnnvvnn;. %s"
  4296. "${c1} ~|Invnvnvvnvvvnnv}+\` %s"
  4297. "${c1} -~\"|{*l}*|\"\"~ %s")
  4298. ;;
  4299. "NixOS")
  4300. if [[ "$no_color" != "1" ]]; then
  4301. c1=$(getColor 'blue')
  4302. c2=$(getColor 'light blue')
  4303. fi
  4304. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  4305. startline="0"
  4306. logowidth="45"
  4307. fulloutput=(
  4308. "${c1} ::::. ${c2}'::::: ::::' %s"
  4309. "${c1} '::::: ${c2}':::::. ::::' %s"
  4310. "${c1} ::::: ${c2}'::::.::::: %s"
  4311. "${c1} .......:::::..... ${c2}:::::::: %s"
  4312. "${c1} ::::::::::::::::::. ${c2}:::::: ${c1}::::. %s"
  4313. "${c1} ::::::::::::::::::::: ${c2}:::::. ${c1}.::::' %s"
  4314. "${c2} ..... ::::' ${c1}:::::' %s"
  4315. "${c2} ::::: '::' ${c1}:::::' %s"
  4316. "${c2} ........::::: ' ${c1}:::::::::::. %s"
  4317. "${c2}::::::::::::: ${c1}::::::::::::: %s"
  4318. "${c2} ::::::::::: ${c1}.. ::::: %s"
  4319. "${c2} .::::: ${c1}.::: ::::: %s"
  4320. "${c2} .::::: ${c1}::::: ''''' ${c2}..... %s"
  4321. "${c2} ::::: ${c1}':::::. ${c2}......:::::::::::::' %s"
  4322. "${c2} ::: ${c1}::::::. ${c2}':::::::::::::::::' %s"
  4323. "${c1} .:::::::: ${c2}':::::::::: %s"
  4324. "${c1} .::::''::::. ${c2}'::::. %s"
  4325. "${c1} .::::' ::::. ${c2}'::::. %s"
  4326. "${c1} .:::: :::: ${c2}'::::. %s")
  4327. ;;
  4328. "BunsenLabs")
  4329. if [[ "$no_color" != "1" ]]; then
  4330. c1=$(getColor 'blue')
  4331. fi
  4332. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  4333. startline="5"
  4334. logowidth="25"
  4335. fulloutput=(
  4336. "${c1} HC] "
  4337. "${c1} H]]]] "
  4338. "${c1} H]]]]]]4 "
  4339. "${c1} @C]]]]]]]]* "
  4340. "${c1} @]]]]]]]]]]xd "
  4341. "${c1} @]]]]]]]]]]]]]d %s"
  4342. "${c1} 0]]]]]]]]]]]]]]]] %s"
  4343. "${c1} kx]]]]]]x]]x]]]]]%% %s"
  4344. "${c1} #x]]]]]]]]]]]]]x]]]d %s"
  4345. "${c1} #]]]]]]qW x]]x]]]]]4 %s"
  4346. "${c1} k]x]]xg %%x]]]]]]%% %s"
  4347. "${c1} Wx]]]W x]]]]]]] %s"
  4348. "${c1} #]]]4 xx]]x]] %s"
  4349. "${c1} px] ]]]]]x %s"
  4350. "${c1} Wx] x]]x]] %s"
  4351. "${c1} &x x]]]] %s"
  4352. "${c1} m x]]]] %s"
  4353. "${c1} x]x] %s"
  4354. "${c1} x]]] %s"
  4355. "${c1} ]]]] %s"
  4356. "${c1} x]x %s"
  4357. "${c1} x]q %s"
  4358. "${c1} ]g %s"
  4359. "${c1} q %s")
  4360. ;;
  4361. "SteamOS")
  4362. if [[ "$no_color" != "1" ]]; then
  4363. c1=$(getColor 'grey') # Gray
  4364. c2=$(getColor 'purple') # Dark Purple
  4365. c3=$(getColor 'light purple') # Light Purple
  4366. fi
  4367. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; fi
  4368. startline="0"
  4369. logowidth="37"
  4370. fulloutput=(
  4371. "${c2} .,,,,. %s"
  4372. "${c2} .,'onNMMMMMNNnn',. %s"
  4373. "${c2} .'oNM${c3}ANK${c2}MMMMMMMMMMMNNn'. %s"
  4374. "${c3} .'ANMMMMMMMXK${c2}NNWWWPFFWNNMNn. %s"
  4375. "${c3} ;NNMMMMMMMMMMNWW'' ${c2},.., 'WMMM, %s"
  4376. "${c3} ;NMMMMV+##+VNWWW' ${c3}.+;'':+, 'WM${c2}W, %s"
  4377. "${c3} ,VNNWP+${c1}######${c3}+WW, ${c1}+: ${c3}:+, +MMM, %s"
  4378. "${c3} '${c1}+#############, +. ,+' ${c3}+NMMM %s"
  4379. "${c1} '*#########*' '*,,*' ${c3}.+NMMMM. %s"
  4380. "${c1} \`'*###*' ,.,;###${c3}+WNM, %s"
  4381. "${c1} .,;;, .;##########${c3}+W %s"
  4382. "${c1} ,',. '; ,+##############' %s"
  4383. "${c1} '###+. :,. .,; ,###############' %s"
  4384. "${c1} '####.. \`'' .,###############' %s"
  4385. "${c1} '#####+++################' %s"
  4386. "${c1} '*##################*' %s"
  4387. "${c1} ''*##########*'' %s"
  4388. "${c1} '''''' %s")
  4389. ;;
  4390. "SailfishOS")
  4391. if [[ "$no_color" != "1" ]]; then
  4392. c1=$(getColor 'blue') # Blue
  4393. fi
  4394. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  4395. startline="0"
  4396. logowidth="32"
  4397. fulloutput=(
  4398. "${c1} .+eWWW %s"
  4399. "${c1} .+ee+++eee e. %s"
  4400. "${c1} .ee++eeeeeeee +e. %s"
  4401. "${c1} .e++ee++eeeeeee+eee+e+ %s"
  4402. "${c1} ee.e+.ee+eee++eeeeee+ %s"
  4403. "${c1} W.+e.e+.e++ee+eee %s"
  4404. "${c1} W.+e.W.ee.W++ee' %s"
  4405. "${c1} +e.W W.e+.W.W+ %s"
  4406. "${c1} W.e.+e.W W W. %s"
  4407. "${c1} e e e +e.W.W %s"
  4408. "${c1} .W W W. %s"
  4409. "${c1} W.+e.W. %s"
  4410. "${c1} W++e.ee+. %s"
  4411. "${c1} ++ +ee++eeeee++. %s"
  4412. "${c1} ' '+++e 'ee. %s"
  4413. "${c1} ee %s"
  4414. "${c1} ee %s"
  4415. "${c1} e %s")
  4416. ;;
  4417. "Qubes OS")
  4418. if [[ "$no_color" != "1" ]]; then
  4419. c1=$(getColor 'cyan')
  4420. c2=$(getColor 'blue')
  4421. c3=$(getColor 'light blue')
  4422. fi
  4423. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; fi
  4424. startline="0"
  4425. logowidth="47"
  4426. fulloutput=(
  4427. "${c3} #### %s"
  4428. "${c3} ######## %s"
  4429. "${c3} ############ %s"
  4430. "${c3} ####### ####### %s"
  4431. "${c1} #${c3}###### ######${c2}# %s"
  4432. "${c1} ####${c3}### ###${c2}#### %s"
  4433. "${c1} ###### ${c2} ###### %s"
  4434. "${c1} ###### ${c2} ###### %s"
  4435. "${c1} ###### ${c2} ###### %s"
  4436. "${c1} ###### ${c2} ###### %s"
  4437. "${c1} ###### ${c2} ###### %s"
  4438. "${c1} ####### ${c2} ####### %s"
  4439. "${c1} ####### ${c2} ######### %s"
  4440. "${c1} ####### ${c2} ############## %s"
  4441. "${c1} ######${c2}###### ###### %s"
  4442. "${c1} ####${c2}#### ### %s"
  4443. "${c1} ##${c2}## %s"
  4444. "${c1} %s")
  4445. ;;
  4446. "PCLinuxOS")
  4447. if [[ "$no_color" != "1" ]]; then
  4448. c1=$(getColor 'blue') # Blue
  4449. c2=$(getColor 'light grey') # White
  4450. fi
  4451. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
  4452. startline="0"
  4453. logowidth="50"
  4454. fulloutput=(
  4455. "${c1} %s"
  4456. "${c1} <NNN>%s"
  4457. "${c1} <NNY %s"
  4458. "${c1} <ooooo>--. (( %s"
  4459. "${c1} Aoooooooooooo>--. \\\\\\ %s"
  4460. "${c1} AooodNNNNNNNNNNNNNNNN>--. )) %s"
  4461. "${c2} (${c1} AoodNNNNNNNNNNNNNNNNNNNNNNN>-///' %s"
  4462. "${c2} \\\\\\\\${c1}AodNNNNNNNNNNNNNNNNNNNNNNNNNNNY/ %s"
  4463. "${c1} AodNNNNNNNNNNNNNNNNNNNNNNNNNNNNN %s"
  4464. "${c1} AdNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNA %s"
  4465. "${c1} (${c2}/)${c1}NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNA %s"
  4466. "${c2} //${c1}<NNNNNNNNNNNNNNNNNY' YNNY YNNNN %s"
  4467. "${c2} ,====#Y//${c1} \`<NNNNNNNNNNNY ANY YNA %s"
  4468. "${c1} ANY<NNNNYYN .NY YN. %s"
  4469. "${c1} (NNY NN (NND (NND %s"
  4470. "${c1} (NNU %s"
  4471. "${c1} %s")
  4472. ;;
  4473. "Exherbo")
  4474. if [[ "$no_color" != "1" ]]; then
  4475. c1=$(getColor 'dark grey') # Black
  4476. c2=$(getColor 'light blue') # Blue
  4477. c3=$(getColor 'light red') # Beige
  4478. fi
  4479. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; fi
  4480. startline="0"
  4481. logowidth="46"
  4482. fulloutput=(
  4483. "${c1} , %s"
  4484. "${c1} OXo. %s"
  4485. "${c1} NXdX0: .cok0KXNNXXK0ko:. %s"
  4486. "${c1} KX '0XdKMMK;.xMMMk, .0MMMMMXx; ... %s"
  4487. "${c1} 'NO..xWkMMx kMMM cMMMMMX,NMWOxOXd. %s"
  4488. "${c1} cNMk NK .oXM. OMMMMO. 0MMNo kW. %s"
  4489. "${c1} lMc o: ., .oKNk; ;NMMWlxW' %s"
  4490. "${c1} ;Mc .. .,,' .0M${c2}g;${c1}WMN'dWMMMMMMO %s"
  4491. "${c1} XX ,WMMMMW. cM${c2}cfli${c1}WMKlo. .kMk %s"
  4492. "${c1} .Mo .WM${c2}GD${c1}MW. XM${c2}WO0${c1}MMk oMl %s"
  4493. "${c1} ,M: ,XMMWx::,''oOK0x; NM. %s"
  4494. "${c1} 'Ml ,kNKOxxxxxkkO0XXKOd:. oMk %s"
  4495. "${c1} NK .0Nxc${c3}:::::::::::::::${c1}fkKNk, .MW %s"
  4496. "${c1} ,Mo .NXc${c3}::${c1}qXWXb${c3}::::::::::${c1}oo${c3}::${c1}lNK. .MW %s"
  4497. "${c1} ;Wo oMd${c3}:::${c1}oNMNP${c3}::::::::${c1}oWMMMx${c3}:${c1}c0M; lMO %s"
  4498. "${c1} 'NO;W0c${c3}:::::::::::::::${c1}dMMMMO${c3}::${c1}lMk .WM' %s"
  4499. "${c1} xWONXdc${c3}::::::::::::::${c1}oOOo${c3}::${c1}lXN. ,WMd %s"
  4500. "${c1} 'KWWNXXK0Okxxo,${c3}:::::::${c1},lkKNo xMMO %s"
  4501. "${c1} :XMNxl,';:lodxkOO000Oxc. .oWMMo %s"
  4502. "${c1} 'dXMMXkl;,. .,o0MMNo' %s"
  4503. "${c1} ':d0XWMMMMWNNNNMMMNOl' %s"
  4504. "${c1} ':okKXWNKkl' %s")
  4505. ;;
  4506. "Red Star OS")
  4507. if [[ "$no_color" != "1" ]]; then
  4508. c1=$(getColor 'light red') # Red
  4509. fi
  4510. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  4511. startline="0"
  4512. logowidth="45"
  4513. fulloutput=(
  4514. "${c1} .. %s"
  4515. "${c1} .oK0l %s"
  4516. "${c1} :0KKKKd. %s"
  4517. "${c1} .xKO0KKKKd %s"
  4518. "${c1} ,Od' .d0000l %s"
  4519. "${c1} .c;. .'''... ..'. %s"
  4520. "${c1} .,:cloddxxxkkkkOOOOkkkkkkkkxxxxxxxxxkkkx: %s"
  4521. "${c1} ;kOOOOOOOkxOkc'...',;;;;,,,'',;;:cllc:,. %s"
  4522. "${c1} .okkkkd,.lko .......',;:cllc:;,,'''''. %s"
  4523. "${c1} .cdo. :xd' cd:. ..';'',,,'',,;;;,'. %s"
  4524. "${c1} . .ddl.;doooc'..;oc;'..';::;,'. %s"
  4525. "${c1} coo;.oooolllllllcccc:'. . %s"
  4526. "${c1} .ool''lllllccccccc:::::;. %s"
  4527. "${c1} ;lll. .':cccc:::::::;;;;' %s"
  4528. "${c1} :lcc:'',..';::::;;;;;;;,,. %s"
  4529. "${c1} :cccc::::;...';;;;;,,,,,,. %s"
  4530. "${c1} ,::::::;;;,'. ..',,,,'''. %s"
  4531. "${c1} ........ ...... %s"
  4532. "${c1} %s")
  4533. ;;
  4534. "SparkyLinux")
  4535. if [[ "$no_color" != "1" ]]; then
  4536. c1=$(getColor 'light gray') # Gray
  4537. fi
  4538. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  4539. startline="0"
  4540. logowidth="48"
  4541. fulloutput=(
  4542. "${c1} . \`-:-\` %s"
  4543. "${c1} .o\` .-///-\` %s"
  4544. "${c1} \`oo\` .:/++:. %s"
  4545. "${c1} os+\` -/+++:\` \`\`.........\`\`\` %s"
  4546. "${c1} /ys+\`./+++/-.-::::::----......\`\` %s"
  4547. "${c1} \`syyo\`++o+--::::-::/+++/-\`\` %s"
  4548. "${c1} -yyy+.+o+\`:/:-:sdmmmmmmmmdy+-\` %s"
  4549. "${c1} ::-\` :yyy/-oo.-+/\`ymho++++++oyhdmdy/\` %s"
  4550. "${c1} \`/yy+-\`.syyo\`+o..o--h..osyhhddhs+//osyy/\` %s"
  4551. "${c1} -ydhs+-oyy/.+o.-: \` \` :/::+ydhy+\`\`\`-os- %s"
  4552. "${c1} .sdddy::syo--/:. \`.:dy+-ohhho ./: %s"
  4553. "${c1} :yddds/:+oo+//:-\`- /+ +hy+.shhy: \`\` %s"
  4554. "${c1} \`:ydmmdysooooooo-.ss\`/yss--oyyo %s"
  4555. "${c1} \`./ossyyyyo+:-/oo:.osso- .oys %s"
  4556. "${c1} \`\`..-------::////.-oooo/ :so %s"
  4557. "${c1} \`...----::::::::--.\`/oooo: .o: %s"
  4558. "${c1} \`\`\`\`\`\`\` ++o+:\` \`:\` %s"
  4559. "${c1} ./+/-\` \` %s"
  4560. "${c1} \`-:-. %s"
  4561. "${c1} \`\` %s")
  4562. ;;
  4563. "Pardus")
  4564. if [[ "$no_color" != "1" ]]; then
  4565. c1=$(getColor 'yellow') # Light Yellow
  4566. c2=$(getColor 'dark grey') # Light Gray
  4567. fi
  4568. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  4569. startline="1"
  4570. logowidth="45"
  4571. fulloutput=(
  4572. ""
  4573. "${c1} .smNdy+- \`.:/osyyso+:.\` -+ydmNs. %s"
  4574. "${c1} /Md- -/ymMdmNNdhso/::/oshdNNmdMmy/. :dM/ %s"
  4575. "${c1} mN. oMdyy- -y \`-dMo .Nm %s"
  4576. "${c1} .mN+\` sMy hN+ -: yMs \`+Nm. %s"
  4577. "${c1} \`yMMddMs.dy \`+\` sMddMMy\` %s"
  4578. "${c1} +MMMo .\` . oMMM+ %s"
  4579. "${c1} \`NM/ \`\`\`\`\`.\` \`.\`\`\`\`\` +MN\` %s"
  4580. "${c1} yM+ \`.-:yhomy ymohy:-.\` +My %s"
  4581. "${c1} yM: yo oy :My %s"
  4582. "${c1} +Ms .N\` \`N. +h sM+ %s"
  4583. "${c1} \`MN - -::::::- : :o:+\`NM\` %s"
  4584. "${c1} yM/ sh -dMMMMd- ho +y+My %s"
  4585. "${c1} .dNhsohMh-//: /mm/ ://-yMyoshNd\` %s"
  4586. "${c1} \`-ommNMm+:/. oo ./:+mMNmmo:\` %s"
  4587. "${c1} \`/o+.-somNh- :yy: -hNmos-.+o/\` %s"
  4588. "${c1} ./\` .s/\`s+sMdd+\`\`+ddMs+s\`/s. \`/. %s"
  4589. "${c1} : -y. -hNmddmNy. .y- : %s"
  4590. "${c1} -+ \`..\` +- %s"
  4591. "%s")
  4592. ;;
  4593. "SwagArch")
  4594. if [[ "$no_color" != "1" ]]; then
  4595. c1=$(getColor 'white') # White
  4596. c2=$(getColor 'light blue') # Light Blue
  4597. fi
  4598. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  4599. startline="0"
  4600. logowidth="48"
  4601. fulloutput=(
  4602. "${c1} %s"
  4603. "${c1} .;ldkOKXXNNNNXXK0Oxoc,. %s"
  4604. "${c1} ,lkXMMNK0OkkxkkOKWMMMMMMMMMM; %s"
  4605. "${c1} 'K0xo ..,;:c:. \`'lKMMMMM0 %s"
  4606. "${c1} .lONMMMMMM' \`lNMk' %s"
  4607. "${c1} ;WMMMMMMMMMO. ${c2}....::... %s"
  4608. "${c1} OMMMMMMMMMMMMKl. ${c2}.,;;;;;ccccccc, %s"
  4609. "${c1} \`0MMMMMMMMMMMMMM0: ${c2}.. .ccccccc. %s"
  4610. "${c1} 'kWMMMMMMMMMMMMMNo. ${c2}.,:' .ccccccc. %s"
  4611. "${c1} \`c0MMMMMMMMMMMMMN,${c2},:c; :cccccc: %s"
  4612. "${c1} ckl. \`lXMMMMMMMMMX${c2}occcc:.. ;ccccccc. %s"
  4613. "${c1} dMMMMXd, \`OMMMMMMWk${c2}ccc;:''\` ,ccccccc: %s"
  4614. "${c1} XMMMMMMMWKkxxOWMMMMMNo${c2}ccc; .cccccccc. %s"
  4615. "${c1} \`':ldxO0KXXXXXK0Okdo${c2}cccc. :cccccccc. %s"
  4616. "${c2} :ccc:' \`cccccccc:, %s"
  4617. "${c2} '' %s"
  4618. "${c2} %s")
  4619. ;;
  4620. "Parrot Security")
  4621. if [[ "$no_color" != "1" ]]; then
  4622. c1=$(getColor 'light blue') # Light Blue
  4623. fi
  4624. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  4625. startline="0"
  4626. logowidth="43"
  4627. fulloutput=(
  4628. "${c1} ,:oho/-. %s"
  4629. "${c1} mMMMMMMMMMMMNmmdhy- %s"
  4630. "${c1} dMMMMMMMMMMMMMMMMMMs. %s"
  4631. "${c1} +MMsohNMMMMMMMMMMMMMm/ %s"
  4632. "${c1} .My .+dMMMMMMMMMMMMMh. %s"
  4633. "${c1} + :NMMMMMMMMMMMMNo %s"
  4634. "${c1} \`yMMMMMMMMMMMMMm: %s"
  4635. "${c1} /NMMMMMMMMMMMMMy. %s"
  4636. "${c1} .hMMMMMMMMMMMMMN+ %s"
  4637. "${c1} \`\`-NMMMMMMMMMd- %s"
  4638. "${c1} /MMMMMMMMMMMs. %s"
  4639. "${c1} mMMMMMMMsyNMN/ %s"
  4640. "${c1} +MMMMMMMo :sNh. %s"
  4641. "${c1} \`NMMMMMMm -o/ %s"
  4642. "${c1} oMMMMMMM. %s"
  4643. "${c1} \`NMMMMMM+ %s"
  4644. "${c1} +MMd/NMh %s"
  4645. "${c1} mMm -mN\` %s"
  4646. "${c1} /MM \`h: %s"
  4647. "${c1} dM\` . %s"
  4648. "${c1} :M- %s"
  4649. "${c1} d: %s"
  4650. "${c1} -+ %s"
  4651. "${c1} - %s")
  4652. ;;
  4653. *)
  4654. if [ "$(echo "${kernel}" | grep 'Linux' )" ]; then
  4655. if [[ "$no_color" != "1" ]]; then
  4656. c1=$(getColor 'white') # White
  4657. c2=$(getColor 'dark grey') # Light Gray
  4658. c3=$(getColor 'yellow') # Light Yellow
  4659. fi
  4660. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; c3="${my_lcolor}"; fi
  4661. startline="0"
  4662. logowidth="28"
  4663. fulloutput=(
  4664. "${c2} %s"
  4665. "${c2} %s"
  4666. "${c2} %s"
  4667. "${c2} ##### %s"
  4668. "${c2} ####### %s"
  4669. "${c2} ##"${c1}"O${c2}#"${c1}"O${c2}## %s"
  4670. "${c2} #${c3}#####${c2}# %s"
  4671. "${c2} ##${c1}##${c3}###${c1}##${c2}## %s"
  4672. "${c2} #${c1}##########${c2}## %s"
  4673. "${c2} #${c1}############${c2}## %s"
  4674. "${c2} #${c1}############${c2}### %s"
  4675. "${c3} ##${c2}#${c1}###########${c2}##${c3}# %s"
  4676. "${c3} ######${c2}#${c1}#######${c2}#${c3}###### %s"
  4677. "${c3} #######${c2}#${c1}#####${c2}#${c3}####### %s"
  4678. "${c3} #####${c2}#######${c3}##### %s"
  4679. "${c2} %s"
  4680. "${c2} %s"
  4681. "${c2} %s")
  4682. elif [[ "$(echo "${kernel}" | grep 'GNU' )" || "$(echo "${kernel}" | grep 'Hurd' )" || "${OSTYPE}" == "gnu" ]]; then
  4683. if [[ "$no_color" != "1" ]]; then
  4684. c1=$(getColor 'dark grey') # Light Gray
  4685. fi
  4686. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  4687. startline="0"
  4688. logowidth="37"
  4689. fulloutput=(
  4690. "${c1} _-\`\`\`\`\`-, ,- '- . %s"
  4691. "${c1} .' .- - | | - -. \`. %s"
  4692. "${c1} /.' / \`. \\ %s"
  4693. "${c1} :/ : _... ..._ \`\` : %s"
  4694. "${c1} :: : /._ .\`:'_.._\\. || : %s"
  4695. "${c1} :: \`._ ./ ,\` : \\ . _.'' . %s"
  4696. "${c1} \`:. / | -. \\-. \\\\\_ / %s"
  4697. "${c1} \\:._ _/ .' .@) \\@) \` \`\\ ,.' %s"
  4698. "${c1} _/,--' .- .\\,-.\`--\`. %s"
  4699. "${c1} ,'/'' (( \\ \` ) %s"
  4700. "${c1} /'/' \\ \`-' ( %s"
  4701. "${c1} '/'' \`._,-----' %s"
  4702. "${c1} ''/' .,---' %s"
  4703. "${c1} ''/' ;: %s"
  4704. "${c1} ''/'' ''/ %s"
  4705. "${c1} ''/''/'' %s"
  4706. "${c1} '/'/' %s"
  4707. "${c1} \`; %s")
  4708. # Source: https://www.gnu.org/graphics/alternative-ascii.en.html
  4709. # Copyright (C) 2003, Vijay Kumar
  4710. # Permission is granted to copy, distribute and/or modify this image under the
  4711. # terms of the GNU General Public License as published by the Free Software
  4712. # Foundation; either version 2 of the License, or (at your option) any later
  4713. # version.
  4714. else
  4715. if [[ "$no_color" != "1" ]]; then
  4716. c1=$(getColor 'light green') # Light Green
  4717. fi
  4718. if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; fi
  4719. startline="0"
  4720. logowidth="44"
  4721. fulloutput=(
  4722. "${c1} %s"
  4723. "${c1} %s"
  4724. "${c1} UUU UUU NNN NNN IIIII XXX XXXX%s"
  4725. "${c1} UUU UUU NNNN NNN III XX xXX %s"
  4726. "${c1} UUU UUU NNNNN NNN III XX xXX %s"
  4727. "${c1} UUU UUU NNN NN NNN III XXXX %s"
  4728. "${c1} UUU UUU NNN NN NNN III xXX %s"
  4729. "${c1} UUU UUU NNN NN NNN III xXXXX %s"
  4730. "${c1} UUU UUU NNN NNNNN III xXX XX %s"
  4731. "${c1} UUUuuuUUU NNN NNNN III xXX XX %s"
  4732. "${c1} UUUUU NNN NNN IIIII xXXx xXXx%s"
  4733. "${c1} %s"
  4734. "${c1} %s"
  4735. "${c1} %s"
  4736. "${c1} %s")
  4737. fi
  4738. ;;
  4739. esac
  4740. # Truncate lines based on terminal width.
  4741. if [ "$truncateSet" == "Yes" ]; then
  4742. missinglines=$((${#out_array[*]} + ${startline} - ${#fulloutput[*]}))
  4743. for ((i=0; i<${missinglines}; i++)); do
  4744. fulloutput+=("${c1}$(printf '%*s' "$logowidth")%s")
  4745. done
  4746. for ((i=0; i<${#fulloutput[@]}; i++)); do
  4747. my_out=$(printf "${fulloutput[i]}$c0\n" "${out_array}")
  4748. my_out_full=$(echo "$my_out" | cat -v)
  4749. termWidth=$(tput cols)
  4750. SHOPT_EXTGLOB_STATE=$(shopt -p extglob)
  4751. read SHOPT_CMD SHOPT_STATE SHOPT_OPT <<< ${SHOPT_EXTGLOB_STATE}
  4752. if [[ ${SHOPT_STATE} == "-u" ]]; then
  4753. shopt -s extglob
  4754. fi
  4755. stringReal="${my_out_full//\^\[\[@([0-9]|[0-9];[0-9][0-9])m}"
  4756. if [[ ${SHOPT_STATE} == "-u" ]]; then
  4757. shopt -u extglob
  4758. fi
  4759. if [[ "${#stringReal}" -le "${termWidth}" ]]; then
  4760. echo -e "${my_out}"$c0
  4761. elif [[ "${#stringReal}" -gt "${termWidth}" ]]; then
  4762. ((NORMAL_CHAR_COUNT=0))
  4763. for ((j=0; j<=${#my_out_full}; j++)); do
  4764. if [[ "${my_out_full:${j}:3}" == '^[[' ]]; then
  4765. if [[ "${my_out_full:${j}:5}" =~ ^\^\[\[[[:digit:]]m$ ]]; then
  4766. if [[ ${j} -eq 0 ]]; then
  4767. j=$((${j} + 5))
  4768. else
  4769. j=$((${j} + 4))
  4770. fi
  4771. elif [[ "${my_out_full:${j}:8}" =~ ^\^\[\[[[:digit:]]\;[[:digit:]][[:digit:]]m ]]; then
  4772. if [[ ${j} -eq 0 ]]; then
  4773. j=$((${j} + 8))
  4774. else
  4775. j=$((${j} + 7))
  4776. fi
  4777. fi
  4778. else
  4779. ((NORMAL_CHAR_COUNT++))
  4780. if [[ ${NORMAL_CHAR_COUNT} -ge ${termWidth} ]]; then
  4781. echo -e "${my_out:0:$((${j} - 5))}"$c0
  4782. break 1
  4783. fi
  4784. fi
  4785. done
  4786. fi
  4787. if [[ "$i" -ge "$startline" ]]; then
  4788. unset out_array[0]
  4789. out_array=( "${out_array[@]}" )
  4790. fi
  4791. done
  4792. elif [[ "$portraitSet" = "Yes" ]]; then
  4793. for ((i=0; $i<${#fulloutput[*]}; i++)); do
  4794. printf "${fulloutput[$i]}$c0\n"
  4795. done
  4796. printf "\n"
  4797. for ((i=0; $i<${#fulloutput[*]}; i++)); do
  4798. [[ -z "$out_array" ]] && continue
  4799. printf "%s\n" "${out_array}"
  4800. unset out_array[0]
  4801. out_array=( "${out_array[@]}" )
  4802. done
  4803. elif [[ "$display_logo" == "Yes" ]]; then
  4804. for ((i=0; i<${#fulloutput[*]}; i++)); do
  4805. printf "${fulloutput[i]}$c0\n"
  4806. done
  4807. else
  4808. if [[ "$lineWrap" = "Yes" ]]; then
  4809. availablespace=$(($(tput cols) - ${logowidth} + 16)) #I dont know why 16 but it works
  4810. new_out_array=("${out_array[0]}")
  4811. for ((i=1; i<${#out_array[@]}; i++)); do
  4812. lines=$(echo ${out_array[i]} | fmt -w $availablespace)
  4813. IFS=$'\n' read -rd '' -a splitlines <<<"$lines"
  4814. new_out_array+=("${splitlines[0]}")
  4815. for ((j=1; j<${#splitlines[*]}; j++)); do
  4816. line=$(echo -e "$labelcolor $textcolor ${splitlines[j]}")
  4817. new_out_array=( "${new_out_array[@]}" "$line" );
  4818. done
  4819. done
  4820. out_array=("${new_out_array[@]}")
  4821. fi
  4822. missinglines=$((${#out_array[*]} + ${startline} - ${#fulloutput[*]}))
  4823. for ((i=0; i<${missinglines}; i++)); do
  4824. fulloutput+=("${c1}$(printf '%*s' "$logowidth")%s")
  4825. done
  4826. #n=${#fulloutput[*]}
  4827. for ((i=0; i<${#fulloutput[*]}; i++)); do
  4828. # echo "${out_array[@]}"
  4829. febreeze=$(awk 'BEGIN{srand();print int(rand()*(1000-1))+1 }')
  4830. if [[ "${febreeze}" == "411" || "${febreeze}" == "188" || "${febreeze}" == "15" || "${febreeze}" == "166" || "${febreeze}" == "609" ]]; then
  4831. f_size=${#fulloutput[*]}
  4832. o_size=${#out_array[*]}
  4833. f_max=$(( 32768 / f_size * f_size ))
  4834. #o_max=$(( 32768 / o_size * o_size ))
  4835. for ((a=f_size-1; a>0; a--)); do
  4836. while (( (rand=$RANDOM) >= f_max )); do :; done
  4837. rand=$(( rand % (a+1) ))
  4838. tmp=${fulloutput[a]} fulloutput[a]=${fulloutput[rand]} fulloutput[rand]=$tmp
  4839. done
  4840. for ((b=o_size-1; b>0; b--)); do
  4841. rand=$(( rand % (b+1) ))
  4842. tmp=${out_array[b]} out_array[b]=${out_array[rand]} out_array[rand]=$tmp
  4843. done
  4844. fi
  4845. printf "${fulloutput[i]}$c0\n" "${out_array}"
  4846. if [[ "$i" -ge "$startline" ]]; then
  4847. unset out_array[0]
  4848. out_array=( "${out_array[@]}" )
  4849. fi
  4850. done
  4851. fi
  4852. # Done with ASCII output
  4853. }
  4854. infoDisplay () {
  4855. textcolor="\033[0m"
  4856. [[ "$my_hcolor" ]] && textcolor="${my_hcolor}"
  4857. #TODO: Centralize colors and use them across the board so we only change them one place.
  4858. myascii="${distro}"
  4859. [[ "${asc_distro}" ]] && myascii="${asc_distro}"
  4860. case ${myascii} in
  4861. "Alpine Linux"|"Arch Linux - Old"|"Fedora"|"Korora"|"Chapeau"|"Mandriva"|"Mandrake"|"Chakra"|"ChromeOS"|"Sabayon"|"Slackware"|"Mac OS X"|"Trisquel"|"Kali Linux"|"Jiyuu Linux"|"Antergos"|"KaOS"|"Logos"|"gNewSense"|"Netrunner"|"NixOS"|"SailfishOS"|"Qubes OS"|"Kogaion"|"PCLinuxOS"|"Obarun"|"Solus"|"SwagArch"|"Parrot Security") labelcolor=$(getColor 'light blue');;
  4862. "Arch Linux"|"Frugalware"|"Mageia"|"Deepin"|"CRUX") labelcolor=$(getColor 'light cyan');;
  4863. "Mint"|"LMDE"|"KDE neon"|"openSUSE"|"SUSE Linux Enterprise"|"LinuxDeepin"|"DragonflyBSD"|"Manjaro"|"Manjaro-tree"|"Android"|"Void"|"DesaOS") labelcolor=$(getColor 'light green');;
  4864. "Ubuntu"|"FreeBSD"|"FreeBSD - Old"|"Debian"|"Raspbian"|"BSD"|"Red Hat Enterprise Linux"|"Oracle Linux"|"Peppermint"|"Cygwin"|"Msys"|"Fuduntu"|"Scientific Linux"|"DragonFlyBSD"|"BackTrack Linux"|"Red Star OS"|"SparkyLinux") labelcolor=$(getColor 'light red');;
  4865. "ROSA") labelcolor=$(getColor 'white');;
  4866. "CrunchBang"|"Viperr"|"elementary"*) labelcolor=$(getColor 'dark grey');;
  4867. "Gentoo"|"Parabola GNU/Linux-libre"|"Funtoo"|"Funtoo-text"|"BLAG"|"SteamOS"|"Devuan") labelcolor=$(getColor 'light purple');;
  4868. "Haiku") labelcolor=$(getColor 'green');;
  4869. "NetBSD") labelcolor=$(getColor 'orange');;
  4870. "CentOS"|*) labelcolor=$(getColor 'yellow');;
  4871. esac
  4872. [[ "$my_lcolor" ]] && labelcolor="${my_lcolor}"
  4873. if [[ "$art" ]]; then source "$art"; fi
  4874. if [[ "$no_color" == "1" ]]; then labelcolor=""; bold=""; c0=""; textcolor=""; fi
  4875. # Some verbosity stuff
  4876. [[ "$screenshot" == "1" ]] && verboseOut "Screenshot will be taken after info is displayed."
  4877. [[ "$upload" == "1" ]] && verboseOut "Screenshot will be transferred/uploaded to specified location."
  4878. #########################
  4879. # Info Variable Setting #
  4880. #########################
  4881. if [[ "${distro}" == "Android" ]]; then
  4882. myhostname=$(echo -e "${labelcolor} ${hostname}"); out_array=( "${out_array[@]}" "$myhostname" )
  4883. mydistro=$(echo -e "$labelcolor OS:$textcolor $distro $distro_ver"); out_array=( "${out_array[@]}" "$mydistro" )
  4884. mydevice=$(echo -e "$labelcolor Device:$textcolor $device"); out_array=( "${out_array[@]}" "$mydevice" )
  4885. myrom=$(echo -e "$labelcolor ROM:$textcolor $rom"); out_array=( "${out_array[@]}" "$myrom" )
  4886. mybaseband=$(echo -e "$labelcolor Baseband:$textcolor $baseband"); out_array=( "${out_array[@]}" "$mybaseband" )
  4887. mykernel=$(echo -e "$labelcolor Kernel:$textcolor $kernel"); out_array=( "${out_array[@]}" "$mykernel" )
  4888. myuptime=$(echo -e "$labelcolor Uptime:$textcolor $uptime"); out_array=( "${out_array[@]}" "$myuptime" )
  4889. mycpu=$(echo -e "$labelcolor CPU:$textcolor $cpu"); out_array=( "${out_array[@]}" "$mycpu" )
  4890. mygpu=$(echo -e "$labelcolor GPU:$textcolor $cpu"); out_array=( "${out_array[@]}" "$mygpu" )
  4891. mymem=$(echo -e "$labelcolor RAM:$textcolor $mem"); out_array=( "${out_array[@]}" "$mymem" )
  4892. else
  4893. if [[ "${display[@]}" =~ "host" ]]; then myinfo=$(echo -e "${labelcolor} ${myUser}$textcolor${bold}@${c0}${labelcolor}${myHost}"); out_array=( "${out_array[@]}" "$myinfo" ); ((display_index++)); fi
  4894. if [[ "${display[@]}" =~ "distro" ]]; then
  4895. if [ "$distro" == "Mac OS X" ]; then
  4896. sysArch=`str1=$(getconf LONG_BIT);echo ${str1}bit`
  4897. prodVers=`prodVers=$(sw_vers|grep ProductVersion);echo ${prodVers:15}`
  4898. buildVers=`buildVers=$(sw_vers|grep BuildVersion);echo ${buildVers:14}`
  4899. if [ -n "$distro_more" ]; then mydistro=$(echo -e "$labelcolor OS:$textcolor $distro_more $sysArch")
  4900. else mydistro=$(echo -e "$labelcolor OS:$textcolor $sysArch $distro $prodVers $buildVers"); fi
  4901. elif [[ "$distro" == "Cygwin" || "$distro" == "Msys" ]]; then
  4902. distro="$(wmic os get caption | sed 's/\r//g; s/[ \t]*$//g; 2!d')"
  4903. if [[ "$(wmic os get version | grep -o '^10\.')" == "10." ]]; then
  4904. distro="$distro (v$(wmic os get version | grep '^10\.' | tr -d ' '))"
  4905. fi
  4906. sysArch=$(wmic os get OSArchitecture | sed 's/\r//g; s/[ \t]*$//g; 2!d')
  4907. mydistro=$(echo -e "$labelcolor OS:$textcolor $distro $sysArch")
  4908. else
  4909. if [ -n "$distro_more" ]; then mydistro=$(echo -e "$labelcolor OS:$textcolor $distro_more")
  4910. else mydistro=$(echo -e "$labelcolor OS:$textcolor $distro $sysArch"); fi
  4911. fi
  4912. out_array=( "${out_array[@]}" "$mydistro$uow" )
  4913. ((display_index++))
  4914. fi
  4915. if [[ "${display[@]}" =~ "kernel" ]]; then mykernel=$(echo -e "$labelcolor Kernel:$textcolor $kernel"); out_array=( "${out_array[@]}" "$mykernel" ); ((display_index++)); fi
  4916. if [[ "${display[@]}" =~ "uptime" ]]; then myuptime=$(echo -e "$labelcolor Uptime:$textcolor $uptime"); out_array=( "${out_array[@]}" "$myuptime" ); ((display_index++)); fi
  4917. if [[ "${display[@]}" =~ "pkgs" ]]; then mypkgs=$(echo -e "$labelcolor Packages:$textcolor $pkgs"); out_array=( "${out_array[@]}" "$mypkgs" ); ((display_index++)); fi
  4918. if [[ "${display[@]}" =~ "shell" ]]; then myshell=$(echo -e "$labelcolor Shell:$textcolor $myShell"); out_array=( "${out_array[@]}" "$myshell" ); ((display_index++)); fi
  4919. if [[ -n "$DISPLAY" || "$distro" == "Mac OS X" ]]; then
  4920. if [ -n "${xResolution}" ]; then
  4921. if [[ "${display[@]}" =~ "res" ]]; then myres=$(echo -e "$labelcolor Resolution:${textcolor} $xResolution"); out_array=( "${out_array[@]}" "$myres" ); ((display_index++)); fi
  4922. fi
  4923. if [[ "${display[@]}" =~ "de" ]]; then
  4924. if [[ "${DE}" != "Not Present" ]]; then
  4925. myde=$(echo -e "$labelcolor DE:$textcolor $DE"); out_array=( "${out_array[@]}" "$myde" ); ((display_index++))
  4926. fi
  4927. fi
  4928. if [[ "${display[@]}" =~ "wm" ]]; then mywm=$(echo -e "$labelcolor WM:$textcolor $WM"); out_array=( "${out_array[@]}" "$mywm" ); ((display_index++)); fi
  4929. if [[ "${display[@]}" =~ "wmtheme" ]]; then
  4930. if [[ "${Win_theme}" == "Not Applicable" || "${Win_theme}" == "Not Found" ]]; then
  4931. :
  4932. else
  4933. mywmtheme=$(echo -e "$labelcolor WM Theme:$textcolor $Win_theme"); out_array=( "${out_array[@]}" "$mywmtheme" ); ((display_index++)); fi
  4934. fi
  4935. if [[ "${display[@]}" =~ "gtk" ]]; then
  4936. if [ "$distro" == "Mac OS X" ]; then
  4937. if [[ "$gtkFont" != "Not Applicable" && "$gtkFont" != "Not Found" ]]; then
  4938. if [ -n "$gtkFont" ]; then
  4939. myfont=$(echo -e "$labelcolor Font:$textcolor $gtkFont"); out_array=( "${out_array[@]}" "$myfont" ); ((display_index++))
  4940. fi
  4941. fi
  4942. else
  4943. if [[ "$gtk2Theme" != "Not Applicable" && "$gtk2Theme" != "Not Found" ]]; then
  4944. if [ -n "$gtk2Theme" ]; then
  4945. mygtk2="${gtk2Theme} [GTK2]"
  4946. fi
  4947. fi
  4948. if [[ "$gtk3Theme" != "Not Applicable" && "$gtk3Theme" != "Not Found" ]]; then
  4949. if [ -n "$mygtk2" ]; then
  4950. mygtk3=", ${gtk3Theme} [GTK3]"
  4951. else
  4952. mygtk3="${gtk3Theme} [GTK3]"
  4953. fi
  4954. fi
  4955. if [[ "$gtk_2line" == "yes" ]]; then
  4956. mygtk2=$(echo -e "$labelcolor GTK2 Theme:$textcolor $gtk2Theme"); out_array=( "${out_array[@]}" "$mygtk2" ); ((display_index++))
  4957. mygtk3=$(echo -e "$labelcolor GTK3 Theme:$textcolor $gtk3Theme"); out_array=( "${out_array[@]}" "$mygtk3" ); ((display_index++))
  4958. else
  4959. if [[ "$gtk2Theme" == "$gtk3Theme" ]]; then
  4960. if [[ "$gtk2Theme" != "Not Applicable" && "$gtk2Theme" != "Not Found" ]]; then
  4961. mygtk=$(echo -e "$labelcolor GTK Theme:$textcolor ${gtk2Theme} [GTK2/3]"); out_array=( "${out_array[@]}" "$mygtk" ); ((display_index++))
  4962. fi
  4963. else
  4964. mygtk=$(echo -e "$labelcolor GTK Theme:$textcolor ${mygtk2}${mygtk3}"); out_array=( "${out_array[@]}" "$mygtk" ); ((display_index++))
  4965. fi
  4966. fi
  4967. if [[ "$gtkIcons" != "Not Applicable" && "$gtkIcons" != "Not Found" ]]; then
  4968. if [ -n "$gtkIcons" ]; then
  4969. myicons=$(echo -e "$labelcolor Icon Theme:$textcolor $gtkIcons"); out_array=( "${out_array[@]}" "$myicons" ); ((display_index++))
  4970. fi
  4971. fi
  4972. if [[ "$gtkFont" != "Not Applicable" && "$gtkFont" != "Not Found" ]]; then
  4973. if [ -n "$gtkFont" ]; then
  4974. myfont=$(echo -e "$labelcolor Font:$textcolor $gtkFont"); out_array=( "${out_array[@]}" "$myfont" ); ((display_index++))
  4975. fi
  4976. fi
  4977. # [ "$gtkBackground" ] && mybg=$(echo -e "$labelcolor BG:$textcolor $gtkBackground"); out_array=( "${out_array[@]}" "$mybg" ); ((display_index++))
  4978. fi
  4979. fi
  4980. elif [[ "$fake_distro" == "Cygwin" || "$fake_distro" == "Msys" || "$fake_distro" == "Windows - Modern" ]]; then
  4981. if [[ "${display[@]}" =~ "res" && -n "$xResolution" ]]; then myres=$(echo -e "$labelcolor Resolution:${textcolor} $xResolution"); out_array=( "${out_array[@]}" "$myres" ); ((display_index++)); fi
  4982. if [[ "${display[@]}" =~ "de" ]]; then
  4983. if [[ "${DE}" != "Not Present" ]]; then
  4984. myde=$(echo -e "$labelcolor DE:$textcolor $DE"); out_array=( "${out_array[@]}" "$myde" ); ((display_index++))
  4985. fi
  4986. fi
  4987. if [[ "${display[@]}" =~ "wm" ]]; then mywm=$(echo -e "$labelcolor WM:$textcolor $WM"); out_array=( "${out_array[@]}" "$mywm" ); ((display_index++)); fi
  4988. if [[ "${display[@]}" =~ "wmtheme" ]]; then
  4989. if [[ "${Win_theme}" == "Not Applicable" || "${Win_theme}" == "Not Found" ]]; then
  4990. :
  4991. else
  4992. mywmtheme=$(echo -e "$labelcolor WM Theme:$textcolor $Win_theme"); out_array=( "${out_array[@]}" "$mywmtheme" ); ((display_index++))
  4993. fi
  4994. fi
  4995. elif [[ "$distro" == "Haiku" ]]; then
  4996. if [ -n "${xResolution}" ]; then
  4997. if [[ "${display[@]}" =~ "res" ]]; then myres=$(echo -e "$labelcolor Resolution:${textcolor} $xResolution"); out_array=( "${out_array[@]}" "$myres" ); ((display_index++)); fi
  4998. fi
  4999. fi
  5000. [[ "${fake_distro}" != "Cygwin" && "${fake_distro}" != "Msys" && "${fake_distro}" != "Windows - Modern" ]] && if [[ "${display[@]}" =~ "disk" ]]; then mydisk=$(echo -e "$labelcolor Disk:$textcolor $diskusage"); out_array=( "${out_array[@]}" "$mydisk" ); ((display_index++)); fi
  5001. if [[ "${display[@]}" =~ "cpu" ]]; then mycpu=$(echo -e "$labelcolor CPU:$textcolor $cpu"); out_array=( "${out_array[@]}" "$mycpu" ); ((display_index++)); fi
  5002. if [[ "${display[@]}" =~ "gpu" ]] && [[ "$gpu" != "Not Found" ]]; then mygpu=$(echo -e "$labelcolor GPU:$textcolor $gpu"); out_array=( "${out_array[@]}" "$mygpu" ); ((display_index++)); fi
  5003. if [[ "${display[@]}" =~ "mem" ]]; then mymem=$(echo -e "$labelcolor RAM:$textcolor $mem"); out_array=( "${out_array[@]}" "$mymem" ); ((display_index++)); fi
  5004. if [[ "$use_customlines" = 1 ]]; then customlines; fi
  5005. fi
  5006. if [[ "$display_type" == "ASCII" ]]; then
  5007. asciiText
  5008. else
  5009. if [[ "${display[@]}" =~ "host" ]]; then echo -e "$myinfo"; fi
  5010. if [[ "${display[@]}" =~ "distro" ]]; then echo -e "$mydistro"; fi
  5011. if [[ "${display[@]}" =~ "kernel" ]]; then echo -e "$mykernel"; fi
  5012. if [[ "${distro}" == "Android" ]]; then
  5013. echo -e "$mydevice"
  5014. echo -e "$myrom"
  5015. echo -e "$mybaseband"
  5016. echo -e "$mykernel"
  5017. echo -e "$myuptime"
  5018. echo -e "$mycpu"
  5019. echo -e "$mymem"
  5020. else
  5021. if [[ "${display[@]}" =~ "uptime" ]]; then echo -e "$myuptime"; fi
  5022. if [[ "${display[@]}" =~ "pkgs" && "$mypkgs" != "Unknown" ]]; then echo -e "$mypkgs"; fi
  5023. if [[ "${display[@]}" =~ "shell" ]]; then echo -e "$myshell"; fi
  5024. if [[ "${display[@]}" =~ "res" ]]; then
  5025. test -z "$myres" || echo -e "$myres"
  5026. fi
  5027. if [[ "${display[@]}" =~ "de" ]]; then
  5028. if [[ "${DE}" != "Not Present" ]]; then echo -e "$myde"; fi
  5029. fi
  5030. if [[ "${display[@]}" =~ "wm" ]]; then
  5031. test -z "$mywm" || echo -e "$mywm"
  5032. if [[ "${Win_theme}" != "Not Applicable" && "${Win_theme}" != "Not Found" ]]; then
  5033. test -z "$mywmtheme" || echo -e "$mywmtheme"
  5034. fi
  5035. fi
  5036. if [[ "${display[@]}" =~ "gtk" ]]; then
  5037. if [[ "$gtk_2line" == "yes" ]]; then
  5038. test -z "$mygtk2" || echo -e "$mygtk2"
  5039. test -z "$mygtk3" || echo -e "$mygtk3"
  5040. else
  5041. test -z "$mygtk" || echo -e "$mygtk"
  5042. fi
  5043. test -z "$myicons" || echo -e "$myicons"
  5044. test -z "$myfont" || echo -e "$myfont"
  5045. fi
  5046. if [[ "${display[@]}" =~ "disk" ]]; then echo -e "$mydisk"; fi
  5047. if [[ "${display[@]}" =~ "cpu" ]]; then echo -e "$mycpu"; fi
  5048. if [[ "${display[@]}" =~ "gpu" ]]; then echo -e "$mygpu"; fi
  5049. if [[ "${display[@]}" =~ "mem" ]]; then echo -e "$mymem"; fi
  5050. fi
  5051. fi
  5052. }
  5053. ##################
  5054. # Let's Do This!
  5055. ##################
  5056. if [[ -f "$HOME/.screenfetchOR" ]]; then
  5057. source $HOME/.screenfetchOR
  5058. fi
  5059. if [[ "$overrideDisplay" ]]; then
  5060. verboseOut "Found 'd' flag in syntax. Overriding display..."
  5061. OLDIFS=$IFS
  5062. IFS=';'
  5063. for i in ${overrideDisplay}; do
  5064. modchar="${i:0:1}"
  5065. if [[ "${modchar}" == "-" ]]; then
  5066. i=${i/${modchar}}
  5067. _OLDIFS=IFS
  5068. IFS=,
  5069. for n in $i; do
  5070. if [[ ! "${display[@]}" =~ "$n" ]]; then
  5071. echo "The var $n is not currently being displayed."
  5072. else
  5073. display=( "${display[@]/${n}}" )
  5074. fi
  5075. done
  5076. IFS=$_OLDIFS
  5077. elif [[ "${modchar}" == "+" ]]; then
  5078. i=${i/${modchar}}
  5079. _OLDIFS=IFS
  5080. IFS=,
  5081. for n in $i; do
  5082. if [[ "${valid_display[@]}" =~ "$n" ]]; then
  5083. if [[ "${display[@]}" =~ "$n" ]]; then
  5084. echo "The $n var is already being displayed."
  5085. else
  5086. display+=($n)
  5087. fi
  5088. else
  5089. echo "The var $n is not a valid display var."
  5090. fi
  5091. done
  5092. IFS=$_OLDIFS
  5093. else
  5094. IFS=$OLDIFS
  5095. i="${i//,/ }"
  5096. display=( $i )
  5097. fi
  5098. done
  5099. IFS=$OLDIFS
  5100. fi
  5101. # Check for android
  5102. if [ -f /system/build.prop ] && [ "${distro}" != "SailfishOS" ]; then
  5103. distro="Android"
  5104. detectmem
  5105. detectuptime
  5106. detectkernel
  5107. detectdroid
  5108. infoDisplay
  5109. exit 0
  5110. fi
  5111. for i in "${display[@]}"; do
  5112. if [[ ! "$i" == "" ]]; then
  5113. if [[ $i =~ wm ]]; then
  5114. ! [[ $WM ]] && detectwm;
  5115. ! [[ $Win_theme ]] && detectwmtheme;
  5116. else
  5117. if [[ "${display[*]}" =~ "$i" ]]; then
  5118. if [[ "$errorSuppress" == "1" ]]; then
  5119. detect${i} 2>/dev/null
  5120. else
  5121. detect${i}
  5122. fi
  5123. fi
  5124. fi
  5125. fi
  5126. done
  5127. if [ "$gpu" = 'Not Found' ] ; then
  5128. DetectIntelGPU
  5129. fi
  5130. infoDisplay
  5131. [ "$screenshot" == "1" ] && takeShot
  5132. [ "$exportTheme" == "1" ] && themeExport
  5133. exit 0