daltonmenezes / hyper-init Goto Github PK
View Code? Open in Web Editor NEW:zap: The ultimate and most complete extension to initialize commands before and after Hyper terminal starts.
License: MIT License
:zap: The ultimate and most complete extension to initialize commands before and after Hyper terminal starts.
License: MIT License
I love to personalize my stuff, and one of them is my Hyper terminal, thanks to this plugin I can execute commands at the Init of my Terminal and when I open/split a new tab, showing my system info or ASCII art.
init: [
{
rule: "once",
commands: [
"Set-Prompt",
"Set-Theme Material",
"clear",
"Write-Host -ForegroundColor Green ' Welcome Back '",
"$Model = (Get-CimInstance win32_computersystem).Model",
"$Manu = (Get-CimInstance win32_computersystem).Manufacturer",
"$PC = (Get-CimInstance win32_computersystem).Name",
"$User = (Get-CimInstance win32_computersystem).PrimaryOwnerName",
"Write-Host -ForegroundColor DarkRed ' ' -NoNewline;Write-Host -ForegroundColor Blue $PC -NoNewLine; Write-Host -ForegroundColor DarkYellow '@' -NoNewLine; Write-Host -ForegroundColor Blue $User",
"Write-Host -ForegroundColor DarkRed ' ██ ▄█▀▓██ ██▓ ▒█████ ███▄ █ ▄▄▄ ▒██ ██▒ ' -NoNewline;Write-Host -ForegroundColor Blue 'Manufacturer: ' -NoNewline;Write-Host -ForegroundColor DarkYellow $Manu",
"Write-Host -ForegroundColor DarkRed ' ██▄█▒ ▒██ ██▒▒██▒ ██▒ ██ ▀█ █ ▒████▄ ▒▒ █ █ ▒░ ' -NoNewline;Write-Host -ForegroundColor Blue 'Model: ' -NoNewline;Write-Host -ForegroundColor DarkYellow $Model",
"Write-Host -ForegroundColor DarkRed '▓███▄░ ▒██ ██░▒██░ ██▒▓██ ▀█ ██▒▒██ ▀█▄ ░░ █ ░ '",
"Write-Host -ForegroundColor DarkRed '▓██ █▄ ░ ▐██▓░▒██ ██░▓██▒ ▐▌██▒░██▄▄▄▄██ ░ █ █ ▒ '",
"Write-Host -ForegroundColor DarkRed '▒██▒ █▄ ░ ██▒▓░░ ████▓▒░▒██░ ▓██░ ▓█ ▓██▒▒██▒ ▒██▒ '",
"Write-Host -ForegroundColor DarkRed '▒ ▒▒ ▓▒ ██▒▒▒ ░ ▒░▒░▒░ ░ ▒░ ▒ ▒ ▒▒ ▓▒█░▒▒ ░ ░▓ ░ '",
"Write-Host -ForegroundColor DarkRed '░ ░▒ ▒░ ▓██ ░▒░ ░ ▒ ▒░ ░ ░░ ░ ▒░ ▒ ▒▒ ░░░ ░▒ ░ '",
"Write-Host -ForegroundColor DarkRed '░ ░░ ░ ▒ ▒ ░░ ░ ░ ░ ▒ ░ ░ ░ ░ ▒ ░ ░ '",
"Write-Host -ForegroundColor DarkRed '░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ '",
"Write-Host -ForegroundColor DarkRed ' ░ ░ '",
"Write-Host -ForegroundColor DarkRed ' '",
],
},
{
rule: ["windows", "tabs", "splitted"],
commands: ["Set-Prompt", "Set-Theme Material"],
},
],
The problem is that when I open a new tab on Wsl or CMD or using another cross-platform task, the commands are still executed, no matter If I put "windows", on the rule init.
Exist a config or what I need to do, to validate the cross-platforms task/shells when the terminal has to execute the commands?
First, thank you for the extension - it is fantastic! I was wondering whether there's a way for hyper-init to basically set all my initial tabs. Right now, all commands are executed in the same pane. Can they be executed in different panes? For example:
Is there no way of setting multiple rules for one command?
e.g.
init: [
{
rule: 'once',
commands: ['command 1']
},
{
rule: ['splitted', 'once'],
commands: ['command 2']
}
]
I'm on Windows and I get the following message every time I start a hyper window (if I have hyper-init enabled):
'printf' "is not recognized as an internal or external command, operable program or batch file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.