Customize terminal.

pull/38/head
Yipeng Liu 2 years ago
parent a9ca4ab885
commit 1700199b84
No known key found for this signature in database
GPG Key ID: 836A2F6C6D60065C

@ -1,21 +1,22 @@
{ {
"readmeUrl": "https://raw.githubusercontent.com/cveinnt/cveinnt/master/README.md", "readmeUrl": "https://raw.githubusercontent.com/lwpie/lwpie/master/README.md",
"title": "LiveTerm", "title": "Yipeng's Index",
"name": "John Doe", "name": "Yipeng Liu",
"ascii": "liveterm", "ascii": "Yipe.ng",
"social": { "social": {
"github": "github", "github": "lwpie",
"linkedin": "linkedin" "phone": "15::24652"
}, },
"email": "contact@email.com", "email": "liu@yipe.ng",
"ps1_hostname": "liveterm", "ps1_hostname": "yipe.ng",
"ps1_username": "visitor", "ps1_username": "pwe",
"repo": "https://github.com/Cveinnt/LiveTerm", "repo": "https://github.com/lwpie/LiveTerm",
"resume_url": "https://upload.wikimedia.org/wikipedia/commons/c/cc/Resume.pdf", "resume_url": "/cv",
"donate_urls": { "donate_urls": {
"paypal": "https://paypal.me/cveinnt", "paypal": "KFC-CRAZY-THURSDAY",
"patreon": "https://patreon.com/cveinnt" "patreon": "VME50-THANKS"
}, },
"fake": "https://youtu.be/dQw4w9WgXcQ",
"colors": { "colors": {
"light": { "light": {
"background": "#FBF1C9", "background": "#FBF1C9",

@ -31,7 +31,7 @@ export const repo = async (args: string[]): Promise<string> => {
// About // About
export const about = async (args: string[]): Promise<string> => { export const about = async (args: string[]): Promise<string> => {
return `Hi, I am ${config.name}. return `Hi, I am ${config.name}.
Welcome to my website! Welcome to my terminal!
More about me: More about me:
'sumfetch' - short summary. 'sumfetch' - short summary.
'resume' - my latest resume. 'resume' - my latest resume.
@ -47,8 +47,8 @@ export const resume = async (args: string[]): Promise<string> => {
export const donate = async (args: string[]): Promise<string> => { export const donate = async (args: string[]): Promise<string> => {
return `thank you for your interest. return `thank you for your interest.
here are the ways you can support my work: here are the ways you can support my work:
- <u><a class="text-light-blue dark:text-dark-blue underline" href="${config.donate_urls.paypal}" target="_blank">paypal</a></u> - <u><a class="text-light-blue dark:text-dark-blue underline" href="${config.fake}" target="_blank">${config.donate_urls.paypal}</a></u>
- <u><a class="text-light-blue dark:text-dark-blue underline" href="${config.donate_urls.patreon}" target="_blank">patreon</a></u> - <u><a class="text-light-blue dark:text-dark-blue underline" href="${config.fake}" target="_blank">${config.donate_urls.patreon}</a></u>
`; `;
}; };
@ -60,38 +60,45 @@ export const email = async (args: string[]): Promise<string> => {
export const github = async (args: string[]): Promise<string> => { export const github = async (args: string[]): Promise<string> => {
window.open(`https://github.com/${config.social.github}/`); window.open(`https://github.com/${config.social.github}/`);
return 'Opening github...'; return 'Opening github...';
}; };
export const linkedin = async (args: string[]): Promise<string> => { // export const linkedin = async (args: string[]): Promise<string> => {
window.open(`https://www.linkedin.com/in/${config.social.linkedin}/`); // window.open(`https://www.linkedin.com/in/${config.social.linkedin}/`);
// return 'Opening linkedin...';
return 'Opening linkedin...'; // };
};
// Search // Search
export const google = async (args: string[]): Promise<string> => { // export const google = async (args: string[]): Promise<string> => {
window.open(`https://google.com/search?q=${args.join(' ')}`); // window.open(`https://google.com/search?q=${args.join(' ')}`);
return `Searching google for ${args.join(' ')}...`; // return `Searching google for ${args.join(' ')}...`;
}; // };
export const duckduckgo = async (args: string[]): Promise<string> => { // export const duckduckgo = async (args: string[]): Promise<string> => {
window.open(`https://duckduckgo.com/?q=${args.join(' ')}`); // window.open(`https://duckduckgo.com/?q=${args.join(' ')}`);
return `Searching duckduckgo for ${args.join(' ')}...`; // return `Searching duckduckgo for ${args.join(' ')}...`;
}; // };
// export const bing = async (args: string[]): Promise<string> => {
// window.open(`https://bing.com/search?q=${args.join(' ')}`);
// return `Wow, really? You are using bing for ${args.join(' ')}?`;
// };
// export const reddit = async (args: string[]): Promise<string> => {
// window.open(`https://www.reddit.com/search/?q=${args.join(' ')}`);
// return `Searching reddit for ${args.join(' ')}...`;
// };
export const bing = async (args: string[]): Promise<string> => { // Typical linux commands
window.open(`https://bing.com/search?q=${args.join(' ')}`); export const logout = async (args: string[]): Promise<string> => {
return `Wow, really? You are using bing for ${args.join(' ')}?`; return `shell: logout: not login shell: use \`exit\'`;
}; }
export const reddit = async (args: string[]): Promise<string> => { export const exit = async (args: string[]): Promise<string> => {
window.open(`https://www.reddit.com/search/?q=${args.join(' ')}`); setTimeout(() => {open(`location`, '_self').close()}, 1000);
return `Searching reddit for ${args.join(' ')}...`; return `Connection to ${config.ps1_hostname} closed.`;
}; }
// Typical linux commands
export const echo = async (args: string[]): Promise<string> => { export const echo = async (args: string[]): Promise<string> => {
return args.join(' '); return args.join(' ');
}; };
@ -134,21 +141,24 @@ export const emacs = async (args?: string[]): Promise<string> => {
}; };
export const sudo = async (args?: string[]): Promise<string> => { export const sudo = async (args?: string[]): Promise<string> => {
window.open('https://www.youtube.com/watch?v=dQw4w9WgXcQ', '_blank'); // ...I'm sorry window.open(config.fake, '_blank'); // ...I'm sorry
return `Permission denied: with little power comes... no responsibility? `; return `Permission denied: with little power comes... no responsibility? `;
}; };
// Banner // Banner
export const banner = (args?: string[]): string => { export const banner = (args?: string[]): string => {
return ` return `
Type 'help' to see the list of available commands. Type 'help' to see the list of available commands.
Type 'sumfetch' to display summary. Type 'sumfetch' to display summary.

@ -30,14 +30,14 @@ const sumfetch = async (args: string[]): Promise<string> => {
        <u><a href="${config.resume_url}" target="_blank">resume</a></u>         <u><a href="${config.resume_url}" target="_blank">resume</a></u>
<u><a href="${config.repo}" target="_blank">Github repo</a></u> <u><a href="${config.repo}" target="_blank">Github repo</a></u>
  -----------   -----------
  > L I V E T E R M CONTACT   > Y I P E . N G CONTACT
  <u><a href="mailto:${config.email}" target="_blank">${config.email}</a></u>   ${config.social.phone}
<u><a href="https://github.com/${config.social.github}" target="_blank">github.com/${config.social.github}</a></u> <u><a href="mailto:${config.email}" target="_blank">${config.email}</a></u>
        <u><a href="https://linkedin.com/in/${config.social.linkedin}" target="_blank">linkedin.com/in/${config.social.linkedin}</a></u>         <u><a href="https://github.com/${config.social.github}" target="_blank">github.com/${config.social.github}</a></u>
  -----------   -----------
        DONATE         DONATE
   <u><a href="${config.donate_urls.paypal}" target="_blank">${config.donate_urls.paypal}</a></u>    <u><a href="${config.fake}" target="_blank">${config.donate_urls.paypal}</a></u>
  <u><a href="${config.donate_urls.patreon}" target="_blank">${config.donate_urls.patreon}</a></u>   <u><a href="${config.fake}" target="_blank">${config.donate_urls.patreon}</a></u>
`; `;
} }

Loading…
Cancel
Save