Compare commits

..

38 Commits

Author SHA1 Message Date
Ryan Hughes
63aff7cd71 Cleanup 2025-10-11 01:36:51 -04:00
Ryan Hughes
a6aec518a5 Remove wl-screenrec 2025-10-11 01:33:45 -04:00
Ryan Hughes
a7a6ac1d21 Add error explanation if we have to kill 2025-10-11 01:25:44 -04:00
Ryan Hughes
af564ed07d Fix webcam to select 16:9 on FW13 and others 2025-10-10 21:37:57 -04:00
Ryan Hughes
eb74a97a0c Fix scaling for non 16:9 2025-10-10 21:23:42 -04:00
Ryan Hughes
883cb66f99 Migrate to gpu-screen-recorder 2025-10-10 21:11:25 -04:00
Ryan Hughes
2c74696735 Update packages 2025-10-10 21:11:05 -04:00
Ryan Hughes
a54044ea30 Change screenrecorder to gpu-screen-recorder 2025-10-10 21:07:20 -04:00
David Heinemeier Hansson
1e859d37cb Fix comment 2025-10-01 23:27:11 +02:00
Ryan Hughes
f634bfeeb6 Merge pull request #2048 from basecamp/dev
Omarchy 3.0.2
2025-09-28 17:10:27 -04:00
Ryan Hughes
ea6b6c6b7f Typo 2025-09-28 17:08:08 -04:00
Ryan Hughes
499e7383c2 Merge branch 'master' into dev 2025-09-28 15:25:11 -04:00
Ryan Hughes
9b8819d9b9 Merge pull request #2051 from shawnyeager/audio-switch-fix
Fix for '(null)' display on AirPod source selection
2025-09-28 15:22:17 -04:00
Ryan Hughes
a8f76783e3 Merge pull request #2050 from basecamp/revert-1859-audio-switch-fix
Revert "Fix for '(null)' display on AirPod source selection"
2025-09-28 15:20:09 -04:00
Ryan Hughes
796ef67ede Revert "Fix for '(null)' display on AirPod source selection" 2025-09-28 15:18:25 -04:00
Ryan Hughes
0eccf22921 Merge pull request #1766 from mrlarsendk/master
Add support for Broadcom BCM4331 chipset alongside BCM4360
2025-09-28 15:04:13 -04:00
Ryan Hughes
971422b757 Update install script name 2025-09-28 15:02:54 -04:00
Ryan Hughes
076da663f5 Merge pull request #1845 from djordje/fix-omarchy-tui-install
Fix omarchy-tui-install
2025-09-28 15:01:17 -04:00
Ryan Hughes
b92ebff29b Merge pull request #1859 from shawnyeager/audio-switch-fix
Fix for '(null)' display on AirPod source selection
2025-09-28 14:56:47 -04:00
Ryan Hughes
8e5b59995a Merge pull request #1920 from iamobservable/iamobservable/bug/screen-recording-no-longer-works-after-updating
Use output display or region geometry to record
2025-09-28 14:55:55 -04:00
Ryan Hughes
dc49358a81 Merge pull request #1957 from joelgaff/mac-keyboard-fixes-again
Add more Mac models to SPI keyboard support
2025-09-28 14:54:28 -04:00
Ryan Hughes
cd39bbf692 Fix conflict + rearrange 2025-09-28 14:53:25 -04:00
Joel Gaff, Jr
fba17b7da4 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.
2025-09-28 14:53:25 -04:00
David Heinemeier Hansson
25df782e2f Suggest how to have a smaller-than-max-width single window aspect ratio 2025-09-26 18:52:27 +02:00
observable
d4b0ba5d94 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.
2025-09-25 19:37:18 -05:00
Ryan Hughes
a74b426c9f Merge pull request #1947 from e-minguez/macbook10,1-spi-fix
feat: Added MacBook10,1 to the fix-apple-spi-keyboard.sh
2025-09-25 20:07:15 -04:00
Ryan Hughes
e0a50f12a7 Merge pull request #1945 from Furyfree/master
Add Helium browser to supported browsers list in omarchy-launch-webapp
2025-09-25 20:05:01 -04:00
Eduardo Mínguez
96b64189a6 feat: Added MacBook10,1 to the fix-apple-spi-keyboard.sh 2025-09-25 22:58:55 +02:00
Patrick Byrne
3376838dfb Fix Helium browser detection in launch script 2025-09-25 21:59:37 +02:00
Patrick Byrne
0f3e6f5101 Add Helium browser to supported browsers list in omarchy-launch-webapp 2025-09-25 21:54:07 +02:00
Djordje Kovacevic
4d9f932e6c Replace "--class" with "--class=" 2025-09-23 22:52:58 +02:00
Ryan Hughes
607915a5d1 Combine ifs 2025-09-21 18:12:21 -04:00
Shawn Yeager
38d536ba9d Fix for '(null)' display on AirPod source selection 2025-09-21 16:18:12 -05:00
Djordje Kovacevic
441ee10d70 Add migration to fix Docker and Disk Usage TUIs 2025-09-21 09:29:44 +02:00
Djordje Kovacevic
45465d3e7c Fix TUI install script
- $TERMINAL should remain variable
2025-09-21 08:40:48 +02:00
Michael Larsen
4d50c8bd33 Clean up
Tested the logic on the MacBook. It worked and the install of the
drivers are reenabled.
2025-09-18 15:16:24 +02:00
Michael Larsen
ad30ef6339 Tried with a different approach for cleaner code 2025-09-18 14:53:04 +02:00
Michael Larsen
19d1ee2b00 Added fix for ealy 2013 macbook pro's using an older chipset, BCM4331 2025-09-18 13:01:26 +02:00
69 changed files with 739 additions and 1313 deletions

View File

@@ -8,31 +8,82 @@ if [[ ! -d "$OUTPUT_DIR" ]]; then
exit 1 exit 1
fi fi
# Selects region or output SCOPE=""
SCOPE="$1" AUDIO="false"
WEBCAM="false"
# Selects audio inclusion or not for arg in "$@"; do
AUDIO=$([[ $2 == "audio" ]] && echo "--audio") case "$arg" in
--with-audio) AUDIO="true" ;;
--with-webcam) WEBCAM="true" ;;
output|region) SCOPE="$arg" ;;
esac
done
cleanup_webcam() {
pkill -f "WebcamOverlay" 2>/dev/null
}
start_webcam_overlay() {
cleanup_webcam
# Get monitor scale
local scale=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .scale')
# Target width (base 360px, scaled to monitor)
local target_width=$(awk "BEGIN {printf \"%.0f\", 360 * $scale}")
# Try preferred 16:9 resolutions in order, use first available
local preferred_resolutions=("640x360" "1280x720" "1920x1080")
local video_size_arg=""
local available_formats=$(v4l2-ctl --list-formats-ext -d /dev/video0 2>/dev/null)
for resolution in "${preferred_resolutions[@]}"; do
if echo "$available_formats" | grep -q "$resolution"; then
video_size_arg="-video_size $resolution"
break
fi
done
ffplay -f v4l2 $video_size_arg -framerate 30 /dev/video0 \
-vf "scale=${target_width}:-1" \
-window_title "WebcamOverlay" \
-noborder \
-fflags nobuffer -flags low_delay \
-probesize 32 -analyzeduration 0 \
-loglevel quiet &
sleep 1
}
start_screenrecording() { start_screenrecording() {
filename="$OUTPUT_DIR/screenrecording-$(date +'%Y-%m-%d_%H-%M-%S').mp4" local filename="$OUTPUT_DIR/screenrecording-$(date +'%Y-%m-%d_%H-%M-%S').mp4"
local audio_args=""
if lspci | grep -qi 'nvidia'; then # Merge audio tracks into one - separate tracks only play one at a time in most players
wf-recorder $AUDIO -f "$filename" -c libx264 -p crf=23 -p preset=medium -p movflags=+faststart "$@" & [[ "$AUDIO" == "true" ]] && audio_args="-a default_output|default_input"
else
wl-screenrec $AUDIO -f "$filename" --ffmpeg-encoder-options="-c:v libx264 -crf 23 -preset medium -movflags +faststart" "$@" &
fi
gpu-screen-recorder -w "$@" -f 60 -c mp4 -o "$filename" $audio_args &
toggle_screenrecording_indicator toggle_screenrecording_indicator
} }
stop_screenrecording() { stop_screenrecording() {
pkill -x wl-screenrec pkill -SIGINT -f "gpu-screen-recorder" # SIGINT required to save video properly
pkill -x wf-recorder
# Wait a maximum of 5 seconds to finish before hard killing
local count=0
while pgrep -f "gpu-screen-recorder" >/dev/null && [ $count -lt 50 ]; do
sleep 0.1
count=$((count + 1))
done
if pgrep -f "gpu-screen-recorder" >/dev/null; then
pkill -9 -f "gpu-screen-recorder"
cleanup_webcam
notify-send "Screen recording error" "Recording process had to be force-killed. Video may be corrupted." -u critical -t 5000
else
cleanup_webcam
notify-send "Screen recording saved to $OUTPUT_DIR" -t 2000 notify-send "Screen recording saved to $OUTPUT_DIR" -t 2000
fi
sleep 0.2 # ensures the process is actually dead before we check
toggle_screenrecording_indicator toggle_screenrecording_indicator
} }
@@ -41,14 +92,51 @@ toggle_screenrecording_indicator() {
} }
screenrecording_active() { screenrecording_active() {
pgrep -x wl-screenrec >/dev/null || pgrep -x wf-recorder >/dev/null pgrep -f "gpu-screen-recorder" >/dev/null || pgrep -x slurp >/dev/null || pgrep -f "WebcamOverlay" >/dev/null
} }
if screenrecording_active; then if screenrecording_active; then
if pgrep -x slurp >/dev/null; then
pkill -x slurp 2>/dev/null
elif pgrep -f "WebcamOverlay" >/dev/null && ! pgrep -f "gpu-screen-recorder" >/dev/null; then
cleanup_webcam
else
stop_screenrecording stop_screenrecording
fi
elif [[ "$SCOPE" == "output" ]]; then elif [[ "$SCOPE" == "output" ]]; then
start_screenrecording [[ "$WEBCAM" == "true" ]] && start_webcam_overlay
if ! output=$(slurp -o -f "%o"); then
[[ "$WEBCAM" == "true" ]] && cleanup_webcam
exit 1
fi
if [[ -z "$output" ]]; then
notify-send "Error" "Could not detect monitor" -u critical
[[ "$WEBCAM" == "true" ]] && cleanup_webcam
exit 1
fi
start_screenrecording "$output"
else else
region=$(slurp) || exit 1 [[ "$WEBCAM" == "true" ]] && start_webcam_overlay
start_screenrecording -g "$region"
scale=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .scale')
if ! region=$(slurp -f "%wx%h+%x+%y"); then
[[ "$WEBCAM" == "true" ]] && cleanup_webcam
exit 1
fi
if [[ "$region" =~ ^([0-9]+)x([0-9]+)\+([0-9]+)\+([0-9]+)$ ]]; then
w=$(awk "BEGIN {printf \"%.0f\", ${BASH_REMATCH[1]} * $scale}")
h=$(awk "BEGIN {printf \"%.0f\", ${BASH_REMATCH[2]} * $scale}")
x=$(awk "BEGIN {printf \"%.0f\", ${BASH_REMATCH[3]} * $scale}")
y=$(awk "BEGIN {printf \"%.0f\", ${BASH_REMATCH[4]} * $scale}")
scaled_region="${w}x${h}+${x}+${y}"
else
scaled_region="$region"
fi
start_screenrecording region -region "$scaled_region"
fi fi

View File

