mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Compare commits
42 Commits
improve-rd
...
colors-gem
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8bcad0c23 | ||
|
|
a6b9bee8b9 | ||
|
|
edc964e458 | ||
|
|
7194176fe5 | ||
|
|
2829279884 | ||
|
|
63a4710a88 | ||
|
|
b86fb24403 | ||
|
|
615e13bbba | ||
|
|
2c8f71c179 | ||
|
|
f4f356659f | ||
|
|
fee7746362 | ||
|
|
5d712d3ff1 | ||
|
|
32dbe60a02 | ||
|
|
9ecf5a089b | ||
|
|
4ead763559 | ||
|
|
a308000390 | ||
|
|
1b8da49425 | ||
|
|
934285b7c4 | ||
|
|
fdd3b6d787 | ||
|
|
0b04881a6f | ||
|
|
222386639b | ||
|
|
a7d925de51 | ||
|
|
8460be15c2 | ||
|
|
a57e2b48e7 | ||
|
|
b07c54fff1 | ||
|
|
277495b875 | ||
|
|
d448664726 | ||
|
|
14e140285f | ||
|
|
b95a4a44df | ||
|
|
79b31144d0 | ||
|
|
cf5f4423e1 | ||
|
|
01135724d4 | ||
|
|
ff9474e0eb | ||
|
|
b14297ea21 | ||
|
|
3db3705370 | ||
|
|
bd6992c58c | ||
|
|
3dc59e5404 | ||
|
|
3ecdcb262b | ||
|
|
8ea021744d | ||
|
|
6952e80710 | ||
|
|
8abeac68dc | ||
|
|
1cd2f5b979 |
@@ -3,9 +3,4 @@
|
||||
cd ~/.local/share/omarchy
|
||||
migration_file="$HOME/.local/share/omarchy/migrations/$(git log -1 --format=%cd --date=unix).sh"
|
||||
touch $migration_file
|
||||
|
||||
if [[ "$1" != "--no-edit" ]]; then
|
||||
nvim $migration_file
|
||||
fi
|
||||
|
||||
echo $migration_file
|
||||
nvim $migration_file
|
||||
|
||||
@@ -254,25 +254,6 @@ remove_windows() {
|
||||
echo "Windows VM removal completed!"
|
||||
}
|
||||
|
||||
wait_for_rdp_ready() {
|
||||
local WIN_USER="$1"
|
||||
local WIN_PASS="$2"
|
||||
local TIMEOUT=240
|
||||
local SECONDS=0
|
||||
|
||||
echo "Waiting for Windows VM to be ready..."
|
||||
|
||||
while ! timeout 5s xfreerdp3 /auth-only /cert:ignore /u:"$WIN_USER" /p:"$WIN_PASS" /v:127.0.0.1:3389 &>/dev/null; do
|
||||
sleep 2
|
||||
if [ $SECONDS -gt $TIMEOUT ]; then
|
||||
echo "❌ Timeout waiting for RDP!"
|
||||
echo " The VM might still be installing Windows."
|
||||
echo " Check progress at: http://127.0.0.1:8006"
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
launch_windows() {
|
||||
KEEP_ALIVE=false
|
||||
if [ "$1" = "--keep-alive" ] || [ "$1" = "-k" ]; then
|
||||
@@ -285,14 +266,6 @@ launch_windows() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Extract credentials from compose file
|
||||
WIN_USER=$(grep "USERNAME:" "$COMPOSE_FILE" | sed 's/.*USERNAME: "\(.*\)"/\1/')
|
||||
WIN_PASS=$(grep "PASSWORD:" "$COMPOSE_FILE" | sed 's/.*PASSWORD: "\(.*\)"/\1/')
|
||||
|
||||
# Use defaults if not found
|
||||
[ -z "$WIN_USER" ] && WIN_USER="docker"
|
||||
[ -z "$WIN_PASS" ] && WIN_PASS="admin"
|
||||
|
||||
# Check if container is already running
|
||||
CONTAINER_STATUS=$(docker inspect --format='{{.State.Status}}' omarchy-windows 2>/dev/null)
|
||||
|
||||
@@ -309,12 +282,32 @@ launch_windows() {
|
||||
notify-send -u critical "Windows VM" "Failed to start Windows VM"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Wait for RDP to be ready
|
||||
echo "Waiting for Windows VM to be ready..."
|
||||
WAIT_COUNT=0
|
||||
while ! nc -z 127.0.0.1 3389 2>/dev/null; do
|
||||
sleep 2
|
||||
WAIT_COUNT=$((WAIT_COUNT + 1))
|
||||
if [ $WAIT_COUNT -gt 60 ]; then # 2 minutes timeout
|
||||
echo "❌ Timeout waiting for RDP!"
|
||||
echo " The VM might still be installing Windows."
|
||||
echo " Check progress at: http://127.0.0.1:8006"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Give it a moment more to fully initialize
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
if ! wait_for_rdp_ready "$WIN_USER" "$WIN_PASS"; then
|
||||
notify-send -u critical "Windows VM" "Did not come alive in time."
|
||||
exit 1
|
||||
fi
|
||||
# Extract credentials from compose file
|
||||
WIN_USER=$(grep "USERNAME:" "$COMPOSE_FILE" | sed 's/.*USERNAME: "\(.*\)"/\1/')
|
||||
WIN_PASS=$(grep "PASSWORD:" "$COMPOSE_FILE" | sed 's/.*PASSWORD: "\(.*\)"/\1/')
|
||||
|
||||
# Use defaults if not found
|
||||
[ -z "$WIN_USER" ] && WIN_USER="docker"
|
||||
[ -z "$WIN_PASS" ] && WIN_PASS="admin"
|
||||
|
||||
# Build the connection info
|
||||
if [ "$KEEP_ALIVE" = true ]; then
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
# Overwrite parts of the omarchy-menu with user-specific submenus.
|
||||
# See $OMARCHY_PATH/bin/omarchy-menu for functions that can be overwritten.
|
||||
#
|
||||
# WARNING: Overwritten functions will obviously not be updated when Omarchy changes.
|
||||
#
|
||||
# Example adding suspend to the system menu:
|
||||
#
|
||||
# show_system_menu() {
|
||||
# case $(menu "System" " Lock\n Screensaver\n Suspend\n Restart\n Shutdown") in
|
||||
# *Lock*) omarchy-lock-screen ;;
|
||||
# *Screensaver*) omarchy-launch-screensaver force ;;
|
||||
# *Suspend*) systemctl suspend ;;
|
||||
# *Restart*) omarchy-cmd-reboot ;;
|
||||
# *Shutdown*) omarchy-cmd-shutdown ;;
|
||||
# *) back_to show_main_menu ;;
|
||||
# esac
|
||||
# }
|
||||
Reference in New Issue
Block a user