Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions dmenu-launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@

set -euo pipefail

SSH_OPTS="-o BatchMode=yes -o ConnectTimeout=2 -o ConnectionAttempts=1 -o ServerAliveInterval=5 -o ServerAliveCountMax=1 -o PreferredAuthentications=publickey -o StrictHostKeyChecking=accept-new"

# Colors and styling
DMENU_OPTS="-i -l 20 -fn 'JetBrains Mono-12' -nb '#1e1e1e' -nf '#d4d4d4' -sb '#007acc' -sf '#ffffff'"
DMENU_OPTS="-f -i -l 20 -fn 'JetBrains Mono-12' -nb '#1e1e1e' -nf '#d4d4d4' -sb '#007acc' -sf '#ffffff'"

# Main categories
declare -A CATEGORIES=(
Expand All @@ -25,13 +27,13 @@ servers() {

case "$choice" in
"🏠 HAS - Home Automation Server")
konsole -e ssh root@Home-Automation-Server &
konsole -e ssh $SSH_OPTS root@Home-Automation-Server &
;;
"🧠 LLMS - LLM Server")
konsole -e ssh milhy777@192.168.0.41 &
konsole -e ssh $SSH_OPTS milhy777@192.168.0.41 &
;;
"💻 Aspire - Main Workstation")
konsole -e ssh milhy777@192.168.0.10 &
konsole -e ssh $SSH_OPTS milhy777@192.168.0.10 &
;;
"🔗 Session Manager")
konsole -e bash -c "session-list; echo; echo 'Commands: session-aspire, session-has, session-llms'; echo 'Press any key...'; read" &
Expand All @@ -40,10 +42,10 @@ servers() {
konsole -e bash -c "echo '=== UNIFIED 3-PC TMUX ECOSYSTEM ==='; session-list; echo; echo 'Press any key...'; read" &
;;
"🔄 Restart All Sessions")
konsole -e bash -c "echo 'Restarting tmux sessions on all servers...'; ~/tmux-autostart.sh; ssh milhy777@192.168.0.41 '~/tmux-autostart.sh'; ssh root@Home-Automation-Server '~/tmux-autostart.sh'; echo 'Done!'; read" &
konsole -e bash -c "echo 'Restarting tmux sessions on all servers...'; ~/tmux-autostart.sh; ssh $SSH_OPTS milhy777@192.168.0.41 '~/tmux-autostart.sh'; ssh $SSH_OPTS root@Home-Automation-Server '~/tmux-autostart.sh'; echo 'Done!'; read" &
;;
"📊 Multi-Server Monitor")
konsole -e bash -c "while true; do clear; echo '=== UNIFIED 3-PC ECOSYSTEM STATUS ==='; echo; echo 'ASPIRE:'; ~/system_monitor.sh compact; echo 'LLMS:'; ssh milhy777@192.168.0.41 '~/system_monitor.sh compact' 2>/dev/null || echo 'Offline'; echo 'HAS:'; ssh root@Home-Automation-Server '~/system_monitor.sh compact' 2>/dev/null || echo 'Offline'; echo; echo 'Press Ctrl+C to exit'; sleep 3; done" &
konsole -e bash -c "while true; do clear; echo '=== UNIFIED 3-PC ECOSYSTEM STATUS ==='; echo; echo 'ASPIRE:'; ~/system_monitor.sh compact; echo 'LLMS:'; ssh -n $SSH_OPTS milhy777@192.168.0.41 '~/system_monitor.sh compact' 2>/dev/null || echo 'Offline'; echo 'HAS:'; ssh -n $SSH_OPTS root@Home-Automation-Server '~/system_monitor.sh compact' 2>/dev/null || echo 'Offline'; echo; echo 'Press Ctrl+C to exit'; sleep 3; done" &
;;
esac
}
Expand Down Expand Up @@ -107,7 +109,7 @@ web_services() {
firefox --new-tab "http://192.168.0.41:11434" &
;;
"LLMS - Shared Folder")
llms-mount && dolphin /mnt/llms &
timeout 5s llms-mount && dolphin /mnt/llms &
;;
"Aspire - Dev Server (8000)")
firefox --new-tab "http://192.168.0.10:8000" &
Expand Down Expand Up @@ -136,7 +138,7 @@ monitoring_tools() {
konsole --noclose -e watch -n 1 'sensors | grep -E "Core|temp"' &
;;
"CPU Info")
konsole --noclose -e sh -c 'cat /proc/cpuinfo | grep -E "model name|cpu MHz|cache size" | head -6; read' &
konsole --noclose -e sh -c 'grep -E -m 6 "model name|cpu MHz|cache size" /proc/cpuinfo; read' &
;;
"Tmux Monitor Session")
tmux-sys
Expand Down Expand Up @@ -247,7 +249,7 @@ reference_guide() {
kate /home/milhy777/Develop/CLAUDE.md &
;;
"Alias Reference")
konsole --noclose -e sh -c 'cat /home/milhy777/.shell_common | grep "^alias" | head -20; echo "...and more"; read' &
konsole --noclose -e sh -c 'grep -E "^alias" /home/milhy777/.shell_common | head -20; echo "...and more"; read' &
;;
"Keyboard Shortcuts")
konsole --noclose -e sh -c 'echo "Tmux: Ctrl+a (prefix)"; echo "VS Code: Ctrl+Shift+P (palette)"; echo "KDE: Meta+T (terminal)"; read' &
Expand Down
18 changes: 10 additions & 8 deletions install-monitoring-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