@@ -1,161 +0,0 @@
#!/bin/bash
# Request sudo upfront to avoid prompts during checks
sudo -v
# Keep sudo alive during the script
(while true; do sudo -v; sleep 50; done) &
SUDO_REFRESH_PID=$!
trap "kill $SUDO_REFRESH_PID 2>/dev/null" EXIT
# Define Omarchy locations
export OMARCHY_PATH="/home/ryan/Work/omarchy/omarchy-installer"
export OMARCHY_INSTALL="$OMARCHY_PATH/install"
# Track results
failed_checks=0
passed_checks=0
skipped_checks=0
total_checks=0
# Function to display a message with icon
show_message() {
local type="$1"
local msg="$2"
case "$type" in
error) printf " ❌ ERROR %s\n" "$msg" ;;
warning) printf " ⚠️ WARNING %s\n" "$msg" ;;
info) printf " ✅ OK %s\n" "$msg" ;;
esac
}
# Function to check a single script
check_script() {
local script="$1"
local script_name="${script#$OMARCHY_INSTALL/}"
# Check if script has verify function
if ! bash -c "source '$script' && declare -f omarchy_verify" >/dev/null 2>&1; then
((skipped_checks++))
return
fi
((total_checks++))
# Get friendly name
local friendly_name=$(bash -c "source '$script' 2>/dev/null; echo \"\${OMARCHY_DESCRIPTION:-$script_name}\"")
# Run verification in subshell and capture output
local output
output=$(
errors=()
warnings=()
infos=()
add_error() { errors+=("$1"); }
add_warning() { warnings+=("$1"); }
add_info() { infos+=("$1"); }
source "$script"
omarchy_verify
exit_code=$?
# Output results with delimiters
echo "EXIT:$exit_code"
for e in "${errors[@]}"; do echo "ERROR:$e"; done
for w in "${warnings[@]}"; do echo "WARNING:$w"; done
for i in "${infos[@]}"; do echo "INFO:$i"; done
)
# Parse output
local exit_code errors=() warnings=() infos=()
while IFS= read -r line; do
case "$line" in
EXIT:*) exit_code="${line#EXIT:}" ;;
ERROR:*) errors+=("${line#ERROR:}") ;;
WARNING:*) warnings+=("${line#WARNING:}") ;;
INFO:*) infos+=("${line#INFO:}") ;;
esac
done <<< "$output"
# Handle skipped (return code 2)
if [[ $exit_code -eq 2 ]]; then
((skipped_checks++))
return
fi
# Count messages
local error_count=${#errors[@]}
local warning_count=${#warnings[@]}
# Determine status
local status_icon status_color
if [[ $error_count -gt 0 ]]; then
status_icon="❌"
status_color="1" # Red
((failed_checks++))
elif [[ $warning_count -gt 0 ]]; then
status_icon="⚠️"
status_color="3" # Yellow
((passed_checks++))
else
status_icon="✅"
status_color="2" # Green
((passed_checks++))
fi
# Display result
printf "%s %s\n" "$status_icon" "$(gum style --foreground "$status_color" --bold "$friendly_name")"
# Display messages if any errors or warnings
if [[ $error_count -gt 0 || $warning_count -gt 0 ]]; then
for msg in "${errors[@]}"; do
show_message error "$msg"
done
for msg in "${warnings[@]}"; do
show_message warning "$msg"
done
for msg in "${infos[@]}"; do
show_message info "$msg"
done
fi
echo
}
# Main execution
echo
gum style --italic --foreground 7 "Running health checks..."
echo
# Process all scripts
while IFS= read -r script; do
# Skip certain directories
if [[ "$script" == */all.sh ]] ||
[[ "$script" == */helpers/* ]] ||
[[ "$script" == */preflight/* ]] ||
[[ "$script" == */first-run/* ]] ||
[[ "$script" == */post-install/* ]]; then
continue
fi
check_script "$script"
done < <(find "$OMARCHY_INSTALL" -type f -name "*.sh" | sort)
# Display summary
echo
echo "Summary:"
echo " Passed: $passed_checks/$total_checks"
[[ $failed_checks -gt 0 ]] && echo " Failed: $failed_checks/$total_checks"
[[ $skipped_checks -gt 0 ]] && echo " Skipped: $skipped_checks"
echo
if [[ $failed_checks -gt 0 ]]; then
echo "❌ Some checks failed. Please review the errors above."
exit 1
else
echo "✅ All checks passed!"
fi

View File

@@ -1,21 +0,0 @@
#!/bin/bash
echo "Installing VSCode..."
omarchy-pkg-add visual-studio-code-bin
mkdir -p ~/.vscode
cat > ~/.vscode/argv.json << 'EOF'
// This configuration file allows you to pass permanent command line arguments to VS Code.
// Only a subset of arguments is currently supported to reduce the likelihood of breaking
// the installation.
//
// PLEASE DO NOT CHANGE WITHOUT UNDERSTANDING THE IMPACT
//
// NOTE: Changing this file requires a restart of VS Code.
{
"password-store":"gnome-libsecret"
}
EOF
setsid gtk-launch code

View File

@@ -3,7 +3,7 @@
browser=$(xdg-settings get default-web-browser) browser=$(xdg-settings get default-web-browser)
case $browser in case $browser in
google-chrome* | brave-browser* | microsoft-edge* | opera* | vivaldi*) ;; google-chrome* | brave-browser* | microsoft-edge* | opera* | vivaldi* | helium-browser*) ;;
*) browser="chromium.desktop" ;; *) browser="chromium.desktop" ;;
esac esac

View File

@@ -260,7 +260,7 @@ show_install_service_menu() {
show_install_editor_menu() { show_install_editor_menu() {
case $(menu "Install" " VSCode\n Cursor\n Zed\n Sublime Text\n Helix\n Emacs") in case $(menu "Install" " VSCode\n Cursor\n Zed\n Sublime Text\n Helix\n Emacs") in
*VSCode*) present_terminal omarchy-install-vscode ;; *VSCode*) install_and_launch "VSCode" "visual-studio-code-bin" "code" ;;
*Cursor*) install_and_launch "Cursor" "cursor-bin" "cursor" ;; *Cursor*) install_and_launch "Cursor" "cursor-bin" "cursor" ;;
*Zed*) install_and_launch "Zed" "zed" "dev.zed.Zed" ;; *Zed*) install_and_launch "Zed" "zed" "dev.zed.Zed" ;;
*Sublime*) aur_install_and_launch "Sublime Text" "sublime-text-4" "sublime_text" ;; *Sublime*) aur_install_and_launch "Sublime Text" "sublime-text-4" "sublime_text" ;;

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
echo -e "Restarting pirewire audio service...\n" echo -e "Restarting pipewire audio service...\n"
systemctl --user restart pipewire.service systemctl --user restart pipewire.service

View File

@@ -43,7 +43,7 @@ cat >"$DESKTOP_FILE" <<EOF
Version=1.0 Version=1.0
Name=$APP_NAME Name=$APP_NAME
Comment=$APP_NAME Comment=$APP_NAME
Exec=$TERMINAL --class $APP_CLASS -e $APP_EXEC Exec=\$TERMINAL --class=$APP_CLASS -e $APP_EXEC
Terminal=false Terminal=false
Type=Application Type=Application
Icon=$ICON_PATH Icon=$ICON_PATH

View File

@@ -15,3 +15,9 @@ decoration {
# Use round window corners # Use round window corners
# rounding = 8 # 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
}

View File

@@ -12,3 +12,4 @@ source = ~/.local/share/omarchy/default/hypr/apps/steam.conf
source = ~/.local/share/omarchy/default/hypr/apps/system.conf source = ~/.local/share/omarchy/default/hypr/apps/system.conf
source = ~/.local/share/omarchy/default/hypr/apps/terminals.conf source = ~/.local/share/omarchy/default/hypr/apps/terminals.conf
source = ~/.local/share/omarchy/default/hypr/apps/walker.conf source = ~/.local/share/omarchy/default/hypr/apps/walker.conf
source = ~/.local/share/omarchy/default/hypr/apps/webcam-overlay.conf

View File

@@ -1,4 +1,4 @@
# Float Steam, fullscreen RetroArch # Float Steam
windowrule = float, class:steam windowrule = float, class:steam
windowrule = center, class:steam, title:Steam windowrule = center, class:steam, title:Steam
windowrule = opacity 1 1, class:steam windowrule = opacity 1 1, class:steam

View File

@@ -0,0 +1,6 @@
# Webcam overlay for screen recording
windowrule = float, title:WebcamOverlay
windowrule = pin, title:WebcamOverlay
windowrule = noinitialfocus, title:WebcamOverlay
windowrule = nodim, title:WebcamOverlay
windowrule = move 100%-w-40 100%-w-40, title:WebcamOverlay # There's a typo in the hyprland rule so 100%-w on the height param is actually correct here

View File

@@ -36,9 +36,9 @@ bindd = CTRL, PRINT, Screenshot of display, exec, omarchy-cmd-screenshot output
# Screen recordings # Screen recordings
bindd = ALT, PRINT, Screen record a region, exec, omarchy-cmd-screenrecord region bindd = ALT, PRINT, Screen record a region, exec, omarchy-cmd-screenrecord region
bindd = ALT SHIFT, PRINT, Screen record a region with audio, exec, omarchy-cmd-screenrecord region audio bindd = ALT SHIFT, PRINT, Screen record a region with audio, exec, omarchy-cmd-screenrecord region --with-audio
bindd = CTRL ALT, PRINT, Screen record display, exec, omarchy-cmd-screenrecord output bindd = CTRL ALT, PRINT, Screen record display, exec, omarchy-cmd-screenrecord output
bindd = CTRL ALT SHIFT, PRINT, Screen record display with audio, exec, omarchy-cmd-screenrecord output audio bindd = CTRL ALT SHIFT, PRINT, Screen record display with audio, exec, omarchy-cmd-screenrecord output --with-audio
# Color picker # Color picker
bindd = SUPER, PRINT, Color picker, exec, pkill hyprpicker || hyprpicker -a bindd = SUPER, PRINT, Color picker, exec, pkill hyprpicker || hyprpicker -a

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
if pgrep -x wl-screenrec >/dev/null || pgrep -x wf-recorder >/dev/null; then if pgrep -f "gpu-screen-recorder" >/dev/null; then
echo '{"text": "󰻂", "tooltip": "Stop recording", "class": "active"}' echo '{"text": "󰻂", "tooltip": "Stop recording", "class": "active"}'
else else
echo '{"text": ""}' echo '{"text": ""}'

View File

@@ -1,21 +0,0 @@
OMARCHY_DESCRIPTION="Firewall Configuration"
omarchy_verify() {
# Check if UFW is enabled
sudo ufw status | grep -q "Status: active" || add_error "UFW firewall not active"
# Check if UFW service is enabled
systemctl is-enabled ufw &>/dev/null || add_error "UFW service not enabled"
# Check default policies - they're on one line as "Default: deny (incoming), allow (outgoing), deny (routed)"
sudo ufw status verbose | grep -q "Default:.*deny (incoming)" || add_error "UFW default incoming policy not set to deny"
sudo ufw status verbose | grep -q "Default:.*allow (outgoing)" || add_error "UFW default outgoing policy not set to allow"
# Check specific rules are present
sudo ufw status numbered | grep -q "53317/udp" || add_error "LocalSend UDP port 53317 not allowed"
sudo ufw status numbered | grep -q "53317/tcp" || add_error "LocalSend TCP port 53317 not allowed"
sudo ufw status numbered | grep -q "22/tcp" || add_error "SSH port 22 not allowed"
# Check Docker DNS rule
sudo ufw status numbered | grep -q "allow-docker-dns" || add_error "Docker DNS rule not configured"
}

View File

@@ -1,9 +0,0 @@
OMARCHY_DESCRIPTION="GNOME Theme Settings"
omarchy_verify() {
gsettings get org.gnome.desktop.interface gtk-theme &>/dev/null || add_error "Cannot access GTK theme setting"
gsettings get org.gnome.desktop.interface color-scheme &>/dev/null || add_error "Cannot access color scheme setting"
gsettings get org.gnome.desktop.interface icon-theme &>/dev/null || add_error "Cannot access icon theme setting"
[[ -d /usr/share/icons ]] || add_error "Icon themes directory missing"
}

View File

@@ -1,13 +0,0 @@
OMARCHY_DESCRIPTION="Power Profile & Battery Settings"
omarchy_verify() {
if ls /sys/class/power_supply/BAT* &>/dev/null; then
current_profile=$(powerprofilesctl get 2>/dev/null)
[[ "$current_profile" == "balanced" ]] || add_error "Power profile not set to balanced for battery device"
systemctl --user is-enabled omarchy-battery-monitor.timer &>/dev/null || add_error "Battery monitor timer not enabled"
else
current_profile=$(powerprofilesctl get 2>/dev/null)
[[ "$current_profile" == "performance" ]] || add_error "Power profile not set to performance for AC device"
fi
}

View File

@@ -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/ignore-power-button.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-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-spi-keyboard.sh
run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-t2.sh run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-t2.sh

View File

@@ -1,13 +1,4 @@
OMARCHY_DESCRIPTION="Branding Config" # Allow the user to change the branding for fastfetch and screensaver
mkdir -p ~/.config/omarchy/branding
omarchy_install() { cp ~/.local/share/omarchy/icon.txt ~/.config/omarchy/branding/about.txt
mkdir -p ~/.config/omarchy/branding cp ~/.local/share/omarchy/logo.txt ~/.config/omarchy/branding/screensaver.txt
cp ~/.local/share/omarchy/icon.txt ~/.config/omarchy/branding/about.txt
cp ~/.local/share/omarchy/logo.txt ~/.config/omarchy/branding/screensaver.txt
}
omarchy_verify() {
[[ -d ~/.config/omarchy/branding ]] || add_error "Branding directory missing"
[[ -f ~/.config/omarchy/branding/about.txt ]] || add_error "About branding file missing"
[[ -f ~/.config/omarchy/branding/screensaver.txt ]] || add_error "Screensaver branding file missing"
}

View File

@@ -1,18 +1,6 @@
OMARCHY_DESCRIPTION="Config Files" # Copy over Omarchy configs
mkdir -p ~/.config
cp -R ~/.local/share/omarchy/config/* ~/.config/
omarchy_install() { # Use default bashrc from Omarchy
# Copy over Omarchy configs cp ~/.local/share/omarchy/default/bashrc ~/.bashrc
mkdir -p ~/.config
cp -R ~/.local/share/omarchy/config/* ~/.config/
# Use default bashrc from Omarchy
cp ~/.local/share/omarchy/default/bashrc ~/.bashrc
}
omarchy_verify() {
[[ -d ~/.config ]] || add_error "Config directory missing"
[[ -f ~/.bashrc ]] || add_error "Bashrc file missing"
[[ -d ~/.config/hypr ]] || add_error "Hypr config missing"
[[ -d ~/.config/waybar ]] || add_error "Waybar config missing"
}

View File

@@ -1,29 +1,13 @@
OMARCHY_DESCRIPTION="Keyboard Layout Config" # Copy over the keyboard layout that's been set in Arch during install to Hyprland
conf="/etc/vconsole.conf"
hyprconf="$HOME/.config/hypr/input.conf"
omarchy_install() { if grep -q '^XKBLAYOUT=' "$conf"; then
# Copy over the keyboard layout that's been set in Arch during install to Hyprland
conf="/etc/vconsole.conf"
hyprconf="$HOME/.config/hypr/input.conf"
if grep -q '^XKBLAYOUT=' "$conf"; then
layout=$(grep '^XKBLAYOUT=' "$conf" | cut -d= -f2 | tr -d '"') layout=$(grep '^XKBLAYOUT=' "$conf" | cut -d= -f2 | tr -d '"')
sed -i "/^[[:space:]]*kb_options *=/i\ kb_layout = $layout" "$hyprconf" sed -i "/^[[:space:]]*kb_options *=/i\ kb_layout = $layout" "$hyprconf"
fi fi
if grep -q '^XKBVARIANT=' "$conf"; then if grep -q '^XKBVARIANT=' "$conf"; then
variant=$(grep '^XKBVARIANT=' "$conf" | cut -d= -f2 | tr -d '"') variant=$(grep '^XKBVARIANT=' "$conf" | cut -d= -f2 | tr -d '"')
sed -i "/^[[:space:]]*kb_options *=/i\ kb_variant = $variant" "$hyprconf" sed -i "/^[[:space:]]*kb_options *=/i\ kb_variant = $variant" "$hyprconf"
fi fi
}
omarchy_verify() {
[[ -f "$HOME/.config/hypr/input.conf" ]] || add_error "Hyprland input config missing"
# If vconsole.conf has keyboard layout, check if it's in hypr config
if [[ -f "/etc/vconsole.conf" ]] && grep -q '^XKBLAYOUT=' "/etc/vconsole.conf"; then
layout=$(grep '^XKBLAYOUT=' "/etc/vconsole.conf" | cut -d= -f2 | tr -d '"')
if [[ -f "$HOME/.config/hypr/input.conf" ]]; then
grep -q "kb_layout = $layout" "$HOME/.config/hypr/input.conf" || add_error "Keyboard layout not configured in Hyprland"
fi
fi
}

View File

@@ -1,11 +1,8 @@
OMARCHY_DESCRIPTION="Docker Configuration" # Configure Docker daemon:
# - limit log size to avoid running out of disk
omarchy_install() { # - use host's DNS resolver
# Configure Docker daemon: sudo mkdir -p /etc/docker
# - limit log size to avoid running out of disk sudo tee /etc/docker/daemon.json >/dev/null <<'EOF'
# - use host's DNS resolver
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json >/dev/null <<'EOF'
{ {
"log-driver": "json-file", "log-driver": "json-file",
"log-opts": { "max-size": "10m", "max-file": "5" }, "log-opts": { "max-size": "10m", "max-file": "5" },
@@ -14,39 +11,22 @@ omarchy_install() {
} }
EOF EOF
# Expose systemd-resolved to our Docker network # Expose systemd-resolved to our Docker network
sudo mkdir -p /etc/systemd/resolved.conf.d sudo mkdir -p /etc/systemd/resolved.conf.d
echo -e '[Resolve]\nDNSStubListenerExtra=172.17.0.1' | sudo tee /etc/systemd/resolved.conf.d/20-docker-dns.conf >/dev/null echo -e '[Resolve]\nDNSStubListenerExtra=172.17.0.1' | sudo tee /etc/systemd/resolved.conf.d/20-docker-dns.conf >/dev/null
sudo systemctl restart systemd-resolved sudo systemctl restart systemd-resolved
# Start Docker automatically # Start Docker automatically
sudo systemctl enable docker sudo systemctl enable docker
# Give this user privileged Docker access # Give this user privileged Docker access
sudo usermod -aG docker ${USER} sudo usermod -aG docker ${USER}
# Prevent Docker from preventing boot for network-online.target # Prevent Docker from preventing boot for network-online.target
sudo mkdir -p /etc/systemd/system/docker.service.d sudo mkdir -p /etc/systemd/system/docker.service.d
sudo tee /etc/systemd/system/docker.service.d/no-block-boot.conf <<'EOF' sudo tee /etc/systemd/system/docker.service.d/no-block-boot.conf <<'EOF'
[Unit] [Unit]
DefaultDependencies=no DefaultDependencies=no
EOF EOF
sudo systemctl daemon-reload sudo systemctl daemon-reload
}
omarchy_verify() {
[[ -f /etc/docker/daemon.json ]] || add_error "Docker daemon.json missing"
[[ -f /etc/systemd/resolved.conf.d/20-docker-dns.conf ]] || add_error "Docker DNS config missing"
[[ -f /etc/systemd/system/docker.service.d/no-block-boot.conf ]] || add_error "Docker boot config missing"
getent group docker >/dev/null 2>&1 || add_error "Docker group does not exist"
groups "$USER" | grep -q docker || add_error "User $USER not in docker group"
if systemctl list-unit-files | grep -q docker.service; then
systemctl is-enabled docker >/dev/null 2>&1 || add_error "Docker service not enabled"
systemctl is-active docker >/dev/null 2>&1 || add_warning "Docker service is not running (may be intentional)"
fi
}

View File

@@ -1,14 +1,2 @@
OMARCHY_DESCRIPTION="Powerprofilesctl" # Ensure we use system python3 and not mise's python3
sudo sed -i '/env python3/ c\#!/bin/python3' /usr/bin/powerprofilesctl
omarchy_install() {
# Ensure we use system python3 and not mise's python3
sudo sed -i '/env python3/ c\#!/bin/python3' /usr/bin/powerprofilesctl
}
omarchy_verify() {
[[ -f /usr/bin/powerprofilesctl ]] || add_error "powerprofilesctl not found"
if [[ -f /usr/bin/powerprofilesctl ]]; then
head -n1 /usr/bin/powerprofilesctl | grep -q "^#!/bin/python3$" || add_error "powerprofilesctl shebang not fixed"
fi
}

View File

@@ -1,41 +1,20 @@
OMARCHY_DESCRIPTION="Git" # Ensure git settings live under ~/.config
mkdir -p ~/.config/git
touch ~/.config/git/config
omarchy_install() { # Set common git aliases
# Ensure git settings live under ~/.config git config --global alias.co checkout
mkdir -p ~/.config/git git config --global alias.br branch
touch ~/.config/git/config git config --global alias.ci commit
git config --global alias.st status
git config --global pull.rebase true
git config --global init.defaultBranch master
# Set common git aliases # Set identification from install inputs
git config --global alias.co checkout if [[ -n "${OMARCHY_USER_NAME//[[:space:]]/}" ]]; then
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
git config --global pull.rebase true
git config --global init.defaultBranch master
# Set identification from install inputs
if [[ -n "${OMARCHY_USER_NAME//[[:space:]]/}" ]]; then
git config --global user.name "$OMARCHY_USER_NAME" git config --global user.name "$OMARCHY_USER_NAME"
fi fi
if [[ -n "${OMARCHY_USER_EMAIL//[[:space:]]/}" ]]; then if [[ -n "${OMARCHY_USER_EMAIL//[[:space:]]/}" ]]; then
git config --global user.email "$OMARCHY_USER_EMAIL" git config --global user.email "$OMARCHY_USER_EMAIL"
fi fi
}
omarchy_verify() {
[[ -d ~/.config/git ]] || add_error "Git config directory missing"
[[ -f ~/.config/git/config ]] || add_error "Git config file missing"
command -v git >/dev/null 2>&1 || add_error "Git not installed"
if command -v git >/dev/null 2>&1; then
git config --global pull.rebase >/dev/null || add_error "Git pull.rebase not configured"
git config --global init.defaultBranch >/dev/null || add_error "Git defaultBranch not configured"
git config --global alias.co >/dev/null || add_error "Git alias 'co' not configured"
git config --global alias.br >/dev/null || add_error "Git alias 'br' not configured"
git config --global alias.ci >/dev/null || add_error "Git alias 'ci' not configured"
git config --global alias.st >/dev/null || add_error "Git alias 'st' not configured"
fi
}

View File

@@ -1,20 +1,6 @@
OMARCHY_DESCRIPTION="GPG" # Setup GPG configuration with multiple keyservers for better reliability
sudo mkdir -p /etc/gnupg
omarchy_install() { sudo cp ~/.local/share/omarchy/default/gpg/dirmngr.conf /etc/gnupg/
# Setup GPG configuration with multiple keyservers for better reliability sudo chmod 644 /etc/gnupg/dirmngr.conf
sudo mkdir -p /etc/gnupg sudo gpgconf --kill dirmngr || true
sudo cp ~/.local/share/omarchy/default/gpg/dirmngr.conf /etc/gnupg/ sudo gpgconf --launch dirmngr || true
sudo chmod 644 /etc/gnupg/dirmngr.conf
sudo gpgconf --kill dirmngr || true
sudo gpgconf --launch dirmngr || true
}
omarchy_verify() {
[[ -d /etc/gnupg ]] || add_error "GPG config directory missing"
[[ -f /etc/gnupg/dirmngr.conf ]] || add_error "GPG dirmngr.conf missing"
if [[ -f /etc/gnupg/dirmngr.conf ]]; then
local perms=$(stat -c %a /etc/gnupg/dirmngr.conf)
[[ "$perms" == "644" ]] || add_error "GPG dirmngr.conf has incorrect permissions: $perms (should be 644)"
fi
}

View File

@@ -1,9 +1,2 @@
OMARCHY_DESCRIPTION="Enable Bluetooth Service" # Turn on bluetooth by default
chrootable_systemctl_enable bluetooth.service
omarchy_install() {
chrootable_systemctl_enable bluetooth.service
}
omarchy_verify() {
systemctl is-enabled bluetooth.service >/dev/null 2>&1 || add_error "Bluetooth service not enabled"
}

View File

@@ -1,18 +0,0 @@
OMARCHY_DESCRIPTION="Apple BCM4360 WiFi Driver"
should_run() {
lspci -nnv | grep -A2 "14e4:43a0" | grep -q "106b:"
}
omarchy_install() {
should_run || return 0
echo "Apple BCM4360 detected"
sudo pacman -S --noconfirm --needed broadcom-wl dkms linux-headers
}
omarchy_verify() {
should_run || return 2
omarchy-pkg-present broadcom-wl || add_error "Broadcom wireless driver not installed"
}

View File

@@ -0,0 +1,11 @@
# Install Wi-Fi drivers for Broadcom chips on MacBooks:
# - BCM4360 (20132015)
# - 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

View File

@@ -1,23 +1,12 @@
OMARCHY_DESCRIPTION="MacBook SPI Keyboard Support" # Detect MacBook models that need SPI keyboard modules
product_name="$(cat /sys/class/dmi/id/product_name 2>/dev/null)"
should_run() { if [[ "$product_name" =~ MacBook[89],1|MacBook1[02],1|MacBookPro13,[123]|MacBookPro14,[123] ]]; then
[[ "$(cat /sys/class/dmi/id/product_name 2>/dev/null)" =~ MacBook12,1|MacBookPro13,[123]|MacBookPro14,[123] ]]
}
omarchy_install() {
should_run || return 0
echo "Detected MacBook with SPI keyboard" echo "Detected MacBook with SPI keyboard"
sudo pacman -S --noconfirm --needed macbook12-spi-driver-dkms sudo pacman -S --noconfirm --needed macbook12-spi-driver-dkms
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 echo "MODULES=(applespi intel_lpss_pci spi_pxa2xx_platform)" | sudo tee /etc/mkinitcpio.conf.d/macbook_spi_modules.conf >/dev/null
} fi
fi
omarchy_verify() {
should_run || return 2 # Return 2 to indicate "not applicable"
# Check if driver is installed
pacman -Q macbook12-spi-driver-dkms &>/dev/null || add_error "MacBook SPI driver not installed"
# Check if mkinitcpio config exists
[[ -f /etc/mkinitcpio.conf.d/macbook_spi_modules.conf ]] || add_error "MacBook SPI modules config missing"
}

View File

@@ -1,14 +1,6 @@
OMARCHY_DESCRIPTION="Apple T2 MacBook Support" # Detect T2 MacBook models using PCI IDs
# Vendor: 106b (Apple), Device IDs: 1801 or 1802 (T2 Security Chip)
# Detect T2 MacBook models using PCI IDs: 106b:1801 or 106b:1802 if lspci -nn | grep -q "106b:180[12]"; then
should_run() {
lspci -nn | grep -q "106b:180[12]"
}
# Installation function
omarchy_install() {
should_run || return 0
echo "Detected MacBook with T2 chip. Installing support items..." echo "Detected MacBook with T2 chip. Installing support items..."
sudo pacman -S --noconfirm --needed \ sudo pacman -S --noconfirm --needed \
@@ -33,17 +25,4 @@ EOF
# Generated by Omarchy installer for T2 Mac support # Generated by Omarchy installer for T2 Mac support
KERNEL_CMDLINE[default]+="intel_iommu=on iommu=pt pcie_ports=compat" KERNEL_CMDLINE[default]+="intel_iommu=on iommu=pt pcie_ports=compat"
EOF EOF
} fi
# Verification function
omarchy_verify() {
should_run || return 2
pacman -Q linux-t2 &>/dev/null || add_error "T2 Linux kernel not installed"
# Check if config files exist
[[ -f /etc/modules-load.d/t2.conf ]] || add_error "T2 modules config missing"
[[ -f /etc/mkinitcpio.conf.d/apple-t2.conf ]] || add_error "T2 mkinitcpio config missing"
[[ -f /etc/modprobe.d/brcmfmac.conf ]] || add_error "T2 WiFi fix config missing"
[[ -f /etc/limine-entry-tool.d/t2-mac.conf ]] || add_error "T2 boot config missing"
}

View File

@@ -1,18 +1,5 @@
OMARCHY_DESCRIPTION="Framework 13 AMD Audio Input Fix" AMD_AUDIO_CARD=$(pactl list cards 2>/dev/null | grep -B20 "Family 17h/19h" | grep "Name: " | awk '{print $2}' || true)
should_run() {
AMD_AUDIO_CARD=$(pactl list cards 2>/dev/null | grep -B20 "Family 17h/19h" | grep "Name: " | awk '{print $2}' || true)
[[ -n "$AMD_AUDIO_CARD" ]]
}
omarchy_install() {
should_run || return 0
if [[ -n $AMD_AUDIO_CARD ]]; then
pactl set-card-profile "$AMD_AUDIO_CARD" "HiFi (Mic1, Mic2, Speaker)" 2>/dev/null || true pactl set-card-profile "$AMD_AUDIO_CARD" "HiFi (Mic1, Mic2, Speaker)" 2>/dev/null || true
} fi
omarchy_verify() {
should_run || return 2
pactl list cards | grep -A10 "$AMD_AUDIO_CARD" | grep -q "Active Profile:" || add_error "AMD audio profile not configured"
}

View File

@@ -1,16 +1,4 @@
OMARCHY_DESCRIPTION="Set F-keys as F-keys by default" # Ensure that F-keys on Apple-like keyboards (such as Lofree Flow84) are always F-keys
if [[ ! -f /etc/modprobe.d/hid_apple.conf ]]; then
omarchy_install() {
# Ensure that F-keys on Apple-like keyboards (such as Lofree Flow84) are always F-keys
if [[ ! -f /etc/modprobe.d/hid_apple.conf ]]; then
echo "options hid_apple fnmode=2" | sudo tee /etc/modprobe.d/hid_apple.conf echo "options hid_apple fnmode=2" | sudo tee /etc/modprobe.d/hid_apple.conf
fi fi
}
omarchy_verify() {
[[ -f /etc/modprobe.d/hid_apple.conf ]] || add_error "Apple HID config missing"
if [[ -f /etc/modprobe.d/hid_apple.conf ]]; then
grep -q "options hid_apple fnmode=2" /etc/modprobe.d/hid_apple.conf || add_error "F-key mode not configured"
fi
}

View File

@@ -1,15 +1,2 @@
OMARCHY_DESCRIPTION="Disable power button" # Disable shutting system down on power button to bind it to power menu afterwards
sudo sed -i 's/.*HandlePowerKey=.*/HandlePowerKey=ignore/' /etc/systemd/logind.conf
omarchy_install() {
# Disable shutting system down on power button to bind it to power menu afterwards
sudo sed -i 's/.*HandlePowerKey=.*/HandlePowerKey=ignore/' /etc/systemd/logind.conf
}
omarchy_verify() {
[[ -f /etc/systemd/logind.conf ]] || add_error "Logind config missing"
# Check if power button is set to ignore
if [[ -f /etc/systemd/logind.conf ]]; then
grep -q "^HandlePowerKey=ignore" /etc/systemd/logind.conf || add_error "Power button not set to ignore"
fi
}

View File

@@ -1,13 +1,6 @@
OMARCHY_DESCRIPTION="Setup Intel video acceleration" # This installs hardware video acceleration for Intel GPUs
# Check if we have an Intel GPU at all
should_run() { if INTEL_GPU=$(lspci | grep -iE 'vga|3d|display' | grep -i 'intel'); then
INTEL_GPU=$(lspci | grep -iE 'vga|3d|display' | grep -i 'intel' || true)
[[ -n "$INTEL_GPU" ]]
}
omarchy_install() {
should_run || return 0
# HD Graphics and newer uses intel-media-driver # HD Graphics and newer uses intel-media-driver
if [[ "${INTEL_GPU,,}" =~ "hd graphics"|"xe"|"iris" ]]; then if [[ "${INTEL_GPU,,}" =~ "hd graphics"|"xe"|"iris" ]]; then
sudo pacman -S --needed --noconfirm intel-media-driver sudo pacman -S --needed --noconfirm intel-media-driver
@@ -15,16 +8,4 @@ omarchy_install() {
# Older generations from 2008 to ~2014-2017 use libva-intel-driver # Older generations from 2008 to ~2014-2017 use libva-intel-driver
sudo pacman -S --needed --noconfirm libva-intel-driver sudo pacman -S --needed --noconfirm libva-intel-driver
fi fi
} fi
# Verification function
omarchy_verify() {
should_run || return 2
# Check if appropriate driver is installed
if [[ "${INTEL_GPU,,}" =~ "hd graphics"|"xe"|"iris" ]]; then
pacman -Q intel-media-driver &>/dev/null || add_error "Intel media driver not installed"
elif [[ "${INTEL_GPU,,}" =~ "gma" ]]; then
pacman -Q libva-intel-driver &>/dev/null || add_error "Intel VA-API driver not installed"
fi
}

View File

@@ -1,14 +1,6 @@
OMARCHY_DESCRIPTION="Network Config" # Ensure iwd service will be started
sudo systemctl enable iwd.service
omarchy_install() { # Prevent systemd-networkd-wait-online timeout on boot
sudo systemctl enable iwd.service sudo systemctl disable systemd-networkd-wait-online.service
sudo systemctl mask systemd-networkd-wait-online.service
sudo systemctl disable systemd-networkd-wait-online.service
sudo systemctl mask systemd-networkd-wait-online.service
}
omarchy_verify() {
systemctl is-enabled iwd.service >/dev/null 2>&1 || add_error "IWD service not enabled"
systemctl is-enabled systemd-networkd-wait-online.service 2>&1 | grep -q "masked" || add_error "systemd-networkd-wait-online not masked"
}

View File

@@ -1,15 +1,18 @@
OMARCHY_DESCRIPTION="NVIDIA GPU Configuration" # ==============================================================================
# Hyprland NVIDIA Setup Script for Arch Linux
should_run() { # ==============================================================================
NVIDIA_GPU=$(lspci | grep -i 'nvidia' || true) # This script automates the installation and configuration of NVIDIA drivers
[[ -n "$NVIDIA_GPU" ]] # for use with Hyprland on Arch Linux, following the official Hyprland wiki.
} #
# Author: https://github.com/Kn0ax
omarchy_install() { #
should_run || return 0 # ==============================================================================
# --- GPU Detection ---
if [ -n "$(lspci | grep -i 'nvidia')" ]; then
# --- Driver Selection ---
# 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
if echo "$NVIDIA_GPU" | grep -q -E "RTX [2-9][0-9]|GTX 16"; then if echo "$(lspci | grep -i 'nvidia')" | grep -q -E "RTX [2-9][0-9]|GTX 16"; then
NVIDIA_DRIVER_PACKAGE="nvidia-open-dkms" NVIDIA_DRIVER_PACKAGE="nvidia-open-dkms"
else else
NVIDIA_DRIVER_PACKAGE="nvidia-dkms" NVIDIA_DRIVER_PACKAGE="nvidia-dkms"
@@ -64,7 +67,7 @@ omarchy_install() {
sudo mkinitcpio -P sudo mkinitcpio -P
# Add NVIDIA environment variables to hyprland.conf # Add NVIDIA environment variables to hyprland.conf
HYPRLAND_CONF="$HOME/.config/hypr/envs.conf" HYPRLAND_CONF="$HOME/.config/hypr/hyprland.conf"
if [ -f "$HYPRLAND_CONF" ]; then if [ -f "$HYPRLAND_CONF" ]; then
cat >>"$HYPRLAND_CONF" <<'EOF' cat >>"$HYPRLAND_CONF" <<'EOF'
@@ -74,22 +77,4 @@ env = LIBVA_DRIVER_NAME,nvidia
env = __GLX_VENDOR_LIBRARY_NAME,nvidia env = __GLX_VENDOR_LIBRARY_NAME,nvidia
EOF EOF
fi fi
} fi
omarchy_verify() {
should_run || return 2
pacman -Q nvidia-dkms &>/dev/null || pacman -Q nvidia-open-dkms &>/dev/null || add_error "NVIDIA driver not installed"
[[ -f /etc/modprobe.d/nvidia.conf ]] || add_error "NVIDIA modprobe config missing"
if [[ -f /etc/modprobe.d/nvidia.conf ]]; then
grep -q "options nvidia_drm modeset=1" /etc/modprobe.d/nvidia.conf || add_error "NVIDIA DRM modeset not enabled"
fi
grep -q "nvidia" /etc/mkinitcpio.conf || add_error "NVIDIA modules not in mkinitcpio.conf"
if [[ -f "$HOME/.config/hypr/hyprland.conf" ]]; then
grep -q "LIBVA_DRIVER_NAME,nvidia" "$HOME/.config/hypr/hyprland.conf" || add_error "NVIDIA env vars not in Hyprland config"
fi
}

View File

@@ -1,32 +1,16 @@
OMARCHY_DESCRIPTION="Printer Config" chrootable_systemctl_enable cups.service
omarchy_install() { # Disable multicast dns in resolved. Avahi will provide this for better network printer discovery
chrootable_systemctl_enable cups.service sudo mkdir -p /etc/systemd/resolved.conf.d
echo -e "[Resolve]\nMulticastDNS=no" | sudo tee /etc/systemd/resolved.conf.d/10-disable-multicast.conf
chrootable_systemctl_enable avahi-daemon.service
# Disable multicast dns in resolved. Avahi will provide this for better network printer discovery # Enable mDNS resolution for .local domains
sudo mkdir -p /etc/systemd/resolved.conf.d sudo sed -i 's/^hosts:.*/hosts: mymachines mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns/' /etc/nsswitch.conf
echo -e "[Resolve]\nMulticastDNS=no" | sudo tee /etc/systemd/resolved.conf.d/10-disable-multicast.conf
chrootable_systemctl_enable avahi-daemon.service
# Enable mDNS resolution for .local domains # Enable automatically adding remote printers
sudo sed -i 's/^hosts:.*/hosts: mymachines mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns/' /etc/nsswitch.conf if ! grep -q '^CreateRemotePrinters Yes' /etc/cups/cups-browsed.conf; then
# Enable automatically adding remote printers
if ! grep -q '^CreateRemotePrinters Yes' /etc/cups/cups-browsed.conf; then
echo 'CreateRemotePrinters Yes' | sudo tee -a /etc/cups/cups-browsed.conf echo 'CreateRemotePrinters Yes' | sudo tee -a /etc/cups/cups-browsed.conf
fi fi
chrootable_systemctl_enable cups-browsed.service chrootable_systemctl_enable cups-browsed.service
}
omarchy_verify() {
systemctl is-enabled cups.service >/dev/null 2>&1 || add_error "CUPS service not enabled"
systemctl is-enabled avahi-daemon.service >/dev/null 2>&1 || add_error "Avahi daemon not enabled"
systemctl is-enabled cups-browsed.service >/dev/null 2>&1 || add_error "CUPS browsed service not enabled"
[[ -f /etc/systemd/resolved.conf.d/10-disable-multicast.conf ]] || add_error "Multicast DNS config missing"
grep -q "mdns_minimal" /etc/nsswitch.conf || add_error "mDNS not configured in nsswitch.conf"
[[ -f /etc/cups/cups-browsed.conf ]] && grep -q '^CreateRemotePrinters Yes' /etc/cups/cups-browsed.conf || add_error "Remote printers not enabled in CUPS"
}

View File

@@ -1,37 +1,33 @@
OMARCHY_DESCRIPTION="Wireless Regdom" # First check that wireless-regdb is there
if [ -f "/etc/conf.d/wireless-regdom" ]; then
omarchy_install() {
if [ -f "/etc/conf.d/wireless-regdom" ]; then
unset WIRELESS_REGDOM unset WIRELESS_REGDOM
. /etc/conf.d/wireless-regdom . /etc/conf.d/wireless-regdom
fi fi
if [ ! -n "${WIRELESS_REGDOM}" ]; then # If the region is already set, we're done
if [ ! -n "${WIRELESS_REGDOM}" ]; then
# Get the current timezone
if [ -e "/etc/localtime" ]; then if [ -e "/etc/localtime" ]; then
TIMEZONE=$(readlink -f /etc/localtime) TIMEZONE=$(readlink -f /etc/localtime)
TIMEZONE=${TIMEZONE#/usr/share/zoneinfo/} TIMEZONE=${TIMEZONE#/usr/share/zoneinfo/}
# Some timezones are formatted with the two letter country code at the start
COUNTRY="${TIMEZONE%%/*}" COUNTRY="${TIMEZONE%%/*}"
# If we don't have a two letter country, get it from the timezone table
if [[ ! "$COUNTRY" =~ ^[A-Z]{2}$ ]] && [ -f "/usr/share/zoneinfo/zone.tab" ]; then if [[ ! "$COUNTRY" =~ ^[A-Z]{2}$ ]] && [ -f "/usr/share/zoneinfo/zone.tab" ]; then
COUNTRY=$(awk -v tz="$TIMEZONE" '$3 == tz {print $1; exit}' /usr/share/zoneinfo/zone.tab) COUNTRY=$(awk -v tz="$TIMEZONE" '$3 == tz {print $1; exit}' /usr/share/zoneinfo/zone.tab)
fi fi
# Check if we have a two letter country code
if [[ "$COUNTRY" =~ ^[A-Z]{2}$ ]]; then if [[ "$COUNTRY" =~ ^[A-Z]{2}$ ]]; then
# Append it to the wireless-regdom conf file that is used at boot
echo "WIRELESS_REGDOM=\"$COUNTRY\"" | sudo tee -a /etc/conf.d/wireless-regdom >/dev/null echo "WIRELESS_REGDOM=\"$COUNTRY\"" | sudo tee -a /etc/conf.d/wireless-regdom >/dev/null
# Also set it one off now
if command -v iw &>/dev/null; then if command -v iw &>/dev/null; then
sudo iw reg set ${COUNTRY} sudo iw reg set ${COUNTRY}
fi fi
fi fi
fi fi
fi fi
}
omarchy_verify() {
[[ -f /etc/conf.d/wireless-regdom ]] || add_error "Wireless regdom config missing"
if [[ -f /etc/conf.d/wireless-regdom ]]; then
grep -q "^WIRELESS_REGDOM=" /etc/conf.d/wireless-regdom || add_error "Wireless regulatory domain not configured"
fi
}

View File

@@ -1,16 +1,5 @@
OMARCHY_DESCRIPTION="USB Autosuspend" # Disable USB autosuspend to prevent peripheral disconnection issues
if [[ ! -f /etc/modprobe.d/disable-usb-autosuspend.conf ]]; then
omarchy_install() {
# Disable USB autosuspend to prevent peripheral disconnection issues
if [[ ! -f /etc/modprobe.d/disable-usb-autosuspend.conf ]]; then
echo "options usbcore autosuspend=-1" | sudo tee /etc/modprobe.d/disable-usb-autosuspend.conf echo "options usbcore autosuspend=-1" | sudo tee /etc/modprobe.d/disable-usb-autosuspend.conf
fi fi
}
omarchy_verify() {
[[ -f /etc/modprobe.d/disable-usb-autosuspend.conf ]] || add_error "USB autosuspend config missing"
if [[ -f /etc/modprobe.d/disable-usb-autosuspend.conf ]]; then
grep -q "options usbcore autosuspend=-1" /etc/modprobe.d/disable-usb-autosuspend.conf || add_error "USB autosuspend not disabled"
fi
}

View File

@@ -1,16 +1,3 @@
OMARCHY_DESCRIPTION="Lockout Limit" # Increase lockout limit to 10 and decrease timeout to 2 minutes
sudo sed -i 's|^\(auth\s\+required\s\+pam_faillock.so\)\s\+preauth.*$|\1 preauth silent deny=10 unlock_time=120|' "/etc/pam.d/system-auth"
omarchy_install() { sudo sed -i 's|^\(auth\s\+\[default=die\]\s\+pam_faillock.so\)\s\+authfail.*$|\1 authfail deny=10 unlock_time=120|' "/etc/pam.d/system-auth"
# Increase lockout limit to 10 and decrease timeout to 2 minutes
sudo sed -i 's|^\(auth\s\+required\s\+pam_faillock.so\)\s\+preauth.*$|\1 preauth silent deny=10 unlock_time=120|' "/etc/pam.d/system-auth"
sudo sed -i 's|^\(auth\s\+\[default=die\]\s\+pam_faillock.so\)\s\+authfail.*$|\1 authfail deny=10 unlock_time=120|' "/etc/pam.d/system-auth"
}
omarchy_verify() {
[[ -f /etc/pam.d/system-auth ]] || add_error "PAM system-auth file missing"
if [[ -f /etc/pam.d/system-auth ]]; then
grep -q "pam_faillock.so.*deny=10" /etc/pam.d/system-auth || add_error "Faillock deny limit not set to 10"
grep -q "pam_faillock.so.*unlock_time=120" /etc/pam.d/system-auth || add_error "Faillock unlock time not set to 120"
fi
}

View File

@@ -1,18 +1,3 @@
OMARCHY_DESCRIPTION="Sudo lockout limit" # Give the user 10 instead of 3 tries to fat finger their password before lockout
echo "Defaults passwd_tries=10" | sudo tee /etc/sudoers.d/passwd-tries
omarchy_install() { sudo chmod 440 /etc/sudoers.d/passwd-tries
# Give the user 10 instead of 3 tries to fat finger their password before lockout
echo "Defaults passwd_tries=10" | sudo tee /etc/sudoers.d/passwd-tries
sudo chmod 440 /etc/sudoers.d/passwd-tries
}
omarchy_verify() {
sudo test -f /etc/sudoers.d/passwd-tries || add_error "Sudoers passwd-tries file missing"
if sudo test -f /etc/sudoers.d/passwd-tries; then
local perms=$(sudo stat -c %a /etc/sudoers.d/passwd-tries)
[[ "$perms" == "440" ]] || add_error "Sudoers file has incorrect permissions: $perms (should be 440)"
sudo grep -q "passwd_tries=10" /etc/sudoers.d/passwd-tries || add_error "Passwd tries not set to 10"
fi
}

View File

@@ -1,10 +1 @@
OMARCHY_DESCRIPTION="LazyVim" omarchy-lazyvim-setup
omarchy_install() {
omarchy-lazyvim-setup
}
omarchy_verify() {
[[ -d ~/.config/nvim ]] || add_error "Neovim config directory missing"
[[ -d ~/.local/share/nvim/lazy ]] || add_error "LazyVim plugins directory missing"
}

View File

@@ -1,12 +1,2 @@
OMARCHY_DESCRIPTION="LocalDB" # Update localdb so that locate will find everything installed
sudo updatedb
omarchy_install() {
# Update localdb so that locate will find everything installed
sudo updatedb
}
omarchy_verify() {
[[ -f /var/lib/mlocate/mlocate.db ]] || [[ -f /var/lib/plocate/plocate.db ]] || add_error "Locate database missing"
command -v locate >/dev/null 2>&1 || add_error "Locate command not available"
}

View File

@@ -1,48 +1,35 @@
OMARCHY_DESCRIPTION="Mimetypes" omarchy-refresh-applications
update-desktop-database ~/.local/share/applications
omarchy_install() { # Open all images with imv
omarchy-refresh-applications xdg-mime default imv.desktop image/png
update-desktop-database ~/.local/share/applications xdg-mime default imv.desktop image/jpeg
xdg-mime default imv.desktop image/gif
xdg-mime default imv.desktop image/webp
xdg-mime default imv.desktop image/bmp
xdg-mime default imv.desktop image/tiff
# Open all images with imv # Open PDFs with the Document Viewer
xdg-mime default imv.desktop image/png xdg-mime default org.gnome.Evince.desktop application/pdf
xdg-mime default imv.desktop image/jpeg
xdg-mime default imv.desktop image/gif
xdg-mime default imv.desktop image/webp
xdg-mime default imv.desktop image/bmp
xdg-mime default imv.desktop image/tiff
# Open PDFs with the Document Viewer # Use Chromium as the default browser
xdg-mime default org.gnome.Evince.desktop application/pdf xdg-settings set default-web-browser chromium.desktop
xdg-mime default chromium.desktop x-scheme-handler/http
xdg-mime default chromium.desktop x-scheme-handler/https
# Use Chromium as the default browser # Open video files with mpv
xdg-settings set default-web-browser chromium.desktop xdg-mime default mpv.desktop video/mp4
xdg-mime default chromium.desktop x-scheme-handler/http xdg-mime default mpv.desktop video/x-msvideo
xdg-mime default chromium.desktop x-scheme-handler/https xdg-mime default mpv.desktop video/x-matroska
xdg-mime default mpv.desktop video/x-flv
# Open video files with mpv xdg-mime default mpv.desktop video/x-ms-wmv
xdg-mime default mpv.desktop video/mp4 xdg-mime default mpv.desktop video/mpeg
xdg-mime default mpv.desktop video/x-msvideo xdg-mime default mpv.desktop video/ogg
xdg-mime default mpv.desktop video/x-matroska xdg-mime default mpv.desktop video/webm
xdg-mime default mpv.desktop video/x-flv xdg-mime default mpv.desktop video/quicktime
xdg-mime default mpv.desktop video/x-ms-wmv xdg-mime default mpv.desktop video/3gpp
xdg-mime default mpv.desktop video/mpeg xdg-mime default mpv.desktop video/3gpp2
xdg-mime default mpv.desktop video/ogg xdg-mime default mpv.desktop video/x-ms-asf
xdg-mime default mpv.desktop video/webm xdg-mime default mpv.desktop video/x-ogm+ogg
xdg-mime default mpv.desktop video/quicktime xdg-mime default mpv.desktop video/x-theora+ogg
xdg-mime default mpv.desktop video/3gpp xdg-mime default mpv.desktop application/ogg
xdg-mime default mpv.desktop video/3gpp2
xdg-mime default mpv.desktop video/x-ms-asf
xdg-mime default mpv.desktop video/x-ogm+ogg
xdg-mime default mpv.desktop video/x-theora+ogg
xdg-mime default mpv.desktop application/ogg
}
omarchy_verify() {
[[ -d ~/.local/share/applications ]] || add_error "Applications directory missing"
xdg-mime query default image/png | grep -q "imv.desktop" || add_error "Image viewer not set for PNG"
xdg-mime query default application/pdf | grep -q "Evince.desktop" || add_error "PDF viewer not set"
xdg-mime query default x-scheme-handler/http | grep -q "chromium.desktop" || add_warning "Browser not set to Chromium"
xdg-mime query default video/mp4 | grep -q "mpv.desktop" || add_error "Video player not set for MP4"
}

View File

@@ -1,23 +1,9 @@
OMARCHY_DESCRIPTION="Mise" # Add ./bin to path for all items in ~/Work
mkdir -p "$HOME/Work"
omarchy_install() { cat >"$HOME/Work/.mise.toml" <<'EOF'
# Add ./bin to path for all items in ~/Work
mkdir -p "$HOME/Work"
cat >"$HOME/Work/.mise.toml" <<'EOF'
[env] [env]
_.path = "{{ cwd }}/bin" _.path = "{{ cwd }}/bin"
EOF EOF
mise trust ~/Work/.mise.toml mise trust ~/Work/.mise.toml
}
omarchy_verify() {
[[ -d "$HOME/Work" ]] || add_error "Work directory missing"
[[ -f "$HOME/Work/.mise.toml" ]] || add_error "Mise config missing in Work directory"
if [[ -f "$HOME/Work/.mise.toml" ]]; then
grep -q '_.path' "$HOME/Work/.mise.toml" || add_error "Mise path configuration missing"
fi
}

View File

@@ -1,14 +1,2 @@
OMARCHY_DESCRIPTION="SSH Flakiness Fix" # Solve common flakiness with SSH
echo "net.ipv4.tcp_mtu_probing=1" | sudo tee -a /etc/sysctl.d/99-sysctl.conf
omarchy_install() {
# Solve common flakiness with SSH
echo "net.ipv4.tcp_mtu_probing=1" | sudo tee -a /etc/sysctl.d/99-sysctl.conf
}
omarchy_verify() {
[[ -f /etc/sysctl.d/99-sysctl.conf ]] || add_error "Sysctl config file missing"
if [[ -f /etc/sysctl.d/99-sysctl.conf ]]; then
grep -q "net.ipv4.tcp_mtu_probing=1" /etc/sysctl.d/99-sysctl.conf || add_error "TCP MTU probing not configured"
fi
}

View File

@@ -1,18 +1,3 @@
OMARCHY_DESCRIPTION="ASDControl Sudoless Brightness Control" # Setup sudo-less controls for controlling brightness on Apple Displays
echo "$USER ALL=(ALL) NOPASSWD: /usr/local/bin/asdcontrol" | sudo tee /etc/sudoers.d/asdcontrol
omarchy_install() { sudo chmod 440 /etc/sudoers.d/asdcontrol
# Setup sudo-less controls for controlling brightness on Apple Displays
echo "$USER ALL=(ALL) NOPASSWD: /usr/local/bin/asdcontrol" | sudo tee /etc/sudoers.d/asdcontrol
sudo chmod 440 /etc/sudoers.d/asdcontrol
}
omarchy_verify() {
sudo test -f /etc/sudoers.d/asdcontrol || add_error "ASDControl sudoers file missing"
if sudo test -f /etc/sudoers.d/asdcontrol; then
local perms=$(sudo stat -c %a /etc/sudoers.d/asdcontrol)
[[ "$perms" == "440" ]] || add_error "Sudoers file has incorrect permissions: $perms (should be 440)"
sudo grep -q "NOPASSWD: /usr/local/bin/asdcontrol" /etc/sudoers.d/asdcontrol || add_error "ASDControl sudoers rule not configured"
fi
}

View File

@@ -1,52 +1,31 @@
OMARCHY_DESCRIPTION="Theme" # Set links for Nautilius action icons
sudo ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-previous-symbolic.svg /usr/share/icons/Yaru/scalable/actions/go-previous-symbolic.svg
sudo ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-next-symbolic.svg /usr/share/icons/Yaru/scalable/actions/go-next-symbolic.svg
omarchy_install() { # Setup theme links
# Set links for Nautilius action icons mkdir -p ~/.config/omarchy/themes
sudo ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-previous-symbolic.svg /usr/share/icons/Yaru/scalable/actions/go-previous-symbolic.svg for f in ~/.local/share/omarchy/themes/*; do ln -nfs "$f" ~/.config/omarchy/themes/; done
sudo ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-next-symbolic.svg /usr/share/icons/Yaru/scalable/actions/go-next-symbolic.svg
# Setup theme links # Set initial theme
mkdir -p ~/.config/omarchy/themes mkdir -p ~/.config/omarchy/current
for f in ~/.local/share/omarchy/themes/*; do ln -nfs "$f" ~/.config/omarchy/themes/; done ln -snf ~/.config/omarchy/themes/tokyo-night ~/.config/omarchy/current/theme
ln -snf ~/.config/omarchy/current/theme/backgrounds/1-scenery-pink-lakeside-sunset-lake-landscape-scenic-panorama-7680x3215-144.png ~/.config/omarchy/current/background
# Set initial theme # Set specific app links for current theme
mkdir -p ~/.config/omarchy/current ln -snf ~/.config/omarchy/current/theme/neovim.lua ~/.config/nvim/lua/plugins/theme.lua
ln -snf ~/.config/omarchy/themes/tokyo-night ~/.config/omarchy/current/theme
ln -snf ~/.config/omarchy/current/theme/backgrounds/1-scenery-pink-lakeside-sunset-lake-landscape-scenic-panorama-7680x3215-144.png ~/.config/omarchy/current/background
# Set specific app links for current theme mkdir -p ~/.config/btop/themes
ln -snf ~/.config/omarchy/current/theme/neovim.lua ~/.config/nvim/lua/plugins/theme.lua ln -snf ~/.config/omarchy/current/theme/btop.theme ~/.config/btop/themes/current.theme
mkdir -p ~/.config/btop/themes mkdir -p ~/.config/mako
ln -snf ~/.config/omarchy/current/theme/btop.theme ~/.config/btop/themes/current.theme ln -snf ~/.config/omarchy/current/theme/mako.ini ~/.config/mako/config
mkdir -p ~/.config/mako mkdir -p ~/.config/eza
ln -snf ~/.config/omarchy/current/theme/mako.ini ~/.config/mako/config ln -snf ~/.config/omarchy/current/theme/eza.yml ~/.config/eza/theme.yml
mkdir -p ~/.config/eza # Add managed policy directories for Chromium and Brave for theme changes
ln -snf ~/.config/omarchy/current/theme/eza.yml ~/.config/eza/theme.yml sudo mkdir -p /etc/chromium/policies/managed
sudo chmod a+rw /etc/chromium/policies/managed
# Add managed policy directories for Chromium and Brave for theme changes sudo mkdir -p /etc/brave/policies/managed
sudo mkdir -p /etc/chromium/policies/managed sudo chmod a+rw /etc/brave/policies/managed
sudo chmod a+rw /etc/chromium/policies/managed
sudo mkdir -p /etc/brave/policies/managed
sudo chmod a+rw /etc/brave/policies/managed
}
omarchy_verify() {
[[ -d ~/.config/omarchy/themes ]] || add_error "Theme directory missing: ~/.config/omarchy/themes"
[[ -L ~/.config/omarchy/current/theme ]] || add_error "Current theme symlink missing"
[[ -L ~/.config/omarchy/current/background ]] || add_error "Background symlink missing"
[[ -L /usr/share/icons/Yaru/scalable/actions/go-previous-symbolic.svg ]] || add_error "Nautilus previous icon not linked"
[[ -L /usr/share/icons/Yaru/scalable/actions/go-next-symbolic.svg ]] || add_error "Nautilus next icon not linked"
[[ -L ~/.config/nvim/lua/plugins/theme.lua ]] || add_error "Neovim theme link missing"
[[ -L ~/.config/btop/themes/current.theme ]] || add_error "btop theme link missing"
[[ -L ~/.config/mako/config ]] || add_error "mako config link missing"
[[ -L ~/.config/eza/theme.yml ]] || add_error "eza theme link missing"
[[ -d /etc/chromium/policies/managed ]] || add_error "Chromium policy directory missing"
[[ -d /etc/brave/policies/managed ]] || add_error "Brave policy directory missing"
}

View File

@@ -1,20 +1,5 @@
OMARCHY_DESCRIPTION="Timezone Update Permissions" # Ensure timezone can be updated without needing to sudo
sudo tee /etc/sudoers.d/omarchy-tzupdate >/dev/null <<EOF
omarchy_install() {
# Ensure timezone can be updated without needing to sudo
sudo tee /etc/sudoers.d/omarchy-tzupdate >/dev/null <<EOF
%wheel ALL=(root) NOPASSWD: /usr/bin/tzupdate, /usr/bin/timedatectl %wheel ALL=(root) NOPASSWD: /usr/bin/tzupdate, /usr/bin/timedatectl
EOF EOF
sudo chmod 0440 /etc/sudoers.d/omarchy-tzupdate sudo chmod 0440 /etc/sudoers.d/omarchy-tzupdate
}
omarchy_verify() {
sudo test -f /etc/sudoers.d/omarchy-tzupdate || add_error "Timezone sudoers file missing"
if sudo test -f /etc/sudoers.d/omarchy-tzupdate; then
local perms=$(sudo stat -c %a /etc/sudoers.d/omarchy-tzupdate)
[[ "$perms" == "440" ]] || add_error "Sudoers file has incorrect permissions: $perms (should be 440)"
sudo grep -q "NOPASSWD: /usr/bin/tzupdate, /usr/bin/timedatectl" /etc/sudoers.d/omarchy-tzupdate || add_error "Timezone sudoers rule not configured"
fi
}

View File

@@ -1,20 +1,8 @@
OMARCHY_DESCRIPTION="XCompose" # Set default XCompose that is triggered with CapsLock
tee ~/.XCompose >/dev/null <<EOF
omarchy_install() {
# Set default XCompose that is triggered with CapsLock
tee ~/.XCompose >/dev/null <<EOF
include "%H/.local/share/omarchy/default/xcompose" include "%H/.local/share/omarchy/default/xcompose"
# Identification # Identification
<Multi_key> <space> <n> : "$OMARCHY_USER_NAME" <Multi_key> <space> <n> : "$OMARCHY_USER_NAME"
<Multi_key> <space> <e> : "$OMARCHY_USER_EMAIL" <Multi_key> <space> <e> : "$OMARCHY_USER_EMAIL"
EOF EOF
}
omarchy_verify() {
[[ -f ~/.XCompose ]] || add_error "XCompose file missing"
if [[ -f ~/.XCompose ]]; then
grep -q "include.*xcompose" ~/.XCompose || add_error "XCompose include directive missing"
fi
}

View File

@@ -118,15 +118,8 @@ run_logged() {
echo "[$(date '+%Y-%m-%d %H:%M:%S')] Starting: $script" >>"$OMARCHY_INSTALL_LOG_FILE" echo "[$(date '+%Y-%m-%d %H:%M:%S')] Starting: $script" >>"$OMARCHY_INSTALL_LOG_FILE"
( # Use bash -c to create a clean subshell
# Source the script bash -c "source '$script'" </dev/null >>"$OMARCHY_INSTALL_LOG_FILE" 2>&1
source "$script"
# Check if omarchy_install function exists and run it, otherwise the script already ran
if declare -f omarchy_install >/dev/null 2>&1; then
omarchy_install
fi
) </dev/null >>"$OMARCHY_INSTALL_LOG_FILE" 2>&1
local exit_code=$? local exit_code=$?

View File

@@ -1,4 +1,4 @@
run_logged $OMARCHY_INSTALL/login/plymouth.sh run_logged $OMARCHY_INSTALL/login/plymouth.sh
run_logged $OMARCHY_INSTALL/login/default-keyring.sh
run_logged $OMARCHY_INSTALL/login/sddm.sh
run_logged $OMARCHY_INSTALL/login/limine-snapper.sh run_logged $OMARCHY_INSTALL/login/limine-snapper.sh
run_logged $OMARCHY_INSTALL/login/enable-mkinitcpio.sh
run_logged $OMARCHY_INSTALL/login/alt-bootloaders.sh

View File

@@ -0,0 +1,115 @@
if ! command -v limine &>/dev/null; then
# Add kernel hooks
if ! grep -Eq '^HOOKS=.*plymouth' /etc/mkinitcpio.conf; then
# Backup original mkinitcpio.conf just in case
backup_timestamp=$(date +"%Y%m%d%H%M%S")
sudo cp /etc/mkinitcpio.conf "/etc/mkinitcpio.conf.bak.${backup_timestamp}"
# Add plymouth to HOOKS array after 'base udev' or 'base systemd'
if grep "^HOOKS=" /etc/mkinitcpio.conf | grep -q "base systemd"; then
sudo sed -i '/^HOOKS=/s/base systemd/base systemd plymouth/' /etc/mkinitcpio.conf
elif grep "^HOOKS=" /etc/mkinitcpio.conf | grep -q "base udev"; then
sudo sed -i '/^HOOKS=/s/base udev/base udev plymouth/' /etc/mkinitcpio.conf
else
echo "Couldn't add the Plymouth hook"
fi
# Regenerate initramfs
sudo mkinitcpio -P
fi
# Add kernel parameters for Plymouth
if [ -d "/boot/loader/entries" ]; then # systemd-boot
echo "Detected systemd-boot"
for entry in /boot/loader/entries/*.conf; do
if [ -f "$entry" ]; then
# Skip fallback entries
if [[ "$(basename "$entry")" == *"fallback"* ]]; then
echo "Skipped: $(basename "$entry") (fallback entry)"
continue
fi
# Skip if splash it already present for some reason
if ! grep -q "splash" "$entry"; then
sudo sed -i '/^options/ s/$/ splash quiet/' "$entry"
else
echo "Skipped: $(basename "$entry") (splash already present)"
fi
fi
done
elif [ -f "/etc/default/grub" ]; then # Grub
echo "Detected grub"
# Backup GRUB config before modifying
backup_timestamp=$(date +"%Y%m%d%H%M%S")
sudo cp /etc/default/grub "/etc/default/grub.bak.${backup_timestamp}"
# Check if splash is already in GRUB_CMDLINE_LINUX_DEFAULT
if ! grep -q "GRUB_CMDLINE_LINUX_DEFAULT.*splash" /etc/default/grub; then
# Get current GRUB_CMDLINE_LINUX_DEFAULT value
current_cmdline=$(grep "^GRUB_CMDLINE_LINUX_DEFAULT=" /etc/default/grub | cut -d'"' -f2)
# Add splash and quiet if not present
new_cmdline="$current_cmdline"
if [[ ! "$current_cmdline" =~ splash ]]; then
new_cmdline="$new_cmdline splash"
fi
if [[ ! "$current_cmdline" =~ quiet ]]; then
new_cmdline="$new_cmdline quiet"
fi
# Trim any leading/trailing spaces
new_cmdline=$(echo "$new_cmdline" | xargs)
sudo sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=\".*\"/GRUB_CMDLINE_LINUX_DEFAULT=\"$new_cmdline\"/" /etc/default/grub
# Regenerate grub config
sudo grub-mkconfig -o /boot/grub/grub.cfg
else
echo "GRUB already configured with splash kernel parameters"
fi
elif [ -d "/etc/cmdline.d" ]; then # UKI
echo "Detected a UKI setup"
# Relying on mkinitcpio to assemble a UKI
# https://wiki.archlinux.org/title/Unified_kernel_image
if ! grep -q splash /etc/cmdline.d/*.conf; then
# Need splash, create the omarchy file
echo "splash" | sudo tee -a /etc/cmdline.d/omarchy.conf
fi
if ! grep -q quiet /etc/cmdline.d/*.conf; then
# Need quiet, create or append the omarchy file
echo "quiet" | sudo tee -a /etc/cmdline.d/omarchy.conf
fi
elif [ -f "/etc/kernel/cmdline" ]; then # UKI Alternate
# Alternate UKI kernel cmdline location
echo "Detected a UKI setup"
# Backup kernel cmdline config before modifying
backup_timestamp=$(date +"%Y%m%d%H%M%S")
sudo cp /etc/kernel/cmdline "/etc/kernel/cmdline.bak.${backup_timestamp}"
current_cmdline=$(cat /etc/kernel/cmdline)
# Add splash and quiet if not present
new_cmdline="$current_cmdline"
if [[ ! "$current_cmdline" =~ splash ]]; then
new_cmdline="$new_cmdline splash"
fi
if [[ ! "$current_cmdline" =~ quiet ]]; then
new_cmdline="$new_cmdline quiet"
fi
# Trim any leading/trailing spaces
new_cmdline=$(echo "$new_cmdline" | xargs)
# Write new file
echo $new_cmdline | sudo tee /etc/kernel/cmdline
else
echo ""
echo " None of systemd-boot, GRUB, or UKI detected. Please manually add these kernel parameters:"
echo " - splash (to see the graphical splash screen)"
echo " - quiet (for silent boot)"
echo ""
fi
fi

View File

@@ -1,47 +0,0 @@
OMARCHY_DESCRIPTION="GNOME Keyring Default Setup"
omarchy_install() {
KEYRING_DIR="$HOME/.local/share/keyrings"
KEYRING_FILE="$KEYRING_DIR/Default_keyring.keyring"
DEFAULT_FILE="$KEYRING_DIR/default"
mkdir -p "$KEYRING_DIR"
cat << EOF > "$KEYRING_FILE"
[keyring]
display-name=Default keyring
ctime=$(date +%s)
mtime=0
lock-on-idle=false
lock-after=false
EOF
cat << EOF > "$DEFAULT_FILE"
Default_keyring
EOF
chmod 700 "$KEYRING_DIR"
chmod 600 "$KEYRING_FILE"
chmod 644 "$DEFAULT_FILE"
}
omarchy_verify() {
local KEYRING_DIR="$HOME/.local/share/keyrings"
[[ -d "$KEYRING_DIR" ]] || add_error "Keyring directory missing"
if [[ -d "$KEYRING_DIR" ]]; then
local dir_perms=$(stat -c %a "$KEYRING_DIR")
[[ "$dir_perms" == "700" ]] || add_warning "Keyring directory has permissions $dir_perms (should be 700)"
fi
[[ -f "$KEYRING_DIR/Default_keyring.keyring" ]] || add_error "Default keyring file missing"
if [[ -f "$KEYRING_DIR/Default_keyring.keyring" ]]; then
local file_perms=$(stat -c %a "$KEYRING_DIR/Default_keyring.keyring")
[[ "$file_perms" == "600" ]] || add_warning "Keyring file has permissions $file_perms (should be 600)"
fi
[[ -f "$KEYRING_DIR/default" ]] || add_error "Default keyring selection file missing"
if [[ -f "$KEYRING_DIR/default" ]]; then
grep -q "Default_keyring" "$KEYRING_DIR/default" || add_error "Default keyring not set as default"
fi
}

View File

@@ -0,0 +1,18 @@
echo "Re-enabling mkinitcpio hooks..."
# Restore the specific mkinitcpio pacman hooks
if [ -f /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled ]; then
sudo mv /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled /usr/share/libalpm/hooks/90-mkinitcpio-install.hook
fi
if [ -f /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled ]; then
sudo mv /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook
fi
echo "mkinitcpio hooks re-enabled"
if command -v limine &>/dev/null; then
sudo limine-update
else
sudo mkinitcpio -P
fi

View File

@@ -1,15 +1,4 @@
OMARCHY_DESCRIPTION="Limine Bootloader & Snapper Configuration" if command -v limine &>/dev/null; then
should_run() {
command -v limine &>/dev/null
}
# Installation function
omarchy_install() {
should_run || return 0
sudo pacman -S --noconfirm --needed limine-snapper-sync limine-mkinitcpio-hook
sudo tee /etc/mkinitcpio.conf.d/omarchy_hooks.conf <<EOF >/dev/null sudo tee /etc/mkinitcpio.conf.d/omarchy_hooks.conf <<EOF >/dev/null
HOOKS=(base udev plymouth keyboard autodetect microcode modconf kms keymap consolefont block encrypt filesystems fsck btrfs-overlayfs) HOOKS=(base udev plymouth keyboard autodetect microcode modconf kms keymap consolefont block encrypt filesystems fsck btrfs-overlayfs)
EOF EOF
@@ -45,7 +34,6 @@ KERNEL_CMDLINE[default]="$CMDLINE"
KERNEL_CMDLINE[default]+="quiet splash" KERNEL_CMDLINE[default]+="quiet splash"
ENABLE_UKI=yes ENABLE_UKI=yes
CUSTOM_UKI_NAME="omarchy"
ENABLE_LIMINE_FALLBACK=yes ENABLE_LIMINE_FALLBACK=yes
@@ -87,6 +75,7 @@ term_background_bright: 24283b
EOF EOF
sudo pacman -S --noconfirm --needed limine-snapper-sync limine-mkinitcpio-hook
# Match Snapper configs if not installing from the ISO # Match Snapper configs if not installing from the ISO
if [[ -z ${OMARCHY_CHROOT_INSTALL:-} ]]; then if [[ -z ${OMARCHY_CHROOT_INSTALL:-} ]]; then
@@ -105,94 +94,15 @@ EOF
sudo sed -i 's/^NUMBER_LIMIT_IMPORTANT="10"/NUMBER_LIMIT_IMPORTANT="5"/' /etc/snapper/configs/{root,home} sudo sed -i 's/^NUMBER_LIMIT_IMPORTANT="10"/NUMBER_LIMIT_IMPORTANT="5"/' /etc/snapper/configs/{root,home}
chrootable_systemctl_enable limine-snapper-sync.service chrootable_systemctl_enable limine-snapper-sync.service
fi
echo "Re-enabling mkinitcpio hooks..." # Add UKI entry to UEFI machines to skip bootloader showing on normal boot
if [[ -n $EFI ]] && efibootmgr &>/dev/null && ! efibootmgr | grep -q Omarchy &&
# Restore the specific mkinitcpio pacman hooks
if [ -f /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled ]; then
sudo mv /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled /usr/share/libalpm/hooks/90-mkinitcpio-install.hook
fi
if [ -f /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled ]; then
sudo mv /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook
fi
echo "mkinitcpio hooks re-enabled"
sudo limine-update
if [[ -n $EFI ]] && efibootmgr &>/dev/null; then
# Remove the archinstall-created Limine entry
while IFS= read -r bootnum; do
sudo efibootmgr -b "$bootnum" -B >/dev/null 2>&1
done < <(efibootmgr | grep -E "^Boot[0-9]{4}\*? Arch Linux Limine" | sed 's/^Boot\([0-9]\{4\}\).*/\1/')
fi
if [[ -n $EFI ]] && efibootmgr &>/dev/null &&
! cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "American Megatrends" && ! cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "American Megatrends" &&
! cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "Apple"; then ! cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "Apple"; then
uki_file=$(find /boot/EFI/Linux/ -name "omarchy*.efi" -printf "%f\n" 2>/dev/null | head -1)
if [[ -n "$uki_file" ]]; then
sudo efibootmgr --create \ sudo efibootmgr --create \
--disk "$(findmnt -n -o SOURCE /boot | sed 's/p\?[0-9]*$//')" \ --disk "$(findmnt -n -o SOURCE /boot | sed 's/p\?[0-9]*$//')" \
--part "$(findmnt -n -o SOURCE /boot | grep -o 'p\?[0-9]*$' | sed 's/^p//')" \ --part "$(findmnt -n -o SOURCE /boot | grep -o 'p\?[0-9]*$' | sed 's/^p//')" \
--label "Omarchy" \ --label "Omarchy" \
--loader "\\EFI\\Linux\\$uki_file" --loader "\\EFI\\Linux\\$(cat /etc/machine-id)_linux.efi"
fi fi
fi
}
omarchy_verify() {
should_run || return 2
[[ -f /etc/mkinitcpio.conf.d/omarchy_hooks.conf ]] || add_error "Omarchy mkinitcpio hooks config missing"
[[ -f /etc/default/limine ]] || add_error "Limine default config missing"
[[ -f /boot/limine.conf ]] || add_error "Limine boot config missing"
pacman -Q limine-snapper-sync &>/dev/null || add_error "limine-snapper-sync not installed"
pacman -Q limine-mkinitcpio-hook &>/dev/null || add_error "limine-mkinitcpio-hook not installed"
if [[ -z ${OMARCHY_CHROOT_INSTALL:-} ]]; then
sudo snapper list-configs 2>/dev/null | grep -q "root" || add_error "Snapper root config not created"
sudo snapper list-configs 2>/dev/null | grep -q "home" || add_error "Snapper home config not created"
fi
systemctl is-enabled limine-snapper-sync.service &>/dev/null || add_error "limine-snapper-sync service not enabled"
if [[ -f /boot/limine.conf ]]; then
grep -q "^/+Omarchy" /boot/limine.conf || add_error "Omarchy boot entry not found in limine.conf"
awk '
/^\/\+Omarchy/ { in_omarchy=1 }
in_omarchy && /^[[:space:]]+kernel_cmdline:/ { found=1 }
in_omarchy && /^\/[^\/+]/ { in_omarchy=0 }
END { if (!found) exit 1 }
' /boot/limine.conf || add_error "Omarchy boot entry missing kernel_cmdline"
fi
if command -v efibootmgr &>/dev/null && sudo efibootmgr &>/dev/null; then
local omarchy_count=$(sudo efibootmgr | grep -c "^Boot[0-9]*\* Omarchy")
if [[ $omarchy_count -eq 0 ]]; then
add_error "No Omarchy EFI boot entry found"
elif [[ $omarchy_count -gt 1 ]]; then
add_warning "Multiple Omarchy EFI boot entries found ($omarchy_count)"
fi
local limine_count=$(sudo efibootmgr | grep -c "^Boot[0-9]*\* Limine")
if [[ $limine_count -eq 0 ]]; then
add_warning "No Limine EFI boot entry found"
elif [[ $limine_count -gt 1 ]]; then
add_warning "Multiple Limine EFI boot entries found ($limine_count)"
fi
local boot_current=$(sudo efibootmgr | grep "^BootCurrent:" | awk '{print $2}')
if [[ -n "$boot_current" ]]; then
if ! sudo efibootmgr | grep "^Boot${boot_current}\* Omarchy" &>/dev/null; then
local current_boot=$(sudo efibootmgr | grep "^Boot${boot_current}\*" | sed 's/^Boot[0-9]*\* //' | cut -d' ' -f1)
add_warning "BootCurrent is not Omarchy (currently: $current_boot)"
fi
fi
fi
}

View File

@@ -1,13 +1,151 @@
OMARCHY_DESCRIPTION="Plymouth Boot Splash Theme" # Hyprland launched via UWSM and login directly as user, rely on disk encryption + hyprlock for security
omarchy_install() { # ==============================================================================
if [ "$(plymouth-set-default-theme)" != "omarchy" ]; then # PLYMOUTH SETUP
# ==============================================================================
if [ "$(plymouth-set-default-theme)" != "omarchy" ]; then
sudo cp -r "$HOME/.local/share/omarchy/default/plymouth" /usr/share/plymouth/themes/omarchy/ sudo cp -r "$HOME/.local/share/omarchy/default/plymouth" /usr/share/plymouth/themes/omarchy/
sudo plymouth-set-default-theme omarchy sudo plymouth-set-default-theme omarchy
fi fi
}
omarchy_verify() { # ==============================================================================
[[ "$(plymouth-set-default-theme)" == "omarchy" ]] || add_error "Plymouth theme not set to omarchy" # SEAMLESS LOGIN
[[ -d /usr/share/plymouth/themes/omarchy ]] || add_error "Omarchy Plymouth theme not installed" # ==============================================================================
if [ ! -x /usr/local/bin/seamless-login ]; then
# Compile the seamless login helper -- needed to prevent seeing terminal between loader and desktop
cat <<'CCODE' >/tmp/seamless-login.c
/*
* Seamless Login - Minimal SDDM-style Plymouth transition
* Replicates SDDM's VT management for seamless auto-login
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/kd.h>
#include <linux/vt.h>
#include <sys/wait.h>
#include <string.h>
int main(int argc, char *argv[]) {
int vt_fd;
int vt_num = 1; // TTY1
char vt_path[32];
if (argc < 2) {
fprintf(stderr, "Usage: %s <session_command>\n", argv[0]);
return 1;
}
// Open the VT (simple approach like SDDM)
snprintf(vt_path, sizeof(vt_path), "/dev/tty%d", vt_num);
vt_fd = open(vt_path, O_RDWR);
if (vt_fd < 0) {
perror("Failed to open VT");
return 1;
}
// Activate the VT
if (ioctl(vt_fd, VT_ACTIVATE, vt_num) < 0) {
perror("VT_ACTIVATE failed");
close(vt_fd);
return 1;
}
// Wait for VT to be active
if (ioctl(vt_fd, VT_WAITACTIVE, vt_num) < 0) {
perror("VT_WAITACTIVE failed");
close(vt_fd);
return 1;
}
// Critical: Set graphics mode to prevent console text
if (ioctl(vt_fd, KDSETMODE, KD_GRAPHICS) < 0) {
perror("KDSETMODE KD_GRAPHICS failed");
close(vt_fd);
return 1;
}
// Clear VT and close (like SDDM does)
const char *clear_seq = "\33[H\33[2J";
if (write(vt_fd, clear_seq, strlen(clear_seq)) < 0) {
perror("Failed to clear VT");
}
close(vt_fd);
// Set working directory to user's home
const char *home = getenv("HOME");
if (home) chdir(home);
// Now execute the session command
execvp(argv[1], &argv[1]);
perror("Failed to exec session");
return 1;
} }
CCODE
gcc -o /tmp/seamless-login /tmp/seamless-login.c
sudo mv /tmp/seamless-login /usr/local/bin/seamless-login
sudo chmod +x /usr/local/bin/seamless-login
rm /tmp/seamless-login.c
fi
if [ ! -f /etc/systemd/system/omarchy-seamless-login.service ]; then
cat <<EOF | sudo tee /etc/systemd/system/omarchy-seamless-login.service
[Unit]
Description=Omarchy Seamless Auto-Login
Documentation=https://github.com/basecamp/omarchy
Conflicts=getty@tty1.service
After=systemd-user-sessions.service getty@tty1.service plymouth-quit.service systemd-logind.service
PartOf=graphical.target
[Service]
Type=simple
ExecStart=/usr/local/bin/seamless-login uwsm start -- hyprland.desktop
Restart=always
RestartSec=2
StartLimitIntervalSec=30
StartLimitBurst=2
User=$USER
TTYPath=/dev/tty1
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
StandardInput=tty
StandardOutput=journal
StandardError=journal+console
PAMName=login
[Install]
WantedBy=graphical.target
EOF
fi
if [ ! -f /etc/systemd/system/plymouth-quit.service.d/wait-for-graphical.conf ]; then
# Make plymouth remain until graphical.target
sudo mkdir -p /etc/systemd/system/plymouth-quit.service.d
sudo tee /etc/systemd/system/plymouth-quit.service.d/wait-for-graphical.conf <<'EOF'
[Unit]
After=multi-user.target
EOF
fi
# Mask plymouth-quit-wait.service only if not already masked
if ! systemctl is-enabled plymouth-quit-wait.service | grep -q masked; then
sudo systemctl mask plymouth-quit-wait.service
sudo systemctl daemon-reload
fi
# Enable omarchy-seamless-login.service only if not already enabled
if ! systemctl is-enabled omarchy-seamless-login.service | grep -q enabled; then
sudo systemctl enable omarchy-seamless-login.service
fi
# Disable getty@tty1.service only if not already disabled
if ! systemctl is-enabled getty@tty1.service | grep -q disabled; then
sudo systemctl disable getty@tty1.service
fi

View File

@@ -1,34 +0,0 @@
OMARCHY_DESCRIPTION="SDDM Display Manager Configuration"
omarchy_install() {
sudo mkdir -p /etc/sddm.conf.d
if [ ! -f /etc/sddm.conf.d/autologin.conf ]; then
cat <<EOF | sudo tee /etc/sddm.conf.d/autologin.conf
[Autologin]
User=$USER
Session=hyprland-uwsm
[Theme]
Current=breeze
EOF
fi
chrootable_systemctl_enable sddm.service
}
omarchy_verify() {
[[ -d /etc/sddm.conf.d ]] || add_error "SDDM config directory missing"
[[ -f /etc/sddm.conf.d/autologin.conf ]] || add_error "SDDM autologin config missing"
if [[ -f /etc/sddm.conf.d/autologin.conf ]]; then
grep -q "^User=$USER" /etc/sddm.conf.d/autologin.conf || add_error "SDDM autologin user not configured"
grep -q "^Session=hyprland-uwsm" /etc/sddm.conf.d/autologin.conf || add_error "SDDM session not set to hyprland-uwsm"
grep -q "^Current=breeze" /etc/sddm.conf.d/autologin.conf || add_warning "SDDM theme not set to breeze"
fi
systemctl is-enabled sddm.service &>/dev/null || add_error "SDDM service not enabled"
}

View File

@@ -35,6 +35,7 @@ github-cli
gnome-calculator gnome-calculator
gnome-keyring gnome-keyring
gnome-themes-extra gnome-themes-extra
gpu-screen-recorder
gum gum
gvfs-mtp gvfs-mtp
gvfs-smb gvfs-smb
@@ -56,7 +57,6 @@ kvantum-qt5
lazydocker lazydocker
lazygit lazygit
less less
libsecret
libyaml libyaml
libqalculate libqalculate
libreoffice libreoffice
@@ -93,7 +93,6 @@ python-terminaltexteffects
qt5-wayland qt5-wayland
ripgrep ripgrep
satty satty
sddm
signal-desktop signal-desktop
slurp slurp
spotify spotify
@@ -115,14 +114,12 @@ unzip
uwsm uwsm
walker-bin walker-bin
waybar waybar
wf-recorder
whois whois
wireless-regdb wireless-regdb
wiremix wiremix
wireplumber wireplumber
wl-clip-persist wl-clip-persist
wl-clipboard wl-clipboard
wl-screenrec
woff2-font-awesome woff2-font-awesome
xdg-desktop-portal-gtk xdg-desktop-portal-gtk
xdg-desktop-portal-hyprland xdg-desktop-portal-hyprland

View File

@@ -1,27 +1,3 @@
OMARCHY_DESCRIPTION="Base Packages" # Install all base packages
mapfile -t packages < <(grep -v '^#' "$OMARCHY_INSTALL/omarchy-base.packages" | grep -v '^$')
omarchy_install() { sudo pacman -S --noconfirm --needed "${packages[@]}"
# Install all base packages
mapfile -t packages < <(grep -v '^#' "$OMARCHY_INSTALL/omarchy-base.packages" | grep -v '^$')
sudo pacman -S --noconfirm --needed "${packages[@]}"
}
omarchy_verify() {
[[ -f "$OMARCHY_INSTALL/omarchy-base.packages" ]] || add_error "Base packages list missing"
# Check if all base packages are installed
if [[ -f "$OMARCHY_INSTALL/omarchy-base.packages" ]]; then
mapfile -t packages < <(grep -v '^#' "$OMARCHY_INSTALL/omarchy-base.packages" | grep -v '^$')
local missing_packages=()
for package in "${packages[@]}"; do
if ! pacman -Q "$package" &>/dev/null; then
missing_packages+=("$package")
fi
done
if [[ ${#missing_packages[@]} -gt 0 ]]; then
add_error "Missing base packages: ${missing_packages[*]}"
fi
fi
}

View File

@@ -1,13 +1,4 @@
OMARCHY_DESCRIPTION="Omarchy Font" # Omarchy logo in a font for Waybar use
mkdir -p ~/.local/share/fonts
omarchy_install() { cp ~/.local/share/omarchy/config/omarchy.ttf ~/.local/share/fonts/
# Omarchy logo in a font for Waybar use fc-cache
mkdir -p ~/.local/share/fonts
cp ~/.local/share/omarchy/config/omarchy.ttf ~/.local/share/fonts/
fc-cache
}
omarchy_verify() {
[[ -d ~/.local/share/fonts ]] || add_error "Fonts directory missing"
[[ -f ~/.local/share/fonts/omarchy.ttf ]] || add_error "Omarchy font missing"
}

View File

@@ -1,15 +1,4 @@
OMARCHY_DESCRIPTION="Icons" # Copy all bundled icons to the applications/icons directory
ICON_DIR="$HOME/.local/share/applications/icons"
omarchy_install() { mkdir -p "$ICON_DIR"
# Copy all bundled icons to the applications/icons directory cp ~/.local/share/omarchy/applications/icons/*.png "$ICON_DIR/"
ICON_DIR="$HOME/.local/share/applications/icons"
mkdir -p "$ICON_DIR"
cp ~/.local/share/omarchy/applications/icons/*.png "$ICON_DIR/"
}
omarchy_verify() {
[[ -d "$HOME/.local/share/applications/icons" ]] || add_error "Icons directory missing"
local icon_count=$(find "$HOME/.local/share/applications/icons" -name "*.png" 2>/dev/null | wc -l)
[[ $icon_count -gt 0 ]] || add_error "No icons found in icons directory"
}

View File

@@ -1,11 +1,3 @@
OMARCHY_DESCRIPTION="LazyVim" if [[ ! -d "$HOME/.config/nvim" ]]; then
omarchy_install() {
if [[ ! -d "$HOME/.config/nvim" ]]; then
omarchy-lazyvim-setup omarchy-lazyvim-setup
fi fi
}
omarchy_verify() {
[[ -d "$HOME/.config/nvim" ]] || add_error "Neovim config directory missing"
}

View File

@@ -1,13 +1,4 @@
OMARCHY_DESCRIPTION="TUIs" ICON_DIR="$HOME/.local/share/applications/icons"
omarchy_install() { omarchy-tui-install "Disk Usage" "bash -c 'dust -r; read -n 1 -s'" float "$ICON_DIR/Disk Usage.png"
ICON_DIR="$HOME/.local/share/applications/icons" omarchy-tui-install "Docker" "lazydocker" tile "$ICON_DIR/Docker.png"
omarchy-tui-install "Disk Usage" "bash -c 'dust -r; read -n 1 -s'" float "$ICON_DIR/Disk Usage.png"
omarchy-tui-install "Docker" "lazydocker" tile "$ICON_DIR/Docker.png"
}
omarchy_verify() {
[[ -f "$HOME/.local/share/applications/Disk Usage.desktop" ]] || add_error "Disk Usage TUI not installed"
[[ -f "$HOME/.local/share/applications/Docker.desktop" ]] || add_error "Docker TUI not installed"
}

View File

@@ -1,34 +1,13 @@
OMARCHY_DESCRIPTION="Webapps" omarchy-webapp-install "HEY" https://app.hey.com HEY.png
omarchy-webapp-install "Basecamp" https://launchpad.37signals.com Basecamp.png
omarchy_install() { omarchy-webapp-install "WhatsApp" https://web.whatsapp.com/ WhatsApp.png
omarchy-webapp-install "HEY" https://app.hey.com HEY.png omarchy-webapp-install "Google Photos" https://photos.google.com/ "Google Photos.png"
omarchy-webapp-install "Basecamp" https://launchpad.37signals.com Basecamp.png omarchy-webapp-install "Google Contacts" https://contacts.google.com/ "Google Contacts.png"
omarchy-webapp-install "WhatsApp" https://web.whatsapp.com/ WhatsApp.png omarchy-webapp-install "Google Messages" https://messages.google.com/web/conversations "Google Messages.png"
omarchy-webapp-install "Google Photos" https://photos.google.com/ "Google Photos.png" omarchy-webapp-install "ChatGPT" https://chatgpt.com/ ChatGPT.png
omarchy-webapp-install "Google Contacts" https://contacts.google.com/ "Google Contacts.png" omarchy-webapp-install "YouTube" https://youtube.com/ YouTube.png
omarchy-webapp-install "Google Messages" https://messages.google.com/web/conversations "Google Messages.png" omarchy-webapp-install "GitHub" https://github.com/ GitHub.png
omarchy-webapp-install "ChatGPT" https://chatgpt.com/ ChatGPT.png omarchy-webapp-install "X" https://x.com/ X.png
omarchy-webapp-install "YouTube" https://youtube.com/ YouTube.png omarchy-webapp-install "Figma" https://figma.com/ Figma.png
omarchy-webapp-install "GitHub" https://github.com/ GitHub.png omarchy-webapp-install "Discord" https://discord.com/channels/@me Discord.png
omarchy-webapp-install "X" https://x.com/ X.png omarchy-webapp-install "Zoom" https://app.zoom.us/wc/home Zoom.png "omarchy-webapp-handler-zoom %u" "x-scheme-handler/zoommtg;x-scheme-handler/zoomus"
omarchy-webapp-install "Figma" https://figma.com/ Figma.png
omarchy-webapp-install "Discord" https://discord.com/channels/@me Discord.png
omarchy-webapp-install "Zoom" https://app.zoom.us/wc/home Zoom.png "omarchy-webapp-handler-zoom %u" "x-scheme-handler/zoommtg;x-scheme-handler/zoomus"
}
omarchy_verify() {
# Check all webapps - use warnings since these are optional
[[ -f "$HOME/.local/share/applications/HEY.desktop" ]] || add_warning "HEY webapp not installed"
[[ -f "$HOME/.local/share/applications/Basecamp.desktop" ]] || add_warning "Basecamp webapp not installed"
[[ -f "$HOME/.local/share/applications/WhatsApp.desktop" ]] || add_warning "WhatsApp webapp not installed"
[[ -f "$HOME/.local/share/applications/Google Photos.desktop" ]] || add_warning "Google Photos webapp not installed"
[[ -f "$HOME/.local/share/applications/Google Contacts.desktop" ]] || add_warning "Google Contacts webapp not installed"
[[ -f "$HOME/.local/share/applications/Google Messages.desktop" ]] || add_warning "Google Messages webapp not installed"
[[ -f "$HOME/.local/share/applications/ChatGPT.desktop" ]] || add_warning "ChatGPT webapp not installed"
[[ -f "$HOME/.local/share/applications/YouTube.desktop" ]] || add_warning "YouTube webapp not installed"
[[ -f "$HOME/.local/share/applications/GitHub.desktop" ]] || add_warning "GitHub webapp not installed"
[[ -f "$HOME/.local/share/applications/X.desktop" ]] || add_warning "X webapp not installed"
[[ -f "$HOME/.local/share/applications/Figma.desktop" ]] || add_warning "Figma webapp not installed"
[[ -f "$HOME/.local/share/applications/Discord.desktop" ]] || add_warning "Discord webapp not installed"
[[ -f "$HOME/.local/share/applications/Zoom.desktop" ]] || add_warning "Zoom webapp not installed"
}

View File

@@ -22,11 +22,5 @@ done
pacman -Qe gnome-shell &>/dev/null && abort "Fresh + Vanilla Arch" pacman -Qe gnome-shell &>/dev/null && abort "Fresh + Vanilla Arch"
pacman -Qe plasma-desktop &>/dev/null && abort "Fresh + Vanilla Arch" pacman -Qe plasma-desktop &>/dev/null && abort "Fresh + Vanilla Arch"
# Must have limine installed
command -v limine &>/dev/null || abort "Limine bootloader"
# Must have btrfs root filesystem
[ "$(findmnt -n -o FSTYPE /)" = "btrfs" ] || abort "Btrfs root filesystem"
# Cleared all guards # Cleared all guards
echo "Guards: OK" echo "Guards: OK"

17
migrations/1758436991.sh Normal file
View File

@@ -0,0 +1,17 @@
echo "Fix Disk Usage and Docker TUIs"
APP_DIR="$HOME/.local/share/applications"
ICON_DIR="$APP_DIR/icons"
# Don't use omarchy-tui-remove to preserve icons
if [[ -f "$APP_DIR/Docker.desktop" ]]; then
rm "$APP_DIR/Docker.desktop"
omarchy-tui-install "Docker" "lazydocker" tile "$ICON_DIR/Docker.png"
fi
if [[ -f "$APP_DIR/Disk Usage.desktop" ]]; then
rm "$APP_DIR/Disk Usage.desktop"
omarchy-tui-install "Disk Usage" "bash -c 'dust -r; read -n 1 -s'" float "$ICON_DIR/Disk Usage.png"
fi

View File

@@ -1,24 +0,0 @@
echo "Change display manager to SDDM"
sudo pacman -S --needed --noconfirm sddm libsecret gnome-keyring
sudo mkdir -p /etc/sddm.conf.d
cat <<EOF | sudo tee /etc/sddm.conf.d/autologin.conf
[Autologin]
User=$USER
Session=hyprland-uwsm
[Theme]
Current=breeze
EOF
sudo systemctl disable omarchy-seamless-login.service
sudo systemctl unmask plymouth-quit-wait.service
sudo systemctl enable getty@tty1.service
sudo systemctl enable sddm.service
sudo systemctl daemon-reload
sudo rm -f /usr/local/bin/seamless-login
sudo rm -f /etc/systemd/system/plymouth-quit.service.d/wait-for-graphical.conf
sudo rm -f /etc/systemd/system/omarchy-seamless-login.service

View File

@@ -1,38 +0,0 @@
echo "Update UKI to custom named entry"
if command -v limine &>/dev/null && [[ -f /etc/default/limine ]]; then
if grep -q "^ENABLE_UKI=yes" /etc/default/limine; then
if ! grep -q "^CUSTOM_UKI_NAME=" /etc/default/limine; then
sudo sed -i '/^ENABLE_UKI=yes/a CUSTOM_UKI_NAME="omarchy"' /etc/default/limine
fi
# Remove the archinstall-created Limine entry
while IFS= read -r bootnum; do
sudo efibootmgr -b "$bootnum" -B >/dev/null 2>&1
done < <(efibootmgr | grep -E "^Boot[0-9]{4}\*? Arch Linux Limine" | sed 's/^Boot\([0-9]\{4\}\).*/\1/')
sudo limine-update
uki_file=$(find /boot/EFI/Linux/ -name "omarchy*.efi" -printf "%f\n" 2>/dev/null | head -1)
if [[ -n "$uki_file" ]]; then
while IFS= read -r bootnum; do
sudo efibootmgr -b "$bootnum" -B >/dev/null 2>&1
done < <(efibootmgr | grep -E "^Boot[0-9]{4}\*? Omarchy" | sed 's/^Boot\([0-9]\{4\}\).*/\1/')
# Skip EFI entry creation on Apple hardware
if ! cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "Apple"; then
sudo efibootmgr --create \
--disk "$(findmnt -n -o SOURCE /boot | sed 's/p\?[0-9]*$//')" \
--part "$(findmnt -n -o SOURCE /boot | grep -o 'p\?[0-9]*$' | sed 's/^p//')" \
--label "Omarchy" \
--loader "\\EFI\\Linux\\$uki_file"
fi
fi
else
echo "Not using UKI. Not making any changes."
fi
else
echo "Boot config is non-standard. Not making any changes."
fi

3
migrations/1760144906.sh Normal file
View File

@@ -0,0 +1,3 @@
echo "Change omarchy-screenrecord to use gpu-screen-recorder"
omarchy-pkg-drop wf-recorder wl-screenrec
omarchy-pkg-add gpu-screen-recorder