aboutsummaryrefslogtreecommitdiff
path: root/scripts/artemis.sh
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2020-12-24 00:06:27 +0530
committerAkshay Nair <phenax5@gmail.com>2020-12-24 00:06:27 +0530
commit865728068c965e066d0f8971c5b5ba26e12e7dce (patch)
treec16195f0a04cf7d004fe5b396255734f4d60bb00 /scripts/artemis.sh
parent649ef5f225039e498358c3d056dfd7fcbc56f014 (diff)
downloadnixos-config-865728068c965e066d0f8971c5b5ba26e12e7dce.tar.gz
nixos-config-865728068c965e066d0f8971c5b5ba26e12e7dce.zip
Adds scripts and links scripts and wallpapers
Diffstat (limited to '')
-rwxr-xr-xscripts/artemis.sh52
1 files changed, 52 insertions, 0 deletions
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
+