diff --git a/bin/omarchy-launch-or-focus b/bin/omarchy-launch-or-focus index af63f007..a0075632 100755 --- a/bin/omarchy-launch-or-focus +++ b/bin/omarchy-launch-or-focus @@ -7,7 +7,7 @@ fi WINDOW_PATTERN="$1" LAUNCH_COMMAND="${2:-"uwsm app -- $WINDOW_PATTERN"}" -WINDOW_ADDRESS=$(hyprctl clients -j | jq -r --arg p "$WINDOW_PATTERN" '.[]|select((.class+" "+.title)|test($p;"i"))|.address' | head -n1) +WINDOW_ADDRESS=$(hyprctl clients -j | jq -r --arg p "$WINDOW_PATTERN" '.[]|select((.class|test("\\b" + $p + "\\b";"i")) or (.title|test("\\b" + $p + "\\b";"i")))|.address' | head -n1) if [[ -n $WINDOW_ADDRESS ]]; then hyprctl dispatch focuswindow "address:$WINDOW_ADDRESS" diff --git a/bin/omarchy-launch-webapp b/bin/omarchy-launch-webapp index 0276d966..441748ea 100755 --- a/bin/omarchy-launch-webapp +++ b/bin/omarchy-launch-webapp @@ -3,7 +3,7 @@ browser=$(xdg-settings get default-web-browser) case $browser in -google-chrome* | brave-browser* | microsoft-edge* | opera* | vivaldi*) ;; +google-chrome* | brave-browser* | microsoft-edge* | opera* | vivaldi* | helium-browser*) ;; *) browser="chromium.desktop" ;; esac diff --git a/bin/omarchy-menu b/bin/omarchy-menu index b93a4987..0dd68ec1 100755 --- a/bin/omarchy-menu +++ b/bin/omarchy-menu @@ -430,7 +430,8 @@ show_update_config_menu() { } show_update_hardware_menu() { - case $(menu "Restart" "󱚾 Wi-Fi\n󰂯 Bluetooth") in + case $(menu "Restart" " Audio\n󱚾 Wi-Fi\n󰂯 Bluetooth") in + *Audio*) present_terminal omarchy-restart-pipewire ;; *Wi-Fi*) present_terminal omarchy-restart-wifi ;; *Bluetooth*) present_terminal omarchy-restart-bluetooth ;; *) show_update_menu ;; diff --git a/bin/omarchy-restart-bluetooth b/bin/omarchy-restart-bluetooth index 432e0022..1d3c6c11 100755 --- a/bin/omarchy-restart-bluetooth +++ b/bin/omarchy-restart-bluetooth @@ -1,4 +1,5 @@ #!/bin/bash +echo -e "Unblocking bluetooth...\n" rfkill unblock bluetooth rfkill list bluetooth diff --git a/bin/omarchy-restart-pipewire b/bin/omarchy-restart-pipewire new file mode 100755 index 00000000..f26ee09e --- /dev/null +++ b/bin/omarchy-restart-pipewire @@ -0,0 +1,4 @@ +#!/bin/bash + +echo -e "Restarting pipewire audio service...\n" +systemctl --user restart pipewire.service diff --git a/bin/omarchy-restart-wifi b/bin/omarchy-restart-wifi index b8496d96..b4d66a5a 100755 --- a/bin/omarchy-restart-wifi +++ b/bin/omarchy-restart-wifi @@ -1,4 +1,5 @@ #!/bin/bash +echo -e "Unblocking wifi...\n" rfkill unblock wifi rfkill list wifi diff --git a/bin/omarchy-theme-set-vscode b/bin/omarchy-theme-set-vscode index 635ea287..1fa975d1 100755 --- a/bin/omarchy-theme-set-vscode +++ b/bin/omarchy-theme-set-vscode @@ -1,5 +1,8 @@ #!/bin/bash +# Note: We cannot use `jq` to update settings.json because it’s JSONC (allows comments), +# which jq doesn’t support. + VS_CODE_THEME="$HOME/.config/omarchy/current/theme/vscode.json" VS_CODE_SETTINGS="$HOME/.config/Code/User/settings.json" VS_CODE_SKIP_FLAG="$HOME/.local/state/omarchy/toggles/skip-vscode-theme-changes" @@ -15,12 +18,29 @@ if omarchy-cmd-present code && [[ ! -f "$VS_CODE_SKIP_FLAG" ]]; then code --install-extension "$extension" >/dev/null fi - # Update theme in settings.json - jq -n --arg t "$theme_name" '(input? // {}) | .["workbench.colorTheme"] = $t' "$VS_CODE_SETTINGS" >"${VS_CODE_SETTINGS}.new" + # Create config file if there isn't already one + mkdir -p "$(dirname "$VS_CODE_SETTINGS")" + if [[ ! -f "$VS_CODE_SETTINGS" ]]; then + printf '{\n}\n' > "$VS_CODE_SETTINGS" + fi + + # Create a `workbench.colorTheme` entry in settings. + if ! grep -q '"workbench.colorTheme"' "$VS_CODE_SETTINGS"; then + # Insert `"workbench.colorTheme": "",` immediately after the first `{` + # Use sed's first-match range (0,/{/) to only replace the first `{` + sed -i --follow-symlinks -E '0,/\{/{s/\{/{\ + "workbench.colorTheme": "",/}' "$VS_CODE_SETTINGS" + fi + + # Update theme + sed -i --follow-symlinks -E \ + "s/(\"workbench.colorTheme\"[[:space:]]*:[[:space:]]*\")[^\"]*(\")/\1$theme_name\2/" \ + "$VS_CODE_SETTINGS" else # Remove theme from settings.json when the theme doesn't have vscode support - jq 'del(.["workbench.colorTheme"])' "$VS_CODE_SETTINGS" >"${VS_CODE_SETTINGS}.new" - fi + if [[ -f "$VS_CODE_SETTINGS" ]]; then + sed -i --follow-symlinks -E '/"workbench\.colorTheme"[[:space:]]*:[^,}]*,?/d' "$VS_CODE_SETTINGS" - mv "${VS_CODE_SETTINGS}.new" "$VS_CODE_SETTINGS" + fi + fi fi diff --git a/config/ghostty/config b/config/ghostty/config index ee46b1d6..e8420d1b 100644 --- a/config/ghostty/config +++ b/config/ghostty/config @@ -12,7 +12,7 @@ window-padding-y = 14 confirm-close-surface=false resize-overlay = never -# Cursor stlying +# Cursor styling cursor-style = "block" cursor-style-blink = false shell-integration-features = no-cursor diff --git a/config/hypr/input.conf b/config/hypr/input.conf index 2a2d25c9..ca5f1f5e 100644 --- a/config/hypr/input.conf +++ b/config/hypr/input.conf @@ -27,8 +27,9 @@ input { } } -# Scroll faster in the terminal -windowrule = scrolltouchpad 1.5, tag:terminal +# Scroll nicely in the terminal +windowrule = scrolltouchpad 1.5, class:(Alacritty|kitty) +windowrule = scrolltouchpad 0.2, class:com.mitchellh.ghostty # Enable touchpad gestures for changing workspaces # See https://wiki.hyprland.org/Configuring/Gestures/ diff --git a/config/hypr/looknfeel.conf b/config/hypr/looknfeel.conf index 1816d776..39022b89 100644 --- a/config/hypr/looknfeel.conf +++ b/config/hypr/looknfeel.conf @@ -15,3 +15,9 @@ decoration { # Use round window corners # rounding = 8 } + +# https://wiki.hypr.land/Configuring/Dwindle-Layout/ +dwindle { + # Avoid overly wide single-window layouts on wide screens + # single_window_aspect_ratio = 1 1 +} diff --git a/default/hypr/apps/system.conf b/default/hypr/apps/system.conf index a718c951..cfbfe5ee 100644 --- a/default/hypr/apps/system.conf +++ b/default/hypr/apps/system.conf @@ -4,7 +4,7 @@ windowrule = center, tag:floating-window windowrule = size 800 600, tag:floating-window windowrule = tag +floating-window, class:(blueberry.py|Impala|Wiremix|org.gnome.NautilusPreviewer|com.gabm.satty|Omarchy|About|TUI.float) -windowrule = tag +floating-window, class:(xdg-desktop-portal-gtk|sublime_text|DesktopEditors|org.gnome.Nautilus), title:^(Open.*Files?|Open Folder|Save.*Files?|Save.*As|Save|All Files) +windowrule = tag +floating-window, class:(xdg-desktop-portal-gtk|sublime_text|DesktopEditors|org.gnome.Nautilus), title:^(Open.*Files?|Open [F|f]older.*|Save.*Files?|Save.*As|Save|All Files) # Fullscreen screensaver windowrule = fullscreen, class:Screensaver diff --git a/default/hypr/looknfeel.conf b/default/hypr/looknfeel.conf index 254051f4..9b8f3077 100644 --- a/default/hypr/looknfeel.conf +++ b/default/hypr/looknfeel.conf @@ -87,3 +87,8 @@ misc { disable_splash_rendering = true focus_on_activate = true } + +# https://wiki.hypr.land/Configuring/Variables/#cursor +cursor { + hide_on_key_press = true +} diff --git a/install/config/all.sh b/install/config/all.sh index 1336dee3..a9affb79 100644 --- a/install/config/all.sh +++ b/install/config/all.sh @@ -24,6 +24,6 @@ run_logged $OMARCHY_INSTALL/config/hardware/usb-autosuspend.sh run_logged $OMARCHY_INSTALL/config/hardware/ignore-power-button.sh run_logged $OMARCHY_INSTALL/config/hardware/nvidia.sh run_logged $OMARCHY_INSTALL/config/hardware/fix-f13-amd-audio-input.sh -run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-bcm4360.sh +run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-bcm43xx.sh run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-spi-keyboard.sh run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-t2.sh diff --git a/install/config/hardware/fix-apple-bcm4360.sh b/install/config/hardware/fix-apple-bcm4360.sh deleted file mode 100644 index f7d6d324..00000000 --- a/install/config/hardware/fix-apple-bcm4360.sh +++ /dev/null @@ -1,5 +0,0 @@ -# Install wifi drivers for 2013-2015 MacBooks using the BCM4360 chip -if lspci -nnv | grep -A2 "14e4:43a0" | grep -q "106b:"; then - echo "Apple BCM4360 detected" - sudo pacman -S --noconfirm --needed broadcom-wl dkms linux-headers -fi diff --git a/install/config/hardware/fix-apple-bcm43xx.sh b/install/config/hardware/fix-apple-bcm43xx.sh new file mode 100644 index 00000000..1311a491 --- /dev/null +++ b/install/config/hardware/fix-apple-bcm43xx.sh @@ -0,0 +1,11 @@ +# Install Wi-Fi drivers for Broadcom chips on MacBooks: +# - BCM4360 (2013–2015) +# - BCM4331 (2012, early 2013) + +pci_info=$(lspci -nnv) + +if echo "$pci_info" | grep -q "106b:" && + (echo "$pci_info" | grep -q "14e4:43a0" || echo "$pci_info" | grep -q "14e4:4331"); then + echo "Apple BCM4360 / BCM4331 detected" + sudo pacman -S --noconfirm --needed broadcom-wl dkms linux-headers +fi diff --git a/install/config/hardware/fix-apple-spi-keyboard.sh b/install/config/hardware/fix-apple-spi-keyboard.sh index f549669f..19fd88f6 100644 --- a/install/config/hardware/fix-apple-spi-keyboard.sh +++ b/install/config/hardware/fix-apple-spi-keyboard.sh @@ -1,7 +1,12 @@ # Detect MacBook models that need SPI keyboard modules -if [[ "$(cat /sys/class/dmi/id/product_name 2>/dev/null)" =~ MacBook12,1|MacBookPro13,[123]|MacBookPro14,[123] ]]; then +product_name="$(cat /sys/class/dmi/id/product_name 2>/dev/null)" +if [[ "$product_name" =~ MacBook[89],1|MacBook1[02],1|MacBookPro13,[123]|MacBookPro14,[123] ]]; then echo "Detected MacBook with SPI keyboard" sudo pacman -S --noconfirm --needed macbook12-spi-driver-dkms - echo "MODULES=(applespi intel_lpss_pci spi_pxa2xx_platform)" | sudo tee /etc/mkinitcpio.conf.d/macbook_spi_modules.conf >/dev/null + if [[ "$product_name" == "MacBook8,1" ]]; then + echo "MODULES=(applespi spi_pxa2xx_platform spi_pxa2xx_pci)" | sudo tee /etc/mkinitcpio.conf.d/macbook_spi_modules.conf >/dev/null + else + echo "MODULES=(applespi intel_lpss_pci spi_pxa2xx_platform)" | sudo tee /etc/mkinitcpio.conf.d/macbook_spi_modules.conf >/dev/null + fi fi diff --git a/install/iso.sh b/install/iso.sh deleted file mode 100644 index 7676ccc0..00000000 --- a/install/iso.sh +++ /dev/null @@ -1,14 +0,0 @@ -# Called by Omarchy ISO setup before starting configurator and archinstall - -source "$OMARCHY_INSTALL/preflight/set-size-vars.sh" -source "$OMARCHY_INSTALL/helpers/logo.sh" -source "$OMARCHY_INSTALL/preflight/gum.sh" -source "$OMARCHY_INSTALL/helpers/tail-log-output.sh" -source "$OMARCHY_INSTALL/helpers/trap-errors.sh" - -source $OMARCHY_INSTALL/helpers/chroot.sh -source $OMARCHY_INSTALL/helpers/logo.sh -source $OMARCHY_INSTALL/helpers/gum.sh -source $OMARCHY_INSTALL/helpers/errors.sh -source $OMARCHY_INSTALL/helpers/logging.sh -source $OMARCHY_INSTALL/helpers/layout.sh diff --git a/themes/matte-black/ghostty.conf b/themes/matte-black/ghostty.conf index 574e6577..85c69b15 100644 --- a/themes/matte-black/ghostty.conf +++ b/themes/matte-black/ghostty.conf @@ -1,3 +1,12 @@ +background = #121212 +foreground = #BEBEBE + +cursor-color = #EAEAEA +cursor-text = #121212 + +selection-background = #333333 +selection-foreground = #EAEAEA + # normal colors palette = 0=#333333 palette = 1=#D35F5F diff --git a/themes/matte-black/vscode.json b/themes/matte-black/vscode.json index ac592f5f..7786fc79 100644 --- a/themes/matte-black/vscode.json +++ b/themes/matte-black/vscode.json @@ -1,4 +1,4 @@ { - "name": "MatteBlack", + "name": "Matte Black", "extension": "TahaYVR.matteblack" }