diff --git a/010_alsa.sh b/010_alsa.sh index 98b0821..607b5da 100755 --- a/010_alsa.sh +++ b/010_alsa.sh @@ -12,7 +12,7 @@ DEST=${1:-/etc/skel} #rm -r $HOME/.config/pulse #rm -rf /tmp/pulse* -apt install -y alsa-tools alsa-tools-gui alsa-utils alsa-oss alsamixergui alsa-firmware-loaders volumeicon-alsa libalsaplayer0 bluez-alsa-utils bluez-firmware +apt install -y alsa-tools alsa-tools-gui alsa-utils alsa-oss alsamixergui alsa-firmware-loaders volumeicon-alsa libalsaplayer0 bluez-alsa-utils bluez-firmware apt install -y pnmixer blueman /etc/init.d/alsa-utils restart @@ -21,7 +21,7 @@ apt install -y pnmixer blueman #sed -i 's,^\(VolumeControlCommand=\).*,\1'xfce4-mixer',' $HOME/.config/pnmixer/config #pnmixer & -cat > /etc/udev/rules.d/00_alsa-usb.rules << 'EOF' +cat >/etc/udev/rules.d/00_alsa-usb.rules <<'EOF' # Default to using additional (USB) sound cards when they are available. KERNEL=="pcmC[D0-9cp]*", ACTION=="add", PROGRAM="/bin/sh -c 'K=%k; K=$${K#pcmC}; K=$${K%%D*}; echo defaults.ctl.card $$K > /etc/asound.conf; echo defaults.pcm.card $$K >>/etc/asound.conf'" KERNEL=="pcmC[D0-9cp]*", ACTION=="remove", PROGRAM="/bin/sh -c 'echo defaults.ctl.card 0 > /etc/asound.conf; echo defaults.pcm.card 0 >>/etc/asound.conf'" @@ -29,7 +29,7 @@ EOF # see also: https://panther.kapsi.fi/posts/2018-11-17_linux_bluetooth_audio -cat > /etc/init.d/bluealsa </etc/init.d/bluealsa <<'EOF' #!/bin/sh ### BEGIN INIT INFO # Provides: bluez-alsa @@ -100,7 +100,7 @@ EOF DEVICE="XX:XX:XX:XX:XX:XX" -cat > ${HOME}/.asoundrc <${HOME}/.asoundrc </dev/null + +mkdir -p ${DEST}/.config/beets/beetsplug + +conf_print_beets_secrets_sample() { + cat <<-EOF + acoustid: + apikey: your_api_key + discogs_extradata: + token: usertoken + fetchart: + fanarttv_key: your_api_key + follow: + email: your_email + password: seekrit + userid: your_user_id + lastfm: + user: you + api_key: your_api_key + mbcollection: + collection: your_collection_id + musicbrainz: + user: you + pass: seekrit + EOF +} +conf_print_beets_secrets_sample | tee ${DEST}/.config/beets/secrets.yaml >/dev/null + +conf_print_beets_conf_1() { + cat </dev/null + +conf_print_beets_conf_3() { + cat </dev/null + +conf_print_beets_conf_4() { + cat </dev/null + +conf_print_beets_conf_5() { + cat </dev/null + +conf_print_beets_conf_6() { + cat </dev/null + +conf_print_beets_conf_6() { + cat </dev/null + +conf_print_beets_conf_7() { + cat </dev/null + +conf_print_beets_conf_8() { + cat </dev/null + +conf_print_beets_conf_9() { + cat </dev/null + +conf_print_beets_conf_10() { + cat </dev/null + +conf_print_beets_conf_11() { + cat </dev/null + +conf_print_beets_conf_2() { + cat </dev/null + +conf_print_beets_plugins_conf() { + cat <<-EOF + # List of useful plugins. + # Commented out (#) plugins are not in use yet. + + plugins: + [ + #absubmit, # Lets you submit acoustic analysis results to the AcousticBrainz server. + # ToDo: install the extractor binary from https://acousticbrainz.org/download + acousticbrainz, # Gets acoustic-analysis information from the AcousticBrainz project. + badfiles, # ToDo. Adds a beet bad command to check for missing and corrupt files. + bandcamp, # Beetcamp. Use bandcamp as an autotagger source for eg. artwork and lyrics. + bucket, # Groups your files into buckets folders representing ranges. + chroma, # Chromaprint/Acoustid Plugin. + check, # Add checksum automatically. + convert, # Lets you transcoding audio and embedding album art. + copyartifacts, # A plugin that moves non-music files during the import process. + duplicates, # Adds a new command, duplicates or dup, which finds and lists duplicate tracks or albums in your collection. + edit, # Lets you modify music metadata using your favorite text editor. ToDo: No config file yet. + embedart, # Embed the album art directly into each file’s metadata. + export, # Lets you get data from the items and export the content as JSON, CSV, or XML. + fetchart, # Retrieves album art images from various sources on the Web and stores them as image files. + follow, # Get notifications about new releases from album artists in your Beets library using muspy. + fromfilename, # The FromFilename plugin adds the ability to guess tags from the filenames. + # Use this plugin if your tracks have useful names (like “03 Call Me Maybe.mp3”) but their tags don’t reflect that. + hook, # Lets you run commands in response to these events. + importadded, # Useful when an existing collection is imported and the time when albums and items were added should be preserved. + info, # The info plugin provides a command that dumps the current tag values for any file format supported by beets. + lastimport, # Doesn't write tags to files - only database. So not useful at the moment. + lastgenre, # Fetches tags from Last.fm and assigns them as genres to your albums and items. + lyrics, # Fetches and stores song lyrics from databases on the Web. + mbcollection, # Lets you submit your catalog to MusicBrainz to maintain your music collection list there. + mbsubmit, # Provides an extra prompt choice during an import session that prints the tracks + # of the current album in a format that is parseable by MusicBrainz’s track parser. + mbsync, # This plugin provides the mbsync command, + # which lets you fetch metadata from MusicBrainz for albums and tracks that already have MusicBrainz IDs. + missing, # This plugin adds a new command, missing or miss, + # which finds and lists, for every album in your collection, which or how many tracks are missing. + parentwork, # Fetches the work title, parent work title and parent work composer from MusicBrainz. + permissions, # Set file permissions for imported music files and its directories. Permissions will be adjusted automatically on import. + replaygain, # This plugin adds support for ReplayGain, a technique for normalizing audio playback levels. + unimported # Allows to list all files in the library folder which are not listed in the beets library database, including art files. + ] + EOF +} +conf_print_beets_plugins_conf | tee ${DEST}/.config/beets/plugins.yaml >/dev/null + +mkdir -p ${DEST}/.config/beets/genres + +conf_print_beets_genres_txt() { + cat <<-EOF + 2 tone + 2-step garage + 4-beat + 4x4 garage + 8-bit + acapella + acid + acid breaks + acid house + acid jazz + acid rock + acoustic music + acousticana + adult contemporary music + african popular music + african rumba + afrobeat + aleatoric music + alternative country + alternative dance + alternative hip hop + alternative metal + alternative rock + ambient + ambient house + ambient music + americana + anarcho punk + anti-folk + apala + ape haters + arab pop + arabesque + arabic pop + argentine rock + ars antiqua + ars nova + art punk + art rock + ashiq + asian american jazz + australian country music + australian hip hop + australian pub rock + austropop + avant-garde + avant-garde jazz + avant-garde metal + avant-garde music + axé + bac-bal + bachata + baggy + baila + baile funk + baisha xiyue + baithak gana + baião + bajourou + bakersfield sound + bakou + bakshy + bal-musette + balakadri + balinese gamelan + balkan pop + ballad + ballata + ballet + bamboo band + bambuco + banda + bangsawan + bantowbol + barbershop music + barndance + baroque + baroque music + baroque pop + bass music + batcave + batucada + batuco + batá-rumba + beach music + beat + beatboxing + beautiful music + bebop + beiguan + bel canto + bend-skin + benga + berlin school of electronic music + bhajan + bhangra + bhangra-wine + bhangragga + bhangramuffin + big band + big band music + big beat + biguine + bihu + bikutsi + biomusic + bitcore + bitpop + black metal + blackened death metal + blue-eyed soul + bluegrass + blues + blues ballad + blues-rock + boogie + boogie woogie + boogie-woogie + bossa nova + brass band + brazilian funk + brazilian jazz + breakbeat + breakbeat hardcore + breakcore + breton music + brill building pop + britfunk + british blues + british invasion + britpop + broken beat + brown-eyed soul + brukdown + brutal death metal + bubblegum dance + bubblegum pop + bulerias + bumba-meu-boi + bunraku + burger-highlife + burgundian school + byzantine chant + ca din tulnic + ca pe lunca + ca trù + cabaret + cadence + cadence rampa + cadence-lypso + café-aman + cai luong + cajun music + cakewalk + calenda + calentanos + calgia + calypso + calypso jazz + calypso-style baila + campursari + canatronic + candombe + canon + canrock + cantata + cante chico + cante jondo + canterbury scene + cantiga + cantique + cantiñas + canto livre + canto nuevo + canto popular + cantopop + canzone napoletana + cape jazz + capoeira music + caracoles + carceleras + cardas + cardiowave + carimbó + cariso + carnatic music + carol + cartageneras + cassette culture + casséy-co + cavacha + caveman + caña + celempungan + cello rock + celtic + celtic fusion + celtic metal + celtic punk + celtic reggae + celtic rock + cha-cha-cha + chakacha + chalga + chamamé + chamber jazz + chamber music + chamber pop + champeta + changuí + chanson + chant + charanga + charanga-vallenata + charikawi + chastushki + chau van + chemical breaks + chicago blues + chicago house + chicago soul + chicano rap + chicha + chicken scratch + children's music + chillout + chillwave + chimurenga + chinese music + chinese pop + chinese rock + chip music + cho-kantrum + chongak + chopera + chorinho + choro + chouval bwa + chowtal + christian alternative + christian black metal + christian electronic music + christian hardcore + christian hip hop + christian industrial + christian metal + christian music + christian punk + christian r&b + christian rock + christian ska + christmas carol + christmas music + chumba + chut-kai-pang + chutney + chutney soca + chutney-bhangra + chutney-hip hop + chutney-soca + chylandyk + chzalni + chèo + cigányzene + classic + classic country + classic female blues + classic rock + classical + classical music + classical music era + clicks n cuts + close harmony + club music + cocobale + coimbra fado + coladeira + colombianas + combined rhythm + comedy + comedy rap + comedy rock + comic opera + comparsa + compas direct + compas meringue + concert overture + concerto + concerto grosso + congo + conjunto + contemporary christian + contemporary christian music + contemporary classical + contemporary r&b + contonbley + contradanza + cool jazz + corrido + corsican polyphonic song + cothoza mfana + country + country blues + country gospel + country music + country pop + country r&b + country rock + country-rap + countrypolitan + couple de sonneurs + coupé-décalé + cowpunk + cretan music + crossover jazz + crossover music + crossover thrash + crossover thrash metal + crunk + crunk&b + crunkcore + crust punk + csárdás + cuarteto + cuban rumba + cuddlecore + cueca + cumbia + cumbia villera + cybergrind + dabka + dadra + daina + dalauna + dance + dance music + dance-pop + dance-punk + dance-rock + dancehall + dangdut + danger music + dansband + danza + danzón + dark ambient + dark cabaret + dark pop + darkcore + darkstep + darkwave + de ascultat la servici + de codru + de dragoste + de jale + de pahar + death industrial + death metal + death rock + death/doom + deathcore + deathgrind + deathrock + deep funk + deep house + deep soul + degung + delta blues + dementia + desert rock + desi + detroit blues + detroit techno + dhamar + dhimotiká + dhrupad + dhun + digital hardcore + dirge + dirty dutch + dirty rap + dirty rap/pornocore + dirty south + disco + disco house + disco polo + disney + disney hardcore + disney pop + diva house + divine rock + dixieland + dixieland jazz + djambadon + djent + dodompa + doina + dombola + dondang sayang + donegal fiddle tradition + dongjing + doo wop + doom metal + doomcore + downtempo + drag + dream pop + drone doom + drone metal + drone music + dronology + drum and bass + dub + dub house + dubanguthu + dubstep + dubtronica + dunedin sound + dunun + dutch jazz + décima + early music + east coast blues + east coast hip hop + easy listening + electric blues + electric folk + electro + electro backbeat + electro hop + electro house + electro punk + electro-industrial + electro-swing + electroclash + electrofunk + electronic + electronic art music + electronic body music + electronic dance + electronic luk thung + electronic music + electronic rock + electronica + electropop + elevator music + emo + emo pop + emo rap + emocore + emotronic + enka + epic doom metal + epic metal + eremwu eu + ethereal pop + ethereal wave + euro + euro disco + eurobeat + eurodance + europop + eurotrance + eurourban + exotica + experimental music + experimental noise + experimental pop + experimental rock + extreme metal + ezengileer + fado + falak + fandango + farruca + fife and drum blues + filk + film score + filmi + filmi-ghazal + finger-style + fjatpangarri + flamenco + flamenco rumba + flower power + foaie verde + fofa + folk hop + folk metal + folk music + folk pop + folk punk + folk rock + folktronica + forró + franco-country + freak-folk + freakbeat + free improvisation + free jazz + free music + freestyle + freestyle house + freetekno + french pop + frenchcore + frevo + fricote + fuji + fuji music + fulia + full on + funaná + funeral doom + funk + funk metal + funk rock + funkcore + funky house + furniture music + fusion jazz + g-funk + gaana + gabba + gabber + gagaku + gaikyoku + gaita + galant + gamad + gambang kromong + gamelan + gamelan angklung + gamelan bang + gamelan bebonangan + gamelan buh + gamelan degung + gamelan gede + gamelan kebyar + gamelan salendro + gamelan selunding + gamelan semar pegulingan + gamewave + gammeldans + gandrung + gangsta rap + gar + garage rock + garrotin + gavotte + gelugpa chanting + gender wayang + gending + german folk music + gharbi + gharnati + ghazal + ghazal-song + ghetto house + ghettotech + girl group + glam metal + glam punk + glam rock + glitch + gnawa + go-go + goa + goa trance + gong-chime music + goombay + goregrind + goshu ondo + gospel music + gothic metal + gothic rock + granadinas + grebo + gregorian chant + grime + grindcore + groove metal + group sounds + grunge + grupera + guaguanbo + guajira + guasca + guitarra baiana + guitarradas + gumbe + gunchei + gunka + guoyue + gwo ka + gwo ka moderne + gypsy jazz + gypsy punk + gypsybilly + gyu ke + habanera + hajnali + hakka + halling + hambo + hands up + hapa haole + happy hardcore + haqibah + hard + hard bop + hard house + hard rock + hard trance + hardcore hip hop + hardcore metal + hardcore punk + hardcore techno + hardstyle + harepa + harmonica blues + hasaposérviko + heart attack + heartland rock + heavy beat + heavy metal + hesher + hi-nrg + highlands + highlife + highlife fusion + hillybilly music + hindustani classical music + hip hop + hip hop & rap + hip hop soul + hip house + hiplife + hiragasy + hiva usu + hong kong and cantonese pop + hong kong english pop + honky tonk + honkyoku + hora lunga + hornpipe + horror punk + horrorcore + horrorcore rap + house + house music + hua'er + huasteco + huayno + hula + humor + humppa + hunguhungu + hyangak + hymn + hyphy + hát chau van + hát chèo + hát cãi luong + hát tuồng + ibiza music + icaro + idm + igbo music + ijexá + ilahije + illbient + impressionist music + improvisational + incidental music + indian pop + indie folk + indie music + indie pop + indie rock + indietronica + indo jazz + indo rock + indonesian pop + indoyíftika + industrial death metal + industrial hip-hop + industrial metal + industrial music + industrial musical + industrial rock + instrumental rock + intelligent dance music + international latin + inuit music + iranian pop + irish folk + irish rebel music + iscathamiya + isicathamiya + isikhwela jo + island + isolationist + italo dance + italo disco + italo house + itsmeños + izvorna bosanska muzika + j'ouvert + j-fusion + j-pop + j-rock + jaipongan + jaliscienses + jam band + jam rock + jamana kura + jamrieng samai + jangle pop + japanese pop + jarana + jariang + jarochos + jawaiian + jazz + jazz blues + jazz fusion + jazz metal + jazz rap + jazz-funk + jazz-rock + jegog + jenkka + jesus music + jibaro + jig + jig punk + jing ping + jingle + jit + jitterbug + jive + joged + joged bumbung + joik + jonnycore + joropo + jota + jtek + jug band + jujitsu + juju + juke joint blues + jump blues + jumpstyle + jungle + junkanoo + juré + jùjú + k-pop + kaba + kabuki + kachāshī + kadans + kagok + kagyupa chanting + kaiso + kalamatianó + kalattuut + kalinda + kamba pop + kan ha diskan + kansas city blues + kantrum + kantádhes + kargyraa + karma + kaseko + katajjaq + kawachi ondo + kayōkyoku + ke-kwe + kebyar + kecak + kecapi suling + kertok + khaleeji + khap + khelimaski djili + khene + khoomei + khorovodi + khplam wai + khrung sai + khyal + kilapanda + kinko + kirtan + kiwi rock + kizomba + klape + klasik + klezmer + kliningan + kléftiko + kochare + kolomyjka + komagaku + kompa + konpa + korean pop + koumpaneia + kpanlogo + krakowiak + krautrock + kriti + kroncong + krump + krzesany + kuduro + kulintang + kulning + kumina + kun-borrk + kundere + kundiman + kussundé + kutumba wake + kveding + kvæði + kwaito + kwassa kwassa + kwela + käng + kélé + kĩkũyũ pop + la la + latin american + latin jazz + latin pop + latin rap + lavway + laïko + laïkó + le leagan + legényes + lelio + letkajenkka + levenslied + lhamo + lieder + light music + light rock + likanos + liquid drum&bass + liquid funk + liquindi + llanera + llanto + lo-fi + lo-fi music + loki djili + long-song + louisiana blues + louisiana swamp pop + lounge music + lovers rock + lowercase + lubbock sound + lucknavi thumri + luhya omutibo + luk grung + lullaby + lundu + lundum + m-base + madchester + madrigal + mafioso rap + maglaal + magnificat + mahori + mainstream jazz + makossa + makossa-soukous + malagueñas + malawian jazz + malhun + maloya + maluf + maluka + mambo + manaschi + mandarin pop + manding swing + mango + mangue bit + mangulina + manikay + manila sound + manouche + manzuma + mapouka + mapouka-serré + marabi + maracatu + marga + mariachi + marimba + marinera + marrabenta + martial industrial + martinetes + maskanda + mass + matamuerte + math rock + mathcore + matt bello + maxixe + mazurka + mbalax + mbaqanga + mbube + mbumba + medh + medieval folk rock + medieval metal + medieval music + meditation + mejorana + melhoun + melhûn + melodic black metal + melodic death metal + melodic hardcore + melodic metalcore + melodic music + melodic trance + memphis blues + memphis rap + memphis soul + mento + merengue + merengue típico moderno + merengue-bomba + meringue + merseybeat + metal + metalcore + metallic hardcore + mexican pop + mexican rock + mexican son + meykhana + mezwed + miami bass + microhouse + middle of the road + midwest hip hop + milonga + min'yo + mineras + mini compas + mini-jazz + minimal techno + minimalist music + minimalist trance + minneapolis sound + minstrel show + minuet + mirolóyia + modal jazz + modern classical + modern classical music + modern laika + modern rock + modinha + mohabelo + montuno + monumental dance + mor lam + mor lam sing + morna + motorpop + motown + mozambique + mpb + mugam + multicultural + murga + musette + museve + mushroom jazz + music drama + music hall + musiqi-e assil + musique concrète + mutuashi + muwashshah + muzak + méringue + música campesina + música criolla + música de la interior + música llanera + música nordestina + música popular brasileira + música tropical + nagauta + nakasi + nangma + nanguan + narcocorrido + nardcore + narodna muzika + nasheed + nashville sound + nashville sound/countrypolitan + national socialist black metal + naturalismo + nederpop + neo soul + neo-classical metal + neo-medieval + neo-prog + neo-psychedelia + neoclassical + neoclassical metal + neoclassical music + neofolk + neotraditional country + nerdcore + neue deutsche härte + neue deutsche welle + new age music + new beat + new instrumental + new jack swing + new orleans blues + new orleans jazz + new pop + new prog + new rave + new romantic + new school hip hop + new taiwanese song + new wave + new wave of british heavy metal + new wave of new wave + new weird america + new york blues + new york house + newgrass + nganja + nightcore + nintendocore + nisiótika + no wave + noh + noise music + noise pop + noise rock + nongak + norae undong + nordic folk dance music + nordic folk music + nortec + norteño + northern soul + nota + nu breaks + nu jazz + nu metal + nu soul + nueva canción + nyatiti + néo kýma + obscuro + oi! + old school hip hop + old-time + oldies + olonkho + oltului + ondo + opera + operatic pop + oratorio + orchestra + orchestral + organ trio + organic ambient + organum + orgel + oriental metal + ottava rima + outlaw country + outsider music + p-funk + pagan metal + pagan rock + pagode + paisley underground + palm wine + palm-wine + pambiche + panambih + panchai baja + panchavadyam + pansori + paranda + parang + parody + parranda + partido alto + pasillo + patriotic + peace punk + pelimanni music + petenera + peyote song + philadelphia soul + piano blues + piano rock + piedmont blues + pimba + pinoy pop + pinoy rock + pinpeat orchestra + piphat + piyyutim + plainchant + plena + pleng phua cheewit + pleng thai sakorn + political hip hop + polka + polo + polonaise + pols + polska + pong lang + pop + pop folk + pop music + pop punk + pop rap + pop rock + pop sunda + pornocore + porro + post disco + post-britpop + post-disco + post-grunge + post-hardcore + post-industrial + post-metal + post-minimalism + post-punk + post-rock + post-romanticism + pow-wow + power electronics + power metal + power noise + power pop + powerviolence + ppongtchak + praise song + program symphony + progressive bluegrass + progressive country + progressive death metal + progressive electronic + progressive electronic music + progressive folk + progressive folk music + progressive house + progressive metal + progressive power metal + progressive rock + progressive trance + progressive thrash metal + protopunk + psych folk + psychedelic music + psychedelic pop + psychedelic rock + psychedelic trance + psychobilly + punk blues + punk cabaret + punk jazz + punk rock + punta + punta rock + qasidah + qasidah modern + qawwali + quadrille + quan ho + queercore + quiet storm + rada + raga + raga rock + ragga + ragga jungle + raggamuffin + ragtime + rai + rake-and-scrape + ramkbach + ramvong + ranchera + rap + rap metal + rap rock + rapcore + rara + rare groove + rasiya + rave + raw rock + raï + rebetiko + red dirt + reel + reggae + reggae 110 + reggae bultrón + reggae en español + reggae fusion + reggae highlife + reggaefusion + reggaeton + rekilaulu + relax music + religious + rembetiko + renaissance music + requiem + rhapsody + rhyming spiritual + rhythm & blues + rhythm and blues + ricercar + riot grrrl + rock + rock and roll + rock en español + rock opera + rockabilly + rocksteady + rococo + romantic flow + romantic period in music + rondeaux + ronggeng + roots reggae + roots rock + roots rock reggae + rumba + russian pop + rímur + sabar + sacred harp + sacred music + sadcore + saibara + sakara + salegy + salsa + salsa erotica + salsa romantica + saltarello + samba + samba-canção + samba-reggae + samba-rock + sambai + sanjo + sato kagura + sawt + saya + scat + schlager + schottisch + schranz + scottish baroque music + screamo + scrumpy and western + sea shanty + sean nós + second viennese school + sega music + seggae + seis + semba + sephardic music + serialism + set dance + sevdalinka + sevillana + shabab + shabad + shalako + shan'ge + shango + shape note + shibuya-kei + shidaiqu + shima uta + shock rock + shoegaze + shoegazer + shoka + shomyo + show tune + sica + siguiriyas + silat + sinawi + situational + ska + ska punk + skacore + skald + skate punk + skiffle + slack-key guitar + slide + slowcore + sludge metal + slängpolska + smooth jazz + soca + soft rock + son + son montuno + son-batá + sonata + songo + songo-salsa + sophisti-pop + soukous + soul + soul blues + soul jazz + soul music + southern gospel + southern harmony + southern hip hop + southern metal + southern rock + southern soul + space age pop + space music + space rock + spectralism + speed garage + speed metal + speedcore + spirituals + spouge + sprechgesang + square dance + squee + st. louis blues + stand-up + steelband + stoner metal + stoner rock + straight edge + strathspeys + stride + string + string quartet + sufi music + suite + sunshine pop + suomirock + super eurobeat + surf ballad + surf instrumental + surf music + surf pop + surf rock + swamp blues + swamp pop + swamp rock + swing + swing music + swingbeat + sygyt + symphonic + symphonic black metal + symphonic metal + symphonic poem + symphonic rock + symphony + synthcore + synthpop + synthpunk + t'ong guitar + taarab + tai tu + taiwanese pop + tala + talempong + tambu + tamburitza + tamil christian keerthanai + tango + tanguk + tappa + tarana + tarantella + taranto + tech + tech house + tech trance + technical death metal + technical metal + techno + technoid + technopop + techstep + techtonik + teen pop + tejano + tejano music + tekno + tembang sunda + teutonic thrash metal + texas blues + thai pop + thillana + thrash metal + thrashcore + thumri + tibetan pop + tiento + timbila + tin pan alley + tinga + tinku + toeshey + togaku + trad jazz + traditional bluegrass + traditional heavy metal + traditional pop music + trallalero + trance + tribal house + trikitixa + trip hop + trip rock + trip-hop + tropicalia + tropicalismo + tropipop + truck-driving country + tumba + turbo-folk + turkish music + turkish pop + turntablism + tuvan throat-singing + twee pop + twist + two tone + táncház + uk garage + uk pub rock + unblack metal + underground music + uplifting + uplifting trance + urban cowboy + urban folk + urban jazz + vallenato + vaudeville + venezuela + verbunkos + verismo + viking metal + villanella + virelai + vispop + visual kei + visual music + vocal + vocal house + vocal jazz + vocal music + volksmusik + waila + waltz + wangga + warabe uta + wassoulou + weld + were music + west coast hip hop + west coast jazz + western + western blues + western swing + witch house + wizard rock + women's music + wong shadow + wonky pop + wood + work song + world fusion + world fusion music + world music + worldbeat + xhosa music + xoomii + yo-pop + yodeling + yukar + yé-yé + zajal + zapin + zarzuela + zeibekiko + zeuhl + ziglibithy + zouglou + zouk + zouk chouv + zouklove + zulu music + zydeco + EOF +} +conf_print_beets_genres_txt | tee ${DEST}/.config/beets/genres/genres.txt >/dev/null + +conf_print_beets_genres_tree() { + cat <<-EOF + - african: + - african heavy metal + - african hip hop + - afrobeat + - apala + - benga + - bikutsi + - bongo flava + - cape jazz + - chimurenga + - coupé-décalé + - fuji music + - genge + - highlife + - hiplife + - isicathamiya + - jit + - jùjú + - kapuka + - kizomba + - kuduro + - kwaito + - kwela + - makossa + - maloya + - marrabenta + - mbalax + - mbaqanga + - mbube + - morna + - museve + - palm-wine + - raï + - sakara + - sega + - seggae + - semba + - soukous + - taarab + - zouglou + - asian: + - east asian: + - anison + - c-pop + - cantopop + - enka + - hong kong english pop + - j-pop + - k-pop + - kayōkyoku + - korean pop + - mandopop + - onkyokei + - taiwanese pop + - fann at-tanbura + - fijiri + - khaliji + - liwa + - sawt + - south and southeast asian: + - baila + - bhangra + - bhojpuri + - dangdut + - filmi + - indian pop + - lavani + - luk thung: + - luk krung + - manila sound + - morlam + - pinoy pop + - pop sunda + - ragini + - thai pop + - avant-garde: + - experimental music + - lo-fi + - musique concrète + - blues: + - african blues + - blues rock + - blues shouter + - british blues + - canadian blues + - chicago blues + - classic female blues + - contemporary r&b + - country blues + - delta blues + - detroit blues + - electric blues + - gospel blues + - hill country blues + - hokum blues + - jazz blues + - jump blues + - kansas city blues + - louisiana blues + - memphis blues + - piano blues + - piedmont blues + - punk blues + - soul blues + - st. louis blues + - swamp blues + - texas blues + - west coast blues + - caribbean and latin american: + - bachata + - baithak gana + - bolero + - brazilian: + - axé + - bossa nova + - brazilian rock + - brega + - choro + - forró + - frevo + - funk carioca + - lambada + - maracatu + - música popular brasileira + - música sertaneja + - pagode + - samba + - samba rock + - tecnobrega + - tropicalia + - zouk-lambada + - calypso + - chutney + - chutney soca + - compas + - mambo + - merengue + - méringue + - other latin: + - chicha + - criolla + - cumbia + - huayno + - mariachi + - ranchera + - tejano + - punta + - punta rock + - rasin + - reggaeton + - salsa + - soca + - son + - timba + - twoubadou + - zouk + - classical: + - ballet + - baroque: + - baroque music + - cantata + - chamber music: + - string quartet + - classical music + - concerto: + - concerto grosso + - contemporary classical + - modern classical + - opera + - oratorio + - orchestra: + - orchestral + - symphonic + - symphony + - organum + - mass: + - requiem + - sacred music: + - cantique + - gregorian chant + - sonata + - comedy: + - comedy music + - comedy rock + - humor + - parody music + - stand-up + - country: + - alternative country: + - cowpunk + - americana + - australian country music + - bakersfield sound + - bluegrass: + - progressive bluegrass + - reactionary bluegrass + - blues country + - cajun: + - cajun fiddle tunes + - christian country music + - classic country + - close harmony + - country pop + - country rap + - country rock + - country soul + - cowboy/western music + - dansband music + - franco-country + - gulf and western + - hellbilly music + - hokum + - honky tonk + - instrumental country + - lubbock sound + - nashville sound + - neotraditional country + - outlaw country + - progressive country + - psychobilly/punkabilly + - red dirt + - rockabilly + - sertanejo + - texas country + - traditional country music + - truck-driving country + - western swing + - zydeco + - easy listening: + - background music + - beautiful music + - elevator music + - furniture music + - lounge music + - middle of the road + - new-age music + - electronic: + - ambient: + - ambient dub + - ambient house + - ambient techno + - dark ambient + - drone music + - illbient + - isolationism + - lowercase + - asian underground + - breakbeat: + - 4-beat + - acid breaks + - baltimore club + - big beat + - breakbeat hardcore + - broken beat + - florida breaks + - nu skool breaks + - chiptune: + - bitpop + - game boy music + - nintendocore + - video game music + - yorkshire bleeps and bass + - disco: + - cosmic disco + - disco polo + - euro disco + - italo disco + - nu-disco + - space disco + - downtempo: + - acid jazz + - balearic beat + - chill out + - dub music + - dubtronica + - ethnic electronica + - moombahton + - nu jazz + - trip hop + - drum and bass: + - darkcore + - darkstep + - drumfunk + - drumstep + - hardstep + - intelligent drum and bass + - jump-up + - liquid funk + - neurofunk + - oldschool jungle: + - darkside jungle + - ragga jungle + - raggacore + - sambass + - techstep + - electro: + - crunk + - electro backbeat + - electro-grime + - electropop + - electroacoustic: + - acousmatic music + - computer music + - electroacoustic improvisation + - field recording + - live coding + - live electronics + - soundscape composition + - tape music + - electronic rock: + - alternative dance: + - baggy + - madchester + - dance-punk + - dance-rock + - dark wave + - electroclash + - electronicore + - electropunk + - ethereal wave + - indietronica + - new rave + - space rock + - synthpop + - synthpunk + - electronica: + - berlin school + - chillwave + - electronic art music + - electronic dance music + - folktronica + - freestyle music + - glitch + - idm + - laptronica + - skweee + - sound art + - synthcore + - eurodance: + - bubblegum dance + - italo dance + - turbofolk + - hardcore: + - bouncy house + - bouncy techno + - breakcore + - digital hardcore + - doomcore + - dubstyle + - gabber + - happy hardcore + - hardstyle + - jumpstyle + - makina + - speedcore + - terrorcore + - uk hardcore + - hi-nrg: + - eurobeat + - hard nrg + - new beat + - house: + - acid house + - chicago house + - deep house + - diva house + - dutch house + - electro house + - freestyle house + - french house + - funky house + - ghetto house + - hardbag + - hip house + - italo house + - latin house + - minimal house + - progressive house + - rave music + - swing house + - tech house + - tribal house + - uk hard house + - us garage + - vocal house + - industrial: + - aggrotech + - coldwave + - cybergrind + - dark electro + - death industrial + - electro-industrial + - electronic body music: + - futurepop + - industrial metal: + - neue deutsche härte + - industrial rock + - noise: + - japanoise + - power electronics + - power noise + - witch house + - post-disco: + - boogie + - dance-pop + - progressive: + - progressive house/trance: + - disco house + - dream house + - space house + - progressive breaks + - progressive drum & bass + - progressive techno + - techno: + - acid techno + - detroit techno + - free tekno + - ghettotech + - minimal + - nortec + - schranz + - techno-dnb + - technopop + - tecno brega + - toytown techno + - trance: + - acid trance + - classic trance + - dream trance + - goa trance: + - dark psytrance + - full on + - psybreaks + - psyprog + - suomisaundi + - hard trance + - tech trance + - uplifting trance: + - orchestral uplifting + - vocal trance + - uk garage: + - 2-step + - 4x4 + - bassline + - breakstep + - dubstep + - funky + - grime + - speed garage + - trap + - folk: + - american folk revival + - anti-folk + - british folk revival + - celtic music + - contemporary folk + - filk music + - freak folk + - indie folk + - industrial folk + - neofolk + - progressive folk + - psychedelic folk + - sung poetry + - techno-folk + - hip hop: + - alternative hip hop + - avant-garde hip hop + - chap hop + - christian hip hop + - conscious hip hop + - country-rap + - crunkcore + - cumbia rap + - east coast hip hop: + - brick city club + - hardcore hip hop + - mafioso rap + - new jersey hip hop + - electro music + - freestyle rap + - g-funk + - gangsta rap + - golden age hip hop + - hip hop soul + - hip pop + - hyphy + - industrial hip hop + - instrumental hip hop + - jazz rap + - low bap + - lyrical hip hop + - merenrap + - midwest hip hop: + - chicago hip hop + - detroit hip hop + - horrorcore + - st. louis hip hop + - twin cities hip hop + - motswako + - nerdcore + - new jack swing + - new school hip hop + - old school hip hop + - political hip hop + - rap opera + - rap rock: + - rap metal + - rapcore + - songo-salsa + - southern hip hop: + - atlanta hip hop: + - snap music + - bounce music + - houston hip hop: + - chopped and screwed + - miami bass + - turntablism + - underground hip hop + - urban pasifika + - west coast hip hop: + - chicano rap + - jerkin' + - jazz: + - asian american jazz + - avant-garde jazz + - bebop + - boogie-woogie + - british dance band + - chamber jazz + - continental jazz + - cool jazz + - crossover jazz + - cubop + - dixieland + - ethno jazz + - european free jazz + - free funk + - free improvisation + - free jazz + - gypsy jazz + - hard bop + - jazz fusion + - jazz rock + - jazz-funk + - kansas city jazz + - latin jazz + - livetronica + - m-base + - mainstream jazz + - modal jazz + - neo-bop jazz + - neo-swing + - novelty ragtime + - orchestral jazz + - post-bop + - punk jazz + - ragtime + - shibuya-kei + - ska jazz + - smooth jazz + - soul jazz + - straight-ahead jazz + - stride jazz + - swing + - third stream + - trad jazz + - vocal jazz + - west coast gypsy jazz + - west coast jazz + - other: + - worldbeat + - pop: + - adult contemporary + - arab pop + - baroque pop + - bubblegum pop + - chanson + - christian pop + - classical crossover + - europop: + - austropop + - balkan pop + - french pop + - latin pop + - laïkó + - nederpop + - russian pop + - iranian pop + - jangle pop + - latin ballad + - levenslied + - louisiana swamp pop + - mexican pop + - motorpop + - new romanticism + - pop rap + - popera + - psychedelic pop + - schlager + - soft rock + - sophisti-pop + - space age pop + - sunshine pop + - surf pop + - teen pop + - traditional pop music + - turkish pop + - vispop + - wonky pop + - rhythm and blues: + - funk: + - deep funk + - go-go + - p-funk + - soul: + - blue-eyed soul + - neo soul + - northern soul + - rock: + - alternative rock: + - britpop: + - post-britpop + - dream pop + - grunge: + - post-grunge + - indie pop: + - dunedin sound + - twee pop + - indie rock + - noise pop + - nu metal + - post-punk revival + - post-rock: + - post-metal + - sadcore + - shoegaze + - slowcore + - art rock + - beat music + - chinese rock + - christian rock + - dark cabaret + - desert rock + - experimental rock + - folk rock + - garage rock + - glam rock + - hard rock + - heavy metal: + - alternative metal: + - funk metal + - black metal: + - viking metal + - christian metal + - death metal: + - death/doom + - goregrind + - melodic death metal + - technical death metal + - doom metal: + - epic doom metal + - funeral doom + - drone metal + - epic metal + - folk metal: + - celtic metal + - medieval metal + - pagan metal + - funk metal + - glam metal + - gothic metal + - industrial metal: + - industrial death metal + - metalcore: + - deathcore + - mathcore: + - djent + - synthcore + - neoclassical metal + - post-metal + - power metal: + - progressive power metal + - progressive metal + - sludge metal + - speed metal + - stoner rock: + - stoner metal + - symphonic metal + - thrash metal: + - crossover thrash + - groove metal + - progressive thrash metal + - teutonic thrash metal + - traditional heavy metal + - math rock + - new wave: + - world fusion + - paisley underground + - pop rock + - post-punk: + - gothic rock + - no wave + - noise rock + - power pop + - progressive rock: + - canterbury scene + - krautrock + - new prog + - rock in opposition + - psychedelic rock: + - acid rock + - freakbeat + - neo-psychedelia + - raga rock + - punk rock: + - anarcho punk: + - crust punk: + - d-beat + - art punk + - christian punk + - deathrock + - folk punk: + - celtic punk + - gypsy punk + - garage punk + - grindcore: + - crustgrind + - noisegrind + - hardcore punk: + - post-hardcore: + - emo: + - screamo + - powerviolence + - street punk + - thrashcore + - horror punk + - oi! + - pop punk + - psychobilly + - riot grrrl + - ska punk: + - ska-core + - skate punk + - rock and roll + - southern rock + - sufi rock + - surf rock + - visual kei: + - nagoya kei + - reggae: + - roots reggae + - reggae fusion + - reggae en español: + - spanish reggae + - reggae 110 + - reggae bultrón + - romantic flow + - lovers rock + - raggamuffin: + - ragga + - dancehall + - ska: + - 2 tone + - dub + - rocksteady + EOF +} +conf_print_beets_genres_tree | tee ${DEST}/.config/beets/genres/genres-tree.yaml >/dev/null + +# Install beets-xtractor and essentia for classification diff --git a/020_git-mergetool.sh b/020_git-mergetool.sh index c0dad9f..0a40699 100755 --- a/020_git-mergetool.sh +++ b/020_git-mergetool.sh @@ -2,52 +2,70 @@ BIN_DIR=/usr/local/bin #BIN_DIR=~/bin -apt install -y meld +sudo apt install -y meld +GUI_DIFF_TOOL=meld # graphical diff/merge tool +GUI_MERGE_TOOL=meld +git config --global diff.guitool ${GUI_DIFF_TOOL} +git config --global merge.guitool ${GUI_MERGE_TOOL} +git config --global mergetool.meld.hasOutput true # Available tools: git difftool --tool-help -DIFF_TOOL=meld # graphical diff/merge tool -MERGE_TOOL=meld +TOOL_PATH=nvim +DIFF_TOOL=nvimdiff # terminal diff/merge tool +MERGE_TOOL=nvimdiff +DIFF_STYLE="LOCAL,MERGED,REMOTE" - # DIFF_TOOL=vimdiff3 # terminal diff/merge tool - # MERGE_TOOL=vimdiff3 +mergetool.nvimdiff.layout 2 # $LOCAL is the file in the current branch (e.g. master). # $REMOTE is the file in the branch being merged (e.g. branch_name). # $MERGED is the partially merged file with the merge conflict information in it. # $BASE is the shared commit ancestor of $LOCAL and $REMOTE, this is to say the file as it was when the branch containing $REMOTE was originally created. +# if unset the diff tool follows the mergetool settings. +# default path is vim. +# +# 2019 +# git config --global diff.tool vimdiff3 +# git config --global difftool.vimdiff3.path nvim +# git config --global merge.tool vimdiff3 +# git config --global mergetool.vimdiff3.path +git config diff.tool ${DIFF_TOOL} +git config --global diff.tool ${DIFF_TOOL} +git config difftool.prompt false +git config --global difftool.prompt false +git config --global difftool.${DIFF_TOOL}.path "${TOOL_PATH}" + +git config merge.tool ${MERGE_TOOL} git config --global merge.tool ${MERGE_TOOL} -git config --global merge.conflictstyle diff3 +git config merge.layout ${DIFF_STYLE} +git config --global mergetool.${MERGE_TOOL}.layout "${DIFF_STYLE}" +git config --global mergetool.${MERGE_TOOL}.path ${TOOL_PATH} + #git config --global mergetool.${MERGE_TOOL}.cmd ${MERGE_TOOL} '$LOCAL $BASE $MERGED' -git config --global diff.tool ${DIFF_TOOL} -git config --global difftool.prompt false +git config alias.d difftool git config --global alias.d difftool #git config --global difftool.${DIFF_TOOL}.cmd ${DIFF_TOOL} '$LOCAL $REMOTE' -git config merge.tool ${MERGE_TOOL} -git config merge.conflictstyle diff3 #git config mergetool.${MERGE_TOOL}.cmd ${MERGE_TOOL} '$LOCAL $BASE $MERGED' -git config diff.tool ${DIFF_TOOL} -git config difftool.prompt false -git config alias.d difftool #git config --global difftool.${DIFF_TOOL}.cmd ${DIFF_TOOL} '$LOCAL $REMOTE' echo "Global: Active mergetool: $(git config --global merge.tool)" echo "Global: Merge style: $(git config --global merge.conflictstyle)" echo "Global: Active difftool: $(git config --global diff.tool)" -echo "Global: Prompt for difftool: $(git config --global difftool.prompt)" +echo "Global: Prompt for difftool: $(git config --global difftool.prompt)" echo "Active mergetool: $(git config merge.tool)" echo "Merge style: $(git config merge.conflictstyle)" echo "Active difftool: $(git config diff.tool)" -echo "Prompt for difftool: $(git config difftool.prompt)" +echo "Prompt for difftool: $(git config difftool.prompt)" # to use an unsupported tool see below. #git config --global diff.external ${BIN_DIR}/git-diff-vimdiff.sh @@ -62,7 +80,7 @@ echo "Prompt for difftool: $(git config difftool.prompt)" #meld $2 $5 #EOF # -#chmod +x ${BIN_DIR}/git-diff-meld.sh +#chmod +x ${BIN_DIR}/git-diff-meld.sh # #cat > ${BIN_DIR}/git-diff-vimdiff.sh <<'EOF' ##!/bin/bash diff --git a/020_gitea_dpr.sh b/020_gitea_dpr.sh index 7ac09d2..88913e2 100644 --- a/020_gitea_dpr.sh +++ b/020_gitea_dpr.sh @@ -2,6 +2,7 @@ # Add a sources.list that points to the gitea instance. # https://docs.gitea.com/usage/packages/debian +sudo apt-get install -y tea-cli GITEA_URL="git2.ring-zero.co.uk" OWNER="cyteen" diff --git a/020_hyprland-hyprdots.sh b/020_hyprland-hyprdots.sh new file mode 100644 index 0000000..57c1772 --- /dev/null +++ b/020_hyprland-hyprdots.sh @@ -0,0 +1,93 @@ +#!/usr/bin/env bash + +set -x +set -eo pipefail + +# the goal is to provide a tokyo-night themes hyprland + +sudo apt install git liblz4-1 scdoc +# git clone https://github.com/Senshi111/debian-hyprland-hyprdots.git +# cd ~/debian-hyprland-hyprdots/build-hyprland-and-apps + +# ./install_dependencies.sh +# ./install_hyprland.sh +# apt-get install hyprland + +# ./install_rust.sh +# apt install rust-all cargo + +#============================================================================== +# Efficient animated wallpaper daemon for wayland, controlled at runtime +# ./install_swww.sh +# requires rustc 1.74 +git clone https://github.com/Horus645/swww.git +cargo build --release +# Then, put both binaries +cp target/release/swww /usr/bin +cp target/release/swww-daemon /usr/bin + +# Optionally, autocompletion scripts for bash, zsh, fish and elvish are offered +# in the completions directory. +# Copy bash completions +sudo mkdir -p /usr/share/bash-completion/completions +sudo cp completions/swww.bash /usr/share/bash-completion/completions/swww + +# Copy fish completions +#sudo mkdir -p /usr/share/fish/vendor_completions.d/ +#sudo cp completions/swww.fish /usr/share/fish/vendor_completions.d/swww.fish + +# Copy zsh completions +sudo mkdir -p /usr/share/zsh/site-functions +sudo cp completions/_swww /usr/share/zsh/site-functions/_swww + +# Man pages: +# In order to generate the man pages, you must have scdoc installed. Run +./doc/gen.sh +#============================================================================== +# An XDG Desktop Portal backend for Hyprland. +# gbm - libgbm1: Installed: 23.3.5-1 +# hyprland-protocols - local hyprland-protocols: Installed: 0.2 +# hyprlang - local libhyprlang2: Installed: 0.5.1-0devuan1 +# libdrm - libdrm2: Installed: 2.4.120-2 +# libpipewire-0.3 - libpipewire-0.3-0: Installed: 1.0.3-1 +# libspa-0.2 - libspa-0.2-dev: Installed: 1.0.3-1 +# sdbus-cpp - libsdbus-c++-bin: Installed: (none) Candidate: 1.4.0-2 +# wayland-client - libwayland-client0: Installed: 1.22.0-2.1+b1 +# wayland-protocols - local wayland-protocols: Installed: 1.36-0devuan1 + +# ./install_xdg_portal.sh + +git clone --recursive https://github.com/hyprwm/xdg-desktop-portal-hyprland +cd xdg-desktop-portal-hyprland/ +cmake -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib -DCMAKE_INSTALL_PREFIX=/usr -B build +cmake --build build +sudo cmake --install build +#============================================================================== +# A Wayland native snapshot editing tool, inspired by Snappy on macOS +# ./install_swappy.sh +#============================================================================== +# Command-line copy/paste utilities for Wayland +# ./install_wl_clipboard.sh +#============================================================================== +# wayland clipboard manager with support for multimedia +# ./install_cliphist.sh +#============================================================================== +# ./install_go.sh # If needed +#============================================================================== +# Swaylock, with fancy effects +# ./install_swaylock-effects.sh +#============================================================================== +# GTK3 settings editor adapted to work in the wlroots environment +# ./install_nwg-look.sh +#============================================================================== +# CLI utility to print out images of pokemon to terminal +# ./install_pokemon-colorscripts.sh +#============================================================================== +# supporting apps - personal choice. +# ./install_apps.sh + +#============================================================================== +git clone --depth 1 https://github.com/Senshi111/hyprland-hyprdots-files.git +# ./install_themes.sh + +./cleanup.sh diff --git a/020_hyprland.sh b/020_hyprland.sh index e032314..89ea7d5 100644 --- a/020_hyprland.sh +++ b/020_hyprland.sh @@ -64,126 +64,132 @@ set -x ## └── watch conf_print_debian_control() { - cat <<-'EOF' - Source: hyprland - Section: x11 - Homepage: https://hyprland.org/ - Priority: optional - Standards-Version: 4.6.2 - Vcs-Git: https://salsa.debian.org/debian/hyperland.git - Vcs-Browser: https://salsa.debian.org/debian/hyperland - Maintainer: Mo Zhou - Build-Depends: debhelper-compat (= 13), - cmake, - meson, - ninja-build, - cmake-extras, - cmake, - gettext, - gettext-base, - git, - fontconfig, - libfontconfig-dev, - libffi-dev, - libxml2-dev, - libdrm-dev, - libxkbcommon-x11-dev, - libxkbregistry-dev, - libxkbcommon-dev, - libpixman-1-dev, - libudev-dev, - libseat-dev, - seatd, - libxcb-dri3-dev, - libvulkan-dev, - libvulkan-volk-dev, - libvkfft-dev, - libgulkan-dev, - libegl-dev, - libgles2, - libegl1-mesa-dev, - glslang-tools, - libinput-bin, - libinput-dev, - libxcb-composite0-dev, - libavutil-dev, - libavcodec-dev, - libavformat-dev, - libxcb-ewmh2, - libxcb-ewmh-dev, - libxcb-present-dev, - libxcb-icccm4-dev, - libxcb-render-util0-dev, - libxcb-res0-dev, - libxcb-xinput-dev, - xdg-desktop-portal-wlr, - hwdata, - hyprwayland-scanner, - xwayland, - libwayland-dev, - libpango1.0-dev, - wayland-protocols, - libtomlplusplus-dev, - libhyprlang-dev, - systemd-dev | libelogind-dev, - libgbm-dev, - libliftoff-dev, - libdisplay-info-dev, - cpio, + cat <<'EOF' +Source: hyprland +Section: x11 +Homepage: https://hyprland.org/ +Priority: optional +Standards-Version: 4.6.2 +Vcs-Git: https://salsa.debian.org/debian/hyperland.git +Vcs-Browser: https://salsa.debian.org/debian/hyperland +Maintainer: Mo Zhou +Build-Depends: + debhelper-compat (= 13), + cmake, + cmake-extras, + meson, + ninja-build, + gettext, + gettext-base, + git, + fontconfig, + libfontconfig-dev, + libffi-dev, + libxml2-dev, + libdrm2, + libdrm-dev, + libxkbcommon-x11-dev, + libxkbregistry-dev, + libxkbcommon-dev, + libpixman-1-dev, + libudev-dev, + libseat-dev, + seatd, + libxcb-dri3-dev, + libvulkan-dev, + libvulkan-volk-dev, + libvkfft-dev, + libgulkan-dev, + libegl-dev, + libgles2, + libegl1-mesa-dev, + glslang-tools, + libinput-bin, + libinput-dev, + libavutil-dev, + libavcodec-dev, + libavformat-dev, + libxcb1, + libxcb-composite0-dev, + libxcb-ewmh2, + libxcb-ewmh-dev, + libxcb-present-dev, + libxcb-icccm4-dev, + libxcb-render-util0, + libxcb-render-util0-dev, + libxcb-res0-dev, + libxcb-xinput-dev, + xdg-desktop-portal-wlr, + hwdata, + hyprwayland-scanner >=0.3.1, + hyprcursor >=0.1.7, + xwayland, + libwayland-server0, + libwayland-dev, + libpango1.0-dev, + wayland-protocols, + libtomlplusplus-dev, + libhyprlang2 >=0.3.2, + libhyprlang-dev, + systemd-dev | libelogind-dev, + libgbm-dev, + libliftoff-dev, + libdisplay-info-dev, + cpio, - Package: hyprland - Architecture: any - Depends: ${misc:Depends}, ${shlibs:Depends}, hyprland-common - Suggests: kitty | foot, dolphin, waybar - Description: Tiling compositor with the looks - Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't - sacrifice on its looks. - . - It provides the latest Wayland features, is highly customizable, has all the - eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other - wlr-based compositors and more. - . - This package contains the executables. +Package: hyprland +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, hyprland-common +Suggests: kitty | foot, dolphin, waybar +Description: Tiling compositor with the looks + Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't + sacrifice on its looks. + . + It provides the latest Wayland features, is highly customizable, has all the + eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other + wlr-based compositors and more. + . + This package contains the executables. - Package: hyprland-dev - Architecture: any - Depends: ${misc:Depends}, ${shlibs:Depends}, hyprland (= ${binary:Version}) - Description: Tiling compositor with the looks - Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't - sacrifice on its looks. - . - It provides the latest Wayland features, is highly customizable, has all the - eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other - wlr-based compositors and more. - . - This package contains the development files. +Package: hyprland-dev +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, hyprland (= ${binary:Version}) +Description: Tiling compositor with the looks + Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't + sacrifice on its looks. + . + It provides the latest Wayland features, is highly customizable, has all the + eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other + wlr-based compositors and more. + . + This package contains the development files. - Package: hyprland-common - Architecture: all - Depends: ${misc:Depends} - Description: Tiling compositor with the looks - Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't - sacrifice on its looks. - . - It provides the latest Wayland features, is highly customizable, has all the - eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other - wlr-based compositors and more. - . - This package contains architecture independent files such as wallpapers. +Package: hyprland-common +Architecture: all +Depends: ${misc:Depends} +Description: Tiling compositor with the looks + Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't + sacrifice on its looks. + . + It provides the latest Wayland features, is highly customizable, has all the + eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other + wlr-based compositors and more. + . + This package contains architecture independent files such as wallpapers. - Package: hyprland-completions - Architecture: all - Depends: ${misc:Depends} - Description: Tiling compositor with the looks - Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't - sacrifice on its looks. - . - It provides the latest Wayland features, is highly customizable, has all the - eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other - wlr-based compositors and more. - . - This package contains the completions for bash, zsh and fish - EOF +Package: hyprland-completions +Architecture: all +Depends: ${misc:Depends} +Description: Tiling compositor with the looks + Hyprland is a dynamic tiling Wayland compositor based on wlroots that doesn't + sacrifice on its looks. + . + It provides the latest Wayland features, is highly customizable, has all the + eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other + wlr-based compositors and more. + . + This package contains the completions for bash, zsh and fish +EOF } # conf_print_debian_control | sudo tee debian/control @@ -570,7 +576,7 @@ conf_print_hyprland_dev_substvars() { ## conf_print_hyprland_install | sudo tee debian/hyprland.install conf_print_hyprland_install() { - cat <<-EOF + cat <<-'EOF' usr/bin/ usr/lib/ usr/share/man @@ -582,7 +588,7 @@ conf_print_hyprland_install() { conf_print_hyprland_substvars() { cat <<-EOF - shlibs:Depends=hyprland (>= ${VERSION}), libc6 (>= 2.34), libcairo2 (>= 1.2.4), libdisplay-info1 (>= 0.1.1), libdrm2 (>= 2.4.119), libegl1, libeudev1 (>= 3.2.14), libgbm1 (>= 23.3.5), libgcc-s1 (>=13.2.0), libgles2, libglib2.0-0 (>=2.78.4), libhyprlang2 (>= 0.5.1), libinput10 (>=1.25.0), libliftoff0 (>= 0.4.1), libopengl0, libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.52.0), libpixman-1-0 (>= 0.42.0), libseat1 (>= 0.8.0), libstdc++6 (>= 13.2), libtomlplusplus3 (>= 3.4.0), libwayland-client0 (>= 1.20.0), libwayland-server0 (>= 1.22.0), libxcb-composite0, libxcb-dri3-0 (>= 1.13), libxcb-ewmh2 (>= 0.4.1), libxcb-icccm4 (>= 0.4.1), libxcb-present0, libxcb-render-util0, libxcb-render0, libxcb-res0 (>= 1.10), libxcb-shm0 (>= 1.10), libxcb-xfixes0 (>= 1.15), libxcb-xinput0 (>= 1.15), libxcb1, libxkbcommon0 (>= 1.6.0) + shlibs:Depends=hyprland (>= ${VERSION}), libc6 (>= 2.34), libcairo2 (>= 1.2.4), libdisplay-info1 (>= 0.1.1), libdrm2 (>= 2.4.119), libegl1, libeudev1 (>= 3.2.14), libgbm1 (>= 23.3.5), libgcc-s1 (>=13.2.0), libgles2, libglib2.0-0 (>=2.78.4), libhyprlang2 (>= 0.3.2), libinput10 (>=1.25.0), libliftoff0 (>= 0.4.1), libopengl0, libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.52.0), libpixman-1-0 (>= 0.42.0), libseat1 (>= 0.8.0), libstdc++6 (>= 13.2), libtomlplusplus3 (>= 3.4.0), libwayland-client0 (>= 1.20.0), libwayland-server0 (>= 1.22.0), libxcb-composite0, libxcb-dri3-0 (>= 1.13), libxcb-ewmh2 (>= 0.4.1), libxcb-icccm4 (>= 0.4.1), libxcb-present0, libxcb-render-util0, libxcb-render0, libxcb-res0 (>= 1.10), libxcb-shm0 (>= 1.10), libxcb-xfixes0 (>= 1.15), libxcb-xinput0 (>= 1.15), libxcb1, libxkbcommon0 (>= 1.6.0) misc:Depends= misc:Pre-Depends= EOF @@ -609,6 +615,7 @@ conf_print_hyprland_completions_substvars() { } # conf_print_hyprland_completions_substvars | tee debian/hyprland-completions.substvars +# Don't call this use deb_create_watch.py below. conf_print_github_watch() { cat <<-EOF version=4 @@ -808,76 +815,105 @@ conf_print_hyprland_headers() { # chmod +x debian/install-headers.sh conf_print_hyprland_rules_1() { - cat <<-'EOF' - #!/usr/bin/make -f + cat <<'EOF' +#!/usr/bin/make -f - # Uncomment and adjust the following lines as needed - #export DH_VERBOSE = 1 - #export DEB_BUILD_MAINT_OPTIONS = hardening=+all - #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic - #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed +# Uncomment and adjust the following lines as needed +#export DH_VERBOSE = 1 +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed - %: - dh $@ --buildsystem=cmake+ninja +%: + dh $@ --buildsystem=cmake+ninja - override_dh_auto_configure: - dh_auto_configure -- \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)" \ - -DCMAKE_BUILD_TYPE:STRING=Release \ - -DNO_SYSTEMD=TRUE +override_dh_auto_configure: + dh_auto_configure -- \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)" \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DNO_SYSTEMD=TRUE - override_dh_auto_build: - dh_auto_build -- \ - -DCMAKE_BUILD_TYPE:STRING=Release \ - -DCMAKE_INSTALL_PREFIX:STRING=$(CURDIR)/debian/hyperland \ - -DLEGACY_RENDERER:BOOL=true \ - -S . -B ./build -G Ninja - EOF +override_dh_auto_build: + dh_auto_build -- \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DCMAKE_INSTALL_PREFIX:STRING=$(CURDIR)/debian/hyperland \ + -DLEGACY_RENDERER:BOOL=true \ + -S . -B ./build -G Ninja +EOF } # conf_print_hyprland_rules_1 | sudo tee debian/rules conf_print_hyprland_rules_2() { - cat <<-'EOF' - #!/usr/bin/make -f + cat <<'EOF' +#!/usr/bin/make -f - # Uncomment this to turn on verbose mode. - #export DH_VERBOSE=1 +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 - #%: - dh $@ --buildsystem=cmake +#%: + dh $@ --buildsystem=cmake - override_dh_auto_test: - if [ -f obj-x86_64-linux-gnu/build.ninja ] && grep -q 'test' obj-x86_64-linux-gnu/build.ninja; then \ - dh_auto_test; \ - else \ - echo "No tests found, skipping test phase."; \ - fi +override_dh_auto_test: + if [ -f obj-x86_64-linux-gnu/build.ninja ] && grep -q 'test' obj-x86_64-linux-gnu/build.ninja; then \ + dh_auto_test; \ + else \ + echo "No tests found, skipping test phase."; \ + fi - override_dh_auto_build: - meson setup build \ - --prefix=/usr \ - --libexecdir=lib \ - --sbindir=bin \ - --buildtype=release \ - --wrap-mode=nodownload \ - -Db_lto=true \ - -Db_pie=true \ - -Ddefault_library=shared \ - -Dxwayland=enabled \ - -Dsystemd=disabled && \ - meson compile -C build +override_dh_auto_build: + meson setup build \ + --prefix=/usr \ + --libexecdir=lib \ + --sbindir=bin \ + --buildtype=release \ + --wrap-mode=nodownload \ + -Db_lto=true \ + -Db_pie=true \ + -Ddefault_library=shared \ + -Dxwayland=enabled \ + -Dsystemd=disabled && \ + meson compile -C build - override_dh_auto_install: - meson install -C build \ - --destdir=$(CURDIR)/debian/hyprland \ - --skip-subprojects hyprland-protocols && \ - install -Dm0644 -t $(CURDIR)/debian/hyprland/usr/share/licenses/hyprland LICENSE && \ - ./debian/install.sh $(CURDIR) - EOF +override_dh_auto_install: + meson install -C build \ + --destdir=$(CURDIR)/debian/hyprland \ + --skip-subprojects hyprland-protocols && \ + install -Dm0644 -t $(CURDIR)/debian/hyprland/usr/share/licenses/hyprland LICENSE && \ + ./debian/install.sh $(CURDIR) +EOF } # conf_print_hyprland_rules_2 | sudo tee debian/rules +conf_print_hyprland_rules_3() { + cat <<'EOF' +#!/usr/bin/make -f +%: + dh $@ --builddirectory=build/ \ + --buildsystem=meson+ninja + +override_dh_auto_configure: +# meson subprojects update --reset + +# use either -Dbuildtype=release|debug or -Doptimisation= and -Ddebug= +override_dh_auto_build: + meson setup build \ + -Dwarning_level=2 \ + -Ddefault_library=static \ + -Dsystemd=disabled \ + -Dxwayland=enabled \ + -Dlegacy_renderer=enabled \ + -Doptimization=3 \ + -Ddebug=true + ninja -C build + +override_dh_auto_install: + ninja -C build install + dh_install +EOF +} +# conf_print_hyprland_rules_3 | sudo tee debian/rules + # debian/rules are Makefiles and requires tabs so '-EOF' breaks # the output of the heredoc. So hardleft for this one. conf_print_hyprland_rules() { @@ -886,7 +922,7 @@ conf_print_hyprland_rules() { PREFIX=$(CURDIR)/tmp/usr %: - dh $@ --buildsystem cmake+ninja --builddirectory=build + dh $@ --buildsystem=meson+ninja --builddirectory=build override_dh_auto_configure: dh_auto_configure -- --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DNO_SYSTEMD:STRING=true -DCMAKE_INSTALL_PREFIX:STRING=$(PREFIX) -S . @@ -983,17 +1019,16 @@ DEBIAN_BUILD_DEPS=( "ninja-build" "seatd" "wget" + "wayland-protocols" "util-linux" "vulkan-utility-libraries-dev" "xdg-desktop-portal-wlr" "xwayland" - "wayland-protocols" "libavcodec-dev" "libavformat-dev" "libavutil-dev" "libblkid-dev" "libdrm2" - "libdrm-dev" "libdisplay-info-bin" "libdisplay-info-dev" "libdisplay-info1" @@ -1030,8 +1065,6 @@ DEBIAN_BUILD_DEPS=( "libxkbcommon0" "libxcb-composite0-dev" "libxcb-dri3-dev" - # "libxcb-errors0" - # "libxcb-errors0-dev" "libxcb-ewmh2" "libxcb-ewmh-dev" "libxcb-icccm4-dev" @@ -1048,6 +1081,8 @@ DEBIAN_BUILD_DEPS=( "libxkbregistry-dev" "libxml2-dev" ) +# "libxcb-errors0" +# "libxcb-errors0-dev" sudo apt install -y "${DEBIAN_BUILD_DEPS[@]}" @@ -1196,9 +1231,10 @@ chmod +x debian/install-headers.sh # conf_print_hyprland_make_patch | sudo tee debian/patches/00-makefile.patch # conf_print_hyprland_make_series | sudo tee debian/patches/series -conf_print_hyprland_rules | sudo tee debian/rules +# conf_print_hyprland_rules | sudo tee debian/rules # conf_print_hyprland_rules_1 | sudo tee debian/rules # conf_print_hyprland_rules_2 | sudo tee debian/rules +conf_print_hyprland_rules_3 | sudo tee debian/rules #============================================================================== # Call the append function to add the build deps to the controlfile. @@ -1229,7 +1265,7 @@ sed -i \ # rm -rf $(CURDIR)/debian/hyprland/usr/share/xdg-desktop-portal && \ # https://salsa.debian.org/debian/debian-package-init/-/blob/master/deb_create_watch.py -# outputs to debian/watch/ With deb_create_watch.py in you path +# outputs to debian/watch/ With deb_create_watch.py in your path EXEC_PREFIX=${HOME}/.local/bin wget -c -O ${EXEC_PREFIX}/deb_create_watch.py https://salsa.debian.org/debian/debian-package-init/-/raw/master/deb_create_watch.py?inline=false @@ -1286,8 +1322,8 @@ git commit -m "Post gbp dch commit upstream changelog" #============================================================================== # Post patch / rebase commit. -git add debian/patches -git commit -m "Alter Makefile for Debian directory installation" +# git add debian/patches +# git commit -m "Alter Makefile for Debian directory installation" # AUR patch https://pastebin.com/7WPZ7ewq @@ -1346,7 +1382,8 @@ GITEA_URL="git2.ring-zero.co.uk" # GITEA_KEY="$(curl -fsSL https://${GITEA_URL}/api/packages/${GITEA_OWNER}/debian/repository.key | gpg --dearmor -q)" # sudo curl -fsSL https://${GITEA_URL}/api/packages/${GITEA_OWNER}/debian/repository.key | gpg --dearmor -q -o ${GITEA_KEY} -# sbuild called for an asc key file which is what gitea provides +# sbuild called for an asc key file which is what gitea provides, and puts it in: +# /etc/apt/trusted.gpg.d/sbuild-extra-repository-IDqCM94OpA.gpg # GITEA_KEY="/etc/apt/keyrings/gitea-cyteen.asc" GITEA_KEY="${BUILD_HOME}/gitea-cyteen.asc" @@ -1367,8 +1404,6 @@ GITEA_LIST="deb https://${GITEA_OWNER}:${GITEA_PASS}@${GITEA_URL}/api/packages/$ # echo "deb https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/debian {distribution} {component}" | sudo tee -a /etc/apt/sources.list.d/gitea.list # GITEA_LIST="deb https://${GITEA_OWNER}:${GITEA_PASS}@git2.ring-zero.co.uk/api/packages/${GITEA_OWNER}/debian ${GITEA_DIST} ${GITEA_COMP}" -# passes all options not starting with --git- to the builder. - # mimic the resolver behaviour used by the official buildds: # add experimental to unstable = see: https://wiki.debian.org/sbuild#CA-4db577cbb51eedbbe4205d14af637002f7fbb9c0_1 @@ -1377,7 +1412,37 @@ ASPCUD_CRITERIA='-count(solution,APT-Release:=/a=experimental/),-removed,-change # --build-dep-resolver=aspcud \ # --aspcud-criteria ${ASPCUD_CRITEREA} -DEPENDS="hyprcursor,hyprwayland-scanner,libxcb-util1,edid-decode,libblkid-dev,libdisplay-info1,libdisplay-info-bin,libdrm2,libelogind-dev,libgbm1,libgles2-mesa-dev,libinput10,libliftoff0,libpixman-1-0,libtomlplusplus3,libudev1,libvulkan1,libx11-xcb-dev,libxcb1,libxcb1-dev,libxcb-image0-dev,libxcb-render-util0,libxcb-util1,libxcb-util-dev,libxkbcommon0,util-linux,vulkan-utility-libraries-dev,wget" +DEPENDS="hyprland-protocols, \ + debhelper-compat, \ + edid-decode, \ + hyprwayland-scanner >=0.3.1, \ + jq, \ + pkg-config, \ + util-linux, \ + vulkan-utility-libraries-dev, \ + wget, \ + libblkid-dev, \ + libgbm1, \ + libhyprlang2, \ + libhyprlang-dev \ + libinput10, \ + libudev1, \ + libvulkan1, \ + libcap-dev, \ + libcairo2-dev, \ + libdisplay-info1, \ + libdisplay-info-bin, \ + libpng-dev, \ + libxcb-util1, \ + libxcb-util-dev, \ + libxcb-render0-dev, \ + libxcb-shm0-dev, \ + libxcb-xfixes0-dev, \ + " +# libwlroots-dev, \ + +# all options to gbp not starting with --git- to the builder, or add to GIT_BUIDLER +GIT_BUILDER='sbuild --arch-all --source --source-only-changes --verbose --dist=unstable' # --extra-package="${EXTRA_PACKAGES}" \ sudo gbp buildpackage \ @@ -1389,6 +1454,7 @@ sudo gbp buildpackage \ --git-ignore-branch \ --git-pristine-tar \ --git-submodules \ + --git-builder="${GIT_BUILDER}" \ --git-debian-branch="${DEBIAN_BRANCH}" \ --git-debian-tag="${DEBIAN_TAG}" \ --git-upstream-tag="${UPSTREAM_TAG}" \ @@ -1403,5 +1469,7 @@ sudo gbp buildpackage \ # Re-enter the session # sudo schroot -c session:unstable-amd64-sbuild-c57f64a1-ea97-4627-bbc4-2f9b03f45015 +# schroots are mounted under: /var/run/schroot/mount/ + # Stop the session -sudo schroot --end-session $(schroot -l --all | grep 'session:unstable-amd64-sbuild-' | awk '{print $1}') +# sudo schroot --end-session $(schroot -l --all | grep 'session:unstable-amd64-sbuild-' | awk '{print $1}') diff --git a/020_hyprlang.sh b/020_hyprlang.sh index c76a4b1..1f65bdf 100644 --- a/020_hyprlang.sh +++ b/020_hyprlang.sh @@ -38,12 +38,7 @@ git clone https://github.com/${USER}/${PROJECT}.git ${PACKAGE}-${VERSION} cd ${PACKAGE}-${VERSION} || exit # debianize the BUILD_HOME directory -dh_make \ - --createorig \ - --single \ - --native \ ---copyright ${LICENSE} \ - --yes +dh_make --createorig --single --native --copyright ${LICENSE} --yes # Customize the debian directory values sed -i "s,^\(Description: \).*,\1${DESCRIPTION}," debian/control diff --git a/020_kicad-nightly.sh b/020_kicad-nightly.sh index 0fe1294..38ed67d 100644 --- a/020_kicad-nightly.sh +++ b/020_kicad-nightly.sh @@ -1,30 +1,19 @@ - # https://forum.kicad.info/t/nightly-builds-for-debian-buster-and-bullseye/27487 -RELEASE=bookworm +RELEASE=trixie #RELEASE=sid -rm /etc/apt/sources.list-available/kicad_nightly-buster.list /etc/apt/sources.list-available/kicad_nightly-bullseye.list -rm /etc/apt/sources.list-available/kicad_nightly-buster.list /etc/apt/sources.list-available/kicad_nightly-buster.list -rm /etc/apt/sources.list.d/kicad_nightly-bullseye.list /etc/apt/sources.list.d/kicad_nightly-buster.list +# rm /etc/apt/sources.list-available/kicad_nightly-buster.list /etc/apt/sources.list-available/kicad_nightly-bullseye.list +# rm /etc/apt/sources.list-available/kicad_nightly-buster.list /etc/apt/sources.list-available/kicad_nightly-buster.list +# rm /etc/apt/sources.list.d/kicad_nightly-bullseye.list /etc/apt/sources.list.d/kicad_nightly-buster.list #echo "deb [arch=amd64] https://debian.sur5r.net/kicad-nightly buster main" | tee /etc/apt/sources.list-available/kicad_nightly-${RELEASE}.list ARCH="$(dpkg --print-architecture)" -KEY_DIR="/etc/apt/trusted.gpg.d/" -KEY=${KEY_DIR}/sur5r-keyring +KEY_DIR="/etc/apt/trusted.gpg.d" +KEY=${KEY_DIR}/sur5r-keyring.gpg -RECV_KEYS="E3CA1A89941C42E6 C3DE1DD4F661CDCB" -gpg --keyserver keyserver.ubuntu.com --recv-keys "${RECV_KEYS}" -gpg --export --armor "${RECV_KEYS}" > "${KEY}" - - -cat <<-EOF | tee /etc/apt/sources.list-available/kicad_nightly-${RELEASE}.list - deb [arch=${ARCH} signed-by=${KEY}] https://debian.sur5r.net/kicad-nightly ${RELEASE} main - deb-src [arch=${ARCH} signed-by=${KEY}] https://debian.sur5r.net/kicad-nightly ${RELEASE} main -EOF - -#ln -sf /etc/apt/sources.list-available/kicad_nightly-${RELEASE}.list /etc/apt/sources.list.d/kicad_nightly-${RELEASE}.list - -ln -sf /etc/apt/sources.list-available/kicad_nightly-${RELEASE}.list /etc/apt/sources.list.d/kicad_nightly-${RELEASE}.list +# RECV_KEYS="E3CA1A89941C42E6 C3DE1DD4F661CDCB" +# gpg --keyserver keyserver.ubuntu.com --recv-keys "${RECV_KEYS}" +# gpg --export --armor "${RECV_KEYS}" >"${KEY}" #The repository is signed by my debian.sur5r.net key, Fingerprint # @@ -37,23 +26,43 @@ ln -sf /etc/apt/sources.list-available/kicad_nightly-${RELEASE}.list /etc/apt/so # The easiest way to install the keyring from https://debian.sur5r.net/kicad-nightly/pool/main/s/sur5r-keyring/ beforehand is: # KEYDATE="2021.02.02" # KEYDATE="2021.02.17" -KEYDATE="2023.02.18" +# KEYDATE="2023.02.18" +KEYDATE="2024.03.04" -#/usr/lib/apt/apt-helper download-file https://debian.sur5r.net/kicad-nightly/pool/main/s/sur5r-keyring/sur5r-keyring_2021.02.02_all.deb sur5r-keyring.deb SHA256:cccfb1dd7d6b1b6a137bb96ea5b5eef18a0a4a6df1d6c0c37832025d2edaa710 -/usr/lib/apt/apt-helper download-file https://debian.sur5r.net/kicad-nightly/pool/main/s/sur5r-keyring/sur5r-keyring_${KEYDATE}_all.deb sur5r-keyring.deb +# /usr/lib/apt/apt-helper download-file https://debian.sur5r.net/i3/pool/main/s/sur5r-keyring/sur5r-keyring_2024.03.04_all.deb keyring.deb SHA256:f9bb4340b5ce0ded29b7e014ee9ce788006e9bbfe31e96c09b2118ab91fca734 +# /usr/lib/apt/apt-helper download-file https://debian.sur5r.net/kicad-nightly/pool/main/s/sur5r-keyring/sur5r-keyring_2021.02.02_all.deb sur5r-keyring.deb SHA256:cccfb1dd7d6b1b6a137bb96ea5b5eef18a0a4a6df1d6c0c37832025d2edaa710 +/usr/lib/apt/apt-helper download-file https://debian.sur5r.net/kicad-nightly/pool/main/s/sur5r-keyring/sur5r-keyring_${KEYDATE}_all.deb sur5r-keyring.deb +# /usr/lib/apt/apt-helper download-file https://debian.sur5r.net/sur5r-keyring/pool/main/s/sur5r-keyring/sur5r-keyring_${KEYDATE}_all.deb sur5r-keyring.deb dpkg -i ./sur5r-keyring.deb +# dpkg -S sur5r-keyring +# sur5r-keyring: /usr/share/doc/sur5r-keyring/copyright +# sur5r-keyring: /usr/share/doc/sur5r-keyring/changelog.gz +# sur5r-keyring: /etc/apt/trusted.gpg.d/sur5r-keyring.gpg +# sur5r-keyring: /usr/share/lintian/overrides/sur5r-keyring +# sur5r-keyring: /usr/share/keyrings/sur5r-keyring.gpg +# sur5r-keyring: /usr/share/doc/sur5r-keyring + +cat <<-EOF | tee /etc/apt/sources.list-available/kicad_nightly-${RELEASE}.list + deb [arch=${ARCH} signed-by=${KEY}] https://debian.sur5r.net/kicad-nightly ${RELEASE} main + deb-src [arch=${ARCH} signed-by=${KEY}] https://debian.sur5r.net/kicad-nightly ${RELEASE} main +EOF + +#ln -sf /etc/apt/sources.list-available/kicad_nightly-${RELEASE}.list /etc/apt/sources.list.d/kicad_nightly-${RELEASE}.list + +ln -sf /etc/apt/sources.list-available/kicad_nightly-${RELEASE}.list /etc/apt/sources.list.d/kicad_nightly-${RELEASE}.list + apt-get update apt-get install \ - kicad-nightly \ - kicad-nightly-demos \ - kicad-nightly-footprints \ - kicad-nightly-libraries \ - kicad-nightly-packages3d \ - kicad-nightly-symbols \ - kicad-nightly-templates \ + kicad-nightly \ + kicad-nightly-demos \ + kicad-nightly-footprints \ + kicad-nightly-libraries \ + kicad-nightly-packages3d \ + kicad-nightly-symbols \ + kicad-nightly-templates # -# Deps for spice and sycira (maxima) and spice +# Deps for spice and sycira (maxima) and spice # sudo apt-get install -y ngspice maxima wxmaxima libtinyxml2-6 libzip5 #mv /usr/share/kicad-nightly/templates/fp-lib-table ~/.config/kicad/7.0/ @@ -77,6 +86,6 @@ mkdir -p "${KICAD_SCRIPTS}" #git clone https://github.com/mitxela/kicad-round-tracks ${KICAD_SCRIPTS}/kicad-round-tracks # teardrop -#git clone -b kicad6 https://github.com/sekigon-gonnoc/kicad_scripts /tmp/kicad_scripts +#git clone -b kicad6 https://github.com/sekigon-gonnoc/kicad_scripts /tmp/kicad_scripts #cp -a /tmp/kicad_scripts/teardrops ${KICAD_SCRIPTS}/ #rm -rf /tmp/kicad_scripts diff --git a/020_matrix-synapse-server.sh b/020_matrix-synapse-server.sh index ad3c070..3a5b9b0 100755 --- a/020_matrix-synapse-server.sh +++ b/020_matrix-synapse-server.sh @@ -2,18 +2,17 @@ # Synapse is the reference Python/Twisted Matrix homeserver implementation. # -# Synapse is intended to showcase the concept of Matrix, and to let users run their own +# Synapse is intended to showcase the concept of Matrix, and to let users run their own # homeserver and generally help bootstrap the ecosystem. # -# Matrix is an open standard for interoperable, decentralised, real-time communication -# over IP. It can be used to power Instant Messaging, VoIP/WebRTC signalling, Internet of -# Things communication or anywhere where's a need for a standard HTTP API for publishing +# Matrix is an open standard for interoperable, decentralised, real-time communication +# over IP. It can be used to power Instant Messaging, VoIP/WebRTC signalling, Internet of +# Things communication or anywhere where's a need for a standard HTTP API for publishing # and subscribing to data whilst tracking the conversation history. # -# In Matrix, every user runs one or more Matrix clients, which connect through to a Matrix -# homeserver. The homeserver stores all their personal chat history and user account -# information, much as a mail client connects through to an IMAP/SMTP server. - +# In Matrix, every user runs one or more Matrix clients, which connect through to a Matrix +# homeserver. The homeserver stores all their personal chat history and user account +# information, much as a mail client connects through to an IMAP/SMTP server. #echo "build depends include dh-systemd, libsystemd-dev. Fix the package for devuan and submit to devuan." #exit 0 @@ -28,6 +27,5 @@ #sudo sh -c "echo 'deb [signed-by=${KEY_DIR}/matrix-org-archive-keyring.asc] https://packages.matrix.org/debian/ buster main' > /etc/apt/sources.list-available/matrix-synapse.list" #sudo sh -c "echo 'deb-src [signed-by=${KEY_DIR}/matrix-org-archive-keyring.asc] https://packages.matrix.org/debian/ buster main' >> /etc/apt/sources.list-available/matrix-synapse.list" #sudo apt update && apt install -y matrix-synapse-py3 -sudo apt-get install matrix-synapse +# sudo apt-get install matrix-synapse # sudo apt-get install matrix-synapse-ldap3 # allows synapse to use LDAP for authentication as opposed to usual authentication via registering using a matrix client. - diff --git a/020_pipewire.sh-WIP b/020_pipewire.sh-WIP index a9fa568..e888cfa 100644 --- a/020_pipewire.sh-WIP +++ b/020_pipewire.sh-WIP @@ -31,6 +31,7 @@ sudo apt-get install qpwgraph vlc-plugin-pipewire # Copy conffiles to /etc sudo cp -vRa /usr/share/pipewire /etc/ sudo cp -vRa /usr/share/wireplumber /etc/ +sudo mkdir -p /etc/pipewire/pipewire.conf.d sudo mkdir -p /etc/wireplumber/wireplumber.conf.d # WirePlumber has profile auto-switching enabled by default. It can @@ -103,28 +104,108 @@ conf_print_wireplumber_desktop() { } conf_print_wireplumber_desktop | sudo tee /etc/xdg/autostart/wireplumber.desktop -conf_print_pipewire_conf() { +# don't use this we make incremental changes to conf.d/.conf +# +# conf_print_pipewire_conf() { +# cat <<-EOF +# # PipeWire ALSA configuration +# context.properties = { +# # ALSA settings +# alsa.jack.device = "hw:0" +# alsa.jack.autoconnect = true +# alsa.jack.autoconnect-ports = true +# alsa.jack.latency = 100000 +# } +# EOF +#} +# conf_print_pipewire_conf | sudo tee /etc/pipewire/pipewire.conf + +# https://davejansen.com/disable-wireplumber-pipewire-suspend-on-idle-pops-delays-noise/ +conf_print_alsa_conf_suspend-timeout() { cat <<-EOF - # PipeWire ALSA configuration - context.properties = { - # ALSA settings - alsa.jack.device = "hw:0" - alsa.jack.autoconnect = true - alsa.jack.autoconnect-ports = true - alsa.jack.latency = 100000 + alsa_monitor.enabled = true + + alsa_monitor.properties = { + -- Your existing properties configuration + } + + alsa_monitor.rules = { + { + matches = { + { + -- This matches all cards. + { "device.name", "matches", "alsa_card.*" }, + }, + }, + apply_properties = { + -- Your existing apply_properties configuration + ["session.suspend-timeout-seconds"] = 0, -- Add this line + }, + }, + { + matches = { + { + -- Matches all sources. + { "node.name", "matches", "alsa_input.*" }, + }, + { + -- Matches all sinks. + { "node.name", "matches", "alsa_output.*" }, + }, + }, + apply_properties = { + -- Your existing apply_properties configuration + ["session.suspend-timeout-seconds"] = 0, -- Add this line + }, + }, } EOF } -# conf_print_pipewire_conf | sudo tee /etc/pipewire/pipewire.conf +conf_print_alsa_conf_suspend-timeout | sudo tee /etc/wireplumber/main.lua.d/60-alsa_suspend-timeout.conf + +# improved crackling in fullscreen +conf_print_pipewire_quantum() { + cat <<-EOF + conf_print_pipewire_quantum() { + default.clock.quantum = "32" + default.clock.min-quantum = "64" + default.clock.max-quantum = "768" + EOF +} +conf_print_pipewire_quantum | sudo tee /etc/pipewire/pipewire.conf.d/clock_quantum.conf + +# default.clock.allowed-rates = [ 44100 48000 96000 192000 ] +conf_print_pipewire_quantum() { + cat <<-EOF + default.clock.rate = 44100 + default.clock.allowed-rates = 44100 + default.clock.quantum = 512 + default.clock.min-quantum = 16 + default.clock.max-quantum = 2048 + default.clock.quantum-limit = 512 + settings.check-quantum = false + settings.check-rate = false + EOF +} +conf_print_pipewire_quantum | sudo tee /etc/pipewire/pipewire.conf.d/clock_quantum.conf + +conf_print_pipewire_alsa-api() { + cat <<-EOF + # See: https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Config-ALSA#alsa-buffer-properties + api.alsa.headroom = 1024 + api.alsa.period-size = 256 + EOF +} +conf_print_pipewire_alsa-api | sudo tee /etc/pipewire/pipewire.conf.d/alsa-api.conf conf_print_pipewire_clock-rate() { cat <<-EOF context.properties = { - default.clock.rate = 44100 + default.clock.rate = [ 44100 48000 ] } EOF } -# conf_print_pipewire_clock-rate | sudo tee /etc/pipewire/pipewire.conf.d/alsa-dmix.conf +conf_print_pipewire_clock-rate | sudo tee /etc/pipewire/pipewire.conf.d/alsa-dmix.conf conf_print_pipewire_alsa-dmix() { cat < /dev/null #sudo apt update #sudo apt install vertex-theme - - diff --git a/020_zsh_quickstart.sh b/020_zsh_quickstart.sh index 69c76e7..c455491 100755 --- a/020_zsh_quickstart.sh +++ b/020_zsh_quickstart.sh @@ -27,7 +27,7 @@ sudo apt install -y zsh nodejs zsh-theme-powerlevel9k git fonts-powerline powerl # There are insecure directories: /usr/local/share/zsh/site-functions # compaudit | xargs chmod g-w # compaudit 2>&1 | sed -n '1d; p' - + mkdir -p /usr/local/share/zsh/site-functions chmod g-w /usr/local/share/zsh/site-functions @@ -41,7 +41,6 @@ cd "${DEST}" || exit cp /var/tmp/automate/.p10k.zsh "${DEST}" chsh -s "$(which zsh)" "${USER}" - # Install zgenom plugin manager and zsh quickstart to get a default setup for zsh # .zgen-setup pulls zgenom automatically and puts it in .zqs-zgenom, plugins in .zgenom git clone https://github.com/unixorn/zsh-quickstart-kit "${DEST}"/zsh-quickstart-kit @@ -53,13 +52,11 @@ ln -rsf "${DEST}"/zsh-quickstart-kit/zsh/.zgen-setup "${DEST}"/.zgen-setup #ln -rsf ~/zsh-quickstart-kit/zsh/.zsh_completions ~/.zsh_completions mkdir -p "${DEST}"/"${ALIAS_DIR}" - touch "${DEST}"/.zshrc -echo "setopt PROMPT_SUBST" >> "${DEST}"/.zshrc +echo "setopt PROMPT_SUBST" >>"${DEST}"/.zshrc - -echo "NVIM_PYTHON_LOG_FILE=/var/tmp/nvim_python.log" >> "${DEST}"/"${ALIAS_DIR}"/008_nvim.zsh -echo "NVIM_PYTHON_LOG_LEVEL=DEBUG" >> "${DEST}"/"${ALIAS_DIR}"/008_nvim.zsh +echo "NVIM_PYTHON_LOG_FILE=/var/tmp/nvim_python.log" >>"${DEST}"/"${ALIAS_DIR}"/008_nvim.zsh +echo "NVIM_PYTHON_LOG_LEVEL=DEBUG" >>"${DEST}"/"${ALIAS_DIR}"/008_nvim.zsh sudo touch /var/tmp/nvim_python.log # fix path error in .zshrc @@ -67,10 +64,10 @@ sudo touch /var/tmp/nvim_python.log # debians locate db locate # sed -i 's,^\(export LOCATE_PATH=\).*,\1'/var/lib/mlocate/mlocate.db',' "${DEST}"/.zshrc -echo "export LOCATE_PATH=/var/lib/mlocate/mlocate.db" > "${DEST}"/"${ALIAS_DIR}"/005_locatedb.zsh +echo "export LOCATE_PATH=/var/lib/mlocate/mlocate.db" >"${DEST}"/"${ALIAS_DIR}"/005_locatedb.zsh # add plugins to the load-starter-plugin-list() function in ~/.zgen-setup ~/zsh-quickstart-kit/zsh/.zgen-setup -# FIXED: create a file named .zgen-local-plugins and add your zgenom load commands there. +# FIXED: create a file named .zgen-local-plugins and add your zgenom load commands there. # Don't forget to run `zgenom save` at the end of your .zgen-local-plugins file. # Warning: .zgen-local-plugins REPLACES the starter list setup, it doesn't add to it. @@ -78,9 +75,8 @@ echo "export LOCATE_PATH=/var/lib/mlocate/mlocate.db" > "${DEST}"/"${ALIAS_DIR}" sed -i -e "s|zgenom load srijanshetty/docker-zsh|# zgenom load srijanshetty/docker-zsh|" "${DEST}"/zsh-quickstart-kit/zsh/.zgen-setup #sed -i '/\# zgenom load srijanshetty\/docker-zsh/a\ \ zgenom load ohmyzsh plugins\/docker\n\ \ zgenom load ohmyzsh plugins\/docker-compose' "${DEST}"/zsh-quickstart-kit/zsh/.zgen-setup - # zsh quickstart created this file if missing expecting fzf to be installed in ${HOME} -# we have it installed via apt so the executables are in the path and the key-bindings +# we have it installed via apt so the executables are in the path and the key-bindings # and completitions are in examples fom the package. cat <<-EOF | sudo tee "${DEST}/.fzf.zsh" # Setup fzf @@ -181,8 +177,8 @@ cat <<-EOF | tee "${DEST}"/.zgen-local-plugins zgenom ohmyzsh plugins/osx fi - # pipx completitons - zgenom load thuandt/zsh-pipx + # pipx completitons + zgenom load thuandt/zsh-pipx # A set of shell functions to make it easy to install small apps and # utilities distributed with pip. @@ -214,9 +210,9 @@ cat <<-EOF | tee "${DEST}"/.zgen-local-plugins # Add Fish-like autosuggestions to your ZSH zgenom load zsh-users/zsh-autosuggestions - # Add support for python venv - zgenom load MichaelAquilina/zsh-autoswitch-virtualenv - zgenom load bckim92/zsh-autoswitch-conda + # Add support for autoswitching conda/python venv + # zgenom load MichaelAquilina/zsh-autoswitch-virtualenv + # zgenom load bckim92/zsh-autoswitch-conda # Add functional testing for zsh zgenom load olets/zsh-test-runner @@ -252,7 +248,7 @@ cat <<-EOF | tee "${DEST}"/.zgen-local-plugins ## plugins # zgenom load/path/to/super-secret-private-plugin - + # Load me last GENCOMPL_FPATH=\$HOME/.zsh/complete GENCOMPL_PY=python3 @@ -269,33 +265,31 @@ cat <<-EOF | tee "${DEST}"/"${ALIAS_DIR}"/001_quickstart-refresh.zsh unset "QUICKSTART_KIT_REFRESH_IN_DAYS" EOF -# -echo '# zgenom autoupdate' > "${DEST}"/"${ALIAS_DIR}"/001_zgenom-refresh.zsh - +# +echo '# zgenom autoupdate' >"${DEST}"/"${ALIAS_DIR}"/001_zgenom-refresh.zsh # oh-my-zsh disable update check -echo 'DISABLE_AUTO_UPDATE="true"' > "${DEST}"/"${ALIAS_DIR}"/001_auto-update-off.zsh +echo 'DISABLE_AUTO_UPDATE="true"' >"${DEST}"/"${ALIAS_DIR}"/001_auto-update-off.zsh # sed -i 's,^\(export LOCATE_PATH=\).*,\1'/var/lib/mlocate/mlocate.db',' ~/.zshrc # Use powerline-daemon to speedup the prompt. -echo 'powerline-daemon -q' > "${DEST}"/"${ALIAS_DIR}"/006_powerline-daemon.zsh - +echo 'powerline-daemon -q' >"${DEST}"/"${ALIAS_DIR}"/006_powerline-daemon.zsh sudo sed -i 's,^\(CHARMAP=\).*,\1'\"UTF-8\"',' /etc/default/console-setup # set theme for zsh cat <<-EOF | tee "${DEST}"/"${ALIAS_DIR}"/002_theme.zsh # https://zshthem.es/browse-zsh-themes/ - ZSH_THEME="agnoster" # powerline based theme + ZSH_THEME="agnoster" # powerline based theme #ZSH_THEME="3den" #ZSH_THEME="Pure" EOF # set colorize tool cat <<-EOF | tee "${DEST}"/"${ALIAS_DIR}"/003_colorize.zsh - ZSH_COLORIZE_TOOL="chroma" - ZSH_COLORIZE_CHROMA_FORMATTER=terminal256 + ZSH_COLORIZE_TOOL="chroma" + ZSH_COLORIZE_CHROMA_FORMATTER=terminal256 EOF # see also ZVM jeffreytse/zsh-vi-mode plugin @@ -310,7 +304,7 @@ cat <<-'EOF' | tee "${DEST}"/"${ALIAS_DIR}"/001_vi-mode.sh # # Change to Zsh's default readkey engine (default for zvm is NEX) # ZVM_READKEY_ENGINE=$ZVM_READKEY_ENGINE_ZLE - + # The plugin will auto execute this zvm_after_select_vi_mode function # function zvm_after_select_vi_mode() { # case $ZVM_MODE in @@ -338,7 +332,6 @@ cat <<-'EOF' | tee "${DEST}"/"${ALIAS_DIR}"/001_vi-mode.sh ZVM_OPPEND_MODE_CURSOR=$ZVM_CURSOR_UNDERLINE EOF - #git clone http://github.com/bhilburn/powerlevel9k.git "${DEST}"/.zgen/robbyrussell/ohmyzsh-master/themes/powerlevel9k ## add a separate zsh aliases directory @@ -360,10 +353,9 @@ cat <<-EOF | sudo tee -a "${DEST}"/.zshrc >/dev/null fi EOF - # tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value. -echo "# tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value." > "${DEST}"/"${ALIAS_DIR}"/002_sudo.zsh -echo 'alias sudo="sudo "' >> "${DEST}"/"${ALIAS_DIR}"/002_sudo.zsh +echo "# tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value." >"${DEST}"/"${ALIAS_DIR}"/002_sudo.zsh +echo 'alias sudo="sudo "' >>"${DEST}"/"${ALIAS_DIR}"/002_sudo.zsh cat <<-EOF | sudo tee "\${DEST}"/"\${ALIAS_DIR}"/003_py_aliases.zsh _py_version() { @@ -440,7 +432,7 @@ cat <<-EOF | sudo tee "${DEST}"/"${ALIAS_DIR}"/003_transfer.zsh echo "File \$file doesn't exists." return 1 fi - + if [ -d \$file ]; then # zip directory and transfer @@ -472,6 +464,5 @@ cat <<-EOF | sudo tee "${DEST}"/"${ALIAS_DIR}"/003_transfer.zsh } EOF - sudo chown -R root:root /usr/local/share/zsh/site-functions sudo chmod -R 755 /usr/local/share/zsh/site-functions diff --git a/conf-print_nvim-lazy-snippets.sh b/conf-print_nvim-lazy-snippets.sh index f3bf5d6..d208425 100644 --- a/conf-print_nvim-lazy-snippets.sh +++ b/conf-print_nvim-lazy-snippets.sh @@ -185,3 +185,534 @@ conf_print_nvim-lint-markdownlint() { } # conf_print_nvim-lint-markdownlint >"${LAZY_DEST}"/nvim-lint-markdownlint.lua + +# Turn off .vscode import in neoconf +# neoconf settings are found in ~/.config/nvim/neoconf.json +# defaults are in lua/neoconf/config.lua +conf_print_neoconf_json() { +cat < ~/.config/nvim/neoconf.json.tmp + mv ~/.config/nvim/neoconf.json.tmp ~/.config/nvim/neoconf.json +else + # If the file does not exist, create it with the new JSON snippet + conf_print_neoconf_json > ~/.config/nvim/neoconf.json +fi + +#============================================================================== +# vim-tmux-navigator.lua within the plugins folder of Lazyvim: +conf_print_tmux_navigator() { +cat <", "TmuxNavigatePrevious", desc = "Go to the previous pane" }, + { "", "TmuxNavigateLeft", desc = "Got to the left pane" }, + { "", "TmuxNavigateDown", desc = "Got to the down pane" }, + { "", "TmuxNavigateUp", desc = "Got to the up pane" }, + { "", "TmuxNavigateRight", desc = "Got to the right pane" }, + }, +} +EOF +} +conf_print_tmux_navigator | tee "${LAZY_DEST}/ns/vim-tmux-navigator.lua" +#============================================================================== +# Example with keymap override. + +# LazyVim overrides the keymaps, so only adding the keymaps in the +# plugin folder did not work and I had to explicitly add the keymaps outside the +# plugins in keymaps.lua. +# (e.g vim.keymap.set("n", "", ":TmuxNavigateDown", { silent = true })) + +conf_print_nvim-tmux() { +cat <", "NvimTmuxNavigateLeft", { silent = true }) +vim.keymap.set("n", "", "NvimTmuxNavigateDown", { silent = true }) +vim.keymap.set("n", "", "NvimTmuxNavigateUp", { silent = true }) +vim.keymap.set("n", "", "NvimTmuxNavigateRight", { silent = true }) +vim.keymap.set("n", "", "NvimTmuxNavigateLastActive", { silent = true }) +vim.keymap.set("n", "", "NvimTmuxNavigateNavigateNext", { silent = true }) +EOF +} +conf_print_nvim-tmux-keymap | tee -a "${LAZY_DEST}"/.config/nvim/lua/config/keymaps.lua + +~/.tmux.conf +conf_print_tmux_conf() { +cat <= 3.0" | bc)" = 1 ]' \ + "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'" + +bind-key -n 'C-Space' if-shell "$is_vim" 'send-keys C-Space' 'select-pane -t:.+' + +bind-key -T copy-mode-vi 'C-h' select-pane -L +bind-key -T copy-mode-vi 'C-j' select-pane -D +bind-key -T copy-mode-vi 'C-k' select-pane -U +bind-key -T copy-mode-vi 'C-l' select-pane -R +bind-key -T copy-mode-vi 'C-\' select-pane -l +bind-key -T copy-mode-vi 'C-Space' select-pane -t:.+ + + +# END FANCY STUFF <--------- + +set -g @plugin 'jimeh/tmux-themepack' +set -g @plugin 'tmux-plugins/tmux-resurrect' # persist tmux sessions after computer restart +set -g @plugin 'tmux-plugins/tmux-continuum' # automatically saves sessions for you every 15 minutes + +set -g @themepack 'powerline/default/cyan' + +set -g @resurrect-capture-pane-contents 'on' +set -g @continuum-restore 'on' + +# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) +run '~/.tmux/plugins/tpm/tpm' +EOF +} +# conf_print_tmux_conf | tee ${DEST}/.config/tmux/tmux.conf +#============================================================================== + + +# write a lazyvim spec for diffview +# do not lazy load, it's a library + +# https://github.com/sindrets/diffview. +# https://github.com/nvim-lua/plenary.nvim +# https://github.com/nvim-tree/nvim-web-devicons + +# return { + -- add symbols-outline + { + "sindrets/diffview.nvim", + cmd = "diffview", + keys = { { "cs", "SymbolsOutline", desc = "Symbols Outline" } }, + opts = { + -- add your options that should be passed to the setup() function here + position = "right", + }, + }, +} + +require("lazy").setup({ + { + "sindrets/diffview.nvim", + cmd = { + 'DiffviewOpen', + 'DiffviewFileHistory', + 'DiffviewClose', + 'DiffviewToggleFiles', + 'DiffviewFocusFiles', + 'DiffviewRefresh' + }, + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + }, + keys = { + { "dv", "DiffviewOpen", desc = "Open Diffview" }, + { "df", "DiffviewFileHistory", desc = "Show file history" }, + { "dc", "DiffviewClose", desc = "Close Diffview" }, + { "dt", "DiffviewToggleFiles", desc = "Toggle file list" }, + { "df", "DiffviewFocusFiles", desc = "Focus on file list" }, + { "dr", "DiffviewRefresh", desc = "Refresh Diffview" } + -- Add other keybindings as needed + } + config = function() + require("config.diffview") + end, + }, +}) + + + +use { + "sindrets/diffview.nvim", + requires = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + }, + after = "plenary.nvim", +} + +# packer + +ui['sindrets/diffview.nvim'] = { + config = conf.diffview, + requires = { + {'nvim-lua/plenary.nvim'}, + {'nvim-tree/nvim-web-devicons'}, + }. + after='plenary.nvim', + cmd = { + 'DiffviewOpen', + 'DiffviewFileHistory', + 'DiffviewClose', + 'DiffviewToggleFiles', + 'DiffviewFocusFiles', + 'DiffviewRefresh' + } +} + + config = function() + -- Lua +local cb = require'diffview.config'.diffview_callback + +require'diffview'.setup { + diff_binaries = false, -- Show diffs for binaries + enhanced_diff_hl = false, -- See ':h diffview-config-enhanced_diff_hl' + use_icons = true, -- Requires nvim-web-devicons + icons = { -- Only applies when use_icons is true. + folder_closed = "", + folder_open = "", + }, + signs = { + fold_closed = "", + fold_open = "", + }, + file_panel = { + position = "left", -- One of 'left', 'right', 'top', 'bottom' + width = 35, -- Only applies when position is 'left' or 'right' + height = 10, -- Only applies when position is 'top' or 'bottom' + listing_style = "tree", -- One of 'list' or 'tree' + tree_options = { -- Only applies when listing_style is 'tree' + flatten_dirs = true, -- Flatten dirs that only contain one single dir + folder_statuses = "only_folded", -- One of 'never', 'only_folded' or 'always'. + }, + }, + file_history_panel = { + position = "bottom", + width = 35, + height = 16, + log_options = { + max_count = 256, -- Limit the number of commits + follow = false, -- Follow renames (only for single file) + all = false, -- Include all refs under 'refs/' including HEAD + merges = false, -- List only merge commits + no_merges = false, -- List no merge commits + reverse = false, -- List commits in reverse order + }, + }, + default_args = { -- Default args prepended to the arg-list for the listed commands + DiffviewOpen = {}, + DiffviewFileHistory = {}, + }, + hooks = {}, -- See ':h diffview-config-hooks' + key_bindings = { + disable_defaults = false, -- Disable the default key bindings + -- The `view` bindings are active in the diff buffers, only when the current + -- tabpage is a Diffview. + view = { + [""] = cb("select_next_entry"), -- Open the diff for the next file + [""] = cb("select_prev_entry"), -- Open the diff for the previous file + ["gf"] = cb("goto_file"), -- Open the file in a new split in previous tabpage + [""] = cb("goto_file_split"), -- Open the file in a new split + ["gf"] = cb("goto_file_tab"), -- Open the file in a new tabpage + ["e"] = cb("focus_files"), -- Bring focus to the files panel + ["b"] = cb("toggle_files"), -- Toggle the files panel. + }, + file_panel = { + ["j"] = cb("next_entry"), -- Bring the cursor to the next file entry + [""] = cb("next_entry"), + ["k"] = cb("prev_entry"), -- Bring the cursor to the previous file entry. + [""] = cb("prev_entry"), + [""] = cb("select_entry"), -- Open the diff for the selected entry. + ["o"] = cb("select_entry"), + ["<2-LeftMouse>"] = cb("select_entry"), + ["-"] = cb("toggle_stage_entry"), -- Stage / unstage the selected entry. + ["S"] = cb("stage_all"), -- Stage all entries. + ["U"] = cb("unstage_all"), -- Unstage all entries. + ["X"] = cb("restore_entry"), -- Restore entry to the state on the left side. + ["R"] = cb("refresh_files"), -- Update stats and entries in the file list. + [""] = cb("select_next_entry"), + [""] = cb("select_prev_entry"), + ["gf"] = cb("goto_file"), + [""] = cb("goto_file_split"), + ["gf"] = cb("goto_file_tab"), + ["i"] = cb("listing_style"), -- Toggle between 'list' and 'tree' views + ["f"] = cb("toggle_flatten_dirs"), -- Flatten empty subdirectories in tree listing style. + ["e"] = cb("focus_files"), + ["b"] = cb("toggle_files"), + }, + file_history_panel = { + ["g!"] = cb("options"), -- Open the option panel + [""] = cb("open_in_diffview"), -- Open the entry under the cursor in a diffview + ["y"] = cb("copy_hash"), -- Copy the commit hash of the entry under the cursor + ["zR"] = cb("open_all_folds"), + ["zM"] = cb("close_all_folds"), + ["j"] = cb("next_entry"), + [""] = cb("next_entry"), + ["k"] = cb("prev_entry"), + [""] = cb("prev_entry"), + [""] = cb("select_entry"), + ["o"] = cb("select_entry"), + ["<2-LeftMouse>"] = cb("select_entry"), + [""] = cb("select_next_entry"), + [""] = cb("select_prev_entry"), + ["gf"] = cb("goto_file"), + [""] = cb("goto_file_split"), + ["gf"] = cb("goto_file_tab"), + ["e"] = cb("focus_files"), + ["b"] = cb("toggle_files"), + }, + option_panel = { + [""] = cb("select"), + ["q"] = cb("close"), + }, + }, +} + end +} + + +#============================================================================== +# To combine the Packer configuration for sindrets/diffview.nvim with the +# provided Lua configuration for diffview, +#============================================================================== +use { + 'sindrets/diffview.nvim', + config = function() + -- Lua + local cb = require'diffview.config'.diffview_callback + + require'diffview'.setup { + diff_binaries = false, -- Show diffs for binaries + enhanced_diff_hl = false, -- See ':h diffview-config-enhanced_diff_hl' + use_icons = true, -- Requires nvim-web-devicons + icons = { -- Only applies when use_icons is true. + folder_closed = "", + folder_open = "", + }, + signs = { + fold_closed = "", + fold_open = "", + }, + file_panel = { + position = "left", -- One of 'left', 'right', 'top', 'bottom' + width = 35, -- Only applies when position is 'left' or 'right' + height = 10, -- Only applies when position is 'top' or 'bottom' + listing_style = "tree", -- One of 'list' or 'tree' + tree_options = { -- Only applies when listing_style is 'tree' + flatten_dirs = true, -- Flatten dirs that only contain one single dir + folder_statuses = "only_folded", -- One of 'never', 'only_folded' or 'always'. + }, + }, + file_history_panel = { + position = "bottom", + width = 35, + height = 16, + log_options = { + max_count = 256, -- Limit the number of commits + follow = false, -- Follow renames (only for single file) + all = false, -- Include all refs under 'refs/' including HEAD + merges = false, -- List only merge commits + no_merges = false, -- List no merge commits + reverse = false, -- List commits in reverse order + }, + }, + default_args = { -- Default args prepended to the arg-list for the listed commands + DiffviewOpen = {}, + DiffviewFileHistory = {}, + }, + hooks = {}, -- See ':h diffview-config-hooks' + key_bindings = { + disable_defaults = false, -- Disable the default key bindings + -- The `view` bindings are active in the diff buffers, only when the current + -- tabpage is a Diffview. + view = { + [""] = cb("select_next_entry"), -- Open the diff for the next file + [""] = cb("select_prev_entry"), -- Open the diff for the previous file + ["gf"] = cb("goto_file"), -- Open the file in a new split in previous tabpage + [""] = cb("goto_file_split"), -- Open the file in a new split + ["gf"] = cb("goto_file_tab"), -- Open the file in a new tabpage + ["e"] = cb("focus_files"), -- Bring focus to the files panel + ["b"] = cb("toggle_files"), -- Toggle the files panel. + }, + file_panel = { + ["j"] = cb("next_entry"), -- Bring the cursor to the next file entry + [""] = cb("next_entry"), + ["k"] = cb("prev_entry"), -- Bring the cursor to the previous file entry. + [""] = cb("prev_entry"), + [""] = cb("select_entry"), -- Open the diff for the selected entry. + ["o"] = cb("select_entry"), + ["<2-LeftMouse>"] = cb("select_entry"), + ["-"] = cb("toggle_stage_entry"), -- Stage / unstage the selected entry. + ["S"] = cb("stage_all"), -- Stage all entries. + ["U"] = cb("unstage_all"), -- Unstage all entries. + ["X"] = cb("restore_entry"), -- Restore entry to the state on the left side. + ["R"] = cb("refresh_files"), -- Update stats and entries in the file list. + [""] = cb("select_next_entry"), + [""] = cb("select_prev_entry"), + ["gf"] = cb("goto_file"), + [""] = cb("goto_file_split"), + ["gf"] = cb("goto_file_tab"), + ["i"] = cb("listing_style"), -- Toggle between 'list' and 'tree' views + ["f"] = cb("toggle_flatten_dirs"), -- Flatten empty subdirectories in tree listing style. + ["e"] = cb("focus_files"), + ["b"] = cb("toggle_files"), + }, + file_history_panel = { + ["g!"] = cb("options"), -- Open the option panel + [""] = cb("open_in_diffview"), -- Open the entry under the cursor in a diffview + ["y"] = cb("copy_hash"), -- Copy the commit hash of the entry under the cursor + ["zR"] = cb("open_all_folds"), + ["zM"] = cb("close_all_folds"), + ["j"] = cb("next_entry"), + [""] = cb("next_entry"), + ["k"] = cb("prev_entry"), + [""] = cb("prev_entry"), + [""] = cb("select_entry"), + ["o"] = cb("select_entry"), + ["<2-LeftMouse>"] = cb("select_entry"), + [""] = cb("select_next_entry"), + [""] = cb("select_prev_entry"), + ["gf"] = cb("goto_file"), + [""] = cb("goto_file_split"), + ["gf"] = cb("goto_file_tab"), + ["e"] = cb("focus_files"), + ["b"] = cb("toggle_files"), + }, + option_panel = { + [""] = cb("select"), + ["q"] = cb("close"), + }, + }, + } + end, + requires = { + {'nvim-lua/plenary.nvim'}, + {'nvim-tree/nvim-web-devicons'}, + }, + after='plenary.nvim', + cmd = { + 'DiffviewOpen', + 'DiffviewFileHistory', + 'DiffviewClose', + 'DiffviewToggleFiles', + 'DiffviewFocusFiles', + 'DiffviewRefresh' + } +} +#============================================================================== + +local diffview = require('diffview') + +local custom_diff_view = diffview.CDiffView({ + git_toplevel = '/path/to/git/repo', + left = 'HEAD', + right = 'HEAD~1', + files = { + working = { + {path = 'file1.txt', status = 'M'}, + {path = 'file2.txt', status = 'A'}, + }, + }, +}) + +-- Example command to open the options panel +vim.api.nvim_set_keymap('n', 'o', 'DiffviewOpenOptions', {noremap = true, silent = true}) + +-- Example command to navigate to the next conflict +vim.api.nvim_set_keymap('n', 'c', 'DiffviewNextConflict', {noremap = true, silent = true}) + +-- Example help command +vim.api.nvim_set_keymap('n', 'h', 'DiffviewHelp', {noremap = true, silent = true}) + diff --git a/generate-conf_print.sh b/generate-conf_print.sh deleted file mode 100644 index ce15759..0000000 --- a/generate-conf_print.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -set -x - -# Function to check if a directory exists and create it if not -ensure_directory_exists() { - local dir_path="$1" - local output_file="$2" - - echo "*** adding mkdir -p $dir_path to the conf_print file" - echo -e "\nmkdir -p debian/$(basename $dir_path)\n" >>"$output_file" - - echo "calling generate_functions() on $dir_path" - generate_functions "$dir_path" "$output_file" -} - -# Function to generate functions for text files in a directory -generate_functions() { - local directory=$1 - local output_file=$2 - - for item in "$directory"/*; do - if [ -d "$item" ]; then - # If the item is a directory, recursively call generate_functions on it - ensure_directory_exists "$item" "$output_file" - elif [ -f "$item" ]; then - # If the item is a file, proceed with generating functions as before - local filename=$(basename "$item" .txt) - local function_name="conf_print_$(echo "$filename" | tr -c '[:alnum:]' '_')" - - local heredoc=$( - cat <<-FOE - - $function_name() { - cat <<-'EOF' - $(cat "$item") - EOF - } - FOE - ) - echo "$heredoc" >>"$output_file" - echo "# $function_name | tee $directory/$filename >/dev/null" >>"$output_file" - fi - done -} - -# Main script execution -if [ "$#" -ne 2 ]; then - echo "Usage: $0 " - exit 1 -fi - -directory=$1 -output_file=$2 - -# Generate functions for the directory -generate_functions "$directory" "$output_file" - -echo "Functions generated and appended to $output_file" diff --git a/update_deb_from_dsc.sh b/update_deb_from_dsc.sh index b15f802..9312238 100644 --- a/update_deb_from_dsc.sh +++ b/update_deb_from_dsc.sh @@ -5,7 +5,8 @@ # Function to display usage information usage() { echo "Usage: $(basename $0) -p -b " - echo " -p Project name (e.g., kislyuk/yq)" + echo " -p Project name (e.g., kislyuk/yq)" or + echo " -d file" echo " -b Build directory" exit 1 } @@ -19,6 +20,9 @@ while getopts ":p:b:" opt; do b) BUILDDIR=$OPTARG ;; + d) + DSC_FILE=$OPTARG + ;; \?) usage ;; @@ -30,10 +34,10 @@ while getopts ":p:b:" opt; do done shift $((OPTIND - 1)) -# Check if project name and build directory are provided -if [ -z "$PROJECT_NAME" ] || [ -z "$BUILDDIR" ]; then - usage -fi +# Check if project name or dsc file and build directory are provided +# if [[ -z "$PROJECT_NAME" ] || [ -z "$BUILDDIR" ]] | [[ -z "$DSC_FILE" ] || [ -z "$BUILDDIR" ]] ; then +# usage +# fi # Install necessary tools # sudo apt install -y git-buildpackage equivs diff --git a/utils/delete-deb-to-gitea.sh b/utils/delete-deb-to-gitea.sh new file mode 100644 index 0000000..f36a64e --- /dev/null +++ b/utils/delete-deb-to-gitea.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash + +USERNAME="cyteen" +PASSWORD="mlpfinsonik" +DISTRIBUTION="ceres" +COMPONENT="main" +ARCH=$(dpkg --print-architecture) + +# Function to delete a package +delete_package() { + local PACKAGE_NAME=$1 + local PACKAGE_VERSION=$2 + local ARCHITECTURE=${3} + + # Construct the GITEA URL for deletion + GITEA_DELETE_URL="https://git2.ring-zero.co.uk/api/packages/${USERNAME}/debian/pool/${DISTRIBUTION}/${COMPONENT}/${PACKAGE_NAME}/${PACKAGE_VERSION}/${ARCHITECTURE}" + + # Perform the DELETE request + curl --user ${USERNAME}:${PASSWORD} -X DELETE ${GITEA_DELETE_URL} + + echo "Deleted ${PACKAGE_NAME}-${PACKAGE_VERSION}-${ARCHITECTURE} from the repository." +} + +# local ARCHITECTURE="${DEB_FILE%.*}" # Assuming DEB_FILE is defined and contains the package name and version + +# Check if both package name and version were provided as arguments +if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then + echo "Usage: $0 " + exit 1 +fi + +PACKAGE="$1" +VERSION="$2" +ARCH="$3" + +echo "PACKAGE: ${PACKAGE}" +echo "VERSION: ${VERSION}" +echo "ARCH: ${ARCH}" + +echo ${GITEA_URL} + +# Use the constructed URL in the curl command to delete the specified package version +curl --user ${USERNAME}:${PASSWORD} \ + -X DELETE \ + -H 'accept: application/json' \ + "${GITEA_URL}" + +# Show available packages +curl -s --url https://cyteen:mlpfinsonik@git2.ring-zero.co.uk/api/v1/packages/cyteen/ | jq '.[] | select(.type == "debian") | {type, name, version, html_url, created_at}' diff --git a/utils/delete-deb-to-gitea2.sh b/utils/delete-deb-to-gitea2.sh new file mode 100644 index 0000000..b717e3e --- /dev/null +++ b/utils/delete-deb-to-gitea2.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash +set -x + +USERNAME="cyteen" +PASSWORD="mlpfinsonik" +DISTRIBUTION="ceres" +COMPONENT="main" +# ARCH=$(dpkg --print-architecture) + +# Function to delete a package +delete_package() { + local PACKAGE_NAME=$1 + local PACKAGE_VERSION=$2 + local ARCHITECTURE=${3} + + # Construct the GITEA URL for deletion + GITEA_DELETE_URL="https://git2.ring-zero.co.uk/api/packages/${USERNAME}/debian/pool/${DISTRIBUTION}/${COMPONENT}/${PACKAGE_NAME}/${PACKAGE_VERSION}/${ARCHITECTURE}" + + # Perform the DELETE request + curl --user ${USERNAME}:${PASSWORD} \ + -X DELETE \ + ${GITEA_DELETE_URL} + + echo "Deleted ${PACKAGE_NAME}-${PACKAGE_VERSION}-${ARCHITECTURE} from the repository." +} + +# local ARCHITECTURE="${DEB_FILE%.*}" # Assuming DEB_FILE is defined and contains the package name and version + +# Check if both package name and version were provided as arguments +if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then + echo "Usage: $0 " + exit 1 +fi + +PACKAGE="$1" +VERSION="$2" +ARCH="$3" + +echo "PACKAGE: ${PACKAGE}" +echo "VERSION: ${VERSION}" +echo "ARCH: ${ARCH}" + +echo ${GITEA_URL} + +# Call the delete fuanction +delete_package ${PACKAGE} ${VERSION} ${ARCH} + +# Show available packages +curl -s --url https://cyteen:mlpfinsonik@git2.ring-zero.co.uk/api/v1/packages/cyteen/ | jq '.[] | select(.type == "debian") | {type, name, version, html_url, created_at}' diff --git a/utils/delete-list-deb-to-gitea.sh b/utils/delete-list-deb-to-gitea.sh new file mode 100644 index 0000000..635a2a3 --- /dev/null +++ b/utils/delete-list-deb-to-gitea.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +USERNAME="cyteen" +PASSWORD="mlpfinsonik" +# RELEASE="unstable" +# RELEASE="excalibur" +RELEASE="ceres" +COMPONENT="main" +ARCH=$(dpkg --print-architecture) + +declare -A DEBS + +# DEBS["libhyprlang2"]="0.5.1" +# DEBS["libhyprlang2-dbgsym"]="0.5.1" +# DEBS["libhyprlang2-dev"]="0.5.1" +DEBS["hyprwayland-scanner"]="0.1.0" + +for key in "${!DEBS[@]}"; do + PACKAGE="${key}" + VERSION="${DEBS[$key]}" + + echo "PACKAGE: ${PACKAGE}" + echo "VERSION: ${VERSION}" + + # Construct the URL for each package within the loop + # GITEA_URL="https://git2.ring-zero.co.uk/api/v1/packages/${USERNAME}/debian/pools/${RELEASE}/${COMPONENT}/${PACKAGE}/${VERSION}/${ARCH}" + GITEA_URL="https://git2.ring-zero.co.uk/api/v1/packages/${USERNAME}/debian/${PACKAGE}/${VERSION}" + + echo ${GITEA_URL} + # Use the constructed URL in the curl command + curl --user ${USERNAME}:${PASSWORD} \ + -X DELETE \ + -H 'accept: application/json' \ + "${GITEA_URL}" +done + +# show available packages +curl -s --url https://cyteen:mlpfinsonik@git2.ring-zero.co.uk/api/v1/packages/cyteen/ | jq '.[] | select(.type == "debian") | {type, name, version, html_url, created_at}' diff --git a/utils/push-deb-to-gitea.sh b/utils/push-deb-to-gitea.sh new file mode 100644 index 0000000..aed0e6a --- /dev/null +++ b/utils/push-deb-to-gitea.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +USERNAME="cyteen" +PASSWORD="mlpfinsonik" +DISTRIBUTION="ceres" +COMPONENT="main" +GITEA_URL="https://git2.ring-zero.co.uk/api/packages/${USERNAME}/debian/pool/${DISTRIBUTION}/${COMPONENT}/upload" + +# Check if a .deb file was provided as an argument +if [ -z "$1" ]; then + echo "Usage: $0 " + exit 1 +fi + +DEB_FILE="$1" + +# Upload the specified .deb file +curl \ + --user ${USERNAME}:${PASSWORD} \ + --upload-file ./${DEB_FILE} \ + ${GITEA_URL} + +echo "See: automate/020_gitea_dpr.sh for sources.list creation." +echo "deb [signed-by=\${KEYRING}] https://${USERNAME}:${PASSWORD}@https://git2.ring-zero.co.uk/api/packages/${USERNAME}/debian ${DISTRIBUTION} ${COMPONENT}" + +# Show available packages +curl -s --url https://cyteen:mlpfinsonik@git2.ring-zero.co.uk/api/v1/packages/cyteen/ | jq '.[] | select(.type == "debian") | {type, name, version, html_url, created_at}' diff --git a/utils/push-deb-to-gitea2.sh b/utils/push-deb-to-gitea2.sh new file mode 100644 index 0000000..ec67948 --- /dev/null +++ b/utils/push-deb-to-gitea2.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +set -x + +USERNAME="cyteen" +PASSWORD="mlpfinsonik" +DISTRIBUTION="ceres" +COMPONENT="main" + +# Extract the architecture from the filename +DEB_FILE="$1" +ARCHITECTURE="${DEB_FILE%.*}" # Remove the.deb extension to get the architecture + +# Validate the architecture +if [[ $ARCHITECTURE =~ ^(amd64|arm64)$ ]]; then + echo "Invalid architecture. Must be either amd64 or arm64." + exit 1 +fi + +# Construct the GITEA URL based on the architecture +GITEA_URL="https://git2.ring-zero.co.uk/api/packages/${USERNAME}/debian/pool/${DISTRIBUTION}/${COMPONENT}/upload/${ARCHITECTURE}" + +# Upload the specified.deb file +curl \ + --user ${USERNAME}:${PASSWORD} \ + --upload-file "${DEB_FILE}" \ + ${GITEA_URL} + +# echo "See: automate/020_gitea_dpr.sh for sources.list creation." +# echo "deb [signed-by=\${KEYRING}] https://${USERNAME}:${PASSWORD}@https://git2.ring-zero.co.uk/api/packages/${USERNAME}/debian ${DISTRIBUTION} ${COMPONENT}" + +# Show available packages +# curl -s --url https://cyteen:mlpfinsonik@git2.ring-zero.co.uk/api/v1/packages/cyteen/ | jq '.[] | select(.type == "debian") | {type, name, version, html_url, created_at}' diff --git a/utils/push-list-deb-to-gitea.sh b/utils/push-list-deb-to-gitea.sh new file mode 100644 index 0000000..e1ce2de --- /dev/null +++ b/utils/push-list-deb-to-gitea.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +USERNAME="cyteen" +PASSWORD="mlpfinsonik" +# DISTRIBUTION="unstable" +# DISTRIBUTION="excalibur" +DISTRIBUTION="ceres" +COMPONENT="main" +GITEA_URL="https://git2.ring-zero.co.uk/api/packages/${USERNAME}/debian/pool/${DISTRIBUTION}/${COMPONENT}/upload" +DEBS=( + "wayland-protocols_1.36-0devuan1_all.deb" + "hyprland-protocols_0.2_amd64.deb" + "hyprcursor_0.1.7_amd64.deb" + "hyprwayland-scanner_0.1.0_amd64.deb" + "libhyprlang2_0.5.1-0devuan1_amd64.deb" + "libhyprlang2-dbgsym_0.5.1-0devuan1_amd64.deb" + "libhyprlang-dev_0.5.1-0devuan1_amd64.deb" +) + +for DEB_FILE in "${DEBS}"; do + curl --user ${USERNAME}:${PASSWORD} \ + --upload-file ./${DEB_FILE} \ + ${GITEA_URL} +done + +echo "See: automate/020_gitea_dpr.sh for sources.list creation." +echo "deb [signed-by=\${KEYRING}] https://${USERNAME}:${PASSWORD}@https://git2.ring-zero.co.uk/api/packages/${USERNAME}/debian ${DISTRIBUTION} ${COMPONENT}" + +# show available packages +curl -s --url https://cyteen:mlpfinsonik@git2.ring-zero.co.uk/api/v1/packages/cyteen/ | jq '.[] | select(.type == "debian") | {type, name, version, html_url, created_at}'