Compare commits

...

70 Commits

Author SHA1 Message Date
David Heinemeier Hansson
79dc4c4b52 Reminder to add to OPR 2026-01-19 17:09:55 -04:00
David Heinemeier Hansson
3678b27170 Prevent race condition 2026-01-19 14:16:21 -04:00
David Heinemeier Hansson
08fead671e Merge branch 'dev' into toggle-hybrid-gpu 2026-01-19 14:07:36 -04:00
David Heinemeier Hansson
4701726c83 Split out removing orphan packages as well
And make sure failed AUR update doesn't fail the update entirely
2026-01-19 12:21:06 -05:00
David Heinemeier Hansson
bfc3c69cf1 Update AUR packages after system pkgs + migrate
As AUR packages need local compiling and that might fail. Which
shouldn't prevent migrations from running.
2026-01-19 10:49:46 -05:00
David Heinemeier Hansson
df65a4aaef Relying on the new config should be enough since we are restarting anyway 2026-01-17 15:00:20 -05:00
David Heinemeier Hansson
b218655301 No need for extensions
Matches existing style
2026-01-17 14:57:55 -05:00
David Heinemeier Hansson
5fac51272c Make it exe 2026-01-17 14:56:34 -05:00
David Heinemeier Hansson
4921d68ee1 These are sudo actions 2026-01-17 14:53:54 -05:00
David Heinemeier Hansson
7e18659cd6 Spacing 2026-01-17 14:53:00 -05:00
David Heinemeier Hansson
989229d515 Merge branch 'dev' into toggle-hybrid-gpu 2026-01-17 14:50:32 -05:00
David Heinemeier Hansson
21514dc577 Turn audio soft mixing into an opt-in toggle
It causes issues on some machines, but is required on the Asus G14
2026-01-17 14:43:59 -05:00
David Heinemeier Hansson
64f7880b08 Revise switching process 2026-01-17 14:30:08 -05:00
David Heinemeier Hansson
8e21a5341f Wording 2026-01-15 18:02:55 -05:00
David Heinemeier Hansson
e73f56b1b1 Simplify 2026-01-15 18:01:15 -05:00
David Heinemeier Hansson
16edd8982b Use correct exit 2026-01-15 17:59:26 -05:00
David Heinemeier Hansson
06d06c0c3d Toggle hybrid GPU mode via supergfxctl
Very useful for Asus G14 and other laptops with NVIDIA + AMD iGPU
combos.
2026-01-15 17:56:08 -05:00
David Heinemeier Hansson
5ff76df5e4 Ensure default routes don't overwrite the ffix 2026-01-14 19:53:28 -05:00
David Heinemeier Hansson
bab0004d08 Fix volume controls on Asus G14 2026-01-14 17:40:53 -05:00
David Heinemeier Hansson
93079858f1 Extract shared swayosd helper 2026-01-14 17:21:10 -05:00
David Heinemeier Hansson
4287472e02 Simplify 2026-01-14 17:11:50 -05:00
David Heinemeier Hansson
291786d36a Set brightness in a more broadly compatible way
Fixes brightness setting on the Asus G14
2026-01-14 16:37:22 -05:00
Pierre Olivier Martel
05b82cbee5 Add headset icon to pulseaudio module in waybar (#4244) 2026-01-13 11:28:04 +01:00
Yaroslav Yenkala
1ff31cfe41 Automatic fallback to Alacritty for legacy GPUs when install Omarchy (#3711)
* Use alacritty when legacy gpu when install omarchy

* Inline legacy GPU detection, install Alacritty only when needed
2026-01-12 12:24:16 +01:00
David Heinemeier Hansson
cd995319bf Add img2jpg-medium 2026-01-12 11:50:07 +01:00
David Heinemeier Hansson
281f0b86d2 Add new default wallpaper for Tokyo Night
Created by @Maxteabag
Closes #4221
2026-01-12 11:20:33 +01:00
David Heinemeier Hansson
55668f4c6d Use just a single capture menu instead 2026-01-12 10:59:55 +01:00
David Heinemeier Hansson
9c71962a16 Add Super + Ctrl + P (and friends) as alternative keybinds for captures on keyboards without a printscr key
Closes #4051
2026-01-12 10:57:04 +01:00
Ryan Hughes
7d77500c33 Eliminate rdp check causing black screen 2026-01-10 22:39:01 -05:00
Ryan Hughes
fb1d9ccfa3 Merge pull request #4217 from arcangelo7/fix/windows-vm-clipboard-sharing
Enable clipboard sharing for Windows VM
2026-01-10 22:38:54 -05:00
Ryan Hughes
2f75e9c7ec Merge pull request #3958 from felixzsh/fix-windows-vm-lauch-sleep
fix: dynamic Windows VM boot synchronization for RDP
2026-01-10 22:17:10 -05:00
felixzsh
b22ed8448a fix: dynamic windows-vm boot detection
The current 5-second sleep is not enough for all hardware. On my PC (and
likely many others), Windows takes longer to initialize. If the script
tries to connect via RDP before Windows is fully ready, the connection
fails or hangs.

I replaced the fixed sleep with a dynamic loop that checks the Docker
logs for the "Windows started successfully" message. This ensures the
RDP client only starts once Windows has confirmed it's ready, making the
launch process much more reliable across different hardware specs.

Fixes #2599
2026-01-10 22:14:19 -05:00
David Heinemeier Hansson
a0d2f007fd Specialize waybar to match the backgrounds better 2026-01-10 21:08:57 +01:00
Arcangelo Massari
955844cb5d feat(windows-vm): enable clipboard sharing in RDP session
Add /clipboard flag to xfreerdp3 command to enable bidirectional
clipboard sharing between Windows VM and Omarchy.
2026-01-10 19:49:54 +01:00
David Heinemeier Hansson
295c7c91fc Fix concatenation 2026-01-10 14:33:36 +01:00
Will Hampson
bc1a531534 fix: skill name must match case of skill directory exactly (#4162) 2026-01-09 15:40:56 +01:00
Dominik
4cec214a53 Replace yq with pure bash for TOML parsing (#4171)
* Replace yq with pure bash for TOML parsing

The yq-based parsing only worked with jq/yq v3 and broke with go-yq v4.
This change removes the yq and uses bash for parsing. Some additional improvments:
- Handles single and double quoted values
- Strips inline comments (e.g. "#hex" #comment)

* Remove the no-longer-needed yq packages

---------

Co-authored-by: David Heinemeier Hansson <david@hey.com>
2026-01-09 15:39:07 +01:00
David Heinemeier Hansson
0b5ba427b2 Merge branch 'master' into dev 2026-01-09 15:32:56 +01:00
David Heinemeier Hansson
53b8fc4257 Ensure we reset the DBs with the Omarchy versions 2026-01-09 14:34:38 +01:00
David Heinemeier Hansson
dcb9527770 Ensure we reset the DBs with the Omarchy versions 2026-01-09 14:34:29 +01:00
Ryan Hughes
6c35e840f5 Version bump 2026-01-08 22:27:03 -05:00
Ryan Hughes
da984ce243 Fix infinite waiting 2026-01-08 22:26:52 -05:00
Ryan Hughes
65bafa4f3b Bump 2026-01-08 19:33:06 -05:00
Ryan Hughes
f5a35a1afe Bump 2026-01-08 19:32:32 -05:00
Ryan Hughes
c9b3e13df8 Merge pull request #4174 from basecamp/dev
v3.3.3
2026-01-08 18:51:48 -05:00
Ryan Hughes
9775b01070 Don't update gcc14 2026-01-08 18:49:41 -05:00
Ryan Hughes
b42dcf098b Merge pull request #4170 from basecamp/dev
v3.3.2
2026-01-08 17:18:41 -05:00
Ryan Hughes
6ae31aedae Update message 2026-01-08 17:17:32 -05:00
Ryan Hughes
63b0cd64bd Add update logger w/ analysis 2026-01-08 16:52:49 -05:00
Ryan Hughes
bf779a6bbc Add additional hardening for missing headers 2026-01-08 15:28:56 -05:00
Ryan Hughes
774b4700ef Extra hardening the driver swap 2026-01-08 13:44:34 -05:00
Ryan Hughes
400a87955e Use omarchy-pkg-add 2026-01-08 13:41:20 -05:00
David Heinemeier Hansson
fe48a16a90 Correct the accent color 2026-01-08 15:02:05 +01:00
David Heinemeier Hansson
78ef351269 Merge pull request #4148 from basecamp/dev
Omarchy 3.3.1
2026-01-08 13:51:47 +01:00
David Heinemeier Hansson
558cd68810 Bump version 2026-01-08 13:44:54 +01:00
David Heinemeier Hansson
067ec2bd71 Fix migration for when current theme is a directory, not a symlink
Closes #4147
2026-01-08 13:41:26 +01:00
David Heinemeier Hansson
ec4cd81e63 Fix the singletonlock issue properly 2026-01-08 13:18:55 +01:00
David Heinemeier Hansson
7c0a05cc70 Remove the SingletonLock that's present for some reason on new ISO installs
Closes #4149
2026-01-08 13:15:16 +01:00
David Heinemeier Hansson
70bdbfe545 Fix kitty cursor shape to match alacritty + ghostty 2026-01-08 10:49:44 +01:00
David Heinemeier Hansson
72b3b930c7 Drop the needless active_border_color/active_tab_background settings in favor of just using accent
Closes #4121
2026-01-08 10:32:21 +01:00
David Heinemeier Hansson
e08301dee2 Remove opencode binding (prefer c alias in terminal)
Closes #4124
2026-01-08 10:26:07 +01:00
David Heinemeier Hansson
9fc65dd2de Simplify the VSCode/derivatives theme setting 2026-01-08 10:22:10 +01:00
David Heinemeier Hansson
5603fb50fd Dramatically simplify omarchy-theme-set-obsidian
The cost is that only themes with a colors.toml file will get Obsidian
themeing.
2026-01-08 10:16:14 +01:00
David Heinemeier Hansson
037f034ece Merge pull request #4141 from timohubois/fix-migration-1767138576
fix(migrations-1767138576): split sed commands in scrolltouchpad migration
2026-01-08 10:00:19 +01:00
David Heinemeier Hansson
e95f8f2847 Merge pull request #4138 from Nm1ss/patch-1
Fix NVIDIA Legacy Driver for Older Professional/Workstation GPUs
2026-01-08 09:58:43 +01:00
Timo Hubois
8826aa10ca fix(migrations-1767138576): split sed commands in scrolltouchpad migration
The sed expression for converting scrolltouchpad syntax to Hyprland 0.53
format was broken across two lines, causing the second substitution
pattern to fail silently. Split into separate sed commands to ensure
both class:(pattern) and class:pattern formats are migrated correctly.
2026-01-08 09:34:38 +01:00
David Heinemeier Hansson
2851687bbb Fix use of accent colors 2026-01-08 09:18:22 +01:00
George
e25a00a38c Update NVIDIA GPU detection for legacy support on professional/workstation cards 2026-01-08 07:53:11 +01:00
David Heinemeier Hansson
7d9858a013 Run the gcc14 removal as early as possible 2026-01-07 23:51:08 +01:00
David Heinemeier Hansson
95bfb16cd4 Hotfix to remove gcc14 AUR package that would take eons to update 2026-01-07 22:05:54 +01:00
63 changed files with 455 additions and 835 deletions

View File

@@ -5,12 +5,8 @@
if [[ $# -eq 0 ]]; then if [[ $# -eq 0 ]]; then
echo "Adjust Apple Display Brightness by passing +5000 or -5000 (or any range from 0-60000)" echo "Adjust Apple Display Brightness by passing +5000 or -5000 (or any range from 0-60000)"
else else
DEVICE="$(sudo asdcontrol --detect /dev/usb/hiddev* | grep ^/dev/usb/hiddev | cut -d: -f1)" device="$(sudo asdcontrol --detect /dev/usb/hiddev* | grep ^/dev/usb/hiddev | cut -d: -f1)"
sudo asdcontrol "$DEVICE" -- "$1" >/dev/null sudo asdcontrol "$device" -- "$1" >/dev/null
VALUE="$(sudo asdcontrol "$DEVICE" | awk -F= '/BRIGHTNESS=/{print $2+0}')" value="$(sudo asdcontrol "$device" | awk -F= '/BRIGHTNESS=/{print $2+0}')"
swayosd-client \ omarchy-swayosd-brightness "$(( value * 100 / 60000 ))"
--monitor "$(hyprctl monitors -j | jq -r '.[]|select(.focused==true).name')" \
--custom-icon display-brightness \
--custom-progress "$(awk -v v="$VALUE" 'BEGIN{printf "%.2f", v/60000}')" \
--custom-progress-text "$(( VALUE * 100 / 60000 ))%"
fi fi

21
bin/omarchy-cmd-brightness Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
# Adjust brightness on the most likely display device.
# Usage: omarchy-cmd-brightness <step>
step="${1:-+5%}"
# Start with the first possible output, then refine to the most likely given an order heuristic.
device="$(ls -1 /sys/class/backlight 2>/dev/null | head -n1)"
for candidate in amdgpu_bl* intel_backlight acpi_video*; do
if [[ -e "/sys/class/backlight/$candidate" ]]; then
device="$candidate"
break
fi
done
# Set the actual brightness of the display device.
brightnessctl -d "$device" set "$step" >/dev/null
# Use SwayOSD to display the new brightness setting.
omarchy-swayosd-brightness "$(brightnessctl -d "$device" -m | cut -d',' -f4 | tr -d '%')"

View File

@@ -88,10 +88,11 @@ show_learn_menu() {
} }
show_trigger_menu() { show_trigger_menu() {
case $(menu "Trigger" " Capture\n Share\n󰔎 Toggle") in case $(menu "Trigger" " Capture\n Share\n󰔎 Toggle\n Tweaks") in
*Capture*) show_capture_menu ;; *Capture*) show_capture_menu ;;
*Share*) show_share_menu ;; *Share*) show_share_menu ;;
*Toggle*) show_toggle_menu ;; *Toggle*) show_toggle_menu ;;
*Tweaks*) show_tweaks_menu ;;
*) show_main_menu ;; *) show_main_menu ;;
esac esac
} }
@@ -143,6 +144,13 @@ show_toggle_menu() {
esac esac
} }
show_tweaks_menu() {
case $(menu "Tweaks" " Toggle Hybrid GPU") in
*"Toggle Hybrid GPU"*) present_terminal omarchy-toggle-hybrid-gpu ;;
*) show_trigger_menu ;;
esac
}
show_style_menu() { show_style_menu() {
case $(menu "Style" "󰸌 Theme\n Font\n Background\n Hyprland\n󱄄 Screensaver\n About") in case $(menu "Style" "󰸌 Theme\n Font\n Background\n Hyprland\n󱄄 Screensaver\n About") in
*Theme*) show_theme_menu ;; *Theme*) show_theme_menu ;;
@@ -543,6 +551,7 @@ go_to_menu() {
*learn*) show_learn_menu ;; *learn*) show_learn_menu ;;
*trigger*) show_trigger_menu ;; *trigger*) show_trigger_menu ;;
*share*) show_share_menu ;; *share*) show_share_menu ;;
*capture*) show_capture_menu ;;
*style*) show_style_menu ;; *style*) show_style_menu ;;
*theme*) show_theme_menu ;; *theme*) show_theme_menu ;;
*screenshot*) show_screenshot_menu ;; *screenshot*) show_screenshot_menu ;;

