From 84bbf72fb51fd78f6b955220fc3114372e336065 Mon Sep 17 00:00:00 2001 From: Sami Altamimi Date: Sat, 11 Jun 2022 17:58:59 -0500 Subject: [PATCH 1/3] feat: simplify changing the theme You can now create a theme in `themes.json` and set the color attribute to the theme name in `config.json`. --- config.json | 21 +-------------------- tailwind.config.js | 5 ++++- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/config.json b/config.json index d1fa47c..0688c5e 100644 --- a/config.json +++ b/config.json @@ -16,24 +16,5 @@ "paypal": "https://paypal.me/cveinnt", "patreon": "https://patreon.com/cveinnt" }, - "colors": { - "light": { - "background": "#FBF1C9", - "foreground": "#3C3836", - "yellow": "#D79921", - "green": "#98971A", - "gray": "#7C6F64", - "blue": "#458588", - "red": "#CA2124" - }, - "dark": { - "background": "#2E3440", - "foreground": "#E5E9F0", - "yellow": "#5E81AC", - "green": "#A3BE8C", - "gray": "#88C0D0", - "blue": "#EBCB8B", - "red": "#BF616A" - } - } + "color": "default" } diff --git a/tailwind.config.js b/tailwind.config.js index 2c63b9b..03700f4 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,4 +1,7 @@ -const { colors } = require('./config.json'); +const { color } = require('./config.json'); +const theme = require('./themes.json'); + +let colors = theme[color]; module.exports = { content: [ From 2e84c2351cb0f0a090a98fe54a076b52ea57b3d9 Mon Sep 17 00:00:00 2001 From: Sami Altamimi Date: Sat, 11 Jun 2022 18:02:08 -0500 Subject: [PATCH 2/3] feat: add stack overflow search --- src/utils/bin/commands.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/utils/bin/commands.ts b/src/utils/bin/commands.ts index 338c9f8..3fdd8cf 100644 --- a/src/utils/bin/commands.ts +++ b/src/utils/bin/commands.ts @@ -91,6 +91,11 @@ export const reddit = async (args: string[]): Promise => { return `Searching reddit for ${args.join(' ')}...`; }; +export const stackoverflow = async (args: string[]): Promise => { + window.open(`https://stackoverflow.com/search?q=${args.join(' ')}`); + return `Searching stack overflow for ${args.join(' ')}...`; +}; + // Typical linux commands export const echo = async (args: string[]): Promise => { return args.join(' '); From ddad0e1ea466d0ed1f1a1bf3edb342fc36719679 Mon Sep 17 00:00:00 2001 From: Sami Altamimi Date: Sat, 11 Jun 2022 18:03:09 -0500 Subject: [PATCH 3/3] feat: actually add vscode I understand it is a meme command intended to be a joke, but vscode has a protocol handler which means we can actually open it from the browser. --- src/utils/bin/commands.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/utils/bin/commands.ts b/src/utils/bin/commands.ts index 3fdd8cf..2ef8914 100644 --- a/src/utils/bin/commands.ts +++ b/src/utils/bin/commands.ts @@ -138,6 +138,11 @@ export const emacs = async (args?: string[]): Promise => { return `you know what? just use vscode.`; }; +export const vscode = async (args?: string[]): Promise => { + window.open(`vscode://`); + return `opening god's favorite editor...`; +}; + export const sudo = async (args?: string[]): Promise => { window.open('https://www.youtube.com/watch?v=dQw4w9WgXcQ', '_blank'); // ...I'm sorry return `Permission denied: with little power comes... no responsibility? `;