From 4e09a7b8319761b3c053c087cc9f0818757a832a Mon Sep 17 00:00:00 2001 From: Ceres Date: Sat, 15 Nov 2025 18:17:45 +0000 Subject: [PATCH] Add search --- assets/terminal-functions.js | 66 ++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/assets/terminal-functions.js b/assets/terminal-functions.js index 0b263ad..d40066c 100644 --- a/assets/terminal-functions.js +++ b/assets/terminal-functions.js @@ -119,13 +119,14 @@ rRVj04/uQmY6Cf8= $('body').terminal({ help: function() { - this.echo("Some commands to get you started:\n"+ - "• about: show about info\n"+ - "• services: links to all the services i host, run 'services help' to get a full list\n"+ - "• pgp: import my pgp public key\n"+ - "• meow: mrow\n"+ - "\n "+ - "\n"+ + this.echo("Some commands to get you started:\n" + + "• about: show about info\n" + + "• services: links to all the services i host, run 'services help' to get a full list\n" + + `• search: search the internet using my searxng, run 'search ""'\n`+ + "• pgp: import my pgp public key\n" + + "• meow: mrow\n" + + "\n " + + "\n" + "...Thats it for now, sorgy"); }, about: function() { @@ -184,23 +185,23 @@ I help moderate the linuxposting community across its many locations, including open('https://sonarr.ceressees.dev', '_self') } else { - this.echo("List of services I host. Services marked with a * are public, so you can use them too!\n"+ - "Run 'services ' to launch the specified option!"+ - "\n​\n•Audiobookshelf\n"+ - "*Cinny\n"+ - "*Element\n"+ - "*Forgejo\n"+ - "•Immich\n"+ - "•Jellyfin\n"+ - "•Komodo\n"+ - "•Lidarr\n"+ - "•Navidrome\n"+ - "•Outline\n"+ - "•Paperless\n"+ - "*Piped\n"+ - "•Radarr\n"+ - "*Searxng\n"+ - "•Soulseek\n"+ + this.echo("List of services I host. Services marked with a * are public, so you can use them too!\n" + + "Run 'services ' to launch the specified option!" + + "\n​\n•Audiobookshelf\n" + + "*Cinny\n" + + "*Element\n" + + "*Forgejo\n" + + "•Immich\n" + + "•Jellyfin\n" + + "•Komodo\n" + + "•Lidarr\n" + + "•Navidrome\n" + + "•Outline\n" + + "•Paperless\n" + + "*Piped\n" + + "•Radarr\n" + + "*Searxng\n" + + "•Soulseek\n" + "•Sonarr") } }, @@ -216,17 +217,22 @@ I help moderate the linuxposting community across its many locations, including } }, meow: function() { - let meows = ['meow','mrrrp','mrow','mrreow','miao','mraa'] + let meows = ['meow', 'mrrrp', 'mrow', 'mrreow', 'miao', 'mraa'] let random = Math.floor(Math.random() * meows.length); this.echo(meows[random]) + }, + search: function(query) { + let uri = "https://search.ceressees.dev/search?q="+query; + let encodedUri = encodeURI(uri); + open(encodedUri, '_self') } }, { - greetings: "[[; #f5c2e7;]"+ - "▄▖ ▄▖ ▄▖▜ ▜\n"+ - "▌ █▌▛▘█▌▛▘▄▖▚ █▌█▌▛▘▄▖▌▌▐ ▐ \n"+ - "▙▖▙▖▌ ▙▖▄▌ ▄▌▙▖▙▖▄▌ ▛▌▐▖▐▖\n"+ - "I'm watching you...]\n"+ + greetings: "[[; #f5c2e7;]" + + "▄▖ ▄▖ ▄▖▜ ▜\n" + + "▌ █▌▛▘█▌▛▘▄▖▚ █▌█▌▛▘▄▖▌▌▐ ▐ \n" + + "▙▖▙▖▌ ▙▖▄▌ ▄▌▙▖▙▖▄▌ ▛▌▐▖▐▖\n" + + "I'm watching you...]\n" + "Run 'help' to get started", prompt: "[[;#f5c2e7;]:3] > ", });