From 865728068c965e066d0f8971c5b5ba26e12e7dce Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Thu, 24 Dec 2020 00:06:27 +0530 Subject: Adds scripts and links scripts and wallpapers --- scripts/artemis.sh | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100755 scripts/artemis.sh (limited to 'scripts/artemis.sh') diff --git a/scripts/artemis.sh b/scripts/artemis.sh new file mode 100755 index 0000000..8546a89 --- /dev/null +++ b/scripts/artemis.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +host="192.168.0.10" +port=6543 + +run() { ssh "$host" -p $port -tt "$@"; } +run_x() { ssh -X "$host" -p $port; } + +run_git() { + local cmd="$1"; shift 1; + case "$cmd" in + ls) run ls -1 /fagit ;; + esac; +} + +run_cloud() { + local cmd="$1"; shift 1; + case "$cmd" in + ls) run ls -la "~/storage/public/$1" ;; + esac; +} + +run_media() { + local cmd="$1"; shift 1; + case "$cmd" in + play) run mpc play ;; + pause) run mpc pause ;; + play-pause) run mpc toggle ;; + esac; +} + +run_webui() { + local cmd="$1"; shift 1; + case "$cmd" in + pihole) ~/.bin/open "http://$host:9292/admin" ;; + sync) ~/.bin/open "http://$host:9191" ;; + esac; +} + +cmd="$1"; shift 1; +case "$cmd" in + shell) run bash ;; + web) run_webui "$@" ;; + top) run ytop ;; + update) run yay -Syyu ;; + git) run_git "$@" ;; + media) run_media "$@" ;; + cloud) run_cloud "$@" ;; + run) run "$@" ;; + x) run_x ;; +esac + -- cgit v1.3.1