set -euo pipefail

export DEBIAN_FRONTEND=noninteractive

# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
Expand All @@ -23,12 +25,12 @@ fi

# Update package list
echo -e "${YELLOW}📋 Updating package list...${NC}"
sudo apt update
sudo apt-get update -y -o Acquire::Retries=2

# Install iotop (I/O monitoring)
echo -e "${YELLOW}📊 Installing iotop (I/O monitoring)...${NC}"
if ! command -v iotop >/dev/null 2>&1; then
sudo apt install -y iotop
sudo apt-get install -y iotop
echo -e "${GREEN}✅ iotop installed${NC}"
else
echo -e "${GREEN}✅ iotop already installed${NC}"
Expand All @@ -37,7 +39,7 @@ fi
# Install nethogs (network monitoring per process)
echo -e "${YELLOW}🌐 Installing nethogs (network monitoring)...${NC}"
if ! command -v nethogs >/dev/null 2>&1; then
sudo apt install -y nethogs
sudo apt-get install -y nethogs
echo -e "${GREEN}✅ nethogs installed${NC}"
else
echo -e "${GREEN}✅ nethogs already installed${NC}"
Expand All @@ -53,11 +55,11 @@ if ! command -v btop >/dev/null 2>&1; then
else
# Fallback to apt (if available)
echo "Installing btop via apt..."
sudo apt install -y btop 2>/dev/null || {
sudo apt-get install -y btop 2>/dev/null || {
echo -e "${YELLOW}btop not available in apt, building from source...${NC}"

# Install dependencies for building
sudo apt install -y build-essential git cmake
sudo apt-get install -y build-essential git cmake

# Clone and build btop
cd /tmp
Expand All @@ -77,7 +79,7 @@ fi
# Install dmenu if not present
echo -e "${YELLOW}📋 Installing dmenu...${NC}"
if ! command -v dmenu >/dev/null 2>&1; then
sudo apt install -y dmenu
sudo apt-get install -y dmenu
echo -e "${GREEN}✅ dmenu installed${NC}"
else
echo -e "${GREEN}✅ dmenu already installed${NC}"
Expand All @@ -86,7 +88,7 @@ fi
# Install python3-keyring for vault functionality
echo -e "${YELLOW}🔒 Installing python3-keyring...${NC}"
if ! python3 -c "import keyring" 2>/dev/null; then
sudo apt install -y python3-keyring
sudo apt-get install -y python3-keyring
echo -e "${GREEN}✅ python3-keyring installed${NC}"
else
echo -e "${GREEN}✅ python3-keyring already installed${NC}"
Expand Down Expand Up @@ -114,7 +116,7 @@ fi
echo -e "${BLUE}🧪 Testing installations...${NC}"

echo -n "iotop: "
if iotop --version >/dev/null 2>&1; then
if command -v iotop >/dev/null 2>&1; then
echo -e "${GREEN}✅ Working${NC}"
else
echo -e "${RED}❌ Failed${NC}"
Expand Down