Solves the issue from ae10133b5e the right
way using the actual xdg-terminal-exec package and provides resillient
fallbacks no matter what the user might do.
This also removes the need to restart after changing terminals at all.
fixes#2198fixes#2329fixes#2673fixes#1754
Because of [hardcoded terminals in
glib](https://gitlab.gnome.org/GNOME/glib/-/blob/main/gio/gdesktopappinfo.c#L2755)
the previous fix still doesn't work well with Alacritty and Kitty.
Using our `omarchy-launch-terminal` aliased to `xdg-terminal-exec` does
the trick and doesn't introduce any new dependencies or rely on a lib
that isn't stable.
* Apply Omarchy theme; Install Neovim extension (automatically scoops up LazyVim config).
* Just set the Omarchy theme
Removed installation of Neovim extension from script.
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
* fix(jetbrains.conf): allow focus for Android Studio’s first dialog by unsetting nofocus rules for empty-title windows
* Refactor window rules for JetBrains apps
Updated window rules for JetBrains applications to allow focus and interaction with dialogs.
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
Ghostty will only use the last `shell-integration-features` line found
in the config, so multiple options need to be presented as a
comma-separated list. Including them on separate lines meant that only
the `ssh-env` option was getting set, causing the `no-cursor` option to
be ignored. This prevented the cursor from going into the `block` style.
Moving to symlink fixes the following issues:
- App removes from launchers if you uninstall Nvim
- Nvim launches in the correct terminal without invalid desktop entry
Symlink setup moved to omarchy-nvim-setup (Ref:
bb7a0f4c1f)
* Fix auto-generated everforest obsidian theme
* Update `--text-muted` and `--text-faint` to be readable against
background color
* Add contrast detection and color correction logic
* Remove dedicated Obsidian CSS file
* Add dedicated text color variables to obsidian theme generation
* Replace closest color logic with generated color for code bg in Obsidian
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
* imv: add default Ctrl+P binding to print current image via CUPS
* Add imv config migration with backup
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
* Add bindings for scratchpad support
This is great for hiding windows temporarily and bringing them up when
needed in an overlay, I'm using it to hide away my webcam control in
meetings. ;)
* Change shortcut to move window to scratchpad
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
Some applications (e.g. Aether) use xdg-desktop-portal-gtk to open folder chooser dialogs titled "Choose Export Directory" or similar. These were not matched by the previous floating-window regex, causing them to tile instead of float.
This change expands the title regex to include "Choose …" patterns, ensuring these dialogs float and center properly in Hyprland
Derives the list of required modules for the installer from Chris
McLeod's manual installation steps. His instructions say to use the
surface-linux kernel however the default kernel has the right set
of modules already (as noted by the fact that the right modules are
loaded for the keyboard to work during the install and after the LUKS
unlock screen).
I only have a Surface Laptop 3 to test this on but based on the guide
where Chris is using a newer laptop and the only difference is the
pinctrl module which I attempt to autodetect I think it should "just"
work for others but definitely "use at your own risk".
* New window replaces the current fullscreen or maximized window
Currently if we are in fullscreen or full-width mode and either
start a new application OR
create a new window of an existing application. Like an incognito window
Then those new windows/apps start in the background. There is no indication that something new has been created.
IMHO, if I am opening an application then I want to switch to it. I cannot think of any common use case for having new applications open in the background.
This change will cause new application to replace current application as the fullscreen / fullwidth window
Please see docs: https://wiki.hypr.land/Configuring/Variables/#misc
Option:
new_window_takes_over_fullscreen
Desc:
if there is a fullscreen or maximized window, decide whether a new tiled window opened should replace it, stay behind or disable the fullscreen/maximized state. 0 - behind, 1 - takes over, 2 - unfullscreen/unmaxize [0/1/2]
Type:
int
Default:
0
* fix the setting name
* fix(hyprland): match Brave portal dialogs in floating-window rule
Brave on Wayland uses xdg-desktop-portal-gtk for permission and file dialogs.
These windows use website-based titles (e.g. "chatgpt.com wants to open")
instead of "Open File" or "Save File", so they were not matched by the
floating-window rule. This commit expands the title regex to include those
patterns, ensuring Brave dialogs float properly.
* Shrink scope
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
Corrected a typo and fixed grammar in the comment regarding web app URLs. (changed hyperland to hyprland and fixed grammar in the same line)
Co-authored-by: Ryan Hughes <ryan@heyoodle.com>
adding /sound and /microphone to omarchy-windows-vm
Co-authored-by: Ryan Hughes <ryan@heyoodle.com>
Co-authored-by: David Heinemeier Hansson <david@hey.com>
* fix: make RAM detection compatible with all locales (free output in any language)
* Look at total RAM, not just free
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
This seems niche, but you might like it. Binds Super + Ctrl + F to force-tile a fullscreen app. It works nice for things including running games in a tile or watching YouTube in a pip tile without needing to configure these apps specifically to do so.
Google Chrome reports itself as google-chrome in `hyprctl clients` but
the matching for the windowrule did not work, probably because since
hyprland 0.46.0 the regex matching needs to span the entire string.
This change makes "google-chrome" get recognized so that windows of that
browser receive the chromium-based-browser tag, which in turn provides
better opacity settings for Chrome windows. Since "chrome" was matched
by the regex before, this fix now should restore the originally intended
behavior for Google Chrome.
Co-authored-by: David Heinemeier Hansson <david@hey.com>
* Update style.css
Fixes the uneven spacing between icons on waybar by updating styling.css with Propo font family.
However, Propo introduces a small issue as the volume icons don't have the same with. As a consequence, icons left of volume will move based on the displayed volume icon. To solve this, I added a non-Propo font to the pipewire module as well - this way the volume icons have fixed length but eats a bit into the spacing towards the CPU icon. But I see this as the best trade-off.
* Update waybar config.jsonc
* Update tray spacing in waybar config
* Modify margins in style.css
Adjusted margins for various elements.
* Update waybar css for even spacing
* Update Waybar config tray spacing
* feat: obsidian theme to tie into Omarchy theme
* better color matching for search result matches
* feat: simplify install flow
* Removed install/remove scripts and flow
* First `omarchy-theme-set-obsidian` run will look for vaults in
Documents and Dropbox folders and add them to
`/.local/state/omarchy/obsidian-vaults`
* Point of this is such that we assume a couple locations to look for
vaults but allow people to add vaults to the file for custom locations.
Subsequent theme-set invocations aren't impacted by find/search on large
systems
* Each `omarchy-theme-set` invocation will install the themes on all
found/registered vaults if missing and update the live theme
* Added an option of `omarchy-theme-set-obsidian --reset` to wipe out
themes in registered vaults and remove the registry file. This would be
the option to re-run to the automatic vault registration.
* Added migration to trigger install immediately in Obisdian, note that
you still need to pick Omarchy theme.
* Add smart snapshot selection
* Add wayfreeze
* Update to only include current workspace in rectangles
* Fix if there are no windows on screen
* Add option to sidestep slurp and copy straight to clipboard
* Update capture menu
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
* adding TUI for starting up windows VM
* updating to use docker-compose
* adding possibility to set windows product-key
* ram and cpu settings
* first time run notes
* add two needed pacman packages
* key and package install
* Revert "add two needed pacman packages"
This reverts commit 04dc96cee0.
* add install and remove scripts
* install icon
* rename scripts and menu to Windows VM
* rename also launch script to windows vm
* update nameing
* remove quotes
* fix paramter and quiting after installation
* fix launch script
* update
* certificate acceptance and remove of desktop app
* move desktop app
* rename app from "Windows VM" to "Windows"
* add example of sharing local share with Windows
* merge 'dev' into windows-docker-vm
* exchange rdesktop with freerdc
* accept certificates automatically so user don't fail first try
* remove certi during normal launch (handled in install process)
* remove volumes and orphans to have clean state (avoids hang on login)
* /cert option still needed
* Simplify package installs
* Fix icon + desktop to prevent creation on initial install
* omarchy-windows-vm in working form
* Don't need this anymore
* Fix commands
* Always use uwsm-app
* We are generating it instead
* Make omarchy-pkg-add quiet when the packages are already there
* Improve the questionnaire
* Show where you change resource usage
* Add default Windows share
---------
Co-authored-by: sspaeti <simon@ssp.sh>
Co-authored-by: David Heinemeier Hansson <david@hey.com>
* Improve theme-set-vscode to support jsonc and respect symlinks (#1756)
* Ghostty needs a very different scrollfactor than Alacritty and Kitty
cc @mitchellh
* Hide hyperland cursor while typing (#1812)
* Fix Matte Black theme ghostty and vscode configs (#1801)
* Update Matte Black ghostty.conf with more color settings
* Rename theme from 'MatteBlack' to 'Matte Black'
* Catch obsidian vault dialog too
* Add Update > Hardware > Audio for restarting pipewire service
* Give output on what's intended to happen
* Ensure libyaml is available for installs made before that was on the ISO
* Limit pattern to prevent incorrect matches
* fix: ghostty config typos
* No longer used
Closes#1815
* Revert "Ensure libyaml is available for installs made before that was on the ISO"
This reverts commit ad01082a86.
* Add Helium browser to supported browsers list in omarchy-launch-webapp
* Fix Helium browser detection in launch script
* feat: Added MacBook10,1 to the fix-apple-spi-keyboard.sh
* Suggest how to have a smaller-than-max-width single window aspect ratio
* Add more Mac models to SPI keyboard support
Added:
MacBook 8,1
MacBook 9,1
MacBook 8,1 uses slightly different moduels from what I can tell, so I’ve added a case statment. Please tweak as needed.
* Fix conflict + rearrange
* Added fix for ealy 2013 macbook pro's using an older chipset, BCM4331
* Tried with a different approach for cleaner code
* Clean up
Tested the logic on the MacBook. It worked and the install of the
drivers are reenabled.
* Combine ifs
* Update install script name
* Fix for '(null)' display on AirPod source selection
* Use output display or region geometry to record
The previous code did not identify the output display correctly,
leading to wf-recorder asking the user to select the region when the
user requested the display output to be selected.
With this change the bash script will use slurp with the -o flag to
identify the display output.
This has not been tested with wl-screenrec as no change has been made to
its call signature in omarchy-cmd-screenrecord and the wl-screenrec
binary is not included in the default omarchy installation.
* Fix TUI install script
- $TERMINAL should remain variable
* Add migration to fix Docker and Disk Usage TUIs
* Replace "--class" with "--class="
* Revert "Fix for '(null)' display on AirPod source selection"
* Typo
* Fix comment
* Change up firewall setup
* Enable ufw
* Disable ufw-docker (isolation test)
* Add some reboot on done debugging
* Debug firewall install/config
* Add first-run logging
* Don't suppress output from apparently-failing systemctl reboot command
* Fix logging
* Use old reboot. Still chrooted so probably won't work.
* Allow systemctl on first run
* Revert logging and other changes
---------
Co-authored-by: Omar Skalli <omar.skalli7@gmail.com>
Co-authored-by: David Heinemeier Hansson <david@hey.com>
Co-authored-by: Johan Sørensen <johan@johansorensen.com>
Co-authored-by: Taha <paprikataha@gmail.com>
Co-authored-by: Ryan Hughes <ryan@heyoodle.com>
Co-authored-by: Che-Wei Lin <linton.tw@gmail.com>
Co-authored-by: Patrick Byrne <pby.software@byrne.dk>
Co-authored-by: Eduardo Mínguez <e.minguez@gmail.com>
Co-authored-by: Joel Gaff, Jr <joelga@hey.com>
Co-authored-by: Michael Larsen <michaelarsen@gmail.com>
Co-authored-by: Shawn Yeager <shawn@shawnyeager.com>
Co-authored-by: observable <hello@observable.art>
Co-authored-by: Djordje Kovacevic <djordjek65@gmail.com>
* fix: prevent Chromium crash when moving windows between monitors
Adds --disable-features=WaylandWpColorManagerV1 to Chromium and Brave
flag configs to prevent crashes when moving windows between monitors or
workspaces on Hyprland. This is a workaround for a Chromium/Wayland
color management conflict.
Upstream Chromium fix exists but won't reach stable for ~a month. This
provides a temporary bridge until the fix lands in stable releases.
Fixes#2384
Refs #2184
Refs: https://github.com/hyprwm/Hyprland/issues/11957
Refs: https://github.com/hyprwm/Hyprland/discussions/11961
Refs: https://issues.chromium.org/issues/40263183
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/7003036
* Add migration to update existing Chromium/Brave configs with crash fix
Adds migration script to append --disable-features=WaylandWpColorManagerV1
to existing users' chromium-flags.conf and brave-flags.conf files.
The script:
- Checks if config files exist before attempting to modify them
- Uses grep to verify the flag isn't already present
- Only adds the flag and explanatory comment if needed
- Handles both Chromium and Brave configurations
This ensures existing Omarchy users get the Hyprland crash workaround
without needing to manually update their configs.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix warnings and make conditional explicit
---------
Co-authored-by: Derek Castillo <d-cas@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: David Heinemeier Hansson <david@hey.com>
When we call `omarchy-launch-walker` with `-w`, we get the following
error.
echo -e $'Adwaita Mono\nBerkeley Mono\nBerkeley Mono Variable\nCaskaydiaMono Nerd Font\nCaskaydiaMono Nerd Font Mono\niA Writer Mono S\nIosevka Fixed\nJetBrainsMono Nerd Font\nJetBrainsMono Nerd Font Mono\nJetBrainsMonoNL Nerd Font\nJetBrainsMonoNL Nerd Font Mono\nLiberation Mono\nNimbus Mono PS' | omarchy-launch-walker --dmenu --width 295 --minheight 1 --maxheight 600 -p Font… -w 350 -c 3
Error parsing option -w
Instead, we now pass `--width`, to properly override the default
`--width 295` for fonts.
Closes: https://github.com/basecamp/omarchy/issues/2404
Signed-off-by: Luke Hsiao <luke@hsiao.dev>
* alacritty.toml wity proper bg and fg
background = "#1e1e2e"
foreground = "#cdd6f4"
are the proper colors for terminal bg and fg when themeing with Catppuccin
* Update alacritty.toml with proper Catppuccin Mocha colors
* vscode.json to use Proper Catppuccin Mocha
* Add firmware update script and include in update process
* typo
* type 2
* add sudo
* Add firmware update option to update menu
* Remove firmware update command from update process
* Lazy-install firmware updater
* Move option down and change icon
* Only lazy install if missing
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
* Fix placeholder position and adjust fail text on lock screen
* Expand input field to fully fit fingerprint authentication failure message
* Better explain what's happening
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
* fix: remove theme-flag
* migration: walker 1.0.0-beta
* Fixups
* Add elephant and walker
* Update for new layout.xml
* Clean up some styling
* add unicode and todo providers
* remove default quick activate keybinds
* Update keybinds and remove defaults to prevent conflict
* Fix menu option
* Fixes
* Remove
* Update height
* Add elephant service
* Remove from hyprland
* Restart service now
* Trim
* Update height
* Fix keybindings style
* Fix install location
* Add walker restart
* Fix indention
* Fix indention
* Fix indention
* Fix indention
* Advance to present
* Need to refresh to bring over the new config
* style adjustments
* Correct the installation of the 1pw policy installer
* Skip the prebuilt for a second while we test
* Need libyaml to build ruby
* No longer needed, gcc-15 compatibility has been added
* Let's just stick to the official path
* GCC15 compatibility for Ruby has been achieved
* No longer necessary
The other mise option is set on Ruby on Rails install
* Added ZLS - Zig's Language Server when installing Zig (#1718)
* style adjustments
* styling changes
* add only_search_title
* css adjustments to fix broken styles
* Be tall again
* Remove for future variable height menu
* Update height / width params
* fix: remove theme-flag
* Fix spacing..again
* Remove service and add launch util
* Fix
* fix: wrong emojis flag
* remove flag, its dmenu only
* set min content width to prevent flickering if the item list contains shorter items
* Remove unused service
* Megakill needed
* Remove any old themes too
* Remove min-width
* Style adjustments
* changes for walker/elephant updates
* Match current width
* Add a little more space between icon and text
* fix: bluetooth find bind
* remove archlinux provider, fix migration with missing providers
* fix: css import
* Fix theme path
* fix: add new error label to layout
* Fix migration
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
Co-authored-by: Ryan Hughes <ryan@heyoodle.com>
Co-authored-by: DoKoB0512 <123281216+DoKoB0512@users.noreply.github.com>
* Change DM to SDDM
* Move to custom named UKI
* Skip creation on Mac
* Add entry to make sure VSCode uses gnome keyring
* Fix order for UKI generation
* Limine only
* BTRFS only
* Add checks for possible issues
* Remove
* Add verification to omarchy-pkg-add and speed up installs
* Use omarchy-pkg-add
* Update files to include dirs
* Fix relaunch
* use helix instead of hx in omarchy-launch-editor
fixes#1739
* add both hx and helix
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
Prevent false positives when another window title contains 'Obsidian'.
The helper script matches with a case-insensitive regex against class+title,
so anchoring to '^obsidian$' ensures we only target the Obsidian window class.
Before: SUPER+O could focus a YouTube webapp/FreeTube titled 'Obsidian is great!'.
After: SUPER+O focuses Obsidian or launches it if not running.
* Configure grouping functionality
* Change google message shortcut to CTRL + SUPER, fix typo
* Standardize all group hotkeys around SUPER ALT
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
* Fix comment
* Use systemd-resolved's stub resolver
On first run, symlink systemd-resolved's resolver into /etc/resolv.conf
Matches migration 1754984623
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
* Move common mako settings to `core.ini`
* Use monospace font, set font size in px
* Increase line height
* Adjust paddings
* Add 10px width so the Welcome notification fits on one line
* Remove extra whitespace
* Remove extra whitespace, adjust wording
* Improve text-to-bg contrast in Tokyo Night
* Follow the system font
* Use sans-serif font
* Restore width and extra space characters
* Adjust vertical paddings
* Remove `omarchy-restart-mako` (no longer needed)
* fix: change uwsm app to uwsm-app for performance
* Do not run uwsm-app in parallel as it's not supported
* Fix comment
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
This resolves the issue where extra arguments like Chromium's --profile-directory were ignored when launching a web app via omarchy-launch-or-focus-webapp.
The script now uses 'shift' to isolate the window pattern ($1) and passes all remaining arguments ($@), which include the URL and flags, to the omarchy-launch-webapp function.
Closes#1977
* Imitating VSCode omarchy-theme-set
* Changed VSCode theme setter take arguments to Cursor theme setter could call it.
* All omarchy commands are in path
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
Co-authored-by: @adelplace
* Fix comment
* fix(presentation-terminal): Ensure consistent ASCII logo alignment
The presentation terminal's ASCII logo, displayed by 'omarchy-show-logo',
would misalign if the user had a non-default font size set in their
global Alacritty configuration.
This change fixes the issue by explicitly setting the font size to 9
for this specific terminal instance using the flag.
This approach guarantees correct rendering of the logo without overriding
the user's personal font preferences for their regular terminal sessions.
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
* Fix comment
* Adjust database installation message to only one
Follow up to e260d28f43
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
* Fix comment
* added gnome-disk-utility next to nautilus in install/omarchy-base-packages
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
* Change DM to SDDM
* Move to custom named UKI
* Skip creation on Mac
* Add entry to make sure VSCode uses gnome keyring
* Fix order for UKI generation
* Limine only
* BTRFS only
* Add MVP variant of nvim switcher
* Update nvim configs
* Remove config
* Add migration for the new live themeing
* Fix plugin
* Remove theme
* Update to actually work
* Make it faster
* Fix quirks
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
Added:
MacBook 8,1
MacBook 9,1
MacBook 8,1 uses slightly different moduels from what I can tell, so I’ve added a case statment. Please tweak as needed.
The previous code did not identify the output display correctly,
leading to wf-recorder asking the user to select the region when the
user requested the display output to be selected.
With this change the bash script will use slurp with the -o flag to
identify the display output.
This has not been tested with wl-screenrec as no change has been made to
its call signature in omarchy-cmd-screenrecord and the wl-screenrec
binary is not included in the default omarchy installation.
* Install libyaml before attempting to install ruby
* Use omarchy helper
And unsafe -Sy
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
* Add 1Password extension policy configuration for Chromium and Brave
- Added policy files in config/chromium/policies/managed/ and config/brave/policies/managed/
- Created migration to copy policies to system directories /etc/chromium and /etc/brave
* I don't want to push it into existing installations at the moment
We just leave it for new installs
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
* Themeing for ghostty
* Fix theme name
* Set font for ghostty too if its on the system
* Use correct class for ghostty styling
* Uniformity
* Need to keep this alacritty until we have it fully working for other terminals
* Stick to alacritty so we can control font size
* Stick with alacritty for system terminals
* Add menu to install different terminal
* Use taha approved colors
Turn a fresh Arch installation into a fully-configured, beautiful, and modern web development system based on Hyprland by running a single command. That's the one-line pitch for Omarchy (like it was for Omakub). No need to write bespoke configs for every essential tool just to get started or to be up on all the latest command-line tools. Omarchy is an opinionated take on what Linux can be at its best.
Omarchy is a beautiful, modern & opinionated Linux distribution by DHH.
Read more at [omarchy.org](https://omarchy.org).
## License
Omarchy is released under the [MIT License](https://opensource.org/licenses/MIT).
if [ -f "$HOME/.config/fontconfig/fonts.conf" ]; then
local fontconfig_mono=$(xmlstarlet sel -t -v '//match[@target="pattern"][test/string="monospace"]/edit[@name="family"]/string' "$HOME/.config/fontconfig/fonts.conf" 2>/dev/null || true)
local fontconfig_sans=$(xmlstarlet sel -t -v '//match[@target="pattern"][test/string="sans-serif"]/edit[@name="family"]/string' "$HOME/.config/fontconfig/fonts.conf" 2>/dev/null || true)
trap 'echo ""; echo -e "\033[0;31mSomething went wrong during the update!\n\nPlease review the output above carefully, correct the error, and retry the update.\n\nIf you need assistance, get help from the community at https://omarchy.org/discord\033[0m"' ERR
SELECTED_RAM=$(echo $RAM_OPTIONS | tr ' ' '\n' | gum choose --selected="4G" --header="How much RAM would you like to allocate to Windows VM?")
# Check if user cancelled
if [ -z "$SELECTED_RAM" ]; then
echo "Installation cancelled by user"
exit 1
fi
SELECTED_CORES=$(gum input --placeholder="Number of CPU cores (1-$TOTAL_CORES)" --value="2" --header="How many CPU cores would you like to allocate to Windows VM?" --char-limit=2)
# Check if user cancelled (Ctrl+C in gum input returns empty string)
if [ -z "$SELECTED_CORES" ]; then
echo "Installation cancelled by user"
exit 1
fi
if ! [[ "$SELECTED_CORES" =~ ^[0-9]+$ ]] || [ "$SELECTED_CORES" -lt 1 ] || [ "$SELECTED_CORES" -gt "$TOTAL_CORES" ]; then
MAX_DISK_GB=$((AVAILABLE_SPACE - 10)) # Leave 10GB for Windows image
# Check if we have enough space for minimum
if [ $MAX_DISK_GB -lt 32 ]; then
echo "❌ Insufficient disk space for Windows VM!"
echo " Available: ${AVAILABLE_SPACE}GB"
echo " Minimum required: 42GB (32GB disk + 10GB for Windows image)"
exit 1
fi
DISK_OPTIONS=""
for size in 32 64 128 256 512; do
if [ $size -le $MAX_DISK_GB ]; then
DISK_OPTIONS="$DISK_OPTIONS ${size}G"
fi
done
# Default to 64G if available, otherwise 32G
DEFAULT_DISK="64G"
if ! echo "$DISK_OPTIONS" | grep -q "64G"; then
DEFAULT_DISK="32G"
fi
SELECTED_DISK=$(echo $DISK_OPTIONS | tr ' ' '\n' | gum choose --selected="$DEFAULT_DISK" --header="How much disk space would you like to give Windows VM? (64GB+ recommended)")
# Check if user cancelled
if [ -z "$SELECTED_DISK" ]; then
echo "Installation cancelled by user"
exit 1
fi
# Extract just the number for prerequisite check
DISK_SIZE_NUM=$(echo "$SELECTED_DISK" | sed 's/G//')
# Re-check prerequisites with selected disk size
check_prerequisites "$DISK_SIZE_NUM"
# Prompt for username and password
USERNAME=$(gum input --placeholder="Username (Press enter to use default: docker)" --header="Enter Windows username:")
if [ -z "$USERNAME" ]; then
USERNAME="docker"
fi
PASSWORD=$(gum input --placeholder="Password (Press enter to use default: admin)" --password --header="Enter Windows password:")
if [ -z "$PASSWORD" ]; then
PASSWORD="admin"
PASSWORD_DISPLAY="(default)"
else
PASSWORD_DISPLAY="(user-defined)"
fi
# Display configuration summary
gum style \
--border normal \
--padding "1 2" \
--margin "1" \
--align left \
--bold \
"Windows VM Configuration" \
"" \
"RAM: $SELECTED_RAM" \
"CPU: $SELECTED_CORES cores" \
"Disk: $SELECTED_DISK" \
"Username: $USERNAME" \
"Password: $PASSWORD_DISPLAY"
# Ask for confirmation
echo ""
if ! gum confirm "Proceed with this configuration?"; then
echo "Installation cancelled by user"
exit 1
fi
mkdir -p $HOME/Windows
# Create docker-compose.yml in user config directory
cat << EOF | tee "$COMPOSE_FILE" > /dev/null
services:
windows:
image: dockurr/windows
container_name: omarchy-windows
environment:
VERSION: "11"
RAM_SIZE: "$SELECTED_RAM"
CPU_CORES: "$SELECTED_CORES"
DISK_SIZE: "$SELECTED_DISK"
USERNAME: "$USERNAME"
PASSWORD: "$PASSWORD"
devices:
- /dev/kvm
- /dev/net/tun
cap_add:
- NET_ADMIN
ports:
- 8006:8006
- 3389:3389/tcp
- 3389:3389/udp
volumes:
- $HOME/.windows:/storage
- $HOME/Windows:/shared
restart: always
stop_grace_period: 2m
EOF
echo ""
echo "Starting Windows VM installation..."
echo "This will download a Windows 11 image (may take 10-15 minutes)."
#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists.
#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift.
vim_keys = False
vim_keys = True
#* Rounded corners on boxes, is ignored if TTY mode is ON.
rounded_corners = True
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.