12
bin/omarchy-swayosd-brightness Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
# Display brightness level using SwayOSD on the current monitor.
# Usage: omarchy-swayosd-brightness <percent>
percent="$1"
swayosd-client \
--monitor "$(hyprctl monitors -j | jq -r '.[]|select(.focused==true).name')" \
--custom-icon display-brightness \
--custom-progress "$(awk -v p="$percent" 'BEGIN{printf "%.2f", p/100}')" \
--custom-progress-text "${percent}%"

View File

@@ -56,8 +56,6 @@ omarchy-restart-mako
omarchy-theme-set-gnome omarchy-theme-set-gnome
omarchy-theme-set-browser omarchy-theme-set-browser
omarchy-theme-set-vscode omarchy-theme-set-vscode
omarchy-theme-set-vscodium
omarchy-theme-set-cursor
omarchy-theme-set-obsidian omarchy-theme-set-obsidian
# Call hook on theme set # Call hook on theme set

View File

@@ -1,4 +0,0 @@
#!/bin/bash
# Call the VSCode theme setter with Cursor-specific parameters
omarchy-theme-set-vscode cursor "$HOME/.config/Cursor/User/settings.json" "$HOME/.local/state/omarchy/toggles/skip-cursor-theme-changes"

View File

@@ -1,52 +1,18 @@
#!/bin/bash #!/bin/bash
# omarchy-theme-set-obsidian: Bootstrap and update Omarchy theme for Obsidian # Sync Omarchy theme to all Obsidian vaults
#
# - Ensures registry at ~/.local/state/omarchy/obsidian-vaults
# - Populates by extracting vault paths from ~/.config/obsidian/obsidian.json
# - For each valid vault:
# - Ensures .obsidian/themes/Omarchy/{manifest.json, theme.css}
# - Updates theme.css (uses current themes obsidian.css if present; otherwise generates -- see below)
# Theme automagic generation logic:
#
# - Background/foreground: read from ~/.config/omarchy/current/theme/alacritty.toml [colors.primary]
# (background/foreground). Fallbacks: bg=#1a1b26, fg=#a9b1d6. Compute bg brightness for light/dark handling.
# - Palette extraction: collect colors from Alacritty (primary/normal/bright/dim/selection), Waybar (@define-color),
# and Hyprland (col.*_border; rgba->hex). Normalize, dedupe, and count frequencies.
# - Slot ordering: remove bg/fg, sort remaining colors by frequency, then fill 13 slots by cycling. Map slots to:
# h1h6, links, inline code, marks, interactive accent, blockquote border; muted/faint use border color.
# - Code colors: code background = closest color to bg (Euclidean RGB); if none, make a subtle bg variant (+/ RGB).
# code foreground = closest color to fg; fallback #e0e0e0.
# - Border color: from btop.theme theme[div_line]; else blended mix biased toward bg (≈ (bg+fg)/3).
# - Selection: from Alacritty [colors.selection] (background/text), honoring CellForeground/Background.
# If missing, background = 75% bg + 25% fg; text chosen for contrast vs selection background.
# - Fonts: monospace from Alacritty [font] or fontconfig monospace; UI font from fontconfig sans-serif.
VAULTS_FILE="$HOME/.local/state/omarchy/obsidian-vaults"
CURRENT_THEME_DIR="$HOME/.config/omarchy/current/theme" CURRENT_THEME_DIR="$HOME/.config/omarchy/current/theme"
ensure_vaults_file() { [ -f "$CURRENT_THEME_DIR/obsidian.css" ] || exit 0
mkdir -p "$(dirname "$VAULTS_FILE")"
local tmpfile
tmpfile="$(mktemp)"
# Extract the Obsidian vault location from config file <base>/<vault>/.obsidian
jq -r '.vaults | values[].path' ~/.config/obsidian/obsidian.json 2>/dev/null >>"$tmpfile"
if [ -s "$tmpfile" ]; then
sort -u "$tmpfile" >"$VAULTS_FILE"
else
: >"$VAULTS_FILE"
fi
rm "$tmpfile"
}
# Ensure theme directory and minimal manifest exist in a vault jq -r '.vaults | values[].path' ~/.config/obsidian/obsidian.json 2>/dev/null | while read -r vault_path; do
ensure_theme_scaffold() { [ -d "$vault_path/.obsidian" ] || continue
local vault_path="$1"
local theme_dir="$vault_path/.obsidian/themes/Omarchy" theme_dir="$vault_path/.obsidian/themes/Omarchy"
mkdir -p "$theme_dir" mkdir -p "$theme_dir"
if [ ! -f "$theme_dir/manifest.json" ]; then
cat >"$theme_dir/manifest.json" <<'EOF' [ -f "$theme_dir/manifest.json" ] || cat >"$theme_dir/manifest.json" <<'EOF'
{ {
"name": "Omarchy", "name": "Omarchy",
"version": "1.0.0", "version": "1.0.0",
@@ -56,624 +22,6 @@ ensure_theme_scaffold() {
"authorUrl": "https://omarchy.org" "authorUrl": "https://omarchy.org"
} }
EOF EOF
fi
[ -f "$theme_dir/theme.css" ] || : >"$theme_dir/theme.css"
}
# Function to extract hex color from string cp "$CURRENT_THEME_DIR/obsidian.css" "$theme_dir/theme.css"
extract_hex_color() { done
echo "$1" | grep -oE '#[0-9a-fA-F]{6}' | head -1
}
# Function to convert RGB/RGBA to hex
rgb_to_hex() {
local rgb_string="$1"
if [[ $rgb_string =~ rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+) ]]; then
printf "#%02x%02x%02x\n" "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}" "${BASH_REMATCH[3]}"
fi
}
# Convert hex to RGB components
hex_to_rgb() {
local hex="${1#\#}"
printf "%d %d %d\n" "0x${hex:0:2}" "0x${hex:2:2}" "0x${hex:4:2}"
}
# Calculate perceived brightness (0-255)
calculate_brightness() {
local hex="$1"
read -r r g b <<<"$(hex_to_rgb "$hex")"
# Use perceived brightness formula
echo $(((r * 299 + g * 587 + b * 114) / 1000))
}
# Calculate approximate contrast ratio between two colors
# Returns ratio scaled by 100 (e.g., 450 = 4.5:1 ratio)
# (this is due to bash not supporting decimal math)
calculate_contrast_ratio() {
local hex1="$1" hex2="$2"
local br1=$(calculate_brightness "$hex1") # 0-255 range
local br2=$(calculate_brightness "$hex2") # 0-255 range
# Ensure br1 is the lighter color (higher brightness)
if [ $br1 -lt $br2 ]; then
local temp=$br1
br1=$br2
br2=$temp
fi
# Approximate contrast ratio scaled by 100
# Add offset to avoid division by zero and approximate WCAG +0.05 behavior
echo $(((br1 + 13) * 100 / (br2 + 13)))
}
# Check if two colors meet minimum contrast threshold
# Usage: meets_contrast_threshold <ratio> <threshold>
# Both ratio and threshold should be scaled by 100 (e.g., 300 = 3:1)
meets_contrast_threshold() {
local ratio="$1" # Ratio scaled by 100 (from calculate_contrast_ratio)
local threshold="$2" # Threshold scaled by 100 (300=3:1, 450=4.5:1, 700=7:1)
[ $ratio -ge $threshold ]
}
# Calculate color distance (euclidean in RGB space)
color_distance() {
local hex1="$1"
local hex2="$2"
read -r r1 g1 b1 <<<"$(hex_to_rgb "$hex1")"
read -r r2 g2 b2 <<<"$(hex_to_rgb "$hex2")"
echo $(((r1 - r2) * (r1 - r2) + (g1 - g2) * (g1 - g2) + (b1 - b2) * (b1 - b2)))
}
# Extract all colors with frequency count
extract_all_colors_with_count() {
local -A color_counts
local color
# Extract from Alacritty config
if [ -f "$CURRENT_THEME_DIR/alacritty.toml" ]; then
# Primary colors
while IFS= read -r color; do
color=$(echo "$color" | tr '[:upper:]' '[:lower:]') # Lowercase for consistency
[ -n "$color" ] && ((color_counts["$color"]++))
done < <(grep -E "(background|foreground|cursor|text)" "$CURRENT_THEME_DIR/alacritty.toml" | sed "s/.*[\"']0x/#/;s/.*[\"']#/#/;s/[\"'].*//;s/.*#\([0-9a-fA-F]\{6\}\).*/\#\1/" | grep "^#")
# Normal colors
while IFS= read -r color; do
color=$(echo "$color" | tr '[:upper:]' '[:lower:]') # Lowercase for consistency
[ -n "$color" ] && ((color_counts["$color"]++))
done < <(grep -A 20 "\[colors.normal\]" "$CURRENT_THEME_DIR/alacritty.toml" | grep -E "(black|red|green|yellow|blue|magenta|cyan|white)" | sed "s/.*[\"']0x/#/;s/.*[\"']#/#/;s/[\"'].*//;s/.*#\([0-9a-fA-F]\{6\}\).*/\#\1/" | grep "^#")
# Bright colors
while IFS= read -r color; do
# Add # if missing
[[ "$color" =~ ^[0-9a-fA-F]{6}$ ]] && color="#$color"
color=$(echo "$color" | tr '[:upper:]' '[:lower:]') # Lowercase for consistency
[[ "$color" =~ ^#[0-9a-f]{6}$ ]] && ((color_counts["$color"]++))
done < <(grep -A 20 "\[colors.bright\]" "$CURRENT_THEME_DIR/alacritty.toml" | grep -E "(black|red|green|yellow|blue|magenta|cyan|white)" | sed "s/.*[\"']//;s/[\"'].*//")
# Dim colors if present
while IFS= read -r color; do
# Add # if missing
[[ "$color" =~ ^[0-9a-fA-F]{6}$ ]] && color="#$color"
color=$(echo "$color" | tr '[:upper:]' '[:lower:]') # Lowercase for consistency
[[ "$color" =~ ^#[0-9a-f]{6}$ ]] && ((color_counts["$color"]++))
done < <(grep -A 20 "\[colors.dim\]" "$CURRENT_THEME_DIR/alacritty.toml" 2>/dev/null | grep -E "(black|red|green|yellow|blue|magenta|cyan|white)" | sed "s/.*[\"']//;s/[\"'].*//")
# Selection colors
while IFS= read -r color; do
color=$(echo "$color" | tr '[:upper:]' '[:lower:]') # Lowercase for consistency
[ -n "$color" ] && ((color_counts["$color"]++))
done < <(grep -A 5 "\[colors.selection\]" "$CURRENT_THEME_DIR/alacritty.toml" 2>/dev/null | grep -E "(background|text)" | sed "s/.*[\"']0x/#/;s/.*[\"']#/#/;s/[\"'].*//;s/.*#\([0-9a-fA-F]\{6\}\).*/\#\1/" | grep "^#")
fi
# Extract from Waybar CSS
if [ -f "$CURRENT_THEME_DIR/waybar.css" ]; then
while IFS= read -r color; do
color=$(echo "$color" | tr '[:upper:]' '[:lower:]') # Lowercase for consistency
[ -n "$color" ] && ((color_counts["$color"]++))
done < <(grep -oE '@define-color [a-z_-]+ #[0-9a-fA-F]{6}' "$CURRENT_THEME_DIR/waybar.css" | grep -oE '#[0-9a-fA-F]{6}')
fi
# Extract from Hyprland config
if [ -f "$CURRENT_THEME_DIR/hyprland.conf" ]; then
while IFS= read -r color; do
if [[ $color == rgba* ]] || [[ $color == rgb* ]]; then
color=$(rgb_to_hex "$color")
fi
color=$(echo "$color" | tr '[:upper:]' '[:lower:]') # Lowercase for consistency
[ -n "$color" ] && ((color_counts["$color"]++))
done < <(grep -E "col\.(active|inactive)_border" "$CURRENT_THEME_DIR/hyprland.conf" | grep -oE 'rgba?\([^)]+\)|#[0-9a-fA-F]{6,8}' | sed 's/ff$//')
fi
# Output colors with their counts
for color in "${!color_counts[@]}"; do
echo "${color_counts[$color]} $color"
done
}
# Sort colors by frequency
sort_colors_by_frequency() {
# Input is already "count color" format
sort -rn | cut -d' ' -f2
}
# Fill color slots with cycling if needed
fill_color_slots() {
local -a colors=("$@")
local -a slots
local num_colors=${#colors[@]}
# Need 13 slots total (code colors are handled separately)
local slots_needed=13
if [ $num_colors -eq 0 ]; then
# No colors available, use defaults
colors=("#3d3d3d" "#5d5d5d" "#7d7d7d" "#9d9d9d" "#bd93f9" "#50fa7b")
num_colors=6
fi
# Fill slots, cycling if necessary
for ((i = 0; i < slots_needed; i++)); do
slots[$i]="${colors[$((i % num_colors))]}"
done
echo "${slots[@]}"
}
# Main color extraction and theme generation
extract_theme_data() {
# Get primary colors from Alacritty
local bg_color="#1a1b26"
local fg_color="#a9b1d6"
if [ -f "$CURRENT_THEME_DIR/alacritty.toml" ]; then
local extracted_bg=$(grep -A 5 "\[colors.primary\]" "$CURRENT_THEME_DIR/alacritty.toml" | grep "^background = " | sed "s/.*[\"']0x/#/;s/.*[\"']#/#/;s/[\"'].*//;s/.*#\([0-9a-fA-F]\{6\}\).*/\#\1/" | head -1 | tr '[:upper:]' '[:lower:]')
local extracted_fg=$(grep -A 5 "\[colors.primary\]" "$CURRENT_THEME_DIR/alacritty.toml" | grep "^foreground = " | sed "s/.*[\"']0x/#/;s/.*[\"']#/#/;s/[\"'].*//;s/.*#\([0-9a-fA-F]\{6\}\).*/\#\1/" | head -1 | tr '[:upper:]' '[:lower:]')
[ -n "$extracted_bg" ] && bg_color="$extracted_bg"
[ -n "$extracted_fg" ] && fg_color="$extracted_fg"
fi
# Determine if light or dark theme
local bg_brightness=$(calculate_brightness "$bg_color")
local is_light_theme=false
[ $bg_brightness -gt 127 ] && is_light_theme=true
# Extract all colors with counts
local color_data=$(extract_all_colors_with_count)
# Filter out background and foreground colors for the main array
local filtered_data=$(echo "$color_data" | grep -v "$bg_color" | grep -v "$fg_color")
# Get all unique colors (including bg/fg) for distance calculations
local -a all_unique_colors
readarray -t all_unique_colors < <(echo "$color_data" | cut -d' ' -f2 | sort -u)
# Find the 3 closest colors to background for background variations
local -a bg_distances
for color in "${all_unique_colors[@]}"; do
if [ "$color" != "$bg_color" ]; then
distance=$(color_distance "$color" "$bg_color")
bg_distances+=("$distance:$color")
fi
done
# All background variations use the same as primary background
local bg_primary_alt="$bg_color"
local bg_secondary="$bg_color"
local bg_secondary_alt="$bg_color"
# Generate code background color that will contrast with foreground text
read -r r g b <<<"$(hex_to_rgb "$bg_color")"
if [ $bg_brightness -gt 127 ]; then
r=$((r - 10))
g=$((g - 10))
b=$((b - 10))
else
r=$((r + 15))
g=$((g + 15))
b=$((b + 15))
fi
[ $r -lt 0 ] && r=0
[ $r -gt 255 ] && r=255
[ $g -lt 0 ] && g=0
[ $g -gt 255 ] && g=255
[ $b -lt 0 ] && b=0
[ $b -gt 255 ] && b=255
code_bg=$(printf "#%02x%02x%02x" "$r" "$g" "$b")
# Find closest color to foreground for code block text
local code_fg=""
min_distance=999999999
for color in "${all_unique_colors[@]}"; do
if [ "$color" != "$fg_color" ]; then
distance=$(color_distance "$color" "$fg_color")
if [ $distance -lt $min_distance ]; then
min_distance=$distance
code_fg="$color"
fi
fi
done
[ -z "$code_fg" ] && code_fg="#e0e0e0" # Fallback
# Extract text selection colors from Alacritty
local selection_bg=""
local selection_fg=""
if [ -f "$CURRENT_THEME_DIR/alacritty.toml" ]; then
selection_bg=$(grep -A 5 "\[colors.selection\]" "$CURRENT_THEME_DIR/alacritty.toml" | grep "^background = " | sed "s/.*[\"']0x/#/;s/.*[\"']#/#/;s/[\"'].*//;s/.*#\([0-9a-fA-F]\{6\}\).*/\#\1/" | head -1 | tr '[:upper:]' '[:lower:]')
local selection_text=$(grep -A 5 "\[colors.selection\]" "$CURRENT_THEME_DIR/alacritty.toml" | grep "^text = " | sed "s/.*[\"']0x/#/;s/.*[\"']#/#/;s/[\"'].*//;s/.*#\([0-9a-fA-F]\{6\}\).*/\#\1/" | head -1 | tr '[:upper:]' '[:lower:]')
# If text is set to CellForeground/CellBackground, use the appropriate color
if [ -z "$selection_text" ] || [[ "$(grep -A 5 "\[colors.selection\]" "$CURRENT_THEME_DIR/alacritty.toml" | grep "^text = ")" == *"CellForeground"* ]]; then
selection_fg="$fg_color"
elif [[ "$(grep -A 5 "\[colors.selection\]" "$CURRENT_THEME_DIR/alacritty.toml" | grep "^text = ")" == *"CellBackground"* ]]; then
selection_fg="$bg_color"
else
selection_fg="$selection_text"
fi
fi
# Fallback if no selection colors found
if [ -z "$selection_bg" ]; then
read -r r1 g1 b1 <<<"$(hex_to_rgb "$bg_color")"
read -r r2 g2 b2 <<<"$(hex_to_rgb "$fg_color")"
local r=$(((r1 * 3 + r2) / 4)) # 75% background, 25% foreground
local g=$(((g1 * 3 + g2) / 4))
local b=$(((b1 * 3 + b2) / 4))
selection_bg=$(printf "#%02x%02x%02x" "$r" "$g" "$b")
fi
# Use contrasting color for selection text if not defined
if [ -z "$selection_fg" ]; then
# Calculate brightness of selection background
local sel_brightness=$(calculate_brightness "$selection_bg")
if [ $sel_brightness -gt 127 ]; then
selection_fg="$bg_color" # Dark text on light selection
else
selection_fg="$fg_color" # Light text on dark selection
fi
fi
# Extract border color from btop theme
local border_color=""
if [ -f "$CURRENT_THEME_DIR/btop.theme" ]; then
# Look for theme[div_line] in btop theme
local btop_divline=$(grep 'theme\[div_line\]' "$CURRENT_THEME_DIR/btop.theme" | head -1)
if [ -n "$btop_divline" ]; then
# Extract the color value after the = sign
local extracted=$(echo "$btop_divline" | sed 's/.*=//' | xargs)
# Check if it's a hex color and lowercase it
if [[ $extracted =~ ^#[0-9a-fA-F]{6}$ ]]; then
border_color=$(echo "$extracted" | tr '[:upper:]' '[:lower:]')
elif [[ $extracted =~ ^[0-9a-fA-F]{6}$ ]]; then
# Add # if missing and lowercase
border_color=$(echo "#$extracted" | tr '[:upper:]' '[:lower:]')
fi
fi
fi
# Fallback if no border color found
if [ -z "$border_color" ]; then
# Use a color between bg and fg
read -r r1 g1 b1 <<<"$(hex_to_rgb "$bg_color")"
read -r r2 g2 b2 <<<"$(hex_to_rgb "$fg_color")"
local r=$(((r1 + r2) / 3)) # Closer to background
local g=$(((g1 + g2) / 3))
local b=$(((b1 + b2) / 3))
border_color=$(printf "#%02x%02x%02x" "$r" "$g" "$b")
fi
# Set text colors for muted/faint based on contrast
local text_muted_color="$border_color"
local text_faint_color="$border_color"
# Validate border color contrast against background
# Represents a 3:1 WCAG contrast ratio
local ideal_contrast_ratio=300
local border_contrast=$(calculate_contrast_ratio "$border_color" "$bg_color")
if ! meets_contrast_threshold "$border_contrast" "$ideal_contrast_ratio"; then
# Override text colors for readability, keep border color for visibility
text_muted_color="$fg_color"
text_faint_color="$fg_color"
fi
# Get unique colors array (without bg/fg) sorted by frequency
local -a unique_colors
readarray -t unique_colors < <(echo "$filtered_data" | sort_colors_by_frequency)
# Fill the 13 color slots (code colors handled separately)
local -a color_slots
readarray -t color_slots < <(fill_color_slots "${unique_colors[@]}" | tr ' ' '\n')
# Extract fonts
local monospace_font="JetBrainsMono Nerd Font"
local ui_font="Liberation Sans"
if [ -f "$CURRENT_THEME_DIR/alacritty.toml" ]; then
local alacritty_font=$(grep -A 5 "\[font\]" "$CURRENT_THEME_DIR/alacritty.toml" | grep 'family = ' | head -1 | cut -d'"' -f2)
[ -n "$alacritty_font" ] && monospace_font="$alacritty_font"
fi
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)
[ -n "$fontconfig_mono" ] && monospace_font="$fontconfig_mono"
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)
[ -n "$fontconfig_sans" ] && ui_font="$fontconfig_sans"
fi
# Generate CSS with 14-slot system
cat <<EOF
/* Omarchy Theme for Obsidian */
/* Generated on $(date) from theme: $(basename "$(readlink "$CURRENT_THEME_DIR" 2>/dev/null || echo "unknown")") */
/* Colors sorted by frequency, backgrounds by distance */
.theme-dark, .theme-light {
/* Core colors */
--background-primary: $bg_color;
--text-normal: $fg_color;
/* Background variations (always distance-based) */
--background-primary-alt: $bg_primary_alt;
--background-secondary: $bg_secondary;
--background-secondary-alt: $bg_secondary_alt;
/* Code block colors (always distance-based) */
--code-background: $code_bg;
--code-foreground: $code_fg;
/* Border color from btop theme */
--border-color: $border_color;
/* Selection colors from Alacritty */
--text-selection: $selection_bg;
--text-selection-fg: $selection_fg;
/* 13-slot color system for remaining elements */
--text-title-h1: ${color_slots[0]};
--text-title-h2: ${color_slots[1]};
--text-title-h3: ${color_slots[2]};
--text-title-h4: ${color_slots[3]};
--text-title-h5: ${color_slots[4]};
--text-title-h6: ${color_slots[4]}; /* Same as h5 */
--text-link: ${color_slots[5]};
--markup-code: ${color_slots[6]};
--text-mark: ${color_slots[7]};
--interactive-accent: ${color_slots[8]};
--blockquote-border: ${color_slots[9]};
--text-muted: $text_muted_color; /* Use text-specific color for muted text */
--text-faint: $text_faint_color; /* Use text-specific color for faint text */
/* Additional mappings */
--text-accent: var(--interactive-accent);
--text-accent-hover: var(--interactive-accent);
--text-error: var(--text-title-h1);
--text-error-hover: var(--text-title-h1);
--text-highlight-bg: $fg_color; /* Use text color as highlight background */
--text-on-accent: $bg_color;
--interactive-normal: var(--code-background);
--interactive-hover: var(--interactive-accent);
--interactive-accent-hover: var(--interactive-accent);
--interactive-success: var(--text-title-h2);
--scrollbar-bg: var(--background-primary);
--scrollbar-thumb-bg: var(--code-background);
--scrollbar-active-thumb-bg: var(--interactive-accent);
--background-modifier-border: var(--border-color);
--background-modifier-form-field: var(--code-background);
--background-modifier-form-field-highlighted: var(--code-background);
--background-modifier-box-shadow: rgba(0, 0, 0, 0.3);
--background-modifier-success: var(--interactive-success);
--background-modifier-error: var(--text-error);
--background-modifier-error-hover: var(--text-error);
--background-modifier-cover: rgba(0, 0, 0, 0.8);
--link-color: var(--text-link);
--link-color-hover: var(--text-link);
--link-unresolved-color: var(--text-muted);
--link-unresolved-opacity: 0.7;
--tag-color: var(--text-title-h3);
--tag-background: var(--code-background);
--graph-line: var(--text-muted);
--graph-node: var(--interactive-accent);
--graph-node-unresolved: var(--text-muted);
--graph-node-focused: var(--text-link);
--graph-node-tag: var(--text-title-h3);
--graph-node-attachment: var(--text-title-h2);
/* Fonts */
--font-interface-theme: "$ui_font";
--font-text-theme: "$ui_font";
--font-monospace-theme: "$monospace_font";
}
/* Headers */
.cm-header-1, .markdown-rendered h1 { color: var(--text-title-h1); }
.cm-header-2, .markdown-rendered h2 { color: var(--text-title-h2); }
.cm-header-3, .markdown-rendered h3 { color: var(--text-title-h3); }
.cm-header-4, .markdown-rendered h4 { color: var(--text-title-h4); }
.cm-header-5, .markdown-rendered h5 { color: var(--text-title-h5); }
.cm-header-6, .markdown-rendered h6 { color: var(--text-title-h6); }
/* Code blocks */
.markdown-rendered code {
font-family: var(--font-monospace-theme);
background-color: var(--code-background);
color: var(--markup-code);
padding: 2px 4px;
border-radius: 3px;
}
.markdown-rendered pre {
background-color: var(--code-background);
border: 1px solid var(--background-modifier-border);
border-radius: 5px;
}
.markdown-rendered pre code {
background-color: transparent;
color: var(--code-foreground);
}
/* Syntax highlighting */
.cm-s-obsidian span.cm-keyword { color: var(--text-title-h1); }
.cm-s-obsidian span.cm-string { color: var(--text-title-h2); }
.cm-s-obsidian span.cm-number { color: var(--text-title-h3); }
.cm-s-obsidian span.cm-comment { color: var(--text-muted); }
.cm-s-obsidian span.cm-operator { color: var(--text-link); }
.cm-s-obsidian span.cm-variable { color: var(--text-normal); }
.cm-s-obsidian span.cm-def { color: var(--text-link); }
/* Highlighted text */
.markdown-rendered mark,
.cm-s-obsidian span.cm-highlight,
mark {
background-color: var(--text-highlight-bg) !important;
color: var(--code-background) !important;
}
/* Links */
.markdown-rendered a {
color: var(--text-link);
}
/* Blockquotes */
.markdown-rendered blockquote {
border-left: 4px solid var(--blockquote-border);
padding-left: 1em;
}
/* Status bar */
.status-bar {
background-color: var(--code-background);
border-top: 1px solid var(--background-modifier-border);
}
/* Active file */
.workspace-leaf.mod-active .workspace-leaf-header-title {
color: var(--interactive-accent);
}
.nav-file-title.is-active {
background-color: var(--code-background);
color: var(--interactive-accent);
}
/* Text selection */
::selection {
background-color: var(--text-selection);
color: var(--text-selection-fg);
}
/* Search results */
.search-result-file-title {
color: var(--interactive-accent);
}
.search-result-file-match {
background-color: var(--code-background);
color: var(--text-normal);
border-left: 3px solid var(--interactive-accent);
}
.search-result-file-matched-text {
color: var(--code-background);
}
/* Tables */
.markdown-rendered table {
border: 1px solid var(--background-modifier-border);
}
.markdown-rendered th {
background-color: var(--code-background);
color: var(--text-accent);
}
.markdown-rendered td {
border: 1px solid var(--background-modifier-border);
}
/* Callouts */
.callout {
border-left: 4px solid var(--interactive-accent);
background-color: var(--code-background);
}
.callout * {
color: var(--text-normal);
}
/* Modal dialogs */
.modal {
background-color: var(--background-primary);
border: 2px solid var(--background-modifier-border);
}
/* Settings */
.vertical-tab-header-group-title {
color: var(--interactive-accent);
}
.vertical-tab-nav-item.is-active {
background-color: var(--code-background);
color: var(--interactive-accent);
}
EOF
}
# Option handling
if [ "${1:-}" = "--reset" ]; then
echo "♻️ Resetting Omarchy themes and registry..."
if [ -f "$VAULTS_FILE" ] && [ -s "$VAULTS_FILE" ]; then
while IFS= read -r vault_path || [ -n "$vault_path" ]; do
case "$vault_path" in ""|\#*) continue ;; esac
vault_path="${vault_path%/}"
vault_name=$(basename "$vault_path")
theme_dir="$vault_path/.obsidian/themes/Omarchy"
if [ -d "$theme_dir" ]; then
rm -rf "$theme_dir"
echo " ✅ $vault_name (theme removed)"
else
echo " $vault_name (no theme present)"
fi
done <"$VAULTS_FILE"
fi
rm -f "$VAULTS_FILE"
echo "✅ Registry removed"
exit 0
fi
# Step 1: ensure registry exists (bootstrap if needed)
ensure_vaults_file
while IFS= read -r vault_path || [ -n "$vault_path" ]; do
case "$vault_path" in "" | \#*) continue ;; esac
vault_path="${vault_path%/}"
vault_name=$(basename "$vault_path")
# Step 2: verify path exists; log/skip gracefully if invalid
if [ ! -d "$vault_path" ] || [ ! -d "$vault_path/.obsidian" ]; then
echo " ❌ $vault_name (invalid entry: missing directory or .obsidian)"
continue
fi
# Ensure theme files exist for this vault
ensure_theme_scaffold "$vault_path"
THEME_DIR="$vault_path/.obsidian/themes/Omarchy"
# Step 3: update theme.css
if [ -f "$CURRENT_THEME_DIR/obsidian.css" ]; then
cp "$CURRENT_THEME_DIR/obsidian.css" "$THEME_DIR/theme.css"
else
extract_theme_data >"$THEME_DIR/theme.css"
fi
done <"$VAULTS_FILE"

View File

@@ -13,22 +13,21 @@ hex_to_rgb() {
# Only generate dynamic templates for themes with a colors.toml definition # Only generate dynamic templates for themes with a colors.toml definition
if [[ -f $COLORS_FILE ]]; then if [[ -f $COLORS_FILE ]]; then
# Parse TOML using yq (treating it as YAML since the flat key=value structure is compatible)
# We convert 'key = value' to 'key: value' to make it valid YAML, then use yq/jq to generate the replacement commands.
sed_script=$(mktemp) sed_script=$(mktemp)
# Generate standard and _strip substitutions
sed 's/=/:/' "$COLORS_FILE" | yq -r 'to_entries[] | "s|{{ \(.key) }}|\(.value)|g", "s|{{ \(.key)_strip }}|\(.value | sub("^#";""))|g"' > "$sed_script"
# Generate _rgb substitutions for hex colors
while IFS='=' read -r key value; do while IFS='=' read -r key value; do
key=$(echo "$key" | xargs) key="${key//[\"\' ]/}" # strip quotes and spaces from key
value=$(echo "$value" | xargs | tr -d '"') [[ $key && $key != \#* ]] || continue # skip empty lines and comments
value="${value#*[\"\']}"
value="${value%%[\"\']*}" # extract value between quotes (ignores inline comments)
printf 's|{{ %s }}|%s|g\n' "$key" "$value" # {{ key }} -> value
printf 's|{{ %s_strip }}|%s|g\n' "$key" "${value#\#}" # {{ key_strip }} -> value without leading #
if [[ $value =~ ^# ]]; then if [[ $value =~ ^# ]]; then
rgb=$(hex_to_rgb "$value") rgb=$(hex_to_rgb "$value")
echo "s|{{ ${key}_rgb }}|${rgb}|g" >> "$sed_script" echo "s|{{ ${key}_rgb }}|${rgb}|g"
fi fi
done < "$COLORS_FILE" done <"$COLORS_FILE" >"$sed_script"
shopt -s nullglob shopt -s nullglob
@@ -39,7 +38,7 @@ if [[ -f $COLORS_FILE ]]; then
# Don't overwrite configs already exists in the output directory (copied from theme specific folder) # Don't overwrite configs already exists in the output directory (copied from theme specific folder)
if [[ ! -f $output_path ]]; then if [[ ! -f $output_path ]]; then
sed -f "$sed_script" "$tpl" > "$output_path" sed -f "$sed_script" "$tpl" >"$output_path"
fi fi
done done

View File

@@ -1,45 +1,39 @@
#!/bin/bash #!/bin/bash
# Note: We cannot use `jq` to update settings.json because its JSONC (allows comments), # Sync Omarchy theme to VS Code, VSCodium, and Cursor
# which jq doesnt support.
# Parameters: EDITOR_CMD SETTINGS_PATH SKIP_FLAG EDITOR_NAME
EDITOR_CMD="${1:-code}"
SETTINGS_PATH="${2:-$HOME/.config/Code/User/settings.json}"
SKIP_FLAG="${3:-$HOME/.local/state/omarchy/toggles/skip-vscode-theme-changes}"
VS_CODE_THEME="$HOME/.config/omarchy/current/theme/vscode.json" VS_CODE_THEME="$HOME/.config/omarchy/current/theme/vscode.json"
if omarchy-cmd-present "$EDITOR_CMD" && [[ ! -f "$SKIP_FLAG" ]]; then set_theme() {
local editor_cmd="$1"
local settings_path="$2"
local skip_flag="$3"
omarchy-cmd-present "$editor_cmd" && [[ ! -f "$skip_flag" ]] || return 0
if [[ -f "$VS_CODE_THEME" ]]; then if [[ -f "$VS_CODE_THEME" ]]; then
theme_name=$(jq -r '.name' "$VS_CODE_THEME") theme_name=$(jq -r '.name' "$VS_CODE_THEME")
extension=$(jq -r '.extension' "$VS_CODE_THEME") extension=$(jq -r '.extension' "$VS_CODE_THEME")
# Install theme extension if [[ -n "$extension" ]] && ! "$editor_cmd" --list-extensions | grep -Fxq "$extension"; then
if [[ -n "$extension" ]] && ! "$EDITOR_CMD" --list-extensions | grep -Fxq "$extension"; then "$editor_cmd" --install-extension "$extension" >/dev/null
"$EDITOR_CMD" --install-extension "$extension" >/dev/null
fi fi
# Create config file if there isn't already one mkdir -p "$(dirname "$settings_path")"
mkdir -p "$(dirname "$SETTINGS_PATH")" [[ -f "$settings_path" ]] || printf '{\n}\n' >"$settings_path"
if [[ ! -f "$SETTINGS_PATH" ]]; then
printf '{\n}\n' >"$SETTINGS_PATH" if ! grep -q '"workbench.colorTheme"' "$settings_path"; then
sed -i --follow-symlinks -E '0,/\{/{s/\{/{\ "workbench.colorTheme": "",/}' "$settings_path"
fi fi
# Create a `workbench.colorTheme` entry in settings.
if ! grep -q '"workbench.colorTheme"' "$SETTINGS_PATH"; 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": "",/}' "$SETTINGS_PATH"
fi
# Update theme
sed -i --follow-symlinks -E \ sed -i --follow-symlinks -E \
"s/(\"workbench.colorTheme\"[[:space:]]*:[[:space:]]*\")[^\"]*(\")/\1$theme_name\2/" \ "s/(\"workbench.colorTheme\"[[:space:]]*:[[:space:]]*\")[^\"]*(\")/\1$theme_name\2/" \
"$SETTINGS_PATH" "$settings_path"
else elif [[ -f "$settings_path" ]]; then
# Remove theme from settings.json when the theme doesn't have editor support sed -i --follow-symlinks -E 's/\"workbench\.colorTheme\"[[:space:]]*:[^,}]*,?//' "$settings_path"
if [[ -f "$SETTINGS_PATH" ]]; then
sed -i --follow-symlinks -E 's/\"workbench\.colorTheme\"[[:space:]]*:[^,}]*,?//' "$SETTINGS_PATH"
fi
fi fi
fi }
set_theme "code" "$HOME/.config/Code/User/settings.json" "$HOME/.local/state/omarchy/toggles/skip-vscode-theme-changes"
set_theme "codium" "$HOME/.config/VSCodium/User/settings.json" "$HOME/.local/state/omarchy/toggles/skip-codium-theme-changes"
set_theme "cursor" "$HOME/.config/Cursor/User/settings.json" "$HOME/.local/state/omarchy/toggles/skip-cursor-theme-changes"

View File

@@ -1,4 +0,0 @@
#!/bin/bash
# Call the VSCode theme setter with VSCodium-specific parameters
omarchy-theme-set-vscode codium "$HOME/.config/VSCodium/User/settings.json" "$HOME/.local/state/omarchy/toggles/skip-codium-theme-changes"

View File

@@ -0,0 +1,18 @@
#!/bin/bash
# Fix volume controls for laptops with problematic Realtek codecs (like Asus G14)
if [[ ! -f ~/.config/wireplumber/wireplumber.conf.d/alsa-soft-mixer.conf ]]; then
mkdir -p ~/.config/wireplumber/wireplumber.conf.d/
cp $OMARCHY_PATH/default/wireplumber/wireplumber.conf.d/alsa-soft-mixer.conf ~/.config/wireplumber/wireplumber.conf.d/
rm -rf ~/.local/state/wireplumber/default-routes
notify-send "Enabled audio soft mixing"
else
rm -rf ~/.config/wireplumber/wireplumber.conf.d/alsa-soft-mixer.conf
rm -rf ~/.local/state/wireplumber/default-routes
notify-send "Disabled audio soft mixing"
fi
systemctl --user restart wireplumber

55
bin/omarchy-toggle-hybrid-gpu Executable file
View File

@@ -0,0 +1,55 @@
#!/bin/bash
# Toggle dedicated vs integrated GPU mode via supergfxd (for hybrid gpu laptops, like Asus G14).
# Requires reboot to take effect.
# Ensure supergfxctl has been installed
if omarchy-cmd-missing supergfxctl; then
# FIXME: Convert this to OPR instead of AUR
omarchy-pkg-aur-add supergfxctl
sudo systemctl enable supergfxd
sudo systemctl start supergfxd
# Needed to deal with restoring to sleep where going through VFIO first means we don't need to reboot.
sudo sed -i "s/\"vfio_enable\": \".*\"/\"vfio_enable\": true/" /etc/supergfxd.conf
fi
gpu_mode=$(supergfxctl -g)
case "$gpu_mode" in
"Integrated")
if gum confirm "Enable dedicated GPU and reboot?"; then
# Switch to hybrid mode
sudo sed -i "s/\"mode\": \".*\"/\"mode\": \"Hybrid\"/" /etc/supergfxd.conf
# Let hybrid mode be the default after system sleep
sudo rm -rf /usr/lib/systemd/system-sleep/force-igpu
# Remove the startup delay override (not needed for Hybrid mode)
sudo rm -rf /etc/systemd/system/supergfxd.service.d/delay-start.conf
omarchy-cmd-reboot
fi
;;
"Hybrid")
if gum confirm "Use only integrated GPU and reboot?"; then
# Switch to integrated mode
sudo sed -i "s/\"mode\": \".*\"/\"mode\": \"Integrated\"/" /etc/supergfxd.conf
# Force igpu mode after system sleep (or dgpu could get activated)
sudo mkdir -p /usr/lib/systemd/system-sleep
sudo cp -p $OMARCHY_PATH/default/systemd/system-sleep/force-igpu /usr/lib/systemd/system-sleep/
# Delay supergfxd startup to avoid race condition with display manager
# that can cause system freeze when booting in Integrated mode
sudo mkdir -p /etc/systemd/system/supergfxd.service.d
sudo cp -p $OMARCHY_PATH/default/systemd/system/supergfxd.service.d/delay-start.conf /etc/systemd/system/supergfxd.service.d/
omarchy-cmd-reboot
fi
;;
*)
echo "Hybrid GPU not found or in unknown mode."
exit 1
;;
esac

18
bin/omarchy-update-analyze-logs Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
update_log="/tmp/omarchy-update.log"
# Check for errors
if grep -qi "error" "$update_log"; then
echo -e "\e[31mNon-stopping errors detected during update:\e[0m"
grep -i "error" "$update_log"
echo
fi
# Check for initramfs generation failure
if grep -q "Updating linux initcpios" "$update_log"; then
if ! grep -q "Initcpio image generation successful" "$update_log"; then
echo -e '\e[31mError: Initramfs generation may have failed. Review logs before restart.\e[0m'
echo
fi
fi

13
bin/omarchy-update-aur-pkgs Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
# Update AUR packages if any are installed
if pacman -Qem >/dev/null; then
if omarchy-pkg-aur-accessible; then
echo -e "\e[32m\nUpdate AUR packages\e[0m"
yay -Sua --noconfirm --ignore gcc14,gcc14-libs
echo
else
echo -e "\e[31m\nAUR is unavailable (so skipping updates)\e[0m"
echo
fi
fi

10
bin/omarchy-update-orphan-pkgs Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
orphans=$(pacman -Qtdq || true)
if [[ -n $orphans ]]; then
echo -e "\e[32m\nRemove orphan system packages\e[0m"
for pkg in $orphans; do
sudo pacman -Rs --noconfirm "$pkg" || true
done
echo
fi

View File

@@ -5,13 +5,21 @@ set -e
# Ensure screensaver/sleep doesn't set in during updates # Ensure screensaver/sleep doesn't set in during updates
hyprctl dispatch tagwindow +noidle &> /dev/null || true hyprctl dispatch tagwindow +noidle &> /dev/null || true
# Capture update logs
exec > >(tee "/tmp/omarchy-update.log") 2>&1
# Perform all update steps # Perform all update steps
omarchy-update-time omarchy-update-time
omarchy-update-keyring omarchy-update-keyring
omarchy-update-available-reset omarchy-update-available-reset
omarchy-update-system-pkgs omarchy-update-system-pkgs
omarchy-migrate omarchy-migrate
omarchy-update-aur-pkgs
omarchy-update-orphan-pkgs
omarchy-hook post-update omarchy-hook post-update
omarchy-update-analyze-logs
omarchy-update-restart omarchy-update-restart
# Re-enable screensaver/sleep after updates # Re-enable screensaver/sleep after updates

View File

@@ -4,24 +4,3 @@ set -e
echo -e "\e[32m\nUpdate system packages\e[0m" echo -e "\e[32m\nUpdate system packages\e[0m"
sudo pacman -Syyu --noconfirm sudo pacman -Syyu --noconfirm
# Update AUR packages if any are installed
if pacman -Qem >/dev/null; then
if omarchy-pkg-aur-accessible; then
echo -e "\e[32m\nUpdate AUR packages\e[0m"
yay -Sua --noconfirm
echo
else
echo -e "\e[31m\nAUR is unavailable (so skipping updates)\e[0m"
echo
fi
fi
orphans=$(pacman -Qtdq || true)
if [[ -n $orphans ]]; then
echo -e "\e[32m\nRemove orphan system packages\e[0m"
for pkg in $orphans; do
sudo pacman -Rs --noconfirm "$pkg" || true
done
echo
fi

View File

@@ -254,25 +254,6 @@ remove_windows() {
echo "Windows VM removal completed!" 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() { launch_windows() {
KEEP_ALIVE=false KEEP_ALIVE=false
if [ "$1" = "--keep-alive" ] || [ "$1" = "-k" ]; then if [ "$1" = "--keep-alive" ] || [ "$1" = "-k" ]; then
@@ -309,11 +290,19 @@ launch_windows() {
notify-send -u critical "Windows VM" "Failed to start Windows VM" notify-send -u critical "Windows VM" "Failed to start Windows VM"
exit 1 exit 1
fi fi
fi
if ! wait_for_rdp_ready "$WIN_USER" "$WIN_PASS"; then echo "Waiting for Windows VM to start..."
notify-send -u critical "Windows VM" "Did not come alive in time." WAIT_COUNT=0
exit 1 until docker logs omarchy-windows 2>&1 | grep -qi "windows started successfully"; do
sleep 2
WAIT_COUNT=$((WAIT_COUNT + 1))
if [ $WAIT_COUNT -gt 60 ]; then # 2 minutes timeout
echo ""
echo "❌ Timeout: Windows VM failed to start within 2 minutes"
echo " Check logs: docker logs omarchy-windows"
exit 1
fi
done
fi fi
# Build the connection info # Build the connection info
@@ -346,7 +335,7 @@ To stop: omarchy-windows-vm stop"
# If scale is less than 130%, don't set any scale (use default 100) # If scale is less than 130%, don't set any scale (use default 100)
# Connect with RDP in fullscreen (auto-detects resolution) # Connect with RDP in fullscreen (auto-detects resolution)
xfreerdp3 /u:"$WIN_USER" /p:"$WIN_PASS" /v:127.0.0.1:3389 -grab-keyboard /sound /microphone /cert:ignore /title:"Windows VM - Omarchy" /dynamic-resolution /gfx:AVC444 /floatbar:sticky:off,default:visible,show:fullscreen $RDP_SCALE xfreerdp3 /u:"$WIN_USER" /p:"$WIN_PASS" /v:127.0.0.1:3389 -grab-keyboard /sound /microphone /clipboard /cert:ignore /title:"Windows VM - Omarchy" /dynamic-resolution /gfx:AVC444 /floatbar:sticky:off,default:visible,show:fullscreen $RDP_SCALE
# After RDP closes, stop the container unless --keep-alive was specified # After RDP closes, stop the container unless --keep-alive was specified
if [ "$KEEP_ALIVE" = false ]; then if [ "$KEEP_ALIVE" = false ]; then

View File

@@ -14,7 +14,6 @@ bindd = SUPER SHIFT, SLASH, Passwords, exec, uwsm-app -- 1password
# If your web app url contains #, type it as ## to prevent hyprland treating it as a comment # If your web app url contains #, type it as ## to prevent hyprland treating it as a comment
bindd = SUPER SHIFT, A, ChatGPT, exec, omarchy-launch-webapp "https://chatgpt.com" bindd = SUPER SHIFT, A, ChatGPT, exec, omarchy-launch-webapp "https://chatgpt.com"
bindd = SUPER SHIFT ALT, A, Grok, exec, omarchy-launch-webapp "https://grok.com" bindd = SUPER SHIFT ALT, A, Grok, exec, omarchy-launch-webapp "https://grok.com"
bindd = SUPER SHIFT CTRL, A, opencode, exec, omarchy-launch-opencode
bindd = SUPER SHIFT, C, Calendar, exec, omarchy-launch-webapp "https://app.hey.com/calendar/weeks/" bindd = SUPER SHIFT, C, Calendar, exec, omarchy-launch-webapp "https://app.hey.com/calendar/weeks/"
bindd = SUPER SHIFT, E, Email, exec, omarchy-launch-webapp "https://app.hey.com" bindd = SUPER SHIFT, E, Email, exec, omarchy-launch-webapp "https://app.hey.com"
bindd = SUPER SHIFT, Y, YouTube, exec, omarchy-launch-webapp "https://youtube.com/" bindd = SUPER SHIFT, Y, YouTube, exec, omarchy-launch-webapp "https://youtube.com/"

View File

@@ -19,6 +19,8 @@ allow_remote_control yes
# Aesthetics # Aesthetics
cursor_shape block cursor_shape block
cursor_blink_interval 0
shell_integration no-cursor
enable_audio_bell no enable_audio_bell no
# Minimal Tab bar styling # Minimal Tab bar styling

View File

@@ -21,8 +21,6 @@
# {{ accent }} - Theme accent color # {{ accent }} - Theme accent color
# {{ selection_background }} - Selection highlight background # {{ selection_background }} - Selection highlight background
# {{ selection_foreground }} - Selection highlight foreground # {{ selection_foreground }} - Selection highlight foreground
# {{ active_border_color }} - Active window/element border
# {{ active_tab_background }} - Active tab background
# #
# {{ color0 }} through {{ color15 }} - Standard 16-color terminal palette # {{ color0 }} through {{ color15 }} - Standard 16-color terminal palette
# color0-7: Normal colors (black, red, green, yellow, blue, magenta, cyan, white) # color0-7: Normal colors (black, red, green, yellow, blue, magenta, cyan, white)

View File

@@ -116,6 +116,7 @@
"format-muted": "", "format-muted": "",
"format-icons": { "format-icons": {
"headphone": "", "headphone": "",
"headset": "",
"default": ["", "", ""] "default": ["", "", ""]
} }
}, },

View File

@@ -58,7 +58,7 @@ img2jpg() {
img="$1" img="$1"
shift shift
magick "$img" $@ -quality 95 -strip ${img%.*}-optimized.jpg magick "$img" $@ -quality 95 -strip ${img%.*}-converted.jpg
} }
# Transcode any image to JPG image that's great for sharing online without being too big # Transcode any image to JPG image that's great for sharing online without being too big
@@ -66,7 +66,14 @@ img2jpg-small() {
img="$1" img="$1"
shift shift
magick "$img" $@ -resize 1080x\> -quality 95 -strip ${img%.*}-optimized.jpg magick "$img" $@ -resize 1080x\> -quality 95 -strip ${img%.*}-small.jpg
}
# Transcode any image to JPG image that's great for sharing online without being too big
img2jpg-medium() {
img="$1"
shift
magick "$img" $@ -resize 1800x\> -quality 95 -strip ${img%.*}-medium.jpg
} }
# Transcode any image to compressed-but-lossless PNG # Transcode any image to compressed-but-lossless PNG

View File

@@ -6,14 +6,14 @@ bindeld = ,XF86AudioRaiseVolume, Volume up, exec, $osdclient --output-volume rai
bindeld = ,XF86AudioLowerVolume, Volume down, exec, $osdclient --output-volume lower bindeld = ,XF86AudioLowerVolume, Volume down, exec, $osdclient --output-volume lower
bindeld = ,XF86AudioMute, Mute, exec, $osdclient --output-volume mute-toggle bindeld = ,XF86AudioMute, Mute, exec, $osdclient --output-volume mute-toggle
bindeld = ,XF86AudioMicMute, Mute microphone, exec, $osdclient --input-volume mute-toggle bindeld = ,XF86AudioMicMute, Mute microphone, exec, $osdclient --input-volume mute-toggle
bindeld = ,XF86MonBrightnessUp, Brightness up, exec, $osdclient --brightness raise bindeld = ,XF86MonBrightnessUp, Brightness up, exec, omarchy-cmd-brightness +5%
bindeld = ,XF86MonBrightnessDown, Brightness down, exec, $osdclient --brightness lower bindeld = ,XF86MonBrightnessDown, Brightness down, exec, omarchy-cmd-brightness 5%-
# Precise 1% multimedia adjustments with Alt modifier # Precise 1% multimedia adjustments with Alt modifier
bindeld = ALT, XF86AudioRaiseVolume, Volume up precise, exec, $osdclient --output-volume +1 bindeld = ALT, XF86AudioRaiseVolume, Volume up precise, exec, $osdclient --output-volume +1
bindeld = ALT, XF86AudioLowerVolume, Volume down precise, exec, $osdclient --output-volume -1 bindeld = ALT, XF86AudioLowerVolume, Volume down precise, exec, $osdclient --output-volume -1
bindeld = ALT, XF86MonBrightnessUp, Brightness up precise, exec, $osdclient --brightness +1 bindeld = ALT, XF86MonBrightnessUp, Brightness up precise, exec, omarchy-cmd-brightness +1%
bindeld = ALT, XF86MonBrightnessDown, Brightness down precise, exec, $osdclient --brightness -1 bindeld = ALT, XF86MonBrightnessDown, Brightness down precise, exec, omarchy-cmd-brightness 1%-
# Requires playerctl # Requires playerctl
bindld = , XF86AudioNext, Next track, exec, $osdclient --playerctl next bindld = , XF86AudioNext, Next track, exec, $osdclient --playerctl next

View File

@@ -1,6 +1,7 @@
# Menus # Menus
bindd = SUPER, SPACE, Launch apps, exec, omarchy-launch-walker bindd = SUPER, SPACE, Launch apps, exec, omarchy-launch-walker
bindd = SUPER CTRL, E, Emoji picker, exec, omarchy-launch-walker -m symbols bindd = SUPER CTRL, E, Emoji picker, exec, omarchy-launch-walker -m symbols
bindd = SUPER CTRL, C, Capture menu, exec, omarchy-menu capture
bindd = SUPER ALT, SPACE, Omarchy menu, exec, omarchy-menu bindd = SUPER ALT, SPACE, Omarchy menu, exec, omarchy-menu
bindd = SUPER, ESCAPE, System menu, exec, omarchy-menu system bindd = SUPER, ESCAPE, System menu, exec, omarchy-menu system
bindld = , XF86PowerOff, Power menu, exec, omarchy-menu system bindld = , XF86PowerOff, Power menu, exec, omarchy-menu system

View File

@@ -3,7 +3,7 @@ TARGET_OS_NAME="Omarchy"
ESP_PATH="/boot" ESP_PATH="/boot"
KERNEL_CMDLINE[default]="@@CMDLINE@@" KERNEL_CMDLINE[default]="@@CMDLINE@@"
KERNEL_CMDLINE[default]+="quiet splash" KERNEL_CMDLINE[default]+=" quiet splash"
ENABLE_UKI=yes ENABLE_UKI=yes
CUSTOM_UKI_NAME="omarchy" CUSTOM_UKI_NAME="omarchy"

View File

@@ -1,5 +1,5 @@
--- ---
name: Omarchy name: omarchy
description: > description: >
REQUIRED for ANY changes to Linux desktop, window manager, or system config. REQUIRED for ANY changes to Linux desktop, window manager, or system config.
Use when editing ~/.config/hypr/, ~/.config/waybar/, ~/.config/walker/, Use when editing ~/.config/hypr/, ~/.config/waybar/, ~/.config/walker/,

View File

@@ -0,0 +1,18 @@
#!/bin/bash
# Use the Vfio to Integrated trick to turn off NVIDIA dgpu when in integrated mode
# without needing to restart the computer. This is needed because computers like the Asus G14
# will wake after suspend in Hybrid mode, even if the system was in Integrated mode before
# suspending.
if [[ $1 == "post" ]]; then
# small delay so the device is fully re-enumerated
sleep 4
# force-bind dGPU to vfio (fully detached from nvidia)
/usr/bin/supergfxctl -m Vfio
sleep 1
# then go back to Integrated, which powers it off again
/usr/bin/supergfxctl -m Integrated
fi

View File

@@ -0,0 +1,6 @@
[Service]
# Delay startup to avoid race condition with display manager initialization
# when booting in Integrated mode. Without this delay, the system can freeze
# on boot because supergfxd tries to disable the dGPU while the display
# subsystem is still initializing.
ExecStartPre=/bin/sleep 5

View File

@@ -6,8 +6,8 @@ selection_background {{ selection_background }}
cursor {{ cursor }} cursor {{ cursor }}
cursor_text_color {{ background }} cursor_text_color {{ background }}
active_border_color {{ active_border_color }} active_border_color {{ accent }}
active_tab_background {{ active_tab_background }} active_tab_background {{ accent }}
color0 {{ color0 }} color0 {{ color0 }}
color1 {{ color1 }} color1 {{ color1 }}

View File

@@ -1,5 +1,5 @@
include=~/.local/share/omarchy/default/mako/core.ini include=~/.local/share/omarchy/default/mako/core.ini
text-color={{ foreground }} text-color={{ foreground }}
border-color={{ foreground }} border-color={{ accent }}
background-color={{ background }} background-color={{ background }}

View File

@@ -0,0 +1,99 @@
/* Omarchy Theme for Obsidian */
.theme-dark, .theme-light {
/* Core colors */
--background-primary: {{ background }};
--background-primary-alt: {{ background }};
--background-secondary: {{ background }};
--background-secondary-alt: {{ background }};
--text-normal: {{ foreground }};
/* Selection colors */
--text-selection: {{ selection_background }};
/* Border color */
--background-modifier-border: {{ color8 }};
/* Semantic heading colors */
--text-title-h1: {{ color1 }};
--text-title-h2: {{ color2 }};
--text-title-h3: {{ color3 }};
--text-title-h4: {{ color4 }};
--text-title-h5: {{ color5 }};
--text-title-h6: {{ color5 }};
/* Links and accents */
--text-link: {{ color4 }};
--text-accent: {{ accent }};
--text-accent-hover: {{ accent }};
--interactive-accent: {{ accent }};
--interactive-accent-hover: {{ accent }};
/* Muted text */
--text-muted: {{ color8 }};
--text-faint: {{ color8 }};
/* Code */
--code-normal: {{ color6 }};
/* Errors and success */
--text-error: {{ color1 }};
--text-error-hover: {{ color1 }};
--text-success: {{ color2 }};
/* Tags */
--tag-color: {{ color6 }};
--tag-background: {{ color8 }};
/* Graph */
--graph-line: {{ color8 }};
--graph-node: {{ accent }};
--graph-node-focused: {{ color4 }};
--graph-node-tag: {{ color6 }};
--graph-node-attachment: {{ color2 }};
}
/* Headers */
.cm-header-1, .markdown-rendered h1 { color: var(--text-title-h1); }
.cm-header-2, .markdown-rendered h2 { color: var(--text-title-h2); }
.cm-header-3, .markdown-rendered h3 { color: var(--text-title-h3); }
.cm-header-4, .markdown-rendered h4 { color: var(--text-title-h4); }
.cm-header-5, .markdown-rendered h5 { color: var(--text-title-h5); }
.cm-header-6, .markdown-rendered h6 { color: var(--text-title-h6); }
/* Code blocks */
.markdown-rendered code {
color: {{ color6 }};
}
/* Syntax highlighting */
.cm-s-obsidian span.cm-keyword { color: {{ color1 }}; }
.cm-s-obsidian span.cm-string { color: {{ color2 }}; }
.cm-s-obsidian span.cm-number { color: {{ color3 }}; }
.cm-s-obsidian span.cm-comment { color: {{ color8 }}; }
.cm-s-obsidian span.cm-operator { color: {{ color4 }}; }
.cm-s-obsidian span.cm-def { color: {{ color4 }}; }
/* Links */
.markdown-rendered a {
color: var(--text-link);
}
/* Blockquotes */
.markdown-rendered blockquote {
border-left-color: {{ accent }};
}
/* Active elements */
.workspace-leaf.mod-active .workspace-leaf-header-title {
color: var(--interactive-accent);
}
.nav-file-title.is-active {
color: var(--interactive-accent);
}
/* Search results */
.search-result-file-title {
color: var(--interactive-accent);
}

View File

@@ -2,4 +2,4 @@
@define-color border-color {{ foreground }}; @define-color border-color {{ foreground }};
@define-color label {{ foreground }}; @define-color label {{ foreground }};
@define-color image {{ foreground }}; @define-color image {{ foreground }};
@define-color progress {{ foreground }}; @define-color progress {{ accent }};

View File

@@ -0,0 +1,18 @@
## Use software volume control for all ALSA devices.
## This prevents hardware mixer quirks (like muffled audio on Realtek codecs)
## and provides consistent volume behavior across all hardware.
monitor.alsa.rules = [
{
matches = [
{
device.name = "~alsa_card.*"
}
]
actions = {
update-props = {
api.alsa.soft-mixer = true
}
}
}
]

View File

@@ -26,6 +26,7 @@ run_logged $OMARCHY_INSTALL/config/hardware/bluetooth.sh
run_logged $OMARCHY_INSTALL/config/hardware/printer.sh run_logged $OMARCHY_INSTALL/config/hardware/printer.sh
run_logged $OMARCHY_INSTALL/config/hardware/usb-autosuspend.sh 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/ignore-power-button.sh
run_logged $OMARCHY_INSTALL/config/hardware/legacy-gpu-terminal.sh
run_logged $OMARCHY_INSTALL/config/hardware/nvidia.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-f13-amd-audio-input.sh
run_logged $OMARCHY_INSTALL/config/hardware/fix-bcm43xx.sh run_logged $OMARCHY_INSTALL/config/hardware/fix-bcm43xx.sh

View File

@@ -0,0 +1,17 @@
# Ghostty requires modern GPU acceleration (OpenGL/Vulkan) which is often unstable
# or missing on legacy hardware. Detect legacy GPU drivers and fall back to Alacritty.
legacy_drivers=("radeon")
for card in /sys/class/drm/card*; do
if [[ -e "$card/device/driver" ]]; then
driver=$(basename "$(readlink -f "$card/device/driver")")
for legacy in "${legacy_drivers[@]}"; do
if [[ "$driver" == "$legacy" ]]; then
omarchy-install-terminal alacritty
exit 0
fi
done
fi
done

View File

@@ -7,8 +7,8 @@ if [ -n "$NVIDIA" ]; then
if echo "$NVIDIA" | grep -qE "RTX [2-9][0-9]|GTX 16"; then if echo "$NVIDIA" | grep -qE "RTX [2-9][0-9]|GTX 16"; then
# Turing (16xx, 20xx), Ampere (30xx), Ada (40xx), and newer recommend the open-source kernel modules # Turing (16xx, 20xx), Ampere (30xx), Ada (40xx), and newer recommend the open-source kernel modules
PACKAGES=(nvidia-open-dkms nvidia-utils lib32-nvidia-utils libva-nvidia-driver) PACKAGES=(nvidia-open-dkms nvidia-utils lib32-nvidia-utils libva-nvidia-driver)
elif echo "$NVIDIA" | grep -qE "GTX 9|GTX 10"; then elif echo "$NVIDIA" | grep -qE "GTX 9|GTX 10|Quadro P"; then
# Pascal (10xx) and Maxwell (9xx) use legacy branch that can only be installed from AUR # Pascal (10xx or Quadro Pxxx) and Maxwell (9xx) use legacy branch that can only be installed from AUR
PACKAGES=(nvidia-580xx-dkms nvidia-580xx-utils lib32-nvidia-580xx-utils) PACKAGES=(nvidia-580xx-dkms nvidia-580xx-utils lib32-nvidia-580xx-utils)
fi fi
# Bail if no supported GPU # Bail if no supported GPU
@@ -17,7 +17,7 @@ if [ -n "$NVIDIA" ]; then
exit 0 exit 0
fi fi
pacman -S --needed --noconfirm "$KERNEL_HEADERS" "${PACKAGES[@]}" omarchy-pkg-add "$KERNEL_HEADERS" "${PACKAGES[@]}"
# Configure modprobe for early KMS # Configure modprobe for early KMS
sudo tee /etc/modprobe.d/nvidia.conf <<EOF >/dev/null sudo tee /etc/modprobe.d/nvidia.conf <<EOF >/dev/null

View File

@@ -7,6 +7,7 @@ mkdir -p ~/.config/omarchy/themes
# Set initial theme # Set initial theme
omarchy-theme-set "Tokyo Night" omarchy-theme-set "Tokyo Night"
rm -rf ~/.config/chromium/SingletonLock # otherwise archiso will own the chromium singleton
# Set specific app links for current theme # Set specific app links for current theme
mkdir -p ~/.config/btop/themes mkdir -p ~/.config/btop/themes

View File

@@ -144,5 +144,4 @@ xmlstarlet
xournalpp xournalpp
yaru-icon-theme yaru-icon-theme
yay yay
yq
zoxide zoxide

View File

@@ -19,5 +19,5 @@ if [[ -n ${OMARCHY_ONLINE_INSTALL:-} ]]; then
# Refresh all repos # Refresh all repos
sudo pacman -Syu --noconfirm sudo pacman -Syyu --noconfirm
fi fi

3
migrations/1751134563.sh Normal file
View File

@@ -0,0 +1,3 @@
echo "Remove obsolete gcc14 AUR package that takes eons to update"
omarchy-pkg-drop gcc14

View File

@@ -3,6 +3,17 @@ echo "Migrate legacy NVIDIA GPUs to nvidia-580xx driver (if needed)"
# Only migrate GTX 9xx or 10xx (Pascal/Maxwell) # Only migrate GTX 9xx or 10xx (Pascal/Maxwell)
NVIDIA="$(lspci | grep -i 'nvidia')" NVIDIA="$(lspci | grep -i 'nvidia')"
if echo "$NVIDIA" | grep -qE "GTX 9|GTX 10"; then if echo "$NVIDIA" | grep -qE "GTX 9|GTX 10"; then
if ! pacman -Qq | grep -qE '^linux(-[a-z0-9]+)?-headers$'; then
echo "Error: no linux headers package installed (required for DKMS drivers). Please install the appropriate headers and re-run this migration."
exit 1
fi
# Piping yes to override existing packages # Piping yes to override existing packages
yes | sudo pacman -S nvidia-580xx-dkms nvidia-580xx-utils lib32-nvidia-580xx-utils yes | sudo pacman -S nvidia-580xx-dkms nvidia-580xx-utils lib32-nvidia-580xx-utils
# Verify packages were installed
if ! pacman -Qq nvidia-580xx-dkms nvidia-580xx-utils lib32-nvidia-580xx-utils &>/dev/null; then
echo "Error: NVIDIA 580xx driver packages failed to install"
exit 1
fi
fi fi

View File

@@ -1,8 +1,8 @@
echo "Update terminal scrolltouchpad setting to Hyprland 0.53 style" echo "Update terminal scrolltouchpad setting to Hyprland 0.53 style"
if grep -q "scrolltouchpad" ~/.config/hypr/input.conf; then if grep -q "scrolltouchpad" ~/.config/hypr/input.conf; then
sed -Ei 's/^windowrule = scrolltouchpad ([^,]+), class:\(([^)]+)\)$/windowrule = match:class (\2), scroll_touchpad \1/; sed -Ei 's/^windowrule = scrolltouchpad ([^,]+), class:\(([^)]+)\)$/windowrule = match:class (\2), scroll_touchpad \1/' ~/.config/hypr/input.conf
s/^windowrule = scrolltouchpad ([^,]+), class:([^ ]+)$/windowrule = match:class \2, scroll_touchpad \1/' ~/.config/hypr/input.conf sed -Ei 's/^windowrule = scrolltouchpad ([^,]+), class:([^ ]+)$/windowrule = match:class \2, scroll_touchpad \1/' ~/.config/hypr/input.conf
sed -Ei 's/^windowrule = scrolltouchpad ([^,]+), tag:terminal$/windowrule = match:class (Alacritty|kitty), scroll_touchpad 1.5\nwindowrule = match:class com.mitchellh.ghostty, scroll_touchpad 0.2/' ~/.config/hypr/input.conf sed -Ei 's/^windowrule = scrolltouchpad ([^,]+), tag:terminal$/windowrule = match:class (Alacritty|kitty), scroll_touchpad 1.5\nwindowrule = match:class com.mitchellh.ghostty, scroll_touchpad 0.2/' ~/.config/hypr/input.conf
fi fi

View File

@@ -1,7 +1,5 @@
echo "Migrate to new theme setup" echo "Migrate to new theme setup"
omarchy-pkg-add yq
# Move user-added backgrounds from Omarchy theme folders to user config # Move user-added backgrounds from Omarchy theme folders to user config
OMARCHY_DIR="$HOME/.local/share/omarchy" OMARCHY_DIR="$HOME/.local/share/omarchy"
USER_BACKGROUNDS_DIR="$HOME/.config/omarchy/backgrounds" USER_BACKGROUNDS_DIR="$HOME/.config/omarchy/backgrounds"
@@ -45,10 +43,12 @@ fi
THEMES_DIR="$HOME/.config/omarchy/themes" THEMES_DIR="$HOME/.config/omarchy/themes"
CURRENT_THEME_LINK="$HOME/.config/omarchy/current/theme" CURRENT_THEME_LINK="$HOME/.config/omarchy/current/theme"
# Get current theme name from symlink before removing anything # Get current theme name before removing anything
CURRENT_THEME_NAME="" CURRENT_THEME_NAME=""
if [[ -L $CURRENT_THEME_LINK ]]; then if [[ -L $CURRENT_THEME_LINK ]]; then
CURRENT_THEME_NAME=$(basename "$(readlink "$CURRENT_THEME_LINK")") CURRENT_THEME_NAME=$(basename "$(readlink "$CURRENT_THEME_LINK")")
elif [[ -d $CURRENT_THEME_LINK ]]; then
CURRENT_THEME_NAME=$(basename "$CURRENT_THEME_LINK")
elif [[ -f "$HOME/.config/omarchy/current/theme.name" ]]; then elif [[ -f "$HOME/.config/omarchy/current/theme.name" ]]; then
CURRENT_THEME_NAME=$(cat "$HOME/.config/omarchy/current/theme.name") CURRENT_THEME_NAME=$(cat "$HOME/.config/omarchy/current/theme.name")
fi fi
@@ -59,4 +59,7 @@ find "$THEMES_DIR" -mindepth 1 -maxdepth 1 -type l -delete
# Re-apply the current theme with the new system # Re-apply the current theme with the new system
if [[ -n $CURRENT_THEME_NAME ]]; then if [[ -n $CURRENT_THEME_NAME ]]; then
omarchy-theme-set "$CURRENT_THEME_NAME" omarchy-theme-set "$CURRENT_THEME_NAME"
else
# Backup to ensure a theme is set if we can't deduce the name
omarchy-theme-set "Tokyo Night"
fi fi

3
migrations/1767865784.sh Normal file
View File

@@ -0,0 +1,3 @@
echo "Ensure Chromium is able to start on first run after ISO 3.3.0 install"
rm -rf ~/.config/chromium/SingletonLock

14
migrations/1768270644.sh Executable file
View File

@@ -0,0 +1,14 @@
echo "Add icon for headset audio profile in Waybar"
if ! grep -q '"headset": ""' "$HOME/.config/waybar/config.jsonc"; then
sed -i '
/"pulseaudio": {/,/^[ ]*}/{
/"format-icons": {/,/^[ ]*}/{
/"default":/i\
\ "headset": "",
}
}
' "$HOME/.config/waybar/config.jsonc"
omarchy-restart-waybar
fi

View File

@@ -1,7 +1,4 @@
accent = "#1e66f5" accent = "#1e66f5"
active_border_color = "#8839EF"
active_tab_background = "#8839EF"
cursor = "#dc8a78" cursor = "#dc8a78"
foreground = "#4c4f69" foreground = "#4c4f69"
background = "#eff1f5" background = "#eff1f5"

View File

@@ -1,7 +1,4 @@
accent = "#89b4fa" accent = "#89b4fa"
active_border_color = "#CBA6F7"
active_tab_background = "#CBA6F7"
cursor = "#f5e0dc" cursor = "#f5e0dc"
foreground = "#cdd6f4" foreground = "#cdd6f4"
background = "#1e1e2e" background = "#1e1e2e"

View File

@@ -0,0 +1,2 @@
@define-color foreground #cdd6f4;
@define-color background #181824;

View File

@@ -1,7 +1,4 @@
accent = "#7d82d9" accent = "#7d82d9"
active_border_color = "#7d82d9"
active_tab_background = "#060B1E"
cursor = "#ffcead" cursor = "#ffcead"
foreground = "#ffcead" foreground = "#ffcead"
background = "#060B1E" background = "#060B1E"

View File

@@ -1,7 +1,4 @@
accent = "#7fbbb3" accent = "#7fbbb3"
active_border_color = "#7fbbb3"
active_tab_background = "#2d353b"
cursor = "#d3c6aa" cursor = "#d3c6aa"
foreground = "#d3c6aa" foreground = "#d3c6aa"
background = "#2d353b" background = "#2d353b"

View File

@@ -1,7 +1,4 @@
accent = "#205EA6" accent = "#205EA6"
active_border_color = "#D14D41"
active_tab_background = "#CECDC3"
cursor = "#100F0F" cursor = "#100F0F"
foreground = "#100F0F" foreground = "#100F0F"
background = "#FFFCF0" background = "#FFFCF0"

View File

@@ -1,7 +1,4 @@
accent = "#7daea3" accent = "#7daea3"
active_border_color = "#458588"
active_tab_background = "#d65d0e"
cursor = "#bdae93" cursor = "#bdae93"
foreground = "#d4be98" foreground = "#d4be98"
background = "#282828" background = "#282828"

View File

@@ -1,7 +1,4 @@
accent = "#829dd4" accent = "#82FB9C"
active_border_color = "#829dd4"
active_tab_background = "#0B0C16"
cursor = "#ddf7ff" cursor = "#ddf7ff"
foreground = "#ddf7ff" foreground = "#ddf7ff"
background = "#0B0C16" background = "#0B0C16"

View File

@@ -1,7 +1,4 @@
accent = "#7e9cd8" accent = "#7e9cd8"
active_border_color = "#7e9cd8"
active_tab_background = "#1f1f28"
cursor = "#c8c093" cursor = "#c8c093"
foreground = "#dcd7ba" foreground = "#dcd7ba"
background = "#1f1f28" background = "#1f1f28"

View File

@@ -1,7 +1,4 @@
accent = "#e68e0d" accent = "#e68e0d"
active_border_color = "#595959"
active_tab_background = "#121212"
cursor = "#eaeaea" cursor = "#eaeaea"
foreground = "#bebebe" foreground = "#bebebe"
background = "#121212" background = "#121212"

View File

@@ -1,7 +1,4 @@
accent = "#81a1c1" accent = "#81a1c1"
active_border_color = "#81A1C1"
active_tab_background = "#2E3440"
cursor = "#d8dee9" cursor = "#d8dee9"
foreground = "#d8dee9" foreground = "#d8dee9"
background = "#2e3440" background = "#2e3440"

View File

@@ -1,7 +1,4 @@
accent = "#509475" accent = "#509475"
active_border_color = "#509475"
active_tab_background = "#C1C497"
cursor = "#D7C995" cursor = "#D7C995"
foreground = "#C1C497" foreground = "#C1C497"
background = "#111c18" background = "#111c18"

View File

@@ -1,7 +1,4 @@
accent = "#f38d70" accent = "#f38d70"
active_border_color = "#e6d9db"
active_tab_background = "#f9cc6c"
cursor = "#c3b7b8" cursor = "#c3b7b8"
foreground = "#e6d9db" foreground = "#e6d9db"
background = "#2c2525" background = "#2c2525"

View File

@@ -1,7 +1,4 @@
accent = "#56949f" accent = "#56949f"
active_border_color = "#595959"
active_tab_background = "#fffaf3"
cursor = "#cecacd" cursor = "#cecacd"
foreground = "#575279" foreground = "#575279"
background = "#faf4ed" background = "#faf4ed"

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

View File

@@ -1,7 +1,4 @@
accent = "#7aa2f7" accent = "#7aa2f7"
active_border_color = "#7aa2f7"
active_tab_background = "#7aa2f7"
cursor = "#c0caf5" cursor = "#c0caf5"
foreground = "#a9b1d6" foreground = "#a9b1d6"
background = "#1a1b26" background = "#1a1b26"

View File

@@ -1 +1 @@
3.3.0 3.3.4