#!/bin/bash # omarchy:summary=Set up Omarchy for the current user (~/.config, ~/.local, etc.) # omarchy:group=install # omarchy:examples=omarchy setup user | omarchy setup user --force set -euo pipefail if [[ $EUID -eq 0 ]]; then echo "Error: run omarchy-setup-user as the user being configured, not as root." >&2 exit 1 fi force=0 if [[ ${1:-} == "--force" ]]; then force=1 elif [[ ${1:-} == "-h" || ${1:-} == "--help" ]]; then cat </dev/null || true touch ~/.config/gtk-3.0/bookmarks for dir in Downloads Projects Pictures Videos; do printf 'file://%s/%s %s\n' "$HOME" "$dir" "$dir" >>~/.config/gtk-3.0/bookmarks done # Hyprland keyboard layout from /etc/vconsole.conf conf=/etc/vconsole.conf hyprlua="$HOME/.config/hypr/input.lua" if [[ -f $conf && -f $hyprlua ]]; then if grep -q '^XKBLAYOUT=' "$conf"; then layout=$(grep '^XKBLAYOUT=' "$conf" | cut -d= -f2 | tr -d '"') sed -i "/^[[:space:]]*kb_options *=/i\ kb_layout = \"$layout\"," "$hyprlua" fi if grep -q '^XKBVARIANT=' "$conf"; then variant=$(grep '^XKBVARIANT=' "$conf" | cut -d= -f2 | tr -d '"') sed -i "/^[[:space:]]*kb_options *=/i\ kb_variant = \"$variant\"," "$hyprlua" fi fi # Application catalog + MIME defaults omarchy-refresh-applications xdg-settings set default-web-browser chromium.desktop xdg-mime default HEY.desktop x-scheme-handler/mailto touch "$marker" echo "User setup complete."