diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-02-29 14:26:50 +0100 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-02-29 14:26:50 +0100 |
commit | c16799693cb6d780f258833689a6d312506093bb (patch) | |
tree | f11e3ba72e632269160275f1c3c36d170fb81a62 /bin | |
parent | da998b5c857aef8903bf791b4e41966cf230562c (diff) | |
parent | 8ab76a9ebf8414c720f13bd0aaaa2e6452ff753b (diff) |
Merge branch 'main' of debuc.com:dotfiles
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/common/sshpass | 6 | ||||
-rwxr-xr-x | bin/common/ytlink | 2 | ||||
-rwxr-xr-x | bin/extra/aivpn | 17 | ||||
-rwxr-xr-x | bin/extra/p.sh | 657 | ||||
-rwxr-xr-x | bin/guiscripts/sturl | 2 | ||||
-rwxr-xr-x | bin/menuscripts/mpower | 4 |
6 files changed, 672 insertions, 16 deletions
diff --git a/bin/common/sshpass b/bin/common/sshpass new file mode 100755 index 0000000..71f8e93 --- /dev/null +++ b/bin/common/sshpass @@ -0,0 +1,6 @@ +#!/bin/sh +if [ "$PASSWORD" ] +then + pass show "$PASSWORD" && exit + exit 1 +fi diff --git a/bin/common/ytlink b/bin/common/ytlink index a5e9bf0..48be9cf 100755 --- a/bin/common/ytlink +++ b/bin/common/ytlink @@ -8,6 +8,8 @@ inp="$1" [ "${inp:=$(clipo)}" ] || inp="$(cat /dev/stdin)" +# if link is http://127.0.0.1:9010/https://www.youtube.com/watch?v=7KpxsqwNF0o +inp="${inp#*/https://}" # remove util scheme inp="${inp#*//}" inp="https://youtube.com/${inp#*/}" diff --git a/bin/extra/aivpn b/bin/extra/aivpn index 3c87ce8..aab90a8 100755 --- a/bin/extra/aivpn +++ b/bin/extra/aivpn @@ -4,27 +4,18 @@ logn() { printf "%s\n" "$@"; } if [ "$1" = "-k" ] then - pgrep -f -- "ssh.*-L.*vm" | - xargs kill + pgrep -f -- "ssh.*-L.*vm" | xargs kill exit fi -# For when script calls itself -if [ "$PASSWORD" ] -then - pass show "$PASSWORD" && - exit - exit 1 -fi - keyadd ehb/ai -export SSH_ASKPASS="$0" +export SSH_ASKPASS="sshpass" export SSH_ASKPASS_REQUIRE="prefer" -export PASSWORD=zot/qemu +export PASSWORD="zot/qemu" logn "I: Waiting for connectivity..." -while ! ssh -o ConnectTimeout=1 -o BatchMode=yes vm 2>&1 | grep -q "Permission denied" +while ! ssh -o ConnectTimeout=1 -o BatchMode=yes vm 2>&1 | grep "Permission denied" > /dev/null do sleep 1 done diff --git a/bin/extra/p.sh b/bin/extra/p.sh index 010ae0c..98f8ede 100755 --- a/bin/extra/p.sh +++ b/bin/extra/p.sh @@ -1,6 +1,661 @@ #!/bin/sh -ask_pokemon() { commander -xc < ./pokemon_bw.txt; } +list_pokemon() +{ + cat <<EOF +Bulbasaur +Ivysaur +Venusaur +Charmander +Charmeleon +Charizard +Squirtle +Wartortle +Blastoise +Caterpie +Metapod +Butterfree +Weedle +Kakuna +Beedrill +Pidgey +Pidgeotto +Pidgeot +Rattata +Raticate +Spearow +Fearow +Ekans +Arbok +Pikachu +Raichu +Sandshrew +Sandslash +Nidoran♀ +Nidorina +Nidoqueen +Nidoran♂ +Nidorino +Nidoking +Clefairy +Clefable +Vulpix +Ninetales +Jigglypuff +Wigglytuff +Zubat +Golbat +Oddish +Gloom +Vileplume +Paras +Parasect +Venonat +Venomoth +Diglett +Dugtrio +Meowth +Persian +Psyduck +Golduck +Mankey +Primeape +Growlithe +Arcanine +Poliwag +Poliwhirl +Poliwrath +Abra +Kadabra +Alakazam +Machop +Machoke +Machamp +Bellsprout +Weepinbell +Victreebel +Tentacool +Tentacruel +Geodude +Graveler +Golem +Ponyta +Rapidash +Slowpoke +Slowbro +Magnemite +Magneton +Farfetch'd +Doduo +Dodrio +Seel +Dewgong +Grimer +Muk +Shellder +Cloyster +Gastly +Haunter +Gengar +Onix +Drowzee +Hypno +Krabby +Kingler +Voltorb +Electrode +Exeggcute +Exeggutor +Cubone +Marowak +Hitmonlee +Hitmonchan +Lickitung +Koffing +Weezing +Rhyhorn +Rhydon +Chansey +Tangela +Kangaskhan +Horsea +Seadra +Goldeen +Seaking +Staryu +Starmie +Mr. Mime +Scyther +Jynx +Electabuzz +Magmar +Pinsir +Tauros +Magikarp +Gyarados +Lapras +Ditto +Eevee +Vaporeon +Jolteon +Flareon +Porygon +Omanyte +Omastar +Kabuto +Kabutops +Aerodactyl +Snorlax +Articuno +Zapdos +Moltres +Dratini +Dragonair +Dragonite +Mewtwo +Mew +Chikorita +Bayleef +Meganium +Cyndaquil +Quilava +Typhlosion +Totodile +Croconaw +Feraligatr +Sentret +Furret +Hoothoot +Noctowl +Ledyba +Ledian +Spinarak +Ariados +Crobat +Chinchou +Lanturn +Pichu +Cleffa +Igglybuff +Togepi +Togetic +Natu +Xatu +Mareep +Flaaffy +Ampharos +Bellossom +Marill +Azumarill +Sudowoodo +Politoed +Hoppip +Skiploom +Jumpluff +Aipom +Sunkern +Sunflora +Yanma +Wooper +Quagsire +Espeon +Umbreon +Murkrow +Slowking +Misdreavus +Unown +Wobbuffet +Girafarig +Pineco +Forretress +Dunsparce +Gligar +Steelix +Snubbull +Granbull +Qwilfish +Scizor +Shuckle +Heracross +Sneasel +Teddiursa +Ursaring +Slugma +Magcargo +Swinub +Piloswine +Corsola +Remoraid +Octillery +Delibird +Mantine +Skarmory +Houndour +Houndoom +Kingdra +Phanpy +Donphan +Porygon2 +Stantler +Smeargle +Tyrogue +Hitmontop +Smoochum +Elekid +Magby +Miltank +Blissey +Raikou +Entei +Suicune +Larvitar +Pupitar +Tyranitar +Lugia +Ho-Oh +Celebi +Treecko +Grovyle +Sceptile +Torchic +Combusken +Blaziken +Mudkip +Marshtomp +Swampert +Poochyena +Mightyena +Zigzagoon +Linoone +Wurmple +Silcoon +Beautifly +Cascoon +Dustox +Lotad +Lombre +Ludicolo +Seedot +Nuzleaf +Shiftry +Taillow +Swellow +Wingull +Pelipper +Ralts +Kirlia +Gardevoir +Surskit +Masquerain +Shroomish +Breloom +Slakoth +Vigoroth +Slaking +Nincada +Ninjask +Shedinja +Whismur +Loudred +Exploud +Makuhita +Hariyama +Azurill +Nosepass +Skitty +Delcatty +Sableye +Mawile +Aron +Lairon +Aggron +Meditite +Medicham +Electrike +Manectric +Plusle +Minun +Volbeat +Illumise +Roselia +Gulpin +Swalot +Carvanha +Sharpedo +Wailmer +Wailord +Numel +Camerupt +Torkoal +Spoink +Grumpig +Spinda +Trapinch +Vibrava +Flygon +Cacnea +Cacturne +Swablu +Altaria +Zangoose +Seviper +Lunatone +Solrock +Barboach +Whiscash +Corphish +Crawdaunt +Baltoy +Claydol +Lileep +Cradily +Anorith +Armaldo +Feebas +Milotic +Castform +Kecleon +Shuppet +Banette +Duskull +Dusclops +Tropius +Chimecho +Absol +Wynaut +Snorunt +Glalie +Spheal +Sealeo +Walrein +Clamperl +Huntail +Gorebyss +Relicanth +Luvdisc +Bagon +Shelgon +Salamence +Beldum +Metang +Metagross +Regirock +Regice +Registeel +Latias +Latios +Kyogre +Groudon +Rayquaza +Jirachi +Deoxys +Turtwig +Grotle +Torterra +Chimchar +Monferno +Infernape +Piplup +Prinplup +Empoleon +Starly +Staravia +Staraptor +Bidoof +Bibarel +Kricketot +Kricketune +Shinx +Luxio +Luxray +Budew +Roserade +Cranidos +Rampardos +Shieldon +Bastiodon +Burmy +Wormadam +Mothim +Combee +Vespiquen +Pachirisu +Buizel +Floatzel +Cherubi +Cherrim +Shellos +Gastrodon +Ambipom +Drifloon +Drifblim +Buneary +Lopunny +Mismagius +Honchkrow +Glameow +Purugly +Chingling +Stunky +Skuntank +Bronzor +Bronzong +Bonsly +Mime Jr. +Happiny +Chatot +Spiritomb +Gible +Gabite +Garchomp +Munchlax +Riolu +Lucario +Hippopotas +Hippowdon +Skorupi +Drapion +Croagunk +Toxicroak +Carnivine +Finneon +Lumineon +Mantyke +Snover +Abomasnow +Weavile +Magnezone +Lickilicky +Rhyperior +Tangrowth +Electivire +Magmortar +Togekiss +Yanmega +Leafeon +Glaceon +Gliscor +Mamoswine +Porygon-Z +Gallade +Probopass +Dusknoir +Froslass +Rotom +Uxie +Mesprit +Azelf +Dialga +Palkia +Heatran +Regigigas +Giratina +Cresselia +Phione +Manaphy +Darkrai +Shaymin +Arceus +Victini +Snivy +Servine +Serperior +Tepig +Pignite +Emboar +Oshawott +Dewott +Samurott +Patrat +Watchog +Lillipup +Herdier +Stoutland +Purrloin +Liepard +Pansage +Simisage +Pansear +Simisear +Panpour +Simipour +Munna +Musharna +Pidove +Tranquill +Unfezant +Blitzle +Zebstrika +Roggenrola +Boldore +Gigalith +Woobat +Swoobat +Drilbur +Excadrill +Audino +Timburr +Gurdurr +Conkeldurr +Tympole +Palpitoad +Seismitoad +Throh +Sawk +Sewaddle +Swadloon +Leavanny +Venipede +Whirlipede +Scolipede +Cottonee +Whimsicott +Petilil +Lilligant +Basculin +Sandile +Krokorok +Krookodile +Darumaka +Darmanitan +Maractus +Dwebble +Crustle +Scraggy +Scrafty +Sigilyph +Yamask +Cofagrigus +Tirtouga +Carracosta +Archen +Archeops +Trubbish +Garbodor +Zorua +Zoroark +Minccino +Cinccino +Gothita +Gothorita +Gothitelle +Solosis +Duosion +Reuniclus +Ducklett +Swanna +Vanillite +Vanillish +Vanilluxe +Deerling +Sawsbuck +Emolga +Karrablast +Escavalier +Foongus +Amoonguss +Frillish +Jellicent +Alomomola +Joltik +Galvantula +Ferroseed +Ferrothorn +Klink +Klang +Klinklang +Tynamo +Eelektrik +Eelektross +Elgyem +Beheeyem +Litwick +Lampent +Chandelure +Axew +Fraxure +Haxorus +Cubchoo +Beartic +Cryogonal +Shelmet +Accelgor +Stunfisk +Mienfoo +Mienshao +Druddigon +Golett +Golurk +Pawniard +Bisharp +Bouffalant +Rufflet +Braviary +Vullaby +Mandibuzz +Heatmor +Durant +Deino +Zweilous +Hydreigon +Larvesta +Volcarona +Cobalion +Terrakion +Virizion +Tornadus +Thundurus +Reshiram +Zekrom +Landorus +Kyurem +Keldeo +Meloetta +Genesect +EOF +} + +ask_pokemon() { list_pokemon | commander -xc; } html="/tmp/pk_tmp.html" [ "$pokemon" ] || pokemon="$(ask_pokemon)" diff --git a/bin/guiscripts/sturl b/bin/guiscripts/sturl index d261e32..27a8f47 100755 --- a/bin/guiscripts/sturl +++ b/bin/guiscripts/sturl @@ -1,7 +1,7 @@ #!/bin/sh regex='(((file|https?|gopher|gemini|ftps?|git)://|www\.)[a-zA-Z0-9.]*[:;!a-zA-Z0-9./+@$&%?$\#=_~-]*)|(magnet:\?xt=urn:btih:[a-zA-Z0-9]*)' -url="$(tr -d '\n' | grep -Eo "$regex" | commander -cl)" +url="$(tr -d '\n' | grep -Eo "$regex" | commander -xcl)" [ -z "$url" ] && exit 1 case $1 in diff --git a/bin/menuscripts/mpower b/bin/menuscripts/mpower index f8f7654..8c1a886 100755 --- a/bin/menuscripts/mpower +++ b/bin/menuscripts/mpower @@ -1,11 +1,13 @@ #!/bin/sh choice="$( -cat <<EOF | commander -c -w 1 -y 4 +cat <<EOF | commander -c -w 1 -y 5 poweroff suspend hibernate reboot +firmware EOF )" +[ "$choice" = "firmware" ] && systemctl reboot --firmware-setup [ "$choice" ] && systemctl "$choice" |