From 8a554bd5fb4203198d79629869e8a3e3c45ae365 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Av=C3=A9?= <email@thomasave.be>
Date: Sun, 21 Apr 2024 18:28:35 +0200
Subject: [PATCH] add rofi-ssh script

---
 .config/hypr/hyprland.conf | 1 +
 .config/rofi/rofi-ssh.sh   | 9 +++++++++
 2 files changed, 10 insertions(+)
 create mode 100755 .config/rofi/rofi-ssh.sh

diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf
index 8ec08c4..dd3f301 100644
--- a/.config/hypr/hyprland.conf
+++ b/.config/hypr/hyprland.conf
@@ -140,6 +140,7 @@ bind = $mainMod, SPACE, togglesplit, # dwindle
 bind = CONTROL_L ALT_L, L, exec, swaylock
 bind = $mainMod, C, exec, cliphist list | awk '{print $0, "\0icon\x1fcom.github.davidmhewitt.clipped"}' | rofi -dmenu -display-columns 2 | cliphist decode | wl-copy
 bind = $mainMod, Y, exec, /home/user/.config/rofi/rofi-ykman.sh
+bind = $mainMod, N, exec, /home/user/.config/rofi/rofi-ssh.sh
 
 bind = $mainMod, Escape, exec, rofi -show power-menu -modi power-menu:$scripts/rofi-power-menu
 
diff --git a/.config/rofi/rofi-ssh.sh b/.config/rofi/rofi-ssh.sh
new file mode 100755
index 0000000..9f93ef2
--- /dev/null
+++ b/.config/rofi/rofi-ssh.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+
+servers=(Mallorea Kell Riva Vault Aloria Arendia)
+selected=$(for server in "${servers[@]}"; do printf "%s\0icon\x1fyubioath\n" "$server"; done | rofi -dmenu -i)
+if [ -z "$selected" ]; then
+    exit 1
+fi
+alacritty -e zsh -c "source ~/.zshrc && run_waypipe $selected"