diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..625c576e55 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true +end_of_line = lf +charset = utf-8 diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 0000000000..9619e4506f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,24 @@ +name: Bug +description: Report a validated bug -- NOT FOR SUPPORT REQUESTS +labels: [bug] +body: + - type: markdown + attributes: + value: | + Remember: Omarchy is an open source gift, not a product you bought from a vendor + + - type: input + id: system-details + attributes: + label: System details + placeholder: e.g. AMD 9950X, NVIDIA 5090, Omarchy 2.1.0 + validations: + required: true + + - type: textarea + id: steps + attributes: + label: What's wrong? + description: Describe the issue, include steps to recreate it if possible, and attach the output of `omarchy-debug` if possible + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000..2e9a3140fa --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Suggestion + url: https://github.com/basecamp/omarchy/discussions/categories/suggestions + about: Suggest a new feature, change to existing feature, or other ideas in Discussions. + - name: Support + url: https://omarchy.org/discord + about: Need help? Join our Discord community for support with any issues. GitHub issues should be used for verified bugs only. diff --git a/README.md b/README.md index b76136b2ee..a630d13cea 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,9 @@ # Omarchy -Turn a fresh Arch installation into a fully-configured, beautiful, and modern web development system based on Hyprland by running a single command. That's the one-line pitch for Omarchy (like it was for Omakub). No need to write bespoke configs for every essential tool just to get started or to be up on all the latest command-line tools. Omarchy is an opinionated take on what Linux can be at its best. +Omarchy is a beautiful, modern & opinionated Linux distribution by DHH. Read more at [omarchy.org](https://omarchy.org). ## License Omarchy is released under the [MIT License](https://opensource.org/licenses/MIT). - diff --git a/applications/hidden/electron36.desktop b/applications/hidden/electron36.desktop new file mode 100644 index 0000000000..e1e3e17323 --- /dev/null +++ b/applications/hidden/electron36.desktop @@ -0,0 +1,2 @@ +[Desktop Entry] +Hidden=true diff --git a/applications/hidden/electron37.desktop b/applications/hidden/electron37.desktop new file mode 100644 index 0000000000..e1e3e17323 --- /dev/null +++ b/applications/hidden/electron37.desktop @@ -0,0 +1,2 @@ +[Desktop Entry] +Hidden=true diff --git a/applications/hidden/fcitx5-wayland-launcher.desktop b/applications/hidden/fcitx5-wayland-launcher.desktop new file mode 100644 index 0000000000..e1e3e17323 --- /dev/null +++ b/applications/hidden/fcitx5-wayland-launcher.desktop @@ -0,0 +1,2 @@ +[Desktop Entry] +Hidden=true diff --git a/applications/hidden/java-java-openjdk.desktop b/applications/hidden/java-java-openjdk.desktop new file mode 100644 index 0000000000..e1e3e17323 --- /dev/null +++ b/applications/hidden/java-java-openjdk.desktop @@ -0,0 +1,2 @@ +[Desktop Entry] +Hidden=true diff --git a/applications/hidden/jconsole-java-openjdk.desktop b/applications/hidden/jconsole-java-openjdk.desktop new file mode 100644 index 0000000000..e1e3e17323 --- /dev/null +++ b/applications/hidden/jconsole-java-openjdk.desktop @@ -0,0 +1,2 @@ +[Desktop Entry] +Hidden=true diff --git a/applications/hidden/jshell-java-openjdk.desktop b/applications/hidden/jshell-java-openjdk.desktop new file mode 100644 index 0000000000..e1e3e17323 --- /dev/null +++ b/applications/hidden/jshell-java-openjdk.desktop @@ -0,0 +1,2 @@ +[Desktop Entry] +Hidden=true diff --git a/applications/icons/Basecamp.png b/applications/icons/Basecamp.png new file mode 100644 index 0000000000..3edec48c04 Binary files /dev/null and b/applications/icons/Basecamp.png differ diff --git a/applications/icons/ChatGPT.png b/applications/icons/ChatGPT.png new file mode 100644 index 0000000000..9907eaf826 Binary files /dev/null and b/applications/icons/ChatGPT.png differ diff --git a/applications/icons/Discord.png b/applications/icons/Discord.png new file mode 100644 index 0000000000..a82dbc6456 Binary files /dev/null and b/applications/icons/Discord.png differ diff --git a/applications/icons/Disk Usage.png b/applications/icons/Disk Usage.png new file mode 100644 index 0000000000..6cc55ba414 Binary files /dev/null and b/applications/icons/Disk Usage.png differ diff --git a/applications/icons/Docker.png b/applications/icons/Docker.png new file mode 100644 index 0000000000..aeadd22947 Binary files /dev/null and b/applications/icons/Docker.png differ diff --git a/applications/icons/Figma.png b/applications/icons/Figma.png new file mode 100644 index 0000000000..62ffa9037c Binary files /dev/null and b/applications/icons/Figma.png differ diff --git a/applications/icons/GitHub.png b/applications/icons/GitHub.png new file mode 100644 index 0000000000..5a4295c245 Binary files /dev/null and b/applications/icons/GitHub.png differ diff --git a/applications/icons/Google Contacts.png b/applications/icons/Google Contacts.png new file mode 100644 index 0000000000..6d99dc8e10 Binary files /dev/null and b/applications/icons/Google Contacts.png differ diff --git a/applications/icons/Google Messages.png b/applications/icons/Google Messages.png new file mode 100644 index 0000000000..bc911a5f5b Binary files /dev/null and b/applications/icons/Google Messages.png differ diff --git a/applications/icons/Google Photos.png b/applications/icons/Google Photos.png new file mode 100644 index 0000000000..8b8c642a1f Binary files /dev/null and b/applications/icons/Google Photos.png differ diff --git a/applications/icons/HEY.png b/applications/icons/HEY.png new file mode 100644 index 0000000000..3ac92d938e Binary files /dev/null and b/applications/icons/HEY.png differ diff --git a/applications/icons/WhatsApp.png b/applications/icons/WhatsApp.png new file mode 100644 index 0000000000..10ecdfb5f6 Binary files /dev/null and b/applications/icons/WhatsApp.png differ diff --git a/applications/icons/X.png b/applications/icons/X.png new file mode 100644 index 0000000000..22fe6987a7 Binary files /dev/null and b/applications/icons/X.png differ diff --git a/applications/icons/YouTube.png b/applications/icons/YouTube.png new file mode 100644 index 0000000000..46ed4ca787 Binary files /dev/null and b/applications/icons/YouTube.png differ diff --git a/applications/icons/Zoom.png b/applications/icons/Zoom.png new file mode 100644 index 0000000000..622db52e25 Binary files /dev/null and b/applications/icons/Zoom.png differ diff --git a/applications/icons/windows.png b/applications/icons/windows.png new file mode 100644 index 0000000000..ce7b366d9f Binary files /dev/null and b/applications/icons/windows.png differ diff --git a/applications/nvim.desktop b/applications/nvim.desktop deleted file mode 100644 index ce0a1310db..0000000000 --- a/applications/nvim.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Name=Neovim -GenericName=Text Editor -Comment=Edit text files -Exec=alacritty --class=nvim --title=nvim -e nvim -- %F -Terminal=false -Type=Application -Keywords=Text;editor; -Icon=nvim -Categories=Utility;TextEditor; -StartupNotify=false -MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; diff --git a/autostart/walker.desktop b/autostart/walker.desktop new file mode 100644 index 0000000000..fa7bdfe24a --- /dev/null +++ b/autostart/walker.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=Walker +Comment=Walker Service +Exec=walker --gapplication-service +StartupNotify=false +Terminal=false +Type=Application diff --git a/bin/omarchy-battery-monitor b/bin/omarchy-battery-monitor index 05f4a440b6..84c429743f 100755 --- a/bin/omarchy-battery-monitor +++ b/bin/omarchy-battery-monitor @@ -4,27 +4,20 @@ BATTERY_THRESHOLD=10 NOTIFICATION_FLAG="/run/user/$UID/omarchy_battery_notified" - -get_battery_percentage() { - upower -i $(upower -e | grep 'BAT') | grep -E "percentage" | grep -o '[0-9]\+%' | sed 's/%//' -} - -get_battery_state() { - upower -i $(upower -e | grep 'BAT') | grep -E "state" | awk '{print $2}' -} +BATTERY_LEVEL=$(omarchy-battery-remaining) +BATTERY_STATE=$(upower -i $(upower -e | grep 'BAT') | grep -E "state" | awk '{print $2}') send_notification() { notify-send -u critical "󱐋 Time to recharge!" "Battery is down to ${1}%" -i battery-caution -t 30000 } -BATTERY_LEVEL=$(get_battery_percentage) -BATTERY_STATE=$(get_battery_state) - -if [[ "$BATTERY_STATE" == "discharging" && "$BATTERY_LEVEL" -le "$BATTERY_THRESHOLD" ]]; then - if [[ ! -f "$NOTIFICATION_FLAG" ]]; then - send_notification "$BATTERY_LEVEL" - touch "$NOTIFICATION_FLAG" +if [[ -n "$BATTERY_LEVEL" && "$BATTERY_LEVEL" =~ ^[0-9]+$ ]]; then + if [[ $BATTERY_STATE == "discharging" && $BATTERY_LEVEL -le $BATTERY_THRESHOLD ]]; then + if [[ ! -f $NOTIFICATION_FLAG ]]; then + send_notification $BATTERY_LEVEL + touch $NOTIFICATION_FLAG + fi + else + rm -f $NOTIFICATION_FLAG fi -else - rm -f "$NOTIFICATION_FLAG" fi diff --git a/bin/omarchy-battery-remaining b/bin/omarchy-battery-remaining new file mode 100755 index 0000000000..855b4c6b26 --- /dev/null +++ b/bin/omarchy-battery-remaining @@ -0,0 +1,11 @@ +#!/bin/bash + +# Returns the battery percentage remaining as an integer. + +upower -i $(upower -e | grep BAT) \ +| awk -F: '/percentage/ { + gsub(/[%[:space:]]/, "", $2); + val=$2; + printf("%d\n", (val+0.5)) + exit + }' diff --git a/bin/omarchy-branch-set b/bin/omarchy-branch-set new file mode 100755 index 0000000000..a6af4fa35d --- /dev/null +++ b/bin/omarchy-branch-set @@ -0,0 +1,14 @@ +#!/bin/bash + +if (($# == 0)); then + echo "Usage: omarchy-branch-set [master|dev]" + exit 1 +else + branch="$1" +fi + +case "$branch" in + "master") git -C $OMARCHY_PATH switch master ;; + "dev") git -C $OMARCHY_PATH switch dev ;; + *) echo "Unknown branch: $branch"; exit 1; ;; +esac diff --git a/bin/omarchy-channel-set b/bin/omarchy-channel-set new file mode 100755 index 0000000000..653d3bb398 --- /dev/null +++ b/bin/omarchy-channel-set @@ -0,0 +1,15 @@ +#!/bin/bash + +if (($# == 0)); then + echo "Usage: omarchy-channel-set [stable|edge|dev]" + exit 1 +else + channel="$1" +fi + +case "$channel" in +"stable") omarchy-branch-set "master" && omarchy-refresh-pacman "stable" ;; +"edge") omarchy-branch-set "master" && omarchy-refresh-pacman "edge" ;; +"dev") omarchy-branch-set "dev" && omarchy-refresh-pacman "edge" ;; +*) echo "Unknown channel: $channel"; exit 1; ;; +esac diff --git a/bin/omarchy-cmd-apple-display-brightness b/bin/omarchy-cmd-apple-display-brightness index e611e8b76c..7ba3d20ab1 100755 --- a/bin/omarchy-cmd-apple-display-brightness +++ b/bin/omarchy-cmd-apple-display-brightness @@ -3,5 +3,12 @@ if [[ $# -eq 0 ]]; then echo "Adjust Apple Display Brightness by passing +5000 or -5000 (or any range from 0-60000)" else - sudo asdcontrol $(sudo asdcontrol --detect /dev/usb/hiddev* | grep ^/dev/usb/hiddev | cut -d: -f1) -- "$1" + DEVICE="$(sudo asdcontrol --detect /dev/usb/hiddev* | grep ^/dev/usb/hiddev | cut -d: -f1)" + sudo asdcontrol "$DEVICE" -- "$1" >/dev/null + VALUE="$(sudo asdcontrol "$DEVICE" | awk -F= '/BRIGHTNESS=/{print $2+0}')" + swayosd-client \ + --monitor "$(hyprctl monitors -j | jq -r '.[]|select(.focused==true).name')" \ + --custom-icon display-brightness \ + --custom-progress "$(awk -v v="$VALUE" 'BEGIN{printf "%.2f", v/60000}')" \ + --custom-progress-text "$(( VALUE * 100 / 60000 ))%" fi diff --git a/bin/omarchy-cmd-audio-switch b/bin/omarchy-cmd-audio-switch index 2377a12353..d73205c31e 100755 --- a/bin/omarchy-cmd-audio-switch +++ b/bin/omarchy-cmd-audio-switch @@ -1,19 +1,56 @@ #!/bin/bash -# Find all the audio sinks but exit if there are none -sinks=($(wpctl status | sed -n '/Sinks:/,/Sources:/p' | grep -E '^\s*│\s+\*?\s*[0-9]+\.' | sed -E 's/^[^0-9]*([0-9]+)\..*/\1/')) -[ ${#sinks[@]} -eq 0 ] && exit 1 +focused_monitor="$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')" -# Find current audio sink -current=$(wpctl status | sed -n '/Sinks:/,/Sources:/p' | grep '^\s*│\s*\*' | sed -E 's/^[^0-9]*([0-9]+)\..*/\1/') +sinks=$(pactl -f json list sinks | jq '[.[] | select((.ports | length == 0) or ([.ports[]? | .availability != "not available"] | any))]') +sinks_count=$(echo "$sinks" | jq '. | length') -# Find the next sink (looping around in the list) -for i in "${!sinks[@]}"; do - [ "${sinks[$i]}" = "$current" ] && next=${sinks[$(((i + 1) % ${#sinks[@]}))]} -done -next=${next:-${sinks[0]}} +if [ "$sinks_count" -eq 0 ]; then + swayosd-client \ + --monitor "$focused_monitor" \ + --custom-message "No audio devices found" + exit 1 +fi -# Set the next sink and ensure it's not muted -wpctl set-default "$next" -wpctl set-mute "$next" 0 +current_sink_name=$(pactl get-default-sink) +current_sink_index=$(echo "$sinks" | jq -r --arg name "$current_sink_name" 'map(.name) | index($name)') +if [ "$current_sink_index" != "null" ]; then + next_sink_index=$(((current_sink_index + 1) % sinks_count)) +else + next_sink_index=0 +fi + +next_sink=$(echo "$sinks" | jq -r ".[$next_sink_index]") +next_sink_name=$(echo "$next_sink" | jq -r '.name') + +next_sink_description=$(echo "$next_sink" | jq -r '.description') +if [ "$next_sink_description" = "(null)" ] || [ "$next_sink_description" = "null" ] || [ -z "$next_sink_description" ]; then + sink_id=$(echo "$next_sink" | jq -r '.properties."object.id"') + next_sink_description=$(wpctl status | grep -E "\s+\*?\s+${sink_id}\." | sed -E 's/^.*[0-9]+\.\s+//' | sed -E 's/\s+\[.*$//') +fi + +next_sink_volume=$(echo "$next_sink" | jq -r \ + '.volume | to_entries[0].value.value_percent | sub("%"; "")') +next_sink_is_muted=$(echo "$next_sink" | jq -r '.mute') + +if [ "$next_sink_is_muted" = "true" ] || [ "$next_sink_volume" -eq 0 ]; then + icon_state="muted" +elif [ "$next_sink_volume" -le 33 ]; then + icon_state="low" +elif [ "$next_sink_volume" -le 66 ]; then + icon_state="medium" +else + icon_state="high" +fi + +next_sink_volume_icon="sink-volume-${icon_state}-symbolic" + +if [ "$next_sink_name" != "$current_sink_name" ]; then + pactl set-default-sink "$next_sink_name" +fi + +swayosd-client \ + --monitor "$focused_monitor" \ + --custom-message "$next_sink_description" \ + --custom-icon "$next_sink_volume_icon" diff --git a/bin/omarchy-cmd-first-run b/bin/omarchy-cmd-first-run index 9334d1d31b..b400a584e3 100755 --- a/bin/omarchy-cmd-first-run +++ b/bin/omarchy-cmd-first-run @@ -6,7 +6,15 @@ FIRST_RUN_MODE=~/.local/state/omarchy/first-run.mode if [[ -f "$FIRST_RUN_MODE" ]]; then rm -f "$FIRST_RUN_MODE" - $OMARCHY_PATH/install/first-run/battery-monitor.sh - $OMARCHY_PATH/install/first-run/firewall.sh + + bash "$OMARCHY_PATH/install/first-run/battery-monitor.sh" + bash "$OMARCHY_PATH/install/first-run/cleanup-reboot-sudoers.sh" + bash "$OMARCHY_PATH/install/first-run/firewall.sh" + bash "$OMARCHY_PATH/install/first-run/dns-resolver.sh" + bash "$OMARCHY_PATH/install/first-run/gnome-theme.sh" + bash "$OMARCHY_PATH/install/first-run/elephant.sh" sudo rm -f /etc/sudoers.d/first-run + + bash "$OMARCHY_PATH/install/first-run/welcome.sh" + bash "$OMARCHY_PATH/install/first-run/wifi.sh" fi diff --git a/bin/omarchy-cmd-missing b/bin/omarchy-cmd-missing new file mode 100755 index 0000000000..4658d37bae --- /dev/null +++ b/bin/omarchy-cmd-missing @@ -0,0 +1,9 @@ +#!/bin/bash + +for cmd in "$@"; do + if ! command -v "$cmd" &>/dev/null; then + exit 0 + fi +done + +exit 1 diff --git a/bin/omarchy-cmd-present b/bin/omarchy-cmd-present new file mode 100755 index 0000000000..fecdc9435d --- /dev/null +++ b/bin/omarchy-cmd-present @@ -0,0 +1,7 @@ +#!/bin/bash + +for cmd in "$@"; do + command -v "$cmd" &>/dev/null || exit 1 +done + +exit 0 diff --git a/bin/omarchy-cmd-reboot b/bin/omarchy-cmd-reboot new file mode 100755 index 0000000000..c1f6472d95 --- /dev/null +++ b/bin/omarchy-cmd-reboot @@ -0,0 +1,6 @@ +#!/bin/bash + +omarchy-state clear re*-required +omarchy-hyprland-window-close-all +sleep 1 # Allow apps like Chrome to shutdown correctly +systemctl reboot --no-wall diff --git a/bin/omarchy-cmd-screenrecord b/bin/omarchy-cmd-screenrecord index 4abffc6c9a..ec243ddb9a 100755 --- a/bin/omarchy-cmd-screenrecord +++ b/bin/omarchy-cmd-screenrecord @@ -8,25 +8,113 @@ if [[ ! -d "$OUTPUT_DIR" ]]; then exit 1 fi -screenrecording() { - filename="$OUTPUT_DIR/screenrecording-$(date +'%Y-%m-%d_%H-%M-%S').mp4" - notify-send "Screen recording starting..." -t 1000 +DESKTOP_AUDIO="false" +MICROPHONE_AUDIO="false" +WEBCAM="false" +STOP_RECORDING="false" + +for arg in "$@"; do + case "$arg" in + --with-desktop-audio) DESKTOP_AUDIO="true" ;; + --with-microphone-audio) MICROPHONE_AUDIO="true" ;; + --with-webcam) WEBCAM="true" ;; + --stop-recording) STOP_RECORDING="true" + 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() { + local filename="$OUTPUT_DIR/screenrecording-$(date +'%Y-%m-%d_%H-%M-%S').mp4" + local audio_devices="" + local audio_args="" + + [[ "$DESKTOP_AUDIO" == "true" ]] && audio_devices+="default_output" + + if [[ "$MICROPHONE_AUDIO" == "true" ]]; then + # Merge audio tracks into one - separate tracks only play one at a time in most players + [[ -n "$audio_devices" ]] && audio_devices+="|" + audio_devices+="default_input" + fi - if lspci | grep -Eqi 'nvidia|intel.*graphics'; then - wf-recorder -f "$filename" -c libx264 -p crf=23 -p preset=medium -p movflags=+faststart "$@" + [[ -n "$audio_devices" ]] && audio_args+="-a $audio_devices" + + gpu-screen-recorder -w portal -f 60 -fallback-cpu-encoding yes -o "$filename" $audio_args -ac aac & + toggle_screenrecording_indicator +} + +stop_screenrecording() { + pkill -SIGINT -f "^gpu-screen-recorder" # SIGINT required to save video properly + + # 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 - wl-screenrec -f "$filename" --ffmpeg-encoder-options="-c:v libx264 -crf 23 -preset medium -movflags +faststart" "$@" + cleanup_webcam + notify-send "Screen recording saved to $OUTPUT_DIR" -t 2000 fi + toggle_screenrecording_indicator +} + +toggle_screenrecording_indicator() { + pkill -RTMIN+8 waybar } -if pgrep -x wl-screenrec >/dev/null || pgrep -x wf-recorder >/dev/null; then - pkill -x wl-screenrec - pkill -x wf-recorder - notify-send "Screen recording saved to $OUTPUT_DIR" -t 2000 -elif [[ "$1" == "output" ]]; then - screenrecording +screenrecording_active() { + pgrep -f "^gpu-screen-recorder" >/dev/null || pgrep -f "WebcamOverlay" >/dev/null +} + +if screenrecording_active; then + if pgrep -f "WebcamOverlay" >/dev/null && ! pgrep -f "^gpu-screen-recorder" >/dev/null; then + cleanup_webcam + else + stop_screenrecording + fi +elif [[ "$STOP_RECORDING" == "false" ]]; then + [[ "$WEBCAM" == "true" ]] && start_webcam_overlay + + start_screenrecording || cleanup_webcam else - region=$(slurp) || exit 1 - screenrecording -g "$region" + exit 1 fi diff --git a/bin/omarchy-cmd-screenrecord-stop b/bin/omarchy-cmd-screenrecord-stop deleted file mode 100755 index 5631920cad..0000000000 --- a/bin/omarchy-cmd-screenrecord-stop +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -if pgrep -x wl-screenrec >/dev/null || pgrep -x wf-recorder >/dev/null; then - pkill -x wl-screenrec - pkill -x wf-recorder - notify-send "Screen recording stopped" -t 2000 -fi diff --git a/bin/omarchy-cmd-screensaver b/bin/omarchy-cmd-screensaver index eb320600a8..d17ff55b4a 100755 --- a/bin/omarchy-cmd-screensaver +++ b/bin/omarchy-cmd-screensaver @@ -1,16 +1,31 @@ #!/bin/bash +screensaver_in_focus() { + hyprctl activewindow -j | jq -e '.class == "org.omarchy.screensaver"' >/dev/null 2>&1 +} + +exit_screensaver() { + hyprctl keyword cursor:invisible false + pkill -x tte 2>/dev/null + pkill -f org.omarchy.screensaver 2>/dev/null + exit 0 +} + +trap exit_screensaver SIGINT SIGTERM SIGHUP SIGQUIT + +printf '\033]11;rgb:00/00/00\007' # Set background color to black + +hyprctl keyword cursor:invisible true &>/dev/null + while true; do - effect=$(tte 2>&1 | grep -oP '{\K[^}]+' | tr ',' ' ' | tr ' ' '\n' | sed -n '/^beams$/,$p' | sort -u | shuf -n1) tte -i ~/.config/omarchy/branding/screensaver.txt \ - --frame-rate 240 --canvas-width 0 --canvas-height $(($(tput lines) - 2)) --anchor-canvas c --anchor-text c \ - "$effect" & + --frame-rate 120 --canvas-width 0 --canvas-height 0 --reuse-canvas --anchor-canvas c --anchor-text c\ + --random-effect --exclude-effects dev_worm \ + --no-eol --no-restore-cursor & while pgrep -x tte >/dev/null; do - if read -n 1 -t 0.01; then - pkill -x tte 2>/dev/null - pkill -f "alacritty --class Screensaver" 2>/dev/null - exit 0 + if read -n 1 -t 1 || ! screensaver_in_focus; then + exit_screensaver fi done done diff --git a/bin/omarchy-cmd-screenshot b/bin/omarchy-cmd-screenshot index 330dde3b30..f4450f8958 100755 --- a/bin/omarchy-cmd-screenshot +++ b/bin/omarchy-cmd-screenshot @@ -8,10 +8,76 @@ if [[ ! -d "$OUTPUT_DIR" ]]; then exit 1 fi -pkill slurp || hyprshot -m ${1:-region} --raw | +pkill slurp && exit 0 + +MODE="${1:-smart}" +PROCESSING="${2:-slurp}" + +get_rectangles() { + local active_workspace=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .activeWorkspace.id') + hyprctl monitors -j | jq -r --arg ws "$active_workspace" '.[] | select(.activeWorkspace.id == ($ws | tonumber)) | "\(.x),\(.y) \((.width / .scale) | floor)x\((.height / .scale) | floor)"' + hyprctl clients -j | jq -r --arg ws "$active_workspace" '.[] | select(.workspace.id == ($ws | tonumber)) | "\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' +} + +# Select based on mode +case "$MODE" in + region) + wayfreeze & PID=$! + sleep .1 + SELECTION=$(slurp 2>/dev/null) + kill $PID 2>/dev/null + ;; + windows) + wayfreeze & PID=$! + sleep .1 + SELECTION=$(get_rectangles | slurp -r 2>/dev/null) + kill $PID 2>/dev/null + ;; + fullscreen) + SELECTION=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | "\(.x),\(.y) \((.width / .scale) | floor)x\((.height / .scale) | floor)"') + ;; + smart|*) + RECTS=$(get_rectangles) + wayfreeze & PID=$! + sleep .1 + SELECTION=$(echo "$RECTS" | slurp 2>/dev/null) + kill $PID 2>/dev/null + + # If the selction area is L * W < 20, we'll assume you were trying to select whichever + # window or output it was inside of to prevent accidental 2px snapshots + if [[ "$SELECTION" =~ ^([0-9]+),([0-9]+)[[:space:]]([0-9]+)x([0-9]+)$ ]]; then + if (( ${BASH_REMATCH[3]} * ${BASH_REMATCH[4]} < 20 )); then + click_x="${BASH_REMATCH[1]}" + click_y="${BASH_REMATCH[2]}" + + while IFS= read -r rect; do + if [[ "$rect" =~ ^([0-9]+),([0-9]+)[[:space:]]([0-9]+)x([0-9]+) ]]; then + rect_x="${BASH_REMATCH[1]}" + rect_y="${BASH_REMATCH[2]}" + rect_width="${BASH_REMATCH[3]}" + rect_height="${BASH_REMATCH[4]}" + + if (( click_x >= rect_x && click_x < rect_x+rect_width && click_y >= rect_y && click_y < rect_y+rect_height )); then + SELECTION="${rect_x},${rect_y} ${rect_width}x${rect_height}" + break + fi + fi + done <<< "$RECTS" + fi + fi + ;; +esac + +[ -z "$SELECTION" ] && exit 0 + +if [[ $PROCESSING == "slurp" ]]; then +grim -g "$SELECTION" - | satty --filename - \ --output-filename "$OUTPUT_DIR/screenshot-$(date +'%Y-%m-%d_%H-%M-%S').png" \ --early-exit \ --actions-on-enter save-to-clipboard \ --save-after-copy \ --copy-command 'wl-copy' +else + grim -g "$SELECTION" - | wl-copy +fi diff --git a/bin/omarchy-cmd-share b/bin/omarchy-cmd-share new file mode 100755 index 0000000000..78113a132c --- /dev/null +++ b/bin/omarchy-cmd-share @@ -0,0 +1,44 @@ +#!/bin/bash + +if (($# == 0)); then + echo "Usage: omarchy-cmd-share [clipboard|file|folder]" + exit 1 +fi + +MODE="$1" +shift + +if [[ $MODE == "clipboard" ]]; then + TEMP_FILE=$(mktemp --suffix=.txt) + wl-paste >"$TEMP_FILE" + FILES="$TEMP_FILE" +else + if (($# > 0)); then + FILES="$*" + else + if [[ $MODE == "folder" ]]; then + # Pick a single folder from home directory + FILES=$(find "$HOME" -type d 2>/dev/null | fzf) + else + # Pick one or more files from home directory + FILES=$(find "$HOME" -type f 2>/dev/null | fzf --multi) + fi + [ -z "$FILES" ] && exit 0 + fi +fi + +# Run LocalSend in its own systemd service (detached from terminal) +# Convert newline-separated files to space-separated arguments +if [[ $MODE != "clipboard" ]] && echo "$FILES" | grep -q $'\n'; then + # Multiple files selected - convert newlines to array + readarray -t FILE_ARRAY <<<"$FILES" + systemd-run --user --quiet --collect localsend --headless send "${FILE_ARRAY[@]}" +else + # Single file or clipboard mode + systemd-run --user --quiet --collect localsend --headless send "$FILES" +fi + +# Note: Temporary file will remain until system cleanup for clipboard mode +# This ensures the file content is available for the LocalSend GUI + +exit 0 diff --git a/bin/omarchy-cmd-shutdown b/bin/omarchy-cmd-shutdown new file mode 100755 index 0000000000..cd5748ed0d --- /dev/null +++ b/bin/omarchy-cmd-shutdown @@ -0,0 +1,6 @@ +#!/bin/bash + +omarchy-state clear re*-required +omarchy-hyprland-window-close-all +sleep 1 # Allow apps like Chrome to shutdown correctly +systemctl poweroff --no-wall diff --git a/bin/omarchy-cmd-terminal-cwd b/bin/omarchy-cmd-terminal-cwd index 6062b68f35..b651148d72 100755 --- a/bin/omarchy-cmd-terminal-cwd +++ b/bin/omarchy-cmd-terminal-cwd @@ -2,10 +2,18 @@ # Go from current active terminal to its child shell process and run cwd there terminal_pid=$(hyprctl activewindow | awk '/pid:/ {print $2}') -shell_pid=$(pgrep -P "$terminal_pid" | head -n1) +shell_pid=$(pgrep -P "$terminal_pid" | tail -n1) if [[ -n $shell_pid ]]; then - readlink -f "/proc/$shell_pid/cwd" 2>/dev/null + cwd=$(readlink -f "/proc/$shell_pid/cwd" 2>/dev/null) + shell=$(readlink -f "/proc/$shell_pid/exe" 2>/dev/null) + + # Check if $shell is a valid shell and $cwd is a directory. + if grep -qs "$shell" /etc/shells && [[ -d $cwd ]]; then + echo "$cwd" + else + echo "$HOME" + fi else echo "$HOME" fi diff --git a/bin/omarchy-cmd-tzupdate b/bin/omarchy-cmd-tzupdate deleted file mode 100755 index da135e9e1e..0000000000 --- a/bin/omarchy-cmd-tzupdate +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -sudo systemctl restart systemd-timesyncd -sudo tzupdate -new_timezone=$(timedatectl show -p Timezone --value) -omarchy-restart-waybar -notify-send "Time synced and timezone set to $new_timezone" diff --git a/bin/omarchy-debug b/bin/omarchy-debug new file mode 100755 index 0000000000..05c35df8db --- /dev/null +++ b/bin/omarchy-debug @@ -0,0 +1,61 @@ +#!/bin/bash + +LOG_FILE="/tmp/omarchy-debug.log" + +cat > "$LOG_FILE" </dev/null || echo "unknown") + +========================================= +SYSTEM INFORMATION +========================================= +$(inxi -Farz) + +========================================= +DMESG +========================================= +$(sudo dmesg) + +========================================= +JOURNALCTL (CURRENT BOOT, ERRORS ONLY) +========================================= +$(journalctl -b -p 4..1) + +========================================= +INSTALLED PACKAGES +========================================= +$({ expac -S '%n %v (%r)' $(pacman -Qqe) 2>/dev/null; comm -13 <(pacman -Sql | sort) <(pacman -Qqe | sort) | xargs -r expac -Q '%n %v (AUR)'; } | sort) +EOF + +OPTIONS=("View log" "Save in current directory") +if ping -c 1 8.8.8.8 >/dev/null 2>&1; then + OPTIONS=("Upload log" "${OPTIONS[@]}") +fi + +ACTION=$(gum choose "${OPTIONS[@]}") + +case "$ACTION" in + "Upload log") + echo "Uploading debug log to 0x0.st..." + URL=$(curl -sF "file=@$LOG_FILE" -Fexpires=24 https://0x0.st) + if [ $? -eq 0 ] && [ -n "$URL" ]; then + echo "✓ Log uploaded successfully!" + echo "Share this URL:" + echo "" + echo " $URL" + echo "" + echo "This link will expire in 24 hours." + else + echo "Error: Failed to upload log file" + exit 1 + fi + ;; + "View log") + less "$LOG_FILE" + ;; + "Save in current directory") + cp "$LOG_FILE" "./omarchy-debug.log" + echo "✓ Log saved to $(pwd)/omarchy-debug.log" + ;; +esac diff --git a/bin/omarchy-drive-info b/bin/omarchy-drive-info new file mode 100755 index 0000000000..10fb223eca --- /dev/null +++ b/bin/omarchy-drive-info @@ -0,0 +1,28 @@ +#!/bin/bash + +# Drive, like /dev/nvme0, to display information about +if (($# == 0)); then + echo "Usage: omarchy-drive-info [/dev/drive]" + exit 1 +else + drive="$1" +fi + +# Find the root drive in case we are looking at partitions +root_drive=$(lsblk -no PKNAME "$drive" 2>/dev/null | tail -n1) +if [[ -n "$root_drive" ]]; then + root_drive="/dev/$root_drive" +else + root_drive="$drive" +fi + +# Get basic disk information +size=$(lsblk -dno SIZE "$drive" 2>/dev/null) +model=$(lsblk -dno MODEL "$root_drive" 2>/dev/null) + +# Format display string +display="$drive" +[[ -n "$size" ]] && display="$display ($size)" +[[ -n "$model" ]] && display="$display - $model" + +echo "$display" diff --git a/bin/omarchy-drive-select b/bin/omarchy-drive-select new file mode 100755 index 0000000000..9168eb7ddb --- /dev/null +++ b/bin/omarchy-drive-select @@ -0,0 +1,18 @@ +#!/bin/bash + +# Select a drive from a list with info that includes space and brand + +if (($# == 0)); then + drives=$(lsblk -dpno NAME | grep -E '/dev/(sd|hd|vd|nvme|mmcblk|xv)') +else + drives="$@" +fi + +drives_with_info="" +while IFS= read -r drive; do + [[ -n "$drive" ]] || continue + drives_with_info+="$(omarchy-drive-info "$drive")"$'\n' +done <<<"$drives" + +selected_drive="$(printf "%s" "$drives_with_info" | gum choose --header "Select drive")" || exit 1 +printf "%s\n" "$selected_drive" | awk '{print $1}' diff --git a/bin/omarchy-drive-set-password b/bin/omarchy-drive-set-password new file mode 100755 index 0000000000..88a9c58f56 --- /dev/null +++ b/bin/omarchy-drive-set-password @@ -0,0 +1,21 @@ +#!/bin/bash + +encrypted_drives=$(blkid -t TYPE=crypto_LUKS -o device) + +if [[ -n $encrypted_drives ]]; then + if [[ $(wc -l <<<"$encrypted_drives") -eq 1 ]]; then + drive_to_change="$encrypted_drives" + else + drive_to_change="$(omarchy-drive-select "$encrypted_drives")" + fi + + if [[ -n $drive_to_change ]]; then + echo "Changing full-disk encryption password for $drive_to_change" + sudo cryptsetup luksChangeKey --pbkdf argon2id --iter-time 2000 "$drive_to_change" + else + echo "No drive selected." + fi +else + echo "No encrypted drives available." + exit 1 +fi diff --git a/bin/omarchy-font-current b/bin/omarchy-font-current index c3dc4c90e9..feea8d6b57 100755 --- a/bin/omarchy-font-current +++ b/bin/omarchy-font-current @@ -1,3 +1,3 @@ #!/bin/bash -grep -oP 'family\s*=\s*"\K[^"]+' ~/.config/alacritty/alacritty.toml | head -n1 +grep -oP 'font-family:\s*["'\'']?\K[^;"'\'']+' ~/.config/waybar/style.css | head -n1 diff --git a/bin/omarchy-font-set b/bin/omarchy-font-set index a45467d44a..d8f1974285 100755 --- a/bin/omarchy-font-set +++ b/bin/omarchy-font-set @@ -4,7 +4,21 @@ font_name="$1" if [[ -n "$font_name" && "$font_name" != "CNCLD" ]]; then if fc-list | grep -iq "$font_name"; then - sed -i "s/family = \".*\"/family = \"$font_name\"/g" ~/.config/alacritty/alacritty.toml + if [[ -f ~/.config/alacritty/alacritty.toml ]]; then + sed -i "s/family = \".*\"/family = \"$font_name\"/g" ~/.config/alacritty/alacritty.toml + fi + + if [[ -f ~/.config/kitty/kitty.conf ]]; then + sed -i "s/^font_family .*/font_family $font_name/g" ~/.config/kitty/kitty.conf + pkill -USR1 kitty + fi + + if [[ -f ~/.config/ghostty/config ]]; then + sed -i "s/font-family = \".*\"/font-family = \"$font_name\"/g" ~/.config/ghostty/config + pkill -SIGUSR2 ghostty + fi + + sed -i "s/font_family = .*/font_family = $font_name/g" ~/.config/hypr/hyprlock.conf sed -i "s/font-family: .*/font-family: '$font_name';/g" ~/.config/waybar/style.css sed -i "s/font-family: .*/font-family: '$font_name';/g" ~/.config/swayosd/style.css xmlstarlet ed -L \ @@ -14,7 +28,12 @@ if [[ -n "$font_name" && "$font_name" != "CNCLD" ]]; then omarchy-restart-waybar omarchy-restart-swayosd - omarchy-restart-walker + + if pgrep -x ghostty; then + notify-send " You must restart Ghostty to see font change" + fi + + omarchy-hook font-set "$font_name" else echo "Font '$font_name' not found." exit 1 diff --git a/bin/omarchy-hook b/bin/omarchy-hook new file mode 100755 index 0000000000..30b7b1f601 --- /dev/null +++ b/bin/omarchy-hook @@ -0,0 +1,16 @@ +#!/bin/bash + +set -e + +if [[ $# -lt 1 ]]; then + echo "Usage: omarchy-hook [name] [args...]" + exit 1 +fi + +HOOK=$1 +HOOK_PATH="$HOME/.config/omarchy/hooks/$1" +shift + +if [[ -f $HOOK_PATH ]]; then + bash "$HOOK_PATH" "$@" +fi diff --git a/bin/omarchy-cmd-close-all-windows b/bin/omarchy-hyprland-window-close-all similarity index 100% rename from bin/omarchy-cmd-close-all-windows rename to bin/omarchy-hyprland-window-close-all diff --git a/bin/omarchy-hyprland-window-pop b/bin/omarchy-hyprland-window-pop new file mode 100755 index 0000000000..d1e8ef3cef --- /dev/null +++ b/bin/omarchy-hyprland-window-pop @@ -0,0 +1,46 @@ +#!/bin/bash + +# Toggle to pop-out a tile to stay fixed on a display basis. + +# Usage: +# omarchy-hyprland-window-pop [width height [x y]] +# +# Arguments: +# width Optional. Width of the floating window. Default: 1300 +# height Optional. Height of the floating window. Default: 900 +# x Optional. X position of the window. Must provide both X and Y to take effect. +# y Optional. Y position of the window. Must provide both X and Y to take effect. +# +# Behavior: +# - If the window is already pinned, it will be unpinned and removed from the pop layer. +# - If the window is not pinned, it will be floated, resized, moved/centered, pinned, brought to top, and popped. + +width=${1:-1300} +height=${2:-900} +x=${3:-} +y=${4:-} + +active=$(hyprctl activewindow -j) +pinned=$(echo "$active" | jq ".pinned") +addr=$(echo "$active" | jq -r ".address") + +if [[ $pinned == "true" ]]; then + hyprctl -q --batch \ + "dispatch pin address:$addr;" \ + "dispatch togglefloating address:$addr;" \ + "dispatch tagwindow -pop address:$addr;" +elif [[ -n $addr ]]; then + hyprctl dispatch togglefloating address:$addr + hyprctl dispatch resizeactive exact $width $height address:$addr + + if [[ -n $x && -n $y ]]; then + hyprctl dispatch moveactive $x $y address:$addr + else + hyprctl dispatch centerwindow address:$addr + fi + + hyprctl -q --batch \ + "dispatch pin address:$addr;" \ + "dispatch alterzorder top address:$addr;" \ + "dispatch tagwindow +pop address:$addr;" +fi diff --git a/bin/omarchy-hyprland-workspace-toggle-gaps b/bin/omarchy-hyprland-workspace-toggle-gaps new file mode 100755 index 0000000000..f7882305b0 --- /dev/null +++ b/bin/omarchy-hyprland-workspace-toggle-gaps @@ -0,0 +1,10 @@ +#!/bin/bash + +workspace_id=$(hyprctl activeworkspace -j | jq -r .id) +gaps=$(hyprctl workspacerules -j | jq -r ".[] | select(.workspaceString==\"$workspace_id\") | .gapsOut[0] // 0") + +if [[ $gaps == "0" ]]; then + hyprctl keyword "workspace $workspace_id, gapsout:10, gapsin:5, bordersize:2" +else \ + hyprctl keyword "workspace $workspace_id, gapsout:0, gapsin:0, bordersize:0" +fi diff --git a/bin/omarchy-install-chromium-google-account b/bin/omarchy-install-chromium-google-account new file mode 100755 index 0000000000..5087cee8a4 --- /dev/null +++ b/bin/omarchy-install-chromium-google-account @@ -0,0 +1,13 @@ +#!/bin/bash + +if [[ -f ~/.config/chromium-flags.conf ]]; then + CONF=~/.config/chromium-flags.conf + + grep -qxF -- "--oauth2-client-id=77185425430.apps.googleusercontent.com" "$CONF" || + echo "--oauth2-client-id=77185425430.apps.googleusercontent.com" >>"$CONF" + + grep -qxF -- "--oauth2-client-secret=OTJgUOQcT7lO7GsGZq2G4IlT" "$CONF" || + echo "--oauth2-client-secret=OTJgUOQcT7lO7GsGZq2G4IlT" >>"$CONF" + + echo "Now you can login to your Google Account in Chromium." +fi diff --git a/bin/omarchy-install-dev-env b/bin/omarchy-install-dev-env index 1865992a68..ca9925a0f0 100755 --- a/bin/omarchy-install-dev-env +++ b/bin/omarchy-install-dev-env @@ -1,12 +1,12 @@ #!/bin/bash if [[ -z "$1" ]]; then - echo "Usage: omarchy-install-dev-env " >&2 + echo "Usage: omarchy-install-dev-env " >&2 exit 1 fi install_php() { - sudo pacman -S php composer php-sqlite --noconfirm + sudo pacman -S php composer php-sqlite xdebug --noconfirm # Install Path for Composer if [[ ":$PATH:" != *":$HOME/.config/composer/vendor/bin:"* ]]; then @@ -28,6 +28,12 @@ install_php() { "pdo_mysql" ) + # Enable Xdebug + sudo sed -i \ + -e 's/^;zend_extension=xdebug.so/zend_extension=xdebug.so/' \ + -e 's/^;xdebug.mode=debug/xdebug.mode=debug/' \ + /etc/php/conf.d/xdebug.ini + for ext in "${extensions_to_enable[@]}"; do sudo sed -i "s/^;extension=${ext}/extension=${ext}/" "$php_ini_path" done @@ -41,8 +47,10 @@ install_node() { case "$1" in ruby) echo -e "Installing Ruby on Rails...\n" + omarchy-pkg-add libyaml mise use --global ruby@latest mise settings add idiomatic_version_file_enable_tools ruby + echo "gem: --no-document" > ~/.gemrc mise x ruby -- gem install rails --no-document echo -e "\nYou can now run: rails new myproject" ;; @@ -75,7 +83,7 @@ laravel) symfony) echo -e "Installing PHP and Symfony...\n" install_php - yay -S symfony-cli --noconfirm + omarchy-pkg-add symfony-cli echo -e "\nYou can now run: symfony new --webapp myproject" ;; python) @@ -113,6 +121,7 @@ java) zig) echo -e "Installing Zig...\n" mise use --global zig@latest + mise use -g zls@latest ;; ocaml) echo -e "Installing OCaml...\n" @@ -125,4 +134,9 @@ dotnet) echo -e "Installing .NET...\n" mise use --global dotnet@latest ;; +clojure) + echo -e "Installing Clojure...\n" + omarchy-pkg-add rlwrap + mise use --global clojure@latest + ;; esac diff --git a/bin/omarchy-install-docker-dbs b/bin/omarchy-install-docker-dbs index da9090fa4c..658a2b08c8 100755 --- a/bin/omarchy-install-docker-dbs +++ b/bin/omarchy-install-docker-dbs @@ -1,16 +1,24 @@ #!/bin/bash -options=("MySQL" "PostgreSQL" "Redis" "MongoDB" "MariaDB") -choices=$(printf "%s\n" "${options[@]}" | gum choose --no-limit --header "Select databases (space to select, return to install, esc to cancel)") || main_menu +options=("MySQL" "PostgreSQL" "Redis" "MongoDB" "MariaDB" "MSSQL") + +if [[ "$#" -eq 0 ]]; then + choices=$(printf "%s\n" "${options[@]}" | gum choose --header "Select database (return to install, esc to cancel)") || main_menu +else + choices="$@" +fi if [[ -n "$choices" ]]; then for db in $choices; do case $db in MySQL) sudo docker run -d --restart unless-stopped -p "127.0.0.1:3306:3306" --name=mysql8 -e MYSQL_ROOT_PASSWORD= -e MYSQL_ALLOW_EMPTY_PASSWORD=true mysql:8.4 ;; - PostgreSQL) sudo docker run -d --restart unless-stopped -p "127.0.0.1:5432:5432" --name=postgres16 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:16 ;; + PostgreSQL) sudo docker run -d --restart unless-stopped -p "127.0.0.1:5432:5432" --name=postgres17 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:17 ;; MariaDB) sudo docker run -d --restart unless-stopped -p "127.0.0.1:3306:3306" --name=mariadb11 -e MARIADB_ROOT_PASSWORD= -e MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=true mariadb:11.8 ;; Redis) sudo docker run -d --restart unless-stopped -p "127.0.0.1:6379:6379" --name=redis redis:7 ;; MongoDB) sudo docker run -d --restart unless-stopped -p "127.0.0.1:27017:27017" --name mongodb -e MONGO_INITDB_ROOT_USERNAME=admin -e MONGO_INITDB_ROOT_PASSWORD=admin123 mongo:noble ;; + MSSQL) sudo docker run -d --restart unless-stopped -p "127.0.0.1:1433:1433" --name mssql -e MSSQL_PID=Developer -e ACCEPT_EULA=Y -e "MSSQL_SA_PASSWORD=@dmin123" mcr.microsoft.com/mssql/server:2022-CU12-ubuntu-22.04 ;; esac done +else + echo "No databases selected for installation." fi diff --git a/bin/omarchy-install-dropbox b/bin/omarchy-install-dropbox index e80982d40f..b4c592981e 100755 --- a/bin/omarchy-install-dropbox +++ b/bin/omarchy-install-dropbox @@ -1,10 +1,8 @@ #!/bin/bash -# FIXME: Should not use AUR dependencies when we can avoid it -echo "Installing all dependencies [from AUR]..." -yay -S --noconfirm --needed \ - dropbox dropbox-cli libappindicator-gtk3 python-gpgme nautilus-dropbox +echo "Installing all dependencies..." +omarchy-pkg-add dropbox dropbox-cli libappindicator-gtk3 python-gpgme nautilus-dropbox echo "Starting Dropbox..." -uwsm app -- dropbox-cli start &>/dev/null & +uwsm-app -- dropbox-cli start &>/dev/null & echo "See Dropbox icon behind  hover tray in top right and right-click for setup." diff --git a/bin/omarchy-install-steam b/bin/omarchy-install-steam index 1d58845ccf..a5764bb4bf 100755 --- a/bin/omarchy-install-steam +++ b/bin/omarchy-install-steam @@ -1,8 +1,7 @@ #!/bin/bash -echo "Adding multilib repository for 32-bit compatibility" -sudo sed -i '/^\s*#\[multilib\]/,/^$/{s/^\s*#//}' /etc/pacman.conf +set -e echo "Now pick dependencies matching your graphics card" -sudo pacman -Syu --noconfirm steam +sudo pacman -S steam setsid gtk-launch steam >/dev/null 2>&1 & diff --git a/bin/omarchy-install-terminal b/bin/omarchy-install-terminal new file mode 100755 index 0000000000..e962f3f3be --- /dev/null +++ b/bin/omarchy-install-terminal @@ -0,0 +1,59 @@ +#!/bin/bash + +if (($# == 0)); then + echo "Usage: omarchy-install-terminal [alacritty|ghostty|kitty]" + exit 1 +fi + +package="$1" + +# Map package name to desktop entry ID +case "$package" in +alacritty) desktop_id="Alacritty.desktop" ;; +ghostty) desktop_id="com.mitchellh.ghostty.desktop" ;; +kitty) desktop_id="kitty.desktop" ;; +*) + echo "Unknown terminal: $package" + exit 1 + ;; +esac + +# Install package +if omarchy-pkg-add $package; then + # Copy custom desktop entry for alacritty with X-TerminalArg* keys + if [[ $package == "alacritty" ]]; then + mkdir -p ~/.local/share/applications + cat > ~/.local/share/applications/Alacritty.desktop << EOF +[Desktop Entry] +Type=Application +TryExec=alacritty +Exec=alacritty +Icon=Alacritty +Terminal=false +Categories=System;TerminalEmulator; +Name=Alacritty +GenericName=Terminal +Comment=A fast, cross-platform, OpenGL terminal emulator +StartupNotify=true +StartupWMClass=Alacritty +Actions=New; +X-TerminalArgExec=-e +X-TerminalArgAppId=--class= +X-TerminalArgTitle=--title= +X-TerminalArgDir=--working-directory= + +[Desktop Action New] +Name=New Terminal +Exec=alacritty +EOF + fi + + # Update xdg-terminals.list to prioritize the proper terminal + cat > ~/.config/xdg-terminals.list << EOF +# Terminal emulator preference order for xdg-terminal-exec +# The first found and valid terminal will be used +$desktop_id +EOF +else + echo "Failed to install $package" +fi diff --git a/bin/omarchy-install-vscode b/bin/omarchy-install-vscode new file mode 100755 index 0000000000..4c5b036a5e --- /dev/null +++ b/bin/omarchy-install-vscode @@ -0,0 +1,27 @@ +#!/bin/bash + +echo "Installing VSCode..." +omarchy-pkg-add visual-studio-code-bin + +mkdir -p ~/.vscode ~/.config/Code/User + +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 + +# Ensure VSC's own auto-update feature is turned off +printf '{\n "update.mode": "none"\n}\n' > ~/.config/Code/User/settings.json + +# Apply Omarchy theme to VSCode +omarchy-theme-set-vscode + +setsid gtk-launch code diff --git a/bin/omarchy-install-xbox-controllers b/bin/omarchy-install-xbox-controllers new file mode 100755 index 0000000000..b50067b024 --- /dev/null +++ b/bin/omarchy-install-xbox-controllers @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +# Install xpadneo to ensure controllers work out of the box +sudo pacman -S --noconfirm --needed linux-headers +yay -S --noconfirm xpadneo-dkms + +# Prevent xpad/xpadneo driver conflict +echo blacklist xpad | sudo tee /etc/modprobe.d/blacklist-xpad.conf >/dev/null +echo hid_xpadneo | sudo tee /etc/modules-load.d/xpadneo.conf >/dev/null + +# Give user access to game controllers +sudo usermod -a -G input $USER + +# Modules need to be loaded +gum confirm "Install requires reboot. Ready?" && sudo reboot now diff --git a/bin/omarchy-launch-about b/bin/omarchy-launch-about new file mode 100755 index 0000000000..135f4d7994 --- /dev/null +++ b/bin/omarchy-launch-about @@ -0,0 +1,3 @@ +#!/bin/bash + +exec omarchy-launch-or-focus-tui "bash -c 'fastfetch; read -n 1 -s'" diff --git a/bin/omarchy-launch-bluetooth b/bin/omarchy-launch-bluetooth new file mode 100755 index 0000000000..8eb823b7e6 --- /dev/null +++ b/bin/omarchy-launch-bluetooth @@ -0,0 +1,4 @@ +#!/bin/bash + +rfkill unblock bluetooth +exec omarchy-launch-or-focus-tui bluetui diff --git a/bin/omarchy-launch-browser b/bin/omarchy-launch-browser index 86904afaff..d6ae00cb10 100755 --- a/bin/omarchy-launch-browser +++ b/bin/omarchy-launch-browser @@ -1,3 +1,12 @@ #!/bin/bash -exec setsid uwsm app -- $(sed -n 's/^Exec=\([^ ]*\).*/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$(xdg-settings get default-web-browser) 2>/dev/null | head -1) ${args[@]} $@ +default_browser=$(xdg-settings get default-web-browser) +browser_exec=$(sed -n 's/^Exec=\([^ ]*\).*/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$default_browser 2>/dev/null | head -1) + +if [[ $browser_exec =~ (firefox|zen|librewolf) ]]; then + private_flag="--private-window" +else + private_flag="--incognito" +fi + +exec setsid uwsm-app -- "$browser_exec" "${@/--private/$private_flag}" diff --git a/bin/omarchy-launch-editor b/bin/omarchy-launch-editor new file mode 100755 index 0000000000..7597cfccb2 --- /dev/null +++ b/bin/omarchy-launch-editor @@ -0,0 +1,12 @@ +#!/bin/bash + +omarchy-cmd-present "$EDITOR" || EDITOR=nvim + +case "$EDITOR" in +nvim | vim | nano | micro | hx | helix) + exec omarchy-launch-tui "$EDITOR" "$@" + ;; +*) + exec setsid uwsm-app -- "$EDITOR" "$@" + ;; +esac diff --git a/bin/omarchy-launch-floating-terminal-with-presentation b/bin/omarchy-launch-floating-terminal-with-presentation index ecba263783..cc779efdf4 100755 --- a/bin/omarchy-launch-floating-terminal-with-presentation +++ b/bin/omarchy-launch-floating-terminal-with-presentation @@ -1,4 +1,4 @@ #!/bin/bash cmd="$*" -setsid alacritty --class Omarchy -e bash -c "omarchy-show-logo; $cmd; omarchy-show-done" +exec setsid uwsm-app -- xdg-terminal-exec --app-id=org.omarchy.terminal --title=Omarchy -e bash -c "omarchy-show-logo; $cmd; omarchy-show-done" diff --git a/bin/omarchy-launch-or-focus b/bin/omarchy-launch-or-focus new file mode 100755 index 0000000000..ce932fb718 --- /dev/null +++ b/bin/omarchy-launch-or-focus @@ -0,0 +1,16 @@ +#!/bin/bash + +if (($# == 0)); then + echo "Usage: omarchy-launch-or-focus [window-pattern] [launch-command]" + exit 1 +fi + +WINDOW_PATTERN="$1" +LAUNCH_COMMAND="${2:-"uwsm-app -- $WINDOW_PATTERN"}" +WINDOW_ADDRESS=$(hyprctl clients -j | jq -r --arg p "$WINDOW_PATTERN" '.[]|select((.class|test("\\b" + $p + "\\b";"i")) or (.title|test("\\b" + $p + "\\b";"i")))|.address' | head -n1) + +if [[ -n $WINDOW_ADDRESS ]]; then + hyprctl dispatch focuswindow "address:$WINDOW_ADDRESS" +else + eval exec setsid $LAUNCH_COMMAND +fi diff --git a/bin/omarchy-launch-or-focus-tui b/bin/omarchy-launch-or-focus-tui new file mode 100755 index 0000000000..8c9cdfcc0e --- /dev/null +++ b/bin/omarchy-launch-or-focus-tui @@ -0,0 +1,6 @@ +#!/bin/bash + +APP_ID="org.omarchy.$(basename $1)" +LAUNCH_COMMAND="omarchy-launch-tui $@" + +exec omarchy-launch-or-focus "$APP_ID" "$LAUNCH_COMMAND" diff --git a/bin/omarchy-launch-or-focus-webapp b/bin/omarchy-launch-or-focus-webapp new file mode 100755 index 0000000000..aa56db7359 --- /dev/null +++ b/bin/omarchy-launch-or-focus-webapp @@ -0,0 +1,12 @@ +#!/bin/bash + +if (($# == 0)); then + echo "Usage: omarchy-launch-or-focus-webapp [window-pattern] [url-and-flags...]" + exit 1 +fi + +WINDOW_PATTERN="$1" +shift +LAUNCH_COMMAND="omarchy-launch-webapp $@" + +exec omarchy-launch-or-focus "$WINDOW_PATTERN" "$LAUNCH_COMMAND" \ No newline at end of file diff --git a/bin/omarchy-launch-screensaver b/bin/omarchy-launch-screensaver index eebef0c522..6fa5b2c468 100755 --- a/bin/omarchy-launch-screensaver +++ b/bin/omarchy-launch-screensaver @@ -6,7 +6,7 @@ if ! command -v tte &>/dev/null; then fi # Exit early if screensave is already running -pgrep -f "alacritty --class Screensaver" && exit 0 +pgrep -f org.omarchy.screensaver && exit 0 # Allow screensaver to be turned off but also force started if [[ -f ~/.local/state/omarchy/toggles/screensaver-off ]] && [[ $1 != "force" ]]; then @@ -14,13 +14,36 @@ if [[ -f ~/.local/state/omarchy/toggles/screensaver-off ]] && [[ $1 != "force" ] fi focused=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name') +terminal=$(xdg-terminal-exec --print-id) for m in $(hyprctl monitors -j | jq -r '.[] | .name'); do hyprctl dispatch focusmonitor $m - hyprctl dispatch exec -- \ - alacritty --class Screensaver \ - --config-file ~/.local/share/omarchy/default/alacritty/screensaver.toml \ - -e omarchy-cmd-screensaver + + case $terminal in + *Alacritty*) + hyprctl dispatch exec -- \ + alacritty --class=org.omarchy.screensaver \ + --config-file ~/.local/share/omarchy/default/alacritty/screensaver.toml \ + -e omarchy-cmd-screensaver + ;; + *ghostty*) + hyprctl dispatch exec -- \ + ghostty --class=org.omarchy.screensaver \ + --config-file=~/.local/share/omarchy/default/ghostty/screensaver \ + --font-size=18 \ + -e omarchy-cmd-screensaver + ;; + *kitty*) + hyprctl dispatch exec -- \ + kitty --class=org.omarchy.screensaver \ + --override font_size=18 \ + --override window_padding_width=0 \ + -e omarchy-cmd-screensaver + ;; + *) + notify-send "✋ Screensaver only runs in Alacritty, Ghostty, or Kitty" + ;; + esac done hyprctl dispatch focusmonitor $focused diff --git a/bin/omarchy-launch-tui b/bin/omarchy-launch-tui new file mode 100755 index 0000000000..67440b2bad --- /dev/null +++ b/bin/omarchy-launch-tui @@ -0,0 +1,3 @@ +#!/bin/bash + +exec setsid uwsm-app -- xdg-terminal-exec --app-id=org.omarchy.$(basename $1) -e "$1" "${@:2}" diff --git a/bin/omarchy-launch-walker b/bin/omarchy-launch-walker new file mode 100755 index 0000000000..805da5c170 --- /dev/null +++ b/bin/omarchy-launch-walker @@ -0,0 +1,13 @@ +#!/bin/bash + +# Ensure elephant is running before launching walker +if ! pgrep -x elephant > /dev/null; then + setsid uwsm-app -- elephant & +fi + +# Ensure walker service is running +if ! pgrep -f "walker --gapplication-service" > /dev/null; then + setsid uwsm-app -- walker --gapplication-service & +fi + +exec walker --width 644 --maxheight 300 --minheight 300 "$@" diff --git a/bin/omarchy-launch-webapp b/bin/omarchy-launch-webapp index 0276d9666e..09a6fc3039 100755 --- a/bin/omarchy-launch-webapp +++ b/bin/omarchy-launch-webapp @@ -3,8 +3,8 @@ browser=$(xdg-settings get default-web-browser) case $browser in -google-chrome* | brave-browser* | microsoft-edge* | opera* | vivaldi*) ;; +google-chrome* | brave-browser* | microsoft-edge* | opera* | vivaldi* | helium*) ;; *) browser="chromium.desktop" ;; esac -exec setsid uwsm app -- $(sed -n 's/^Exec=\([^ ]*\).*/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$browser 2>/dev/null | head -1) --app="$1" "${@:2}" +exec setsid uwsm-app -- $(sed -n 's/^Exec=\([^ ]*\).*/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$browser 2>/dev/null | head -1) --app="$1" "${@:2}" diff --git a/bin/omarchy-launch-wifi b/bin/omarchy-launch-wifi new file mode 100755 index 0000000000..d942f6806e --- /dev/null +++ b/bin/omarchy-launch-wifi @@ -0,0 +1,4 @@ +#!/bin/bash + +rfkill unblock wifi +omarchy-launch-or-focus-tui impala diff --git a/bin/omarchy-lock-screen b/bin/omarchy-lock-screen index d3f6276d1e..b16c56a209 100755 --- a/bin/omarchy-lock-screen +++ b/bin/omarchy-lock-screen @@ -3,10 +3,13 @@ # Lock the screen pidof hyprlock || hyprlock & +# Set keyboard layout to default (first layout) +hyprctl switchxkblayout all 0 > /dev/null 2>&1 + # Ensure 1password is locked if pgrep -x "1password" >/dev/null; then 1password --lock & fi # Avoid running screensaver when locked -pkill -f "alacritty --class Screensaver" +pkill -f org.omarchy.screensaver diff --git a/bin/omarchy-menu b/bin/omarchy-menu index 1b2bbfa441..b80d617859 100755 --- a/bin/omarchy-menu +++ b/bin/omarchy-menu @@ -2,6 +2,21 @@ export PATH="$HOME/.local/share/omarchy/bin:$PATH" +# Set to true when going directly to a submenu, so we can exit directly +BACK_TO_EXIT=false + +back_to() { + local parent_menu="$1" + + if [[ "$BACK_TO_EXIT" == "true" ]]; then + exit 0 + elif [[ -n "$parent_menu" ]]; then + "$parent_menu" + else + show_main_menu + fi +} + menu() { local prompt="$1" local options="$2" @@ -14,24 +29,24 @@ menu() { local index index=$(echo -e "$options" | grep -nxF "$preselect" | cut -d: -f1) if [[ -n "$index" ]]; then - args+=("-a" "$index") + args+=("-c" "$index") fi fi - echo -e "$options" | walker --dmenu --theme dmenu_250 -p "$prompt…" "${args[@]}" + echo -e "$options" | omarchy-launch-walker --dmenu --width 295 --minheight 1 --maxheight 630 -p "$prompt…" "${args[@]}" 2>/dev/null } terminal() { - alacritty --class Omarchy -e "$@" + xdg-terminal-exec --app-id=org.omarchy.terminal "$@" } present_terminal() { omarchy-launch-floating-terminal-with-presentation $1 } -edit_in_nvim() { +open_in_editor() { notify-send "Editing config file" "$1" - alacritty -e nvim "$1" + omarchy-launch-editor "$1" } install() { @@ -46,6 +61,10 @@ install_font() { present_terminal "echo 'Installing $1...'; sudo pacman -S --noconfirm --needed $2 && sleep 2 && omarchy-font-set '$3'" } +install_terminal() { + present_terminal "omarchy-install-terminal $1" +} + aur_install() { present_terminal "echo 'Installing $1 from AUR...'; yay -S --noconfirm $2" } @@ -66,58 +85,49 @@ show_learn_menu() { esac } -show_style_menu() { - case $(menu "Style" "󰸌 Theme\n Font\n Background\n󱄄 Screensaver\n About") in - *Theme*) show_theme_menu ;; - *Font*) show_font_menu ;; - *Background*) omarchy-theme-bg-next ;; - *Screensaver*) edit_in_nvim ~/.config/omarchy/branding/screensaver.txt ;; - *About*) edit_in_nvim ~/.config/omarchy/branding/about.txt ;; +show_trigger_menu() { + case $(menu "Trigger" " Capture\n Share\n󰔎 Toggle") in + *Capture*) show_capture_menu ;; + *Share*) show_share_menu ;; + *Toggle*) show_toggle_menu ;; *) show_main_menu ;; esac } -show_theme_menu() { - theme=$(menu "Theme" "$(omarchy-theme-list)" "" "$(omarchy-theme-current)") - if [[ "$theme" == "CNCLD" || -z "$theme" ]]; then - show_main_menu - else - omarchy-theme-set "$theme" - fi -} - -show_font_menu() { - theme=$(menu "Font" "$(omarchy-font-list)" "-w 350" "$(omarchy-font-current)") - if [[ "$theme" == "CNCLD" || -z "$theme" ]]; then - show_main_menu - else - omarchy-font-set "$theme" - fi -} - show_capture_menu() { case $(menu "Capture" " Screenshot\n Screenrecord\n󰃉 Color") in *Screenshot*) show_screenshot_menu ;; *Screenrecord*) show_screenrecord_menu ;; *Color*) pkill hyprpicker || hyprpicker -a ;; - *) show_main_menu ;; + *) show_trigger_menu ;; esac } show_screenshot_menu() { - case $(menu "Screenshot" " Region\n Window\n Display") in - *Region*) omarchy-cmd-screenshot ;; - *Window*) omarchy-cmd-screenshot window ;; - *Display*) omarchy-cmd-screenshot output ;; + case $(menu "Screenshot" " Snap with Editing\n Straight to Clipboard") in + *Editing*) omarchy-cmd-screenshot smart ;; + *Clipboard*) omarchy-cmd-screenshot smart clipboard ;; *) show_capture_menu ;; esac } show_screenrecord_menu() { - case $(menu "Screenrecord" " Region\n Display") in - *Region*) omarchy-cmd-screenrecord ;; - *Display*) omarchy-cmd-screenrecord output ;; - *) show_capture_menu ;; + omarchy-cmd-screenrecord --stop-recording && exit 0 + + case $(menu "Screenrecord" " With desktop audio\n With desktop + microphone audio\n With desktop + microphone audio + webcam") in + *"With desktop audio") omarchy-cmd-screenrecord --with-desktop-audio ;; + *"With desktop + microphone audio") omarchy-cmd-screenrecord --with-desktop-audio --with-microphone-audio ;; + *"With desktop + microphone audio + webcam") omarchy-cmd-screenrecord --with-desktop-audio --with-microphone-audio --with-webcam ;; + *) back_to show_capture_menu ;; + esac +} + +show_share_menu() { + case $(menu "Share" " Clipboard\n File \n Folder") in + *Clipboard*) omarchy-cmd-share clipboard ;; + *File*) terminal bash -c "omarchy-cmd-share file" ;; + *Folder*) terminal bash -c "omarchy-cmd-share folder" ;; + *) back_to show_trigger_menu ;; esac } @@ -127,34 +137,53 @@ show_toggle_menu() { *Nightlight*) omarchy-toggle-nightlight ;; *Idle*) omarchy-toggle-idle ;; *Bar*) omarchy-toggle-waybar ;; + *) show_trigger_menu ;; + esac +} + +show_style_menu() { + case $(menu "Style" "󰸌 Theme\n Font\n Background\n Hyprland\n󱄄 Screensaver\n About") in + *Theme*) show_theme_menu ;; + *Font*) show_font_menu ;; + *Background*) omarchy-theme-bg-next ;; + *Hyprland*) open_in_editor ~/.config/hypr/looknfeel.conf ;; + *Screensaver*) open_in_editor ~/.config/omarchy/branding/screensaver.txt ;; + *About*) open_in_editor ~/.config/omarchy/branding/about.txt ;; *) show_main_menu ;; esac } +show_theme_menu() { + omarchy-launch-walker -m menus:omarchythemes --width 800 --minheight 400 +} + +show_font_menu() { + theme=$(menu "Font" "$(omarchy-font-list)" "--width 350" "$(omarchy-font-current)") + if [[ "$theme" == "CNCLD" || -z "$theme" ]]; then + back_to show_style_menu + else + omarchy-font-set "$theme" + fi +} + show_setup_menu() { local options=" Audio\n Wifi\n󰂯 Bluetooth\n󱐋 Power Profile\n󰍹 Monitors" [ -f ~/.config/hypr/bindings.conf ] && options="$options\n Keybindings" [ -f ~/.config/hypr/input.conf ] && options="$options\n Input" - options="$options\n󰱔 DNS\n Config\n󰈷 Fingerprint\n Fido2" + options="$options\n Defaults\n󰱔 DNS\n Security\n Config" case $(menu "Setup" "$options") in - *Audio*) alacritty --class=Wiremix -e wiremix ;; - *Wifi*) - rfkill unblock wifi - alacritty --class=Impala -e impala - ;; - *Bluetooth*) - rfkill unblock bluetooth - blueberry - ;; + *Audio*) omarchy-launch-or-focus-tui wiremix ;; + *Wifi*) omarchy-launch-wifi ;; + *Bluetooth*) omarchy-launch-bluetooth ;; *Power*) show_setup_power_menu ;; - *Monitors*) edit_in_nvim ~/.config/hypr/monitors.conf ;; - *Keybindings*) edit_in_nvim ~/.config/hypr/bindings.conf ;; - *Input*) edit_in_nvim ~/.config/hypr/input.conf ;; + *Monitors*) open_in_editor ~/.config/hypr/monitors.conf ;; + *Keybindings*) open_in_editor ~/.config/hypr/bindings.conf ;; + *Input*) open_in_editor ~/.config/hypr/input.conf ;; + *Defaults*) open_in_editor ~/.config/uwsm/default ;; *DNS*) present_terminal omarchy-setup-dns ;; + *Security*) show_setup_security_menu ;; *Config*) show_setup_config_menu ;; - *Fingerprint*) present_terminal omarchy-setup-fingerprint ;; - *Fido2*) present_terminal omarchy-setup-fido2 ;; *) show_main_menu ;; esac } @@ -163,7 +192,7 @@ show_setup_power_menu() { profile=$(menu "Power Profile" "$(omarchy-powerprofiles-list)" "" "$(powerprofilesctl get)") if [[ "$profile" == "CNCLD" || -z "$profile" ]]; then - show_main_menu + back_to show_setup_menu else powerprofilesctl set "$profile" fi @@ -171,20 +200,28 @@ show_setup_power_menu() { show_setup_config_menu() { case $(menu "Setup" " Hyprland\n Hypridle\n Hyprlock\n Hyprsunset\n Swayosd\n󰌧 Walker\n󰍜 Waybar\n󰞅 XCompose") in - *Hyprland*) edit_in_nvim ~/.config/hypr/hyprland.conf ;; - *Hypridle*) edit_in_nvim ~/.config/hypr/hypridle.conf && omarchy-restart-hypridle ;; - *Hyprlock*) edit_in_nvim ~/.config/hypr/hyprlock.conf ;; - *Hyprsunset*) edit_in_nvim ~/.config/hypr/hyprsunset.conf && omarchy-restart-hyprsunset ;; - *Swayosd*) edit_in_nvim ~/.config/swayosd/config.toml && omarchy-restart-swayosd ;; - *Walker*) edit_in_nvim ~/.config/walker/config.toml && omarchy-restart-walker ;; - *Waybar*) edit_in_nvim ~/.config/waybar/config.jsonc && omarchy-restart-waybar ;; - *XCompose*) edit_in_nvim ~/.XCompose && omarchy-restart-xcompose ;; + *Hyprland*) open_in_editor ~/.config/hypr/hyprland.conf ;; + *Hypridle*) open_in_editor ~/.config/hypr/hypridle.conf && omarchy-restart-hypridle ;; + *Hyprlock*) open_in_editor ~/.config/hypr/hyprlock.conf ;; + *Hyprsunset*) open_in_editor ~/.config/hypr/hyprsunset.conf && omarchy-restart-hyprsunset ;; + *Swayosd*) open_in_editor ~/.config/swayosd/config.toml && omarchy-restart-swayosd ;; + *Walker*) open_in_editor ~/.config/walker/config.toml && omarchy-restart-walker ;; + *Waybar*) open_in_editor ~/.config/waybar/config.jsonc && omarchy-restart-waybar ;; + *XCompose*) open_in_editor ~/.XCompose && omarchy-restart-xcompose ;; *) show_main_menu ;; esac } +show_setup_security_menu() { + case $(menu "Setup" "󰈷 Fingerprint\n Fido2") in + *Fingerprint*) present_terminal omarchy-setup-fingerprint ;; + *Fido2*) present_terminal omarchy-setup-fido2 ;; + *) show_setup_menu ;; + esac +} + show_install_menu() { - case $(menu "Install" "󰣇 Package\n󰣇 AUR\n Web App\n TUI\n Service\n Style\n󰵮 Development\n Editor\n󱚤 AI\n Gaming") in + case $(menu "Install" "󰣇 Package\n󰣇 AUR\n Web App\n TUI\n Service\n Style\n󰵮 Development\n Editor\n Terminal\n󱚤 AI\n󰍲 Windows\n Gaming") in *Package*) terminal omarchy-pkg-install ;; *AUR*) terminal omarchy-pkg-aur-install ;; *Web*) present_terminal omarchy-webapp-install ;; @@ -193,48 +230,71 @@ show_install_menu() { *Style*) show_install_style_menu ;; *Development*) show_install_development_menu ;; *Editor*) show_install_editor_menu ;; + *Terminal*) show_install_terminal_menu ;; *AI*) show_install_ai_menu ;; + *Windows*) present_terminal "omarchy-windows-vm install" ;; *Gaming*) show_install_gaming_menu ;; *) show_main_menu ;; esac } show_install_service_menu() { - case $(menu "Install" " Dropbox\n Tailscale") in + case $(menu "Install" " Dropbox\n Tailscale\n󰟵 Bitwarden\n Chromium Account") in *Dropbox*) present_terminal omarchy-install-dropbox ;; *Tailscale*) present_terminal omarchy-install-tailscale ;; + *Bitwarden*) install_and_launch "Bitwarden" "bitwarden bitwarden-cli" "bitwarden" ;; + *Chromium*) present_terminal omarchy-install-chromium-google-account ;; *) show_install_menu ;; esac } show_install_editor_menu() { - case $(menu "Install" " VSCode\n Cursor [AUR]\n Zed\n Sublime Text\n Helix") in - *VSCode*) install_and_launch "VSCode" "visual-studio-code-bin" "code" ;; - *Cursor*) aur_install_and_launch "Cursor" "cursor-bin" "cursor" ;; - *Zed*) install_and_launch "Zed" "zed" "dev.zed.Zed" ;; + case $(menu "Install" " VSCode\n Cursor\n Zed\n Sublime Text\n Helix\n Emacs") in + *VSCode*) present_terminal omarchy-install-vscode ;; + *Cursor*) install_and_launch "Cursor" "cursor-bin" "cursor" ;; + *Zed*) present_terminal "echo 'Installing Zed...'; sudo pacman -S zed && setsid gtk-launch dev.zed.Zed" ;; *Sublime*) install_and_launch "Sublime Text" "sublime-text-4" "sublime_text" ;; *Helix*) install "Helix" "helix" ;; + *Emacs*) install "Emacs" "emacs-wayland" && systemctl --user enable --now emacs.service ;; + *) show_install_menu ;; + esac +} + +show_install_terminal_menu() { + case $(menu "Install" " Alacritty\n Ghostty\n Kitty") in + *Alacritty*) install_terminal "alacritty" ;; + *Ghostty*) install_terminal "ghostty" ;; + *Kitty*) install_terminal "kitty" ;; *) show_install_menu ;; esac } show_install_ai_menu() { - case $(menu "Install" "󱚤 Claude Code [AUR]\n󱚤 Gemini\n󱚤 LM Studio [AUR]\n󱚤 Ollama\n󱚤 Crush [AUR]\n󱚤 opencode [AUR]") in - *Claude*) aur_install "Claude Code" "claude-code" ;; + ollama_pkg=$( + (command -v nvidia-smi &>/dev/null && echo ollama-cuda) || + (command -v rocminfo &>/dev/null && echo ollama-rocm) || + echo ollama + ) + + case $(menu "Install" "󱚤 Claude Code\n󱚤 Cursor CLI\n󱚤 Gemini\n󱚤 OpenAI Codex\n󱚤 LM Studio\n󱚤 Ollama\n󱚤 Crush\n󱚤 opencode") in + *Claude*) install "Claude Code" "claude-code" ;; + *Cursor*) install "Cursor CLI" "cursor-cli" ;; + *OpenAI*) install "OpenAI Codex" "openai-codex-bin" ;; *Gemini*) install "Gemini" "gemini-cli" ;; - *Studio*) aur_install "LM Studio" "lmstudio" ;; - *Ollama*) install "Ollama" "ollama" ;; - *Crush*) aur_install "Crush" "crush-bin" ;; - *opencode*) aur_install "opencode" "opencode-bin" ;; + *Studio*) install "LM Studio" "lmstudio" ;; + *Ollama*) install "Ollama" $ollama_pkg ;; + *Crush*) install "Crush" "crush-bin" ;; + *opencode*) install "opencode" "opencode" ;; *) show_install_menu ;; esac } show_install_gaming_menu() { - case $(menu "Install" " Steam\n RetroArch [AUR]\n󰍳 Minecraft") in + case $(menu "Install" " Steam\n RetroArch [AUR]\n󰍳 Minecraft\n󰖺 Xbox Controller [AUR]") in *Steam*) present_terminal omarchy-install-steam ;; *RetroArch*) aur_install_and_launch "RetroArch" "retroarch retroarch-assets libretro libretro-fbneo" "com.libretro.RetroArch.desktop" ;; *Minecraft*) install_and_launch "Minecraft" "minecraft-launcher" "minecraft-launcher" ;; + *Xbox*) present_terminal omarchy-install-xbox-controllers ;; *) show_install_menu ;; esac } @@ -249,7 +309,7 @@ show_install_style_menu() { } show_install_font_menu() { - case $(menu "Install" " Meslo LG Mono\n Fira Code\n Victor Code\n Bistream Vera Mono" "-w 350") in + case $(menu "Install" " Meslo LG Mono\n Fira Code\n Victor Code\n Bistream Vera Mono" "--width 350") in *Meslo*) install_font "Meslo LG Mono" "ttf-meslo-nerd" "MesloLGL Nerd Font" ;; *Fira*) install_font "Fira Code" "ttf-firacode-nerd" "FiraCode Nerd Font" ;; *Victor*) install_font "Victor Code" "ttf-victor-mono-nerd" "VictorMono Nerd Font" ;; @@ -259,7 +319,7 @@ show_install_font_menu() { } show_install_development_menu() { - case $(menu "Install" "󰫏 Ruby on Rails\n Docker DB\n JavaScript\n Go\n PHP\n Python\n Elixir\n Zig\n Rust\n Java\n .NET\n OCaml") in + case $(menu "Install" "󰫏 Ruby on Rails\n Docker DB\n JavaScript\n Go\n PHP\n Python\n Elixir\n Zig\n Rust\n Java\n .NET\n OCaml\n Clojure") in *Rails*) present_terminal "omarchy-install-dev-env ruby" ;; *Docker*) present_terminal omarchy-install-docker-dbs ;; *JavaScript*) show_install_javascript_menu ;; @@ -272,6 +332,7 @@ show_install_development_menu() { *Java*) present_terminal "omarchy-install-dev-env java" ;; *NET*) present_terminal "omarchy-install-dev-env dotnet" ;; *OCaml*) present_terminal "omarchy-install-dev-env ocaml" ;; + *Clojure*) present_terminal "omarchy-install-dev-env clojure" ;; *) show_install_menu ;; esac } @@ -303,11 +364,12 @@ show_install_elixir_menu() { } show_remove_menu() { - case $(menu "Remove" "󰣇 Package\n Web App\n TUI\n󰸌 Theme\n󰈷 Fingerprint\n Fido2") in + case $(menu "Remove" "󰣇 Package\n Web App\n TUI\n󰸌 Theme\n󰍲 Windows\n󰈷 Fingerprint\n Fido2") in *Package*) terminal omarchy-pkg-remove ;; *Web*) present_terminal omarchy-webapp-remove ;; *TUI*) present_terminal omarchy-tui-remove ;; *Theme*) present_terminal omarchy-theme-remove ;; + *Windows*) present_terminal "omarchy-windows-vm remove" ;; *Fingerprint*) present_terminal "omarchy-setup-fingerprint --remove" ;; *Fido2*) present_terminal "omarchy-setup-fido2 --remove" ;; *) show_main_menu ;; @@ -315,12 +377,16 @@ show_remove_menu() { } show_update_menu() { - case $(menu "Update" " Omarchy\n Config\n󰸌 Themes\n Process\n Timezone") in + case $(menu "Update" " Omarchy\n Config\n󰸌 Extra Themes\n Process\n󰇅 Hardware\n Firmware\n Password\n Timezone\n Time") in *Omarchy*) present_terminal omarchy-update ;; *Config*) show_update_config_menu ;; *Themes*) present_terminal omarchy-theme-update ;; *Process*) show_update_process_menu ;; - *Timezone*) omarchy-cmd-tzupdate ;; + *Hardware*) show_update_hardware_menu ;; + *Firmware*) present_terminal omarchy-update-firmware ;; + *Timezone*) present_terminal omarchy-tz-select ;; + *Time*) present_terminal omarchy-update-time ;; + *Password*) show_update_password_menu ;; *) show_main_menu ;; esac } @@ -332,7 +398,7 @@ show_update_process_menu() { *Swayosd*) omarchy-restart-swayosd ;; *Walker*) omarchy-restart-walker ;; *Waybar*) omarchy-restart-waybar ;; - *) show_main_menu ;; + *) show_update_menu ;; esac } @@ -346,47 +412,64 @@ show_update_config_menu() { *Swayosd*) present_terminal omarchy-refresh-swayosd ;; *Walker*) present_terminal omarchy-refresh-walker ;; *Waybar*) present_terminal omarchy-refresh-waybar ;; - *) show_main_menu ;; + *) show_update_menu ;; + esac +} + +show_update_hardware_menu() { + case $(menu "Restart" " Audio\n󱚾 Wi-Fi\n󰂯 Bluetooth") in + *Audio*) present_terminal omarchy-restart-pipewire ;; + *Wi-Fi*) present_terminal omarchy-restart-wifi ;; + *Bluetooth*) present_terminal omarchy-restart-bluetooth ;; + *) show_update_menu ;; + esac +} + +show_update_password_menu() { + case $(menu "Update Password" " Drive Encryption\n User") in + *Drive*) present_terminal omarchy-drive-set-password ;; + *User*) present_terminal passwd ;; + *) show_update_menu ;; esac } show_system_menu() { - case $(menu "System" " Lock\n󱄄 Screensaver\n󰤄 Suspend\n Relaunch\n󰜉 Restart\n󰐥 Shutdown") in + case $(menu "System" " Lock\n󱄄 Screensaver\n󰤄 Suspend\n󰜉 Restart\n󰐥 Shutdown") in *Lock*) omarchy-lock-screen ;; *Screensaver*) omarchy-launch-screensaver force ;; *Suspend*) systemctl suspend ;; - *Relaunch*) uwsm stop ;; - *Restart*) systemctl reboot ;; - *Shutdown*) systemctl poweroff ;; - *) show_main_menu ;; + *Restart*) omarchy-cmd-reboot ;; + *Shutdown*) omarchy-cmd-shutdown ;; + *) back_to show_main_menu ;; esac } show_main_menu() { - go_to_menu "$(menu "Go" "󰀻 Apps\n󰧑 Learn\n Capture\n󰔎 Toggle\n Style\n Setup\n󰉉 Install\n󰭌 Remove\n Update\n About\n System")" + go_to_menu "$(menu "Go" "󰀻 Apps\n󰧑 Learn\n󱓞 Trigger\n Style\n Setup\n󰉉 Install\n󰭌 Remove\n Update\n About\n System")" } go_to_menu() { case "${1,,}" in *apps*) walker -p "Launch…" ;; *learn*) show_learn_menu ;; + *trigger*) show_trigger_menu ;; + *share*) show_share_menu ;; *style*) show_style_menu ;; *theme*) show_theme_menu ;; - *capture*) show_capture_menu ;; *screenshot*) show_screenshot_menu ;; *screenrecord*) show_screenrecord_menu ;; - *toggle*) show_toggle_menu ;; *setup*) show_setup_menu ;; *power*) show_setup_power_menu ;; *install*) show_install_menu ;; *remove*) show_remove_menu ;; *update*) show_update_menu ;; - *about*) alacritty --class Omarchy -o font.size=9 -e bash -c 'fastfetch; read -n 1 -s' ;; + *about*) omarchy-launch-about ;; *system*) show_system_menu ;; esac } if [[ -n "$1" ]]; then + BACK_TO_EXIT=true go_to_menu "$1" else show_main_menu diff --git a/bin/omarchy-menu-keybindings b/bin/omarchy-menu-keybindings index 99a49c15ab..39a9e0b6d8 100755 --- a/bin/omarchy-menu-keybindings +++ b/bin/omarchy-menu-keybindings @@ -3,6 +3,80 @@ # A script to display Hyprland keybindings defined in your configuration # using walker for an interactive search menu. +declare -A KEYCODE_SYM_MAP + +build_keymap_cache() { + local keymap + keymap="$(xkbcli compile-keymap)" || { + echo "Failed to compile keymap" >&2 + return 1 + } + + while IFS=, read -r code sym; do + [[ -z "$code" || -z "$sym" ]] && continue + KEYCODE_SYM_MAP["$code"]="$sym" + done < <( + awk ' + BEGIN { sec = "" } + /xkb_keycodes/ { sec = "codes"; next } + /xkb_symbols/ { sec = "syms"; next } + sec == "codes" { + if (match($0, /<([A-Za-z0-9_]+)>\s*=\s*([0-9]+)\s*;/, m)) code_by_name[m[1]] = m[2] + } + sec == "syms" { + if (match($0, /key\s*<([A-Za-z0-9_]+)>\s*\{\s*\[\s*([^, \]]+)/, m)) sym_by_name[m[1]] = m[2] + } + END { + for (k in code_by_name) { + c = code_by_name[k] + s = sym_by_name[k] + if (c != "" && s != "" && s != "NoSymbol") print c "," s + } + } + ' <<<"$keymap" + ) +} + +lookup_keycode_cached() { + printf '%s\n' "${KEYCODE_SYM_MAP[$1]}" +} + +parse_keycodes() { + local start end elapsed + [[ "${DEBUG:-0}" == "1" ]] && start=$(date +%s.%N) + while IFS= read -r line; do + if [[ "$line" =~ code:([0-9]+) ]]; then + code="${BASH_REMATCH[1]}" + symbol=$(lookup_keycode_cached "$code" "$XKB_KEYMAP_CACHE") + echo "${line/code:${code}/$symbol}" + elif [[ "$line" =~ mouse:([0-9]+) ]]; then + code="${BASH_REMATCH[1]}" + + case "$code" in + 272) symbol="LEFT MOUSE BUTTON" ;; + 273) symbol="RIGHT MOUSE BUTTON" ;; + 274) symbol="MIDDLE MOUSE BUTTON" ;; + *) symbol="mouse:${code}" ;; + esac + + echo "${line/mouse:${code}/$symbol}" + else + echo "$line" + fi + done + + if [[ "$DEBUG" == "1" ]]; then + end=$(date +%s.%N) + # fall back to awk if bc is missing + if command -v bc >/dev/null 2>&1; then + elapsed=$(echo "$end - $start" | bc) + else + elapsed=$(awk -v s="$start" -v e="$end" 'BEGIN{printf "%.6f", (e - s)}') + fi + echo "[DEBUG] parse_keycodes elapsed: ${elapsed}s" >&2 + fi +} + # Fetch dynamic keybindings from Hyprland # # Also do some pre-processing: @@ -11,30 +85,36 @@ # - Map numeric modifier key mask to a textual rendition # - Output comma-separated values that the parser can understand dynamic_bindings() { - hyprctl -j binds | \ - jq -r '.[] | {modmask, key, keycode, description, dispatcher, arg} | "\(.modmask),\(.key)@\(.keycode),\(.description),\(.dispatcher),\(.arg)"' | \ + hyprctl -j binds | + jq -r '.[] | {modmask, key, keycode, description, dispatcher, arg} | "\(.modmask),\(.key)@\(.keycode),\(.description),\(.dispatcher),\(.arg)"' | sed -r \ - -e 's/null//' \ - -e 's,~/.local/share/omarchy/bin/,,' \ - -e 's,uwsm app -- ,,' \ - -e 's/@0//' \ - -e 's/,@/,code:/' \ - -e 's/^0,/,/' \ - -e 's/^1,/SHIFT,/' \ - -e 's/^4,/CTRL,/' \ - -e 's/^5,/SHIFT CTRL,/' \ - -e 's/^8,/ALT,/' \ - -e 's/^9,/SHIFT ALT,/' \ - -e 's/^12,/CTRL ALT,/' \ - -e 's/^13,/SHIFT CTRL ALT,/' \ - -e 's/^64,/SUPER,/' \ - -e 's/^65,/SUPER SHIFT,/' \ - -e 's/^68,/SUPER CTRL,/' \ - -e 's/^69,/SUPER SHIFT CTRL,/' \ - -e 's/^72,/SUPER ALT,/' \ - -e 's/^73,/SUPER SHIFT ALT,/' \ - -e 's/^76,/SUPER CTRL ALT,/' \ - -e 's/^77,/SUPER SHIFT CTRL ALT,/' + -e 's/null//' \ + -e 's,~/.local/share/omarchy/bin/,,' \ + -e 's,uwsm app -- ,,' \ + -e 's,uwsm-app -- ,,' \ + -e 's/@0//' \ + -e 's/,@/,code:/' \ + -e 's/^0,/,/' \ + -e 's/^1,/SHIFT,/' \ + -e 's/^4,/CTRL,/' \ + -e 's/^5,/SHIFT CTRL,/' \ + -e 's/^8,/ALT,/' \ + -e 's/^9,/SHIFT ALT,/' \ + -e 's/^12,/CTRL ALT,/' \ + -e 's/^13,/SHIFT CTRL ALT,/' \ + -e 's/^64,/SUPER,/' \ + -e 's/^65,/SUPER SHIFT,/' \ + -e 's/^68,/SUPER CTRL,/' \ + -e 's/^69,/SUPER SHIFT CTRL,/' \ + -e 's/^72,/SUPER ALT,/' \ + -e 's/^73,/SUPER SHIFT ALT,/' \ + -e 's/^76,/SUPER CTRL ALT,/' \ + -e 's/^77,/SUPER SHIFT CTRL ALT,/' +} + +# Hardcoded bindings, like the copy-url extension and such +static_bindings() { + echo "SHIFT ALT,L,Copy URL from Web App,extension,copy-url" } # Parse and format keybindings @@ -83,7 +163,67 @@ parse_bindings() { }' } -dynamic_bindings | \ - sort -u | \ - parse_bindings | \ - walker --dmenu --theme keybindings -p 'Keybindings' +prioritize_entries() { + awk ' + { + line = $0 + prio = 50 + if (match(line, /Terminal/)) prio = 0 + if (match(line, /Browser/) && !match(line, /Browser[[:space:]]*\(/)) prio = 1 + if (match(line, /File manager/)) prio = 2 + if (match(line, /Launch apps/)) prio = 3 + if (match(line, /Omarchy menu/)) prio = 4 + if (match(line, /System menu/)) prio = 5 + if (match(line, /Theme menu/)) prio = 6 + if (match(line, /Full screen/)) prio = 7 + if (match(line, /Close window/)) prio = 8 + if (match(line, /Toggle window floating/)) prio = 9 + if (match(line, /Toggle window split/)) prio = 10 + if (match(line, /Universal/)) prio = 11 + if (match(line, /Clipboard/)) prio = 12 + if (match(line, /Emoji picker/)) prio = 13 + if (match(line, /Color picker/)) prio = 14 + if (match(line, /Screenshot/)) prio = 15 + if (match(line, /Screenrecording/)) prio = 16 + if (match(line, /(Switch|Next|Former|Previous).*workspace/)) prio = 17 + if (match(line, /Move window to workspace/)) prio = 18 + if (match(line, /Swap window/)) prio = 19 + if (match(line, /Move window focus/)) prio = 20 + if (match(line, /Move window$/)) prio = 21 + if (match(line, /Resize window/)) prio = 22 + if (match(line, /Expand window/)) prio = 23 + if (match(line, /Shrink window/)) prio = 24 + if (match(line, /scratchpad/)) prio = 25 + if (match(line, /notification/)) prio = 26 + if (match(line, /Toggle window transparency/)) prio = 27 + if (match(line, /Toggle workspace gaps/)) prio = 28 + if (match(line, /Toggle nightlight/)) prio = 29 + if (match(line, /group/)) prio = 94 + if (match(line, /Scroll active workspace/)) prio = 95 + if (match(line, /Cycle to/)) prio = 96 + if (match(line, /Reveal active/)) prio = 97 + if (match(line, /Apple Display/)) prio = 98 + if (match(line, /XF86/)) prio = 99 + + # print "priorityline" + printf "%d\t%s\n", prio, line + }' | + sort -k1,1n -k2,2 | + cut -f2- +} + +monitor_height=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .height') +menu_height=$((monitor_height * 40 / 100)) + +build_keymap_cache + +{ + dynamic_bindings + static_bindings +} | + sort -u | + parse_keycodes | + parse_bindings | + prioritize_entries | + walker --dmenu -p 'Keybindings' --width 800 --height "$menu_height" + diff --git a/bin/omarchy-migrate b/bin/omarchy-migrate index 00e6556953..45cf1ede98 100755 --- a/bin/omarchy-migrate +++ b/bin/omarchy-migrate @@ -1,18 +1,27 @@ #!/bin/bash -set -e - # Where we store an empty file for each migration that has already been performed. STATE_DIR="$HOME/.local/state/omarchy/migrations" mkdir -p "$STATE_DIR" +# Skipped migrations are tracked separately +mkdir -p "$STATE_DIR/skipped" + # Run any pending migrations for file in ~/.local/share/omarchy/migrations/*.sh; do filename=$(basename "$file") - if [[ ! -f "$STATE_DIR/$filename" ]]; then + if [[ ! -f "$STATE_DIR/$filename" && ! -f "$STATE_DIR/skipped/$filename" ]]; then echo -e "\e[32m\nRunning migration (${filename%.sh})\e[0m" - source $file - touch "$STATE_DIR/$filename" + + if bash $file; then + touch "$STATE_DIR/$filename" + else + if gum confirm "Migration ${filename%.sh} failed. Skip and continue?"; then + touch "$STATE_DIR/skipped/$filename" + else + exit 1 + fi + fi fi done diff --git a/bin/omarchy-notification-dismiss b/bin/omarchy-notification-dismiss new file mode 100755 index 0000000000..ee2a0625ce --- /dev/null +++ b/bin/omarchy-notification-dismiss @@ -0,0 +1,13 @@ +#!/bin/bash + +if (($# == 0)); then + echo "Usage: omarchy-notification-dismiss " + exit 1 +fi + +# Find the first notification whose 'summary' matches the regex in $1 +notification_id=$(makoctl list | grep -F "$1" | head -n1 | sed -E 's/^Notification ([0-9]+):.*/\1/') + +if [[ -n $notification_id ]]; then + makoctl dismiss -n $notification_id +fi diff --git a/bin/omarchy-pkg-add b/bin/omarchy-pkg-add new file mode 100755 index 0000000000..486a2f457a --- /dev/null +++ b/bin/omarchy-pkg-add @@ -0,0 +1,15 @@ +#!/bin/bash + +if omarchy-pkg-missing "$@"; then + sudo pacman -S --noconfirm --needed "$@" || exit 1 +fi + +for pkg in "$@"; do + # Secondary check to handle states where pacman doesn't actually register an error + if ! pacman -Q "$pkg" &>/dev/null; then + echo -e "\033[31mError: Package '$pkg' did not install\033[0m" >&2 + exit 1 + fi +done + +exit 0 diff --git a/bin/omarchy-pkg-aur-install b/bin/omarchy-pkg-aur-install index c99ee7141a..da0d588427 100755 --- a/bin/omarchy-pkg-aur-install +++ b/bin/omarchy-pkg-aur-install @@ -1,16 +1,16 @@ #!/bin/bash -set -e - fzf_args=( --multi - --preview 'yay -Sii {1}' - --preview-label='alt-p: toggle description, alt-j/k: scroll, tab: multi-select, F11: maximize' + --preview 'yay -Siia {1}' + --preview-label='alt-p: toggle description, alt-b/B: toggle PKGBUILD, alt-j/k: scroll, tab: multi-select' --preview-label-pos='bottom' --preview-window 'down:65%:wrap' --bind 'alt-p:toggle-preview' --bind 'alt-d:preview-half-page-down,alt-u:preview-half-page-up' --bind 'alt-k:preview-up,alt-j:preview-down' + --bind 'alt-b:change-preview:yay -Gpa {1} | tail -n +5' + --bind 'alt-B:change-preview:yay -Siia {1}' --color 'pointer:green,marker:green' ) diff --git a/bin/omarchy-pkg-drop b/bin/omarchy-pkg-drop new file mode 100755 index 0000000000..fc9da0d6cf --- /dev/null +++ b/bin/omarchy-pkg-drop @@ -0,0 +1,7 @@ +#!/bin/bash + +for pkg in "$@"; do + if pacman -Q "$pkg" &>/dev/null; then + sudo pacman -Rns --noconfirm "$pkg" + fi +done diff --git a/bin/omarchy-pkg-ignored b/bin/omarchy-pkg-ignored deleted file mode 100755 index 765fe69cd3..0000000000 --- a/bin/omarchy-pkg-ignored +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -IGNORED_PACKAGES_FILE="$OMARCHY_PATH/install/packages.ignored" - -if [[ -f $IGNORED_PACKAGES_FILE ]]; then - tr '\r\n' ',' <"$IGNORED_PACKAGES_FILE" | sed 's/,$//' -fi diff --git a/bin/omarchy-pkg-install b/bin/omarchy-pkg-install index 8a6c1ce6d5..49f7b33ba7 100755 --- a/bin/omarchy-pkg-install +++ b/bin/omarchy-pkg-install @@ -1,11 +1,9 @@ #!/bin/bash -set -e - fzf_args=( --multi --preview 'pacman -Sii {1}' - --preview-label='alt-p: toggle description, alt-j/k: scroll, tab: multi-select, F11: maximize' + --preview-label='alt-p: toggle description, alt-j/k: scroll, tab: multi-select' --preview-label-pos='bottom' --preview-window 'down:65%:wrap' --bind 'alt-p:toggle-preview' @@ -19,6 +17,5 @@ pkg_names=$(pacman -Slq | fzf "${fzf_args[@]}") if [[ -n "$pkg_names" ]]; then # Convert newline-separated selections to space-separated for yay echo "$pkg_names" | tr '\n' ' ' | xargs sudo pacman -S --noconfirm - sudo updatedb omarchy-show-done fi diff --git a/bin/omarchy-pkg-missing b/bin/omarchy-pkg-missing new file mode 100755 index 0000000000..2556afe371 --- /dev/null +++ b/bin/omarchy-pkg-missing @@ -0,0 +1,9 @@ +#!/bin/bash + +for pkg in "$@"; do + if ! pacman -Q "$pkg" &>/dev/null; then + exit 0 + fi +done + +exit 1 diff --git a/bin/omarchy-pkg-present b/bin/omarchy-pkg-present new file mode 100755 index 0000000000..6afb1f5c69 --- /dev/null +++ b/bin/omarchy-pkg-present @@ -0,0 +1,7 @@ +#!/bin/bash + +for pkg in "$@"; do + pacman -Q "$pkg" &>/dev/null || exit 1 +done + +exit 0 diff --git a/bin/omarchy-pkg-remove b/bin/omarchy-pkg-remove index 5408aa9b5e..1da761f93f 100755 --- a/bin/omarchy-pkg-remove +++ b/bin/omarchy-pkg-remove @@ -3,7 +3,7 @@ fzf_args=( --multi --preview 'yay -Qi {1}' - --preview-label='alt-p: toggle description, alt-j/k: scroll, tab: multi-select, F11: maximize' + --preview-label='alt-p: toggle description, alt-j/k: scroll, tab: multi-select' --preview-label-pos='bottom' --preview-window 'down:65%:wrap' --bind 'alt-p:toggle-preview' @@ -17,6 +17,5 @@ pkg_names=$(yay -Qqe | fzf "${fzf_args[@]}") if [[ -n "$pkg_names" ]]; then # Convert newline-separated selections to space-separated for yay echo "$pkg_names" | tr '\n' ' ' | xargs sudo pacman -Rns --noconfirm - sudo updatedb omarchy-show-done fi diff --git a/bin/omarchy-refresh-hyprland b/bin/omarchy-refresh-hyprland index 7c0a278b85..1f1ab0cc8e 100755 --- a/bin/omarchy-refresh-hyprland +++ b/bin/omarchy-refresh-hyprland @@ -2,6 +2,6 @@ omarchy-refresh-config hypr/autostart.conf omarchy-refresh-config hypr/bindings.conf -omarchy-refresh-config hypr/envs.conf omarchy-refresh-config hypr/input.conf +omarchy-refresh-config hypr/looknfeel.conf omarchy-refresh-config hypr/hyprland.conf diff --git a/bin/omarchy-refresh-limine b/bin/omarchy-refresh-limine new file mode 100755 index 0000000000..0e1bf7f291 --- /dev/null +++ b/bin/omarchy-refresh-limine @@ -0,0 +1,34 @@ +#!/bin/bash + +if [[ -f /boot/EFI/linux/omarchy_linux.efi ]] && [[ -f /boot/EFI/linux/$(cat /etc/machine-id)_linux.efi ]]; then + echo "Cleanup extra UKI" + sudo rm -f /boot/EFI/Linux/$(cat /etc/machine-id)_linux.efi +fi +echo "Resetting limine config" + +sudo mv /boot/limine.conf /boot/limine.conf.bak + +sudo tee /boot/limine.conf </dev/null +### Read more at config document: https://github.com/limine-bootloader/limine/blob/trunk/CONFIG.md +#timeout: 3 +default_entry: 2 +interface_branding: Omarchy Bootloader +interface_branding_color: 2 +hash_mismatch_panic: no + +term_background: 1a1b26 +backdrop: 1a1b26 + +# Terminal colors (Tokyo Night palette) +term_palette: 15161e;f7768e;9ece6a;e0af68;7aa2f7;bb9af7;7dcfff;a9b1d6 +term_palette_bright: 414868;f7768e;9ece6a;e0af68;7aa2f7;bb9af7;7dcfff;c0caf5 + +# Text colors +term_foreground: c0caf5 +term_foreground_bright: c0caf5 +term_background_bright: 24283b + +EOF + +sudo limine-update +sudo limine-snapper-sync diff --git a/bin/omarchy-refresh-pacman b/bin/omarchy-refresh-pacman new file mode 100755 index 0000000000..d9ab3d2a41 --- /dev/null +++ b/bin/omarchy-refresh-pacman @@ -0,0 +1,22 @@ +#!/bin/bash + +# Take backup of existing files +sudo cp -f /etc/pacman.conf /etc/pacman.conf.bak +sudo cp -f /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak + +sudo cp -f ~/.local/share/omarchy/default/pacman/pacman.conf /etc/pacman.conf + +if [[ $1 == "edge" ]]; then + sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist-edge /etc/pacman.d/mirrorlist + sudo sed -i 's|https://pkgs.omarchy.org/.*$arch|https://pkgs.omarchy.org/edge/$arch|' /etc/pacman.conf + echo "Setting channel to edge" +else + sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist-stable /etc/pacman.d/mirrorlist + sudo sed -i 's|https://pkgs.omarchy.org/.*$arch|https://pkgs.omarchy.org/stable/$arch|' /etc/pacman.conf + echo "Setting channel to stable" +fi + +echo + +# Reset all package DBs and then update +sudo pacman -Syyu --noconfirm diff --git a/bin/omarchy-refresh-plymouth b/bin/omarchy-refresh-plymouth index 8116603744..fce86bf330 100755 --- a/bin/omarchy-refresh-plymouth +++ b/bin/omarchy-refresh-plymouth @@ -1,6 +1,10 @@ #!/bin/bash -if [[ "$1" == "-y" ]]; then - sudo cp ~/.local/share/omarchy/default/plymouth/* /usr/share/plymouth/themes/omarchy/ - sudo plymouth-set-default-theme -R omarchy +sudo cp ~/.local/share/omarchy/default/plymouth/* /usr/share/plymouth/themes/omarchy/ +sudo plymouth-set-default-theme omarchy + +if command -v limine-mkinitcpio &>/dev/null; then + sudo limine-mkinitcpio +else + sudo mkinitcpio -P fi diff --git a/bin/omarchy-refresh-walker b/bin/omarchy-refresh-walker index aa7a0210b7..e32e2fcbe5 100755 --- a/bin/omarchy-refresh-walker +++ b/bin/omarchy-refresh-walker @@ -1,4 +1,10 @@ #!/bin/bash +# Ensure walker is set to autostart +mkdir -p ~/.config/autostart/ +cp $OMARCHY_PATH/autostart/walker.desktop ~/.config/autostart/ + omarchy-refresh-config walker/config.toml +omarchy-refresh-config elephant/calc.toml +omarchy-refresh-config elephant/desktopapplications.toml omarchy-restart-walker diff --git a/bin/omarchy-reinstall b/bin/omarchy-reinstall new file mode 100755 index 0000000000..52c826ca4c --- /dev/null +++ b/bin/omarchy-reinstall @@ -0,0 +1,33 @@ +#!/bin/bash + +set -e + +if [ "$EUID" -eq 0 ]; then + echo "Error: This script should not be run as root" + exit 1 +fi + +echo -e "This will reinstall all the default Omarchy packages and reset all default configs.\nWarning: All changes to configs will be lost.\n" + +if gum confirm "Are you sure you want to reinstall and lose all config changes?"; then + echo "Resetting Omarchy repository" + git clone "https://github.com/basecamp/omarchy.git" ~/.local/share/omarchy-new >/dev/null + rm -rf $OMARCHY_PATH + mv ~/.local/share/omarchy-new $OMARCHY_PATH + + echo "Reinstalling missing Omarchy packages" + mapfile -t packages < <(grep -v '^#' "$OMARCHY_PATH/install/omarchy-base.packages" | grep -v '^$') + sudo pacman -Syu --noconfirm --needed "${packages[@]}" + + echo "Resetting all Omarchy configs" + cp -R ~/.local/share/omarchy/config/* ~/.config/ + cp ~/.local/share/omarchy/default/bashrc ~/.bashrc + echo '[[ -f ~/.bashrc ]] && . ~/.bashrc' | tee ~/.bash_profile >/dev/null + + $(bash $OMARCHY_PATH/install/config/theme.sh) + $(bash $OMARCHY_PATH/install/config/git.sh) + + omarchy-refresh-limine + omarchy-refresh-plymouth + omarchy-nvim-setup +fi diff --git a/bin/omarchy-restart-app b/bin/omarchy-restart-app index 8cf2a036d4..4cc474fa69 100755 --- a/bin/omarchy-restart-app +++ b/bin/omarchy-restart-app @@ -1,4 +1,4 @@ #!/bin/bash pkill -x $1 -setsid uwsm app -- $1 >/dev/null 2>&1 & +setsid uwsm-app -- $1 >/dev/null 2>&1 & diff --git a/bin/omarchy-restart-bluetooth b/bin/omarchy-restart-bluetooth new file mode 100755 index 0000000000..1d3c6c11c0 --- /dev/null +++ b/bin/omarchy-restart-bluetooth @@ -0,0 +1,5 @@ +#!/bin/bash + +echo -e "Unblocking bluetooth...\n" +rfkill unblock bluetooth +rfkill list bluetooth diff --git a/bin/omarchy-restart-pipewire b/bin/omarchy-restart-pipewire new file mode 100755 index 0000000000..f26ee09e73 --- /dev/null +++ b/bin/omarchy-restart-pipewire @@ -0,0 +1,4 @@ +#!/bin/bash + +echo -e "Restarting pipewire audio service...\n" +systemctl --user restart pipewire.service diff --git a/bin/omarchy-restart-terminal b/bin/omarchy-restart-terminal new file mode 100755 index 0000000000..6de616ed8b --- /dev/null +++ b/bin/omarchy-restart-terminal @@ -0,0 +1,13 @@ +#!/bin/bash + +if [[ -f ~/.config/alacritty/alacritty.toml ]]; then + touch ~/.config/alacritty/alacritty.toml +fi + +if pgrep -x kitty; then + killall -SIGUSR1 kitty +fi + +if pgrep -x ghostty; then + killall -SIGUSR2 ghostty +fi diff --git a/bin/omarchy-restart-walker b/bin/omarchy-restart-walker index ae165b39e8..b3886e1823 100755 --- a/bin/omarchy-restart-walker +++ b/bin/omarchy-restart-walker @@ -1,7 +1,22 @@ #!/bin/bash +pkill elephant pkill walker -# FIXME: Reenable the walker service once the memory leak has been fixed -# See https://github.com/basecamp/omarchy/issues/698 -# setsid uwsm app -- walker --gapplication-service & -echo # Always end in success so we don't terminate further running + +# Detect if we're running as root (from pacman hook) +if [[ $EUID -eq 0 ]]; then + # Get the owner of this script to determine which user to run as + SCRIPT_OWNER=$(stat -c '%U' "$0") + USER_UID=$(id -u "$SCRIPT_OWNER") + + # Restart services as the script owner + systemd-run --uid="$SCRIPT_OWNER" --setenv=XDG_RUNTIME_DIR="/run/user/$USER_UID" \ + bash -c " + systemctl --user restart elephant.service + setsid walker --gapplication-service & + " +else + elephant service enable 2>/dev/null + systemctl --user restart elephant.service + setsid walker --gapplication-service & +fi diff --git a/bin/omarchy-restart-wifi b/bin/omarchy-restart-wifi new file mode 100755 index 0000000000..b4d66a5ac5 --- /dev/null +++ b/bin/omarchy-restart-wifi @@ -0,0 +1,5 @@ +#!/bin/bash + +echo -e "Unblocking wifi...\n" +rfkill unblock wifi +rfkill list wifi diff --git a/bin/omarchy-setup-dns b/bin/omarchy-setup-dns index 119ab40b18..472b5550b9 100755 --- a/bin/omarchy-setup-dns +++ b/bin/omarchy-setup-dns @@ -37,8 +37,6 @@ EOF DHCP) sudo tee /etc/systemd/resolved.conf >/dev/null <<'EOF' [Resolve] -DNS= -FallbackDNS= DNSOverTLS=no EOF diff --git a/bin/omarchy-setup-fingerprint b/bin/omarchy-setup-fingerprint index 422fb1e413..5319fdae18 100755 --- a/bin/omarchy-setup-fingerprint +++ b/bin/omarchy-setup-fingerprint @@ -20,7 +20,7 @@ print_info() { } check_fingerprint_hardware() { - if ! lsusb | grep -Eiq 'fingerprint|synaptics|goodix|elan|validity'; then + if ! lsusb | grep -Eiq 'fingerprint|synaptics|goodix|elan|validity|FPC'; then print_error "\nNo fingerprint sensor detected." return 1 fi @@ -51,6 +51,16 @@ EOF fi } +add_hyprlock_fingerprint_icon() { + print_info "Adding fingerprint icon to hyprlock placeholder text..." + sed -i 's/placeholder_text = .*/placeholder_text = Enter Password 󰈷 <\/span>/' ~/.config/hypr/hyprlock.conf +} + +remove_hyprlock_fingerprint_icon() { + print_info "Removing fingerprint icon from hyprlock placeholder text..." + sed -i 's/placeholder_text = .*/placeholder_text = Enter Password/' ~/.config/hypr/hyprlock.conf +} + remove_pam_config() { # Remove from sudo if grep -q pam_fprintd.so /etc/pam.d/sudo; then @@ -71,6 +81,9 @@ if [[ "--remove" == "$1" ]]; then # Remove PAM configuration remove_pam_config + # Remove fingerprint icon from hyprlock placeholder text + remove_hyprlock_fingerprint_icon + # Uninstall packages print_info "Removing fingerprint packages..." sudo pacman -Rns --noconfirm fprintd @@ -90,6 +103,9 @@ else # Configure PAM setup_pam_config + # Add fingerprint icon to hyprlock placeholder text + add_hyprlock_fingerprint_icon + # Enroll first fingerprint print_success "\nLet's setup your right index finger as the first fingerprint." print_info "Keep moving the finger around on sensor until the process completes.\n" diff --git a/bin/omarchy-snapshot b/bin/omarchy-snapshot index 7174081b98..ee79512a7c 100755 --- a/bin/omarchy-snapshot +++ b/bin/omarchy-snapshot @@ -1,5 +1,7 @@ #!/bin/bash +set -e + COMMAND="$1" OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy} @@ -17,7 +19,7 @@ create) DESC="$(omarchy-version)" echo -e "\e[32mCreate system snapshot\e[0m" - + # Get existing snapper config names from CSV output mapfile -t CONFIGS < <(sudo snapper --csvout list-configs | awk -F, 'NR>1 {print $1}') diff --git a/bin/omarchy-theme-bg-next b/bin/omarchy-theme-bg-next index 21cddf98c4..52c1355e1d 100755 --- a/bin/omarchy-theme-bg-next +++ b/bin/omarchy-theme-bg-next @@ -5,13 +5,13 @@ BACKGROUNDS_DIR="$HOME/.config/omarchy/current/theme/backgrounds/" CURRENT_BACKGROUND_LINK="$HOME/.config/omarchy/current/background" -mapfile -d '' -t BACKGROUNDS < <(find "$BACKGROUNDS_DIR" -type f -print0 | sort -z) +mapfile -d '' -t BACKGROUNDS < <(find -L "$BACKGROUNDS_DIR" -type f -print0 | sort -z) TOTAL=${#BACKGROUNDS[@]} if [[ $TOTAL -eq 0 ]]; then notify-send "No background was found for theme" -t 2000 pkill -x swaybg - setsid uwsm app -- swaybg --color '#000000' >/dev/null 2>&1 & + setsid uwsm-app -- swaybg --color '#000000' >/dev/null 2>&1 & else # Get current background from symlink if [[ -L "$CURRENT_BACKGROUND_LINK" ]]; then @@ -44,5 +44,5 @@ else # Relaunch swaybg pkill -x swaybg - setsid uwsm app -- swaybg -i "$CURRENT_BACKGROUND_LINK" -m fill >/dev/null 2>&1 & + setsid uwsm-app -- swaybg -i "$CURRENT_BACKGROUND_LINK" -m fill >/dev/null 2>&1 & fi diff --git a/bin/omarchy-theme-remove b/bin/omarchy-theme-remove index e3733feb7b..21959454e0 100755 --- a/bin/omarchy-theme-remove +++ b/bin/omarchy-theme-remove @@ -7,7 +7,7 @@ if [ -z "$1" ]; then mapfile -t extra_themes < <(find ~/.config/omarchy/themes -mindepth 1 -maxdepth 1 -type d ! -xtype l -printf '%f\n') if [[ ${#extra_themes[@]} -gt 0 ]]; then - THEME_NAME=$(gum choose --header="Remove extra theme" "${extra_themes[@]}") + THEME_NAME=$(printf '%s\n' "${extra_themes[@]}" | sort | gum choose --header="Remove extra theme") else echo "No extra themes installed." exit 1 diff --git a/bin/omarchy-theme-set b/bin/omarchy-theme-set index eeb5009c41..4040426578 100755 --- a/bin/omarchy-theme-set +++ b/bin/omarchy-theme-set @@ -1,10 +1,7 @@ #!/bin/bash -# omarchy-theme-set: Set a theme, specified by its name. -# Usage: omarchy-theme-set - -if [[ -z "$1" && "$1" != "CNCLD" ]]; then - echo "Usage: omarchy-theme-set " >&2 +if [[ -z $1 && $1 != "CNCLD" ]]; then + echo "Usage: omarchy-theme-set " exit 1 fi @@ -16,54 +13,32 @@ THEME_PATH="$THEMES_DIR/$THEME_NAME" # Check if the theme entered exists if [[ ! -d "$THEME_PATH" ]]; then - echo "Theme '$THEME_NAME' does not exist in $THEMES_DIR" >&2 - exit 2 + echo "Theme '$THEME_NAME' does not exist in $THEMES_DIR" + exit 1 fi # Update theme symlinks ln -nsf "$THEME_PATH" "$CURRENT_THEME_DIR" -# Change gnome modes -if [[ -f ~/.config/omarchy/current/theme/light.mode ]]; then - gsettings set org.gnome.desktop.interface color-scheme "prefer-light" - gsettings set org.gnome.desktop.interface gtk-theme "Adwaita" -else - gsettings set org.gnome.desktop.interface color-scheme "prefer-dark" - gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark" -fi - -# Change gnome icon theme color -if [[ -f ~/.config/omarchy/current/theme/icons.theme ]]; then - gsettings set org.gnome.desktop.interface icon-theme "$(<~/.config/omarchy/current/theme/icons.theme)" -else - gsettings set org.gnome.desktop.interface icon-theme "Yaru-blue" -fi - -# Change Chromium colors -if command -v chromium &>/dev/null; then - if [[ -f ~/.config/omarchy/current/theme/light.mode ]]; then - chromium --no-startup-window --set-color-scheme="light" - else - chromium --no-startup-window --set-color-scheme="dark" - fi - - if [[ -f ~/.config/omarchy/current/theme/chromium.theme ]]; then - chromium --no-startup-window --set-theme-color="$(<~/.config/omarchy/current/theme/chromium.theme)" - else - # Use a default, neutral grey if theme doesn't have a color - chromium --no-startup-window --set-theme-color="28,32,39" - fi -fi - -# Trigger alacritty config reload -touch "$HOME/.config/alacritty/alacritty.toml" +# Change background with theme +omarchy-theme-bg-next # Restart components to apply new theme -pkill -SIGUSR2 btop -omarchy-restart-waybar +if pgrep -x waybar >/dev/null; then + omarchy-restart-waybar +fi omarchy-restart-swayosd -makoctl reload +omarchy-restart-terminal hyprctl reload +pkill -SIGUSR2 btop +makoctl reload -# Set new background -omarchy-theme-bg-next +# Change gnome, browser, vscode, cursor themes +omarchy-theme-set-gnome +omarchy-theme-set-browser +omarchy-theme-set-vscode +omarchy-theme-set-cursor +omarchy-theme-set-obsidian + +# Call hook on theme set +omarchy-hook theme-set "$THEME_NAME" diff --git a/bin/omarchy-theme-set-browser b/bin/omarchy-theme-set-browser new file mode 100755 index 0000000000..00afa68f6f --- /dev/null +++ b/bin/omarchy-theme-set-browser @@ -0,0 +1,30 @@ +#!/bin/bash + +CHROMIUM_THEME=~/.config/omarchy/current/theme/chromium.theme + +if omarchy-cmd-present chromium || omarchy-cmd-present helium-browser || omarchy-cmd-present brave; then + if [[ -f $CHROMIUM_THEME ]]; then + THEME_RGB_COLOR=$(<$CHROMIUM_THEME) + THEME_HEX_COLOR=$(printf '#%02x%02x%02x' ${THEME_RGB_COLOR//,/ }) + else + # Use a default, neutral grey if theme doesn't have a color + THEME_RGB_COLOR="28,32,39" + THEME_HEX_COLOR="#1c2027" + fi + + if omarchy-cmd-present chromium; then + rm -f /etc/chromium/policies/managed/color.json + chromium --no-startup-window --set-theme-color="$THEME_RGB_COLOR" + + if [[ -f ~/.config/omarchy/current/theme/light.mode ]]; then + chromium --no-startup-window --set-color-scheme="light" + else + chromium --no-startup-window --set-color-scheme="dark" + fi + fi + + if omarchy-cmd-present brave; then + echo "{\"BrowserThemeColor\": \"$THEME_HEX_COLOR\"}" | tee "/etc/brave/policies/managed/color.json" >/dev/null + brave --refresh-platform-policy --no-startup-window + fi +fi diff --git a/bin/omarchy-theme-set-cursor b/bin/omarchy-theme-set-cursor new file mode 100755 index 0000000000..2db672e188 --- /dev/null +++ b/bin/omarchy-theme-set-cursor @@ -0,0 +1,4 @@ +#!/bin/bash + +# Call the VSCode theme setter with Cursor-specific parameters +omarchy-theme-set-vscode cursor "$HOME/.config/Cursor/User/settings.json" "$HOME/.local/state/omarchy/toggles/skip-cursor-theme-changes" Cursor diff --git a/bin/omarchy-theme-set-gnome b/bin/omarchy-theme-set-gnome new file mode 100755 index 0000000000..da25b66a38 --- /dev/null +++ b/bin/omarchy-theme-set-gnome @@ -0,0 +1,18 @@ +#!/bin/bash + +# Change gnome modes +if [[ -f ~/.config/omarchy/current/theme/light.mode ]]; then + gsettings set org.gnome.desktop.interface color-scheme "prefer-light" + gsettings set org.gnome.desktop.interface gtk-theme "Adwaita" +else + gsettings set org.gnome.desktop.interface color-scheme "prefer-dark" + gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark" +fi + +# Change gnome icon theme color +GNOME_ICONS_THEME=~/.config/omarchy/current/theme/icons.theme +if [[ -f $GNOME_ICONS_THEME ]]; then + gsettings set org.gnome.desktop.interface icon-theme "$(<$GNOME_ICONS_THEME)" +else + gsettings set org.gnome.desktop.interface icon-theme "Yaru-blue" +fi diff --git a/bin/omarchy-theme-set-obsidian b/bin/omarchy-theme-set-obsidian new file mode 100755 index 0000000000..83980f6be5 --- /dev/null +++ b/bin/omarchy-theme-set-obsidian @@ -0,0 +1,684 @@ +#!/bin/bash + +# omarchy-theme-set-obsidian: Bootstrap and update Omarchy theme for Obsidian +# +# - Ensures registry at ~/.local/state/omarchy/obsidian-vaults +# - Populates by extracting vault paths from ~/.config/obsidian/obsidian.json +# - For each valid vault: +# - Ensures .obsidian/themes/Omarchy/{manifest.json, theme.css} +# - Updates theme.css (uses current theme’s obsidian.css if present; otherwise generates -- see below) + +# Theme automagic generation logic: +# +# - Background/foreground: read from ~/.config/omarchy/current/theme/alacritty.toml [colors.primary] +# (background/foreground). Fallbacks: bg=#1a1b26, fg=#a9b1d6. Compute bg brightness for light/dark handling. +# - Palette extraction: collect colors from Alacritty (primary/normal/bright/dim/selection), Waybar (@define-color), +# and Hyprland (col.*_border; rgba->hex). Normalize, dedupe, and count frequencies. +# - Slot ordering: remove bg/fg, sort remaining colors by frequency, then fill 13 slots by cycling. Map slots to: +# h1–h6, links, inline code, marks, interactive accent, blockquote border; muted/faint use border color. +# - Code colors: code background = closest color to bg (Euclidean RGB); if none, make a subtle bg variant (+/− RGB). +# code foreground = closest color to fg; fallback #e0e0e0. +# - Border color: from btop.theme theme[div_line]; else blended mix biased toward bg (≈ (bg+fg)/3). +# - Selection: from Alacritty [colors.selection] (background/text), honoring CellForeground/Background. +# If missing, background = 75% bg + 25% fg; text chosen for contrast vs selection background. +# - Fonts: monospace from Alacritty [font] or fontconfig monospace; UI font from fontconfig sans-serif. + +VAULTS_FILE="$HOME/.local/state/omarchy/obsidian-vaults" +CURRENT_THEME_DIR="$HOME/.config/omarchy/current/theme" + +ensure_vaults_file() { + mkdir -p "$(dirname "$VAULTS_FILE")" + local tmpfile + tmpfile="$(mktemp)" + # Extract the Obsidian vault location from config file //.obsidian + jq -r '.vaults | values[].path' ~/.config/obsidian/obsidian.json 2>/dev/null >>"$tmpfile" + if [ -s "$tmpfile" ]; then + sort -u "$tmpfile" >"$VAULTS_FILE" + else + : >"$VAULTS_FILE" + fi + rm "$tmpfile" +} + +# Ensure theme directory and minimal manifest exist in a vault +ensure_theme_scaffold() { + local vault_path="$1" + local theme_dir="$vault_path/.obsidian/themes/Omarchy" + mkdir -p "$theme_dir" + if [ ! -f "$theme_dir/manifest.json" ]; then + cat >"$theme_dir/manifest.json" <<'EOF' +{ + "name": "Omarchy", + "version": "1.0.0", + "minAppVersion": "0.16.0", + "description": "Automatically syncs with your current Omarchy system theme colors and fonts", + "author": "Omarchy", + "authorUrl": "https://omarchy.org" +} +EOF + fi + [ -f "$theme_dir/theme.css" ] || : >"$theme_dir/theme.css" +} + +# Function to extract hex color from string +extract_hex_color() { + echo "$1" | grep -oE '#[0-9a-fA-F]{6}' | head -1 +} + +# Function to convert RGB/RGBA to hex +rgb_to_hex() { + local rgb_string="$1" + if [[ $rgb_string =~ rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+) ]]; then + printf "#%02x%02x%02x\n" "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}" "${BASH_REMATCH[3]}" + fi +} + +# Convert hex to RGB components +hex_to_rgb() { + local hex="${1#\#}" + printf "%d %d %d\n" "0x${hex:0:2}" "0x${hex:2:2}" "0x${hex:4:2}" +} + +# Calculate perceived brightness (0-255) +calculate_brightness() { + local hex="$1" + read -r r g b <<<"$(hex_to_rgb "$hex")" + # Use perceived brightness formula + echo $(((r * 299 + g * 587 + b * 114) / 1000)) +} + +# Calculate approximate contrast ratio between two colors +# Returns ratio scaled by 100 (e.g., 450 = 4.5:1 ratio) +# (this is due to bash not supporting decimal math) +calculate_contrast_ratio() { + local hex1="$1" hex2="$2" + local br1=$(calculate_brightness "$hex1") # 0-255 range + local br2=$(calculate_brightness "$hex2") # 0-255 range + + # Ensure br1 is the lighter color (higher brightness) + if [ $br1 -lt $br2 ]; then + local temp=$br1 + br1=$br2 + br2=$temp + fi + + # Approximate contrast ratio scaled by 100 + # Add offset to avoid division by zero and approximate WCAG +0.05 behavior + echo $(((br1 + 13) * 100 / (br2 + 13))) +} + +# Check if two colors meet minimum contrast threshold +# Usage: meets_contrast_threshold +# Both ratio and threshold should be scaled by 100 (e.g., 300 = 3:1) +meets_contrast_threshold() { + local ratio="$1" # Ratio scaled by 100 (from calculate_contrast_ratio) + local threshold="$2" # Threshold scaled by 100 (300=3:1, 450=4.5:1, 700=7:1) + [ $ratio -ge $threshold ] +} + +# Calculate color distance (euclidean in RGB space) +color_distance() { + local hex1="$1" + local hex2="$2" + read -r r1 g1 b1 <<<"$(hex_to_rgb "$hex1")" + read -r r2 g2 b2 <<<"$(hex_to_rgb "$hex2")" + echo $(((r1 - r2) * (r1 - r2) + (g1 - g2) * (g1 - g2) + (b1 - b2) * (b1 - b2))) +} + +# Extract all colors with frequency count +extract_all_colors_with_count() { + local -A color_counts + local color + + # Extract from Alacritty config + if [ -f "$CURRENT_THEME_DIR/alacritty.toml" ]; then + # Primary colors + while IFS= read -r color; do + color=$(echo "$color" | tr '[:upper:]' '[:lower:]') # Lowercase for consistency + [ -n "$color" ] && ((color_counts["$color"]++)) + done < <(grep -E "(background|foreground|cursor|text)" "$CURRENT_THEME_DIR/alacritty.toml" | sed "s/.*[\"']0x/#/;s/.*[\"']#/#/;s/[\"'].*//;s/.*#\([0-9a-fA-F]\{6\}\).*/\#\1/" | grep "^#") + + # Normal colors + while IFS= read -r color; do + color=$(echo "$color" | tr '[:upper:]' '[:lower:]') # Lowercase for consistency + [ -n "$color" ] && ((color_counts["$color"]++)) + done < <(grep -A 20 "\[colors.normal\]" "$CURRENT_THEME_DIR/alacritty.toml" | grep -E "(black|red|green|yellow|blue|magenta|cyan|white)" | sed "s/.*[\"']0x/#/;s/.*[\"']#/#/;s/[\"'].*//;s/.*#\([0-9a-fA-F]\{6\}\).*/\#\1/" | grep "^#") + + # Bright colors + while IFS= read -r color; do + # Add # if missing + [[ "$color" =~ ^[0-9a-fA-F]{6}$ ]] && color="#$color" + color=$(echo "$color" | tr '[:upper:]' '[:lower:]') # Lowercase for consistency + [[ "$color" =~ ^#[0-9a-f]{6}$ ]] && ((color_counts["$color"]++)) + done < <(grep -A 20 "\[colors.bright\]" "$CURRENT_THEME_DIR/alacritty.toml" | grep -E "(black|red|green|yellow|blue|magenta|cyan|white)" | sed "s/.*[\"']//;s/[\"'].*//") + + # Dim colors if present + while IFS= read -r color; do + # Add # if missing + [[ "$color" =~ ^[0-9a-fA-F]{6}$ ]] && color="#$color" + color=$(echo "$color" | tr '[:upper:]' '[:lower:]') # Lowercase for consistency + [[ "$color" =~ ^#[0-9a-f]{6}$ ]] && ((color_counts["$color"]++)) + done < <(grep -A 20 "\[colors.dim\]" "$CURRENT_THEME_DIR/alacritty.toml" 2>/dev/null | grep -E "(black|red|green|yellow|blue|magenta|cyan|white)" | sed "s/.*[\"']//;s/[\"'].*//") + + # Selection colors + while IFS= read -r color; do + color=$(echo "$color" | tr '[:upper:]' '[:lower:]') # Lowercase for consistency + [ -n "$color" ] && ((color_counts["$color"]++)) + done < <(grep -A 5 "\[colors.selection\]" "$CURRENT_THEME_DIR/alacritty.toml" 2>/dev/null | grep -E "(background|text)" | sed "s/.*[\"']0x/#/;s/.*[\"']#/#/;s/[\"'].*//;s/.*#\([0-9a-fA-F]\{6\}\).*/\#\1/" | grep "^#") + fi + + # Extract from Waybar CSS + if [ -f "$CURRENT_THEME_DIR/waybar.css" ]; then + while IFS= read -r color; do + color=$(echo "$color" | tr '[:upper:]' '[:lower:]') # Lowercase for consistency + [ -n "$color" ] && ((color_counts["$color"]++)) + done < <(grep -oE '@define-color [a-z_-]+ #[0-9a-fA-F]{6}' "$CURRENT_THEME_DIR/waybar.css" | grep -oE '#[0-9a-fA-F]{6}') + fi + + # Extract from Hyprland config + if [ -f "$CURRENT_THEME_DIR/hyprland.conf" ]; then + while IFS= read -r color; do + if [[ $color == rgba* ]] || [[ $color == rgb* ]]; then + color=$(rgb_to_hex "$color") + fi + color=$(echo "$color" | tr '[:upper:]' '[:lower:]') # Lowercase for consistency + [ -n "$color" ] && ((color_counts["$color"]++)) + done < <(grep -E "col\.(active|inactive)_border" "$CURRENT_THEME_DIR/hyprland.conf" | grep -oE 'rgba?\([^)]+\)|#[0-9a-fA-F]{6,8}' | sed 's/ff$//') + fi + + # Output colors with their counts + for color in "${!color_counts[@]}"; do + echo "${color_counts[$color]} $color" + done +} + +# Sort colors by frequency +sort_colors_by_frequency() { + # Input is already "count color" format + sort -rn | cut -d' ' -f2 +} + +# Fill color slots with cycling if needed +fill_color_slots() { + local -a colors=("$@") + local -a slots + local num_colors=${#colors[@]} + + # Need 13 slots total (code colors are handled separately) + local slots_needed=13 + + if [ $num_colors -eq 0 ]; then + # No colors available, use defaults + colors=("#3d3d3d" "#5d5d5d" "#7d7d7d" "#9d9d9d" "#bd93f9" "#50fa7b") + num_colors=6 + fi + + # Fill slots, cycling if necessary + for ((i = 0; i < slots_needed; i++)); do + slots[$i]="${colors[$((i % num_colors))]}" + done + + echo "${slots[@]}" +} + +# Main color extraction and theme generation +extract_theme_data() { + # Get primary colors from Alacritty + local bg_color="#1a1b26" + local fg_color="#a9b1d6" + + if [ -f "$CURRENT_THEME_DIR/alacritty.toml" ]; then + local extracted_bg=$(grep -A 5 "\[colors.primary\]" "$CURRENT_THEME_DIR/alacritty.toml" | grep "^background = " | sed "s/.*[\"']0x/#/;s/.*[\"']#/#/;s/[\"'].*//;s/.*#\([0-9a-fA-F]\{6\}\).*/\#\1/" | head -1 | tr '[:upper:]' '[:lower:]') + local extracted_fg=$(grep -A 5 "\[colors.primary\]" "$CURRENT_THEME_DIR/alacritty.toml" | grep "^foreground = " | sed "s/.*[\"']0x/#/;s/.*[\"']#/#/;s/[\"'].*//;s/.*#\([0-9a-fA-F]\{6\}\).*/\#\1/" | head -1 | tr '[:upper:]' '[:lower:]') + [ -n "$extracted_bg" ] && bg_color="$extracted_bg" + [ -n "$extracted_fg" ] && fg_color="$extracted_fg" + fi + + # Determine if light or dark theme + local bg_brightness=$(calculate_brightness "$bg_color") + local is_light_theme=false + [ $bg_brightness -gt 127 ] && is_light_theme=true + + # Extract all colors with counts + local color_data=$(extract_all_colors_with_count) + + # Filter out background and foreground colors for the main array + local filtered_data=$(echo "$color_data" | grep -v "$bg_color" | grep -v "$fg_color") + + # Get all unique colors (including bg/fg) for distance calculations + local -a all_unique_colors + readarray -t all_unique_colors < <(echo "$color_data" | cut -d' ' -f2 | sort -u) + + # Find the 3 closest colors to background for background variations + local -a bg_distances + for color in "${all_unique_colors[@]}"; do + if [ "$color" != "$bg_color" ]; then + distance=$(color_distance "$color" "$bg_color") + bg_distances+=("$distance:$color") + fi + done + + # All background variations use the same as primary background + local bg_primary_alt="$bg_color" + local bg_secondary="$bg_color" + local bg_secondary_alt="$bg_color" + + # Generate code background color that will contrast with foreground text + read -r r g b <<<"$(hex_to_rgb "$bg_color")" + if [ $bg_brightness -gt 127 ]; then + r=$((r - 10)) + g=$((g - 10)) + b=$((b - 10)) + else + r=$((r + 15)) + g=$((g + 15)) + b=$((b + 15)) + fi + [ $r -lt 0 ] && r=0 + [ $r -gt 255 ] && r=255 + [ $g -lt 0 ] && g=0 + [ $g -gt 255 ] && g=255 + [ $b -lt 0 ] && b=0 + [ $b -gt 255 ] && b=255 + code_bg=$(printf "#%02x%02x%02x" "$r" "$g" "$b") + + + # Find closest color to foreground for code block text + local code_fg="" + min_distance=999999999 + for color in "${all_unique_colors[@]}"; do + if [ "$color" != "$fg_color" ]; then + distance=$(color_distance "$color" "$fg_color") + if [ $distance -lt $min_distance ]; then + min_distance=$distance + code_fg="$color" + fi + fi + done + [ -z "$code_fg" ] && code_fg="#e0e0e0" # Fallback + + # Extract text selection colors from Alacritty + local selection_bg="" + local selection_fg="" + if [ -f "$CURRENT_THEME_DIR/alacritty.toml" ]; then + selection_bg=$(grep -A 5 "\[colors.selection\]" "$CURRENT_THEME_DIR/alacritty.toml" | grep "^background = " | sed "s/.*[\"']0x/#/;s/.*[\"']#/#/;s/[\"'].*//;s/.*#\([0-9a-fA-F]\{6\}\).*/\#\1/" | head -1 | tr '[:upper:]' '[:lower:]') + local selection_text=$(grep -A 5 "\[colors.selection\]" "$CURRENT_THEME_DIR/alacritty.toml" | grep "^text = " | sed "s/.*[\"']0x/#/;s/.*[\"']#/#/;s/[\"'].*//;s/.*#\([0-9a-fA-F]\{6\}\).*/\#\1/" | head -1 | tr '[:upper:]' '[:lower:]') + + # If text is set to CellForeground/CellBackground, use the appropriate color + if [ -z "$selection_text" ] || [[ "$(grep -A 5 "\[colors.selection\]" "$CURRENT_THEME_DIR/alacritty.toml" | grep "^text = ")" == *"CellForeground"* ]]; then + selection_fg="$fg_color" + elif [[ "$(grep -A 5 "\[colors.selection\]" "$CURRENT_THEME_DIR/alacritty.toml" | grep "^text = ")" == *"CellBackground"* ]]; then + selection_fg="$bg_color" + else + selection_fg="$selection_text" + fi + fi + + # Fallback if no selection colors found + if [ -z "$selection_bg" ]; then + read -r r1 g1 b1 <<<"$(hex_to_rgb "$bg_color")" + read -r r2 g2 b2 <<<"$(hex_to_rgb "$fg_color")" + local r=$(((r1 * 3 + r2) / 4)) # 75% background, 25% foreground + local g=$(((g1 * 3 + g2) / 4)) + local b=$(((b1 * 3 + b2) / 4)) + selection_bg=$(printf "#%02x%02x%02x" "$r" "$g" "$b") + fi + + # Use contrasting color for selection text if not defined + if [ -z "$selection_fg" ]; then + # Calculate brightness of selection background + local sel_brightness=$(calculate_brightness "$selection_bg") + if [ $sel_brightness -gt 127 ]; then + selection_fg="$bg_color" # Dark text on light selection + else + selection_fg="$fg_color" # Light text on dark selection + fi + fi + + # Extract border color from btop theme + local border_color="" + if [ -f "$CURRENT_THEME_DIR/btop.theme" ]; then + # Look for theme[div_line] in btop theme + local btop_divline=$(grep 'theme\[div_line\]' "$CURRENT_THEME_DIR/btop.theme" | head -1) + + if [ -n "$btop_divline" ]; then + # Extract the color value after the = sign + local extracted=$(echo "$btop_divline" | sed 's/.*=//' | xargs) + + # Check if it's a hex color and lowercase it + if [[ $extracted =~ ^#[0-9a-fA-F]{6}$ ]]; then + border_color=$(echo "$extracted" | tr '[:upper:]' '[:lower:]') + elif [[ $extracted =~ ^[0-9a-fA-F]{6}$ ]]; then + # Add # if missing and lowercase + border_color=$(echo "#$extracted" | tr '[:upper:]' '[:lower:]') + fi + fi + fi + + # Fallback if no border color found + if [ -z "$border_color" ]; then + # Use a color between bg and fg + read -r r1 g1 b1 <<<"$(hex_to_rgb "$bg_color")" + read -r r2 g2 b2 <<<"$(hex_to_rgb "$fg_color")" + local r=$(((r1 + r2) / 3)) # Closer to background + local g=$(((g1 + g2) / 3)) + local b=$(((b1 + b2) / 3)) + border_color=$(printf "#%02x%02x%02x" "$r" "$g" "$b") + fi + + # Set text colors for muted/faint based on contrast + local text_muted_color="$border_color" + local text_faint_color="$border_color" + + # Validate border color contrast against background + + # Represents a 3:1 WCAG contrast ratio + local ideal_contrast_ratio=300 + + local border_contrast=$(calculate_contrast_ratio "$border_color" "$bg_color") + if ! meets_contrast_threshold "$border_contrast" "$ideal_contrast_ratio"; then + # Override text colors for readability, keep border color for visibility + text_muted_color="$fg_color" + text_faint_color="$fg_color" + fi + + # Get unique colors array (without bg/fg) sorted by frequency + local -a unique_colors + readarray -t unique_colors < <(echo "$filtered_data" | sort_colors_by_frequency) + + # Fill the 13 color slots (code colors handled separately) + local -a color_slots + readarray -t color_slots < <(fill_color_slots "${unique_colors[@]}" | tr ' ' '\n') + + # Extract fonts + local monospace_font="JetBrainsMono Nerd Font" + local ui_font="Liberation Sans" + + if [ -f "$CURRENT_THEME_DIR/alacritty.toml" ]; then + local alacritty_font=$(grep -A 5 "\[font\]" "$CURRENT_THEME_DIR/alacritty.toml" | grep 'family = ' | head -1 | cut -d'"' -f2) + [ -n "$alacritty_font" ] && monospace_font="$alacritty_font" + fi + + if [ -f "$HOME/.config/fontconfig/fonts.conf" ]; then + local fontconfig_mono=$(xmlstarlet sel -t -v '//match[@target="pattern"][test/string="monospace"]/edit[@name="family"]/string' "$HOME/.config/fontconfig/fonts.conf" 2>/dev/null || true) + [ -n "$fontconfig_mono" ] && monospace_font="$fontconfig_mono" + + local fontconfig_sans=$(xmlstarlet sel -t -v '//match[@target="pattern"][test/string="sans-serif"]/edit[@name="family"]/string' "$HOME/.config/fontconfig/fonts.conf" 2>/dev/null || true) + [ -n "$fontconfig_sans" ] && ui_font="$fontconfig_sans" + fi + + # Generate CSS with 14-slot system + cat </dev/null || echo "unknown")") */ +/* Colors sorted by frequency, backgrounds by distance */ + +.theme-dark, .theme-light { + /* Core colors */ + --background-primary: $bg_color; + --text-normal: $fg_color; + + /* Background variations (always distance-based) */ + --background-primary-alt: $bg_primary_alt; + --background-secondary: $bg_secondary; + --background-secondary-alt: $bg_secondary_alt; + + /* Code block colors (always distance-based) */ + --code-background: $code_bg; + --code-foreground: $code_fg; + + /* Border color from btop theme */ + --border-color: $border_color; + + /* Selection colors from Alacritty */ + --text-selection: $selection_bg; + --text-selection-fg: $selection_fg; + + /* 13-slot color system for remaining elements */ + --text-title-h1: ${color_slots[0]}; + --text-title-h2: ${color_slots[1]}; + --text-title-h3: ${color_slots[2]}; + --text-title-h4: ${color_slots[3]}; + --text-title-h5: ${color_slots[4]}; + --text-title-h6: ${color_slots[4]}; /* Same as h5 */ + --text-link: ${color_slots[5]}; + --markup-code: ${color_slots[6]}; + --text-mark: ${color_slots[7]}; + --interactive-accent: ${color_slots[8]}; + --blockquote-border: ${color_slots[9]}; + --text-muted: $text_muted_color; /* Use text-specific color for muted text */ + --text-faint: $text_faint_color; /* Use text-specific color for faint text */ + + /* Additional mappings */ + --text-accent: var(--interactive-accent); + --text-accent-hover: var(--interactive-accent); + --text-error: var(--text-title-h1); + --text-error-hover: var(--text-title-h1); + --text-highlight-bg: $fg_color; /* Use text color as highlight background */ + --text-on-accent: $bg_color; + + --interactive-normal: var(--code-background); + --interactive-hover: var(--interactive-accent); + --interactive-accent-hover: var(--interactive-accent); + --interactive-success: var(--text-title-h2); + + --scrollbar-bg: var(--background-primary); + --scrollbar-thumb-bg: var(--code-background); + --scrollbar-active-thumb-bg: var(--interactive-accent); + + --background-modifier-border: var(--border-color); + --background-modifier-form-field: var(--code-background); + --background-modifier-form-field-highlighted: var(--code-background); + --background-modifier-box-shadow: rgba(0, 0, 0, 0.3); + --background-modifier-success: var(--interactive-success); + --background-modifier-error: var(--text-error); + --background-modifier-error-hover: var(--text-error); + --background-modifier-cover: rgba(0, 0, 0, 0.8); + + --link-color: var(--text-link); + --link-color-hover: var(--text-link); + --link-unresolved-color: var(--text-muted); + --link-unresolved-opacity: 0.7; + + --tag-color: var(--text-title-h3); + --tag-background: var(--code-background); + + --graph-line: var(--text-muted); + --graph-node: var(--interactive-accent); + --graph-node-unresolved: var(--text-muted); + --graph-node-focused: var(--text-link); + --graph-node-tag: var(--text-title-h3); + --graph-node-attachment: var(--text-title-h2); + + /* Fonts */ + --font-interface-theme: "$ui_font"; + --font-text-theme: "$ui_font"; + --font-monospace-theme: "$monospace_font"; +} + +/* Headers */ +.cm-header-1, .markdown-rendered h1 { color: var(--text-title-h1); } +.cm-header-2, .markdown-rendered h2 { color: var(--text-title-h2); } +.cm-header-3, .markdown-rendered h3 { color: var(--text-title-h3); } +.cm-header-4, .markdown-rendered h4 { color: var(--text-title-h4); } +.cm-header-5, .markdown-rendered h5 { color: var(--text-title-h5); } +.cm-header-6, .markdown-rendered h6 { color: var(--text-title-h6); } + +/* Code blocks */ +.markdown-rendered code { + font-family: var(--font-monospace-theme); + background-color: var(--code-background); + color: var(--markup-code); + padding: 2px 4px; + border-radius: 3px; +} + +.markdown-rendered pre { + background-color: var(--code-background); + border: 1px solid var(--background-modifier-border); + border-radius: 5px; +} + +.markdown-rendered pre code { + background-color: transparent; + color: var(--code-foreground); +} + +/* Syntax highlighting */ +.cm-s-obsidian span.cm-keyword { color: var(--text-title-h1); } +.cm-s-obsidian span.cm-string { color: var(--text-title-h2); } +.cm-s-obsidian span.cm-number { color: var(--text-title-h3); } +.cm-s-obsidian span.cm-comment { color: var(--text-muted); } +.cm-s-obsidian span.cm-operator { color: var(--text-link); } +.cm-s-obsidian span.cm-variable { color: var(--text-normal); } +.cm-s-obsidian span.cm-def { color: var(--text-link); } + +/* Highlighted text */ +.markdown-rendered mark, +.cm-s-obsidian span.cm-highlight, +mark { + background-color: var(--text-highlight-bg) !important; + color: var(--code-background) !important; +} + +/* Links */ +.markdown-rendered a { + color: var(--text-link); +} + +/* Blockquotes */ +.markdown-rendered blockquote { + border-left: 4px solid var(--blockquote-border); + padding-left: 1em; +} + +/* Status bar */ +.status-bar { + background-color: var(--code-background); + border-top: 1px solid var(--background-modifier-border); +} + +/* Active file */ +.workspace-leaf.mod-active .workspace-leaf-header-title { + color: var(--interactive-accent); +} + +.nav-file-title.is-active { + background-color: var(--code-background); + color: var(--interactive-accent); +} + +/* Text selection */ +::selection { + background-color: var(--text-selection); + color: var(--text-selection-fg); +} + +/* Search results */ +.search-result-file-title { + color: var(--interactive-accent); +} + +.search-result-file-match { + background-color: var(--code-background); + color: var(--text-normal); + border-left: 3px solid var(--interactive-accent); +} + +.search-result-file-matched-text { + color: var(--code-background); +} + +/* Tables */ +.markdown-rendered table { + border: 1px solid var(--background-modifier-border); +} + +.markdown-rendered th { + background-color: var(--code-background); + color: var(--text-accent); +} + +.markdown-rendered td { + border: 1px solid var(--background-modifier-border); +} + +/* Callouts */ +.callout { + border-left: 4px solid var(--interactive-accent); + background-color: var(--code-background); +} +.callout * { + color: var(--text-normal); +} + +/* Modal dialogs */ +.modal { + background-color: var(--background-primary); + border: 2px solid var(--background-modifier-border); +} + +/* Settings */ +.vertical-tab-header-group-title { + color: var(--interactive-accent); +} + +.vertical-tab-nav-item.is-active { + background-color: var(--code-background); + color: var(--interactive-accent); +} +EOF +} + +# Option handling +if [ "${1:-}" = "--reset" ]; then + echo "♻️ Resetting Omarchy themes and registry..." + if [ -f "$VAULTS_FILE" ] && [ -s "$VAULTS_FILE" ]; then + while IFS= read -r vault_path || [ -n "$vault_path" ]; do + case "$vault_path" in ""|\#*) continue ;; esac + vault_path="${vault_path%/}" + vault_name=$(basename "$vault_path") + theme_dir="$vault_path/.obsidian/themes/Omarchy" + if [ -d "$theme_dir" ]; then + rm -rf "$theme_dir" + echo " ✅ $vault_name (theme removed)" + else + echo " ℹ️ $vault_name (no theme present)" + fi + done <"$VAULTS_FILE" + fi + rm -f "$VAULTS_FILE" + echo "✅ Registry removed" + exit 0 +fi + +# Main update logic +echo "🔄 Updating Obsidian vaults..." + +# Step 1: ensure registry exists (bootstrap if needed) +ensure_vaults_file + +while IFS= read -r vault_path || [ -n "$vault_path" ]; do + case "$vault_path" in "" | \#*) continue ;; esac + vault_path="${vault_path%/}" + vault_name=$(basename "$vault_path") + + # Step 2: verify path exists; log/skip gracefully if invalid + if [ ! -d "$vault_path" ] || [ ! -d "$vault_path/.obsidian" ]; then + echo " ❌ $vault_name (invalid entry: missing directory or .obsidian)" + continue + fi + + # Ensure theme files exist for this vault + ensure_theme_scaffold "$vault_path" + THEME_DIR="$vault_path/.obsidian/themes/Omarchy" + + # Step 3: update theme.css + if [ -f "$CURRENT_THEME_DIR/obsidian.css" ]; then + cp "$CURRENT_THEME_DIR/obsidian.css" "$THEME_DIR/theme.css" + echo " ✅ $vault_name (custom theme)" + else + extract_theme_data >"$THEME_DIR/theme.css" + echo " ✅ $vault_name (generated theme)" + fi +done <"$VAULTS_FILE" diff --git a/bin/omarchy-theme-set-vscode b/bin/omarchy-theme-set-vscode new file mode 100755 index 0000000000..c04010ca42 --- /dev/null +++ b/bin/omarchy-theme-set-vscode @@ -0,0 +1,47 @@ +#!/bin/bash + +# Note: We cannot use `jq` to update settings.json because it’s JSONC (allows comments), +# which jq doesn’t support. + +# Parameters: EDITOR_CMD SETTINGS_PATH SKIP_FLAG EDITOR_NAME +EDITOR_CMD="${1:-code}" +SETTINGS_PATH="${2:-$HOME/.config/Code/User/settings.json}" +SKIP_FLAG="${3:-$HOME/.local/state/omarchy/toggles/skip-vscode-theme-changes}" +EDITOR_NAME="${4:-VS Code}" + +VS_CODE_THEME="$HOME/.config/omarchy/current/theme/vscode.json" + +if omarchy-cmd-present "$EDITOR_CMD" && [[ ! -f "$SKIP_FLAG" ]]; then + if [[ -f "$VS_CODE_THEME" ]]; then + theme_name=$(jq -r '.name' "$VS_CODE_THEME") + extension=$(jq -r '.extension' "$VS_CODE_THEME") + + # Install $EDITOR_NAME theme extension + if [[ -n "$extension" ]] && ! "$EDITOR_CMD" --list-extensions | grep -Fxq "$extension"; then + "$EDITOR_CMD" --install-extension "$extension" >/dev/null + fi + + # Create config file if there isn't already one + mkdir -p "$(dirname "$SETTINGS_PATH")" + if [[ ! -f "$SETTINGS_PATH" ]]; then + printf '{\n}\n' >"$SETTINGS_PATH" + fi + + # Create a `workbench.colorTheme` entry in settings. + if ! grep -q '"workbench.colorTheme"' "$SETTINGS_PATH"; then + # Insert `"workbench.colorTheme": "",` immediately after the first `{` + # Use sed's first-match range (0,/{/) to only replace the first `{` + sed -i --follow-symlinks -E '0,/\{/{s/\{/{\ "workbench.colorTheme": "",/}' "$SETTINGS_PATH" + fi + + # Update theme + sed -i --follow-symlinks -E \ + "s/(\"workbench.colorTheme\"[[:space:]]*:[[:space:]]*\")[^\"]*(\")/\1$theme_name\2/" \ + "$SETTINGS_PATH" + else + # Remove theme from settings.json when the theme doesn't have $EDITOR_NAME support + if [[ -f "$SETTINGS_PATH" ]]; then + sed -i --follow-symlinks -E 's/\"workbench\.colorTheme\"[[:space:]]*:[^,}]*,?//' "$SETTINGS_PATH" + fi + fi +fi diff --git a/bin/omarchy-theme-update b/bin/omarchy-theme-update index a4ecbde6a6..aa68f09509 100755 --- a/bin/omarchy-theme-update +++ b/bin/omarchy-theme-update @@ -1,5 +1,8 @@ #!/bin/bash for dir in ~/.config/omarchy/themes/*/; do - [ -d "$dir" ] && [ ! -L "${dir%/}" ] && echo "Updating: $(basename "$dir")" && git -C "$dir" pull + if [[ -d $dir ]] && [[ ! -L "${dir%/}" ]] && [[ -d "$dir/.git" ]]; then + echo "Updating: $(basename "$dir")" + git -C "$dir" pull + fi done diff --git a/bin/omarchy-toggle-idle b/bin/omarchy-toggle-idle index a19546145d..aa69cf50d4 100755 --- a/bin/omarchy-toggle-idle +++ b/bin/omarchy-toggle-idle @@ -4,6 +4,6 @@ if pgrep -x hypridle >/dev/null; then pkill -x hypridle notify-send "Stop locking computer when idle" else - uwsm app -- hypridle >/dev/null 2>&1 & + uwsm-app -- hypridle >/dev/null 2>&1 & notify-send "Now locking computer when idle" fi diff --git a/bin/omarchy-toggle-nightlight b/bin/omarchy-toggle-nightlight index 2ab2deb6e6..99b0286b4d 100755 --- a/bin/omarchy-toggle-nightlight +++ b/bin/omarchy-toggle-nightlight @@ -6,7 +6,7 @@ OFF_TEMP=6000 # Ensure hyprsunset is running if ! pgrep -x hyprsunset; then - setsid uwsm app -- hyprsunset & + setsid uwsm-app -- hyprsunset & sleep 1 # Give it time to register fi diff --git a/bin/omarchy-toggle-waybar b/bin/omarchy-toggle-waybar index 9714185fa6..713878272e 100755 --- a/bin/omarchy-toggle-waybar +++ b/bin/omarchy-toggle-waybar @@ -3,5 +3,5 @@ if pgrep -x waybar >/dev/null; then pkill -x waybar else - uwsm app -- waybar >/dev/null 2>&1 & + uwsm-app -- waybar >/dev/null 2>&1 & fi diff --git a/bin/omarchy-tui-install b/bin/omarchy-tui-install index a15d364c98..657b70a6f0 100755 --- a/bin/omarchy-tui-install +++ b/bin/omarchy-tui-install @@ -5,7 +5,7 @@ if [ "$#" -ne 4 ]; then APP_NAME=$(gum input --prompt "Name> " --placeholder "My TUI") APP_EXEC=$(gum input --prompt "Launch Command> " --placeholder "lazydocker or bash -c 'dust; read -n 1 -s'") WINDOW_STYLE=$(gum choose --header "Window style" float tile) - ICON_URL=$(gum input --prompt "Icon URL> " --placeholder "See https://dashboardicons.com (must use PNG!)") + ICON_URL=$(gum input --prompt "Icon URL> " --placeholder "See https://dashboardicons.com (must use PNG or SVG!)") else APP_NAME="$1" APP_EXEC="$2" @@ -20,13 +20,16 @@ fi ICON_DIR="$HOME/.local/share/applications/icons" DESKTOP_FILE="$HOME/.local/share/applications/$APP_NAME.desktop" -ICON_PATH="$ICON_DIR/$APP_NAME.png" -mkdir -p "$ICON_DIR" - -if ! curl -sL -o "$ICON_PATH" "$ICON_URL"; then - echo "Error: Failed to download icon." - return 1 +if [[ ! "$ICON_URL" =~ ^https?:// ]] && [ -f "$ICON_URL" ]; then + ICON_PATH="$ICON_URL" +else + ICON_PATH="$ICON_DIR/$APP_NAME.png" + mkdir -p "$ICON_DIR" + if ! curl -sL -o "$ICON_PATH" "$ICON_URL"; then + echo "Error: Failed to download icon." + exit 1 + fi fi if [[ $WINDOW_STYLE == "float" ]]; then @@ -40,7 +43,7 @@ cat >"$DESKTOP_FILE" </dev/null; then + sudo pacman-key --recv-keys 40DFB630FF42BCFFB047046CF0134EE680CAC571 --keyserver keys.openpgp.org + sudo pacman-key --lsign-key 40DFB630FF42BCFFB047046CF0134EE680CAC571 + + # This is generally not a good idea, but this is a special case because we're going to be updating + # the full set of packages in omarchy-update-system-pkgs right after this (and it needs latest keyring)! + sudo pacman -Sy + omarchy-pkg-add omarchy-keyring + + sudo pacman-key --list-keys 40DFB630FF42BCFFB047046CF0134EE680CAC571 +fi diff --git a/bin/omarchy-update-perform b/bin/omarchy-update-perform new file mode 100755 index 0000000000..f2b7ddc061 --- /dev/null +++ b/bin/omarchy-update-perform @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e + +omarchy-update-time +omarchy-update-keyring +omarchy-update-available-reset +omarchy-update-system-pkgs +omarchy-migrate +omarchy-hook post-update +omarchy-update-restart diff --git a/bin/omarchy-update-restart b/bin/omarchy-update-restart index 513cf80b67..2811e937e1 100755 --- a/bin/omarchy-update-restart +++ b/bin/omarchy-update-restart @@ -5,9 +5,6 @@ if [ "$(uname -r | sed 's/-arch/\.arch/')" != "$(pacman -Q linux | awk '{print $ elif [ -f "$HOME/.local/state/omarchy/reboot-required" ]; then gum confirm "Updates require reboot. Ready?" && omarchy-state clear re*-required && sudo reboot now - -elif [ -f "$HOME/.local/state/omarchy/relaunch-required" ]; then - gum confirm "Updates require Hyprland relaunch. Ready?" && omarchy-state clear re*-required && uwsm stop fi for file in "$HOME"/.local/state/omarchy/restart-*-required; do diff --git a/bin/omarchy-update-system-pkgs b/bin/omarchy-update-system-pkgs index 2c41d73394..dd58586f79 100755 --- a/bin/omarchy-update-system-pkgs +++ b/bin/omarchy-update-system-pkgs @@ -1,20 +1,23 @@ #!/bin/bash +set -e + echo -e "\e[32m\nUpdate system packages\e[0m" -echo "sudo pacman -Syu --noconfirm --ignore \"$(omarchy-pkg-ignored)\"" -sudo pacman -Syu --noconfirm --ignore "$(omarchy-pkg-ignored)" +sudo pacman -Syu --noconfirm -if omarchy-pkg-aur-accessible; then - echo -e "\e[32m\nUpdate AUR packages\e[0m" - echo "yay -Syu --noconfirm --ignore \"$(omarchy-pkg-ignored)\"" - yay -Syu --noconfirm --ignore "$(omarchy-pkg-ignored)" - echo -else - echo -e "\e[31m\nAUR is unavailable (so skipping updates)\e[0m" - echo +# Update AUR packages if any are installed +if pacman -Qem >/dev/null; then + if omarchy-pkg-aur-accessible; then + echo -e "\e[32m\nUpdate AUR packages\e[0m" + yay -Sua --noconfirm + echo + else + echo -e "\e[31m\nAUR is unavailable (so skipping updates)\e[0m" + echo + fi fi -orphans=$(pacman -Qtdq) +orphans=$(pacman -Qtdq || true) if [[ -n $orphans ]]; then echo -e "\e[32m\nRemove orphan system packages\e[0m" for pkg in $orphans; do diff --git a/bin/omarchy-update-time b/bin/omarchy-update-time new file mode 100755 index 0000000000..14fc8b6fa5 --- /dev/null +++ b/bin/omarchy-update-time @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "Updating time..." +sudo systemctl restart systemd-timesyncd diff --git a/bin/omarchy-upload-log b/bin/omarchy-upload-log new file mode 100755 index 0000000000..bd98da8618 --- /dev/null +++ b/bin/omarchy-upload-log @@ -0,0 +1,126 @@ +#!/bin/bash + +# Upload logs to 0x0.st + +LOG_TYPE="${1:-install}" +TEMP_LOG="/tmp/upload-log.txt" +SYSTEM_INFO="/tmp/system-info.txt" + +# Get system information if fastfetch is available +if command -v fastfetch >/dev/null 2>&1; then + { + echo "=========================================" + echo "SYSTEM INFORMATION" + echo "=========================================" + # Use fastfetch with no logo to get clean output + fastfetch --logo none --pipe 2>/dev/null || echo "Failed to get system info" + echo "" + echo "=========================================" + echo "LOG CONTENT" + echo "=========================================" + echo "" + } >"$SYSTEM_INFO" +else + # Fallback to basic info if fastfetch isn't available + { + echo "=========================================" + echo "SYSTEM INFORMATION" + echo "=========================================" + echo "Hostname: $(hostname)" + echo "Kernel: $(uname -r)" + echo "Date: $(date)" + echo "" + echo "=========================================" + echo "LOG CONTENT" + echo "=========================================" + echo "" + } >"$SYSTEM_INFO" +fi + +case "$LOG_TYPE" in +install) + ARCHINSTALL_LOG="/var/log/archinstall/install.log" + OMARCHY_LOG="/var/log/omarchy-install.log" + + # Combine system info with logs + cat "$SYSTEM_INFO" >"$TEMP_LOG" + cat $ARCHINSTALL_LOG $OMARCHY_LOG >>"$TEMP_LOG" 2>/dev/null + + if [ ! -s "$TEMP_LOG" ]; then + echo "Error: No install logs found" + exit 1 + fi + + echo "Uploading installation log to 0x0.st..." + ;; + +this-boot) + # Combine system info with boot logs + cat "$SYSTEM_INFO" >"$TEMP_LOG" + journalctl -b 0 >>"$TEMP_LOG" 2>/dev/null + + if [ ! -s "$TEMP_LOG" ]; then + echo "Error: No logs found for current boot" + exit 1 + fi + + echo "Uploading current boot logs to 0x0.st..." + ;; + +last-boot) + # Combine system info with previous boot logs + cat "$SYSTEM_INFO" >"$TEMP_LOG" + journalctl -b -1 >>"$TEMP_LOG" 2>/dev/null + + if [ ! -s "$TEMP_LOG" ]; then + echo "Error: No logs found for previous boot" + exit 1 + fi + + echo "Uploading previous boot logs to 0x0.st..." + ;; + +installed) + # System info plus all installed packages + cat "$SYSTEM_INFO" >"$TEMP_LOG" + { + echo "" + echo "=========================================" + echo "INSTALLED PACKAGES (pacman -Q)" + echo "=========================================" + pacman -Q 2>/dev/null || echo "Failed to get package list" + } >>"$TEMP_LOG" + + if [ ! -s "$TEMP_LOG" ]; then + echo "Error: Failed to gather system information" + exit 1 + fi + + echo "Uploading system information to 0x0.st..." + ;; + +*) + echo "Usage: $0 [install|this-boot|last-boot|system-info]" + echo " install - Upload installation logs (default)" + echo " this-boot - Upload logs from current boot" + echo " last-boot - Upload logs from previous boot" + echo " installed - Upload system info and installed packages" + exit 1 + ;; +esac + +echo "" + +URL=$(curl -sF "file=@$TEMP_LOG" -Fexpires=24 https://0x0.st) + +if [ $? -eq 0 ] && [ -n "$URL" ]; then + echo "✓ Log uploaded successfully!" + echo "Share this URL:" + echo "" + echo " $URL" + echo "" + echo "This link will expire in 24 hours." +else + echo "Error: Failed to upload log file" + exit 1 +fi diff --git a/bin/omarchy-version b/bin/omarchy-version index 4ac8481501..5ddc823f63 100755 --- a/bin/omarchy-version +++ b/bin/omarchy-version @@ -1,3 +1,2 @@ #!/bin/bash - -git -C "$OMARCHY_PATH" describe --tags $(git -C "$OMARCHY_PATH" rev-list --tags --max-count=1) +cat $OMARCHY_PATH/version diff --git a/bin/omarchy-version-channel b/bin/omarchy-version-channel new file mode 100755 index 0000000000..8affb87ed4 --- /dev/null +++ b/bin/omarchy-version-channel @@ -0,0 +1,23 @@ +#!/bin/bash + +if grep -q "https://stable-mirror.omarchy.org/" /etc/pacman.d/mirrorlist; then + mirror="stable" +elif grep -q "https://mirror.omarchy.org/" /etc/pacman.d/mirrorlist; then + mirror="edge" +else + mirror="unknown" +fi + +if grep -q "https://pkgs.omarchy.org/stable/" /etc/pacman.conf; then + pkgs="stable" +elif grep -q "https://pkgs.omarchy.org/edge/" /etc/pacman.conf; then + pkgs="edge" +else + pkgs="unknown" +fi + +if [[ $mirror == $pkgs ]]; then + echo $mirror +else + echo "$mirror / $pkgs" +fi diff --git a/bin/omarchy-version-pkgs b/bin/omarchy-version-pkgs new file mode 100755 index 0000000000..bc63811030 --- /dev/null +++ b/bin/omarchy-version-pkgs @@ -0,0 +1,3 @@ +#!/bin/bash + +date -d "$(grep upgraded /var/log/pacman.log | tail -1 | sed -E 's/\[([^]]+)\].*/\1/')" "+%A, %B %d %Y at %H:%M" diff --git a/bin/omarchy-webapp-handler-hey b/bin/omarchy-webapp-handler-hey new file mode 100755 index 0000000000..37f4cf2d2e --- /dev/null +++ b/bin/omarchy-webapp-handler-hey @@ -0,0 +1,11 @@ +#!/bin/bash +url="$1" +web_url="https://app.hey.com" + +# Handle mailto: URLs +if [[ $url =~ ^mailto: ]]; then + email=$(echo "$url" | sed 's/mailto://') + web_url="https://app.hey.com/messages/new?to=$email" +fi + +exec omarchy-launch-webapp "$web_url" diff --git a/bin/omarchy-webapp-handler-zoom b/bin/omarchy-webapp-handler-zoom new file mode 100755 index 0000000000..a27411ed22 --- /dev/null +++ b/bin/omarchy-webapp-handler-zoom @@ -0,0 +1,20 @@ +#!/bin/bash + +url="$1" +web_url="https://app.zoom.us/wc/home" + +if [[ $url =~ ^zoom(mtg|us):// ]]; then + confno=$(echo "$url" | sed -n 's/.*[?&]confno=\([^&]*\).*/\1/p') + + if [[ -n $confno ]]; then + pwd=$(echo "$url" | sed -n 's/.*[?&]pwd=\([^&]*\).*/\1/p') + + if [[ -n $pwd ]]; then + web_url="https://app.zoom.us/wc/join/$confno?pwd=$pwd" + else + web_url="https://app.zoom.us/wc/join/$confno" + fi + fi +fi + +exec omarchy-launch-webapp "$web_url" diff --git a/bin/omarchy-webapp-install b/bin/omarchy-webapp-install index a75a32883e..e954e842c7 100755 --- a/bin/omarchy-webapp-install +++ b/bin/omarchy-webapp-install @@ -1,46 +1,71 @@ #!/bin/bash -if [ "$#" -ne 3 ]; then +if [ "$#" -lt 3 ]; then echo -e "\e[32mLet's create a new web app you can start with the app launcher.\n\e[0m" APP_NAME=$(gum input --prompt "Name> " --placeholder "My favorite web app") APP_URL=$(gum input --prompt "URL> " --placeholder "https://example.com") - ICON_URL=$(gum input --prompt "Icon URL> " --placeholder "See https://dashboardicons.com (must use PNG!)") + ICON_REF=$(gum input --prompt "Icon URL> " --placeholder "See https://dashboardicons.com (must use PNG!)") + CUSTOM_EXEC="" + MIME_TYPES="" + INTERACTIVE_MODE=true else APP_NAME="$1" APP_URL="$2" - ICON_URL="$3" + ICON_REF="$3" + CUSTOM_EXEC="$4" # Optional custom exec command + MIME_TYPES="$5" # Optional mime types + INTERACTIVE_MODE=false fi -if [[ -z "$APP_NAME" || -z "$APP_URL" || -z "$ICON_URL" ]]; then +# Ensure valid execution +if [[ -z "$APP_NAME" || -z "$APP_URL" || -z "$ICON_REF" ]]; then echo "You must set app name, app URL, and icon URL!" exit 1 fi +# Refer to local icon or fetch remotely from URL ICON_DIR="$HOME/.local/share/applications/icons" -DESKTOP_FILE="$HOME/.local/share/applications/$APP_NAME.desktop" -ICON_PATH="$ICON_DIR/$APP_NAME.png" - -mkdir -p "$ICON_DIR" +if [[ $ICON_REF =~ ^https?:// ]]; then + ICON_PATH="$ICON_DIR/$APP_NAME.png" + if curl -sL -o "$ICON_PATH" "$ICON_REF"; then + ICON_PATH="$ICON_DIR/$APP_NAME.png" + else + echo "Error: Failed to download icon." + exit 1 + fi +else + ICON_PATH="$ICON_DIR/$ICON_REF" +fi -if ! curl -sL -o "$ICON_PATH" "$ICON_URL"; then - echo "Error: Failed to download icon." - return 1 +# Use custom exec if provided, otherwise default behavior +if [[ -n $CUSTOM_EXEC ]]; then + EXEC_COMMAND="$CUSTOM_EXEC" +else + EXEC_COMMAND="omarchy-launch-webapp $APP_URL" fi +# Create application .desktop file +DESKTOP_FILE="$HOME/.local/share/applications/$APP_NAME.desktop" + cat >"$DESKTOP_FILE" <>"$DESKTOP_FILE" +fi + chmod +x "$DESKTOP_FILE" -if [ "$#" -ne 3 ]; then +if [[ $INTERACTIVE_MODE == true ]]; then echo -e "You can now find $APP_NAME using the app launcher (SUPER + SPACE)\n" fi diff --git a/bin/omarchy-webapp-remove b/bin/omarchy-webapp-remove index 833e898991..a6f4ea4656 100755 --- a/bin/omarchy-webapp-remove +++ b/bin/omarchy-webapp-remove @@ -6,7 +6,7 @@ DESKTOP_DIR="$HOME/.local/share/applications/" if [ "$#" -eq 0 ]; then # Find all web apps while IFS= read -r -d '' file; do - if grep -q '^Exec=.*omarchy-launch-webapp.*' "$file"; then + if grep -q '^Exec=.*\(omarchy-launch-webapp\|omarchy-webapp-handler\).*' "$file"; then WEB_APPS+=("$(basename "${file%.desktop}")") fi done < <(find "$DESKTOP_DIR" -name '*.desktop' -print0) @@ -30,7 +30,7 @@ else fi if [[ ${#APP_NAMES[@]} -eq 0 ]]; then - echo "You must provide web app names." + echo "You must select at least one web app to remove." exit 1 fi diff --git a/bin/omarchy-windows-vm b/bin/omarchy-windows-vm new file mode 100755 index 0000000000..3ef9eb1102 --- /dev/null +++ b/bin/omarchy-windows-vm @@ -0,0 +1,445 @@ +#!/bin/bash +COMPOSE_FILE="$HOME/.config/windows/docker-compose.yml" + +check_prerequisites() { + local DISK_SIZE_GB=${1:-64} + local REQUIRED_SPACE=$((DISK_SIZE_GB + 10)) # Add 10GB for Windows ISO and overhead + + # Check for KVM support + if [ ! -e /dev/kvm ]; then + gum style \ + --border normal \ + --padding "1 2" \ + --margin "1" \ + "❌ KVM virtualization not available!" \ + "" \ + "Please enable virtualization in BIOS or run:" \ + " sudo modprobe kvm-intel # for Intel CPUs" \ + " sudo modprobe kvm-amd # for AMD CPUs" + exit 1 + fi + + # Check disk space + AVAILABLE_SPACE=$(df "$HOME" | awk 'NR==2 {print int($4/1024/1024)}') + if [ "$AVAILABLE_SPACE" -lt "$REQUIRED_SPACE" ]; then + echo "❌ Insufficient disk space!" + echo " Available: ${AVAILABLE_SPACE}GB" + echo " Required: ${REQUIRED_SPACE}GB (${DISK_SIZE_GB}GB disk + 10GB for Windows image)" + exit 1 + fi +} + +install_windows() { + # Set up trap to handle Ctrl+C + trap "echo ''; echo 'Installation cancelled by user'; exit 1" INT + + check_prerequisites + + omarchy-pkg-add freerdp openbsd-netcat gum + + mkdir -p "$HOME/.windows" + mkdir -p "$HOME/.config/windows" + mkdir -p "$HOME/.local/share/applications/icons" + + # Install Windows VM icon and desktop file + if [ -f "$OMARCHY_PATH/applications/icons/windows.png" ]; then + cp "$OMARCHY_PATH/applications/icons/windows.png" "$HOME/.local/share/applications/icons/windows.png" + fi + + cat << EOF | tee "$HOME/.local/share/applications/windows-vm.desktop" > /dev/null +[Desktop Entry] +Name=Windows +Comment=Start Windows VM via Docker and connect with RDP +Exec=uwsm app -- omarchy-windows-vm launch +Icon=$HOME/.local/share/applications/icons/windows.png +Terminal=false +Type=Application +Categories=System;Virtualization; +EOF + + # Get system resources + TOTAL_RAM=$(free -h | awk 'NR==2 {print $2}') + TOTAL_RAM_GB=$(awk 'NR==1 {printf "%d", $2/1024/1024}' /proc/meminfo) + TOTAL_CORES=$(nproc) + + echo "" + echo "System Resources Detected:" + echo " Total RAM: $TOTAL_RAM" + echo " Total CPU Cores: $TOTAL_CORES" + echo "" + + RAM_OPTIONS="" + for size in 2 4 8 16 32 64; do + if [ $size -le $TOTAL_RAM_GB ]; then + RAM_OPTIONS="$RAM_OPTIONS ${size}G" + fi + done + + SELECTED_RAM=$(echo $RAM_OPTIONS | tr ' ' '\n' | gum choose --selected="4G" --header="How much RAM would you like to allocate to Windows VM?") + + # Check if user cancelled + if [ -z "$SELECTED_RAM" ]; then + echo "Installation cancelled by user" + exit 1 + fi + + SELECTED_CORES=$(gum input --placeholder="Number of CPU cores (1-$TOTAL_CORES)" --value="2" --header="How many CPU cores would you like to allocate to Windows VM?" --char-limit=2) + + # Check if user cancelled (Ctrl+C in gum input returns empty string) + if [ -z "$SELECTED_CORES" ]; then + echo "Installation cancelled by user" + exit 1 + fi + + if ! [[ "$SELECTED_CORES" =~ ^[0-9]+$ ]] || [ "$SELECTED_CORES" -lt 1 ] || [ "$SELECTED_CORES" -gt "$TOTAL_CORES" ]; then + echo "Invalid input. Using default: 2 cores" + SELECTED_CORES=2 + fi + + AVAILABLE_SPACE=$(df "$HOME" | awk 'NR==2 {print int($4/1024/1024)}') + MAX_DISK_GB=$((AVAILABLE_SPACE - 10)) # Leave 10GB for Windows image + + # Check if we have enough space for minimum + if [ $MAX_DISK_GB -lt 32 ]; then + echo "❌ Insufficient disk space for Windows VM!" + echo " Available: ${AVAILABLE_SPACE}GB" + echo " Minimum required: 42GB (32GB disk + 10GB for Windows image)" + exit 1 + fi + + DISK_OPTIONS="" + for size in 32 64 128 256 512; do + if [ $size -le $MAX_DISK_GB ]; then + DISK_OPTIONS="$DISK_OPTIONS ${size}G" + fi + done + + # Default to 64G if available, otherwise 32G + DEFAULT_DISK="64G" + if ! echo "$DISK_OPTIONS" | grep -q "64G"; then + DEFAULT_DISK="32G" + fi + + SELECTED_DISK=$(echo $DISK_OPTIONS | tr ' ' '\n' | gum choose --selected="$DEFAULT_DISK" --header="How much disk space would you like to give Windows VM? (64GB+ recommended)") + + # Check if user cancelled + if [ -z "$SELECTED_DISK" ]; then + echo "Installation cancelled by user" + exit 1 + fi + + # Extract just the number for prerequisite check + DISK_SIZE_NUM=$(echo "$SELECTED_DISK" | sed 's/G//') + + # Re-check prerequisites with selected disk size + check_prerequisites "$DISK_SIZE_NUM" + + # Prompt for username and password + USERNAME=$(gum input --placeholder="Username (Press enter to use default: docker)" --header="Enter Windows username:") + if [ -z "$USERNAME" ]; then + USERNAME="docker" + fi + + PASSWORD=$(gum input --placeholder="Password (Press enter to use default: admin)" --password --header="Enter Windows password:") + if [ -z "$PASSWORD" ]; then + PASSWORD="admin" + PASSWORD_DISPLAY="(default)" + else + PASSWORD_DISPLAY="(user-defined)" + fi + + # Display configuration summary + gum style \ + --border normal \ + --padding "1 2" \ + --margin "1" \ + --align left \ + --bold \ + "Windows VM Configuration" \ + "" \ + "RAM: $SELECTED_RAM" \ + "CPU: $SELECTED_CORES cores" \ + "Disk: $SELECTED_DISK" \ + "Username: $USERNAME" \ + "Password: $PASSWORD_DISPLAY" + + # Ask for confirmation + echo "" + if ! gum confirm "Proceed with this configuration?"; then + echo "Installation cancelled by user" + exit 1 + fi + + mkdir -p $HOME/Windows + + # Create docker-compose.yml in user config directory + cat << EOF | tee "$COMPOSE_FILE" > /dev/null +services: + windows: + image: dockurr/windows + container_name: omarchy-windows + environment: + VERSION: "11" + RAM_SIZE: "$SELECTED_RAM" + CPU_CORES: "$SELECTED_CORES" + DISK_SIZE: "$SELECTED_DISK" + USERNAME: "$USERNAME" + PASSWORD: "$PASSWORD" + devices: + - /dev/kvm + - /dev/net/tun + cap_add: + - NET_ADMIN + ports: + - 8006:8006 + - 3389:3389/tcp + - 3389:3389/udp + volumes: + - $HOME/.windows:/storage + - $HOME/Windows:/shared + restart: always + stop_grace_period: 2m +EOF + + echo "" + echo "Starting Windows VM installation..." + echo "This will download a Windows 11 image (may take 10-15 minutes)." + echo "" + echo "Monitor installation progress at: http://127.0.0.1:8006" + echo "" + + # Start docker-compose with user's config + echo "Starting Windows VM with docker-compose..." + if ! docker-compose -f "$COMPOSE_FILE" up -d 2>&1; then + echo "❌ Failed to start Windows VM!" + echo " Common issues:" + echo " - Docker daemon not running: sudo systemctl start docker" + echo " - Port already in use: check if another VM is running" + echo " - Permission issues: make sure you're in the docker group" + exit 1 + fi + + echo "" + echo "Windows VM is starting up!" + echo "" + echo "Opening browser to monitor installation..." + + # Open browser to monitor installation + sleep 3 + xdg-open "http://127.0.0.1:8006" + + echo "" + echo "Installation is running in the background." + echo "You can monitor progress at: http://127.0.0.1:8006" + echo "" + echo "Once finished, launch 'Windows' via Super + Space" + echo "" + echo "To stop the VM: omarchy-windows-vm stop" + echo "To change resources: ~/.config/windows/docker-compose.yml" + echo "" +} + +remove_windows() { + echo "Removing Windows VM..." + + docker-compose -f "$COMPOSE_FILE" down 2>/dev/null || true + + docker rmi dockurr/windows 2>/dev/null || echo "Image already removed or not found" + + rm "$HOME/.local/share/applications/windows-vm.desktop" + rm -rf "$HOME/.config/windows" + rm -rf "$HOME/.windows" + + echo "" + echo "Windows VM removal completed!" +} + +launch_windows() { + KEEP_ALIVE=false + if [ "$1" = "--keep-alive" ] || [ "$1" = "-k" ]; then + KEEP_ALIVE=true + fi + + # Check if config exists + if [ ! -f "$COMPOSE_FILE" ]; then + echo "Windows VM not configured. Please run: omarchy-windows-vm install" + exit 1 + fi + + # Check if container is already running + CONTAINER_STATUS=$(docker inspect --format='{{.State.Status}}' omarchy-windows 2>/dev/null) + + if [ "$CONTAINER_STATUS" != "running" ]; then + echo "Starting Windows VM..." + + # Send desktop notification + notify-send " Starting Windows VM" " This can take 15-30 seconds" -t 15000 + + if ! docker-compose -f "$COMPOSE_FILE" up -d 2>&1; then + echo "❌ Failed to start Windows VM!" + echo " Try checking: omarchy-windows-vm status" + echo " View logs: docker logs omarchy-windows" + notify-send -u critical "Windows VM" "Failed to start Windows VM" + exit 1 + fi + + # Wait for RDP to be ready + echo "Waiting for Windows VM to be ready..." + WAIT_COUNT=0 + while ! nc -z 127.0.0.1 3389 2>/dev/null; do + sleep 2 + WAIT_COUNT=$((WAIT_COUNT + 1)) + if [ $WAIT_COUNT -gt 60 ]; then # 2 minutes timeout + echo "❌ Timeout waiting for RDP!" + echo " The VM might still be installing Windows." + echo " Check progress at: http://127.0.0.1:8006" + exit 1 + fi + done + + # Give it a moment more to fully initialize + sleep 5 + fi + + # Extract credentials from compose file + WIN_USER=$(grep "USERNAME:" "$COMPOSE_FILE" | sed 's/.*USERNAME: "\(.*\)"/\1/') + WIN_PASS=$(grep "PASSWORD:" "$COMPOSE_FILE" | sed 's/.*PASSWORD: "\(.*\)"/\1/') + + # Use defaults if not found + [ -z "$WIN_USER" ] && WIN_USER="docker" + [ -z "$WIN_PASS" ] && WIN_PASS="admin" + + # Build the connection info + if [ "$KEEP_ALIVE" = true ]; then + LIFECYCLE="VM will keep running after RDP closes +To stop: omarchy-windows-vm stop" + else + LIFECYCLE="VM will auto-stop when RDP closes" + fi + + gum style \ + --border normal \ + --padding "1 2" \ + --margin "1" \ + --align center \ + "Connecting to Windows VM" \ + "" \ + "$LIFECYCLE" + + # Detect display scale from Hyprland + HYPR_SCALE=$(hyprctl monitors -j | jq -r '.[] | select (.focused == true) | .scale') + SCALE_PERCENT=$(echo "$HYPR_SCALE" | awk '{print int($1 * 100)}') + + RDP_SCALE="" + if [ "$SCALE_PERCENT" -ge 170 ]; then + RDP_SCALE="/scale:180" + elif [ "$SCALE_PERCENT" -ge 130 ]; then + RDP_SCALE="/scale:140" + fi + # If scale is less than 130%, don't set any scale (use default 100) + + # Connect with RDP in fullscreen (auto-detects resolution) + xfreerdp3 /u:"$WIN_USER" /p:"$WIN_PASS" /v:127.0.0.1:3389 -grab-keyboard /sound /microphone /cert:ignore /title:"Windows VM - Omarchy" /dynamic-resolution /gfx:AVC444 /floatbar:sticky:off,default:visible,show:fullscreen $RDP_SCALE + + # After RDP closes, stop the container unless --keep-alive was specified + if [ "$KEEP_ALIVE" = false ]; then + echo "" + echo "RDP session closed. Stopping Windows VM..." + docker-compose -f "$COMPOSE_FILE" down + echo "Windows VM stopped." + else + echo "" + echo "RDP session closed. Windows VM is still running." + echo "To stop it: omarchy-windows-vm stop" + fi +} + +stop_windows() { + if [ ! -f "$COMPOSE_FILE" ]; then + echo "Windows VM not configured." + exit 1 + fi + + echo "Stopping Windows VM..." + docker-compose -f "$COMPOSE_FILE" down + echo "Windows VM stopped." +} + +status_windows() { + if [ ! -f "$COMPOSE_FILE" ]; then + echo "Windows VM not configured." + echo "To set up: omarchy-windows-vm install" + exit 1 + fi + + CONTAINER_STATUS=$(docker inspect --format='{{.State.Status}}' omarchy-windows 2>/dev/null) + + if [ -z "$CONTAINER_STATUS" ]; then + echo "Windows VM container not found." + echo "To start: omarchy-windows-vm launch" + elif [ "$CONTAINER_STATUS" = "running" ]; then + gum style \ + --border normal \ + --padding "1 2" \ + --margin "1" \ + --align left \ + "Windows VM Status: RUNNING" \ + "" \ + "Web interface: http://127.0.0.1:8006" \ + "RDP available: port 3389" \ + "" \ + "To connect: omarchy-windows-vm launch" \ + "To stop: omarchy-windows-vm stop" + else + echo "Windows VM is stopped (status: $CONTAINER_STATUS)" + echo "To start: omarchy-windows-vm launch" + fi +} + +show_usage() { + echo "Usage: omarchy-windows-vm [command] [options]" + echo "" + echo "Commands:" + echo " install Install and configure Windows VM" + echo " remove Remove Windows VM and optionally its data" + echo " launch [options] Start Windows VM (if needed) and connect via RDP" + echo " Options:" + echo " --keep-alive, -k Keep VM running after RDP closes" + echo " stop Stop the running Windows VM" + echo " status Show current VM status" + echo " help Show this help message" + echo "" + echo "Examples:" + echo " omarchy-windows-vm install # Set up Windows VM for first time" + echo " omarchy-windows-vm launch # Connect to VM (auto-stop on exit)" + echo " omarchy-windows-vm launch -k # Connect to VM (keep running)" + echo " omarchy-windows-vm stop # Shut down the VM" +} + +# Main command dispatcher +case "$1" in + install) + install_windows + ;; + remove) + remove_windows + ;; + launch|start) + launch_windows "$2" + ;; + stop|down) + stop_windows + ;; + status) + status_windows + ;; + help|--help|-h|"") + show_usage + ;; + *) + echo "Unknown command: $1" >&2 + echo "" >&2 + show_usage >&2 + exit 1 + ;; +esac diff --git a/boot.sh b/boot.sh index 98df4e438e..9593f758f0 100755 --- a/boot.sh +++ b/boot.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Set install mode to online since boot.sh is used for curl installations +export OMARCHY_ONLINE_INSTALL=true + ansi_art=' ▄▄▄ ▄█████▄ ▄███████████▄ ▄███████ ▄███████ ▄███████ ▄█ █▄ ▄█ █▄ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ @@ -26,7 +29,7 @@ git clone "https://github.com/${OMARCHY_REPO}.git" ~/.local/share/omarchy >/dev/ # Use custom branch if instructed, otherwise default to master OMARCHY_REF="${OMARCHY_REF:-master}" if [[ $OMARCHY_REF != "master" ]]; then - echo -e "\eUsing branch: $OMARCHY_REF" + echo -e "\e[32mUsing branch: $OMARCHY_REF\e[0m" cd ~/.local/share/omarchy git fetch origin "${OMARCHY_REF}" && git checkout "${OMARCHY_REF}" cd - diff --git a/config/alacritty/alacritty.toml b/config/alacritty/alacritty.toml index 05ec9940df..be44031c70 100644 --- a/config/alacritty/alacritty.toml +++ b/config/alacritty/alacritty.toml @@ -4,18 +4,18 @@ general.import = [ "~/.config/omarchy/current/theme/alacritty.toml" ] TERM = "xterm-256color" [font] -normal = { family = "CaskaydiaMono Nerd Font", style = "Regular" } -bold = { family = "CaskaydiaMono Nerd Font", style = "Bold" } -italic = { family = "CaskaydiaMono Nerd Font", style = "Italic" } +normal = { family = "JetBrainsMono Nerd Font", style = "Regular" } +bold = { family = "JetBrainsMono Nerd Font", style = "Bold" } +italic = { family = "JetBrainsMono Nerd Font", style = "Italic" } size = 9 [window] padding.x = 14 padding.y = 14 decorations = "None" -opacity = 0.98 [keyboard] bindings = [ -{ key = "F11", action = "ToggleFullscreen" } +{ key = "Insert", mods = "Shift", action = "Paste" }, +{ key = "Insert", mods = "Control", action = "Copy" } ] diff --git a/config/brave-flags.conf b/config/brave-flags.conf index d6d120e603..bce00d524a 100644 --- a/config/brave-flags.conf +++ b/config/brave-flags.conf @@ -1,3 +1,6 @@ --ozone-platform=wayland --ozone-platform-hint=wayland --enable-features=TouchpadOverscrollHistoryNavigation +--load-extension=~/.local/share/omarchy/default/chromium/extensions/copy-url +# Chromium crash workaround for Wayland color management on Hyprland - see https://github.com/hyprwm/Hyprland/issues/11957 +--disable-features=WaylandWpColorManagerV1 diff --git a/config/btop/btop.conf b/config/btop/btop.conf index c510f3e7f0..c150ea0a92 100644 --- a/config/btop/btop.conf +++ b/config/btop/btop.conf @@ -22,7 +22,7 @@ presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:defaul #* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists. #* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift. -vim_keys = False +vim_keys = True #* Rounded corners on boxes, is ignored if TTY mode is ON. rounded_corners = True diff --git a/config/chromium-flags.conf b/config/chromium-flags.conf index d6d120e603..bce00d524a 100644 --- a/config/chromium-flags.conf +++ b/config/chromium-flags.conf @@ -1,3 +1,6 @@ --ozone-platform=wayland --ozone-platform-hint=wayland --enable-features=TouchpadOverscrollHistoryNavigation +--load-extension=~/.local/share/omarchy/default/chromium/extensions/copy-url +# Chromium crash workaround for Wayland color management on Hyprland - see https://github.com/hyprwm/Hyprland/issues/11957 +--disable-features=WaylandWpColorManagerV1 diff --git a/config/elephant/calc.toml b/config/elephant/calc.toml new file mode 100644 index 0000000000..95d00d123c --- /dev/null +++ b/config/elephant/calc.toml @@ -0,0 +1 @@ +async = false diff --git a/config/elephant/desktopapplications.toml b/config/elephant/desktopapplications.toml new file mode 100644 index 0000000000..de17325b4a --- /dev/null +++ b/config/elephant/desktopapplications.toml @@ -0,0 +1,3 @@ +show_actions = false +only_search_title = true +history = false diff --git a/config/fastfetch/config.jsonc b/config/fastfetch/config.jsonc index b2cad35f9e..ddee6f3627 100644 --- a/config/fastfetch/config.jsonc +++ b/config/fastfetch/config.jsonc @@ -74,6 +74,12 @@ "keyColor": "blue", "text": "branch=$(omarchy-version-branch); echo \"$branch\"" }, + { + "type": "command", + "key": "│ ├󰔫", + "keyColor": "blue", + "text": "channel=$(omarchy-version-channel); echo \"$channel\"" + }, { "type": "kernel", "key": "│ ├", @@ -122,19 +128,25 @@ "break", { "type": "custom", - "format": "\u001b[90m┌────────────────────Uptime / Age────────────────────┐" + "format": "\u001b[90m┌────────────────Age / Uptime / Update───────────────┐" }, { "type": "command", - "key": " OS Age ", + "key": "󱦟 OS Age", "keyColor": "magenta", "text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); echo $days_difference days" }, { "type": "uptime", - "key": " Uptime ", + "key": "󱫐 Uptime", "keyColor": "magenta" }, + { + "type": "command", + "key": " Update", + "keyColor": "magenta", + "text": "updated=$(omarchy-version-pkgs); echo \"$updated\"" + }, { "type": "custom", "format": "\u001b[90m└────────────────────────────────────────────────────┘" diff --git a/config/fcitx5/conf/clipboard.conf b/config/fcitx5/conf/clipboard.conf new file mode 100644 index 0000000000..8aef5a8fdb --- /dev/null +++ b/config/fcitx5/conf/clipboard.conf @@ -0,0 +1,2 @@ +TriggerKey= +PastePrimaryKey= diff --git a/config/fontconfig/fonts.conf b/config/fontconfig/fonts.conf index 85c37b99bc..5463ba304f 100644 --- a/config/fontconfig/fonts.conf +++ b/config/fontconfig/fonts.conf @@ -24,7 +24,7 @@ monospace - CaskaydiaMono Nerd Font + JetBrainsMono Nerd Font diff --git a/config/ghostty/config b/config/ghostty/config new file mode 100644 index 0000000000..4360f279f2 --- /dev/null +++ b/config/ghostty/config @@ -0,0 +1,34 @@ +# Dynamic theme colors +config-file = ?"~/.config/omarchy/current/theme/ghostty.conf" + +# Font +font-family = "JetBrainsMono Nerd Font" +font-style = Regular +font-size = 9 + +# Window +window-theme = ghostty +window-padding-x = 14 +window-padding-y = 14 +confirm-close-surface=false +resize-overlay = never +gtk-toolbar-style = flat + +# Cursor styling +cursor-style = "block" +cursor-style-blink = false + +# Cursor styling + SSH session terminfo +# (all shell integration options must be passed together) +shell-integration-features = no-cursor,ssh-env + +# Keyboard bindings +keybind = shift+insert=paste_from_clipboard +keybind = control+insert=copy_to_clipboard +keybind = super+control+shift+alt+arrow_down=resize_split:down,100 +keybind = super+control+shift+alt+arrow_up=resize_split:up,100 +keybind = super+control+shift+alt+arrow_left=resize_split:left,100 +keybind = super+control+shift+alt+arrow_right=resize_split:right,100 + +# Slowdown mouse scrolling +mouse-scroll-multiplier = 0.95 diff --git a/config/git/config b/config/git/config new file mode 100644 index 0000000000..0f8e979785 --- /dev/null +++ b/config/git/config @@ -0,0 +1,28 @@ +# See https://git-scm.com/docs/git-config + +[alias] + co = checkout + br = branch + ci = commit + st = status +[init] + defaultBranch = master +[pull] + rebase = true # Rebase (instead of merge) on pull +[push] + autoSetupRemote = true # Automatically set upstream branch on push +[diff] + algorithm = histogram # Clearer diffs on moved/edited lines + colorMoved = plain # Highlight moved blocks in diffs + mnemonicPrefix = true # More intuitive refs in diff output +[commit] + verbose = true # Include diff comment in commit message template +[column] + ui = auto # Output in columns when possible +[branch] + sort = -committerdate # Sort branches by most recent commit first +[tag] + sort = -version:refname # Sort version numbers as you would expect +[rerere] + enabled = true # Record and reuse conflict resolutions + autoupdate = true # Apply stored conflict resolutions automatically diff --git a/config/hypr/autostart.conf b/config/hypr/autostart.conf index 3b7c62d223..708b3a295d 100644 --- a/config/hypr/autostart.conf +++ b/config/hypr/autostart.conf @@ -1,2 +1,2 @@ # Extra autostart processes -# exec-once = uwsm app -- my-service +# exec-once = uwsm-app -- my-service diff --git a/config/hypr/bindings.conf b/config/hypr/bindings.conf index fc6d9cec14..cb4c1ed256 100644 --- a/config/hypr/bindings.conf +++ b/config/hypr/bindings.conf @@ -1,29 +1,29 @@ # Application bindings -$terminal = uwsm app -- alacritty -$browser = omarchy-launch-browser +bindd = SUPER, RETURN, Terminal, exec, uwsm-app -- xdg-terminal-exec --dir="$(omarchy-cmd-terminal-cwd)" +bindd = SUPER SHIFT, F, File manager, exec, uwsm-app -- nautilus --new-window +bindd = SUPER SHIFT, B, Browser, exec, omarchy-launch-browser +bindd = SUPER SHIFT ALT, B, Browser (private), exec, omarchy-launch-browser --private +bindd = SUPER SHIFT, M, Music, exec, omarchy-launch-or-focus spotify +bindd = SUPER SHIFT, N, Editor, exec, omarchy-launch-editor +bindd = SUPER SHIFT, T, Activity, exec, omarchy-launch-tui btop +bindd = SUPER SHIFT, D, Docker, exec, omarchy-launch-tui lazydocker +bindd = SUPER SHIFT, G, Signal, exec, omarchy-launch-or-focus ^signal$ "uwsm-app -- signal-desktop" +bindd = SUPER SHIFT, O, Obsidian, exec, omarchy-launch-or-focus ^obsidian$ "uwsm-app -- obsidian -disable-gpu --enable-wayland-ime" +bindd = SUPER SHIFT, W, Typora, exec, uwsm-app -- typora --enable-wayland-ime +bindd = SUPER SHIFT, SLASH, Passwords, exec, uwsm-app -- 1password -bindd = SUPER, return, Terminal, exec, $terminal --working-directory=$(omarchy-cmd-terminal-cwd) -bindd = SUPER, F, File manager, exec, uwsm app -- nautilus --new-window -bindd = SUPER, B, Browser, exec, $browser -bindd = SUPER, M, Music, exec, uwsm app -- spotify -bindd = SUPER, N, Neovim, exec, $terminal -e nvim -bindd = SUPER, T, Activity, exec, $terminal -e btop -bindd = SUPER, D, Docker, exec, $terminal -e lazydocker -bindd = SUPER, G, Signal, exec, uwsm app -- signal-desktop -bindd = SUPER, O, Obsidian, exec, uwsm app -- obsidian -disable-gpu -bindd = SUPER, slash, Passwords, exec, uwsm app -- 1password - -# If your web app url contains #, type it as ## to prevent hyperland treat it as comments -bindd = SUPER, A, ChatGPT, exec, omarchy-launch-webapp "https://chatgpt.com" -bindd = SUPER SHIFT, A, Grok, exec, omarchy-launch-webapp "https://grok.com" -bindd = SUPER, C, Calendar, exec, omarchy-launch-webapp "https://app.hey.com/calendar/weeks/" -bindd = SUPER, E, Email, exec, omarchy-launch-webapp "https://app.hey.com" -bindd = SUPER, Y, YouTube, exec, omarchy-launch-webapp "https://youtube.com/" -bindd = SUPER SHIFT, G, WhatsApp, exec, omarchy-launch-webapp "https://web.whatsapp.com/" -bindd = SUPER ALT, G, Google Messages, exec, omarchy-launch-webapp "https://messages.google.com/web/conversations" -bindd = SUPER, X, X, exec, omarchy-launch-webapp "https://x.com/" -bindd = SUPER SHIFT, X, X Post, exec, omarchy-launch-webapp "https://x.com/compose/post" +# If your web app url contains #, type it as ## to prevent hyprland treating it as a comment +bindd = SUPER SHIFT, A, ChatGPT, exec, omarchy-launch-webapp "https://chatgpt.com" +bindd = SUPER SHIFT ALT, A, Grok, exec, omarchy-launch-webapp "https://grok.com" +bindd = SUPER SHIFT, C, Calendar, exec, omarchy-launch-webapp "https://app.hey.com/calendar/weeks/" +bindd = SUPER SHIFT, E, Email, exec, omarchy-launch-webapp "https://app.hey.com" +bindd = SUPER SHIFT, Y, YouTube, exec, omarchy-launch-webapp "https://youtube.com/" +bindd = SUPER SHIFT ALT, G, WhatsApp, exec, omarchy-launch-or-focus-webapp WhatsApp "https://web.whatsapp.com/" +bindd = SUPER SHIFT CTRL, G, Google Messages, exec, omarchy-launch-or-focus-webapp "Google Messages" "https://messages.google.com/web/conversations" +bindd = SUPER SHIFT, P, Google Photos, exec, omarchy-launch-or-focus-webapp "Google Photos" "https://photos.google.com/" +bindd = SUPER SHIFT, X, X, exec, omarchy-launch-webapp "https://x.com/" +bindd = SUPER SHIFT ALT, X, X Post, exec, omarchy-launch-webapp "https://x.com/compose/post" # Overwrite existing bindings, like putting Omarchy Menu on Super + Space -# unbind = SUPER, Space +# unbind = SUPER, SPACE # bindd = SUPER, SPACE, Omarchy menu, exec, omarchy-menu diff --git a/config/hypr/envs.conf b/config/hypr/envs.conf deleted file mode 100644 index 53e0825c9a..0000000000 --- a/config/hypr/envs.conf +++ /dev/null @@ -1,3 +0,0 @@ -# Extra env variables -# Note: You must relaunch Hyprland after changing envs (use Super+Esc, then Relaunch) -# env = MY_GLOBAL_ENV,setting diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index e03c300522..4786e7e2fa 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -3,7 +3,8 @@ # Use defaults Omarchy defaults (but don't edit these directly!) source = ~/.local/share/omarchy/default/hypr/autostart.conf source = ~/.local/share/omarchy/default/hypr/bindings/media.conf -source = ~/.local/share/omarchy/default/hypr/bindings/tiling.conf +source = ~/.local/share/omarchy/default/hypr/bindings/clipboard.conf +source = ~/.local/share/omarchy/default/hypr/bindings/tiling-v2.conf source = ~/.local/share/omarchy/default/hypr/bindings/utilities.conf source = ~/.local/share/omarchy/default/hypr/envs.conf source = ~/.local/share/omarchy/default/hypr/looknfeel.conf @@ -15,5 +16,8 @@ source = ~/.config/omarchy/current/theme/hyprland.conf source = ~/.config/hypr/monitors.conf source = ~/.config/hypr/input.conf source = ~/.config/hypr/bindings.conf -source = ~/.config/hypr/envs.conf +source = ~/.config/hypr/looknfeel.conf source = ~/.config/hypr/autostart.conf + +# Add any other personal Hyprland configuration below +# windowrule = workspace 5, class:qemu diff --git a/config/hypr/hyprlock.conf b/config/hypr/hyprlock.conf index f3e81598f7..fb982bc159 100644 --- a/config/hypr/hyprlock.conf +++ b/config/hypr/hyprlock.conf @@ -3,6 +3,8 @@ source = ~/.config/omarchy/current/theme/hyprlock.conf background { monitor = color = $color + path = ~/.config/omarchy/current/background + blur_passes = 3 } animations { @@ -11,7 +13,7 @@ animations { input-field { monitor = - size = 600, 100 + size = 650, 100 position = 0, 0 halign = center valign = center @@ -20,12 +22,12 @@ input-field { outer_color = $outer_color outline_thickness = 4 - font_family = CaskaydiaMono Nerd Font + font_family = JetBrainsMono Nerd Font font_color = $font_color - placeholder_text =   Enter Password 󰈷  + placeholder_text = Enter Password check_color = $check_color - fail_text = $PAMFAIL ($ATTEMPTS) + fail_text = $FAIL ($ATTEMPTS) rounding = 0 shadow_passes = 0 diff --git a/config/hypr/hyprsunset.conf b/config/hypr/hyprsunset.conf index 1827445d74..c4d0f8d3c3 100644 --- a/config/hypr/hyprsunset.conf +++ b/config/hypr/hyprsunset.conf @@ -1,6 +1,14 @@ # Makes hyprsunset do nothing to the screen by default # Without this, the default applies some tint to the monitor profile { - time = 00:00 + time = 07:00 identity = true -} \ No newline at end of file +} + +# To enable auto switch to nightlight, set in your .config/hypr/autostart: +# exec-once = uwsm app -- hyprsunset +# and use the following: +# profile { +# time = 20:00 +# temperature = 4000 +# } diff --git a/config/hypr/input.conf b/config/hypr/input.conf index 397ddcf6fe..fd0cd7010e 100644 --- a/config/hypr/input.conf +++ b/config/hypr/input.conf @@ -9,7 +9,10 @@ input { repeat_rate = 40 repeat_delay = 600 - # Increase sensitity for mouse/trackpack (default: 0) + # Start with numlock on by default + numlock_by_default = true + + # Increase sensitivity for mouse/trackpad (default: 0) # sensitivity = 0.35 touchpad { @@ -24,5 +27,10 @@ input { } } -# Scroll faster in the terminal -windowrule = scrolltouchpad 1.5, class:Alacritty +# Scroll nicely in the terminal +windowrule = scrolltouchpad 1.5, class:(Alacritty|kitty) +windowrule = scrolltouchpad 0.2, class:com.mitchellh.ghostty + +# Enable touchpad gestures for changing workspaces +# See https://wiki.hyprland.org/Configuring/Gestures/ +# gesture = 3, horizontal, workspace diff --git a/config/hypr/looknfeel.conf b/config/hypr/looknfeel.conf new file mode 100644 index 0000000000..62e26344c0 --- /dev/null +++ b/config/hypr/looknfeel.conf @@ -0,0 +1,24 @@ +# Change the default Omarchy look'n'feel + +# https://wiki.hyprland.org/Configuring/Variables/#general +general { + # No gaps between windows or borders + # gaps_in = 0 + # gaps_out = 0 + # border_size = 0 + + # Use master layout instead of dwindle + # layout = master +} + +# https://wiki.hyprland.org/Configuring/Variables/#decoration +decoration { + # Use round window corners + # rounding = 8 +} + +# https://wiki.hypr.land/Configuring/Dwindle-Layout/ +dwindle { + # Avoid overly wide single-window layouts on wide screens + # single_window_aspect_ratio = 1 1 +} diff --git a/config/hypr/monitors.conf b/config/hypr/monitors.conf index 6fc13876be..875ad26554 100644 --- a/config/hypr/monitors.conf +++ b/config/hypr/monitors.conf @@ -1,7 +1,6 @@ # See https://wiki.hyprland.org/Configuring/Monitors/ # List current monitors and resolutions possible: hyprctl monitors # Format: monitor = [port], resolution, position, scale -# You must relaunch Hyprland after changing any envs (use Super+Esc, then Relaunch) # Optimized for retina-class 2x displays, like 13" 2.8K, 27" 5K, 32" 6K. env = GDK_SCALE,2 @@ -9,7 +8,7 @@ monitor=,preferred,auto,auto # Good compromise for 27" or 32" 4K monitors (but fractional!) # env = GDK_SCALE,1.75 -# monitor=,preferred,auto,1.666667 +# monitor=,preferred,auto,1.6 # Straight 1x setup for low-resolution displays like 1080p or 1440p # env = GDK_SCALE,1 diff --git a/config/hypr/xdph.conf b/config/hypr/xdph.conf new file mode 100644 index 0000000000..176b0c9e37 --- /dev/null +++ b/config/hypr/xdph.conf @@ -0,0 +1,3 @@ +screencopy { + allow_token_by_default = true +} diff --git a/config/imv/config b/config/imv/config new file mode 100644 index 0000000000..464932408a --- /dev/null +++ b/config/imv/config @@ -0,0 +1,13 @@ +[binds] + +# Print the current image file + = exec lp "$imv_current_file" + +# Delete the current image and quit the viewer + = exec rm "$imv_current_file"; quit + +# Delete the current image and move to the next one + = exec rm "$imv_current_file"; close + +# Rotate the currently open image by 90 degrees + = exec mogrify -rotate 90 "$imv_current_file" diff --git a/config/kitty/kitty.conf b/config/kitty/kitty.conf new file mode 100644 index 0000000000..04b7440fb5 --- /dev/null +++ b/config/kitty/kitty.conf @@ -0,0 +1,31 @@ +include ~/.config/omarchy/current/theme/kitty.conf + +# Font +font_family JetBrainsMono Nerd Font +bold_italic_font auto +font_size 9.0 + +# Window +window_padding_width 14 +window_padding_height 14 +hide_window_decorations yes +show_window_resize_notification no +confirm_os_window_close 0 + +# Keybindings +map ctrl+insert copy_to_clipboard +map shift+insert paste_from_clipboard + +# Allow remote access +single_instance yes +allow_remote_control yes + +# Aesthetics +cursor_shape block +enable_audio_bell no + +# Minimal Tab bar styling +tab_bar_edge bottom +tab_bar_style powerline +tab_powerline_style slanted +tab_title_template {title}{' :{}:'.format(num_windows) if num_windows > 1 else ''} diff --git a/config/nvim/lazyvim.json b/config/nvim/lazyvim.json deleted file mode 100644 index 71fc832519..0000000000 --- a/config/nvim/lazyvim.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extras": [ - "lazyvim.plugins.extras.editor.neo-tree" - ], - "install_version": 8, - "news": { - "NEWS.md": "10960" - }, - "version": 8 -} \ No newline at end of file diff --git a/config/nvim/lua/plugins/snacks-animated-scrolling-off.lua b/config/nvim/lua/plugins/snacks-animated-scrolling-off.lua deleted file mode 100644 index cbb0a58e02..0000000000 --- a/config/nvim/lua/plugins/snacks-animated-scrolling-off.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - "folke/snacks.nvim", - opts = { - scroll = { - enabled = false, -- Disable scrolling animations - }, - }, -} diff --git a/config/nvim/lua/plugins/theme.lua b/config/nvim/lua/plugins/theme.lua deleted file mode 100644 index dad2d30baf..0000000000 --- a/config/nvim/lua/plugins/theme.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - { - "LazyVim/LazyVim", - opts = { - colorscheme = "tokyonight", - }, - }, -} diff --git a/config/nvim/plugin/after/transparency.lua b/config/nvim/plugin/after/transparency.lua deleted file mode 100644 index d0090f07d6..0000000000 --- a/config/nvim/plugin/after/transparency.lua +++ /dev/null @@ -1,45 +0,0 @@ --- transparent background -vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) -vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) -vim.api.nvim_set_hl(0, "FloatBorder", { bg = "none" }) -vim.api.nvim_set_hl(0, "Pmenu", { bg = "none" }) -vim.api.nvim_set_hl(0, "Terminal", { bg = "none" }) -vim.api.nvim_set_hl(0, "EndOfBuffer", { bg = "none" }) -vim.api.nvim_set_hl(0, "FoldColumn", { bg = "none" }) -vim.api.nvim_set_hl(0, "Folded", { bg = "none" }) -vim.api.nvim_set_hl(0, "SignColumn", { bg = "none" }) -vim.api.nvim_set_hl(0, "NormalNC", { bg = "none" }) -vim.api.nvim_set_hl(0, "WhichKeyFloat", { bg = "none" }) -vim.api.nvim_set_hl(0, "TelescopeBorder", { bg = "none" }) -vim.api.nvim_set_hl(0, "TelescopeNormal", { bg = "none" }) -vim.api.nvim_set_hl(0, "TelescopePromptBorder", { bg = "none" }) -vim.api.nvim_set_hl(0, "TelescopePromptTitle", { bg = "none" }) - --- transparent background for neotree -vim.api.nvim_set_hl(0, "NeoTreeNormal", { bg = "none" }) -vim.api.nvim_set_hl(0, "NeoTreeNormalNC", { bg = "none" }) -vim.api.nvim_set_hl(0, "NeoTreeVertSplit", { bg = "none" }) -vim.api.nvim_set_hl(0, "NeoTreeWinSeparator", { bg = "none" }) -vim.api.nvim_set_hl(0, "NeoTreeEndOfBuffer", { bg = "none" }) - --- transparent background for nvim-tree -vim.api.nvim_set_hl(0, "NvimTreeNormal", { bg = "none" }) -vim.api.nvim_set_hl(0, "NvimTreeVertSplit", { bg = "none" }) -vim.api.nvim_set_hl(0, "NvimTreeEndOfBuffer", { bg = "none" }) - --- transparent notify background -vim.api.nvim_set_hl(0, "NotifyINFOBody", { bg = "none" }) -vim.api.nvim_set_hl(0, "NotifyERRORBody", { bg = "none" }) -vim.api.nvim_set_hl(0, "NotifyWARNBody", { bg = "none" }) -vim.api.nvim_set_hl(0, "NotifyTRACEBody", { bg = "none" }) -vim.api.nvim_set_hl(0, "NotifyDEBUGBody", { bg = "none" }) -vim.api.nvim_set_hl(0, "NotifyINFOTitle", { bg = "none" }) -vim.api.nvim_set_hl(0, "NotifyERRORTitle", { bg = "none" }) -vim.api.nvim_set_hl(0, "NotifyWARNTitle", { bg = "none" }) -vim.api.nvim_set_hl(0, "NotifyTRACETitle", { bg = "none" }) -vim.api.nvim_set_hl(0, "NotifyDEBUGTitle", { bg = "none" }) -vim.api.nvim_set_hl(0, "NotifyINFOBorder", { bg = "none" }) -vim.api.nvim_set_hl(0, "NotifyERRORBorder", { bg = "none" }) -vim.api.nvim_set_hl(0, "NotifyWARNBorder", { bg = "none" }) -vim.api.nvim_set_hl(0, "NotifyTRACEBorder", { bg = "none" }) -vim.api.nvim_set_hl(0, "NotifyDEBUGBorder", { bg = "none" }) diff --git a/config/omarchy/hooks/font-set.sample b/config/omarchy/hooks/font-set.sample new file mode 100644 index 0000000000..36d8c3ecd4 --- /dev/null +++ b/config/omarchy/hooks/font-set.sample @@ -0,0 +1,7 @@ +#!/bin/bash + +# This hook is called with the snake-cased name of the font that has just been set. +# To put it into use, remove .sample from the name. + +# Example: Show the name of the theme that was just set. +# notify-send "New font" "Your new font is $1" diff --git a/config/omarchy/hooks/post-update.sample b/config/omarchy/hooks/post-update.sample new file mode 100644 index 0000000000..486352e5e8 --- /dev/null +++ b/config/omarchy/hooks/post-update.sample @@ -0,0 +1,7 @@ +#!/bin/bash + +# This hook is called after an Omarchy system update has been performed. +# To put it into use, remove .sample from the name. + +# Example: Show notification after the system has been updated. +# notify-send "Update Performed" "Your system is now up to date" diff --git a/config/omarchy/hooks/theme-set.sample b/config/omarchy/hooks/theme-set.sample new file mode 100644 index 0000000000..b2a5fe1d81 --- /dev/null +++ b/config/omarchy/hooks/theme-set.sample @@ -0,0 +1,7 @@ +#!/bin/bash + +# This hook is called with the snake-cased name of the theme that has just been set. +# To put it into use, remove .sample from the name. + +# Example: Show the name of the theme that was just set. +# notify-send "New theme" "Your new theme is $1" diff --git a/config/swayosd/style.css b/config/swayosd/style.css index 3c372e6ba5..b95ab9f34f 100644 --- a/config/swayosd/style.css +++ b/config/swayosd/style.css @@ -9,7 +9,7 @@ window { } label { - font-family: 'CaskaydiaMono Nerd Font'; + font-family: 'JetBrainsMono Nerd Font'; font-size: 11pt; color: @label; diff --git a/config/systemd/user/omarchy-battery-monitor.service b/config/systemd/user/omarchy-battery-monitor.service index 3c47283ba3..6e2e8e99ea 100644 --- a/config/systemd/user/omarchy-battery-monitor.service +++ b/config/systemd/user/omarchy-battery-monitor.service @@ -5,4 +5,5 @@ After=graphical-session.target [Service] Type=oneshot ExecStart=%h/.local/share/omarchy/bin/omarchy-battery-monitor -Environment=DISPLAY=:0 \ No newline at end of file +Environment=DISPLAY=:0 +LogLevelMax=warning diff --git a/config/uwsm/default b/config/uwsm/default new file mode 100644 index 0000000000..946fbe5f59 --- /dev/null +++ b/config/uwsm/default @@ -0,0 +1,13 @@ +# Changes require a restart to take effect. + +# Install other terminals via Install > Terminal +export TERMINAL=xdg-terminal-exec + +# Use code for VSCode +export EDITOR=nvim + +# Use a custom directory for screenshots (remember to make the directory!) +# export OMARCHY_SCREENSHOT_DIR="$HOME/Pictures/Screenshots" + +# Use a custom directory for screenrecordings (remember to make the directory!) +# export OMARCHY_SCREENRECORD_DIR="$HOME/Videos/Screencasts" diff --git a/config/uwsm/env b/config/uwsm/env index fa70e5382e..b988bc29dd 100644 --- a/config/uwsm/env +++ b/config/uwsm/env @@ -1,7 +1,11 @@ +# Changes require a restart to take effect. + +# Ensure Omarchy bins are in the path export OMARCHY_PATH=$HOME/.local/share/omarchy -export PATH=$OMARCHY_PATH/bin/:$PATH -export TERMINAL=alacritty +export PATH=$OMARCHY_PATH/bin:$PATH + +# Set default terminal and editor +source ~/.config/uwsm/default -if command -v mise &> /dev/null; then - eval "$(mise activate bash)" -fi +# Activate mise if present on the system +omarchy-cmd-present mise && eval "$(mise activate bash)" diff --git a/config/walker/config.toml b/config/walker/config.toml index cfd79aab95..9bd2b05e91 100644 --- a/config/walker/config.toml +++ b/config/walker/config.toml @@ -1,100 +1,45 @@ -close_when_open = true -theme = "omarchy-default" -theme_base = [] -theme_location = ["~/.local/share/omarchy/default/walker/themes/"] -hotreload_theme = true -force_keyboard_focus = true -timeout = 60 +force_keyboard_focus = true # forces keyboard forcus to stay in Walker +selection_wrap = true # wrap list if at bottom or top +theme = "omarchy-default" # theme to use +additional_theme_location = "~/.local/share/omarchy/default/walker/themes/" +hide_action_hints = true # globally hide the action hints -[keys.ai] -run_last_response = ["ctrl e"] +[placeholders] +"default" = { input = " Search...", list = "No Results" } # placeholders for input and empty list, key is the providers name, so f.e. "desktopapplications" or "menus:other" -[list] -max_entries = 200 -cycle = true +[keybinds] +quick_activate = [] -[search] -placeholder = " Search..." +[columns] +symbols = 1 # providers to be queried by default -[builtins.hyprland_keybinds] -path = "~/.config/hypr/hyprland.conf" -hidden = true +[providers] +max_results = 256 # 256 should be enough for everyone +default = [ + "desktopapplications", + "websearch", +] -[builtins.applications] -launch_prefix = "uwsm app -- " -placeholder = " Search..." -prioritize_new = false -context_aware = false -show_sub_when_single = false -history = false -icon = "" -hidden = true +[[providers.prefixes]] +prefix = "/" +provider = "providerlist" -[builtins.applications.actions] -enabled = false -hide_category = true - -[builtins.bookmarks] -hidden = true - -[[builtins.bookmarks.entries]] -label = "Omarchy - Github" -url = "https://github.com/basecamp/omarchy" -keywords = ["omarchy", "github"] - -[[builtins.bookmarks.entries]] -label = "Omarchy Manual" -url = "https://manuals.omamix.org/2/the-omarchy-manual" -keywords = ["omarchy"] - -[builtins.calc] -name = "Calculator" -icon = "" -min_chars = 3 -prefix = "=" - -[builtins.windows] -switcher_only = true -hidden = true - -[builtins.clipboard] -hidden = true - -[builtins.commands] -hidden = true - -[builtins.custom_commands] -hidden = true - -[builtins.emojis] -name = "Emojis" -icon = "" -prefix = ":" - -[builtins.symbols] -after_copy = "" -hidden = true - -[builtins.finder] -use_fd = true -cmd_alt = "xdg-open $(dirname ~/%RESULT%)" -icon = "file" -name = "Finder" -preview_images = true -hidden = false +[[providers.prefixes]] prefix = "." +provider = "files" -[builtins.runner] -shell_config = "" -switcher_only = true -hidden = true +[[providers.prefixes]] +prefix = ":" +provider = "symbols" -[builtins.ssh] -hidden = true +[[providers.prefixes]] +prefix = "=" +provider = "calc" -[builtins.websearch] -switcher_only = true -hidden = true +[[providers.prefixes]] +prefix = "@" +provider = "websearch" -[builtins.translation] -hidden = true +[[providers.prefixes]] +prefix = "$" +provider = "clipboard" diff --git a/config/waybar/config.jsonc b/config/waybar/config.jsonc index 93873b7c9d..f0191c14cf 100644 --- a/config/waybar/config.jsonc +++ b/config/waybar/config.jsonc @@ -5,7 +5,7 @@ "spacing": 0, "height": 26, "modules-left": ["custom/omarchy", "hyprland/workspaces"], - "modules-center": ["clock", "custom/update"], + "modules-center": ["clock", "custom/update", "custom/screenrecording-indicator"], "modules-right": [ "group/tray-expander", "bluetooth", @@ -28,6 +28,7 @@ "7": "7", "8": "8", "9": "9", + "10": "0", "active": "󱓻" }, "persistent-workspaces": { @@ -41,6 +42,7 @@ "custom/omarchy": { "format": "\ue900", "on-click": "omarchy-menu", + "on-click-right": "xdg-terminal-exec", "tooltip-format": "Omarchy Menu\n\nSuper + Alt + Space" }, "custom/update": { @@ -48,32 +50,33 @@ "exec": "omarchy-update-available", "on-click": "omarchy-launch-floating-terminal-with-presentation omarchy-update", "tooltip-format": "Omarchy update available", - "interval": 3600 + "signal": 7, + "interval": 21600 }, "cpu": { "interval": 5, "format": "󰍛", - "on-click": "alacritty -e btop" + "on-click": "omarchy-launch-or-focus-tui btop" }, "clock": { - "format": "{:%A %H:%M}", - "format-alt": "{:%d %B W%V %Y}", + "format": "{:L%A %H:%M}", + "format-alt": "{:L%d %B W%V %Y}", "tooltip": false, - "on-click-right": "omarchy-cmd-tzupdate" + "on-click-right": "omarchy-launch-floating-terminal-with-presentation omarchy-tz-select" }, "network": { "format-icons": ["󰤯", "󰤟", "󰤢", "󰤥", "󰤨"], "format": "{icon}", "format-wifi": "{icon}", "format-ethernet": "󰀂", - "format-disconnected": "󰖪", + "format-disconnected": "󰤮", "tooltip-format-wifi": "{essid} ({frequency} GHz)\n⇣{bandwidthDownBytes} ⇡{bandwidthUpBytes}", "tooltip-format-ethernet": "⇣{bandwidthDownBytes} ⇡{bandwidthUpBytes}", "tooltip-format-disconnected": "Disconnected", "interval": 3, "spacing": 1, - "on-click": "alacritty --class=Impala -e impala" + "on-click": "omarchy-launch-wifi" }, "battery": { "format": "{capacity}% {icon}", @@ -97,17 +100,18 @@ "bluetooth": { "format": "", "format-disabled": "󰂲", - "format-connected": "", + "format-connected": "󰂱", + "format-no-controller": "", "tooltip-format": "Devices connected: {num_connections}", - "on-click": "blueberry" + "on-click": "omarchy-launch-bluetooth" }, "pulseaudio": { "format": "{icon}", - "on-click": "alacritty --class=Wiremix -e wiremix", + "on-click": "omarchy-launch-or-focus-tui wiremix", "on-click-right": "pamixer -t", "tooltip-format": "Playing at {volume}%", "scroll-step": 5, - "format-muted": "󰝟", + "format-muted": "", "format-icons": { "default": ["", "", ""] } @@ -121,11 +125,17 @@ "modules": ["custom/expand-icon", "tray"] }, "custom/expand-icon": { - "format": " ", + "format": "", "tooltip": false }, + "custom/screenrecording-indicator": { + "on-click": "omarchy-cmd-screenrecord", + "exec": "$OMARCHY_PATH/default/waybar/indicators/screen-recording.sh", + "signal": 8, + "return-type": "json" + }, "tray": { "icon-size": 12, - "spacing": 12 + "spacing": 17 } } diff --git a/config/waybar/style.css b/config/waybar/style.css index 924e18516b..7b7a980e37 100644 --- a/config/waybar/style.css +++ b/config/waybar/style.css @@ -7,7 +7,7 @@ border: none; border-radius: 0; min-height: 0; - font-family: CaskaydiaMono Nerd Font; + font-family: 'JetBrainsMono Nerd Font'; font-size: 12px; } @@ -30,20 +30,30 @@ opacity: 0.5; } -#tray, #cpu, #battery, -#network, -#bluetooth, #pulseaudio, #custom-omarchy, +#custom-screenrecording-indicator, #custom-update { min-width: 12px; margin: 0 7.5px; } +#tray { + margin-right: 16px; +} + +#bluetooth { + margin-right: 17px; +} + +#network { + margin-right: 13px; +} + #custom-expand-icon { - margin-right: 7px; + margin-right: 18px; } tooltip { @@ -61,3 +71,13 @@ tooltip { .hidden { opacity: 0; } + +#custom-screenrecording-indicator { + min-width: 12px; + margin-left: 8.75px; + font-size: 10px; +} + +#custom-screenrecording-indicator.active { + color: #a55555; +} diff --git a/config/xdg-terminals.list b/config/xdg-terminals.list new file mode 100644 index 0000000000..bc27bcf653 --- /dev/null +++ b/config/xdg-terminals.list @@ -0,0 +1,3 @@ +# Terminal emulator preference order for xdg-terminal-exec +# The first found and valid terminal will be used +com.mitchellh.ghostty.desktop diff --git a/default/bash/aliases b/default/bash/aliases index d92e2ca8df..eabd0c627f 100644 --- a/default/bash/aliases +++ b/default/bash/aliases @@ -1,19 +1,26 @@ # File system -alias ls='eza -lh --group-directories-first --icons=auto' -alias lsa='ls -a' -alias lt='eza --tree --level=2 --long --icons --git' -alias lta='lt -a' +if command -v eza &> /dev/null; then + alias ls='eza -lh --group-directories-first --icons=auto' + alias lsa='ls -a' + alias lt='eza --tree --level=2 --long --icons --git' + alias lta='lt -a' +fi + alias ff="fzf --preview 'bat --style=numbers --color=always {}'" -alias cd="zd" -zd() { - if [ $# -eq 0 ]; then - builtin cd ~ && return - elif [ -d "$1" ]; then - builtin cd "$1" - else - z "$@" && printf "\U000F17A9 " && pwd || echo "Error: Directory not found" - fi -} + +if command -v zoxide &> /dev/null; then + alias cd="zd" + zd() { + if [ $# -eq 0 ]; then + builtin cd ~ && return + elif [ -d "$1" ]; then + builtin cd "$1" + else + z "$@" && printf "\U000F17A9 " && pwd || echo "Error: Directory not found" + fi + } +fi + open() { xdg-open "$@" >/dev/null 2>&1 & } @@ -24,12 +31,12 @@ alias ...='cd ../..' alias ....='cd ../../..' # Tools -alias g='git' alias d='docker' alias r='rails' n() { if [ "$#" -eq 0 ]; then nvim .; else nvim "$@"; fi; } # Git +alias g='git' alias gcm='git commit -m' alias gcam='git commit -a -m' alias gcad='git commit -a --amend' diff --git a/default/bash/envs b/default/bash/envs index 603a896126..932ad3ecf6 100644 --- a/default/bash/envs +++ b/default/bash/envs @@ -1,4 +1,3 @@ # Editor used by CLI -export EDITOR="nvim" export SUDO_EDITOR="$EDITOR" export BAT_THEME=ansi diff --git a/default/bash/functions b/default/bash/functions index 84ebf1697d..1839e24253 100644 --- a/default/bash/functions +++ b/default/bash/functions @@ -15,7 +15,7 @@ iso2sd() { fi } -# Format an entire drive for a single partition using ext4 +# Format an entire drive for a single partition using exFAT format-drive() { if [ $# -ne 2 ]; then echo "Usage: format-drive " @@ -25,14 +25,20 @@ format-drive() { else echo "WARNING: This will completely erase all data on $1 and label it '$2'." read -rp "Are you sure you want to continue? (y/N): " confirm + if [[ "$confirm" =~ ^[Yy]$ ]]; then sudo wipefs -a "$1" sudo dd if=/dev/zero of="$1" bs=1M count=100 status=progress sudo parted -s "$1" mklabel gpt - sudo parted -s "$1" mkpart primary ext4 1MiB 100% - sudo mkfs.ext4 -L "$2" "$([[ $1 == *"nvme"* ]] && echo "${1}p1" || echo "${1}1")" - sudo chmod -R 777 "/run/media/$USER/$2" - echo "Drive $1 formatted and labeled '$2'." + sudo parted -s "$1" mkpart primary 1MiB 100% + + partition="$([[ $1 == *"nvme"* ]] && echo "${1}p1" || echo "${1}1")" + sudo partprobe "$1" || true + sudo udevadm settle || true + + sudo mkfs.exfat -n "$2" "$partition" + + echo "Drive $1 formatted as exFAT and labeled '$2'." fi fi } @@ -49,20 +55,28 @@ transcode-video-4K() { # Transcode any image to JPG image that's great for shrinking wallpapers img2jpg() { - magick $1 -quality 95 -strip ${1%.*}.jpg + img="$1" + shift + + magick "$img" $@ -quality 95 -strip ${img%.*}-optimized.jpg } # Transcode any image to JPG image that's great for sharing online without being too big img2jpg-small() { - magick $1 -resize 1080x\> -quality 95 -strip ${1%.*}.jpg + img="$1" + shift + + magick "$img" $@ -resize 1080x\> -quality 95 -strip ${img%.*}-optimized.jpg } # Transcode any image to compressed-but-lossless PNG img2png() { - magick "$1" -strip -define png:compression-filter=5 \ + img="$1" + shift + + magick "$img" $@ -strip -define png:compression-filter=5 \ -define png:compression-level=9 \ -define png:compression-strategy=1 \ -define png:exclude-chunk=all \ - "${1%.*}.png" + "${img%.*}-optimized.png" } - diff --git a/default/bash/init b/default/bash/init index 149b16c521..e9228edb1f 100644 --- a/default/bash/init +++ b/default/bash/init @@ -10,6 +10,10 @@ if command -v zoxide &> /dev/null; then eval "$(zoxide init bash)" fi +if command -v try &> /dev/null; then + eval "$(try init ~/Work/tries)" +fi + if command -v fzf &> /dev/null; then if [[ -f /usr/share/fzf/completion.bash ]]; then source /usr/share/fzf/completion.bash diff --git a/default/bash/prompt b/default/bash/prompt deleted file mode 100644 index 4901a58418..0000000000 --- a/default/bash/prompt +++ /dev/null @@ -1,7 +0,0 @@ -# Technicolor dreams -force_color_prompt=yes -color_prompt=yes - -# Simple prompt with path in the window/pane title and caret for typing line -PS1=$'\uf0a9 ' -PS1="\[\e]0;\w\a\]$PS1" diff --git a/default/bash/rc b/default/bash/rc index b0b572c99f..487bdd406c 100644 --- a/default/bash/rc +++ b/default/bash/rc @@ -1,7 +1,6 @@ source ~/.local/share/omarchy/default/bash/shell source ~/.local/share/omarchy/default/bash/aliases source ~/.local/share/omarchy/default/bash/functions -source ~/.local/share/omarchy/default/bash/prompt source ~/.local/share/omarchy/default/bash/init source ~/.local/share/omarchy/default/bash/envs [[ $- == *i* ]] && bind -f ~/.local/share/omarchy/default/bash/inputrc diff --git a/default/bash/shell b/default/bash/shell index 672aeb1e31..7eb48672bf 100644 --- a/default/bash/shell +++ b/default/bash/shell @@ -9,6 +9,5 @@ if [[ ! -v BASH_COMPLETION_VERSINFO && -f /usr/share/bash-completion/bash_comple source /usr/share/bash-completion/bash_completion fi -# Set complete path -export PATH="./bin:$HOME/.local/bin:$PATH" +# Ensure command hashing is off for mise set +h diff --git a/default/bashrc b/default/bashrc index 03fb323e15..eaf13c66ec 100644 --- a/default/bashrc +++ b/default/bashrc @@ -1,3 +1,6 @@ +# If not running interactively, don't do anything (leave this at the top of this file) +[[ $- != *i* ]] && return + # All the default Omarchy aliases and functions # (don't mess with these directly, just overwrite them here!) source ~/.local/share/omarchy/default/bash/rc @@ -6,9 +9,3 @@ source ~/.local/share/omarchy/default/bash/rc # # Make an alias for invoking commands you use constantly # alias p='python' -# -# Use VSCode instead of neovim as your default editor -# export EDITOR="code" -# -# Set a custom prompt with the directory revealed (alternatively use https://starship.rs) -# PS1="\W \[\e]0;\w\a\]$PS1" diff --git a/default/chromium/extensions/copy-url/background.js b/default/chromium/extensions/copy-url/background.js new file mode 100644 index 0000000000..a2537c50f4 --- /dev/null +++ b/default/chromium/extensions/copy-url/background.js @@ -0,0 +1,21 @@ +chrome.commands.onCommand.addListener((command) => { + if (command === 'copy-url') { + chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => { + const currentTab = tabs[0]; + + chrome.scripting.executeScript({ + target: { tabId: currentTab.id }, + func: () => { + navigator.clipboard.writeText(window.location.href); + } + }).then(() => { + chrome.notifications.create({ + type: 'basic', + iconUrl: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==', + title: ' URL copied to clipboard', + message: '' + }); + }); + }); + } +}); diff --git a/default/chromium/extensions/copy-url/icon.png b/default/chromium/extensions/copy-url/icon.png new file mode 120000 index 0000000000..e088259ef9 --- /dev/null +++ b/default/chromium/extensions/copy-url/icon.png @@ -0,0 +1 @@ +../../../../icon.png \ No newline at end of file diff --git a/default/chromium/extensions/copy-url/manifest.json b/default/chromium/extensions/copy-url/manifest.json new file mode 100644 index 0000000000..d1442a1e72 --- /dev/null +++ b/default/chromium/extensions/copy-url/manifest.json @@ -0,0 +1,19 @@ +{ + "manifest_version": 4, + "name": "Copy URL", + "version": "1.0", + "description": "Copy current URL to clipboard, this extension is installed by Omarchy", + "permissions": ["activeTab", "scripting", "notifications"], + "icons": { + "16": "icon.png", + "48": "icon.png", + "128": "icon.png" + }, + "commands": { + "copy-url": { + "suggested_key": {"default": "Alt+Shift+L"}, + "description": "Copy URL" + } + }, + "background": {"service_worker": "background.js"} +} diff --git a/default/elephant/omarchy_themes.lua b/default/elephant/omarchy_themes.lua new file mode 100644 index 0000000000..1f21d84747 --- /dev/null +++ b/default/elephant/omarchy_themes.lua @@ -0,0 +1,70 @@ +-- +-- Dynamic Omarchy Theme Menu for Elephant/Walker +-- +Name = "omarchythemes" +NamePretty = "Omarchy Themes" + +-- The main function elephant will call +function GetEntries() + local entries = {} + local theme_dir = os.getenv("HOME") .. "/.config/omarchy/themes" + + -- First, get all theme directories + local find_dirs_cmd = "find -L '" .. theme_dir .. "' -mindepth 1 -maxdepth 1 -type d 2>/dev/null" + + local handle = io.popen(find_dirs_cmd) + if not handle then + return entries + end + + for theme_path in handle:lines() do + local theme_name = theme_path:match(".*/(.+)$") + + if theme_name then + -- find preview image + local find_preview_cmd = "find -L '" + .. theme_path + .. "' -maxdepth 1 -type f \\( -name 'preview.png' -o -name 'preview.jpg' \\) 2>/dev/null | head -n 1" + local preview_handle = io.popen(find_preview_cmd) + local preview_path = nil + + if preview_handle then + preview_path = preview_handle:read("*l") + preview_handle:close() + end + + -- If no preview found, use first image from backgrounds folder + if not preview_path or preview_path == "" then + local bg_cmd = "find -L '" + .. theme_path + .. "/backgrounds' -maxdepth 1 -type f \\( -iname '*.png' -o -iname '*.jpg' -o -iname '*.jpeg' \\) 2>/dev/null | head -n 1" + local bg_handle = io.popen(bg_cmd) + if bg_handle then + preview_path = bg_handle:read("*l") + bg_handle:close() + end + end + + if preview_path and preview_path ~= "" then + local display_name = theme_name:gsub("_", " "):gsub("%-", " ") + display_name = display_name:gsub("(%a)([%w_']*)", function(first, rest) + return first:upper() .. rest:lower() + end) + display_name = display_name .. " " + + table.insert(entries, { + Text = display_name, + Preview = preview_path, + PreviewType = "file", + Actions = { + activate = "omarchy-theme-set " .. theme_name, + }, + }) + end + end + end + + handle:close() + return entries +end + diff --git a/default/ghostty/screensaver b/default/ghostty/screensaver new file mode 100644 index 0000000000..dc35906299 --- /dev/null +++ b/default/ghostty/screensaver @@ -0,0 +1,3 @@ +window-padding-x = 0 +window-padding-y = 0 +window-padding-color = "extend-always" diff --git a/default/hypr/apps.conf b/default/hypr/apps.conf index 07c7ec5d2f..354339def7 100644 --- a/default/hypr/apps.conf +++ b/default/hypr/apps.conf @@ -1,10 +1,15 @@ # App-specific tweaks -source = ~/.local/share/omarchy/default/hypr/apps/pip.conf +source = ~/.local/share/omarchy/default/hypr/apps/1password.conf +source = ~/.local/share/omarchy/default/hypr/apps/bitwarden.conf source = ~/.local/share/omarchy/default/hypr/apps/browser.conf source = ~/.local/share/omarchy/default/hypr/apps/hyprshot.conf +source = ~/.local/share/omarchy/default/hypr/apps/jetbrains.conf +source = ~/.local/share/omarchy/default/hypr/apps/localsend.conf +source = ~/.local/share/omarchy/default/hypr/apps/pip.conf +source = ~/.local/share/omarchy/default/hypr/apps/qemu.conf source = ~/.local/share/omarchy/default/hypr/apps/retroarch.conf 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/terminals.conf source = ~/.local/share/omarchy/default/hypr/apps/walker.conf -source = ~/.local/share/omarchy/default/hypr/apps/1password.conf -source = ~/.local/share/omarchy/default/hypr/apps/jetbrains.conf +source = ~/.local/share/omarchy/default/hypr/apps/webcam-overlay.conf diff --git a/default/hypr/apps/1password.conf b/default/hypr/apps/1password.conf index 3d825fe08c..d5fc8888f1 100644 --- a/default/hypr/apps/1password.conf +++ b/default/hypr/apps/1password.conf @@ -1 +1,2 @@ -windowrule = noscreenshare, class:^(1Password)$ +windowrule = noscreenshare, class:^(1[p|P]assword)$ +windowrule = tag +floating-window, class:^(1[p|P]assword)$ diff --git a/default/hypr/apps/bitwarden.conf b/default/hypr/apps/bitwarden.conf new file mode 100644 index 0000000000..339ddb6b3a --- /dev/null +++ b/default/hypr/apps/bitwarden.conf @@ -0,0 +1 @@ +windowrule = noscreenshare, class:^(Bitwarden)$ diff --git a/default/hypr/apps/browser.conf b/default/hypr/apps/browser.conf index c24f284ef2..ad278edd3c 100644 --- a/default/hypr/apps/browser.conf +++ b/default/hypr/apps/browser.conf @@ -1,6 +1,6 @@ # Browser types -windowrule = tag +chromium-based-browser, class:([cC]hrom(e|ium)|[bB]rave-browser|Microsoft-edge|Vivaldi-stable) -windowrule = tag +firefox-based-browser, class:(Firefox|zen|librewolf) +windowrule = tag +chromium-based-browser, class:((google-)?[cC]hrom(e|ium)|[bB]rave-browser|[mM]icrosoft-edge|Vivaldi-stable|helium) +windowrule = tag +firefox-based-browser, class:([fF]irefox|zen|librewolf) # Force chromium-based browsers into a tile to deal with --app bug windowrule = tile, tag:chromium-based-browser @@ -10,4 +10,4 @@ windowrule = opacity 1 0.97, tag:chromium-based-browser windowrule = opacity 1 0.97, tag:firefox-based-browser # Some video sites should never have opacity applied to them -windowrule = opacity 1.0 1.0, initialTitle:(youtube\.com_/|app\.zoom\.us_/wc/home) +windowrule = opacity 1.0 1.0, initialTitle:((?i)(?:[a-z0-9-]+\.)*youtube\.com_/|app\.zoom\.us_/wc/home) diff --git a/default/hypr/apps/davinci-resolve.conf b/default/hypr/apps/davinci-resolve.conf new file mode 100644 index 0000000000..33b04f2f51 --- /dev/null +++ b/default/hypr/apps/davinci-resolve.conf @@ -0,0 +1,2 @@ +# Focus floating DaVinci Resolve dialog windows +windowrule = stayfocused, class:.*[Rr]esolve.*, floating:1 diff --git a/default/hypr/apps/jetbrains.conf b/default/hypr/apps/jetbrains.conf index d13bb16c35..6e8708af64 100644 --- a/default/hypr/apps/jetbrains.conf +++ b/default/hypr/apps/jetbrains.conf @@ -1,10 +1,22 @@ -# Fixing popup size issue -windowrule = size 50% 50%, class:(.*jetbrains.*)$, title:^$,floating:1 +# Fix splash screen showing in weird places and prevent annoying focus takeovers +windowrule = tag +jetbrains-splash, class:^(jetbrains-.*)$, title:^(splash)$, floating:1 +windowrule = center, tag:jetbrains-splash +windowrule = nofocus, tag:jetbrains-splash +windowrule = noborder, tag:jetbrains-splash -# Fix tooltips (always have a title of `win.`) -windowrule = noinitialfocus, class:^(.*jetbrains.*)$, title:^(win.*)$ -windowrule = nofocus, class:^(.*jetbrains.*)$, title:^(win.*)$ +# Center popups/find windows +windowrule = tag +jetbrains, class:^(jetbrains-.*), title:^()$, floating:1 +windowrule = center, tag:jetbrains -# Fix tab dragging (always have a single space character as their title) -windowrule = noinitialfocus, class:^(.*jetbrains.*)$, title:^\\s$ -windowrule = nofocus, class:^(.*jetbrains.*)$, title:^\\s$ +# Enabling this makes it possible to provide input in popup dialogs (search window, new file, etc.) +windowrule = stayfocused, tag:jetbrains +windowrule = noborder, tag:jetbrains + +# For some reason tag:jetbrains does not work for size rule +windowrule = size >50% >50%, class:^(jetbrains-.*), title:^()$, floating:1 + +# Disable window flicker when autocomplete or tooltips appear +windowrule = noinitialfocus, class:^(jetbrains-.*)$, title:^(win.*)$, floating:1 + +# Disable mouse focus +windowrule = nofollowmouse, class:^(jetbrains-.*)$ diff --git a/default/hypr/apps/localsend.conf b/default/hypr/apps/localsend.conf new file mode 100644 index 0000000000..46255404ed --- /dev/null +++ b/default/hypr/apps/localsend.conf @@ -0,0 +1,3 @@ +# Float LocalSend and fzf file picker +windowrule = float, class:(Share|localsend) +windowrule = center, class:(Share|localsend) diff --git a/default/hypr/apps/pip.conf b/default/hypr/apps/pip.conf index 363c1ed222..18e14406d2 100644 --- a/default/hypr/apps/pip.conf +++ b/default/hypr/apps/pip.conf @@ -1,5 +1,5 @@ # Picture-in-picture overlays -windowrule = tag +pip, title:(Picture.{0,1}in.{0,1}[Pp]icture) +windowrule = tag +pip, title:(Picture.?in.?[Pp]icture) windowrule = float, tag:pip windowrule = pin, tag:pip windowrule = size 600 338, tag:pip diff --git a/default/hypr/apps/qemu.conf b/default/hypr/apps/qemu.conf new file mode 100644 index 0000000000..104442ca71 --- /dev/null +++ b/default/hypr/apps/qemu.conf @@ -0,0 +1 @@ +windowrule = opacity 1 1, class:qemu diff --git a/default/hypr/apps/retroarch.conf b/default/hypr/apps/retroarch.conf index 2c019de551..94be39f323 100644 --- a/default/hypr/apps/retroarch.conf +++ b/default/hypr/apps/retroarch.conf @@ -1,3 +1,4 @@ windowrule = fullscreen, class:com.libretro.RetroArch windowrule = opacity 1 1, class:com.libretro.RetroArch +windowrule = idleinhibit fullscreen, class:com.libretro.RetroArch diff --git a/default/hypr/apps/steam.conf b/default/hypr/apps/steam.conf index de91aaa071..77d8a4bc7c 100644 --- a/default/hypr/apps/steam.conf +++ b/default/hypr/apps/steam.conf @@ -1,6 +1,7 @@ -# Float Steam, fullscreen RetroArch +# Float Steam windowrule = float, class:steam windowrule = center, class:steam, title:Steam windowrule = opacity 1 1, class:steam windowrule = size 1100 700, class:steam, title:Steam windowrule = size 460 800, class:steam, title:Friends List +windowrule = idleinhibit fullscreen, class:steam diff --git a/default/hypr/apps/system.conf b/default/hypr/apps/system.conf index e5fb33c902..ccf2dd2735 100644 --- a/default/hypr/apps/system.conf +++ b/default/hypr/apps/system.conf @@ -1,13 +1,17 @@ # Floating windows windowrule = float, tag:floating-window windowrule = center, tag:floating-window -windowrule = size 800 600, tag:floating-window +windowrule = size 875 600, tag:floating-window -windowrule = tag +floating-window, class:(blueberry.py|Impala|Wiremix|org.gnome.NautilusPreviewer|com.gabm.satty|Omarchy|About|TUI.float) -windowrule = tag +floating-window, class:(xdg-desktop-portal-gtk|sublime_text|DesktopEditors), title:^(Open.*Files?|Save.*Files?|Save.*As|All Files|Save) +windowrule = tag +floating-window, class:(org.omarchy.bluetui|org.omarchy.impala|org.omarchy.wiremix|org.omarchy.btop|org.omarchy.terminal|org.omarchy.bash|org.gnome.NautilusPreviewer|org.gnome.Evince|com.gabm.satty|Omarchy|About|TUI.float|imv|mpv) +windowrule = tag +floating-window, class:(xdg-desktop-portal-gtk|sublime_text|DesktopEditors|org.gnome.Nautilus), title:^(Open.*Files?|Open [F|f]older.*|Save.*Files?|Save.*As|Save|All Files|.*wants to [open|save].*|[C|c]hoose.*) +windowrule = float, class:org.gnome.Calculator # Fullscreen screensaver -windowrule = fullscreen, class:Screensaver +windowrule = fullscreen, class:org.omarchy.screensaver # No transparency on media windows windowrule = opacity 1 1, class:^(zoom|vlc|mpv|org.kde.kdenlive|com.obsproject.Studio|com.github.PintaProject.Pinta|imv|org.gnome.NautilusPreviewer)$ + +# Popped window rounding +windowrule = rounding 8, tag:pop diff --git a/default/hypr/apps/terminals.conf b/default/hypr/apps/terminals.conf new file mode 100644 index 0000000000..e908e5dfbc --- /dev/null +++ b/default/hypr/apps/terminals.conf @@ -0,0 +1,2 @@ +# Define terminal tag to style them uniformly +windowrule = tag +terminal, class:(Alacritty|kitty|com.mitchellh.ghostty) diff --git a/default/hypr/apps/webcam-overlay.conf b/default/hypr/apps/webcam-overlay.conf new file mode 100644 index 0000000000..eca1c751da --- /dev/null +++ b/default/hypr/apps/webcam-overlay.conf @@ -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 diff --git a/default/hypr/autostart.conf b/default/hypr/autostart.conf index 476cb142e0..0462f73a9a 100644 --- a/default/hypr/autostart.conf +++ b/default/hypr/autostart.conf @@ -1,9 +1,12 @@ -exec-once = uwsm app -- hypridle -exec-once = uwsm app -- mako -exec-once = uwsm app -- waybar -exec-once = uwsm app -- fcitx5 -exec-once = uwsm app -- swaybg -i ~/.config/omarchy/current/background -m fill -exec-once = uwsm app -- swayosd-server +exec-once = uwsm-app -- hypridle +exec-once = uwsm-app -- mako +exec-once = uwsm-app -- waybar +exec-once = uwsm-app -- fcitx5 +exec-once = uwsm-app -- swaybg -i ~/.config/omarchy/current/background -m fill +exec-once = uwsm-app -- swayosd-server exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 -exec-once = wl-clip-persist --clipboard regular --all-mime-type-regex '^(?!x-kde-passwordManagerHint).+' exec-once = omarchy-cmd-first-run + +# Slow app launch fix -- set systemd vars +exec-once = systemctl --user import-environment $(env | cut -d'=' -f 1) +exec-once = dbus-update-activation-environment --systemd --all diff --git a/default/hypr/bindings.conf b/default/hypr/bindings.conf index 2927eb3498..20fee804b5 100644 --- a/default/hypr/bindings.conf +++ b/default/hypr/bindings.conf @@ -1,6 +1,6 @@ # Deprecated bindings file. New installations include everything directly. -bindd = SUPER, return, Terminal, exec, $terminal +bindd = SUPER, RETURN, Terminal, exec, $terminal bindd = SUPER, F, File manager, exec, $fileManager bindd = SUPER, B, Web browser, exec, $browser bindd = SUPER, M, Music player, exec, $music @@ -9,7 +9,7 @@ bindd = SUPER, T, Top, exec, $terminal -e btop bindd = SUPER, D, Lazy Docker, exec, $terminal -e lazydocker bindd = SUPER, G, Messenger, exec, $messenger bindd = SUPER, O, Obsidian, exec, obsidian -disable-gpu -bindd = SUPER, slash, Password manager, exec, $passwordManager +bindd = SUPER, SLASH, Password manager, exec, $passwordManager source = ~/.local/share/omarchy/default/hypr/bindings/media.conf source = ~/.local/share/omarchy/default/hypr/bindings/tiling.conf diff --git a/default/hypr/bindings/clipboard.conf b/default/hypr/bindings/clipboard.conf new file mode 100644 index 0000000000..ffaede7aca --- /dev/null +++ b/default/hypr/bindings/clipboard.conf @@ -0,0 +1,5 @@ +# Copy / Paste +bindd = SUPER, C, Universal copy, sendshortcut, CTRL, Insert, +bindd = SUPER, V, Universal paste, sendshortcut, SHIFT, Insert, +bindd = SUPER, X, Universal cut, sendshortcut, CTRL, X, +bindd = SUPER CTRL, V, Clipboard manager, exec, omarchy-launch-walker -m clipboard diff --git a/default/hypr/bindings/tiling-v2.conf b/default/hypr/bindings/tiling-v2.conf new file mode 100644 index 0000000000..d75e28b787 --- /dev/null +++ b/default/hypr/bindings/tiling-v2.conf @@ -0,0 +1,122 @@ +# Close windows +bindd = SUPER, W, Close window, killactive, +bindd = CTRL ALT, DELETE, Close all windows, exec, omarchy-hyprland-window-close-all + +# Control tiling +bindd = SUPER, J, Toggle window split, togglesplit, # dwindle +bindd = SUPER, P, Pseudo window, pseudo, # dwindle +bindd = SUPER, T, Toggle window floating/tiling, togglefloating, +bindd = SUPER, F, Full screen, fullscreen, 0 +bindd = SUPER CTRL, F, Tiled full screen, fullscreenstate, 0 2 +bindd = SUPER ALT, F, Full width, fullscreen, 1 +bindd = SUPER, O, Pop window out (float & pin), exec, omarchy-hyprland-window-pop + +# Move focus with SUPER + arrow keys +bindd = SUPER, LEFT, Move window focus left, movefocus, l +bindd = SUPER, RIGHT, Move window focus right, movefocus, r +bindd = SUPER, UP, Move window focus up, movefocus, u +bindd = SUPER, DOWN, Move window focus down, movefocus, d + +# Switch workspaces with SUPER + [1-9; 0] +bindd = SUPER, code:10, Switch to workspace 1, workspace, 1 +bindd = SUPER, code:11, Switch to workspace 2, workspace, 2 +bindd = SUPER, code:12, Switch to workspace 3, workspace, 3 +bindd = SUPER, code:13, Switch to workspace 4, workspace, 4 +bindd = SUPER, code:14, Switch to workspace 5, workspace, 5 +bindd = SUPER, code:15, Switch to workspace 6, workspace, 6 +bindd = SUPER, code:16, Switch to workspace 7, workspace, 7 +bindd = SUPER, code:17, Switch to workspace 8, workspace, 8 +bindd = SUPER, code:18, Switch to workspace 9, workspace, 9 +bindd = SUPER, code:19, Switch to workspace 10, workspace, 10 + +# Move active window to a workspace with SUPER + SHIFT + [1-9; 0] +bindd = SUPER SHIFT, code:10, Move window to workspace 1, movetoworkspace, 1 +bindd = SUPER SHIFT, code:11, Move window to workspace 2, movetoworkspace, 2 +bindd = SUPER SHIFT, code:12, Move window to workspace 3, movetoworkspace, 3 +bindd = SUPER SHIFT, code:13, Move window to workspace 4, movetoworkspace, 4 +bindd = SUPER SHIFT, code:14, Move window to workspace 5, movetoworkspace, 5 +bindd = SUPER SHIFT, code:15, Move window to workspace 6, movetoworkspace, 6 +bindd = SUPER SHIFT, code:16, Move window to workspace 7, movetoworkspace, 7 +bindd = SUPER SHIFT, code:17, Move window to workspace 8, movetoworkspace, 8 +bindd = SUPER SHIFT, code:18, Move window to workspace 9, movetoworkspace, 9 +bindd = SUPER SHIFT, code:19, Move window to workspace 10, movetoworkspace, 10 + +# Move active window silently to a workspace with SUPER + SHIFT + ALT + [1-9; 0] +bindd = SUPER SHIFT ALT, code:10, Move window silently to workspace 1, movetoworkspacesilent, 1 +bindd = SUPER SHIFT ALT, code:11, Move window silently to workspace 2, movetoworkspacesilent, 2 +bindd = SUPER SHIFT ALT, code:12, Move window silently to workspace 3, movetoworkspacesilent, 3 +bindd = SUPER SHIFT ALT, code:13, Move window silently to workspace 4, movetoworkspacesilent, 4 +bindd = SUPER SHIFT ALT, code:14, Move window silently to workspace 5, movetoworkspacesilent, 5 +bindd = SUPER SHIFT ALT, code:15, Move window silently to workspace 6, movetoworkspacesilent, 6 +bindd = SUPER SHIFT ALT, code:16, Move window silently to workspace 7, movetoworkspacesilent, 7 +bindd = SUPER SHIFT ALT, code:17, Move window silently to workspace 8, movetoworkspacesilent, 8 +bindd = SUPER SHIFT ALT, code:18, Move window silently to workspace 9, movetoworkspacesilent, 9 +bindd = SUPER SHIFT ALT, code:19, Move window silently to workspace 10, movetoworkspacesilent, 10 + +# Control scratchpad +bindd = SUPER, S, Toggle scratchpad, togglespecialworkspace, scratchpad +bindd = SUPER ALT, S, Move window to scratchpad, movetoworkspacesilent, special:scratchpad + +# TAB between workspaces +bindd = SUPER, TAB, Next workspace, workspace, e+1 +bindd = SUPER SHIFT, TAB, Previous workspace, workspace, e-1 +bindd = SUPER CTRL, TAB, Former workspace, workspace, previous + +# Move workspaces to other monitors +bindd = SUPER SHIFT ALT, LEFT, Move workspace to left monitor, movecurrentworkspacetomonitor, l +bindd = SUPER SHIFT ALT, RIGHT, Move workspace to right monitor, movecurrentworkspacetomonitor, r + +# Swap active window with the one next to it with SUPER + SHIFT + arrow keys +bindd = SUPER SHIFT, LEFT, Swap window to the left, swapwindow, l +bindd = SUPER SHIFT, RIGHT, Swap window to the right, swapwindow, r +bindd = SUPER SHIFT, UP, Swap window up, swapwindow, u +bindd = SUPER SHIFT, DOWN, Swap window down, swapwindow, d + +# Cycle through applications on active workspace +bindd = ALT, TAB, Cycle to next window, cyclenext +bindd = ALT SHIFT, TAB, Cycle to prev window, cyclenext, prev +bindd = ALT, TAB, Reveal active window on top, bringactivetotop +bindd = ALT SHIFT, TAB, Reveal active window on top, bringactivetotop + +# Resize active window +bindd = SUPER, code:20, Expand window left, resizeactive, -100 0 # - key +bindd = SUPER, code:21, Shrink window left, resizeactive, 100 0 # = key +bindd = SUPER SHIFT, code:20, Shrink window up, resizeactive, 0 -100 +bindd = SUPER SHIFT, code:21, Expand window down, resizeactive, 0 100 + +# Scroll through existing workspaces with SUPER + scroll +bindd = SUPER, mouse_down, Scroll active workspace forward, workspace, e+1 +bindd = SUPER, mouse_up, Scroll active workspace backward, workspace, e-1 + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindmd = SUPER, mouse:272, Move window, movewindow +bindmd = SUPER, mouse:273, Resize window, resizewindow + +# Toggle groups +bindd = SUPER, G, Toggle window grouping, togglegroup +bindd = SUPER ALT, G, Move active window out of group, moveoutofgroup + +# Join groups +bindd = SUPER ALT, LEFT, Move window to group on left, moveintogroup, l +bindd = SUPER ALT, RIGHT, Move window to group on right, moveintogroup, r +bindd = SUPER ALT, UP, Move window to group on top, moveintogroup, u +bindd = SUPER ALT, DOWN, Move window to group on bottom, moveintogroup, d + +# Navigate a single set of grouped windows +bindd = SUPER ALT, TAB, Next window in group, changegroupactive, f +bindd = SUPER ALT SHIFT, TAB, Previous window in group, changegroupactive, b + +# Overload lateral window navigation for grouped windows +bindd = SUPER ALT, LEFT, Move grouped window focus left, changegroupactive, b +bindd = SUPER ALT, RIGHT, Move grouped window focus right, changegroupactive, f + +# Scroll through a set of grouped windows with SUPER + ALT + scroll +bindd = SUPER ALT, mouse_down, Next window in group, changegroupactive, f +bindd = SUPER ALT, mouse_up, Previous window in group, changegroupactive, b + +# Activate window in a group by number +bindd = SUPER ALT, code:10, Switch to group window 1, changegroupactive, 1 +bindd = SUPER ALT, code:11, Switch to group window 2, changegroupactive, 2 +bindd = SUPER ALT, code:12, Switch to group window 3, changegroupactive, 3 +bindd = SUPER ALT, code:13, Switch to group window 4, changegroupactive, 4 +bindd = SUPER ALT, code:14, Switch to group window 5, changegroupactive, 5 diff --git a/default/hypr/bindings/tiling.conf b/default/hypr/bindings/tiling.conf index 0a53b017c0..b1dc65ccbe 100644 --- a/default/hypr/bindings/tiling.conf +++ b/default/hypr/bindings/tiling.conf @@ -1,18 +1,22 @@ +# This is now a deprecated file meant for those who did not wish to learn the latest Omarchy hotkeys. +# Do not make changes here, but bring them to tiling-v2.conf instead. + # Close windows -bindd = SUPER, W, Close active window, killactive, -bindd = CTRL ALT, DELETE, Close all Windows, exec, omarchy-cmd-close-all-windows +bindd = SUPER, W, Close window, killactive, +bindd = CTRL ALT, DELETE, Close all windows, exec, omarchy-hyprland-window-close-all # Control tiling -bindd = SUPER, J, Toggle split, togglesplit, # dwindle +bindd = SUPER, J, Toggle window split, togglesplit, # dwindle bindd = SUPER, P, Pseudo window, pseudo, # dwindle -bindd = SUPER, V, Toggle floating, togglefloating, +bindd = SUPER SHIFT, V, Toggle window floating/tiling, togglefloating, bindd = SHIFT, F11, Force full screen, fullscreen, 0 +bindd = ALT, F11, Full width, fullscreen, 1 # Move focus with SUPER + arrow keys -bindd = SUPER, left, Move focus left, movefocus, l -bindd = SUPER, right, Move focus right, movefocus, r -bindd = SUPER, up, Move focus up, movefocus, u -bindd = SUPER, down, Move focus down, movefocus, d +bindd = SUPER, LEFT, Move focus left, movefocus, l +bindd = SUPER, RIGHT, Move focus right, movefocus, r +bindd = SUPER, UP, Move focus up, movefocus, u +bindd = SUPER, DOWN, Move focus down, movefocus, d # Switch workspaces with SUPER + [0-9] bindd = SUPER, code:10, Switch to workspace 1, workspace, 1 @@ -38,21 +42,22 @@ bindd = SUPER SHIFT, code:17, Move window to workspace 8, movetoworkspace, 8 bindd = SUPER SHIFT, code:18, Move window to workspace 9, movetoworkspace, 9 bindd = SUPER SHIFT, code:19, Move window to workspace 10, movetoworkspace, 10 -# Tab between workspaces +# TAB between workspaces bindd = SUPER, TAB, Next workspace, workspace, e+1 bindd = SUPER SHIFT, TAB, Previous workspace, workspace, e-1 +bindd = SUPER CTRL, TAB, Former workspace, workspace, previous # Swap active window with the one next to it with SUPER + SHIFT + arrow keys -bindd = SUPER SHIFT, left, Swap window to the left, swapwindow, l -bindd = SUPER SHIFT, right, Swap window to the right, swapwindow, r -bindd = SUPER SHIFT, up, Swap window up, swapwindow, u -bindd = SUPER SHIFT, down, Swap window down, swapwindow, d +bindd = SUPER SHIFT, LEFT, Swap window to the left, swapwindow, l +bindd = SUPER SHIFT, RIGHT, Swap window to the right, swapwindow, r +bindd = SUPER SHIFT, UP, Swap window up, swapwindow, u +bindd = SUPER SHIFT, DOWN, Swap window down, swapwindow, d # Cycle through applications on active workspace -bindd = ALT, Tab, Cycle to next window, cyclenext -bindd = ALT SHIFT, Tab, Cycle to prev window, cyclenext, prev -bindd = ALT, Tab, Reveal active window on top, bringactivetotop -bindd = ALT SHIFT, Tab, Reveal active window on top, bringactivetotop +bindd = ALT, TAB, Cycle to next window, cyclenext +bindd = ALT SHIFT, TAB, Cycle to prev window, cyclenext, prev +bindd = ALT, TAB, Reveal active window on top, bringactivetotop +bindd = ALT SHIFT, TAB, Reveal active window on top, bringactivetotop # Resize active window bindd = SUPER, code:20, Expand window left, resizeactive, -100 0 # - key @@ -61,8 +66,8 @@ bindd = SUPER SHIFT, code:20, Shrink window up, resizeactive, 0 -100 bindd = SUPER SHIFT, code:21, Expand window down, resizeactive, 0 100 # Scroll through existing workspaces with SUPER + scroll -bindd = SUPER, mouse_down, Scroll active workspace forward, workspace, e+1 -bindd = SUPER, mouse_up, Scroll active workspace backward, workspace, e-1 +bindd = SUPER, MOUSE_DOWN, Scroll active workspace forward, workspace, e+1 +bindd = SUPER, MOUSE_UP, Scroll active workspace backward, workspace, e-1 # Move/resize windows with mainMod + LMB/RMB and dragging bindmd = SUPER, mouse:272, Move window, movewindow diff --git a/default/hypr/bindings/utilities.conf b/default/hypr/bindings/utilities.conf index 1dee6fe59c..a2a6e81e9d 100644 --- a/default/hypr/bindings/utilities.conf +++ b/default/hypr/bindings/utilities.conf @@ -1,20 +1,25 @@ # Menus -bindd = SUPER, SPACE, Launch apps, exec, walker -p "Start…" -bindd = SUPER CTRL, E, Emoji picker, exec, walker -m Emojis +bindd = SUPER, SPACE, Launch apps, exec, omarchy-launch-walker +bindd = SUPER CTRL, E, Emoji picker, exec, omarchy-launch-walker -m symbols bindd = SUPER ALT, SPACE, Omarchy menu, exec, omarchy-menu -bindd = SUPER, ESCAPE, Power menu, exec, omarchy-menu system +bindd = SUPER, ESCAPE, System menu, exec, omarchy-menu system bindld = , XF86PowerOff, Power menu, exec, omarchy-menu system bindd = SUPER, K, Show key bindings, exec, omarchy-menu-keybindings +bindd = , XF86Calculator, Calculator, exec, gnome-calculator # Aesthetics -bindd = SUPER SHIFT, SPACE, Toggle top bar, exec, pkill -SIGUSR1 waybar +bindd = SUPER SHIFT, SPACE, Toggle top bar, exec, omarchy-toggle-waybar bindd = SUPER CTRL, SPACE, Next background in theme, exec, omarchy-theme-bg-next -bindd = SUPER SHIFT CTRL, SPACE, Pick new theme, exec, omarchy-menu theme +bindd = SUPER SHIFT CTRL, SPACE, Theme menu, exec, omarchy-menu theme +bindd = SUPER, BACKSPACE, Toggle window transparency, exec, hyprctl dispatch setprop "address:$(hyprctl activewindow -j | jq -r '.address')" opaque toggle +bindd = SUPER SHIFT, BACKSPACE, Toggle workspace gaps, exec, omarchy-hyprland-workspace-toggle-gaps # Notifications bindd = SUPER, COMMA, Dismiss last notification, exec, makoctl dismiss bindd = SUPER SHIFT, COMMA, Dismiss all notifications, exec, makoctl dismiss --all bindd = SUPER CTRL, COMMA, Toggle silencing notifications, exec, makoctl mode -t do-not-disturb && makoctl mode | grep -q 'do-not-disturb' && notify-send "Silenced notifications" || notify-send "Enabled notifications" +bindd = SUPER ALT, COMMA, Invoke last notification, exec, makoctl invoke +bindd = SUPER SHIFT ALT, COMMA, Invoke last notification, exec, makoctl restore # Toggle idling bindd = SUPER CTRL, I, Toggle locking on idle, exec, omarchy-toggle-idle @@ -27,14 +32,15 @@ bindd = CTRL, F1, Apple Display brightness down, exec, omarchy-cmd-apple-display bindd = CTRL, F2, Apple Display brightness up, exec, omarchy-cmd-apple-display-brightness +5000 bindd = SHIFT CTRL, F2, Apple Display full brightness, exec, omarchy-cmd-apple-display-brightness +60000 -# Screenshots -bindd = , PRINT, Screenshot of region, exec, omarchy-cmd-screenshot -bindd = SHIFT, PRINT, Screenshot of window, exec, omarchy-cmd-screenshot window -bindd = CTRL, PRINT, Screenshot of display, exec, omarchy-cmd-screenshot output +# Captures +bindd = , PRINT, Screenshot with editing, exec, omarchy-cmd-screenshot +bindd = SHIFT, PRINT, Screenshot to clipboard, exec, omarchy-cmd-screenshot smart clipboard +bindd = ALT, PRINT, Screenrecording, exec, omarchy-menu screenrecord +bindd = SUPER, PRINT, Color picker, exec, pkill hyprpicker || hyprpicker -a -# Screen recordings -bindd = ALT, PRINT, Screen record a region, exec, omarchy-cmd-screenrecord -bindd = CTRL ALT, PRINT, Screen record display, exec, omarchy-cmd-screenrecord output +# File sharing +bindd = SUPER CTRL, S, Share, exec, omarchy-menu share -# Color picker -bindd = SUPER, PRINT, Color picker, exec, pkill hyprpicker || hyprpicker -a +# Waybar-less information +bindd = SUPER CTRL, T, Show time, exec, notify-send " $(date +"%A %H:%M — %d %B W%V %Y")" +bindd = SUPER CTRL, B, Show battery remaining, exec, notify-send "󰁹 Battery is at $(omarchy-battery-remaining)%" diff --git a/default/hypr/envs.conf b/default/hypr/envs.conf index 83f11ede94..92d154465f 100644 --- a/default/hypr/envs.conf +++ b/default/hypr/envs.conf @@ -10,6 +10,11 @@ env = SDL_VIDEODRIVER,wayland env = MOZ_ENABLE_WAYLAND,1 env = ELECTRON_OZONE_PLATFORM_HINT,wayland env = OZONE_PLATFORM,wayland +env = XDG_SESSION_TYPE,wayland + +# Allow better support for screen sharing (Google Meet, Discord, etc) +env = XDG_CURRENT_DESKTOP,Hyprland +env = XDG_SESSION_DESKTOP,Hyprland xwayland { force_zero_scaling = true diff --git a/default/hypr/input.conf b/default/hypr/input.conf index 0f9a5d609c..74b2acab27 100644 --- a/default/hypr/input.conf +++ b/default/hypr/input.conf @@ -15,7 +15,7 @@ input { } } -# https://wiki.hyprland.org/Configuring/Variables/#gestures -gestures { - workspace_swipe = false +misc { + key_press_enables_dpms = true # key press will trigger wake + mouse_move_enables_dpms = true # mouse move will trigger wake } diff --git a/default/hypr/looknfeel.conf b/default/hypr/looknfeel.conf index 254051f4f2..26a55948ae 100644 --- a/default/hypr/looknfeel.conf +++ b/default/hypr/looknfeel.conf @@ -1,5 +1,9 @@ # Refer to https://wiki.hyprland.org/Configuring/Variables/ +# Variables +$activeBorderColor = rgba(33ccffee) rgba(00ff99ee) 45deg +$inactiveBorderColor = rgba(595959aa) + # https://wiki.hyprland.org/Configuring/Variables/#general general { gaps_in = 5 @@ -8,8 +12,8 @@ general { border_size = 2 # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors - col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg - col.inactive_border = rgba(595959aa) + col.active_border = $activeBorderColor + col.inactive_border = $inactiveBorderColor # Set to true enable resizing windows by clicking and dragging on borders and gaps resize_on_border = false @@ -34,13 +38,45 @@ decoration { # https://wiki.hyprland.org/Configuring/Variables/#blur blur { enabled = true - size = 3 - passes = 1 + size = 2 + passes = 2 + special = true + brightness = 0.60 + contrast = 0.75 + } +} - vibrancy = 0.1696 +# https://wiki.hypr.land/Configuring/Variables/#group +group { + col.border_active = $activeBorderColor + col.border_inactive = $inactiveBorderColor + col.border_locked_active = -1 + col.border_locked_inactive = -1 + + groupbar { + font_size = 12 + font_family = monospace + font_weight_active = ultraheavy + font_weight_inactive = normal + + indicator_height = 0 + indicator_gap = 5 + height = 22 + gaps_in = 5 + gaps_out = 0 + + text_color = rgb(ffffff) + text_color_inactive = rgba(ffffff90) + col.active = rgba(00000040) + col.inactive = rgba(00000020) + + gradients = true + gradient_rounding = 0 + gradient_round_only_edges = false } } + # https://wiki.hyprland.org/Configuring/Variables/#animations animations { enabled = yes, please :) @@ -86,4 +122,18 @@ misc { disable_hyprland_logo = true disable_splash_rendering = true focus_on_activate = true + anr_missed_pings = 3 + new_window_takes_over_fullscreen = 1 } + +# https://wiki.hypr.land/Configuring/Variables/#cursor +cursor { + hide_on_key_press = true +} + +# Style Gum confirm to match terminal theme +env = GUM_CONFIRM_PROMPT_FOREGROUND,6 # Cyan +env = GUM_CONFIRM_SELECTED_FOREGROUND,0 # Black +env = GUM_CONFIRM_SELECTED_BACKGROUND,2 # Green +env = GUM_CONFIRM_UNSELECTED_FOREGROUND,0 # Black +env = GUM_CONFIRM_UNSELECTED_BACKGROUND,8 # Dark grey diff --git a/default/mako/core.ini b/default/mako/core.ini new file mode 100644 index 0000000000..927d8d4027 --- /dev/null +++ b/default/mako/core.ini @@ -0,0 +1,29 @@ +anchor=top-right +default-timeout=5000 +width=420 +outer-margin=20 +padding=10,15 +border-size=2 +max-icon-size=32 +font=sans-serif 14px + +[app-name=Spotify] +invisible=1 + +[mode=do-not-disturb] +invisible=true + +[mode=do-not-disturb app-name=notify-send] +invisible=false + +[urgency=critical] +default-timeout=0 + +[summary~="Setup Wi-Fi"] +on-button-left=exec sh -c 'omarchy-notification-dismiss "Setup Wi-Fi"; omarchy-launch-wifi' + +[summary~="Update System"] +on-button-left=exec sh -c 'omarchy-notification-dismiss "Update System"; omarchy-launch-floating-terminal-with-presentation omarchy-update' + +[summary~="Learn Keybindings"] +on-button-left=exec sh -c 'omarchy-notification-dismiss "Learn Keybindings"; omarchy-menu-keybindings' diff --git a/default/pacman/mirrorlist-edge b/default/pacman/mirrorlist-edge new file mode 100644 index 0000000000..914c1fa768 --- /dev/null +++ b/default/pacman/mirrorlist-edge @@ -0,0 +1 @@ +Server = https://mirror.omarchy.org/$repo/os/$arch diff --git a/default/pacman/mirrorlist-stable b/default/pacman/mirrorlist-stable new file mode 100644 index 0000000000..1c2dc11ca2 --- /dev/null +++ b/default/pacman/mirrorlist-stable @@ -0,0 +1 @@ +Server = https://stable-mirror.omarchy.org/$repo/os/$arch diff --git a/default/pacman/pacman.conf b/default/pacman/pacman.conf new file mode 100644 index 0000000000..5dafbc84d7 --- /dev/null +++ b/default/pacman/pacman.conf @@ -0,0 +1,30 @@ +# See the pacman.conf(5) manpage for option and repository directives + +[options] +Color +ILoveCandy +VerbosePkgLists +HoldPkg = pacman glibc +Architecture = auto +CheckSpace +ParallelDownloads = 5 +DownloadUser = alpm + +# By default, pacman accepts packages signed by keys that its local keyring +# trusts (see pacman-key and its man page), as well as unsigned packages. +SigLevel = Required DatabaseOptional +LocalFileSigLevel = Optional + +# pacman searches repositories in the order defined here +[core] +Include = /etc/pacman.d/mirrorlist + +[extra] +Include = /etc/pacman.d/mirrorlist + +[multilib] +Include = /etc/pacman.d/mirrorlist + +[omarchy] +SigLevel = Optional TrustAll +Server = https://pkgs.omarchy.org/stable/$arch diff --git a/default/plymouth/omarchy.plymouth b/default/plymouth/omarchy.plymouth index 9b45fc3991..9935630385 100644 --- a/default/plymouth/omarchy.plymouth +++ b/default/plymouth/omarchy.plymouth @@ -7,3 +7,5 @@ ModuleName=script ImageDir=/usr/share/plymouth/themes/omarchy ScriptFile=/usr/share/plymouth/themes/omarchy/omarchy.script ConsoleLogBackgroundColor=0x1a1b26 +MonospaceFont=Cantarell 11 +Font=Cantarell 11 diff --git a/default/walker/themes/dmenu_150.css b/default/walker/themes/dmenu_150.css deleted file mode 100644 index 14bafe7aa4..0000000000 --- a/default/walker/themes/dmenu_150.css +++ /dev/null @@ -1,2 +0,0 @@ -@import url("file://~/.local/share/omarchy/default/walker/themes/omarchy-default.css"); -@import url("file://~/.config/omarchy/current/theme/walker.css"); diff --git a/default/walker/themes/dmenu_150.toml b/default/walker/themes/dmenu_150.toml deleted file mode 100644 index 3c139976ac..0000000000 --- a/default/walker/themes/dmenu_150.toml +++ /dev/null @@ -1,10 +0,0 @@ -[ui.window.box] -width = 150 - -[ui.window.box.scroll.list] -max_width = 150 -min_width = 150 -width = 150 - -[ui.window.box.search] -hide = false diff --git a/default/walker/themes/dmenu_250.css b/default/walker/themes/dmenu_250.css deleted file mode 100644 index 14bafe7aa4..0000000000 --- a/default/walker/themes/dmenu_250.css +++ /dev/null @@ -1,2 +0,0 @@ -@import url("file://~/.local/share/omarchy/default/walker/themes/omarchy-default.css"); -@import url("file://~/.config/omarchy/current/theme/walker.css"); diff --git a/default/walker/themes/dmenu_250.toml b/default/walker/themes/dmenu_250.toml deleted file mode 100644 index b9ffc1e747..0000000000 --- a/default/walker/themes/dmenu_250.toml +++ /dev/null @@ -1,11 +0,0 @@ -[ui.window.box] -width = 250 - -[ui.window.box.scroll.list] -max_width = 250 -min_width = 250 -width = 250 -max_height = 600 - -[ui.window.box.search] -hide = false diff --git a/default/walker/themes/keybindings.css b/default/walker/themes/keybindings.css deleted file mode 100644 index 14bafe7aa4..0000000000 --- a/default/walker/themes/keybindings.css +++ /dev/null @@ -1,2 +0,0 @@ -@import url("file://~/.local/share/omarchy/default/walker/themes/omarchy-default.css"); -@import url("file://~/.config/omarchy/current/theme/walker.css"); diff --git a/default/walker/themes/keybindings.toml b/default/walker/themes/keybindings.toml deleted file mode 100644 index c5d1b78d55..0000000000 --- a/default/walker/themes/keybindings.toml +++ /dev/null @@ -1,48 +0,0 @@ -[ui.window.box] -width = 964 -min_width = 964 -max_width = 964 - -height = 664 -min_height = 664 -max_height = 664 - -[ui.window.box.search] -hide = false - -[ui.window.box.scroll] -v_align = "fill" -h_align = "fill" -min_width = 964 -width = 964 -max_width = 964 -min_height = 664 -height = 664 -max_height = 664 - -[ui.window.box.scroll.list] -v_align = "fill" -h_align = "fill" -min_width = 900 -width = 900 -max_width = 900 -min_height = 600 -height = 600 -max_height = 600 - -[ui.window.box.scroll.list.item] -h_align = "fill" -min_width = 900 -width = 900 -max_width = 900 - -[ui.window.box.scroll.list.item.activation_label] -hide = true - -[ui.window.box.scroll.list.placeholder] -v_align = "start" -h_align = "fill" -hide = false -min_width = 900 -width = 900 -max_width = 900 diff --git a/default/walker/themes/omarchy-default.css b/default/walker/themes/omarchy-default.css deleted file mode 100644 index 6e453b6e53..0000000000 --- a/default/walker/themes/omarchy-default.css +++ /dev/null @@ -1,169 +0,0 @@ -/* Reset all elements */ -#window, -#box, -#search, -#password, -#input, -#prompt, -#clear, -#typeahead, -#list, -child, -scrollbar, -slider, -#item, -#text, -#label, -#sub, -#activationlabel { - all: unset; -} - -* { - font-family: monospace; - font-size: 18px; -} - -/* Window */ -#window { - background: transparent; - color: @text; -} - -/* Main box container */ -#box { - background: alpha(@base, 0.95); - padding: 20px; - border: 2px solid @border; - border-radius: 0px; -} - -/* Search container */ -#search { - background: @base; - padding: 10px; - margin-bottom: 0; -} - -/* Hide prompt icon */ -#prompt { - opacity: 0; - min-width: 0; - margin: 0; -} - -/* Hide clear button */ -#clear { - opacity: 0; - min-width: 0; -} - -/* Input field */ -#input { - background: none; - color: @text; - padding: 0; -} - -#input placeholder { - opacity: 0.5; - color: @text; -} - -/* Hide typeahead */ -#typeahead { - opacity: 0; -} - -/* List */ -#list { - background: transparent; -} - -/* List items */ -child { - padding: 0px 12px; - background: transparent; - border-radius: 0; -} - -child:selected, -child:hover { - background: transparent; -} - -/* Item layout */ -#item { - padding: 0; -} - -#item.active { - font-style: italic; -} - -/* Icon */ -#icon { - margin-right: 10px; - -gtk-icon-transform: scale(0.7); -} - -/* Text */ -#text { - color: @text; - padding: 14px 0; -} - -#label { - font-weight: normal; -} - -/* Selected state */ -child:selected #text, -child:selected #label, -child:hover #text, -child:hover #label { - color: @selected-text; -} - -/* Hide sub text */ -#sub { - opacity: 0; - font-size: 0; - min-height: 0; -} - -/* Hide activation label */ -#activationlabel { - opacity: 0; - min-width: 0; -} - -/* Scrollbar styling */ -scrollbar { - opacity: 0; -} - -/* Hide spinner */ -#spinner { - opacity: 0; -} - -/* Hide AI elements */ -#aiScroll, -#aiList, -.aiItem { - opacity: 0; - min-height: 0; -} - -/* Bar entry (switcher) */ -#bar { - opacity: 0; - min-height: 0; -} - -.barentry { - opacity: 0; -} - -@import url("file://~/.config/omarchy/current/theme/walker.css"); diff --git a/default/walker/themes/omarchy-default.toml b/default/walker/themes/omarchy-default.toml deleted file mode 100644 index 9abc5d8f21..0000000000 --- a/default/walker/themes/omarchy-default.toml +++ /dev/null @@ -1,16 +0,0 @@ -[ui.window.box] -width = 664 -min_width = 664 -max_width = 664 -height = 396 -min_height = 396 -max_height = 396 - -# List constraints are critical - without these, the window shrinks when empty -[ui.window.box.scroll.list] -height = 300 -min_height = 300 -max_height = 300 - -[ui.window.box.scroll.list.item.icon] -pixel_size = 40 diff --git a/default/walker/themes/omarchy-default/layout.xml b/default/walker/themes/omarchy-default/layout.xml new file mode 100644 index 0000000000..3b7bda714c --- /dev/null +++ b/default/walker/themes/omarchy-default/layout.xml @@ -0,0 +1,156 @@ + + + + + + true + Walker + + + + 644 + hidden + horizontal + center + center + + + + vertical + true + true + 10 + + + + hidden + horizontal + fill + true + true + + + + fill + true + true + + + + + + + + horizontal + 10 + true + true + + + + true + 100 + Waiting for elephant... + + + + + + No Results + 0.0 + true + + + + + + true + false + true + 600 + 300 + 0 + true + true + automatic + automatic + + + + 1 + false + + + + + + + + + + + + + + true + 10 + + + + 10 + + + + + + true + end + 10 + + + + + + + + + 0 + false + + + + + + + + diff --git a/default/walker/themes/omarchy-default/style.css b/default/walker/themes/omarchy-default/style.css new file mode 100644 index 0000000000..0dc824fbc0 --- /dev/null +++ b/default/walker/themes/omarchy-default/style.css @@ -0,0 +1,116 @@ +@import "../../../../../../../.config/omarchy/current/theme/walker.css"; + +* { + all: unset; +} + +* { + font-family: monospace; + font-size: 18px; + color: @text; +} + +scrollbar { + opacity: 0; +} + +.normal-icons { + -gtk-icon-size: 16px; +} + +.large-icons { + -gtk-icon-size: 32px; +} + +.box-wrapper { + background: alpha(@base, 0.95); + padding: 20px; + border: 2px solid @border; +} + +.preview-box { +} + +.box { +} + +.search-container { + background: @base; + padding: 10px; +} + +.input placeholder { + opacity: 0.5; +} + +.input { +} + +.input:focus, +.input:active { + box-shadow: none; + outline: none; +} + +.content-container { +} + +.placeholder { +} + +.scroll { +} + +.list { +} + +child, +child > * { +} + +child:hover .item-box { +} + +child:selected .item-box { +} + +child:selected .item-box * { + color: @selected-text; +} + +.item-box { + padding-left: 14px; +} + +.item-text-box { + all: unset; + padding: 14px 0; +} + +.item-text { +} + +.item-subtext { + font-size: 0px; + min-height: 0px; + margin: 0px; + padding: 0px; +} + +.item-image { + margin-right: 14px; + -gtk-icon-transform: scale(0.9); +} + +.current { + font-style: italic; +} + +.keybind-hints { + background: @background; + padding: 10px; + margin-top: 10px; +} + +.preview { +} diff --git a/default/waybar/indicators/screen-recording.sh b/default/waybar/indicators/screen-recording.sh new file mode 100755 index 0000000000..80038e0e0a --- /dev/null +++ b/default/waybar/indicators/screen-recording.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +if pgrep -f "^gpu-screen-recorder" >/dev/null; then + echo '{"text": "󰻂", "tooltip": "Stop recording", "class": "active"}' +else + echo '{"text": ""}' +fi diff --git a/icon.png b/icon.png new file mode 100644 index 0000000000..09da5008be Binary files /dev/null and b/icon.png differ diff --git a/install.sh b/install.sh old mode 100755 new mode 100644 index 794aad43f1..5b1b6bdda5 --- a/install.sh +++ b/install.sh @@ -1,67 +1,18 @@ #!/bin/bash # Exit immediately if a command exits with a non-zero status -set -eE - -export PATH="$HOME/.local/share/omarchy/bin:$PATH" -OMARCHY_INSTALL=~/.local/share/omarchy/install - -# Preparation -source $OMARCHY_INSTALL/preflight/show-env.sh -source $OMARCHY_INSTALL/preflight/trap-errors.sh -source $OMARCHY_INSTALL/preflight/guard.sh -source $OMARCHY_INSTALL/preflight/chroot.sh -source $OMARCHY_INSTALL/preflight/repositories.sh -source $OMARCHY_INSTALL/preflight/migrations.sh -source $OMARCHY_INSTALL/preflight/first-run-mode.sh - -# Packaging -source $OMARCHY_INSTALL/packages.sh -source $OMARCHY_INSTALL/packaging/asdcontrol.sh -source $OMARCHY_INSTALL/packaging/fonts.sh -source $OMARCHY_INSTALL/packaging/lazyvim.sh -source $OMARCHY_INSTALL/packaging/webapps.sh -source $OMARCHY_INSTALL/packaging/tuis.sh - -# Configuration -source $OMARCHY_INSTALL/config/config.sh -source $OMARCHY_INSTALL/config/theme.sh -source $OMARCHY_INSTALL/config/branding.sh -source $OMARCHY_INSTALL/config/git.sh -source $OMARCHY_INSTALL/config/gpg.sh -source $OMARCHY_INSTALL/config/timezones.sh -source $OMARCHY_INSTALL/config/increase-sudo-tries.sh -source $OMARCHY_INSTALL/config/increase-lockout-limit.sh -source $OMARCHY_INSTALL/config/ssh-flakiness.sh -source $OMARCHY_INSTALL/config/detect-keyboard-layout.sh -source $OMARCHY_INSTALL/config/xcompose.sh -source $OMARCHY_INSTALL/config/mise-ruby.sh -source $OMARCHY_INSTALL/config/docker.sh -source $OMARCHY_INSTALL/config/mimetypes.sh -source $OMARCHY_INSTALL/config/localdb.sh -source $OMARCHY_INSTALL/config/hardware/network.sh -source $OMARCHY_INSTALL/config/hardware/fix-fkeys.sh -source $OMARCHY_INSTALL/config/hardware/bluetooth.sh -source $OMARCHY_INSTALL/config/hardware/printer.sh -source $OMARCHY_INSTALL/config/hardware/usb-autosuspend.sh -source $OMARCHY_INSTALL/config/hardware/ignore-power-button.sh -source $OMARCHY_INSTALL/config/hardware/nvidia.sh - -# Login -source $OMARCHY_INSTALL/login/plymouth.sh -source $OMARCHY_INSTALL/login/limine-snapper.sh -source $OMARCHY_INSTALL/login/alt-bootloaders.sh - -# Reboot -clear -tte -i ~/.local/share/omarchy/logo.txt --frame-rate 920 laseretch -echo -echo "You're done! So we're ready to reboot now..." | tte --frame-rate 640 wipe - -if sudo test -f /etc/sudoers.d/99-omarchy-installer; then - sudo rm -f /etc/sudoers.d/99-omarchy-installer &>/dev/null - echo -e "\nRemember to remove USB installer!\n\n" -fi - -sleep 5 -reboot +set -eEo pipefail + +# Define Omarchy locations +export OMARCHY_PATH="$HOME/.local/share/omarchy" +export OMARCHY_INSTALL="$OMARCHY_PATH/install" +export OMARCHY_INSTALL_LOG_FILE="/var/log/omarchy-install.log" +export PATH="$OMARCHY_PATH/bin:$PATH" + +# Install +source "$OMARCHY_INSTALL/helpers/all.sh" +source "$OMARCHY_INSTALL/preflight/all.sh" +source "$OMARCHY_INSTALL/packaging/all.sh" +source "$OMARCHY_INSTALL/config/all.sh" +source "$OMARCHY_INSTALL/login/all.sh" +source "$OMARCHY_INSTALL/post-install/all.sh" diff --git a/install/config/all.sh b/install/config/all.sh new file mode 100644 index 0000000000..5c19829c8c --- /dev/null +++ b/install/config/all.sh @@ -0,0 +1,33 @@ +run_logged $OMARCHY_INSTALL/config/config.sh +run_logged $OMARCHY_INSTALL/config/theme.sh +run_logged $OMARCHY_INSTALL/config/branding.sh +run_logged $OMARCHY_INSTALL/config/git.sh +run_logged $OMARCHY_INSTALL/config/gpg.sh +run_logged $OMARCHY_INSTALL/config/timezones.sh +run_logged $OMARCHY_INSTALL/config/increase-sudo-tries.sh +run_logged $OMARCHY_INSTALL/config/increase-lockout-limit.sh +run_logged $OMARCHY_INSTALL/config/ssh-flakiness.sh +run_logged $OMARCHY_INSTALL/config/detect-keyboard-layout.sh +run_logged $OMARCHY_INSTALL/config/xcompose.sh +run_logged $OMARCHY_INSTALL/config/mise-work.sh +run_logged $OMARCHY_INSTALL/config/fix-powerprofilesctl-shebang.sh +run_logged $OMARCHY_INSTALL/config/docker.sh +run_logged $OMARCHY_INSTALL/config/mimetypes.sh +run_logged $OMARCHY_INSTALL/config/localdb.sh +run_logged $OMARCHY_INSTALL/config/walker-elephant.sh +run_logged $OMARCHY_INSTALL/config/fast-shutdown.sh +run_logged $OMARCHY_INSTALL/config/sudoless-asdcontrol.sh +run_logged $OMARCHY_INSTALL/config/hardware/network.sh +run_logged $OMARCHY_INSTALL/config/hardware/set-wireless-regdom.sh +run_logged $OMARCHY_INSTALL/config/hardware/fix-fkeys.sh +run_logged $OMARCHY_INSTALL/config/hardware/bluetooth.sh +run_logged $OMARCHY_INSTALL/config/hardware/printer.sh +run_logged $OMARCHY_INSTALL/config/hardware/usb-autosuspend.sh +run_logged $OMARCHY_INSTALL/config/hardware/ignore-power-button.sh +run_logged $OMARCHY_INSTALL/config/hardware/nvidia.sh +run_logged $OMARCHY_INSTALL/config/hardware/fix-f13-amd-audio-input.sh +run_logged $OMARCHY_INSTALL/config/hardware/fix-bcm43xx.sh +run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-spi-keyboard.sh +run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-suspend-nvme.sh +run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-t2.sh +run_logged $OMARCHY_INSTALL/config/hardware/fix-surface-keyboard.sh diff --git a/install/config/branding.sh b/install/config/branding.sh old mode 100755 new mode 100644 index 6e14fc2d02..bad55f093d --- a/install/config/branding.sh +++ b/install/config/branding.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # Allow the user to change the branding for fastfetch and screensaver mkdir -p ~/.config/omarchy/branding cp ~/.local/share/omarchy/icon.txt ~/.config/omarchy/branding/about.txt diff --git a/install/config/config.sh b/install/config/config.sh old mode 100755 new mode 100644 index 75e694b9ac..62f1417b5d --- a/install/config/config.sh +++ b/install/config/config.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # Copy over Omarchy configs mkdir -p ~/.config cp -R ~/.local/share/omarchy/config/* ~/.config/ diff --git a/install/config/detect-keyboard-layout.sh b/install/config/detect-keyboard-layout.sh old mode 100755 new mode 100644 index a6cbf821bc..aaaee4f875 --- a/install/config/detect-keyboard-layout.sh +++ b/install/config/detect-keyboard-layout.sh @@ -1,16 +1,13 @@ -#!/bin/bash - # 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" -layout=$(grep '^XKBLAYOUT=' "$conf" | cut -d= -f2 | tr -d '"') -variant=$(grep '^XKBVARIANT=' "$conf" | cut -d= -f2 | tr -d '"') - -if [[ -n "$layout" ]]; 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" "$hyprconf" fi -if [[ -n "$variant" ]]; then +if grep -q '^XKBVARIANT=' "$conf"; then + variant=$(grep '^XKBVARIANT=' "$conf" | cut -d= -f2 | tr -d '"') sed -i "/^[[:space:]]*kb_options *=/i\ kb_variant = $variant" "$hyprconf" fi diff --git a/install/config/docker.sh b/install/config/docker.sh old mode 100755 new mode 100644 index 6a715a7377..990962452f --- a/install/config/docker.sh +++ b/install/config/docker.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # Configure Docker daemon: # - limit log size to avoid running out of disk # - use host's DNS resolver diff --git a/install/config/fast-shutdown.sh b/install/config/fast-shutdown.sh new file mode 100644 index 0000000000..bbbfafdc0c --- /dev/null +++ b/install/config/fast-shutdown.sh @@ -0,0 +1,7 @@ +sudo mkdir -p /etc/systemd/system.conf.d + +cat </dev/null + else + echo "MODULES=(applespi intel_lpss_pci spi_pxa2xx_platform)" | sudo tee /etc/mkinitcpio.conf.d/macbook_spi_modules.conf >/dev/null + fi +fi diff --git a/install/config/hardware/fix-apple-suspend-nvme.sh b/install/config/hardware/fix-apple-suspend-nvme.sh new file mode 100644 index 0000000000..3572411254 --- /dev/null +++ b/install/config/hardware/fix-apple-suspend-nvme.sh @@ -0,0 +1,30 @@ +# Fix NVMe suspend issues on MacBook models +# This prevents NVMe drives from failing to wake from sleep properly +MACBOOK_MODEL=$(cat /sys/class/dmi/id/product_name 2>/dev/null || true) + +if [[ "$MACBOOK_MODEL" =~ MacBook(8,1|9,1|10,1)|MacBookPro13,[123]|MacBookPro14,[123] ]]; then + echo "Detected MacBook model: $MACBOOK_MODEL" + + NVME_DEVICE="/sys/bus/pci/devices/0000:01:00.0/d3cold_allowed" + + if [[ -f "$NVME_DEVICE" ]]; then + echo "Applying NVMe suspend fix..." + + cat </dev/null +[Unit] +Description=Omarchy NVMe Suspend Fix for MacBook + +[Service] +ExecStart=/bin/bash -c 'echo 0 > /sys/bus/pci/devices/0000\:01\:00.0/d3cold_allowed' + +[Install] +WantedBy=multi-user.target +EOF + + chrootable_systemctl_enable omarchy-nvme-suspend-fix.service + sudo systemctl daemon-reload + else + echo "Warning: NVMe device not found at expected PCI address (0000:01:00.0)" + echo "This fix may not be needed for this MacBook model" + fi +fi diff --git a/install/config/hardware/fix-apple-t2.sh b/install/config/hardware/fix-apple-t2.sh new file mode 100644 index 0000000000..51273f216a --- /dev/null +++ b/install/config/hardware/fix-apple-t2.sh @@ -0,0 +1,28 @@ +# Detect T2 MacBook models using PCI IDs +# Vendor: 106b (Apple), Device IDs: 1801 or 1802 (T2 Security Chip) +if lspci -nn | grep -q "106b:180[12]"; then + echo "Detected MacBook with T2 chip. Installing support items..." + + sudo pacman -S --noconfirm --needed \ + linux-t2 \ + linux-t2-headers \ + apple-t2-audio-config \ + apple-bcm-firmware \ + t2fanrd \ + tiny-dfr + + echo "apple-bce" | sudo tee /etc/modules-load.d/t2.conf >/dev/null + + echo "MODULES+=(apple-bce usbhid hid_apple hid_generic xhci_pci xhci_hcd)" | sudo tee /etc/mkinitcpio.conf.d/apple-t2.conf >/dev/null + + cat </dev/null +# Fix for T2 MacBook WiFi connectivity issues +options brcmfmac feature_disable=0x82000 +EOF + + sudo mkdir -p /etc/limine-entry-tool.d + cat </dev/null +# Generated by Omarchy installer for T2 Mac support +KERNEL_CMDLINE[default]+="intel_iommu=on iommu=pt pcie_ports=compat" +EOF +fi diff --git a/install/config/hardware/fix-bcm43xx.sh b/install/config/hardware/fix-bcm43xx.sh new file mode 100644 index 0000000000..5078f69e0e --- /dev/null +++ b/install/config/hardware/fix-bcm43xx.sh @@ -0,0 +1,10 @@ +# Install Wi-Fi drivers for Broadcom chips found in some MacBooks, as well as other systems: +# - BCM4360 (2013–2015 MacBooks) +# - BCM4331 (2012, early 2013 MacBooks) + +pci_info=$(lspci -nnv) + +if (echo "$pci_info" | grep -q "14e4:43a0" || echo "$pci_info" | grep -q "14e4:4331"); then + echo "BCM4360 / BCM4331 detected" + sudo pacman -S --noconfirm --needed broadcom-wl dkms linux-headers +fi diff --git a/install/config/hardware/fix-f13-amd-audio-input.sh b/install/config/hardware/fix-f13-amd-audio-input.sh new file mode 100644 index 0000000000..f443659f82 --- /dev/null +++ b/install/config/hardware/fix-f13-amd-audio-input.sh @@ -0,0 +1,5 @@ +AMD_AUDIO_CARD=$(pactl list cards 2>/dev/null | grep -B20 "Family 17h/19h" | grep "Name: " | awk '{print $2}' || true) + +if [[ -n $AMD_AUDIO_CARD ]]; then + pactl set-card-profile "$AMD_AUDIO_CARD" "HiFi (Mic1, Mic2, Speaker)" 2>/dev/null || true +fi diff --git a/install/config/hardware/fix-fkeys.sh b/install/config/hardware/fix-fkeys.sh old mode 100755 new mode 100644 index b652cbf368..d0b4315403 --- a/install/config/hardware/fix-fkeys.sh +++ b/install/config/hardware/fix-fkeys.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # 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 diff --git a/install/config/hardware/fix-surface-keyboard.sh b/install/config/hardware/fix-surface-keyboard.sh new file mode 100644 index 0000000000..d68fe5ae86 --- /dev/null +++ b/install/config/hardware/fix-surface-keyboard.sh @@ -0,0 +1,23 @@ +# Detect Surface devices which require additional modules for the keyboard to work. +# Module list derived from Chris McLeod's manual install instructions +# https://chrismcleod.dev/blog/installing-arch-linux-with-secure-boot-on-a-microsoft-surface-laptop-studio/ +product_name="$(cat /sys/class/dmi/id/product_name 2>/dev/null)" +if [[ "$product_name" =~ Surface ]]; then + echo "Detected Surface Device" + + # Modules already exist in the rootfs for the default kernel. + if [[ "$product_name" != "Surface Laptop 3" ]]; then + echo "Untested Surface Device: $product_name, additional modules may be required for your device." + fi + + echo "Attempting to autodetect required pinctrl module" + pinctrl_module=$(lsmod | grep pinctrl_ | cut -f 1 -d" ") + if [[ -z "$pinctrl_module" ]]; then + echo "Failed to autodetect pinctrl module." + else + echo "Detected pinctrl module: $pinctrl_module" + fi + + echo "MODULES=(${pinctrl_module} surface_aggregator surface_aggregator_registry surface_aggregator_hub surface_hid_core surface_hid surface_kbd intel_lpss_pci 8250_dw)" | sudo tee /etc/mkinitcpio.conf.d/surface_device_modules.conf >/dev/null + +fi diff --git a/install/config/hardware/ignore-power-button.sh b/install/config/hardware/ignore-power-button.sh old mode 100755 new mode 100644 index 4166b9b34c..8e514f69bc --- a/install/config/hardware/ignore-power-button.sh +++ b/install/config/hardware/ignore-power-button.sh @@ -1,5 +1,2 @@ -#!/bin/bash - # 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 - diff --git a/install/config/hardware/intel.sh b/install/config/hardware/intel.sh new file mode 100644 index 0000000000..546fe477b5 --- /dev/null +++ b/install/config/hardware/intel.sh @@ -0,0 +1,11 @@ +# This installs hardware video acceleration for Intel GPUs +# Check if we have an Intel GPU at all +if INTEL_GPU=$(lspci | grep -iE 'vga|3d|display' | grep -i 'intel'); then + # HD Graphics and newer uses intel-media-driver + if [[ "${INTEL_GPU,,}" =~ "hd graphics"|"xe"|"iris" ]]; then + sudo pacman -S --needed --noconfirm intel-media-driver + elif [[ "${INTEL_GPU,,}" =~ "gma" ]]; then + # Older generations from 2008 to ~2014-2017 use libva-intel-driver + sudo pacman -S --needed --noconfirm libva-intel-driver + fi +fi diff --git a/install/config/hardware/network.sh b/install/config/hardware/network.sh old mode 100755 new mode 100644 index ff2e03e29f..65f9fdbbe3 --- a/install/config/hardware/network.sh +++ b/install/config/hardware/network.sh @@ -1,11 +1,5 @@ -#!/bin/bash - -# Install iwd explicitly if it wasn't included in archinstall -# This can happen if archinstall used ethernet -if ! command -v iwctl &>/dev/null; then - sudo pacman -S --noconfirm --needed iwd - sudo systemctl enable iwd.service -fi +# Ensure iwd service will be started +sudo systemctl enable iwd.service # Prevent systemd-networkd-wait-online timeout on boot sudo systemctl disable systemd-networkd-wait-online.service diff --git a/install/config/hardware/nvidia.sh b/install/config/hardware/nvidia.sh old mode 100755 new mode 100644 index c2b54e54e7..494390b757 --- a/install/config/hardware/nvidia.sh +++ b/install/config/hardware/nvidia.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # ============================================================================== # Hyprland NVIDIA Setup Script for Arch Linux # ============================================================================== @@ -30,11 +28,6 @@ if [ -n "$(lspci | grep -i 'nvidia')" ]; then KERNEL_HEADERS="linux-hardened-headers" fi - # Enable multilib repository for 32-bit libraries - if ! grep -q "^\[multilib\]" /etc/pacman.conf; then - sudo sed -i '/^#\[multilib\]/,/^#Include/ s/^#//' /etc/pacman.conf - fi - # force package database refresh sudo pacman -Syu --noconfirm diff --git a/install/config/hardware/printer.sh b/install/config/hardware/printer.sh old mode 100755 new mode 100644 index 5a752b2d00..244368e644 --- a/install/config/hardware/printer.sh +++ b/install/config/hardware/printer.sh @@ -1,5 +1,3 @@ -#!/bin/bash - chrootable_systemctl_enable cups.service # Disable multicast dns in resolved. Avahi will provide this for better network printer discovery @@ -7,6 +5,9 @@ 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 +# Enable mDNS resolution for .local domains +sudo sed -i 's/^hosts:.*/hosts: mymachines mdns_minimal [NOTFOUND=return] resolve files myhostname dns/' /etc/nsswitch.conf + # 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 diff --git a/install/config/hardware/set-wireless-regdom.sh b/install/config/hardware/set-wireless-regdom.sh new file mode 100644 index 0000000000..8f28407f31 --- /dev/null +++ b/install/config/hardware/set-wireless-regdom.sh @@ -0,0 +1,33 @@ +# First check that wireless-regdb is there +if [ -f "/etc/conf.d/wireless-regdom" ]; then + unset WIRELESS_REGDOM + . /etc/conf.d/wireless-regdom +fi + +# If the region is already set, we're done +if [ ! -n "${WIRELESS_REGDOM}" ]; then + # Get the current timezone + if [ -e "/etc/localtime" ]; then + TIMEZONE=$(readlink -f /etc/localtime) + TIMEZONE=${TIMEZONE#/usr/share/zoneinfo/} + + # Some timezones are formatted with the two letter country code at the start + 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 + COUNTRY=$(awk -v tz="$TIMEZONE" '$3 == tz {print $1; exit}' /usr/share/zoneinfo/zone.tab) + fi + + # Check if we have a two letter country code + 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 + + # Also set it one off now + if command -v iw &>/dev/null; then + sudo iw reg set ${COUNTRY} + fi + fi + fi +fi diff --git a/install/config/hardware/usb-autosuspend.sh b/install/config/hardware/usb-autosuspend.sh old mode 100755 new mode 100644 index a7d820ec9b..9132384658 --- a/install/config/hardware/usb-autosuspend.sh +++ b/install/config/hardware/usb-autosuspend.sh @@ -1,6 +1,5 @@ -#!/bin/bash - # 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 -fi \ No newline at end of file +fi + diff --git a/install/config/increase-lockout-limit.sh b/install/config/increase-lockout-limit.sh old mode 100755 new mode 100644 index 1fdbf7ddd3..5932906ff3 --- a/install/config/increase-lockout-limit.sh +++ b/install/config/increase-lockout-limit.sh @@ -1,5 +1,7 @@ -#!/bin/bash - # 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" + +# Ensure lockout limit is reset on restart +sudo sed -i '/pam_faillock\.so preauth/d' /etc/pam.d/sddm-autologin +sudo sed -i '/auth.*pam_permit\.so/a auth required pam_faillock.so authsucc' /etc/pam.d/sddm-autologin diff --git a/install/config/increase-sudo-tries.sh b/install/config/increase-sudo-tries.sh old mode 100755 new mode 100644 index cf3d5ca83c..5b64b86952 --- a/install/config/increase-sudo-tries.sh +++ b/install/config/increase-sudo-tries.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # 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 diff --git a/install/config/localdb.sh b/install/config/localdb.sh old mode 100755 new mode 100644 diff --git a/install/config/mimetypes.sh b/install/config/mimetypes.sh old mode 100755 new mode 100644 index 4c0b24110c..ea8e1aff47 --- a/install/config/mimetypes.sh +++ b/install/config/mimetypes.sh @@ -1,5 +1,3 @@ -#!/bin/bash - omarchy-refresh-applications update-desktop-database ~/.local/share/applications @@ -35,3 +33,25 @@ 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 + +# Use Hey for mailto: links +xdg-mime default HEY.desktop x-scheme-handler/mailto + +# Open text files with nvim +xdg-mime default nvim.desktop text/plain +xdg-mime default nvim.desktop text/english +xdg-mime default nvim.desktop text/x-makefile +xdg-mime default nvim.desktop text/x-c++hdr +xdg-mime default nvim.desktop text/x-c++src +xdg-mime default nvim.desktop text/x-chdr +xdg-mime default nvim.desktop text/x-csrc +xdg-mime default nvim.desktop text/x-java +xdg-mime default nvim.desktop text/x-moc +xdg-mime default nvim.desktop text/x-pascal +xdg-mime default nvim.desktop text/x-tcl +xdg-mime default nvim.desktop text/x-tex +xdg-mime default nvim.desktop application/x-shellscript +xdg-mime default nvim.desktop text/x-c +xdg-mime default nvim.desktop text/x-c++ +xdg-mime default nvim.desktop application/xml +xdg-mime default nvim.desktop text/xml diff --git a/install/config/mise-ruby.sh b/install/config/mise-ruby.sh deleted file mode 100755 index 304a10dcc9..0000000000 --- a/install/config/mise-ruby.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# Install Ruby using gcc-14 for compatibility -mise settings set ruby.ruby_build_opts "CC=gcc-14 CXX=g++-14" - -# Trust .ruby-version -mise settings add idiomatic_version_file_enable_tools ruby diff --git a/install/config/mise-work.sh b/install/config/mise-work.sh new file mode 100644 index 0000000000..532ad3508c --- /dev/null +++ b/install/config/mise-work.sh @@ -0,0 +1,27 @@ +# Setup default work directory (and tries) +mkdir -p "$HOME/Work" +mkdir -p "$HOME/Work/tries" + +# Add ./bin to path for all items in ~/Work +cat >"$HOME/Work/.mise.toml" <<'EOF' +[env] +_.path = "{{ cwd }}/bin" +EOF + +mise trust ~/Work/.mise.toml + +if [[ -n "${OMARCHY_CHROOT_INSTALL:-}" ]]; then + NODE_TARBALL=$(find /opt/packages -name "node-v*-linux-x64.tar.gz" -type f 2>/dev/null | head -n1) + + NODE_VERSION=$(basename "$NODE_TARBALL" | sed 's/node-v\(.*\)-linux-x64.tar.gz/\1/') + NODE_INSTALL_DIR="$HOME/.local/share/mise/installs/node/$NODE_VERSION" + + mkdir -p "$NODE_INSTALL_DIR" + tar -xzf "$NODE_TARBALL" \ + --strip-components=1 \ + -C "$NODE_INSTALL_DIR" + + mise use -g node@"$NODE_VERSION" +else + mise use -g node@latest +fi diff --git a/install/config/ssh-flakiness.sh b/install/config/ssh-flakiness.sh old mode 100755 new mode 100644 index 1746f59b45..906e68aae8 --- a/install/config/ssh-flakiness.sh +++ b/install/config/ssh-flakiness.sh @@ -1,4 +1,2 @@ -#!/bin/bash - # Solve common flakiness with SSH echo "net.ipv4.tcp_mtu_probing=1" | sudo tee -a /etc/sysctl.d/99-sysctl.conf diff --git a/install/config/sudoless-asdcontrol.sh b/install/config/sudoless-asdcontrol.sh new file mode 100644 index 0000000000..5ae03563dd --- /dev/null +++ b/install/config/sudoless-asdcontrol.sh @@ -0,0 +1,3 @@ +# Setup sudo-less controls for controlling brightness on Apple Displays +echo "$USER ALL=(ALL) NOPASSWD: /usr/bin/asdcontrol" | sudo tee /etc/sudoers.d/asdcontrol +sudo chmod 440 /etc/sudoers.d/asdcontrol diff --git a/install/config/theme.sh b/install/config/theme.sh old mode 100755 new mode 100644 index da3f1308db..a4ed8b3ef2 --- a/install/config/theme.sh +++ b/install/config/theme.sh @@ -1,8 +1,6 @@ -#!/bin/bash - -gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark" -gsettings set org.gnome.desktop.interface color-scheme "prefer-dark" -gsettings set org.gnome.desktop.interface icon-theme "Yaru-blue" +# 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 # Setup theme links mkdir -p ~/.config/omarchy/themes @@ -14,10 +12,17 @@ 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 -ln -snf ~/.config/omarchy/current/theme/neovim.lua ~/.config/nvim/lua/plugins/theme.lua +# ~/.config/omarchy/current/theme/neovim.lua -> ~/.config/nvim/lua/plugins/theme.lua is handled via omarchy-setup-nvim mkdir -p ~/.config/btop/themes ln -snf ~/.config/omarchy/current/theme/btop.theme ~/.config/btop/themes/current.theme mkdir -p ~/.config/mako ln -snf ~/.config/omarchy/current/theme/mako.ini ~/.config/mako/config + +# Add managed policy directories for Chromium and Brave for theme changes +sudo mkdir -p /etc/chromium/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 diff --git a/install/config/timezones.sh b/install/config/timezones.sh old mode 100755 new mode 100644 index 7aa17fb1d2..24e96a0f28 --- a/install/config/timezones.sh +++ b/install/config/timezones.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # Ensure timezone can be updated without needing to sudo sudo tee /etc/sudoers.d/omarchy-tzupdate >/dev/null < /dev/null << EOF +[Trigger] +Type = Package +Operation = Upgrade +Target = walker +Target = walker-debug +Target = elephant* + +[Action] +Description = Restarting Walker services after system update +When = PostTransaction +Exec = $OMARCHY_PATH/bin/omarchy-restart-walker +EOF + +# Link the visual theme menu config +mkdir -p ~/.config/elephant/menus +ln -snf $OMARCHY_PATH/default/elephant/omarchy_themes.lua ~/.config/elephant/menus/omarchy_themes.lua diff --git a/install/config/xcompose.sh b/install/config/xcompose.sh old mode 100755 new mode 100644 index 5fb501b3a0..a86976bdcc --- a/install/config/xcompose.sh +++ b/install/config/xcompose.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # Set default XCompose that is triggered with CapsLock tee ~/.XCompose >/dev/null </dev/null; then # This computer runs on a battery powerprofilesctl set balanced || true diff --git a/install/first-run/cleanup-reboot-sudoers.sh b/install/first-run/cleanup-reboot-sudoers.sh new file mode 100644 index 0000000000..ccc9966ba4 --- /dev/null +++ b/install/first-run/cleanup-reboot-sudoers.sh @@ -0,0 +1,3 @@ +if sudo test -f /etc/sudoers.d/99-omarchy-installer-reboot; then + sudo rm -f /etc/sudoers.d/99-omarchy-installer-reboot +fi diff --git a/install/first-run/dns-resolver.sh b/install/first-run/dns-resolver.sh new file mode 100644 index 0000000000..bf46388a26 --- /dev/null +++ b/install/first-run/dns-resolver.sh @@ -0,0 +1,4 @@ +# https://wiki.archlinux.org/title/Systemd-resolved +echo "Symlink resolved stub-resolv to /etc/resolv.conf" + +sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf diff --git a/install/first-run/elephant.sh b/install/first-run/elephant.sh new file mode 100644 index 0000000000..9517f6b9c3 --- /dev/null +++ b/install/first-run/elephant.sh @@ -0,0 +1,2 @@ +elephant service enable +systemctl --user start elephant.service diff --git a/install/first-run/firewall.sh b/install/first-run/firewall.sh old mode 100755 new mode 100644 index efd1159f18..cc187dc27d --- a/install/first-run/firewall.sh +++ b/install/first-run/firewall.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # Allow nothing in, everything out sudo ufw default deny incoming sudo ufw default allow outgoing @@ -8,15 +6,15 @@ sudo ufw default allow outgoing sudo ufw allow 53317/udp sudo ufw allow 53317/tcp -# Allow SSH in -sudo ufw allow 22/tcp - # Allow Docker containers to use DNS on host sudo ufw allow in proto udp from 172.16.0.0/12 to 172.17.0.1 port 53 comment 'allow-docker-dns' # Turn on the firewall sudo ufw --force enable +# Enable UFW systemd service to start on boot +sudo systemctl enable ufw + # Turn on Docker protections sudo ufw-docker install sudo ufw reload diff --git a/install/first-run/gnome-theme.sh b/install/first-run/gnome-theme.sh new file mode 100644 index 0000000000..2936312636 --- /dev/null +++ b/install/first-run/gnome-theme.sh @@ -0,0 +1,5 @@ +gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark" +gsettings set org.gnome.desktop.interface color-scheme "prefer-dark" +gsettings set org.gnome.desktop.interface icon-theme "Yaru-blue" + +sudo gtk-update-icon-cache /usr/share/icons/Yaru diff --git a/install/first-run/welcome.sh b/install/first-run/welcome.sh new file mode 100644 index 0000000000..9c5d06afa2 --- /dev/null +++ b/install/first-run/welcome.sh @@ -0,0 +1 @@ +notify-send " Learn Keybindings" "Super + K for cheatsheet.\nSuper + Space for application launcher.\nSuper + Alt + Space for Omarchy Menu." -u critical diff --git a/install/first-run/wifi.sh b/install/first-run/wifi.sh new file mode 100644 index 0000000000..f8d7fc8f5a --- /dev/null +++ b/install/first-run/wifi.sh @@ -0,0 +1,6 @@ +if ! ping -c3 -W1 1.1.1.1 >/dev/null 2>&1; then + notify-send " Update System" "When you have internet, click to update the system." -u critical + notify-send "󰖩 Click to Setup Wi-Fi" "Tab to navigate, Space to select, ? for help." -u critical +else + notify-send " Update System" "Click to update the system." -u critical +fi diff --git a/install/helpers/all.sh b/install/helpers/all.sh new file mode 100644 index 0000000000..0fc48100ba --- /dev/null +++ b/install/helpers/all.sh @@ -0,0 +1,4 @@ +source $OMARCHY_INSTALL/helpers/chroot.sh +source $OMARCHY_INSTALL/helpers/presentation.sh +source $OMARCHY_INSTALL/helpers/errors.sh +source $OMARCHY_INSTALL/helpers/logging.sh diff --git a/install/preflight/chroot.sh b/install/helpers/chroot.sh old mode 100755 new mode 100644 similarity index 72% rename from install/preflight/chroot.sh rename to install/helpers/chroot.sh index 4a6d5b82cf..ab61972e37 --- a/install/preflight/chroot.sh +++ b/install/helpers/chroot.sh @@ -6,3 +6,6 @@ chrootable_systemctl_enable() { sudo systemctl enable --now $1 fi } + +# Export the function so it's available in subshells +export -f chrootable_systemctl_enable diff --git a/install/helpers/errors.sh b/install/helpers/errors.sh new file mode 100644 index 0000000000..2b63409b7d --- /dev/null +++ b/install/helpers/errors.sh @@ -0,0 +1,163 @@ +# Directs user to Omarchy Discord +QR_CODE=' +█▀▀▀▀▀█ ▄ ▄ ▀▄▄▄█ █▀▀▀▀▀█ +█ ███ █ ▄▄▄▄▀▄▀▄▀ █ ███ █ +█ ▀▀▀ █ ▄█ ▄█▄▄▀ █ ▀▀▀ █ +▀▀▀▀▀▀▀ ▀▄█ █ █ █ ▀▀▀▀▀▀▀ +▀▀█▀▀▄▀▀▀▀▄█▀▀█ ▀ █ ▀ █ +█▄█ ▄▄▀▄▄ ▀ ▄ ▀█▄▄▄▄ ▀ ▀█ +▄ ▄▀█ ▀▄▀▀▀▄ ▄█▀▄█▀▄▀▄▀█▀ +█ ▄▄█▄▀▄█ ▄▄▄ ▀ ▄▀██▀ ▀█ +▀ ▀ ▀ █ ▀▄ ▀▀█▀▀▀█▄▀ +█▀▀▀▀▀█ ▀█ ▄▀▀ █ ▀ █▄▀██ +█ ███ █ █▀▄▄▀ █▀███▀█▄██▄ +█ ▀▀▀ █ ██ ▀ █▄█ ▄▄▄█▀ █ +▀▀▀▀▀▀▀ ▀ ▀ ▀▀▀ ▀ ▀▀▀▀▀▀' + +# Track if we're already handling an error to prevent double-trapping +ERROR_HANDLING=false + +# Cursor is usually hidden while we install +show_cursor() { + printf "\033[?25h" +} + +# Display truncated log lines from the install log +show_log_tail() { + if [[ -f $OMARCHY_INSTALL_LOG_FILE ]]; then + local log_lines=$(($TERM_HEIGHT - $LOGO_HEIGHT - 35)) + local max_line_width=$((LOGO_WIDTH - 4)) + + tail -n $log_lines "$OMARCHY_INSTALL_LOG_FILE" | while IFS= read -r line; do + if ((${#line} > max_line_width)); then + local truncated_line="${line:0:$max_line_width}..." + else + local truncated_line="$line" + fi + + gum style "$truncated_line" + done + + echo + fi +} + +# Display the failed command or script name +show_failed_script_or_command() { + if [[ -n ${CURRENT_SCRIPT:-} ]]; then + gum style "Failed script: $CURRENT_SCRIPT" + else + # Truncate long command lines to fit the display + local cmd="$BASH_COMMAND" + local max_cmd_width=$((LOGO_WIDTH - 4)) + + if ((${#cmd} > max_cmd_width)); then + cmd="${cmd:0:$max_cmd_width}..." + fi + + gum style "$cmd" + fi +} + +# Save original stdout and stderr for trap to use +save_original_outputs() { + exec 3>&1 4>&2 +} + +# Restore stdout and stderr to original (saved in FD 3 and 4) +# This ensures output goes to screen, not log file +restore_outputs() { + if [ -e /proc/self/fd/3 ] && [ -e /proc/self/fd/4 ]; then + exec 1>&3 2>&4 + fi +} + +# Error handler +catch_errors() { + # Prevent recursive error handling + if [[ $ERROR_HANDLING == true ]]; then + return + else + ERROR_HANDLING=true + fi + + # Store exit code immediately before it gets overwritten + local exit_code=$? + + stop_log_output + restore_outputs + + clear_logo + show_cursor + + gum style --foreground 1 --padding "1 0 1 $PADDING_LEFT" "Omarchy installation stopped!" + show_log_tail + + gum style "This command halted with exit code $exit_code:" + show_failed_script_or_command + + gum style "$QR_CODE" + echo + gum style "Get help from the community via QR code or at https://discord.gg/tXFUdasqhY" + + # Offer options menu + while true; do + options=() + + # If online install, show retry first + if [[ -n ${OMARCHY_ONLINE_INSTALL:-} ]]; then + options+=("Retry installation") + fi + + # Add upload option if internet is available + if ping -c 1 -W 1 1.1.1.1 >/dev/null 2>&1; then + options+=("Upload log for support") + fi + + # Add remaining options + options+=("View full log") + options+=("Exit") + + choice=$(gum choose "${options[@]}" --header "What would you like to do?" --height 6 --padding "1 $PADDING_LEFT") + + case "$choice" in + "Retry installation") + bash ~/.local/share/omarchy/install.sh + break + ;; + "View full log") + if command -v less &>/dev/null; then + less "$OMARCHY_INSTALL_LOG_FILE" + else + tail "$OMARCHY_INSTALL_LOG_FILE" + fi + ;; + "Upload log for support") + omarchy-upload-install-log + ;; + "Exit" | "") + exit 1 + ;; + esac + done +} + +# Exit handler - ensures cleanup happens on any exit +exit_handler() { + local exit_code=$? + + # Only run if we're exiting with an error and haven't already handled it + if [[ $exit_code -ne 0 && $ERROR_HANDLING != true ]]; then + catch_errors + else + stop_log_output + show_cursor + fi +} + +# Set up traps +trap catch_errors ERR INT TERM +trap exit_handler EXIT + +# Save original outputs in case we trap +save_original_outputs diff --git a/install/helpers/logging.sh b/install/helpers/logging.sh new file mode 100644 index 0000000000..4ebe2a9e5f --- /dev/null +++ b/install/helpers/logging.sh @@ -0,0 +1,134 @@ +start_log_output() { + local ANSI_SAVE_CURSOR="\033[s" + local ANSI_RESTORE_CURSOR="\033[u" + local ANSI_CLEAR_LINE="\033[2K" + local ANSI_HIDE_CURSOR="\033[?25l" + local ANSI_RESET="\033[0m" + local ANSI_GRAY="\033[90m" + + # Save cursor position and hide cursor + printf $ANSI_SAVE_CURSOR + printf $ANSI_HIDE_CURSOR + + ( + local log_lines=20 + local max_line_width=$((LOGO_WIDTH - 4)) + + while true; do + # Read the last N lines into an array + mapfile -t current_lines < <(tail -n $log_lines "$OMARCHY_INSTALL_LOG_FILE" 2>/dev/null) + + # Build complete output buffer with escape sequences + output="" + for ((i = 0; i < log_lines; i++)); do + line="${current_lines[i]:-}" + + # Truncate if needed + if [ ${#line} -gt $max_line_width ]; then + line="${line:0:$max_line_width}..." + fi + + # Add clear line escape and formatted output for each line + if [ -n "$line" ]; then + output+="${ANSI_CLEAR_LINE}${ANSI_GRAY}${PADDING_LEFT_SPACES} → ${line}${ANSI_RESET}\n" + else + output+="${ANSI_CLEAR_LINE}${PADDING_LEFT_SPACES}\n" + fi + done + + printf "${ANSI_RESTORE_CURSOR}%b" "$output" + + sleep 0.1 + done + ) & + monitor_pid=$! +} + +stop_log_output() { + if [ -n "${monitor_pid:-}" ]; then + kill $monitor_pid 2>/dev/null || true + wait $monitor_pid 2>/dev/null || true + unset monitor_pid + fi +} + +start_install_log() { + sudo touch "$OMARCHY_INSTALL_LOG_FILE" + sudo chmod 666 "$OMARCHY_INSTALL_LOG_FILE" + + export OMARCHY_START_TIME=$(date '+%Y-%m-%d %H:%M:%S') + + echo "=== Omarchy Installation Started: $OMARCHY_START_TIME ===" >>"$OMARCHY_INSTALL_LOG_FILE" + start_log_output +} + +stop_install_log() { + stop_log_output + show_cursor + + if [[ -n ${OMARCHY_INSTALL_LOG_FILE:-} ]]; then + OMARCHY_END_TIME=$(date '+%Y-%m-%d %H:%M:%S') + echo "=== Omarchy Installation Completed: $OMARCHY_END_TIME ===" >>"$OMARCHY_INSTALL_LOG_FILE" + echo "" >>"$OMARCHY_INSTALL_LOG_FILE" + echo "=== Installation Time Summary ===" >>"$OMARCHY_INSTALL_LOG_FILE" + + if [ -f "/var/log/archinstall/install.log" ]; then + ARCHINSTALL_START=$(grep -m1 '^\[' /var/log/archinstall/install.log 2>/dev/null | sed 's/^\[\([^]]*\)\].*/\1/' || true) + ARCHINSTALL_END=$(grep 'Installation completed without any errors' /var/log/archinstall/install.log 2>/dev/null | sed 's/^\[\([^]]*\)\].*/\1/' || true) + + if [ -n "$ARCHINSTALL_START" ] && [ -n "$ARCHINSTALL_END" ]; then + ARCH_START_EPOCH=$(date -d "$ARCHINSTALL_START" +%s) + ARCH_END_EPOCH=$(date -d "$ARCHINSTALL_END" +%s) + ARCH_DURATION=$((ARCH_END_EPOCH - ARCH_START_EPOCH)) + + ARCH_MINS=$((ARCH_DURATION / 60)) + ARCH_SECS=$((ARCH_DURATION % 60)) + + echo "Archinstall: ${ARCH_MINS}m ${ARCH_SECS}s" >>"$OMARCHY_INSTALL_LOG_FILE" + fi + fi + + if [ -n "$OMARCHY_START_TIME" ]; then + OMARCHY_START_EPOCH=$(date -d "$OMARCHY_START_TIME" +%s) + OMARCHY_END_EPOCH=$(date -d "$OMARCHY_END_TIME" +%s) + OMARCHY_DURATION=$((OMARCHY_END_EPOCH - OMARCHY_START_EPOCH)) + + OMARCHY_MINS=$((OMARCHY_DURATION / 60)) + OMARCHY_SECS=$((OMARCHY_DURATION % 60)) + + echo "Omarchy: ${OMARCHY_MINS}m ${OMARCHY_SECS}s" >>"$OMARCHY_INSTALL_LOG_FILE" + + if [ -n "$ARCH_DURATION" ]; then + TOTAL_DURATION=$((ARCH_DURATION + OMARCHY_DURATION)) + TOTAL_MINS=$((TOTAL_DURATION / 60)) + TOTAL_SECS=$((TOTAL_DURATION % 60)) + echo "Total: ${TOTAL_MINS}m ${TOTAL_SECS}s" >>"$OMARCHY_INSTALL_LOG_FILE" + fi + fi + echo "=================================" >>"$OMARCHY_INSTALL_LOG_FILE" + + echo "Rebooting system..." >>"$OMARCHY_INSTALL_LOG_FILE" + fi +} + +run_logged() { + local script="$1" + + export CURRENT_SCRIPT="$script" + + echo "[$(date '+%Y-%m-%d %H:%M:%S')] Starting: $script" >>"$OMARCHY_INSTALL_LOG_FILE" + + # Use bash -c to create a clean subshell + bash -c "source '$script'" >"$OMARCHY_INSTALL_LOG_FILE" 2>&1 + + local exit_code=$? + + if [ $exit_code -eq 0 ]; then + echo "[$(date '+%Y-%m-%d %H:%M:%S')] Completed: $script" >>"$OMARCHY_INSTALL_LOG_FILE" + unset CURRENT_SCRIPT + else + echo "[$(date '+%Y-%m-%d %H:%M:%S')] Failed: $script (exit code: $exit_code)" >>"$OMARCHY_INSTALL_LOG_FILE" + fi + + return $exit_code +} diff --git a/install/helpers/presentation.sh b/install/helpers/presentation.sh new file mode 100644 index 0000000000..70cab2e96c --- /dev/null +++ b/install/helpers/presentation.sh @@ -0,0 +1,48 @@ +# Ensure we have gum available +if ! command -v gum &>/dev/null; then + sudo pacman -S --needed --noconfirm gum +fi + +# Get terminal size from /dev/tty (works in all scenarios: direct, sourced, or piped) +if [ -e /dev/tty ]; then + TERM_SIZE=$(stty size 2>/dev/null max) max = length } END { print max+0 }' "$LOGO_PATH" 2>/dev/null || echo 0) +export LOGO_HEIGHT=$(wc -l <"$LOGO_PATH" 2>/dev/null || echo 0) + +export PADDING_LEFT=$((($TERM_WIDTH - $LOGO_WIDTH) / 2)) +export PADDING_LEFT_SPACES=$(printf "%*s" $PADDING_LEFT "") + +# Tokyo Night theme for gum confirm +export GUM_CONFIRM_PROMPT_FOREGROUND="6" # Cyan for prompt +export GUM_CONFIRM_SELECTED_FOREGROUND="0" # Black text on selected +export GUM_CONFIRM_SELECTED_BACKGROUND="2" # Green background for selected +export GUM_CONFIRM_UNSELECTED_FOREGROUND="7" # White for unselected +export GUM_CONFIRM_UNSELECTED_BACKGROUND="0" # Black background for unselected +export PADDING="0 0 0 $PADDING_LEFT" # Gum Style +export GUM_CHOOSE_PADDING="$PADDING" +export GUM_FILTER_PADDING="$PADDING" +export GUM_INPUT_PADDING="$PADDING" +export GUM_SPIN_PADDING="$PADDING" +export GUM_TABLE_PADDING="$PADDING" +export GUM_CONFIRM_PADDING="$PADDING" + +clear_logo() { + printf "\033[H\033[2J" # Clear screen and move cursor to top-left + gum style --foreground 2 --padding "1 0 0 $PADDING_LEFT" "$(<"$LOGO_PATH")" +} diff --git a/install/login/all.sh b/install/login/all.sh new file mode 100644 index 0000000000..2c03df321d --- /dev/null +++ b/install/login/all.sh @@ -0,0 +1,4 @@ +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 diff --git a/install/login/alt-bootloaders.sh b/install/login/alt-bootloaders.sh deleted file mode 100755 index 7476ec7d80..0000000000 --- a/install/login/alt-bootloaders.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/bash - -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 diff --git a/install/login/default-keyring.sh b/install/login/default-keyring.sh new file mode 100644 index 0000000000..134fefb6a4 --- /dev/null +++ b/install/login/default-keyring.sh @@ -0,0 +1,22 @@ +KEYRING_DIR="$HOME/.local/share/keyrings" +KEYRING_FILE="$KEYRING_DIR/Default_keyring.keyring" +DEFAULT_FILE="$KEYRING_DIR/default" + +mkdir -p $KEYRING_DIR + +cat << EOF | tee "$KEYRING_FILE" +[keyring] +display-name=Default keyring +ctime=$(date +%s) +mtime=0 +lock-on-idle=false +lock-after=false +EOF + +cat << EOF | tee "$DEFAULT_FILE" +Default_keyring +EOF + +chmod 700 "$KEYRING_DIR" +chmod 600 "$KEYRING_FILE" +chmod 644 "$DEFAULT_FILE" diff --git a/install/login/limine-snapper.sh b/install/login/limine-snapper.sh old mode 100755 new mode 100644 index e679851ad0..1f00375a65 --- a/install/login/limine-snapper.sh +++ b/install/login/limine-snapper.sh @@ -1,14 +1,29 @@ -#!/bin/bash - if command -v limine &>/dev/null; then + sudo pacman -S --noconfirm --needed limine-snapper-sync limine-mkinitcpio-hook + sudo tee /etc/mkinitcpio.conf.d/omarchy_hooks.conf </dev/null HOOKS=(base udev plymouth keyboard autodetect microcode modconf kms keymap consolefont block encrypt filesystems fsck btrfs-overlayfs) EOF - [[ -f /boot/EFI/limine/limine.conf ]] && EFI=true + [[ -f /boot/EFI/limine/limine.conf ]] || [[ -f /boot/EFI/BOOT/limine.conf ]] && EFI=true # Conf location is different between EFI and BIOS - [[ -n "$EFI" ]] && limine_config="/boot/EFI/limine/limine.conf" || limine_config="/boot/limine/limine.conf" + if [[ -n "$EFI" ]]; then + # Check USB location first, then regular EFI location + if [[ -f /boot/EFI/BOOT/limine.conf ]]; then + limine_config="/boot/EFI/BOOT/limine.conf" + else + limine_config="/boot/EFI/limine/limine.conf" + fi + else + limine_config="/boot/limine/limine.conf" + fi + + # Double-check and exit if we don't have a config file for some reason + if [[ ! -f $limine_config ]]; then + echo "Error: Limine config not found at $limine_config" >&2 + exit 1 + fi CMDLINE=$(grep "^[[:space:]]*cmdline:" "$limine_config" | head -1 | sed 's/^[[:space:]]*cmdline:[[:space:]]*//') @@ -21,6 +36,7 @@ KERNEL_CMDLINE[default]="$CMDLINE" KERNEL_CMDLINE[default]+="quiet splash" ENABLE_UKI=yes +CUSTOM_UKI_NAME="omarchy" ENABLE_LIMINE_FALLBACK=yes @@ -59,14 +75,17 @@ term_palette_bright: 414868;f7768e;9ece6a;e0af68;7aa2f7;bb9af7;7dcfff;c0caf5 term_foreground: c0caf5 term_foreground_bright: c0caf5 term_background_bright: 24283b - + EOF - sudo pacman -S --noconfirm --needed limine-snapper-sync limine-mkinitcpio-hook - sudo limine-update + # Remove the original config file if it's not /boot/limine.conf + if [[ "$limine_config" != "/boot/limine.conf" ]] && [[ -f "$limine_config" ]]; then + sudo rm "$limine_config" + fi + # Match Snapper configs if not installing from the ISO - if [ -z "${OMARCHY_CHROOT_INSTALL:-}" ]; then + if [[ -z ${OMARCHY_CHROOT_INSTALL:-} ]]; then if ! sudo snapper list-configs 2>/dev/null | grep -q "root"; then sudo snapper -c root create-config / fi @@ -84,12 +103,40 @@ EOF chrootable_systemctl_enable limine-snapper-sync.service fi -# Add UKI entry to UEFI machines to skip bootloader showing on normal boot -if [ -n "$EFI" ] && efibootmgr &>/dev/null && ! efibootmgr | grep -q Omarchy && - ! cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "American Megatrends"; 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\\$(cat /etc/machine-id)_linux.efi" +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" + +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 + +# Move this to a utility to allow manual activation +# 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 "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 \ +# --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 diff --git a/install/login/plymouth.sh b/install/login/plymouth.sh old mode 100755 new mode 100644 index 37c0eaf788..fad64fe2a9 --- a/install/login/plymouth.sh +++ b/install/login/plymouth.sh @@ -1,153 +1,4 @@ -#!/bin/bash - -# Hyprland launched via UWSM and login directly as user, rely on disk encryption + hyprlock for security - -# ============================================================================== -# PLYMOUTH SETUP -# ============================================================================== - if [ "$(plymouth-set-default-theme)" != "omarchy" ]; then sudo cp -r "$HOME/.local/share/omarchy/default/plymouth" /usr/share/plymouth/themes/omarchy/ - sudo plymouth-set-default-theme -R omarchy -fi - -# ============================================================================== -# SEAMLESS LOGIN -# ============================================================================== - -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 -#include -#include -#include -#include -#include -#include -#include -#include - -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 \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 </dev/null; then - git clone https://github.com/nikosdion/asdcontrol.git /tmp/asdcontrol - cd /tmp/asdcontrol - make - sudo make install - cd - - rm -rf /tmp/asdcontrol - - # Setup sudo-less controls - echo "$USER ALL=(ALL) NOPASSWD: /usr/local/bin/asdcontrol" | sudo tee /etc/sudoers.d/asdcontrol - sudo chmod 440 /etc/sudoers.d/asdcontrol -fi diff --git a/install/packaging/base.sh b/install/packaging/base.sh new file mode 100644 index 0000000000..668e4a9b62 --- /dev/null +++ b/install/packaging/base.sh @@ -0,0 +1,3 @@ +# Install all base packages +mapfile -t packages < <(grep -v '^#' "$OMARCHY_INSTALL/omarchy-base.packages" | grep -v '^$') +sudo pacman -S --noconfirm --needed "${packages[@]}" diff --git a/install/packaging/fonts.sh b/install/packaging/fonts.sh old mode 100755 new mode 100644 index 01f31edbdb..8d5a35eced --- a/install/packaging/fonts.sh +++ b/install/packaging/fonts.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # Omarchy logo in a font for Waybar use mkdir -p ~/.local/share/fonts cp ~/.local/share/omarchy/config/omarchy.ttf ~/.local/share/fonts/ diff --git a/install/packaging/icons.sh b/install/packaging/icons.sh new file mode 100644 index 0000000000..3110afc9dd --- /dev/null +++ b/install/packaging/icons.sh @@ -0,0 +1,4 @@ +# Copy all bundled icons to the applications/icons directory +ICON_DIR="$HOME/.local/share/applications/icons" +mkdir -p "$ICON_DIR" +cp ~/.local/share/omarchy/applications/icons/*.png "$ICON_DIR/" diff --git a/install/packaging/lazyvim.sh b/install/packaging/lazyvim.sh deleted file mode 100755 index 7fad269d23..0000000000 --- a/install/packaging/lazyvim.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -if [[ ! -d "$HOME/.config/nvim" ]]; then - git clone https://github.com/LazyVim/starter ~/.config/nvim - cp -R ~/.local/share/omarchy/config/nvim/* ~/.config/nvim/ - rm -rf ~/.config/nvim/.git - echo "vim.opt.relativenumber = false" >>~/.config/nvim/lua/config/options.lua -fi diff --git a/install/packaging/nvim.sh b/install/packaging/nvim.sh new file mode 100644 index 0000000000..e045d19e4f --- /dev/null +++ b/install/packaging/nvim.sh @@ -0,0 +1,2 @@ +# Includes lazyvim and the themes +omarchy-nvim-setup diff --git a/install/packaging/pins.sh b/install/packaging/pins.sh deleted file mode 100755 index bacb616594..0000000000 --- a/install/packaging/pins.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -# We pin explicit packages that are bad upstream here -pinned_packages=$(omarchy-pkg-pinned) - -if [[ -n $pinned_packages ]]; then - echo -e "\e[32m\nInstall pinned system packages\e[0m" - - for pinned in $pinned_packages; do - echo "sudo pacman -U --noconfirm $pinned" - sudo pacman -U --noconfirm $pinned - done -fi diff --git a/install/packaging/tuis.sh b/install/packaging/tuis.sh old mode 100755 new mode 100644 index 0aea639ab9..273a5d70e1 --- a/install/packaging/tuis.sh +++ b/install/packaging/tuis.sh @@ -1,4 +1,4 @@ -#!/bin/bash +ICON_DIR="$HOME/.local/share/applications/icons" -omarchy-tui-install "Disk Usage" "bash -c 'dust -r; read -n 1 -s'" float https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/qdirstat.png -omarchy-tui-install "Docker" "lazydocker" tile https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/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" diff --git a/install/packaging/webapps.sh b/install/packaging/webapps.sh old mode 100755 new mode 100644 index ac6b3baf3f..c5f7350bcd --- a/install/packaging/webapps.sh +++ b/install/packaging/webapps.sh @@ -1,15 +1,13 @@ -#!/bin/bash - -omarchy-webapp-install "HEY" https://app.hey.com https://www.hey.com/assets/images/general/hey.png -omarchy-webapp-install "Basecamp" https://launchpad.37signals.com https://basecamp.com/assets/images/general/basecamp.png -omarchy-webapp-install "WhatsApp" https://web.whatsapp.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/whatsapp.png -omarchy-webapp-install "Google Photos" https://photos.google.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/google-photos.png -omarchy-webapp-install "Google Contacts" https://contacts.google.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/google-contacts.png -omarchy-webapp-install "Google Messages" https://messages.google.com/web/conversations https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/google-messages.png -omarchy-webapp-install "ChatGPT" https://chatgpt.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/chatgpt.png -omarchy-webapp-install "YouTube" https://youtube.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/youtube.png -omarchy-webapp-install "GitHub" https://github.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/github-light.png -omarchy-webapp-install "X" https://x.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/x-light.png -omarchy-webapp-install "Figma" https://figma.com/ https://www.veryicon.com/download/png/application/app-icon-7/figma-1?s=256 -omarchy-webapp-install "Discord" https://discord.com/channels/@me https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/discord.png -omarchy-webapp-install "Zoom" https://app.zoom.us/wc/home https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/zoom.png +omarchy-webapp-install "HEY" https://app.hey.com HEY.png "omarchy-webapp-handler-hey %u" "x-scheme-handler/mailto" +omarchy-webapp-install "Basecamp" https://launchpad.37signals.com Basecamp.png +omarchy-webapp-install "WhatsApp" https://web.whatsapp.com/ WhatsApp.png +omarchy-webapp-install "Google Photos" https://photos.google.com/ "Google Photos.png" +omarchy-webapp-install "Google Contacts" https://contacts.google.com/ "Google Contacts.png" +omarchy-webapp-install "Google Messages" https://messages.google.com/web/conversations "Google Messages.png" +omarchy-webapp-install "ChatGPT" https://chatgpt.com/ ChatGPT.png +omarchy-webapp-install "YouTube" https://youtube.com/ YouTube.png +omarchy-webapp-install "GitHub" https://github.com/ GitHub.png +omarchy-webapp-install "X" https://x.com/ X.png +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" diff --git a/install/post-install/all.sh b/install/post-install/all.sh new file mode 100644 index 0000000000..bb5c0839e5 --- /dev/null +++ b/install/post-install/all.sh @@ -0,0 +1,3 @@ +run_logged $OMARCHY_INSTALL/post-install/pacman.sh +source $OMARCHY_INSTALL/post-install/allow-reboot.sh +source $OMARCHY_INSTALL/post-install/finished.sh diff --git a/install/post-install/allow-reboot.sh b/install/post-install/allow-reboot.sh new file mode 100644 index 0000000000..a5e28d1497 --- /dev/null +++ b/install/post-install/allow-reboot.sh @@ -0,0 +1,5 @@ +# Allow passwordless reboot for the installer - removed in first-run +sudo tee /etc/sudoers.d/99-omarchy-installer-reboot >/dev/null </dev/null; then + echo + TOTAL_TIME=$(tail -n 20 "$OMARCHY_INSTALL_LOG_FILE" | grep "^Total:" | sed 's/^Total:[[:space:]]*//') + if [ -n "$TOTAL_TIME" ]; then + echo_in_style "Installed in $TOTAL_TIME" + fi +else + echo_in_style "Finished installing" +fi + +if sudo test -f /etc/sudoers.d/99-omarchy-installer; then + sudo rm -f /etc/sudoers.d/99-omarchy-installer &>/dev/null +fi + +# Exit gracefully if user chooses not to reboot +if gum confirm --padding "0 0 0 $((PADDING_LEFT + 32))" --show-help=false --default --affirmative "Reboot Now" --negative "" ""; then + # Clear screen to hide any shutdown messages + clear + + if [[ -n "${OMARCHY_CHROOT_INSTALL:-}" ]]; then + touch /var/tmp/omarchy-install-completed + exit 0 + else + sudo reboot 2>/dev/null + fi +fi diff --git a/install/post-install/pacman.sh b/install/post-install/pacman.sh new file mode 100644 index 0000000000..dbd6bcfca4 --- /dev/null +++ b/install/post-install/pacman.sh @@ -0,0 +1,12 @@ +# Configure pacman +sudo cp -f ~/.local/share/omarchy/default/pacman/pacman.conf /etc/pacman.conf +sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist-stable /etc/pacman.d/mirrorlist + +if lspci -nn | grep -q "106b:180[12]"; then + cat </dev/null + +[arch-mact2] +Server = https://github.com/NoaHimesaka1873/arch-mact2-mirror/releases/download/release +SigLevel = Never +EOF +fi diff --git a/install/preflight/all.sh b/install/preflight/all.sh new file mode 100644 index 0000000000..883546594f --- /dev/null +++ b/install/preflight/all.sh @@ -0,0 +1,7 @@ +source $OMARCHY_INSTALL/preflight/guard.sh +source $OMARCHY_INSTALL/preflight/begin.sh +run_logged $OMARCHY_INSTALL/preflight/show-env.sh +run_logged $OMARCHY_INSTALL/preflight/pacman.sh +run_logged $OMARCHY_INSTALL/preflight/migrations.sh +run_logged $OMARCHY_INSTALL/preflight/first-run-mode.sh +run_logged $OMARCHY_INSTALL/preflight/disable-mkinitcpio.sh diff --git a/install/preflight/begin.sh b/install/preflight/begin.sh new file mode 100644 index 0000000000..f83a7c38c3 --- /dev/null +++ b/install/preflight/begin.sh @@ -0,0 +1,4 @@ +clear_logo +gum style --foreground 3 --padding "1 0 0 $PADDING_LEFT" "Installing..." +echo +start_install_log diff --git a/install/preflight/disable-mkinitcpio.sh b/install/preflight/disable-mkinitcpio.sh new file mode 100644 index 0000000000..a1979c8628 --- /dev/null +++ b/install/preflight/disable-mkinitcpio.sh @@ -0,0 +1,16 @@ +# Temporarily disable mkinitcpio hooks to prevent multiple regenerations during package installation +# This speeds up installation significantly + +echo "Temporarily disabling mkinitcpio hooks during installation..." + +# Move the specific mkinitcpio pacman hooks out of the way if they exist +if [ -f /usr/share/libalpm/hooks/90-mkinitcpio-install.hook ]; then + sudo mv /usr/share/libalpm/hooks/90-mkinitcpio-install.hook /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled +fi + +if [ -f /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook ]; then + sudo mv /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled +fi + +echo "mkinitcpio hooks disabled" + diff --git a/install/preflight/first-run-mode.sh b/install/preflight/first-run-mode.sh old mode 100755 new mode 100644 index 49eee6f4ce..536058cc21 --- a/install/preflight/first-run-mode.sh +++ b/install/preflight/first-run-mode.sh @@ -1,5 +1,3 @@ -#!/bin/bash - # Set first-run mode marker so we can install stuff post-installation mkdir -p ~/.local/state/omarchy touch ~/.local/state/omarchy/first-run.mode @@ -7,8 +5,12 @@ touch ~/.local/state/omarchy/first-run.mode # Setup sudo-less access for first-run sudo tee /etc/sudoers.d/first-run >/dev/null </dev/null | grep -q 'Secure Boot: enabled'; then + abort "Secure Boot disabled" +fi # Must not have Gnome or KDE already install -pacman -Qe gnome-shell &>/dev/null && abort "Fresh + Vanilla Arch" -pacman -Qe plasma-desktop &>/dev/null && abort "Fresh + Vanilla Arch" +if pacman -Qe gnome-shell &>/dev/null || pacman -Qe plasma-desktop &>/dev/null; then + abort "Fresh + Vanilla Arch" +fi + +# 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 echo "Guards: OK" diff --git a/install/preflight/migrations.sh b/install/preflight/migrations.sh old mode 100755 new mode 100644 index f520a54207..27819d13fe --- a/install/preflight/migrations.sh +++ b/install/preflight/migrations.sh @@ -1,5 +1,3 @@ -#!/bin/bash - OMARCHY_MIGRATIONS_STATE_PATH=~/.local/state/omarchy/migrations mkdir -p $OMARCHY_MIGRATIONS_STATE_PATH diff --git a/install/preflight/pacman.sh b/install/preflight/pacman.sh new file mode 100644 index 0000000000..b4e03ef721 --- /dev/null +++ b/install/preflight/pacman.sh @@ -0,0 +1,18 @@ +if [[ -n ${OMARCHY_ONLINE_INSTALL:-} ]]; then + # Install build tools + sudo pacman -S --needed --noconfirm base-devel + + # Configure pacman + sudo cp -f ~/.local/share/omarchy/default/pacman/pacman.conf /etc/pacman.conf + sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist /etc/pacman.d/mirrorlist + + sudo pacman-key --recv-keys 40DFB630FF42BCFFB047046CF0134EE680CAC571 --keyserver keys.openpgp.org + sudo pacman-key --lsign-key 40DFB630FF42BCFFB047046CF0134EE680CAC571 + + sudo pacman -Sy + sudo pacman -S --noconfirm --needed omarchy-keyring + + + # Refresh all repos + sudo pacman -Syu --noconfirm +fi diff --git a/install/preflight/repositories.sh b/install/preflight/repositories.sh deleted file mode 100755 index 0e53313e7a..0000000000 --- a/install/preflight/repositories.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -# Install build tools -sudo pacman -S --needed --noconfirm base-devel - -# Add fun and color and verbosity to the pacman installer -if ! grep -q "ILoveCandy" /etc/pacman.conf; then - sudo sed -i '/^\[options\]/a Color\nILoveCandy\nVerbosePkgLists' /etc/pacman.conf -fi - -# Add the Omarchy repository -if ! grep -q "omarchy" /etc/pacman.conf; then - echo -e "\n[omarchy]\nSigLevel = Optional TrustAll\nServer = https://pkgs.omarchy.org/\$arch/\n" | sudo tee -a /etc/pacman.conf >/dev/null -fi - -# Set mirrors to global ones only -echo -e "Server = https://geo.mirror.pkgbuild.com/\$repo/os/\$arch\nServer = https://mirror.rackspace.com/archlinux/\$repo/os/\$arch" | - sudo tee /etc/pacman.d/mirrorlist >/dev/null - -# Only add Chaotic-AUR if the architecture is x86_64 so ARM users can build the packages -if [[ "$(uname -m)" == "x86_64" ]] && [ -z "$DISABLE_CHAOTIC" ]; then - # Try installing Chaotic-AUR keyring and mirrorlist - if ! pacman-key --list-keys 3056513887B78AEB >/dev/null 2>&1 && - sudo pacman-key --recv-key 3056513887B78AEB && - sudo pacman-key --lsign-key 3056513887B78AEB && - sudo pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' && - sudo pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'; then - - # Add Chaotic-AUR repo to pacman config - if ! grep -q "chaotic-aur" /etc/pacman.conf; then - echo -e '\n[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist' | sudo tee -a /etc/pacman.conf >/dev/null - fi - else - echo -e "Failed to install Chaotic-AUR, so won't include it in pacman config!" - fi -fi - -# Refresh all repos -sudo pacman -Syu --noconfirm diff --git a/install/preflight/show-env.sh b/install/preflight/show-env.sh old mode 100755 new mode 100644 index 8753df12ad..1a9319d6c1 --- a/install/preflight/show-env.sh +++ b/install/preflight/show-env.sh @@ -1,4 +1,6 @@ -#!/bin/bash +# Show installation environment variables +gum log --level info "Installation Environment:" -echo "Installation ENV:" -env | grep -E "^(OMARCHY_CHROOT_INSTALL|OMARCHY_USER_NAME|OMARCHY_USER_EMAIL|USER|HOME|OMARCHY_REPO|OMARCHY_REF)=" +env | grep -E "^(OMARCHY_CHROOT_INSTALL|OMARCHY_ONLINE_INSTALL|OMARCHY_USER_NAME|OMARCHY_USER_EMAIL|USER|HOME|OMARCHY_REPO|OMARCHY_REF|OMARCHY_PATH)=" | sort | while IFS= read -r var; do + gum log --level info " $var" +done diff --git a/install/preflight/trap-errors.sh b/install/preflight/trap-errors.sh deleted file mode 100755 index de66219824..0000000000 --- a/install/preflight/trap-errors.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -# Give people a chance to retry running the installation -catch_errors() { - echo -e "\n\e[31mOmarchy installation failed!\e[0m" - echo - echo "This command halted with exit code $?:" - echo "$BASH_COMMAND" - echo - echo "Get help from the community via QR code or at https://discord.gg/tXFUdasqhY" - echo " " - echo " █▀▀▀▀▀█ ▄ ▄ ▀▄▄▄█ █▀▀▀▀▀█ " - echo " █ ███ █ ▄▄▄▄▀▄▀▄▀ █ ███ █ " - echo " █ ▀▀▀ █ ▄█ ▄█▄▄▀ █ ▀▀▀ █ " - echo " ▀▀▀▀▀▀▀ ▀▄█ █ █ █ ▀▀▀▀▀▀▀ " - echo " ▀▀█▀▀▄▀▀▀▀▄█▀▀█ ▀ █ ▀ █ " - echo " █▄█ ▄▄▀▄▄ ▀ ▄ ▀█▄▄▄▄ ▀ ▀█ " - echo " ▄ ▄▀█ ▀▄▀▀▀▄ ▄█▀▄█▀▄▀▄▀█▀ " - echo " █ ▄▄█▄▀▄█ ▄▄▄ ▀ ▄▀██▀ ▀█ " - echo " ▀ ▀ ▀ █ ▀▄ ▀▀█▀▀▀█▄▀ " - echo " █▀▀▀▀▀█ ▀█ ▄▀▀ █ ▀ █▄▀██ " - echo " █ ███ █ █▀▄▄▀ █▀███▀█▄██▄ " - echo " █ ▀▀▀ █ ██ ▀ █▄█ ▄▄▄█▀ █ " - echo " ▀▀▀▀▀▀▀ ▀ ▀ ▀▀▀ ▀ ▀▀▀▀▀▀ " - echo " " - - echo "You can retry by running: bash ~/.local/share/omarchy/install.sh" -} - -trap catch_errors ERR diff --git a/migrations/1751134560.sh b/migrations/1751134560.sh index a8932f4592..928b98fab8 100644 --- a/migrations/1751134560.sh +++ b/migrations/1751134560.sh @@ -4,11 +4,24 @@ export OMARCHY_PATH="$HOME/.local/share/omarchy" export PATH="$OMARCHY_PATH/bin:$PATH" mkdir -p "$HOME/.config/uwsm/" -omarchy-refresh-config uwsm/env +cat < Update again after the quick relaunch is complete.\e[0m" -echo +# Ensure we have the latest repos and are ready to pull +omarchy-refresh-pacman +sudo systemctl restart systemd-timesyncd +sudo pacman -Sy # Normally not advisable, but we'll do a full -Syu before finishing -gum confirm "Ready to relaunch Hyprland? (All applications will be closed)" && - touch ~/.local/state/omarchy/migrations/1751134560.sh && - uwsm stop +mkdir -p ~/.local/state/omarchy/migrations +touch ~/.local/state/omarchy/migrations/1751134560.sh + +# Remove old AUR packages to prevent a super lengthy build on old Omarchy installs +omarchy-pkg-drop zoom qt5-remoteobjects wf-recorder wl-screenrec + +# Get rid of old AUR packages +bash $OMARCHY_PATH/migrations/1756060611.sh +touch ~/.local/state/omarchy/migrations/1756060611.sh + +bash omarchy-update-perform diff --git a/migrations/1751134561.sh b/migrations/1751134561.sh deleted file mode 100644 index 367fac3cd2..0000000000 --- a/migrations/1751134561.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Add Omarchy Package Repository" - -if ! grep -q "omarchy" /etc/pacman.conf; then - sudo sed -i '/^\[core\]/i [omarchy]\nSigLevel = Optional TrustAll\nServer = https:\/\/pkgs.omarchy.org\/$arch\/\n' /etc/pacman.conf - sudo systemctl restart systemd-timesyncd - sudo pacman -Syu --noconfirm -fi diff --git a/migrations/1751134562.sh b/migrations/1751134562.sh new file mode 100644 index 0000000000..0be8ee2599 --- /dev/null +++ b/migrations/1751134562.sh @@ -0,0 +1,4 @@ +echo "Ensure all indexes and packages are up to date" + +omarchy-refresh-pacman +sudo pacman -Syu --noconfirm diff --git a/migrations/1751134568.sh b/migrations/1751134568.sh index 14c8f41485..99cd600fc1 100644 --- a/migrations/1751134568.sh +++ b/migrations/1751134568.sh @@ -1,4 +1,4 @@ -# Turn on bluetooth service so blueberry works out the box +# Turn on bluetooth service so blueberry or bluetui works out the box echo "Let's turn on Bluetooth service so the controls work" if systemctl is-enabled --quiet bluetooth.service && systemctl is-active --quiet bluetooth.service; then # Bluetooth is already enabled, nothing to change diff --git a/migrations/1751135253.sh b/migrations/1751135253.sh index 92e91445a1..c0766574a5 100644 --- a/migrations/1751135253.sh +++ b/migrations/1751135253.sh @@ -1,5 +1,3 @@ echo "Add missing installation of bat (used by the ff alias)" -if ! command -v bat &>/dev/null; then - # Add missing installation of bat - sudo pacman -S --noconfirm --needed bat -fi + +omarchy-pkg-add bat diff --git a/migrations/1751510848.sh b/migrations/1751510848.sh index 8bdc855c54..6b289d41f6 100644 --- a/migrations/1751510848.sh +++ b/migrations/1751510848.sh @@ -1,5 +1,3 @@ echo "Installing missing fd terminal tool for finding files" -if ! command -v fd &>/dev/null; then - sudo pacman -S --noconfirm --needed fd -fi +omarchy-pkg-add fd diff --git a/migrations/1751667620.sh b/migrations/1751667620.sh index a45252e789..d93c6008a3 100644 --- a/migrations/1751667620.sh +++ b/migrations/1751667620.sh @@ -1,8 +1,9 @@ echo "Switching from vlc to mpv for the default video player" -if ! command -v mpv &>/dev/null; then - sudo pacman -Rns --noconfirm vlc +if omarchy-cmd-missing mpv; then + omarchy-pkg-drop vlc rm ~/.local/share/applications/vlc.desktop - sudo pacman -S --noconfirm mpv + + omarchy-pkg-add mpv xdg-mime default mpv.desktop video/mp4 xdg-mime default mpv.desktop video/x-msvideo xdg-mime default mpv.desktop video/x-matroska diff --git a/migrations/1751672984.sh b/migrations/1751672984.sh index 9b0308a60f..f48834bb23 100644 --- a/migrations/1751672984.sh +++ b/migrations/1751672984.sh @@ -1,5 +1,4 @@ echo "Add LocalSend as new default application" -if ! command -v localsend &>/dev/null; then - sudo pacman -S --noconfirm --needed localsend -fi +omarchy-pkg-drop localsend-bin +omarchy-pkg-add localsend diff --git a/migrations/1751679069.sh b/migrations/1751679069.sh index a2f437f33e..abe68a4a37 100644 --- a/migrations/1751679069.sh +++ b/migrations/1751679069.sh @@ -1,5 +1,3 @@ echo "Install ffmpegthumbnailer for video thumbnails in the file manager" -if ! command -v ffmpegthumbnailer &>/dev/null; then - sudo pacman -S --noconfirm --needed ffmpegthumbnailer -fi +omarchy-pkg-add ffmpegthumbnailer diff --git a/migrations/1751821819.sh b/migrations/1751821819.sh index f8d616f9e1..dc282c2e94 100644 --- a/migrations/1751821819.sh +++ b/migrations/1751821819.sh @@ -1,5 +1,3 @@ echo "Install bash-completion" -if ! pacman -Q bash-completion &>/dev/null; then - sudo pacman -S --noconfirm --needed bash-completion -fi +omarchy-pkg-add bash-completion diff --git a/migrations/1751887718.sh b/migrations/1751887718.sh index ac1894f5b0..3d3f401b23 100644 --- a/migrations/1751887718.sh +++ b/migrations/1751887718.sh @@ -1,6 +1,6 @@ echo "Install Impala as new wifi selection TUI" -if ! command -v impala &>/dev/null; then - sudo pacman -S --noconfirm --needed impala - echo "You need to update the Waybar config to use Impala Wi-Fi selector in top bar." + +if omarchy-cmd-missing impala; then + omarchy-pkg-add impala omarchy-refresh-waybar fi diff --git a/migrations/1752081088.sh b/migrations/1752081088.sh index 6eb49a2734..727988fe2a 100644 --- a/migrations/1752081088.sh +++ b/migrations/1752081088.sh @@ -1,2 +1,3 @@ echo "Permanently fix F-keys on Apple-mode keyboards (like Lofree Flow84)" -source ~/.local/share/omarchy/install/config/hardware/fix-fkeys.sh + +source $OMARCHY_PATH/install/config/hardware/fix-fkeys.sh diff --git a/migrations/1752082381.sh b/migrations/1752082381.sh index 561fa7e773..e351fd9c52 100644 --- a/migrations/1752082381.sh +++ b/migrations/1752082381.sh @@ -1,5 +1,3 @@ echo "Adding gnome-keyring to make 1password work with 2FA codes" -if ! command -v gnome-keyring &>/dev/null; then - sudo pacman -S --noconfirm --needed gnome-keyring -fi +omarchy-pkg-add gnome-keyring diff --git a/migrations/1752091783.sh b/migrations/1752091783.sh index 6d7160b8ce..b8b53061ea 100644 --- a/migrations/1752091783.sh +++ b/migrations/1752091783.sh @@ -1,4 +1,4 @@ echo "Install Plymouth splash screen" -sudo pacman -S --needed --noconfirm uwsm plymouth -source "$HOME/.local/share/omarchy/install/login/plymouth.sh" +omarchy-pkg-add uwsm plymouth +source "$OMARCHY_PATH/install/login/plymouth.sh" diff --git a/migrations/1752104271.sh b/migrations/1752104271.sh index a602fe38c6..dcbda813e7 100644 --- a/migrations/1752104271.sh +++ b/migrations/1752104271.sh @@ -1,4 +1,5 @@ echo "Switching to polkit-gnome for better fingerprint authentication compatibility" + if ! command -v /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &>/dev/null; then sudo pacman -S --noconfirm --needed polkit-gnome systemctl --user stop hyprpolkitagent diff --git a/migrations/1752153188.sh b/migrations/1752153188.sh index fca5ebf035..ec4beea559 100644 --- a/migrations/1752153188.sh +++ b/migrations/1752153188.sh @@ -1,4 +1,5 @@ echo "Migrate to the modular implementation of hyprlock" + if [ -L ~/.config/hypr/hyprlock.conf ]; then rm ~/.config/hypr/hyprlock.conf cp ~/.local/share/omarchy/config/hypr/hyprlock.conf ~/.config/hypr/hyprlock.conf diff --git a/migrations/1752168292.sh b/migrations/1752168292.sh old mode 100755 new mode 100644 diff --git a/migrations/1752188554.sh b/migrations/1752188554.sh index ffec2a2743..13c5d54cef 100644 --- a/migrations/1752188554.sh +++ b/migrations/1752188554.sh @@ -1,7 +1,5 @@ echo "Update chromium.desktop to ensure we are always using wayland" -if [[ ! -f ~/.local/share/applications/chromium.desktop ]]; then - cp ~/.local/share/omarchy/applications/chromium.desktop ~/.local/share/applications/ - 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 -fi + +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 diff --git a/migrations/1752251002.sh b/migrations/1752251002.sh index 39cb487ad7..cea7a61397 100644 --- a/migrations/1752251002.sh +++ b/migrations/1752251002.sh @@ -1,4 +1,5 @@ echo "Migrate to the modular, variable-based implementation of waybar style.css" + if [ -L ~/.config/waybar/style.css ]; then rm ~/.config/waybar/style.css cp ~/.local/share/omarchy/config/waybar/style.css ~/.config/waybar/style.css diff --git a/migrations/1752292967.sh b/migrations/1752292967.sh index ad649ced7c..d587fc4cc3 100644 --- a/migrations/1752292967.sh +++ b/migrations/1752292967.sh @@ -1,5 +1,6 @@ echo "Update to use UWSM and seamless login" -if ! command -v uwsm &>/dev/null; then + +if omarchy-cmd-missing uwsm; then sudo rm -f /etc/systemd/system/getty@tty1.service.d/override.conf sudo rmdir /etc/systemd/system/getty@tty1.service.d/ 2>/dev/null || true @@ -14,5 +15,5 @@ if ! command -v uwsm &>/dev/null; then sed -i 's/^GTK_IM_MODULE=fcitx$//' "$HOME/.config/environment.d/fcitx.conf" fi - source ~/.local/share/omarchy/install/login/plymouth.sh + source $OMARCHY_PATH/install/login/plymouth.sh fi diff --git a/migrations/1752543801.sh b/migrations/1752543801.sh index d1e5bfd372..7c068addc7 100644 --- a/migrations/1752543801.sh +++ b/migrations/1752543801.sh @@ -1,3 +1,4 @@ echo "Add color and animation to pacman installs" + grep -q '^Color' /etc/pacman.conf || sudo sed -i '/^\[options\]/a Color' /etc/pacman.conf grep -q '^ILoveCandy' /etc/pacman.conf || sudo sed -i '/^\[options\]/a ILoveCandy' /etc/pacman.conf diff --git a/migrations/1752678932.sh b/migrations/1752678932.sh index 1aa8c8586b..915a74d5bb 100644 --- a/migrations/1752678932.sh +++ b/migrations/1752678932.sh @@ -1,5 +1,3 @@ echo "Install missing docker-buildx package for out-of-the-box Kamal compatibility" -if ! docker buildx version &>/dev/null; then - sudo pacman -S --noconfirm --needed docker-buildx -fi +omarchy-pkg-add docker-buildx diff --git a/migrations/1752725616.sh b/migrations/1752725616.sh index 5dddefe92b..5f94c05efa 100644 --- a/migrations/1752725616.sh +++ b/migrations/1752725616.sh @@ -1,4 +1,5 @@ echo "Make light themes possible" + if [[ -f ~/.local/share/applications/blueberry.desktop ]]; then rm -f ~/.local/share/applications/blueberry.desktop rm -f ~/.local/share/applications/org.pulseaudio.pavucontrol.desktop diff --git a/migrations/1752793122.sh b/migrations/1752793122.sh index fad0646b1a..9429d92b87 100644 --- a/migrations/1752793122.sh +++ b/migrations/1752793122.sh @@ -1,4 +1,5 @@ echo "Rename waybar config file for syntax highlighting" + if [[ -f ~/.config/waybar/config ]]; then mv ~/.config/waybar/config ~/.config/waybar/config.jsonc fi diff --git a/migrations/1752797704.sh b/migrations/1752797704.sh index f51aa70037..b59111fa82 100644 --- a/migrations/1752797704.sh +++ b/migrations/1752797704.sh @@ -1,4 +1,5 @@ echo "Prevent docker from requiring network readiness on boot" + if [[ ! -f /etc/systemd/system/docker.service.d/no-block-boot.conf ]]; then sudo mkdir -p /etc/systemd/system/docker.service.d/ sudo tee /etc/systemd/system/docker.service.d/no-block-boot.conf <<'EOF' diff --git a/migrations/1752874371.sh b/migrations/1752874371.sh index 649adc77c7..669c3b7d9f 100644 --- a/migrations/1752874371.sh +++ b/migrations/1752874371.sh @@ -1,4 +1,5 @@ echo "Add Catppuccin Latte light theme" + if [[ ! -L "~/.config/omarchy/themes/catppuccin-latte" ]]; then ln -snf ~/.local/share/omarchy/themes/catppuccin-latte ~/.config/omarchy/themes/ fi diff --git a/migrations/1752885858.sh b/migrations/1752885858.sh deleted file mode 100644 index 8720878616..0000000000 --- a/migrations/1752885858.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Install slurp + wl-screenrec for new ALT+PrintScreen screen recorder" - -if ! command -v wl-screenrec &>/dev/null || ! command -v slurp &>/dev/null; then - sudo pacman -S --noconfirm --needed slurp wl-screenrec -fi diff --git a/migrations/1752896442.sh b/migrations/1752896442.sh index 1b154e3c7b..f8fa9a8c68 100644 --- a/migrations/1752896442.sh +++ b/migrations/1752896442.sh @@ -1,9 +1,8 @@ echo "Replace volume control GUI with a TUI" -if ! command -v wiremix &>/dev/null; then - sudo pacman -S --noconfirm --needed wiremix - sudo pacman -Rns --noconfirm pavucontrol - +if omarchy-cmd-missing wiremix; then + omarchy-pkg-add wiremix + omarchy-pkg-drop pavucontrol omarchy-refresh-applications omarchy-refresh-waybar fi diff --git a/migrations/1752897642.sh b/migrations/1752897642.sh index e1f844ddf7..1b4b1f81b9 100644 --- a/migrations/1752897642.sh +++ b/migrations/1752897642.sh @@ -1,4 +1,3 @@ echo "Remove needless fcitx5-configtool package" -if pacman -Qe fcitx5-configtool &>/dev/null; then - sudo pacman -Rns --noconfirm fcitx5-configtool -fi + +omarchy-pkg-drop fcitx5-configtool diff --git a/migrations/1752899588.sh b/migrations/1752899588.sh index ba778cd802..562c6bd272 100644 --- a/migrations/1752899588.sh +++ b/migrations/1752899588.sh @@ -1,2 +1,3 @@ echo "Update .config/hypr/hyprlock.conf to include failed attempt counter" + omarchy-refresh-hyprlock diff --git a/migrations/1752955912.sh b/migrations/1752955912.sh index 0933cb1023..fa55477c23 100644 --- a/migrations/1752955912.sh +++ b/migrations/1752955912.sh @@ -1,5 +1,3 @@ echo "Install satty for the new screenshot flow" -if ! command -v satty &>/dev/null; then - sudo pacman -S --noconfirm --needed satty -fi +omarchy-pkg-add satty diff --git a/migrations/1752981883.sh b/migrations/1752981883.sh index bac71ab03a..34a53950f1 100644 --- a/migrations/1752981883.sh +++ b/migrations/1752981883.sh @@ -1,9 +1,9 @@ echo "Replace wofi with walker as the default launcher" -if ! command -v walker &>/dev/null; then - sudo pacman -S --noconfirm --needed walker-bin libqalculate +if omarchy-cmd-missing walker; then + omarchy-pkg-add walker-bin libqalculate - sudo pacman -Rns --noconfirm wofi + omarchy-pkg-drop wofi rm -rf ~/.config/wofi mkdir -p ~/.config/walker diff --git a/migrations/1753138691.sh b/migrations/1753138691.sh index 53f54719bd..ef55a91f4a 100644 --- a/migrations/1753138691.sh +++ b/migrations/1753138691.sh @@ -1,6 +1,6 @@ echo "Install swayOSD to show volume status" -if ! command -v swayosd-server &>/dev/null; then - sudo pacman -S --noconfirm --needed swayosd - setsid uwsm app -- swayosd-server &>/dev/null & +if omarchy-cmd-missing swayosd-server; then + omarchy-pkg-add swayosd + setsid uwsm-app -- swayosd-server &>/dev/null & fi diff --git a/migrations/1753176520.sh b/migrations/1753176520.sh deleted file mode 100644 index e26abf2f9d..0000000000 --- a/migrations/1753176520.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Install wf-recorder for screen recording for nvidia" - -if lspci | grep -qi 'nvidia'; then - if ! command -v wf-recorder &>/dev/null; then - sudo pacman -S --noconfirm --needed wf-recorder - fi -fi diff --git a/migrations/1753224615.sh b/migrations/1753224615.sh old mode 100755 new mode 100644 index cd6c7978d0..6f9dcfb510 --- a/migrations/1753224615.sh +++ b/migrations/1753224615.sh @@ -5,5 +5,5 @@ if [[ ! -d ~/.config/swayosd ]]; then cp -r ~/.local/share/omarchy/config/swayosd/* ~/.config/swayosd/ pkill swayosd-server - setsid uwsm app -- swayosd-server &>/dev/null & + setsid uwsm-app -- swayosd-server &>/dev/null & fi diff --git a/migrations/1753352057.sh b/migrations/1753352057.sh deleted file mode 100755 index 3265f6a1b5..0000000000 --- a/migrations/1753352057.sh +++ /dev/null @@ -1,18 +0,0 @@ -echo "Add Chaotic-AUR to get compiled binaries" - -if [[ "$(uname -m)" == "x86_64" ]] && ! grep -q '^\[chaotic-aur\]' /etc/pacman.conf; then - # Try installing Chaotic-AUR keyring and mirrorlist - if sudo pacman-key --recv-key 3056513887B78AEB && - sudo pacman-key --lsign-key 3056513887B78AEB && - sudo pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' && - sudo pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'; then - - # Add Chaotic-AUR repo to pacman config - echo -e '\n[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist' | sudo tee -a /etc/pacman.conf >/dev/null - - # Refresh pacman package databases - sudo pacman -Syu --noconfirm - else - echo "Failed to install Chaotic-AUR, so won't include it in pacman config!" - fi -fi diff --git a/migrations/1753468218.sh b/migrations/1753468218.sh deleted file mode 100644 index 8fa3ba58a7..0000000000 --- a/migrations/1753468218.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Add Terminal Text Effects for rizzing Omarchy" - -if ! pacman -Q python-terminaltexteffects &>/dev/null; then - sudo pacman -S --noconfirm python-terminaltexteffects -fi diff --git a/migrations/1753495989.sh b/migrations/1753495989.sh index 5c0efcdad4..119b432440 100644 --- a/migrations/1753495989.sh +++ b/migrations/1753495989.sh @@ -1,5 +1,6 @@ echo "Allow updating of timezone by right-clicking on the clock (or running omarchy-cmd-tzupdate)" -if ! command -v tzupdate &>/dev/null; then - bash ~/.local/share/omarchy/install/config/timezones.sh + +if omarchy-cmd-missing tzupdate; then + bash "$OMARCHY_PATH/install/config/timezones.sh" omarchy-refresh-waybar fi diff --git a/migrations/1753558374.sh b/migrations/1753558374.sh deleted file mode 100644 index b961d3ed0e..0000000000 --- a/migrations/1753558374.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "Update Walker config to include = as the leader key for the calculator" -if ! grep -q 'prefix = "="' ~/.config/walker/config.toml; then - omarchy-refresh-walker -fi diff --git a/migrations/1753998861.sh b/migrations/1753998861.sh deleted file mode 100644 index 4751dee563..0000000000 --- a/migrations/1753998861.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "Update Walker config to include . as the leader key for the finder" -if ! grep -q 'prefix = "\."' ~/.config/walker/config.toml; then - omarchy-refresh-walker -fi diff --git a/migrations/1754208139.sh b/migrations/1754208139.sh deleted file mode 100644 index b95c7443d1..0000000000 --- a/migrations/1754208139.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Ensure screensaver doesn't start while the computer is locked" - -if ! grep -q "pidof hyprlock || omarchy-launch-screensaver" ~/.config/hypr/hypridle.conf; then - omarchy-refresh-hypridle -fi diff --git a/migrations/1754215439.sh b/migrations/1754215439.sh deleted file mode 100644 index 90651bb0f7..0000000000 --- a/migrations/1754215439.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Update app launcher config to allow enough entries to show all keybindings on SUPER+K" - -if ! grep "max_entries = 200" ~/.config/walker/config.toml; then - omarchy-refresh-walker -fi diff --git a/migrations/1754215533.sh b/migrations/1754215533.sh index 05a07743a9..2657b623f5 100644 --- a/migrations/1754215533.sh +++ b/migrations/1754215533.sh @@ -1,7 +1,7 @@ echo "Enable auto-discovery of network printers" if [[ ! -f /etc/systemd/resolved.conf.d/10-disable-multicast.conf ]]; then - sudo pacman -S --noconfirm avahi nss-mdns + omarchy-pkg-add avahi nss-mdns # Disable multicast dns in resolved. Avahi will provide this for better network printer discovery sudo mkdir -p /etc/systemd/resolved.conf.d @@ -10,7 +10,7 @@ if [[ ! -f /etc/systemd/resolved.conf.d/10-disable-multicast.conf ]]; then fi if ! grep -q '^CreateRemotePrinters Yes' /etc/cups/cups-browsed.conf; then - sudo pacman -S --noconfirm cups-browsed + omarchy-pkg-add cups-browsed # Enable automatically adding remote printers echo 'CreateRemotePrinters Yes' | sudo tee -a /etc/cups/cups-browsed.conf sudo systemctl enable --now cups-browsed.service diff --git a/migrations/1754221967.sh b/migrations/1754221967.sh index 7a13507996..b1e42b7a87 100644 --- a/migrations/1754221967.sh +++ b/migrations/1754221967.sh @@ -1,2 +1,3 @@ echo "Add support for accessing Android phone data via file manager" -sudo pacman -S --noconfirm --needed gvfs-mtp + +omarchy-pkg-add gvfs-mtp diff --git a/migrations/1754228679.sh b/migrations/1754228679.sh deleted file mode 100644 index 2a80234d03..0000000000 --- a/migrations/1754228679.sh +++ /dev/null @@ -1,2 +0,0 @@ -echo "Increase time before screensaver starts to 2.5 minutes (from 1 minute)" -omarchy-refresh-hypridle diff --git a/migrations/1754265453.sh b/migrations/1754265453.sh deleted file mode 100644 index 412d75e059..0000000000 --- a/migrations/1754265453.sh +++ /dev/null @@ -1,2 +0,0 @@ -echo "Add chromium-flags.conf" -omarchy-refresh-config chromium-flags.conf diff --git a/migrations/1754302123.sh b/migrations/1754302123.sh index 5e7ff5984e..b9b72ee77f 100644 --- a/migrations/1754302123.sh +++ b/migrations/1754302123.sh @@ -1,4 +1,5 @@ echo "Change update-available icon in top bar from  to " + if grep -q '"format": "",' ~/.config/waybar/config.jsonc; then sed -i 's/"format": ""/"format": ""/' ~/.config/waybar/config.jsonc fi diff --git a/migrations/1754305112.sh b/migrations/1754305112.sh deleted file mode 100644 index e23ea5d99b..0000000000 --- a/migrations/1754305112.sh +++ /dev/null @@ -1,2 +0,0 @@ -echo "Restart Walker to pick up menu selections" -omarchy-restart-walker diff --git a/migrations/1754332200.sh b/migrations/1754332200.sh index fc9c350307..4e92daa407 100644 --- a/migrations/1754332200.sh +++ b/migrations/1754332200.sh @@ -1,2 +1,3 @@ echo "Remove old Omarchy TUI app now that we have the Omarchy Menu" -rm -rf ~/.local/share/applications/omarchy.desktop + +rm -f ~/.local/share/applications/omarchy.desktop diff --git a/migrations/1754509222.sh b/migrations/1754509222.sh index ced63c6dd8..48f3c850ff 100644 --- a/migrations/1754509222.sh +++ b/migrations/1754509222.sh @@ -1,3 +1,3 @@ echo "Add xmlstarlet needed for updating fonts via Omarchy menu" -sudo pacman -S --noconfirm --needed xmlstarlet +omarchy-pkg-add xmlstarlet diff --git a/migrations/1754515289.sh b/migrations/1754515289.sh deleted file mode 100644 index 23f4db5e72..0000000000 --- a/migrations/1754515289.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "Update and restart Walker to resolve stuck Omarchy menu" - -sudo pacman -Syu --noconfirm walker-bin -omarchy-restart-walker diff --git a/migrations/1754666868.sh b/migrations/1754666868.sh deleted file mode 100644 index db311aeda8..0000000000 --- a/migrations/1754666868.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Update OS icon in About from Windows to Arch" - -omarchy-refresh-config fastfetch/config.jsonc diff --git a/migrations/1754668999.sh b/migrations/1754668999.sh index b7966ed9f9..7361dcd6db 100644 --- a/migrations/1754668999.sh +++ b/migrations/1754668999.sh @@ -1,4 +1,3 @@ echo "Tune MTU probing for more reliable SSH" -# Solve common flakiness with SSH echo "net.ipv4.tcp_mtu_probing=1" | sudo tee -a /etc/sysctl.d/99-sysctl.conf diff --git a/migrations/1754679822.sh b/migrations/1754679822.sh deleted file mode 100644 index 3787c64755..0000000000 --- a/migrations/1754679822.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Lock 1password on screen lock" - -if ! grep -q "omarchy-lock-screen" ~/.config/hypr/hypridle.conf; then - omarchy-refresh-hypridle -fi diff --git a/migrations/1754828680.sh b/migrations/1754828680.sh deleted file mode 100644 index 6deb7c442b..0000000000 --- a/migrations/1754828680.sh +++ /dev/null @@ -1,2 +0,0 @@ -echo "Update Walker config" -omarchy-refresh-walker diff --git a/migrations/1754860578.sh b/migrations/1754860578.sh index afd4beb8f3..c384c7af32 100644 --- a/migrations/1754860578.sh +++ b/migrations/1754860578.sh @@ -1,4 +1,5 @@ echo "Update polkit policy to yield to fingerprint and fido2" + # If fprint exists in polkit, it was wrong and needs reset if [ -f /etc/pam.d/polkit-1 ] && grep -Fq 'pam_fprintd.so' /etc/pam.d/polkit-1; then sudo tee /etc/pam.d/polkit-1 >/dev/null <<'EOF' diff --git a/migrations/1754929475.sh b/migrations/1754929475.sh index f6089a8969..ac4f650b97 100644 --- a/migrations/1754929475.sh +++ b/migrations/1754929475.sh @@ -1,4 +1,5 @@ echo "Add start burst limit to login" + if [ -f /etc/systemd/system/omarchy-seamless-login.service ]; then cat </dev/null; then - echo "$NEW_CONFIG" | sudo tee /etc/docker/daemon.json >/dev/null -fi + if grep -Fq "$ORIGINAL_CONFIG" /etc/docker/daemon.json 2>/dev/null; then + echo "$NEW_CONFIG" | sudo tee /etc/docker/daemon.json >/dev/null + fi -# Expose systemd-resolved to our Docker network -echo -e '[Resolve]\nDNSStubListenerExtra=172.17.0.1' | sudo tee /etc/systemd/resolved.conf.d/20-docker-dns.conf >/dev/null + # Expose systemd-resolved to our Docker network + 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 docker + sudo systemctl restart systemd-resolved + sudo systemctl restart docker +fi diff --git a/migrations/1755109182.sh b/migrations/1755109182.sh old mode 100755 new mode 100644 index 352e342a59..1908b94ae8 --- a/migrations/1755109182.sh +++ b/migrations/1755109182.sh @@ -28,5 +28,4 @@ if [ -f /etc/systemd/resolved.conf ]; then echo "DNS configuration reset to use DHCP (router DNS)" echo "To use Cloudflare DNS, run: omarchy-setup-dns Cloudflare" -fi - +fi \ No newline at end of file diff --git a/migrations/1755164105.sh b/migrations/1755164105.sh index a17ac58796..e4a3f38433 100644 --- a/migrations/1755164105.sh +++ b/migrations/1755164105.sh @@ -1,17 +1,17 @@ echo "Switch to Omarchy Chromium for synchronized theme switching" -set_theme_colors() { - if [[ -f ~/.config/omarchy/current/theme/chromium.theme ]] && command -v chromium &>/dev/null; then - chromium --no-startup-window --set-theme-color="$(<~/.config/omarchy/current/theme/chromium.theme)" - else - # Use a default, neutral grey if theme doesn't have a color - chromium --no-startup-window --set-theme-color="28,32,39" - fi -} +if omarchy-cmd-present chromium; then + set_theme_colors() { + if [[ -f ~/.config/omarchy/current/theme/chromium.theme ]]; then + chromium --no-startup-window --set-theme-color="$(<~/.config/omarchy/current/theme/chromium.theme)" + else + # Use a default, neutral grey if theme doesn't have a color + chromium --no-startup-window --set-theme-color="28,32,39" + fi + } -if command -v chromium &>/dev/null; then - sudo pacman -Rns --noconfirm chromium || true - sudo pacman -S --noconfirm omarchy-chromium + omarchy-pkg-drop chromium + omarchy-pkg-add omarchy-chromium if pgrep -x chromium; then if gum confirm "Chromium must be restarted. Ready?"; then diff --git a/migrations/1755436367.sh b/migrations/1755436367.sh index b3de9b4b67..e7c897064c 100644 --- a/migrations/1755436367.sh +++ b/migrations/1755436367.sh @@ -1,6 +1,6 @@ echo "Add minimal starship prompt to terminal" -if ! command -v starship &>/dev/null; then - sudo pacman -S --noconfirm starship +if omarchy-cmd-missing starship; then + omarchy-pkg-add starship cp $OMARCHY_PATH/config/starship.toml ~/.config/starship.toml fi diff --git a/migrations/1755455095.sh b/migrations/1755455095.sh index 4aed9d5671..2a929fe08a 100644 --- a/migrations/1755455095.sh +++ b/migrations/1755455095.sh @@ -1,9 +1,3 @@ echo "Ensure TTE and dependencies are installed" -if ! pacman -Q python-poetry-core &>/dev/null; then - sudo pacman -S --noconfirm python-poetry-core -fi - -if ! pacman -Q python-terminaltexteffects &>/dev/null; then - sudo pacman -S --noconfirm python-terminaltexteffects -fi +omarchy-pkg-add python-poetry-core python-terminaltexteffects diff --git a/migrations/1755459930.sh b/migrations/1755459930.sh index 2b9c2f311c..73af324c81 100644 --- a/migrations/1755459930.sh +++ b/migrations/1755459930.sh @@ -1,5 +1,3 @@ echo "Add potentially missing dependency for power profile controls" -if ! pacman -Q python-gobject &>/dev/null; then - sudo pacman -S --noconfirm python-gobject -fi +omarchy-pkg-add python-gobject diff --git a/migrations/1755494432.sh b/migrations/1755494432.sh index 04bbe297f8..ae6cbc4d3c 100644 --- a/migrations/1755494432.sh +++ b/migrations/1755494432.sh @@ -1,3 +1,3 @@ echo "Disable USB autosuspend" -$OMARCHY_PATH/install/config/hardware/usb-autosuspend.sh +bash "$OMARCHY_PATH/install/config/hardware/usb-autosuspend.sh" diff --git a/migrations/1755507891.sh b/migrations/1755507891.sh old mode 100755 new mode 100644 diff --git a/migrations/1755512354.sh b/migrations/1755512354.sh deleted file mode 100644 index ffbee83ff9..0000000000 --- a/migrations/1755512354.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Update fastfetch config to include current theme name and colors" - -omarchy-refresh-config fastfetch/config.jsonc diff --git a/migrations/1755527220.sh b/migrations/1755527220.sh deleted file mode 100644 index 845c3fe836..0000000000 --- a/migrations/1755527220.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Turn on the screensaver by default again now that TTE has been fixed" - -omarchy-refresh-hypridle diff --git a/migrations/1755548643.sh b/migrations/1755548643.sh deleted file mode 100644 index 3f5367b96a..0000000000 --- a/migrations/1755548643.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Install wf-recorder for intel based device" - -if lspci | grep -Eqi 'nvidia|intel.*graphics'; then - sudo pacman -S --noconfirm --needed wf-recorder -fi diff --git a/migrations/1755865046.sh b/migrations/1755865046.sh index b07766a584..c48962e5aa 100644 --- a/migrations/1755865046.sh +++ b/migrations/1755865046.sh @@ -1,6 +1,4 @@ echo "Switch from lazydocker-bin to lazydocker official" -if pacman -Q lazydocker-bin >/dev/null; then - sudo pacman -Rns --noconfirm lazydocker-bin - sudo pacman -S --noconfirm lazydocker -fi +omarchy-pkg-drop lazydocker-bin +omarchy-pkg-add lazydocker diff --git a/migrations/1755870033.sh b/migrations/1755870033.sh index fde865be1b..d7b6e8f9ae 100644 --- a/migrations/1755870033.sh +++ b/migrations/1755870033.sh @@ -1,5 +1,5 @@ echo "Use current terminal shell cwd for new terminal working directories" if ! grep -q "working-directory" ~/.config/hypr/bindings.conf; then - sed -i '/bindd = SUPER, return, Terminal, exec, \$terminal/ s|$| --working-directory=$(omarchy-cmd-terminal-cwd)|' ~/.config/hypr/bindings.conf + sed -i '/bindd = SUPER, RETURN, Terminal, exec, \$terminal/ s|$| --working-directory=$(omarchy-cmd-terminal-cwd)|' ~/.config/hypr/bindings.conf fi diff --git a/migrations/1755878717.sh b/migrations/1755878717.sh deleted file mode 100644 index 164fe6a681..0000000000 --- a/migrations/1755878717.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Ensure Docker DNS requests are not blocked by ufw firewall" - -sudo ufw disable -sudo ufw allow in proto udp from 172.16.0.0/12 to 172.17.0.1 port 53 comment 'allow-docker-dns' -sudo ufw enable diff --git a/migrations/1755930114.sh b/migrations/1755930114.sh index 90d44e5eec..fd491d6971 100644 --- a/migrations/1755930114.sh +++ b/migrations/1755930114.sh @@ -3,6 +3,3 @@ echo "Add new Omarchy Menu icon to Waybar" mkdir -p ~/.local/share/fonts cp ~/.local/share/omarchy/config/omarchy.ttf ~/.local/share/fonts/ fc-cache - -echo -gum confirm "Replace current Waybar config (backup will be made)?" && omarchy-refresh-waybar diff --git a/migrations/1756060611.sh b/migrations/1756060611.sh index fd226207a2..2aab819ae6 100644 --- a/migrations/1756060611.sh +++ b/migrations/1756060611.sh @@ -1,22 +1,18 @@ echo "Migrate AUR packages to official repos where possible" reinstall_package_opr() { - if pacman -Q $1 >/dev/null; then + if omarchy-pkg-present $1; then sudo pacman -Rns --noconfirm $1 sudo pacman -S --noconfirm ${2:-$1} fi } -if pacman -Q yay-bin-debug >/dev/null; then - sudo pacman -Rns --noconfirm yay-bin-debug -fi +omarchy-pkg-drop yay-bin-debug reinstall_package_opr yay-bin yay reinstall_package_opr obsidian-bin obsidian reinstall_package_opr localsend-bin localsend reinstall_package_opr omarchy-chromium-bin omarchy-chromium -reinstall_package_opr walker-bin -reinstall_package_opr wl-screenrec reinstall_package_opr python-terminaltexteffects reinstall_package_opr tzupdate reinstall_package_opr typora diff --git a/migrations/1756062808.sh b/migrations/1756062808.sh deleted file mode 100644 index 36183207c5..0000000000 --- a/migrations/1756062808.sh +++ /dev/null @@ -1,2 +0,0 @@ -echo "Update Hypridle to prevent flash of unlocked screen after sleep" -omarchy-refresh-hypridle diff --git a/migrations/1756115364.sh b/migrations/1756115364.sh index cdd8113a54..a7c3925e05 100644 --- a/migrations/1756115364.sh +++ b/migrations/1756115364.sh @@ -1,6 +1,6 @@ echo "Replace buggy native Zoom client with webapp" -if pacman -Q zoom >/dev/null; then - sudo pacman -Rns --noconfirm zoom +if omarchy-pkg-present zoom; then + omarchy-pkg-drop zoom omarchy-webapp-install "Zoom" https://app.zoom.us/wc/home https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/zoom.png fi diff --git a/migrations/1756205202.sh b/migrations/1756205202.sh new file mode 100644 index 0000000000..8d8cc73a51 --- /dev/null +++ b/migrations/1756205202.sh @@ -0,0 +1,7 @@ +echo "Symlink files needed for Nautilus navigation 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 +sudo gtk-update-icon-cache /usr/share/icons/Yaru +pkill -x nautilus || true + diff --git a/migrations/1756360551.sh b/migrations/1756360551.sh deleted file mode 100644 index ac9911a600..0000000000 --- a/migrations/1756360551.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "Move Omarchy Package Repository after Arch core/extra/multilib for extra security on resolution" - -sudo cp /etc/pacman.conf /etc/pacman.conf.bak -sudo sed -i '/\[omarchy\]/,+2 d' /etc/pacman.conf -sudo sed -i '/\[chaotic-aur\]/i\[omarchy]\nSigLevel = Optional TrustAll\nServer = https://pkgs.omarchy.org/$arch/\n' /etc/pacman.conf || - sudo bash -c 'echo -e "\n[omarchy]\nSigLevel = Optional TrustAll\nServer = https://pkgs.omarchy.org/\$arch/" >> /etc/pacman.conf' diff --git a/migrations/1756360552.sh b/migrations/1756360552.sh new file mode 100644 index 0000000000..0ea7615734 --- /dev/null +++ b/migrations/1756360552.sh @@ -0,0 +1,4 @@ +echo "Move Omarchy Package Repository after Arch core/extra/multilib and remove AUR" + +omarchy-refresh-pacman +sudo pacman -Syu --noconfirm diff --git a/migrations/1756363651.sh b/migrations/1756363651.sh deleted file mode 100644 index 3df0985c7e..0000000000 --- a/migrations/1756363651.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Update About config to include the Omarchy branch name" - -omarchy-refresh-fastfetch diff --git a/migrations/1756410649.sh b/migrations/1756410649.sh new file mode 100644 index 0000000000..7347f9b2ef --- /dev/null +++ b/migrations/1756410649.sh @@ -0,0 +1,7 @@ +echo "Remove any Chaotic-AUR infrastructure packages" + +omarchy-pkg-drop chaotic-keyring chaotic-mirrorlist + +if sudo pacman-key --list-keys 3056513887B78AEB >/dev/null 2>&1; then + sudo pacman-key --delete 3056513887B78AEB +fi diff --git a/migrations/1756411333.sh b/migrations/1756411333.sh new file mode 100644 index 0000000000..5312a6f5dd --- /dev/null +++ b/migrations/1756411333.sh @@ -0,0 +1,3 @@ +echo "Use new Omarchy mirror as default" + +omarchy-refresh-pacman diff --git a/migrations/1756411865.sh b/migrations/1756411865.sh new file mode 100644 index 0000000000..8dcf8ef233 --- /dev/null +++ b/migrations/1756411865.sh @@ -0,0 +1,3 @@ +echo "Add back ttf-ia-writer if it was missing" + +omarchy-pkg-add ttf-ia-writer diff --git a/migrations/1756491748.sh b/migrations/1756491748.sh new file mode 100644 index 0000000000..801f82a91d --- /dev/null +++ b/migrations/1756491748.sh @@ -0,0 +1,6 @@ +echo "Removing UseDNS=no from network files to fix DNS issue" + +for file in /etc/systemd/network/*.network; do + [[ -f "$file" ]] || continue + sudo sed -i '/^UseDNS=no/d' "$file" +done \ No newline at end of file diff --git a/migrations/1756494998.sh b/migrations/1756494998.sh new file mode 100644 index 0000000000..1ffe1e8e31 --- /dev/null +++ b/migrations/1756494998.sh @@ -0,0 +1,5 @@ +echo "Remove opacity from alacritty.toml so Hyprland can control fully" + +if [[ -f ~/.config/alacritty/alacritty.toml ]]; then + sed -i '/opacity = 0.98/d' ~/.config/alacritty/alacritty.toml +fi diff --git a/migrations/1756507384.sh b/migrations/1756507384.sh new file mode 100644 index 0000000000..77c640e81d --- /dev/null +++ b/migrations/1756507384.sh @@ -0,0 +1,4 @@ +echo "Replace JetBrains Mono font with the Nerd Font edition" + +omarchy-pkg-add ttf-jetbrains-mono-nerd +omarchy-pkg-drop ttf-jetbrains-mono diff --git a/migrations/1756556731.sh b/migrations/1756556731.sh new file mode 100644 index 0000000000..477b754cc9 --- /dev/null +++ b/migrations/1756556731.sh @@ -0,0 +1,3 @@ +echo "Add Samba network drive support to the file manager" + +omarchy-pkg-add gvfs-smb diff --git a/migrations/1756627168.sh b/migrations/1756627168.sh new file mode 100644 index 0000000000..751cd19449 --- /dev/null +++ b/migrations/1756627168.sh @@ -0,0 +1,3 @@ +echo "Include OS Age and Uptime icons in About" + +omarchy-refresh-fastfetch diff --git a/migrations/1756629295.sh b/migrations/1756629295.sh new file mode 100644 index 0000000000..8f0bea6d79 --- /dev/null +++ b/migrations/1756629295.sh @@ -0,0 +1,3 @@ +echo "Ensure qt5-wayland is installed so KeepassXC, Nextcloud, Sqlite Browser, and other apps display correctly" + +omarchy-pkg-add qt5-wayland diff --git a/migrations/1756642681.sh b/migrations/1756642681.sh new file mode 100644 index 0000000000..d0117d2d72 --- /dev/null +++ b/migrations/1756642681.sh @@ -0,0 +1,3 @@ +echo "Fix audio input on AMD Framework laptops" + +source $OMARCHY_PATH/install/config/hardware/fix-f13-amd-audio-input.sh || true diff --git a/migrations/1756650507.sh b/migrations/1756650507.sh new file mode 100644 index 0000000000..7ed6cec778 --- /dev/null +++ b/migrations/1756650507.sh @@ -0,0 +1,5 @@ +echo "Fix JetBrains font setting" + +if [[ $(omarchy-font-current) == JetBrains* ]]; then + omarchy-font-set "JetBrainsMono Nerd Font" +fi diff --git a/migrations/1756911131.sh b/migrations/1756911131.sh new file mode 100644 index 0000000000..6747ab06a7 --- /dev/null +++ b/migrations/1756911131.sh @@ -0,0 +1,11 @@ +echo "Enable UFW systemd service for existing installations" + +if omarchy-cmd-present ufw; then + if sudo ufw status | grep -q "Status: active\|22/tcp\|53317"; then + if ! systemctl is-enabled ufw >/dev/null 2>&1; then + sudo systemctl enable ufw --now + echo "UFW systemd service enabled" + fi + fi +fi + diff --git a/migrations/1757021485.sh b/migrations/1757021485.sh new file mode 100644 index 0000000000..cb8f4c492a --- /dev/null +++ b/migrations/1757021485.sh @@ -0,0 +1,3 @@ +echo "Install Copy URL extension for Chromium" + +omarchy-refresh-config chromium-flags.conf diff --git a/migrations/1757147211.sh b/migrations/1757147211.sh new file mode 100644 index 0000000000..f74afe5795 --- /dev/null +++ b/migrations/1757147211.sh @@ -0,0 +1,7 @@ +echo "Create managed policy directories for Chromium and Brave for theme switching" + +sudo mkdir -p /etc/chromium/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 diff --git a/migrations/1757279511.sh b/migrations/1757279511.sh new file mode 100644 index 0000000000..dc4588c14a --- /dev/null +++ b/migrations/1757279511.sh @@ -0,0 +1,6 @@ +echo "Add locale to the waybar clock format" + +sed -i \ + -e 's/{:%A %H:%M}/{:L%A %H:%M}/' \ + -e 's/{:%d %B W%V %Y}/{:L%d %B W%V %Y}/' \ + "$HOME/.config/waybar/config.jsonc" \ No newline at end of file diff --git a/migrations/1757361127.sh b/migrations/1757361127.sh new file mode 100644 index 0000000000..5c23e00502 --- /dev/null +++ b/migrations/1757361127.sh @@ -0,0 +1,8 @@ +echo "Fix DHCP DNS to allow VPN DNS override" + +if [ -f /etc/systemd/resolved.conf ]; then + if grep -q "^DNS=$" /etc/systemd/resolved.conf && grep -q "^FallbackDNS=$" /etc/systemd/resolved.conf; then + sudo sed -i '/^DNS=$/d; /^FallbackDNS=$/d' /etc/systemd/resolved.conf + sudo systemctl restart systemd-resolved + fi +fi \ No newline at end of file diff --git a/migrations/1757361128.sh b/migrations/1757361128.sh new file mode 100644 index 0000000000..0bd0b40715 --- /dev/null +++ b/migrations/1757361128.sh @@ -0,0 +1,7 @@ +echo "Enable mDNS resolution for existing Avahi installations" + +if systemctl is-enabled avahi-daemon.service >/dev/null 2>&1; then + if ! grep -q "mdns_minimal" /etc/nsswitch.conf; then + sudo sed -i 's/^hosts:.*/hosts: mymachines mdns_minimal [NOTFOUND=return] resolve files myhostname dns/' /etc/nsswitch.conf + fi +fi \ No newline at end of file diff --git a/migrations/1757435811.sh b/migrations/1757435811.sh new file mode 100644 index 0000000000..8961559d8c --- /dev/null +++ b/migrations/1757435811.sh @@ -0,0 +1,3 @@ +echo "Copy Omarchy default app icons to .local/share/icons" + +source $OMARCHY_PATH/install/packaging/icons.sh diff --git a/migrations/1757435812.sh b/migrations/1757435812.sh new file mode 100644 index 0000000000..14b308aaa3 --- /dev/null +++ b/migrations/1757435812.sh @@ -0,0 +1,6 @@ +echo "Update Zoom webapp to handle zoommtg:// and zoomus:// protocol links" + +if [[ -f ~/.local/share/applications/Zoom.desktop ]]; then + omarchy-webapp-remove Zoom + 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" +fi diff --git a/migrations/1757483378.sh b/migrations/1757483378.sh new file mode 100644 index 0000000000..999e4f064e --- /dev/null +++ b/migrations/1757483378.sh @@ -0,0 +1,4 @@ +echo "6Ghz Wi-Fi + Intel graphics acceleration for existing installations" + +bash "$OMARCHY_PATH/install/config/hardware/set-wireless-regdom.sh" +bash "$OMARCHY_PATH/install/config/hardware/intel.sh" diff --git a/migrations/1757511571.sh b/migrations/1757511571.sh new file mode 100644 index 0000000000..7753a28e1f --- /dev/null +++ b/migrations/1757511571.sh @@ -0,0 +1,3 @@ +echo "Add screen recording indicator to Waybar" + +gum confirm "Replace current Waybar config (backup will be made)?" && omarchy-refresh-waybar diff --git a/migrations/1757512135.sh b/migrations/1757512135.sh new file mode 100644 index 0000000000..a7314f660f --- /dev/null +++ b/migrations/1757512135.sh @@ -0,0 +1,5 @@ +echo "Make it possible to remove update-available icon with signal in Waybar" + +if ! grep -q '"signal": 7' ~/.config/waybar/config.jsonc; then + sed -i '/"tooltip-format": "Omarchy update available",/a\ "signal": 7,' ~/.config/waybar/config.jsonc +fi diff --git a/migrations/1757515650.sh b/migrations/1757515650.sh new file mode 100644 index 0000000000..0087257ae0 --- /dev/null +++ b/migrations/1757515650.sh @@ -0,0 +1,2 @@ +echo "Update plymouth theme to avoid freetype2 issue that broke the styled login screen" +omarchy-refresh-plymouth diff --git a/migrations/1757535736.sh b/migrations/1757535736.sh new file mode 100644 index 0000000000..25fcd1908f --- /dev/null +++ b/migrations/1757535736.sh @@ -0,0 +1,9 @@ +echo "Enabling vim keys in btop" + +CONFIG_FILE=~/.config/btop/btop.conf + +if [[ -f $CONFIG_FILE ]]; then + if grep -q "^vim_keys = " "$CONFIG_FILE"; then + sed -i 's/^vim_keys = False/vim_keys = True/' "$CONFIG_FILE" + fi +fi diff --git a/migrations/1757783204.sh b/migrations/1757783204.sh new file mode 100644 index 0000000000..e5cc9b9066 --- /dev/null +++ b/migrations/1757783204.sh @@ -0,0 +1,9 @@ +echo "Create ~/Work with ./bin in the path for contained projects" + +mise_config="$HOME/Work/.mise.toml" + +if [[ -f $mise_config ]]; then + cp $mise_config "$mise_config.bak.$(date +%s)" +fi + +source "$OMARCHY_PATH/install/config/mise-work.sh" diff --git a/migrations/1757861484.sh b/migrations/1757861484.sh new file mode 100644 index 0000000000..fa4cec9901 --- /dev/null +++ b/migrations/1757861484.sh @@ -0,0 +1,3 @@ +echo "Add a blurred background to the lock screen" + +omarchy-refresh-hyprlock diff --git a/migrations/1757866485.sh b/migrations/1757866485.sh new file mode 100644 index 0000000000..ed0905ee85 --- /dev/null +++ b/migrations/1757866485.sh @@ -0,0 +1,6 @@ +echo "Add SUPER + SHIFT + B to start browser in private mode" + +if [[ -f ~/.config/hypr/bindings.conf ]] && grep -q "SUPER, B, Browser, exec" ~/.config/hypr/bindings.conf; then + sed -i '/^bindd = SUPER, B, Browser, exec, \$browser$/a\ +bindd = SUPER SHIFT, B, Browser (private), exec, $browser --private' ~/.config/hypr/bindings.conf +fi diff --git a/migrations/1757877123.sh b/migrations/1757877123.sh new file mode 100644 index 0000000000..0a0f3ab747 --- /dev/null +++ b/migrations/1757877123.sh @@ -0,0 +1,7 @@ +echo "Obsidian should be using Wayland IME for better compatibility with fcitx5 and other languages" + +if [[ -f ~/.config/hypr/bindings.conf ]]; then + sed -i '/^bindd = SUPER, O, Obsidian, exec, uwsm app -- obsidian -disable-gpu/{ + /--enable-wayland-ime/! s/$/ --enable-wayland-ime/ + }' ~/.config/hypr/bindings.conf +fi diff --git a/migrations/1757877852.sh b/migrations/1757877852.sh new file mode 100644 index 0000000000..51ecd1056e --- /dev/null +++ b/migrations/1757877852.sh @@ -0,0 +1,10 @@ +echo "Switch select bindings to launch or focus mode" + +if [[ -f ~/.config/hypr/bindings.conf ]]; then + sed -i '/SUPER, M, Music, exec/ c\bindd = SUPER, M, Music, exec, omarchy-launch-or-focus spotify' ~/.config/hypr/bindings.conf + sed -i '/SUPER, O, Obsidian, exec/ c\bindd = SUPER, O, Obsidian, exec, omarchy-launch-or-focus obsidian "uwsm-app -- obsidian -disable-gpu --enable-wayland-ime"' ~/.config/hypr/bindings.conf + + sed -i '/SUPER, G, Signal, exec/ c\bindd = SUPER, G, Signal, exec, omarchy-launch-or-focus signal "uwsm-app -- signal-desktop"' ~/.config/hypr/bindings.conf + sed -i '/SUPER SHIFT, G, WhatsApp, exec/ c\bindd = SUPER SHIFT, G, WhatsApp, exec, omarchy-launch-or-focus-webapp WhatsApp "https://web.whatsapp.com/"' ~/.config/hypr/bindings.conf + sed -i '/SUPER ALT, G, Google Messages, exec/ c\bindd = SUPER ALT, G, Google Messages, exec, omarchy-launch-or-focus-webapp "Google Messages" "https://messages.google.com/web/conversations"' ~/.config/hypr/bindings.conf +fi diff --git a/migrations/1757879836.sh b/migrations/1757879836.sh new file mode 100644 index 0000000000..e15c44150b --- /dev/null +++ b/migrations/1757879836.sh @@ -0,0 +1,10 @@ +echo "Ensure .config/hypr/looknfeel.conf is available and included" + +if [[ ! -f ~/.config/hypr/looknfeel.conf ]]; then + cp $OMARCHY_PATH/config/hypr/looknfeel.conf ~/.config/hypr/looknfeel.conf +fi + +if [[ -f ~/.config/hypr/hyprland.conf ]]; then + grep -qx 'source = ~/.config/hypr/looknfeel.conf' ~/.config/hypr/hyprland.conf || + sed -i '/^source = ~\/.config\/hypr\/envs\.conf$/a source = ~/.config/hypr/looknfeel.conf' ~/.config/hypr/hyprland.conf +fi diff --git a/migrations/1758019332.sh b/migrations/1758019332.sh new file mode 100644 index 0000000000..50caed1e2f --- /dev/null +++ b/migrations/1758019332.sh @@ -0,0 +1,21 @@ +echo "Set \$TERMINAL and \$EDITOR in ~/.config/uwsm/default so entire system can rely on it" + +# Set terminal and editor default in uwsm +omarchy-refresh-config uwsm/default +omarchy-refresh-config uwsm/env +omarchy-state set reboot-required + +# Ensure scrolltouchpad setting applies to all terminals +if grep -q "scrolltouchpad 1.5, class:Alacritty" ~/.config/hypr/input.conf; then + sed -i 's/windowrule = scrolltouchpad 1\.5, class:Alacritty/windowrule = scrolltouchpad 1.5, tag:terminal/' ~/.config/hypr/input.conf +fi + +# Use default editor for keybinding +if grep -q "bindd = SUPER, N, Neovim" ~/.config/hypr/bindings.conf; then + sed -i '/SUPER, N, Neovim, exec/ c\bindd = SUPER, N, Editor, exec, omarchy-launch-editor' ~/.config/hypr/bindings.conf +fi + +# Use default terminal for keybinding +if grep -q "terminal = uwsm app" ~/.config/hypr/bindings.conf; then + sed -Ei '/terminal = uwsm[- ]app -- alacritty/ c\$terminal = uwsm-app -- $TERMINAL' ~/.config/hypr/bindings.conf +fi diff --git a/migrations/1758051607.sh b/migrations/1758051607.sh new file mode 100644 index 0000000000..e30cae7f17 --- /dev/null +++ b/migrations/1758051607.sh @@ -0,0 +1,11 @@ +echo "Copy configs for ghostty + kitty so they're available as alternative terminal options" + +if [[ ! -f ~/.config/ghostty/config ]]; then + mkdir -p ~/.config/ghostty + cp -Rpf $OMARCHY_PATH/config/ghostty/config ~/.config/ghostty/config +fi + +if [[ ! -f ~/.config/kitty/kitty.conf ]]; then + mkdir -p ~/.config/kitty + cp -Rpf $OMARCHY_PATH/config/kitty/kitty.conf ~/.config/kitty/kitty.conf +fi diff --git a/migrations/1758104201.sh b/migrations/1758104201.sh new file mode 100644 index 0000000000..18ac701523 --- /dev/null +++ b/migrations/1758104201.sh @@ -0,0 +1,3 @@ +echo "Prevent powerprofilesctl from using Mise python and not working" + +bash $OMARCHY_PATH/install/config/fix-powerprofilesctl-shebang.sh diff --git a/migrations/1758107879.sh b/migrations/1758107879.sh new file mode 100644 index 0000000000..aaae09dfa6 --- /dev/null +++ b/migrations/1758107879.sh @@ -0,0 +1,55 @@ +echo "Migrate to Walker 2.0.0" + +NEEDS_MIGRATION=false + +PACKAGES=( + "elephant" + "elephant-calc" + "elephant-clipboard" + "elephant-bluetooth" + "elephant-desktopapplications" + "elephant-files" + "elephant-menus" + "elephant-providerlist" + "elephant-runner" + "elephant-symbols" + "elephant-unicode" + "elephant-websearch" + "elephant-todo" + "walker" + "libqalculate" +) + +for pkg in "${PACKAGES[@]}"; do + if ! omarchy-pkg-present "$pkg"; then + NEEDS_MIGRATION=true + break + fi +done + +WALKER_MAJOR=$(walker -v 2>&1 | grep -oP '^\d+' || echo "0") +if [[ "$WALKER_MAJOR" -lt 2 ]]; then + NEEDS_MIGRATION=true +fi + +# Ensure basic config is present +mkdir -p ~/.config/walker +cp -r ~/.local/share/omarchy/config/walker/* ~/.config/walker/ + +if $NEEDS_MIGRATION; then + kill -9 $(pgrep -x walker) 2>/dev/null || true + + omarchy-pkg-drop walker-bin walker-bin-debug + + omarchy-pkg-add "${PACKAGES[@]}" + + source $OMARCHY_PATH/install/config/walker-elephant.sh + + rm -rf ~/.config/walker/themes + + omarchy-refresh-config walker/config.toml + omarchy-refresh-config elephant/calc.toml + omarchy-refresh-config elephant/desktopapplications.toml +fi + +echo # Assure final success diff --git a/migrations/1758111304.sh b/migrations/1758111304.sh new file mode 100644 index 0000000000..75f4dbb9e7 --- /dev/null +++ b/migrations/1758111304.sh @@ -0,0 +1,3 @@ +echo "Remove Ruby build options to force GCC14 now that GCC15 is compatible" + +mise settings unset ruby.ruby_build_opts diff --git a/migrations/1758142943.sh b/migrations/1758142943.sh new file mode 100644 index 0000000000..ef800abc16 --- /dev/null +++ b/migrations/1758142943.sh @@ -0,0 +1,21 @@ +echo "Turn off VSCode's own auto-update feature (we rely on pacman)" + +# Note: We cannot use `jq` to update settings.json because it’s JSONC (allows comments), +# which jq doesn’t support. + +VS_CODE_SETTINGS="$HOME/.config/Code/User/settings.json" + +# If VSCode is installed, ensure that the "update.mode" setting is set to "none" +if omarchy-cmd-present code; then + mkdir -p "$(dirname "$VS_CODE_SETTINGS")" + + if [[ ! -f "$VS_CODE_SETTINGS" ]]; then + # If settings.json doesn't exist, create it with just the update.mode setting + printf '{\n "update.mode": "none"\n}\n' > "$VS_CODE_SETTINGS" + elif ! grep -q '"update.mode"' "$VS_CODE_SETTINGS"; then + # Insert "update.mode": "none", immediately after the first "{" + # Use sed's first-match range (0,/{/) to only replace the first "{ + sed -i --follow-symlinks -E '0,/\{/{s/\{/{\ + "update.mode": "none",/}' "$VS_CODE_SETTINGS" + fi +fi diff --git a/migrations/1758436991.sh b/migrations/1758436991.sh new file mode 100644 index 0000000000..b9a2e7b5d9 --- /dev/null +++ b/migrations/1758436991.sh @@ -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 + diff --git a/migrations/1758487660_change_dm_to_sddm.sh b/migrations/1758487660_change_dm_to_sddm.sh new file mode 100644 index 0000000000..3c10c84096 --- /dev/null +++ b/migrations/1758487660_change_dm_to_sddm.sh @@ -0,0 +1,55 @@ +#!/bin/bash +set -e + +error_exit() { + echo -e "\033[31mERROR: Migration failed! Manual intervention required.\033[0m" >&2 + echo -e "\033[31mDO NOT REBOOT - System may be in inconsistent state until the error is fixed.\033[0m" >&2 + exit 1 +} + +trap error_exit ERR + +echo "Change display manager to SDDM" + +omarchy-pkg-add sddm libsecret gnome-keyring || error_exit + +sudo mkdir -p /etc/sddm.conf.d + +cat </dev/null 2>&1; then + echo -e "\033[31mError: omarchy-seamless-login.service is still enabled\033[0m" >&2 + error_exit +fi + +if systemctl is-masked plymouth-quit-wait.service >/dev/null 2>&1; then + echo -e "\033[31mError: plymouth-quit-wait.service is still masked\033[0m" >&2 + error_exit +fi + +if ! systemctl is-enabled getty@tty1.service >/dev/null 2>&1; then + echo -e "\033[31mError: getty@tty1.service is not enabled\033[0m" >&2 + error_exit +fi + +if ! systemctl is-enabled sddm.service >/dev/null 2>&1; then + echo -e "\033[31mError: sddm.service is not enabled\033[0m" >&2 + error_exit +fi + +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 diff --git a/migrations/1758487662_move_to_custom_uki.sh b/migrations/1758487662_move_to_custom_uki.sh new file mode 100644 index 0000000000..731bba2aa8 --- /dev/null +++ b/migrations/1758487662_move_to_custom_uki.sh @@ -0,0 +1,38 @@ +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 + diff --git a/migrations/1758562032.sh b/migrations/1758562032.sh new file mode 100644 index 0000000000..5c4c357ebb --- /dev/null +++ b/migrations/1758562032.sh @@ -0,0 +1,5 @@ +echo "Fix Tailscale split DNS compatibility by removing [!UNAVAIL=return] from nsswitch.conf" + +if grep -q '\[!UNAVAIL=return\]' /etc/nsswitch.conf; then + sudo sed -i 's/resolve \[!UNAVAIL=return\]/resolve/g' /etc/nsswitch.conf +fi \ No newline at end of file diff --git a/migrations/1758564460.sh b/migrations/1758564460.sh new file mode 100644 index 0000000000..f0b106937f --- /dev/null +++ b/migrations/1758564460.sh @@ -0,0 +1,2 @@ +echo "Enable fast shutdown" +source $OMARCHY_PATH/install/config/fast-shutdown.sh diff --git a/migrations/1759093827.sh b/migrations/1759093827.sh new file mode 100644 index 0000000000..69cf8963ff --- /dev/null +++ b/migrations/1759093827.sh @@ -0,0 +1,3 @@ +echo "Adding hidden entries for electron apps" + +cp $OMARCHY_PATH/applications/hidden/electron*.desktop ~/.local/share/applications/ diff --git a/migrations/1759270604.sh b/migrations/1759270604.sh new file mode 100644 index 0000000000..dce7980361 --- /dev/null +++ b/migrations/1759270604.sh @@ -0,0 +1,3 @@ +echo "Update Hyprlock with better placeholder position and show all fail text" + +omarchy-refresh-hyprlock diff --git a/migrations/1759355846.sh b/migrations/1759355846.sh new file mode 100644 index 0000000000..40d0098da4 --- /dev/null +++ b/migrations/1759355846.sh @@ -0,0 +1,21 @@ +echo "Symlink systemd-resolved to /etc/resolv.conf" + +# Backup if /etc/resolv.conf was modified after system birth +system_birth=$(stat -c %W /) +resolvconf_modified=$(stat -c %Y /etc/resolv.conf) + +# Run a backup if resolv.conf isn't a symlink and was modified after install +if [[ -s /etc/resolv.conf ]] && [[ ! -L /etc/resolv.conf ]] && [[ $resolvconf_modified > $system_birth ]]; then + # Backup the destination file (with timestamp) to avoid clobbering (Ex: resolv.conf.bak.1753817951) + backup_file="/etc/resolv.conf.bak.$(date +%s)" + + # Create backup + sudo cp -f /etc/resolv.conf "$backup_file" 2>/dev/null + + # Inform users + echo -e "\e[31mReplaced /etc/resolv.conf with symlink to systemd-resolved. \nSaved backup as ${backup_file}.\e[0m" + echo -e "\e[31mSee https://wiki.archlinux.org/title/Systemd-resolved.\e[0m" +fi + +# Write the symlink +sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf diff --git a/migrations/1759691413.sh b/migrations/1759691413.sh new file mode 100644 index 0000000000..37fefa7cd4 --- /dev/null +++ b/migrations/1759691413.sh @@ -0,0 +1,5 @@ +echo "Correct path for sudoless asdcontrol for working Apple Display hotkeys" + +if [[ $(command -v asdcontrol) == "/usr/bin/asdcontrol" ]]; then + echo "$USER ALL=(ALL) NOPASSWD: /usr/bin/asdcontrol" | sudo tee /etc/sudoers.d/asdcontrol +fi diff --git a/migrations/1759694076.sh b/migrations/1759694076.sh new file mode 100644 index 0000000000..084d8e2bac --- /dev/null +++ b/migrations/1759694076.sh @@ -0,0 +1,4 @@ +echo "Hide OpenJDK applications from app launcher" + +cp $OMARCHY_PATH/applications/hidden/*openjdk.desktop ~/.local/share/applications/ + diff --git a/migrations/1759895423.sh b/migrations/1759895423.sh new file mode 100644 index 0000000000..fcaeb4173a --- /dev/null +++ b/migrations/1759895423.sh @@ -0,0 +1,10 @@ +echo "Make shift+insert paste and ctrl+insert copy from clipboard in terminal" + +# Add keybindings to Alacritty +sed -i 's/{ key = "F11", action = "ToggleFullscreen" }/{ key = "F11", action = "ToggleFullscreen" },\n{ key = "Insert", mods = "Shift", action = "Paste" },\n{ key = "Insert", mods = "Control", action = "Copy" }/' ~/.config/alacritty/alacritty.toml + +# Add keybindings to Ghostty +sed -i '/keybind = f11=toggle_fullscreen/a keybind = shift+insert=paste_from_clipboard\nkeybind = control+insert=copy_to_clipboard' ~/.config/ghostty/config + +# Add keybindings to Kitty +sed -i '/map F11 toggle_fullscreen/a map ctrl+insert copy_to_clipboard' ~/.config/kitty/kitty.conf diff --git a/migrations/1759913695.sh b/migrations/1759913695.sh new file mode 100644 index 0000000000..8ce4ad13c6 --- /dev/null +++ b/migrations/1759913695.sh @@ -0,0 +1,3 @@ +echo "Fix NVMe suspend issues on MacBook models" + +bash $OMARCHY_PATH/install/config/hardware/fix-apple-suspend-nvme.sh diff --git a/migrations/1760144906.sh b/migrations/1760144906.sh new file mode 100644 index 0000000000..4745b18754 --- /dev/null +++ b/migrations/1760144906.sh @@ -0,0 +1,5 @@ +echo "Change omarchy-screenrecord to use gpu-screen-recorder" +omarchy-pkg-drop wf-recorder wl-screenrec + +# Add slurp in case it hadn't been picked up from an old migration +omarchy-pkg-add slurp gpu-screen-recorder diff --git a/migrations/1760301290.sh b/migrations/1760301290.sh new file mode 100644 index 0000000000..b383b6fba7 --- /dev/null +++ b/migrations/1760301290.sh @@ -0,0 +1,5 @@ +echo "Add the new Flexoki Light theme" + +if [[ ! -L ~/.config/omarchy/themes/flexoki-light ]]; then + ln -nfs ~/.local/share/omarchy/themes/flexoki-light ~/.config/omarchy/themes/ +fi diff --git a/migrations/1760304963.sh b/migrations/1760304963.sh new file mode 100644 index 0000000000..e1c519c652 --- /dev/null +++ b/migrations/1760304963.sh @@ -0,0 +1,9 @@ +echo "Add a default keyring for gnome-keyring that unlocks on login" + +if [ -f "$HOME/.local/share/keyrings/Default_keyring.keyring" ] || [ -f "$HOME/.local/share/keyrings/default" ]; then + if gum confirm "Do you want to replace existing keyring with one that's auto-unlocked on login?"; then + bash "$OMARCHY_PATH/install/login/default-keyring.sh" + fi +else + bash "$OMARCHY_PATH/install/login/default-keyring.sh" +fi diff --git a/migrations/1760401344.sh b/migrations/1760401344.sh new file mode 100644 index 0000000000..5e5ca300be --- /dev/null +++ b/migrations/1760401344.sh @@ -0,0 +1,15 @@ +echo "Add Chromium crash workaround flag for Hyprland to existing configs" + +# Add flag to chromium-flags.conf if it exists and doesn't already have it +if [[ -f ~/.config/chromium-flags.conf ]]; then + if ! grep -qF -- "--disable-features=WaylandWpColorManagerV1" ~/.config/chromium-flags.conf; then + sed -i '$a # Chromium crash workaround for Wayland color management on Hyprland - see https://github.com/hyprwm/Hyprland/issues/11957\n--disable-features=WaylandWpColorManagerV1' ~/.config/chromium-flags.conf + fi +fi + +# Add flag to brave-flags.conf if it exists and doesn't already have it +if [[ -f ~/.config/brave-flags.conf ]]; then + if ! grep -qF -- "--disable-features=WaylandWpColorManagerV1" ~/.config/brave-flags.conf; then + sed -i '$a # Chromium crash workaround for Wayland color management on Hyprland - see https://github.com/hyprwm/Hyprland/issues/11957\n--disable-features=WaylandWpColorManagerV1' ~/.config/brave-flags.conf + fi +fi diff --git a/migrations/1760434895.sh b/migrations/1760434895.sh new file mode 100644 index 0000000000..e08649f434 --- /dev/null +++ b/migrations/1760434895.sh @@ -0,0 +1,6 @@ +echo "Change to omarchy-nvim package" +omarchy-pkg-drop omarchy-lazyvim +omarchy-pkg-add omarchy-nvim + +# Will trigger to overwrite configs or not to pickup new hot-reload themes +omarchy-nvim-setup diff --git a/migrations/1760441237.sh b/migrations/1760441237.sh new file mode 100644 index 0000000000..1c2d89d34c --- /dev/null +++ b/migrations/1760441237.sh @@ -0,0 +1,3 @@ +echo "Install Omarchy theme on Obsidian vaults" + +omarchy-theme-set-obsidian diff --git a/migrations/1760462260.sh b/migrations/1760462260.sh new file mode 100644 index 0000000000..fec87d8c77 --- /dev/null +++ b/migrations/1760462260.sh @@ -0,0 +1,26 @@ +echo -e "Offer new Omarchy hotkeys\n" + +cat < "$VS_CODE_SETTINGS" + elif ! grep -q '"update.mode"' "$VS_CODE_SETTINGS"; then + # Insert "update.mode": "none", immediately after the first "{" + # Use sed's first-match range (0,/{/) to only replace the first "{ + sed -i --follow-symlinks -E '0,/\{/{s/\{/{\ + "update.mode": "none",/}' "$VS_CODE_SETTINGS" + fi +fi diff --git a/migrations/1761180745.sh b/migrations/1761180745.sh new file mode 100644 index 0000000000..5a6b1e0fc6 --- /dev/null +++ b/migrations/1761180745.sh @@ -0,0 +1,7 @@ +echo "Ensure interactive shell check is at the top of .bashrc" + +BASHRC="$HOME/.bashrc" + +if [ -f "$BASHRC" ] && ! grep -q '\[\[ $- != \*i\* \]\] && return' "$BASHRC"; then + sed -i '1i# If not running interactively, don'\''t do anything (leave this at the top of this file)\n[[ $- != *i* ]] && return\n' "$BASHRC" +fi diff --git a/migrations/1761181166.sh b/migrations/1761181166.sh new file mode 100644 index 0000000000..fb7c54e40e --- /dev/null +++ b/migrations/1761181166.sh @@ -0,0 +1,3 @@ +echo "Change to pinned version of wayfreeze" +omarchy-pkg-drop wayfreeze-git +omarchy-pkg-add wayfreeze diff --git a/migrations/1761241493.sh b/migrations/1761241493.sh new file mode 100644 index 0000000000..c4b977f0d1 --- /dev/null +++ b/migrations/1761241493.sh @@ -0,0 +1,33 @@ +echo "Cleanup extra UKI if needed to prevent errors" +if [[ -f /boot/EFI/linux/omarchy_linux.efi ]] && [[ -f /boot/EFI/linux/$(cat /etc/machine-id)_linux.efi ]]; then + sudo rm -f /boot/EFI/Linux/$(cat /etc/machine-id)_linux.efi + + if grep -q "/boot/EFI/Linux/$(cat /etc/machine-id)_linux.efi" /boot/limine.conf; then + echo -e "Resetting limine config\n(you may need to re-add other entries via sudo limine-update)" + + sudo mv /boot/limine.conf /boot/limine.conf.bak + sudo tee /boot/limine.conf </dev/null +### Read more at config document: https://github.com/limine-bootloader/limine/blob/trunk/CONFIG.md +#timeout: 3 +default_entry: 2 +interface_branding: Omarchy Bootloader +interface_branding_color: 2 +hash_mismatch_panic: no + +term_background: 1a1b26 +backdrop: 1a1b26 + +# Terminal colors (Tokyo Night palette) +term_palette: 15161e;f7768e;9ece6a;e0af68;7aa2f7;bb9af7;7dcfff;a9b1d6 +term_palette_bright: 414868;f7768e;9ece6a;e0af68;7aa2f7;bb9af7;7dcfff;c0caf5 + +# Text colors +term_foreground: c0caf5 +term_foreground_bright: c0caf5 +term_background_bright: 24283b + +EOF + sudo limine-update + sudo limine-snapper-sync + fi +fi diff --git a/migrations/1761247569.sh b/migrations/1761247569.sh new file mode 100644 index 0000000000..eff3980da0 --- /dev/null +++ b/migrations/1761247569.sh @@ -0,0 +1,2 @@ +echo "Install expac and inxi for omarchy-debug" +omarchy-pkg-add expac inxi diff --git a/migrations/1761269603.sh b/migrations/1761269603.sh new file mode 100644 index 0000000000..8d29f61381 --- /dev/null +++ b/migrations/1761269603.sh @@ -0,0 +1,7 @@ +echo "Add right-click terminal action to waybar omarchy menu icon" + +WAYBAR_CONFIG="$HOME/.config/waybar/config.jsonc" + +if [[ -f "$WAYBAR_CONFIG" ]] && ! grep -A5 '"custom/omarchy"' "$WAYBAR_CONFIG" | grep -q '"on-click-right"'; then + sed -i '/"on-click": "omarchy-menu",/a\ "on-click-right": "omarchy-launch-terminal",' "$WAYBAR_CONFIG" +fi diff --git a/migrations/1761274806.sh b/migrations/1761274806.sh new file mode 100644 index 0000000000..7d0f565766 --- /dev/null +++ b/migrations/1761274806.sh @@ -0,0 +1,5 @@ +echo "Ensure node is available via mise (for treesitter cli)" + +if omarchy-cmd-missing node; then + mise use -g node@latest +fi diff --git a/migrations/1761274980.sh b/migrations/1761274980.sh new file mode 100644 index 0000000000..5c85b36231 --- /dev/null +++ b/migrations/1761274980.sh @@ -0,0 +1,11 @@ +echo "Migrate to proper packages for localsend and asdcontrol" + +if omarchy-pkg-present localsend-bin; then + omarchy-pkg-drop localsend-bin + omarchy-pkg-add localsend +fi + +if omarchy-pkg-present asdcontrol-git; then + omarchy-pkg-drop asdcontrol-git + omarchy-pkg-add asdcontrol +fi diff --git a/migrations/1761569743.sh b/migrations/1761569743.sh new file mode 100644 index 0000000000..f45e7bfd8f --- /dev/null +++ b/migrations/1761569743.sh @@ -0,0 +1,9 @@ +echo "Add default Ctrl+P binding for imv; backup existing config if present" + +if [ -f ~/.config/imv/config ]; then + cp ~/.config/imv/config ~/.config/imv/config.bak.$(date +%s) +else + mkdir -p ~/.config/imv +fi + +cp ~/.local/share/omarchy/config/imv/config ~/.config/imv/config diff --git a/migrations/1761585764.sh b/migrations/1761585764.sh new file mode 100644 index 0000000000..bafbfe2765 --- /dev/null +++ b/migrations/1761585764.sh @@ -0,0 +1,3 @@ +echo "Disable Nvim news alerts box" + +cp /usr/share/omarchy-nvim/config/lua/plugins/disable-news-alert.lua ~/.config/nvim/lua/plugins/disable-news-alert.lua diff --git a/migrations/1761638377.sh b/migrations/1761638377.sh new file mode 100644 index 0000000000..05a1fb1650 --- /dev/null +++ b/migrations/1761638377.sh @@ -0,0 +1,6 @@ +echo "Turn off fcitx5 clipboard that is interferring with other applications" + +mkdir -p ~/.config/fcitx5/conf +cp $OMARCHY_PATH/config/fcitx5/conf/clipboard.conf ~/.config/fcitx5/conf/ + +omarchy-restart-xcompose diff --git a/migrations/1761758552.sh b/migrations/1761758552.sh new file mode 100644 index 0000000000..49680d0964 --- /dev/null +++ b/migrations/1761758552.sh @@ -0,0 +1,21 @@ +echo "Set nvim as default via xdg-mime" + +rm ~/.local/share/applications/nvim.desktop || true + +xdg-mime default nvim.desktop text/plain +xdg-mime default nvim.desktop text/english +xdg-mime default nvim.desktop text/x-makefile +xdg-mime default nvim.desktop text/x-c++hdr +xdg-mime default nvim.desktop text/x-c++src +xdg-mime default nvim.desktop text/x-chdr +xdg-mime default nvim.desktop text/x-csrc +xdg-mime default nvim.desktop text/x-java +xdg-mime default nvim.desktop text/x-moc +xdg-mime default nvim.desktop text/x-pascal +xdg-mime default nvim.desktop text/x-tcl +xdg-mime default nvim.desktop text/x-tex +xdg-mime default nvim.desktop application/x-shellscript +xdg-mime default nvim.desktop text/x-c +xdg-mime default nvim.desktop text/x-c++ +xdg-mime default nvim.desktop application/xml +xdg-mime default nvim.desktop text/xml diff --git a/migrations/1761897226.sh b/migrations/1761897226.sh new file mode 100644 index 0000000000..34dbc1fd50 --- /dev/null +++ b/migrations/1761897226.sh @@ -0,0 +1,3 @@ +echo "Install Copy URL extension for Brave" + +omarchy-refresh-config brave-flags.conf diff --git a/migrations/1762121828.sh b/migrations/1762121828.sh new file mode 100644 index 0000000000..e56d16cab8 --- /dev/null +++ b/migrations/1762121828.sh @@ -0,0 +1,58 @@ +echo "Setting up xdg-terminal-exec for gtk-launch terminal support" +# Solve for hardcoded glib terminals +# https://github.com/basecamp/omarchy/issues/1852 + +# Remove old symlink if it exists -- if someone ran the previous migration early +if [ -L /usr/local/bin/xdg-terminal-exec ]; then + sudo rm /usr/local/bin/xdg-terminal-exec +fi + +omarchy-pkg-add xdg-terminal-exec + +# Set up xdg-terminals.list based on current $TERMINAL +if [ -n "$TERMINAL" ]; then + case "$TERMINAL" in + alacritty) desktop_id="Alacritty.desktop" ;; + ghostty) desktop_id="com.mitchellh.ghostty.desktop" ;; + kitty) desktop_id="kitty.desktop" ;; + esac + + if [ -n "$desktop_id" ]; then + mkdir -p ~/.config + cat > ~/.config/xdg-terminals.list << EOF +# Terminal emulator preference order for xdg-terminal-exec +# The first found and valid terminal will be used +$desktop_id +EOF + fi +fi + +# Copy custom desktop entries with proper X-TerminalArg* keys +if command -v alacritty > /dev/null 2>&1; then + cp "$OMARCHY_PATH/applications/Alacritty.desktop" ~/.local/share/applications/ +fi + +# Update hyprland bindings to use xdg-terminal-exec +sed -i 's/\$terminal = uwsm-app -- \$TERMINAL/$terminal = uwsm-app -- xdg-terminal-exec/' ~/.config/hypr/bindings.conf +# Update --working-directory to --dir for xdg-terminal-exec +sed -i 's/--working-directory=/--dir=/g' ~/.config/hypr/bindings.conf + +# Update TERMINAL variable in uwsm config +sed -i 's/export TERMINAL=.*/export TERMINAL=xdg-terminal-exec/' ~/.config/uwsm/default + +# Update waybar config to use xdg-terminal-exec +waybar_config=~/.config/waybar/config.jsonc +if [ -f "$waybar_config" ]; then + sed -i 's|"on-click-right": "omarchy-launch-terminal"|"on-click-right": "xdg-terminal-exec"|' "$waybar_config" + sed -i 's|"on-click": "\$TERMINAL -e btop"|"on-click": "xdg-terminal-exec btop"|' "$waybar_config" + sed -i 's|"on-click": "\$TERMINAL --class=Wiremix -e wiremix"|"on-click": "xdg-terminal-exec --app-id=com.omarchy.Wiremix -e wiremix"|' "$waybar_config" + omarchy-state set restart-waybar-required +fi + +# Update hyprland window rules to use DNS-format class names +system_conf=~/.config/hypr/apps/system.conf +if [ -f "$system_conf" ]; then + if grep -q 'class:(.*|Impala|' "$system_conf" || grep -q 'class:(.*|Wiremix|' "$system_conf" || grep -q '|Omarchy|' "$system_conf"; then + sed -i 's/\bImpala\b/com.omarchy.Impala/g; s/\bWiremix\b/com.omarchy.Wiremix/g; s/|Omarchy|/|com.omarchy.Omarchy|/g' "$system_conf" + fi +fi diff --git a/migrations/1762150269.sh b/migrations/1762150269.sh new file mode 100644 index 0000000000..3314021ea3 --- /dev/null +++ b/migrations/1762150269.sh @@ -0,0 +1,2 @@ +echo "Install omarchy-walker meta package" +omarchy-pkg-add omarchy-walker diff --git a/migrations/1762352101.sh b/migrations/1762352101.sh new file mode 100644 index 0000000000..9b69745ad6 --- /dev/null +++ b/migrations/1762352101.sh @@ -0,0 +1,5 @@ +echo "Increase Walker limit on how many entries can be shown to 256" + +if ! grep -q "max_results" ~/.config/walker/config.toml; then + sed -i '/^\[providers\]$/a max_results = 256' ~/.config/walker/config.toml +fi diff --git a/migrations/1762417304.sh b/migrations/1762417304.sh new file mode 100644 index 0000000000..a3c9e03c21 --- /dev/null +++ b/migrations/1762417304.sh @@ -0,0 +1,8 @@ +echo "Replace bluetooth GUI with TUI" + +omarchy-pkg-add bluetui +omarchy-pkg-drop blueberry + +if ! grep -q "omarchy-launch-bluetooth" ~/.config/waybar/config.jsonc; then + sed -i 's/blueberry/omarchy-launch-bluetooth/' ~/.config/waybar/config.jsonc +fi diff --git a/migrations/1762446739.sh b/migrations/1762446739.sh new file mode 100644 index 0000000000..37ad3b1b32 --- /dev/null +++ b/migrations/1762446739.sh @@ -0,0 +1,12 @@ +echo "Remove alternative limine.conf files" + +if omarchy-cmd-present limine; then + if [ ! -f /boot/limine.conf ]; then + echo "Error: /boot/limine.conf does not exist. Do not reboot without resolving this issue!" + exit 1 + fi + + sudo rm -f /boot/EFI/limine/limine.conf + sudo rm -f /boot/EFI/BOOT/limine.conf + sudo rm -f /boot/limine/limine.conf +fi diff --git a/migrations/1762684663.sh b/migrations/1762684663.sh new file mode 100644 index 0000000000..3ef9a1cd2f --- /dev/null +++ b/migrations/1762684663.sh @@ -0,0 +1,12 @@ +echo "Update hyprlock font to match current system font" + +font_name=$(omarchy-font-current) + +if [[ -n "$font_name" ]]; then + cp ~/.config/hypr/hyprlock.conf ~/.config/hypr/hyprlock.conf.bak.$(date +%s) + + echo "Found font '$font_name', updating hyprlock" + sed -i "s/font_family = .*/font_family = $font_name/g" ~/.config/hypr/hyprlock.conf +else + echo "No font found, skipping migration" +fi diff --git a/migrations/1762685081.sh b/migrations/1762685081.sh new file mode 100644 index 0000000000..5f48b05438 --- /dev/null +++ b/migrations/1762685081.sh @@ -0,0 +1,12 @@ +echo "Update hyprlock placeholder text based on fingerprint setup status" + +cp ~/.config/hypr/hyprlock.conf ~/.config/hypr/hyprlock.conf.bak.$(date +%s) + +# Check if fprintd is installed and has enrolled fingerprints +if command -v fprintd-list &>/dev/null && fprintd-list "$USER" 2>/dev/null | grep -q "Fingerprints for user"; then + echo "Fingerprint detected, updating placeholder text with fingerprint icon" + sed -i 's/placeholder_text = .*/placeholder_text = Enter Password 󰈷 <\/span>/' ~/.config/hypr/hyprlock.conf +else + echo "No fingerprint enrolled, updating placeholder text without fingerprint icon" + sed -i 's/placeholder_text = .*/placeholder_text = Enter Password/' ~/.config/hypr/hyprlock.conf +fi diff --git a/migrations/1762711005.sh b/migrations/1762711005.sh new file mode 100644 index 0000000000..0ebf1d8a6f --- /dev/null +++ b/migrations/1762711005.sh @@ -0,0 +1,3 @@ +echo "Add usage package to provide tab completion for mise" + +omarchy-pkg-add usage diff --git a/migrations/1762768186.sh b/migrations/1762768186.sh new file mode 100644 index 0000000000..93bc3634ff --- /dev/null +++ b/migrations/1762768186.sh @@ -0,0 +1,3 @@ +echo "Ensure config/uwsm/default uses generic terminal exec" + +sed -i 's/export TERMINAL=.*/export TERMINAL=xdg-terminal-exec/' ~/.config/uwsm/default diff --git a/migrations/1762770442.sh b/migrations/1762770442.sh new file mode 100644 index 0000000000..f312b393b0 --- /dev/null +++ b/migrations/1762770442.sh @@ -0,0 +1,5 @@ +echo "Slow down Ghostty mouse scrolling to match Alacritty" + +if ! grep -q "mouse-scroll-multiplier" ~/.config/ghostty/config; then + echo -e "\n# Slowdown mouse scrolling\nmouse-scroll-multiplier = 0.95" >> ~/.config/ghostty/config +fi diff --git a/migrations/1762770815.sh b/migrations/1762770815.sh new file mode 100644 index 0000000000..36e6a4b4e7 --- /dev/null +++ b/migrations/1762770815.sh @@ -0,0 +1,3 @@ +echo "Pull packages from stable Arch mirror" + +omarchy-refresh-pacman diff --git a/migrations/1762781907.sh b/migrations/1762781907.sh new file mode 100644 index 0000000000..8291dd0f39 --- /dev/null +++ b/migrations/1762781907.sh @@ -0,0 +1,4 @@ +echo "Add try command for managing quick code experiments" + +omarchy-pkg-add ruby tobi-try +mkdir -p ~/Work/tries diff --git a/migrations/1762802472.sh b/migrations/1762802472.sh new file mode 100644 index 0000000000..9585636247 --- /dev/null +++ b/migrations/1762802472.sh @@ -0,0 +1,4 @@ +echo "Update imv config with new keybindings" + +mkdir -p ~/.config/imv +cp $OMARCHY_PATH/config/imv/config ~/.config/imv/ diff --git a/migrations/1762873545.sh b/migrations/1762873545.sh new file mode 100644 index 0000000000..6ad354da40 --- /dev/null +++ b/migrations/1762873545.sh @@ -0,0 +1,10 @@ +echo "Switch Elephant to run as a systemd service and walker to be autostarted on login" + +pkill elephant +elephant service enable +systemctl --user start elephant.service + +pkill walker +mkdir -p ~/.config/autostart/ +cp $OMARCHY_PATH/autostart/walker.desktop ~/.config/autostart/ +setsid walker --gapplication-service & diff --git a/migrations/1763386443.sh b/migrations/1763386443.sh new file mode 100644 index 0000000000..e6d806d4da --- /dev/null +++ b/migrations/1763386443.sh @@ -0,0 +1,8 @@ +echo "Uniquely identify terminal apps with custom app-ids using omarchy-launch-tui" + +# Replace terminal -e calls with omarchy-launch-tui in bindings +sed -i 's/\$terminal -e \([^ ]*\)/omarchy-launch-tui \1/g' ~/.config/hypr/bindings.conf + +# Update waybar to use omarchy-launch-or-focus with omarchy-launch-tui for TUI apps +sed -i 's|xdg-terminal-exec btop|omarchy-launch-or-focus-tui btop|' ~/.config/waybar/config.jsonc +sed -i 's|xdg-terminal-exec --app-id=com\.omarchy\.Wiremix -e wiremix|omarchy-launch-or-focus-tui wiremix|' ~/.config/waybar/config.jsonc diff --git a/migrations/1763393133.sh b/migrations/1763393133.sh new file mode 100644 index 0000000000..f84cf74d6e --- /dev/null +++ b/migrations/1763393133.sh @@ -0,0 +1,6 @@ +echo "Link new theme picker config" + +mkdir -p ~/.config/elephant/menus +ln -snf $OMARCHY_PATH/default/elephant/omarchy_themes.lua ~/.config/elephant/menus/omarchy_themes.lua +sed -i '/"menus",/d' ~/.config/walker/config.toml +omarchy-restart-walker diff --git a/migrations/1763409182.sh b/migrations/1763409182.sh new file mode 100644 index 0000000000..74199ce4aa --- /dev/null +++ b/migrations/1763409182.sh @@ -0,0 +1,3 @@ +echo "Install exfatprogs to support exfat in format-drive" + +omarchy-pkg-add exfatprogs diff --git a/migrations/1763409505.sh b/migrations/1763409505.sh new file mode 100644 index 0000000000..ad1995be46 --- /dev/null +++ b/migrations/1763409505.sh @@ -0,0 +1,5 @@ +echo "Add 10th workspace option to waybar config" + +if ! grep -q '"10": "0",' ~/.config/waybar/config.jsonc; then + sed -i '/"9": "9",/a\ "10": "0",' ~/.config/waybar/config.jsonc +fi diff --git a/migrations/1763478660.sh b/migrations/1763478660.sh new file mode 100644 index 0000000000..f7eec9434a --- /dev/null +++ b/migrations/1763478660.sh @@ -0,0 +1,4 @@ +echo "Configure XDPH config for screensharing to remember token selection" + +cp $OMARCHY_PATH/config/hypr/xdph.conf ~/.config/hypr/ +systemctl --user restart xdg-desktop-portal-hyprland diff --git a/migrations/1763558828.sh b/migrations/1763558828.sh new file mode 100644 index 0000000000..3da9eec006 --- /dev/null +++ b/migrations/1763558828.sh @@ -0,0 +1,28 @@ +echo "Make Alacritty compatible with X-TerminalArgs" + +if omarchy-pkg-present alacritty; then + mkdir -p ~/.local/share/applications + cat > ~/.local/share/applications/Alacritty.desktop << EOF +[Desktop Entry] +Type=Application +TryExec=alacritty +Exec=alacritty +Icon=Alacritty +Terminal=false +Categories=System;TerminalEmulator; +Name=Alacritty +GenericName=Terminal +Comment=A fast, cross-platform, OpenGL terminal emulator +StartupNotify=true +StartupWMClass=Alacritty +Actions=New; +X-TerminalArgExec=-e +X-TerminalArgAppId=--class= +X-TerminalArgTitle=--title= +X-TerminalArgDir=--working-directory= + +[Desktop Action New] +Name=New Terminal +Exec=alacritty +EOF +fi diff --git a/migrations/1763560161.sh b/migrations/1763560161.sh new file mode 100644 index 0000000000..b39569667e --- /dev/null +++ b/migrations/1763560161.sh @@ -0,0 +1,3 @@ +echo "Hide Bluetooth module in waybar if there's no BT controller" + +sed -i '/format-connected": "",/a\ "format-no-controller": "",' ~/.config/waybar/config.jsonc diff --git a/migrations/1763561396.sh b/migrations/1763561396.sh new file mode 100644 index 0000000000..d69e51e180 --- /dev/null +++ b/migrations/1763561396.sh @@ -0,0 +1,3 @@ +echo "Switch to stable Omarchy Package Repository builds" + +omarchy-refresh-pacman diff --git a/migrations/1763583093.sh b/migrations/1763583093.sh new file mode 100644 index 0000000000..85cd0c2fdb --- /dev/null +++ b/migrations/1763583093.sh @@ -0,0 +1,6 @@ +echo "Make ethereal available as new theme" + +if [[ ! -L ~/.config/omarchy/themes/ethereal ]]; then + rm -rf ~/.config/omarchy/themes/ethereal + ln -nfs ~/.local/share/omarchy/themes/ethereal ~/.config/omarchy/themes/ +fi diff --git a/migrations/1763626772.sh b/migrations/1763626772.sh new file mode 100644 index 0000000000..aa02e9f957 --- /dev/null +++ b/migrations/1763626772.sh @@ -0,0 +1,6 @@ +echo "Make hackerman available as new theme" + +if [[ ! -L ~/.config/omarchy/themes/hackerman ]]; then + rm -rf ~/.config/omarchy/themes/hackerman + ln -nfs ~/.local/share/omarchy/themes/hackerman ~/.config/omarchy/themes/ +fi diff --git a/migrations/1763633307.sh b/migrations/1763633307.sh new file mode 100644 index 0000000000..d93893f7b7 --- /dev/null +++ b/migrations/1763633307.sh @@ -0,0 +1,5 @@ +echo "Add 100-line split resizing keybindings to Ghostty" + +if ! grep -q "resize_split:down,100" ~/.config/ghostty/config; then + sed -i "/keybind = control+insert=copy_to_clipboard/a\keybind = super+control+shift+alt+arrow_down=resize_split:down,100\nkeybind = super+control+shift+alt+arrow_up=resize_split:up,100\nkeybind = super+control+shift+alt+arrow_left=resize_split:left,100\nkeybind = super+control+shift+alt+arrow_right=resize_split:right,100" ~/.config/ghostty/config +fi diff --git a/migrations/1763634099.sh b/migrations/1763634099.sh new file mode 100644 index 0000000000..267558b674 --- /dev/null +++ b/migrations/1763634099.sh @@ -0,0 +1,3 @@ +echo "Using 󰂱 icon for bluetooth when connected" + +sed -i 's/"format-connected": "",/"format-connected": "󰂱",/' ~/.config/waybar/config.jsonc diff --git a/migrations/1763653692.sh b/migrations/1763653692.sh new file mode 100644 index 0000000000..46e2af145e --- /dev/null +++ b/migrations/1763653692.sh @@ -0,0 +1,5 @@ +echo "Replace Waybar dock icon with something more obvious" + +sed -i 's/"format": ""/"format": ""/' ~/.config/waybar/config.jsonc +sed -i '/#custom-expand-icon {/,/}/ s/margin-right: 20px;/margin-right: 18px;/' ~/.config/waybar/style.css +omarchy-restart-waybar diff --git a/migrations/1763743755.sh b/migrations/1763743755.sh new file mode 100644 index 0000000000..db73b86e7d --- /dev/null +++ b/migrations/1763743755.sh @@ -0,0 +1,3 @@ +echo "Refresh Walker config to ensure compatibility with latest version" + +omarchy-refresh-walker diff --git a/migrations/1763753641.sh b/migrations/1763753641.sh new file mode 100644 index 0000000000..40d83994cc --- /dev/null +++ b/migrations/1763753641.sh @@ -0,0 +1,3 @@ +echo "Include pacman mirror and OPR upstreams (edge vs stable) in About" + +omarchy-refresh-fastfetch diff --git a/migrations/1764067068.sh b/migrations/1764067068.sh new file mode 100644 index 0000000000..01843585d4 --- /dev/null +++ b/migrations/1764067068.sh @@ -0,0 +1,6 @@ +echo "Use Bluetooth off icon in the waybar when BlueTUI has turned off the adapter" + +if ! grep -q '"format-off": "󰂲"' ~/.config/waybar/config.jsonc; then + sed -i '/"format-disabled": "󰂲",/a\ "format-off": "󰂲",' ~/.config/waybar/config.jsonc + omarchy-restart-waybar +fi diff --git a/migrations/1764067963.sh b/migrations/1764067963.sh new file mode 100644 index 0000000000..99590cbb2f --- /dev/null +++ b/migrations/1764067963.sh @@ -0,0 +1,4 @@ +echo "Ensure lockout limit is reset on reboot" + +sudo sed -i '/pam_faillock\.so preauth/d' /etc/pam.d/sddm-autologin +sudo sed -i '/auth.*pam_permit\.so/a auth required pam_faillock.so authsucc' /etc/pam.d/sddm-autologin diff --git a/migrations/1764332115.sh b/migrations/1764332115.sh new file mode 100644 index 0000000000..f9df037d83 --- /dev/null +++ b/migrations/1764332115.sh @@ -0,0 +1,3 @@ +echo "Ensure emoji menu (Super + Ctrl + E) uses single column design" + +omarchy-refresh-walker diff --git a/migrations/1764333665.sh b/migrations/1764333665.sh new file mode 100644 index 0000000000..e6d5fee5ad --- /dev/null +++ b/migrations/1764333665.sh @@ -0,0 +1,3 @@ +echo "Ensure you have package repository indexes matching your channel" + +sudo pacman -Syyu --noconfirm diff --git a/themes/catppuccin-latte/ghostty.conf b/themes/catppuccin-latte/ghostty.conf new file mode 100644 index 0000000000..e56f4ea6f2 --- /dev/null +++ b/themes/catppuccin-latte/ghostty.conf @@ -0,0 +1 @@ +theme = Catppuccin Latte diff --git a/themes/catppuccin-latte/hyprland.conf b/themes/catppuccin-latte/hyprland.conf index afc429d479..4a72d79206 100644 --- a/themes/catppuccin-latte/hyprland.conf +++ b/themes/catppuccin-latte/hyprland.conf @@ -1,4 +1,9 @@ +$activeBorderColor = rgb(1e66f5) + general { - col.active_border = rgb(1e66f5) + col.active_border = $activeBorderColor } +group { + col.border_active = $activeBorderColor +} diff --git a/themes/catppuccin-latte/kitty.conf b/themes/catppuccin-latte/kitty.conf new file mode 100644 index 0000000000..43cba927b0 --- /dev/null +++ b/themes/catppuccin-latte/kitty.conf @@ -0,0 +1,78 @@ +## name: Catppuccin Latte 🐑 +## author: Pocco81 (https://github.com/Pocco81) +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/latte.conf +## blurb: Soothing pastel theme for the high-spirited! + + + +# The basic colors +foreground #4C4F69 +background #EFF1F5 +selection_foreground #EFF1F5 +selection_background #DC8A78 + +# Cursor colors +cursor #DC8A78 +cursor_text_color #EFF1F5 + +# URL underline color when hovering with mouse +url_color #7287FD + +# Kitty window border colors +active_border_color #8839EF +inactive_border_color #7C7F93 +bell_border_color #E64553 + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #EFF1F5 +active_tab_background #8839EF +inactive_tab_foreground #4C4F69 +inactive_tab_background #9CA0B0 +tab_bar_background #BCC0CC + +# Colors for marks (marked text in the terminal) +mark1_foreground #EFF1F5 +mark1_background #1E66F5 +mark2_foreground #EFF1F5 +mark2_background #8839EF +mark3_foreground #EFF1F5 +mark3_background #209FB5 + +# The 16 terminal colors + +# black +color0 #4C4F69 +color8 #6C6F85 + +# red +color1 #D20F39 +color9 #D20F39 + +# green +color2 #40A02B +color10 #40A02B + +# yellow +color3 #DF8E1D +color11 #DF8E1D + +# blue +color4 #1E66F5 +color12 #1E66F5 + +# magenta +color5 #EA76CB +color13 #EA76CB + +# cyan +color6 #179299 +color14 #179299 + +# white +color7 #ACB0BE +color15 #ACB0BE diff --git a/themes/catppuccin-latte/mako.ini b/themes/catppuccin-latte/mako.ini index ce8b8f35d1..fa46cfff2a 100644 --- a/themes/catppuccin-latte/mako.ini +++ b/themes/catppuccin-latte/mako.ini @@ -1,25 +1,5 @@ +include=~/.local/share/omarchy/default/mako/core.ini + text-color=#4c4f69 border-color=#1e66f5 background-color=#eff1f5 -width=420 -height=110 -padding=10 -border-size=2 -font=Liberation Sans 11 -anchor=top-right -outer-margin=20 -default-timeout=5000 -max-icon-size=32 - -[app-name=Spotify] -invisible=1 - -[mode=do-not-disturb] -invisible=true - -[mode=do-not-disturb app-name=notify-send] -invisible=false - - -[urgency=critical] -default-timeout=0 diff --git a/themes/catppuccin-latte/neovim.lua b/themes/catppuccin-latte/neovim.lua index 07a53cf8cd..53eaf45cf2 100644 --- a/themes/catppuccin-latte/neovim.lua +++ b/themes/catppuccin-latte/neovim.lua @@ -3,12 +3,9 @@ return { "catppuccin/nvim", name = "catppuccin", priority = 1000, - config = function() - require("catppuccin").setup({ - flavour = "latte", -- other options: "mocha", "frappe", "macchiato" - }) - vim.cmd.colorscheme("catppuccin-latte") - end, + opts = { + flavour = "latte", + }, }, { "LazyVim/LazyVim", diff --git a/themes/catppuccin-latte/preview.png b/themes/catppuccin-latte/preview.png new file mode 100644 index 0000000000..8befd6f4ea Binary files /dev/null and b/themes/catppuccin-latte/preview.png differ diff --git a/themes/catppuccin-latte/vscode.json b/themes/catppuccin-latte/vscode.json new file mode 100644 index 0000000000..98d111381b --- /dev/null +++ b/themes/catppuccin-latte/vscode.json @@ -0,0 +1,4 @@ +{ + "name": "Catppuccin Latte", + "extension": "catppuccin.catppuccin-vsc" +} diff --git a/themes/catppuccin/alacritty.toml b/themes/catppuccin/alacritty.toml index bfa455ad9f..7762dcdbdf 100644 --- a/themes/catppuccin/alacritty.toml +++ b/themes/catppuccin/alacritty.toml @@ -1,76 +1,65 @@ [colors.primary] -background = "#24273a" -foreground = "#cad3f5" -dim_foreground = "#8087a2" -bright_foreground = "#cad3f5" +background = "#1e1e2e" +foreground = "#cdd6f4" +dim_foreground = "#7f849c" +bright_foreground = "#cdd6f4" [colors.cursor] -text = "#24273a" -cursor = "#f4dbd6" +text = "#1e1e2e" +cursor = "#f5e0dc" [colors.vi_mode_cursor] -text = "#24273a" -cursor = "#b7bdf8" +text = "#1e1e2e" +cursor = "#b4befe" [colors.search.matches] -foreground = "#24273a" -background = "#a5adcb" +foreground = "#1e1e2e" +background = "#a6adc8" [colors.search.focused_match] -foreground = "#24273a" -background = "#a6da95" +foreground = "#1e1e2e" +background = "#a6e3a1" [colors.footer_bar] -foreground = "#24273a" -background = "#a5adcb" +foreground = "#1e1e2e" +background = "#a6adc8" [colors.hints.start] -foreground = "#24273a" -background = "#eed49f" +foreground = "#1e1e2e" +background = "#f9e2af" [colors.hints.end] -foreground = "#24273a" -background = "#a5adcb" +foreground = "#1e1e2e" +background = "#a6adc8" [colors.selection] -text = "#24273a" -background = "#f4dbd6" +text = "#1e1e2e" +background = "#f5e0dc" [colors.normal] -black = "#494d64" -red = "#ed8796" -green = "#a6da95" -yellow = "#eed49f" -blue = "#8aadf4" -magenta = "#f5bde6" -cyan = "#8bd5ca" -white = "#b8c0e0" +black = "#45475a" +red = "#f38ba8" +green = "#a6e3a1" +yellow = "#f9e2af" +blue = "#89b4fa" +magenta = "#f5c2e7" +cyan = "#94e2d5" +white = "#bac2de" [colors.bright] -black = "#5b6078" -red = "#ed8796" -green = "#a6da95" -yellow = "#eed49f" -blue = "#8aadf4" -magenta = "#f5bde6" -cyan = "#8bd5ca" -white = "#a5adcb" - -[colors.dim] -black = "#494d64" -red = "#ed8796" -green = "#a6da95" -yellow = "#eed49f" -blue = "#8aadf4" -magenta = "#f5bde6" -cyan = "#8bd5ca" -white = "#b8c0e0" +black = "#585b70" +red = "#f38ba8" +green = "#a6e3a1" +yellow = "#f9e2af" +blue = "#89b4fa" +magenta = "#f5c2e7" +cyan = "#94e2d5" +white = "#a6adc8" [[colors.indexed_colors]] index = 16 -color = "#f5a97f" +color = "#fab387" [[colors.indexed_colors]] index = 17 -color = "#f4dbd6" - +color = "#f5e0dc" diff --git a/themes/catppuccin/btop.theme b/themes/catppuccin/btop.theme index 18a4ff6186..f0395b35cc 100644 --- a/themes/catppuccin/btop.theme +++ b/themes/catppuccin/btop.theme @@ -1,5 +1,5 @@ # Main background, empty for terminal default, need to be empty if you want transparent background -theme[main_bg]="#24273a" +theme[main_bg]="#1E1E2E" # Main text color theme[main_fg]="#c6d0f5" diff --git a/themes/catppuccin/ghostty.conf b/themes/catppuccin/ghostty.conf new file mode 100644 index 0000000000..fe0502bcc1 --- /dev/null +++ b/themes/catppuccin/ghostty.conf @@ -0,0 +1 @@ +theme = Catppuccin Mocha diff --git a/themes/catppuccin/hyprland.conf b/themes/catppuccin/hyprland.conf index 46ff7e646b..da3374ba34 100644 --- a/themes/catppuccin/hyprland.conf +++ b/themes/catppuccin/hyprland.conf @@ -1,3 +1,9 @@ +$activeBorderColor = rgb(c6d0f5) + general { - col.active_border = rgb(c6d0f5) + col.active_border = $activeBorderColor +} + +group { + col.border_active = $activeBorderColor } diff --git a/themes/catppuccin/kitty.conf b/themes/catppuccin/kitty.conf new file mode 100644 index 0000000000..e8ee9a1aac --- /dev/null +++ b/themes/catppuccin/kitty.conf @@ -0,0 +1,78 @@ +## name: Catppuccin Mocha 🌿 +## author: Pocco81 (https://github.com/Pocco81) +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/mocha.conf +## blurb: Soothing pastel theme for the high-spirited! + + + +# The basic colors +foreground #CDD6F4 +background #1E1E2E +selection_foreground #1E1E2E +selection_background #F5E0DC + +# Cursor colors +cursor #F5E0DC +cursor_text_color #1E1E2E + +# URL underline color when hovering with mouse +url_color #B4BEFE + +# Kitty window border colors +active_border_color #CBA6F7 +inactive_border_color #8E95B3 +bell_border_color #EBA0AC + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #11111B +active_tab_background #CBA6F7 +inactive_tab_foreground #CDD6F4 +inactive_tab_background #181825 +tab_bar_background #11111B + +# Colors for marks (marked text in the terminal) +mark1_foreground #1E1E2E +mark1_background #87B0F9 +mark2_foreground #1E1E2E +mark2_background #CBA6F7 +mark3_foreground #1E1E2E +mark3_background #74C7EC + +# The 16 terminal colors + +# black +color0 #43465A +color8 #43465A + +# red +color1 #F38BA8 +color9 #F38BA8 + +# green +color2 #A6E3A1 +color10 #A6E3A1 + +# yellow +color3 #F9E2AF +color11 #F9E2AF + +# blue +color4 #87B0F9 +color12 #87B0F9 + +# magenta +color5 #F5C2E7 +color13 #F5C2E7 + +# cyan +color6 #94E2D5 +color14 #94E2D5 + +# white +color7 #CDD6F4 +color15 #A1A8C9 diff --git a/themes/catppuccin/mako.ini b/themes/catppuccin/mako.ini index e1caf53860..e530b7d562 100644 --- a/themes/catppuccin/mako.ini +++ b/themes/catppuccin/mako.ini @@ -1,24 +1,5 @@ +include=~/.local/share/omarchy/default/mako/core.ini + text-color=#cad3f5 border-color=#c6d0f5 background-color=#24273a -width=420 -height=110 -padding=10 -border-size=2 -font=Liberation Sans 11 -anchor=top-right -outer-margin=20 -default-timeout=5000 -max-icon-size=32 - -[app-name=Spotify] -invisible=1 - -[mode=do-not-disturb] -invisible=true - -[mode=do-not-disturb app-name=notify-send] -invisible=false - -[urgency=critical] -default-timeout=0 diff --git a/themes/catppuccin/neovim.lua b/themes/catppuccin/neovim.lua index dbe34f5ee5..a8683876a3 100644 --- a/themes/catppuccin/neovim.lua +++ b/themes/catppuccin/neovim.lua @@ -1,4 +1,9 @@ return { + { + "catppuccin/nvim", + name = "catppuccin", + priority = 1000, + }, { "LazyVim/LazyVim", opts = { diff --git a/themes/catppuccin/preview.png b/themes/catppuccin/preview.png new file mode 100644 index 0000000000..25c40d5156 Binary files /dev/null and b/themes/catppuccin/preview.png differ diff --git a/themes/catppuccin/vscode.json b/themes/catppuccin/vscode.json new file mode 100644 index 0000000000..a94d2cf8f3 --- /dev/null +++ b/themes/catppuccin/vscode.json @@ -0,0 +1,4 @@ +{ + "name": "Catppuccin Mocha", + "extension": "catppuccin.catppuccin-vsc" +} diff --git a/themes/ethereal/alacritty.toml b/themes/ethereal/alacritty.toml new file mode 100644 index 0000000000..215c3c0925 --- /dev/null +++ b/themes/ethereal/alacritty.toml @@ -0,0 +1,28 @@ +[colors] +[colors.primary] +background = "#060B1E" +foreground = "#ffcead" + +[colors.normal] +black = "#060B1E" +red = "#ED5B5A" +green = "#92a593" +yellow = "#E9BB4F" +blue = "#7d82d9" +magenta = "#c89dc1" +cyan = "#a3bfd1" +white = "#F99957" + +[colors.bright] +black = "#6d7db6" +red = "#faaaa9" +green = "#c4cfc4" +yellow = "#f7dc9c" +blue = "#c2c4f0" +magenta = "#ead7e7" +cyan = "#dfeaf0" +white = "#ffcead" + +[colors.cursor] +text = "#060B1E" +cursor = "#ffcead" diff --git a/themes/ethereal/backgrounds/1.jpg b/themes/ethereal/backgrounds/1.jpg new file mode 100644 index 0000000000..e5c1463fcc Binary files /dev/null and b/themes/ethereal/backgrounds/1.jpg differ diff --git a/themes/ethereal/btop.theme b/themes/ethereal/btop.theme new file mode 100644 index 0000000000..135da3db04 --- /dev/null +++ b/themes/ethereal/btop.theme @@ -0,0 +1,70 @@ +# Main background, empty for terminal default, need to be empty if you want transparent background +theme[main_bg]="#060B1E" + +# Main text color +theme[main_fg]="#ffcead" + +# Title color for boxes +theme[title]="#c89dc1" + +# Highlight color for keyboard shortcuts +theme[hi_fg]="#a3bfd1" + +# Background color of selected item in processes box +theme[selected_bg]="#6d7db6" + +# Foreground color of selected item in processes box +theme[selected_fg]="#ffcead" + +# Color of inactive/disabled text +theme[inactive_fg]="#6d7db6" + +# Misc colors for processes box including mini cpu graphs, details memory graph and details status text +theme[proc_misc]="#c89dc1" + +# Box outline and divider line color +theme[cpu_box]="#92a593" +theme[mem_box]="#92a593" +theme[net_box]="#92a593" +theme[proc_box]="#92a593" +theme[div_line]="#6d7db6" + +# Gradient for all meters and graphs +theme[temp_start]="#a3bfd1" +theme[temp_mid]="#7d82d9" +theme[temp_end]="#92a593" + + +theme[cpu_start]="#a3bfd1" +theme[cpu_mid]="#7d82d9" +theme[cpu_end]="#92a593" + + +theme[free_start]="#7d82d9" +theme[free_mid]="#E9BB4F" +theme[free_end]="#E9BB4F" + + +theme[cached_start]="#E9BB4F" +theme[cached_mid]="#E9BB4F" +theme[cached_end]="#E9BB4F" + + +theme[available_start]="#a3bfd1" +theme[available_mid]="#a3bfd1" +theme[available_end]="#a3bfd1" + + +theme[used_start]="#92a593" +theme[used_mid]="#92a593" +theme[used_end]="#92a593" + + +theme[download_start]="#E9BB4F" +theme[download_mid]="#a3bfd1" +theme[download_end]="#7d82d9" + + +theme[upload_start]="#E9BB4F" +theme[upload_mid]="#a3bfd1" +theme[upload_end]="#7d82d9" \ No newline at end of file diff --git a/themes/ethereal/chromium.theme b/themes/ethereal/chromium.theme new file mode 100644 index 0000000000..164d85c80e --- /dev/null +++ b/themes/ethereal/chromium.theme @@ -0,0 +1 @@ +6,11,30 diff --git a/themes/ethereal/ghostty.conf b/themes/ethereal/ghostty.conf new file mode 100644 index 0000000000..1ac9168bbf --- /dev/null +++ b/themes/ethereal/ghostty.conf @@ -0,0 +1,23 @@ +# Background and foreground colors +background = #060B1E +foreground = #ffcead + +# Standard colors +palette = 0=#060B1E +palette = 1=#ED5B5A +palette = 2=#92a593 +palette = 3=#E9BB4F +palette = 4=#7d82d9 +palette = 5=#c89dc1 +palette = 6=#a3bfd1 +palette = 7=#F99957 + +# Bright colors +palette = 8=#6d7db6 +palette = 9=#faaaa9 +palette = 10=#c4cfc4 +palette = 11=#f7dc9c +palette = 12=#c2c4f0 +palette = 13=#ead7e7 +palette = 14=#dfeaf0 +palette = 15=#ffcead diff --git a/themes/ethereal/hyprland.conf b/themes/ethereal/hyprland.conf new file mode 100644 index 0000000000..9b72328f8c --- /dev/null +++ b/themes/ethereal/hyprland.conf @@ -0,0 +1,12 @@ +# This file is not a full hyprland configuration. +# It is intended to be included in your main hyprland.conf. + +$activeBorderColor = rgb(4E85D8) + +general { + col.active_border = $activeBorderColor +} + +group { + col.border_active = $activeBorderColor +} diff --git a/themes/ethereal/hyprlock.conf b/themes/ethereal/hyprlock.conf new file mode 100644 index 0000000000..7d9b62e2df --- /dev/null +++ b/themes/ethereal/hyprlock.conf @@ -0,0 +1,6 @@ +$color = rgba(6, 11, 30, 1) +$inner_color = rgba(6, 11, 30, 0.66) +$outer_color = rgba(200, 157, 193, 1) +$font_color = rgba(255, 206, 173, 1) +$placeholder_color = rgba(255, 206, 173, 0.7) +$check_color = rgba(163, 191, 209, 1) diff --git a/themes/ethereal/icons.theme b/themes/ethereal/icons.theme new file mode 100644 index 0000000000..6ce2f147cd --- /dev/null +++ b/themes/ethereal/icons.theme @@ -0,0 +1 @@ +Yaru-blue diff --git a/themes/ethereal/kitty.conf b/themes/ethereal/kitty.conf new file mode 100644 index 0000000000..fe3bae7de6 --- /dev/null +++ b/themes/ethereal/kitty.conf @@ -0,0 +1,34 @@ +background #060B1E +foreground #ffcead + +# black +color0 #060B1E +color8 #6d7db6 + +# red +color1 #ED5B5A +color9 #faaaa9 + +# green +color2 #92a593 +color10 #c4cfc4 + +# yellow +color3 #E9BB4F +color11 #f7dc9c + +# blue +color4 #7d82d9 +color12 #c2c4f0 + +# magenta +color5 #c89dc1 +color13 #ead7e7 + +#cyan +color6 #a3bfd1 +color14 #dfeaf0 + +#white +color7 #F99957 +color15 #ffcead diff --git a/themes/ethereal/mako.ini b/themes/ethereal/mako.ini new file mode 100644 index 0000000000..fde27a456e --- /dev/null +++ b/themes/ethereal/mako.ini @@ -0,0 +1,21 @@ +text-color=#ffcead +border-color=#c89dc1 +background-color=#060B1E +width=420 +height=110 +padding=10 +border-size=2 +font=Liberation Sans 11 +anchor=top-right +outer-margin=20 +default-timeout=5000 +max-icon-size=32 + +[app-name=Spotify] +invisible=1 + +[mode=do-not-disturb] +invisible=true + +[mode=do-not-disturb app-name=notify-send] +invisible=false diff --git a/themes/ethereal/neovim.lua b/themes/ethereal/neovim.lua new file mode 100644 index 0000000000..885bece6ea --- /dev/null +++ b/themes/ethereal/neovim.lua @@ -0,0 +1,12 @@ +return { + { + "bjarneo/ethereal.nvim", + priority = 1000, + }, + { + "LazyVim/LazyVim", + opts = { + colorscheme = "ethereal", + }, + }, +} diff --git a/themes/ethereal/preview.png b/themes/ethereal/preview.png new file mode 100644 index 0000000000..0064a2abc0 Binary files /dev/null and b/themes/ethereal/preview.png differ diff --git a/themes/ethereal/swayosd.css b/themes/ethereal/swayosd.css new file mode 100644 index 0000000000..7cdfeead61 --- /dev/null +++ b/themes/ethereal/swayosd.css @@ -0,0 +1,5 @@ +@define-color background-color #060B1E; +@define-color border-color #6d7db6; +@define-color label #ffcead; +@define-color image #ffcead; +@define-color progress #E9BB4F; \ No newline at end of file diff --git a/themes/ethereal/vscode.json b/themes/ethereal/vscode.json new file mode 100644 index 0000000000..2fccd6b059 --- /dev/null +++ b/themes/ethereal/vscode.json @@ -0,0 +1,4 @@ +{ + "name": "Ethereal", + "extension": "Bjarne.ethereal-omarchy" +} diff --git a/themes/ethereal/walker.css b/themes/ethereal/walker.css new file mode 100644 index 0000000000..ceb5d9537e --- /dev/null +++ b/themes/ethereal/walker.css @@ -0,0 +1,6 @@ +@define-color selected-text #7d82d9; +@define-color text #ffcead; +@define-color base #060B1E; +@define-color border #6d7db6; +@define-color foreground #ffcead; +@define-color background #060B1E; diff --git a/themes/ethereal/waybar.css b/themes/ethereal/waybar.css new file mode 100644 index 0000000000..d03dff382a --- /dev/null +++ b/themes/ethereal/waybar.css @@ -0,0 +1,2 @@ +@define-color background #060B1E; +@define-color foreground #ffcead; diff --git a/themes/everforest/btop.theme b/themes/everforest/btop.theme index f6aeadfe1b..2ad33bbee6 100644 --- a/themes/everforest/btop.theme +++ b/themes/everforest/btop.theme @@ -22,7 +22,7 @@ theme[selected_bg]="#3d484d" theme[selected_fg]="#dbbc7f" # Color of inactive/disabled text -theme[inactive_fg]="#2d353b" +theme[inactive_fg]="#2d353b" # Color of text appearing on top of graphs, i.e uptime and current network graph scaling theme[graph_text]="#d3c6aa" diff --git a/themes/everforest/ghostty.conf b/themes/everforest/ghostty.conf new file mode 100644 index 0000000000..6208b9ce3d --- /dev/null +++ b/themes/everforest/ghostty.conf @@ -0,0 +1,20 @@ +background = #2d353b +foreground = #d3c6aa + +palette = 0=#475258 +palette = 1=#e67e80 +palette = 2=#a7c080 +palette = 3=#dbbc7f +palette = 4=#7fbbb3 +palette = 5=#d699b6 +palette = 6=#83c092 +palette = 7=#d3c6aa + +palette = 8=#475258 +palette = 9=#e67e80 +palette = 10=#a7c080 +palette = 11=#dbbc7f +palette = 12=#7fbbb3 +palette = 13=#d699b6 +palette = 14=#83c092 +palette = 15=#d3c6aa diff --git a/themes/everforest/hyprland.conf b/themes/everforest/hyprland.conf index e88f030c04..10e2c5d452 100644 --- a/themes/everforest/hyprland.conf +++ b/themes/everforest/hyprland.conf @@ -1,3 +1,9 @@ +$activeBorderColor = rgb(d3c6aa) + general { - col.active_border = rgb(d3c6aa) + col.active_border = $activeBorderColor +} + +group { + col.border_active = $activeBorderColor } diff --git a/themes/everforest/kitty.conf b/themes/everforest/kitty.conf new file mode 100644 index 0000000000..825cac2369 --- /dev/null +++ b/themes/everforest/kitty.conf @@ -0,0 +1,28 @@ +## name: Everforest Dark Hard +## author: Sainnhe Park +## license: MIT +## upstream: https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_dark_hard.conf +## blurb: A green based color scheme designed to be warm and soft + +background #2d353b +foreground #d3c6aa + +# Normal colors +color0 #475258 +color1 #e67e80 +color2 #a7c080 +color3 #dbbc7f +color4 #7fbbb3 +color5 #d699b6 +color6 #83c092 +color7 #d3c6aa + +# Bright colors +color8 #475258 +color9 #e67e80 +color10 #a7c080 +color11 #dbbc7f +color12 #7fbbb3 +color13 #d699b6 +color14 #83c092 +color15 #d3c6aa diff --git a/themes/everforest/mako.ini b/themes/everforest/mako.ini index a083610105..0008121fce 100644 --- a/themes/everforest/mako.ini +++ b/themes/everforest/mako.ini @@ -1,24 +1,5 @@ +include=~/.local/share/omarchy/default/mako/core.ini + text-color=#d3c6aa border-color=#d3c6aa background-color=#2d353b -width=420 -height=110 -padding=10 -border-size=2 -font=Liberation Sans 11 -anchor=top-right -outer-margin=20 -default-timeout=5000 -max-icon-size=32 - -[app-name=Spotify] -invisible=1 - -[mode=do-not-disturb] -invisible=true - -[mode=do-not-disturb app-name=notify-send] -invisible=false - -[urgency=critical] -default-timeout=0 diff --git a/themes/everforest/preview.png b/themes/everforest/preview.png new file mode 100644 index 0000000000..3124f21e45 Binary files /dev/null and b/themes/everforest/preview.png differ diff --git a/themes/everforest/vscode.json b/themes/everforest/vscode.json new file mode 100644 index 0000000000..02b107d067 --- /dev/null +++ b/themes/everforest/vscode.json @@ -0,0 +1,4 @@ +{ + "name": "Everforest Dark", + "extension": "sainnhe.everforest" +} diff --git a/themes/flexoki-light/alacritty.toml b/themes/flexoki-light/alacritty.toml new file mode 100644 index 0000000000..e59fce8b90 --- /dev/null +++ b/themes/flexoki-light/alacritty.toml @@ -0,0 +1,39 @@ +[colors.bright] +black = "#100F0F" +blue = "#205EA6" +cyan = "#3AA99F" +green = "#879A39" +magenta = "#CE5D97" +red = "#D14D41" +white = "#FFFCF0" +yellow = "#D0A215" + +[colors.cursor] +cursor = "#100F0F" +text = "#FFFCF0" + +[colors.dim] +black = "#100F0F" +blue = "#205EA6" +cyan = "#3AA99F" +green = "#879A39" +magenta = "#CE5D97" +red = "#D14D41" +white = "#FFFCF0" +yellow = "#D0A215" + +[colors.normal] +black = "#100F0F" +blue = "#205EA6" +cyan = "#3AA99F" +green = "#879A39" +magenta = "#CE5D97" +red = "#D14D41" +white = "#FFFCF0" +yellow = "#D0A215" + +[colors.primary] +background = "#FFFCF0" +bright_foreground = "#100F0F" +dim_foreground = "#100F0F" +foreground = "#100F0F" diff --git a/themes/flexoki-light/backgrounds/1-flexoki-light-orb.png b/themes/flexoki-light/backgrounds/1-flexoki-light-orb.png new file mode 100644 index 0000000000..a564a176ec Binary files /dev/null and b/themes/flexoki-light/backgrounds/1-flexoki-light-orb.png differ diff --git a/themes/flexoki-light/backgrounds/2-flexoki-light-omarchy.png b/themes/flexoki-light/backgrounds/2-flexoki-light-omarchy.png new file mode 100644 index 0000000000..cc755b1f90 Binary files /dev/null and b/themes/flexoki-light/backgrounds/2-flexoki-light-omarchy.png differ diff --git a/themes/flexoki-light/btop.theme b/themes/flexoki-light/btop.theme new file mode 100644 index 0000000000..0caf9c6546 --- /dev/null +++ b/themes/flexoki-light/btop.theme @@ -0,0 +1,78 @@ +# Main bg +theme[main_bg]="#FFFCF0" + +# Main text color +theme[main_fg]="#100F0F" + +# Title color for boxes +theme[title]="#100F0F" + +# Highlight color for keyboard shortcuts +theme[hi_fg]="#205EA6" + +# Background color of selected item in processes box +theme[selected_bg]="#414868" + +# Foreground color of selected item in processes box +theme[selected_fg]="#100F0F" + +# Color of inactive/disabled text +theme[inactive_fg]="#6F6E69" + +# Misc colors for processes box including mini cpu graphs, details memory graph and details status text +theme[proc_misc]="#205EA6" + +# Cpu box outline color +theme[cpu_box]="#6F6E69" + +# Memory/disks box outline color +theme[mem_box]="#6F6E69" + +# Net up/down box outline color +theme[net_box]="#6F6E69" + +# Processes box outline color +theme[proc_box]="#6F6E69" + +# Box divider line and small boxes line color +theme[div_line]="#6F6E69" + +# Temperature graph colors +theme[temp_start]="#66800B" +theme[temp_mid]="#BC5215" +theme[temp_end]="#AF3029" + +# CPU graph colors +theme[cpu_start]="#66800B" +theme[cpu_mid]="#BC5215" +theme[cpu_end]="#AF3029" + +# Mem/Disk free meter +theme[free_start]="#66800B" +theme[free_mid]="#BC5215" +theme[free_end]="#AF3029" + +# Mem/Disk cached meter +theme[cached_start]="#66800B" +theme[cached_mid]="#BC5215" +theme[cached_end]="#AF3029" + +# Mem/Disk available meter +theme[available_start]="#66800B" +theme[available_mid]="#BC5215" +theme[available_end]="#AF3029" + +# Mem/Disk used meter +theme[used_start]="#66800B" +theme[used_mid]="#BC5215" +theme[used_end]="#AF3029" + +# Download graph colors +theme[download_start]="#66800B" +theme[download_mid]="#BC5215" +theme[download_end]="#AF3029" + +# Upload graph colors +theme[upload_start]="#66800B" +theme[upload_mid]="#BC5215" +theme[upload_end]="#AF3029" diff --git a/themes/flexoki-light/chromium.theme b/themes/flexoki-light/chromium.theme new file mode 100644 index 0000000000..31cd573a7c --- /dev/null +++ b/themes/flexoki-light/chromium.theme @@ -0,0 +1 @@ +242,240,229 \ No newline at end of file diff --git a/themes/flexoki-light/ghostty.conf b/themes/flexoki-light/ghostty.conf new file mode 100644 index 0000000000..5bc755a157 --- /dev/null +++ b/themes/flexoki-light/ghostty.conf @@ -0,0 +1 @@ +theme = Flexoki Light \ No newline at end of file diff --git a/themes/flexoki-light/hyprland.conf b/themes/flexoki-light/hyprland.conf new file mode 100644 index 0000000000..1baef471e7 --- /dev/null +++ b/themes/flexoki-light/hyprland.conf @@ -0,0 +1,9 @@ +$activeBorderColor = rgba(205EA6ee) + +general { + col.active_border = $activeBorderColor +} + +group { + col.border_active = $activeBorderColor +} diff --git a/themes/flexoki-light/hyprlock.conf b/themes/flexoki-light/hyprlock.conf new file mode 100644 index 0000000000..e1d0dd4aba --- /dev/null +++ b/themes/flexoki-light/hyprlock.conf @@ -0,0 +1,5 @@ +$color = rgba(255,252,240,1.0) +$inner_color = rgba(242,240,229,1.0) +$outer_color = rgba(206,205,195,1.0) +$font_color = rgba(16,15,15,1.0) +$check_color = rgba(32, 94, 166, 1.0) diff --git a/themes/flexoki-light/icons.theme b/themes/flexoki-light/icons.theme new file mode 100644 index 0000000000..6ce2f147cd --- /dev/null +++ b/themes/flexoki-light/icons.theme @@ -0,0 +1 @@ +Yaru-blue diff --git a/themes/flexoki-light/kitty.conf b/themes/flexoki-light/kitty.conf new file mode 100644 index 0000000000..c8ee014207 --- /dev/null +++ b/themes/flexoki-light/kitty.conf @@ -0,0 +1,67 @@ +# vim:ft=kitty + +## name: Flexoki (Light) +## author: Kepano +## license: MIT +## upstream: https://raw.githubusercontent.com/kepano/flexoki/main/kitty/flexoki_light.conf +## blurb: An inky color scheme for prose and code + +# The basic colors +foreground #100F0F +background #FFFCF0 +selection_foreground #100F0F +selection_background #CECDC3 + +# Cursor colors +cursor #100F0F +cursor_text_color #FFFCF0 + +# kitty window border colors +active_border_color #D14D41 +inactive_border_color #CECDC3 + +# Tab bar colors +active_tab_foreground #100F0F +active_tab_background #CECDC3 +inactive_tab_foreground #6F6E69 +inactive_tab_background #E6E4D9 + +# The basic 16 colors +# black +color0 #100F0F +color8 #6F6E69 + + +# red +color1 #D14D41 +color9 #AF3029 + + +# green +color2 #879A39 +color10 #66800B + + +# yellow +color3 #D0A215 +color11 #AD8301 + + +# blue +color4 #4385BE +color12 #205EA6 + + +# magenta +color5 #CE5D97 +color13 #A02F6F + + +# cyan +color6 #3AA99F +color14 #24837B + + +# white +color7 #FFFCF0 +color15 #F2F0E5 \ No newline at end of file diff --git a/themes/flexoki-light/light.mode b/themes/flexoki-light/light.mode new file mode 100644 index 0000000000..e65461b9b4 --- /dev/null +++ b/themes/flexoki-light/light.mode @@ -0,0 +1 @@ +# This will set "prefer-light" and use "Adwaita" as the theme \ No newline at end of file diff --git a/themes/flexoki-light/mako.ini b/themes/flexoki-light/mako.ini new file mode 100644 index 0000000000..19cf1af47a --- /dev/null +++ b/themes/flexoki-light/mako.ini @@ -0,0 +1,5 @@ +include=~/.local/share/omarchy/default/mako/core.ini + +text-color=#100F0F +border-color=#205EA6 +background-color=#FFFCF0 diff --git a/themes/flexoki-light/neovim.lua b/themes/flexoki-light/neovim.lua new file mode 100644 index 0000000000..230c5512a4 --- /dev/null +++ b/themes/flexoki-light/neovim.lua @@ -0,0 +1,12 @@ +return { + { + "kepano/flexoki-neovim", + priority = 1000, + }, + { + "LazyVim/LazyVim", + opts = { + colorscheme = "flexoki-light", + }, + }, +} diff --git a/themes/flexoki-light/preview.png b/themes/flexoki-light/preview.png new file mode 100644 index 0000000000..dce1c54284 Binary files /dev/null and b/themes/flexoki-light/preview.png differ diff --git a/themes/flexoki-light/swayosd.css b/themes/flexoki-light/swayosd.css new file mode 100644 index 0000000000..444964d574 --- /dev/null +++ b/themes/flexoki-light/swayosd.css @@ -0,0 +1,5 @@ +@define-color background-color #FFFCF0; +@define-color border-color #205EA6; +@define-color label #100F0F; +@define-color image #100F0F; +@define-color progress #100F0F; diff --git a/themes/flexoki-light/vscode.json b/themes/flexoki-light/vscode.json new file mode 100644 index 0000000000..00a204567e --- /dev/null +++ b/themes/flexoki-light/vscode.json @@ -0,0 +1,4 @@ +{ + "name": "flexoki-light", + "extension": "shadesOfBuntu.flexoki-light" +} diff --git a/themes/flexoki-light/walker.css b/themes/flexoki-light/walker.css new file mode 100644 index 0000000000..e2ecdfb22a --- /dev/null +++ b/themes/flexoki-light/walker.css @@ -0,0 +1,6 @@ +@define-color selected-text #205EA6; +@define-color text #100F0F; +@define-color base #FFFCF0; +@define-color border #205EA6; +@define-color foreground #100F0F; +@define-color background #FFFCF0; diff --git a/themes/flexoki-light/waybar.css b/themes/flexoki-light/waybar.css new file mode 100644 index 0000000000..edc54c16cb --- /dev/null +++ b/themes/flexoki-light/waybar.css @@ -0,0 +1,2 @@ +@define-color foreground #100F0F; +@define-color background #FFFCF0; diff --git a/themes/gruvbox/ghostty.conf b/themes/gruvbox/ghostty.conf new file mode 100644 index 0000000000..dbb7464e58 --- /dev/null +++ b/themes/gruvbox/ghostty.conf @@ -0,0 +1 @@ +theme = Gruvbox Dark diff --git a/themes/gruvbox/hyprland.conf b/themes/gruvbox/hyprland.conf index 85dbf144a2..029cc90876 100644 --- a/themes/gruvbox/hyprland.conf +++ b/themes/gruvbox/hyprland.conf @@ -1,3 +1,9 @@ +$activeBorderColor = rgb(a89984) + general { - col.active_border = rgb(a89984) + col.active_border = $activeBorderColor +} + +group { + col.border_active = $activeBorderColor } diff --git a/themes/gruvbox/kitty.conf b/themes/gruvbox/kitty.conf new file mode 100644 index 0000000000..38b015cc39 --- /dev/null +++ b/themes/gruvbox/kitty.conf @@ -0,0 +1,40 @@ +## name: Gruvbox Dark +## author: Pavel Pertsev +## license: MIT/X11 +## upstream: https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-dark.conf + +selection_foreground #ebdbb2 +selection_background #d65d0e + +background #282828 +foreground #ebdbb2 + +color0 #3c3836 +color1 #cc241d +color2 #98971a +color3 #d79921 +color4 #458588 +color5 #b16286 +color6 #689d6a +color7 #a89984 +color8 #928374 +color9 #fb4934 +color10 #b8bb26 +color11 #fabd2f +color12 #83a598 +color13 #d3869b +color14 #8ec07c +color15 #fbf1c7 + +cursor #bdae93 +cursor_text_color #665c54 + +url_color #458588 + +# START_AUTOGENERATED_TAB_STYLE +# Feel free to update these colors manually and remove these comments. +active_tab_foreground #eeeeee +active_tab_background #d65d0e +inactive_tab_foreground #ebdbb2 +inactive_tab_background #202020 +# END_AUTOGENERATED_TAB_STYLE diff --git a/themes/gruvbox/mako.ini b/themes/gruvbox/mako.ini index 2d70b15b2d..5d2d17ccae 100644 --- a/themes/gruvbox/mako.ini +++ b/themes/gruvbox/mako.ini @@ -1,24 +1,5 @@ +include=~/.local/share/omarchy/default/mako/core.ini + text-color=#d4be98 border-color=#a89984 background-color=#282828 -width=420 -height=110 -padding=10 -border-size=2 -font=Liberation Sans 11 -anchor=top-right -outer-margin=20 -default-timeout=5000 -max-icon-size=32 - -[app-name=Spotify] -invisible=1 - -[mode=do-not-disturb] -invisible=true - -[mode=do-not-disturb app-name=notify-send] -invisible=false - -[urgency=critical] -default-timeout=0 diff --git a/themes/gruvbox/preview.png b/themes/gruvbox/preview.png new file mode 100644 index 0000000000..f934bafa47 Binary files /dev/null and b/themes/gruvbox/preview.png differ diff --git a/themes/gruvbox/vscode.json b/themes/gruvbox/vscode.json new file mode 100644 index 0000000000..e75a9b9fab --- /dev/null +++ b/themes/gruvbox/vscode.json @@ -0,0 +1,4 @@ +{ + "name": "Gruvbox Dark Medium", + "extension": "jdinhlife.gruvbox" +} diff --git a/themes/hackerman/alacritty.toml b/themes/hackerman/alacritty.toml new file mode 100644 index 0000000000..120c8c3a68 --- /dev/null +++ b/themes/hackerman/alacritty.toml @@ -0,0 +1,28 @@ +[colors] +[colors.primary] +background = "#0B0C16" +foreground = "#ddf7ff" + +[colors.normal] +black = "#0B0C16" +red = "#50f872" +green = "#4fe88f" +yellow = "#50f7d4" +blue = "#829dd4" +magenta = "#86a7df" +cyan = "#7cf8f7" +white = "#85E1FB" + +[colors.bright] +black = "#6a6e95" +red = "#85ff9d" +green = "#9cf7c2" +yellow = "#a4ffec" +blue = "#c4d2ed" +magenta = "#cddbf4" +cyan = "#d1fffe" +white = "#ddf7ff" + +[colors.cursor] +text = "#0B0C16" +cursor = "#ddf7ff" diff --git a/themes/hackerman/backgrounds/1.jpg b/themes/hackerman/backgrounds/1.jpg new file mode 100644 index 0000000000..7a36f6aabe Binary files /dev/null and b/themes/hackerman/backgrounds/1.jpg differ diff --git a/themes/hackerman/backgrounds/2.jpg b/themes/hackerman/backgrounds/2.jpg new file mode 100644 index 0000000000..a18aff80a2 Binary files /dev/null and b/themes/hackerman/backgrounds/2.jpg differ diff --git a/themes/hackerman/btop.theme b/themes/hackerman/btop.theme new file mode 100644 index 0000000000..76091891e1 --- /dev/null +++ b/themes/hackerman/btop.theme @@ -0,0 +1,70 @@ +# Main background, empty for terminal default, need to be empty if you want transparent background +theme[main_bg]="#0B0C16" + +# Main text color +theme[main_fg]="#ddf7ff" + +# Title color for boxes +theme[title]="#86a7df" + +# Highlight color for keyboard shortcuts +theme[hi_fg]="#7cf8f7" + +# Background color of selected item in processes box +theme[selected_bg]="#6a6e95" + +# Foreground color of selected item in processes box +theme[selected_fg]="#ddf7ff" + +# Color of inactive/disabled text +theme[inactive_fg]="#6a6e95" + +# Misc colors for processes box including mini cpu graphs, details memory graph and details status text +theme[proc_misc]="#86a7df" + +# Box outline and divider line color +theme[cpu_box]="#4fe88f" +theme[mem_box]="#4fe88f" +theme[net_box]="#4fe88f" +theme[proc_box]="#4fe88f" +theme[div_line]="#6a6e95" + +# Gradient for all meters and graphs +theme[temp_start]="#7cf8f7" +theme[temp_mid]="#829dd4" +theme[temp_end]="#4fe88f" + + +theme[cpu_start]="#7cf8f7" +theme[cpu_mid]="#829dd4" +theme[cpu_end]="#4fe88f" + + +theme[free_start]="#829dd4" +theme[free_mid]="#50f7d4" +theme[free_end]="#50f7d4" + + +theme[cached_start]="#50f7d4" +theme[cached_mid]="#50f7d4" +theme[cached_end]="#50f7d4" + + +theme[available_start]="#7cf8f7" +theme[available_mid]="#7cf8f7" +theme[available_end]="#7cf8f7" + + +theme[used_start]="#4fe88f" +theme[used_mid]="#4fe88f" +theme[used_end]="#4fe88f" + + +theme[download_start]="#50f7d4" +theme[download_mid]="#7cf8f7" +theme[download_end]="#829dd4" + + +theme[upload_start]="#50f7d4" +theme[upload_mid]="#7cf8f7" +theme[upload_end]="#829dd4" \ No newline at end of file diff --git a/themes/hackerman/chromium.theme b/themes/hackerman/chromium.theme new file mode 100644 index 0000000000..6950bd9543 --- /dev/null +++ b/themes/hackerman/chromium.theme @@ -0,0 +1 @@ +11,12,22 diff --git a/themes/hackerman/ghostty.conf b/themes/hackerman/ghostty.conf new file mode 100644 index 0000000000..e4ead98f9a --- /dev/null +++ b/themes/hackerman/ghostty.conf @@ -0,0 +1,23 @@ +# Background and foreground colors +background = #0B0C16 +foreground = #ddf7ff + +# Standard colors +palette = 0=#0B0C16 +palette = 1=#50f872 +palette = 2=#4fe88f +palette = 3=#50f7d4 +palette = 4=#829dd4 +palette = 5=#86a7df +palette = 6=#7cf8f7 +palette = 7=#85E1FB + +# Bright colors +palette = 8=#6a6e95 +palette = 9=#85ff9d +palette = 10=#9cf7c2 +palette = 11=#a4ffec +palette = 12=#c4d2ed +palette = 13=#cddbf4 +palette = 14=#d1fffe +palette = 15=#ddf7ff diff --git a/themes/hackerman/hyprland.conf b/themes/hackerman/hyprland.conf new file mode 100644 index 0000000000..92d76498ba --- /dev/null +++ b/themes/hackerman/hyprland.conf @@ -0,0 +1,12 @@ +# This file is not a full hyprland configuration. +# It is intended to be included in your main hyprland.conf. + +$activeBorderColor = rgba(26a269ee) rgba(2ec27eee) 45deg + +general { + col.active_border = $activeBorderColor +} + +group { + col.border_active = $activeBorderColor +} diff --git a/themes/hackerman/hyprlock.conf b/themes/hackerman/hyprlock.conf new file mode 100644 index 0000000000..6a16b1ec18 --- /dev/null +++ b/themes/hackerman/hyprlock.conf @@ -0,0 +1,6 @@ +$color = rgba(11, 12, 22, 1) +$inner_color = rgba(11, 12, 22, 0.66) +$outer_color = rgba(134, 167, 223, 1) +$font_color = rgba(221, 247, 255, 1) +$placeholder_color = rgba(221, 247, 255, 0.7) +$check_color = rgba(124, 248, 247, 1) diff --git a/themes/hackerman/icons.theme b/themes/hackerman/icons.theme new file mode 100644 index 0000000000..66be38a1eb --- /dev/null +++ b/themes/hackerman/icons.theme @@ -0,0 +1 @@ +Yaru-blue \ No newline at end of file diff --git a/themes/hackerman/kitty.conf b/themes/hackerman/kitty.conf new file mode 100644 index 0000000000..628715f7e4 --- /dev/null +++ b/themes/hackerman/kitty.conf @@ -0,0 +1,34 @@ +background #0B0C16 +foreground #ddf7ff + +# black +color0 #0B0C16 +color8 #6a6e95 + +# red +color1 #50f872 +color9 #85ff9d + +# green +color2 #4fe88f +color10 #9cf7c2 + +# yellow +color3 #50f7d4 +color11 #a4ffec + +# blue +color4 #829dd4 +color12 #c4d2ed + +# magenta +color5 #86a7df +color13 #cddbf4 + +#cyan +color6 #7cf8f7 +color14 #d1fffe + +#white +color7 #85E1FB +color15 #ddf7ff diff --git a/themes/hackerman/mako.ini b/themes/hackerman/mako.ini new file mode 100644 index 0000000000..0727a1f111 --- /dev/null +++ b/themes/hackerman/mako.ini @@ -0,0 +1,21 @@ +text-color=#ddf7ff +border-color=#86a7df +background-color=#0B0C16 +width=420 +height=110 +padding=10 +border-size=2 +font=Liberation Sans 11 +anchor=top-right +outer-margin=20 +default-timeout=5000 +max-icon-size=32 + +[app-name=Spotify] +invisible=1 + +[mode=do-not-disturb] +invisible=true + +[mode=do-not-disturb app-name=notify-send] +invisible=false diff --git a/themes/hackerman/neovim.lua b/themes/hackerman/neovim.lua new file mode 100644 index 0000000000..d4588f0e56 --- /dev/null +++ b/themes/hackerman/neovim.lua @@ -0,0 +1,13 @@ +return { + { + "bjarneo/hackerman.nvim", + dependencies = { "bjarneo/aether.nvim" }, -- Ensure aether is loaded first + priority = 1000, + }, + { + "LazyVim/LazyVim", + opts = { + colorscheme = "hackerman", + }, + }, +} diff --git a/themes/hackerman/preview.png b/themes/hackerman/preview.png new file mode 100644 index 0000000000..b574b9523c Binary files /dev/null and b/themes/hackerman/preview.png differ diff --git a/themes/hackerman/swayosd.css b/themes/hackerman/swayosd.css new file mode 100644 index 0000000000..b89c9617de --- /dev/null +++ b/themes/hackerman/swayosd.css @@ -0,0 +1,5 @@ +@define-color background-color #0B0C16; +@define-color border-color #6a6e95; +@define-color label #ddf7ff; +@define-color image #ddf7ff; +@define-color progress #50f7d4; \ No newline at end of file diff --git a/themes/hackerman/vscode.json b/themes/hackerman/vscode.json new file mode 100644 index 0000000000..95f432be00 --- /dev/null +++ b/themes/hackerman/vscode.json @@ -0,0 +1,4 @@ +{ + "name": "Hackerman", + "extension": "Bjarne.hackerman-omarchy" +} diff --git a/themes/hackerman/walker.css b/themes/hackerman/walker.css new file mode 100644 index 0000000000..82521c5836 --- /dev/null +++ b/themes/hackerman/walker.css @@ -0,0 +1,6 @@ +@define-color selected-text #829dd4; +@define-color text #ddf7ff; +@define-color base #0B0C16; +@define-color border #6a6e95; +@define-color foreground #ddf7ff; +@define-color background #0B0C16; diff --git a/themes/hackerman/waybar.css b/themes/hackerman/waybar.css new file mode 100644 index 0000000000..8f44e7a0c8 --- /dev/null +++ b/themes/hackerman/waybar.css @@ -0,0 +1,2 @@ +@define-color background #0B0C16; +@define-color foreground #ddf7ff; diff --git a/themes/kanagawa/ghostty.conf b/themes/kanagawa/ghostty.conf new file mode 100644 index 0000000000..4e26c72022 --- /dev/null +++ b/themes/kanagawa/ghostty.conf @@ -0,0 +1 @@ +theme = Kanagawa Wave diff --git a/themes/kanagawa/hyprland.conf b/themes/kanagawa/hyprland.conf index 4972f149a4..b5b6403a47 100644 --- a/themes/kanagawa/hyprland.conf +++ b/themes/kanagawa/hyprland.conf @@ -1,3 +1,12 @@ +$activeBorderColor = rgb(dcd7ba) + general { - col.active_border = rgb(dcd7ba) + col.active_border = $activeBorderColor } + +group { + col.border_active = $activeBorderColor +} + +# Kanagawa backdrop is too strong for detault opacity +windowrule = opacity 0.98 0.95, tag:terminal diff --git a/themes/kanagawa/kitty.conf b/themes/kanagawa/kitty.conf new file mode 100644 index 0000000000..7122cea5a1 --- /dev/null +++ b/themes/kanagawa/kitty.conf @@ -0,0 +1,68 @@ +## name: Kanagawa +## author: Tommaso Laurenzi +## license: MIT +## upstream: https://github.com/rebelot/kanagawa.nvim/ +## blurb: NeoVim dark colorscheme inspired by the colors of the famous painting +## by Katsushika Hokusai. + +#: The basic colors + +foreground #dcd7ba +background #1f1f28 +selection_foreground #c8c093 +selection_background #2d4f67 + +#: Cursor colors + +cursor #c8c093 + +#: URL underline color when overing with mouse + +url_color #72a7bc + +#: Tab bar colors + +active_tab_foreground #c8c093 +active_tab_background #1f1f28 +inactive_tab_foreground #727169 +inactive_tab_background #1f1f28 + +#: The basic 16 colors + +#: black +color0 #16161d +color8 #727169 + +#: red +color1 #c34043 +color9 #e82424 + +#: green +color2 #76946a +color10 #98bb6c + +#: yellow +color3 #c0a36e +color11 #e6c384 + +#: blue +color4 #7e9cd8 +color12 #7fb4ca + +#: magenta +color5 #957fb8 +color13 #938aa9 + +#: cyan +color6 #6a9589 +color14 #7aa89f + +#: white +color7 #c8c093 +color15 #dcd7ba + + +#: You can set the remaining 240 colors as color16 to color255. + +color16 #ffa066 +color17 #ff5d62 diff --git a/themes/kanagawa/mako.ini b/themes/kanagawa/mako.ini index d3ad11c3a3..ca2e939c0a 100644 --- a/themes/kanagawa/mako.ini +++ b/themes/kanagawa/mako.ini @@ -1,24 +1,5 @@ +include=~/.local/share/omarchy/default/mako/core.ini + text-color=#dcd7ba border-color=#dcd7ba background-color=#1f1f28 -width=420 -height=110 -padding=10 -border-size=2 -font=Liberation Sans 11 -anchor=top-right -outer-margin=20 -default-timeout=5000 -max-icon-size=32 - -[app-name=Spotify] -invisible=1 - -[mode=do-not-disturb] -invisible=true - -[mode=do-not-disturb app-name=notify-send] -invisible=false - -[urgency=critical] -default-timeout=0 diff --git a/themes/kanagawa/preview.png b/themes/kanagawa/preview.png new file mode 100644 index 0000000000..db3ab75a9b Binary files /dev/null and b/themes/kanagawa/preview.png differ diff --git a/themes/kanagawa/vscode.json b/themes/kanagawa/vscode.json new file mode 100644 index 0000000000..91f7539609 --- /dev/null +++ b/themes/kanagawa/vscode.json @@ -0,0 +1,4 @@ +{ + "name": "Kanagawa", + "extension": "qufiwefefwoyn.kanagawa" +} diff --git a/themes/matte-black/backgrounds/0-ship-at-sea.jpg b/themes/matte-black/backgrounds/0-ship-at-sea.jpg new file mode 100644 index 0000000000..4375ee2bdd Binary files /dev/null and b/themes/matte-black/backgrounds/0-ship-at-sea.jpg differ diff --git a/themes/matte-black/backgrounds/2-matte-black-hands.jpg b/themes/matte-black/backgrounds/2-matte-black-hands.jpg new file mode 100644 index 0000000000..b76792cb81 Binary files /dev/null and b/themes/matte-black/backgrounds/2-matte-black-hands.jpg differ diff --git a/themes/matte-black/ghostty.conf b/themes/matte-black/ghostty.conf new file mode 100644 index 0000000000..85c69b1528 --- /dev/null +++ b/themes/matte-black/ghostty.conf @@ -0,0 +1,28 @@ +background = #121212 +foreground = #BEBEBE + +cursor-color = #EAEAEA +cursor-text = #121212 + +selection-background = #333333 +selection-foreground = #EAEAEA + +# normal colors +palette = 0=#333333 +palette = 1=#D35F5F +palette = 2=#FFC107 +palette = 3=#B91C1C +palette = 4=#E68E0D +palette = 5=#D35F5F +palette = 6=#BEBEBE +palette = 7=#BEBEBE + +# bright colors +palette = 8=#8A8A8D +palette = 9=#B91C1C +palette = 10=#FFC107 +palette = 11=#B90A0A +palette = 12=#F59E0B +palette = 13=#B91C1C +palette = 14=#EAEAEA +palette = 15=#FFFFFF diff --git a/themes/matte-black/hyprland.conf b/themes/matte-black/hyprland.conf index bb90b38453..4fd7ff6043 100644 --- a/themes/matte-black/hyprland.conf +++ b/themes/matte-black/hyprland.conf @@ -1,3 +1,9 @@ +$activeBorderColor = rgb(8A8A8D) + general { - col.active_border = rgb(8A8A8D) + col.active_border = $activeBorderColor +} + +group { + col.border_active = $activeBorderColor } diff --git a/themes/matte-black/kitty.conf b/themes/matte-black/kitty.conf new file mode 100644 index 0000000000..b5ee1da103 --- /dev/null +++ b/themes/matte-black/kitty.conf @@ -0,0 +1,54 @@ +## name: Matte Black + +foreground #bebebe +background #121212 +selection_foreground #121212 +selection_background #333333 + +cursor #eaeaea +cursor_text_color #121212 + +# URL underline color when hovering with mouse +url_color #bebebe + +# Kitty window border colors +active_border_color #595959 +inactive_border_color #595959 +bell_border_color #595959 + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #bebebe +active_tab_background #121212 +inactive_tab_foreground #bebebe +inactive_tab_background #121212 +tab_bar_background #bebebe + +# Colors for marks (marked text in the terminal) +mark1_foreground #121212 +mark1_background #404040 +mark2_foreground #121212 +mark2_background #121212 +mark3_foreground #121212 +mark3_background #a6a6a6 + +color0 #333333 +color8 #8a8a8d +color1 #D35F5F +color9 #B91C1C +color2 #FFC107 +color10 #FFC107 +color3 #b91c1c +color11 #b90a0a +color4 #e68e0d +color12 #f59e0b +color5 #D35F5F +color13 #B91C1C +color6 #bebebe +color14 #eaeaea +color7 #bebebe +color15 #ffffff + diff --git a/themes/matte-black/mako.ini b/themes/matte-black/mako.ini index 1af552ef83..0515363c05 100644 --- a/themes/matte-black/mako.ini +++ b/themes/matte-black/mako.ini @@ -1,24 +1,5 @@ +include=~/.local/share/omarchy/default/mako/core.ini + text-color=#8a8a8d border-color=#8A8A8D background-color=#1e1e1e -width=420 -height=110 -padding=10 -border-size=2 -font=Liberation Sans 11 -anchor=top-right -outer-margin=20 -default-timeout=5000 -max-icon-size=32 - -[app-name=Spotify] -invisible=1 - -[mode=do-not-disturb] -invisible=true - -[mode=do-not-disturb app-name=notify-send] -invisible=false - -[urgency=critical] -default-timeout=0 diff --git a/themes/matte-black/preview.png b/themes/matte-black/preview.png new file mode 100644 index 0000000000..3aff6390ba Binary files /dev/null and b/themes/matte-black/preview.png differ diff --git a/themes/matte-black/swayosd.css b/themes/matte-black/swayosd.css index 3f24dbb48b..b00ea2f55d 100644 --- a/themes/matte-black/swayosd.css +++ b/themes/matte-black/swayosd.css @@ -1,6 +1,6 @@ @define-color background-color #121212; -@define-color border-color #8A8A8D; -@define-color label #8A8A8D; -@define-color image #8A8A8D; -@define-color progress #8A8A8D; +@define-color border-color #CCCCCC; +@define-color label #CCCCCC; +@define-color image #CCCCCC; +@define-color progress #CCCCCC; diff --git a/themes/matte-black/vscode.json b/themes/matte-black/vscode.json new file mode 100644 index 0000000000..7786fc7904 --- /dev/null +++ b/themes/matte-black/vscode.json @@ -0,0 +1,4 @@ +{ + "name": "Matte Black", + "extension": "TahaYVR.matteblack" +} diff --git a/themes/nord/ghostty.conf b/themes/nord/ghostty.conf new file mode 100644 index 0000000000..a93dbc9e86 --- /dev/null +++ b/themes/nord/ghostty.conf @@ -0,0 +1 @@ +theme = Nord diff --git a/themes/nord/hyprland.conf b/themes/nord/hyprland.conf index bce729fe00..ac91e8bbc7 100644 --- a/themes/nord/hyprland.conf +++ b/themes/nord/hyprland.conf @@ -1,3 +1,9 @@ +$activeBorderColor = rgb(D8DEE9) + general { - col.active_border = rgb(D8DEE9) + col.active_border = $activeBorderColor +} + +group { + col.border_active = $activeBorderColor } diff --git a/themes/nord/kitty.conf b/themes/nord/kitty.conf new file mode 100644 index 0000000000..91b570ffc8 --- /dev/null +++ b/themes/nord/kitty.conf @@ -0,0 +1,40 @@ +# Nord Colorscheme for Kitty + +foreground #D8DEE9 +background #2E3440 +selection_foreground #000000 +selection_background #FFFACD +url_color #0087BD +cursor #81A1C1 + +# black +color0 #3B4252 +color8 #4C566A + +# red +color1 #BF616A +color9 #BF616A + +# green +color2 #A3BE8C +color10 #A3BE8C + +# yellow +color3 #EBCB8B +color11 #EBCB8B + +# blue +color4 #81A1C1 +color12 #81A1C1 + +# magenta +color5 #B48EAD +color13 #B48EAD + +# cyan +color6 #88C0D0 +color14 #8FBCBB + +# white +color7 #E5E9F0 +color15 #ECEFF4 diff --git a/themes/nord/mako.ini b/themes/nord/mako.ini index 8c3c3193e8..5eaadd9abd 100644 --- a/themes/nord/mako.ini +++ b/themes/nord/mako.ini @@ -1,24 +1,5 @@ +include=~/.local/share/omarchy/default/mako/core.ini + text-color=#d8dee9 border-color=#D8DEE9 background-color=#2e3440 -width=420 -height=110 -padding=10 -border-size=2 -font=Liberation Sans 11 -anchor=top-right -outer-margin=20 -default-timeout=5000 -max-icon-size=32 - -[app-name=Spotify] -invisible=1 - -[mode=do-not-disturb] -invisible=true - -[mode=do-not-disturb app-name=notify-send] -invisible=false - -[urgency=critical] -default-timeout=0 diff --git a/themes/nord/preview.png b/themes/nord/preview.png new file mode 100644 index 0000000000..07a1692b1b Binary files /dev/null and b/themes/nord/preview.png differ diff --git a/themes/nord/vscode.json b/themes/nord/vscode.json new file mode 100644 index 0000000000..897b8ba163 --- /dev/null +++ b/themes/nord/vscode.json @@ -0,0 +1,4 @@ +{ + "name": "Nord", + "extension": "arcticicestudio.nord-visual-studio-code" +} diff --git a/themes/osaka-jade/alacritty.toml b/themes/osaka-jade/alacritty.toml index 6229daa0b6..3cb8513a4c 100644 --- a/themes/osaka-jade/alacritty.toml +++ b/themes/osaka-jade/alacritty.toml @@ -16,7 +16,7 @@ white = "#F6F5DD" [colors.bright] black = "#53685B" red = "#db9f9c" -green = "#143614" +green = "#63b07a" yellow = "#E5C736" blue = "#ACD4CF" magenta = "#75bbb3" diff --git a/themes/osaka-jade/ghostty.conf b/themes/osaka-jade/ghostty.conf new file mode 100644 index 0000000000..75eb66858f --- /dev/null +++ b/themes/osaka-jade/ghostty.conf @@ -0,0 +1,25 @@ +# primary +background = #111c18 +foreground = #C1C497 +cursor-color = #D7C995 +cursor-text = #000000 + +# normal colors +palette = 0=#23372B +palette = 1=#FF5345 +palette = 2=#549e6a +palette = 3=#459451 +palette = 4=#509475 +palette = 5=#D2689C +palette = 6=#2DD5B7 +palette = 7=#F6F5DD + +# bright colors +palette = 8=#53685B +palette = 9=#db9f9c +palette = 10=#63b07a +palette = 11=#E5C736 +palette = 12=#ACD4CF +palette = 13=#75bbb3 +palette = 14=#8CD3CB +palette = 15=#9eebb3 diff --git a/themes/osaka-jade/hyprland.conf b/themes/osaka-jade/hyprland.conf index 1b8b0a9ba8..fd7c036353 100644 --- a/themes/osaka-jade/hyprland.conf +++ b/themes/osaka-jade/hyprland.conf @@ -1,4 +1,9 @@ -# focus window color (border) +$activeBorderColor = rgb(71CEAD) + general { - col.active_border = rgb(71CEAD) + col.active_border = $activeBorderColor +} + +group { + col.border_active = $activeBorderColor } diff --git a/themes/osaka-jade/kitty.conf b/themes/osaka-jade/kitty.conf new file mode 100644 index 0000000000..cd6c84e551 --- /dev/null +++ b/themes/osaka-jade/kitty.conf @@ -0,0 +1,44 @@ +## name :osaka-jade +foreground #C1C497 +background #111C18 +selection_foreground #111C18 +selection_background #C1C497 +cursor #D7C995 +cursor_text_color #000000 +active_tab_foreground #111C18 +active_tab_background #C1C497 +inactive_tab_foreground #C1C497 +inactive_tab_background #111C18 + +# black +color0 #23372B +color8 #53685B + +# red +color1 #FF5345 +color9 #DB9F9C + +# green +color2 #549E6A +color10 #63b07a + +# yellow +color3 #459451 +color11 #E5C736 + +# blue +color4 #509475 +color12 #ACD4CF + +# magenta +color5 #D2689C +color13 #75BBB3 + +# cyan +color6 #2DD5B7 +color14 #8CD3CB + +# white +color7 #F6F5DD +color15 #9EEBB3 + diff --git a/themes/osaka-jade/mako.ini b/themes/osaka-jade/mako.ini index c45635dea3..22fe2aae27 100644 --- a/themes/osaka-jade/mako.ini +++ b/themes/osaka-jade/mako.ini @@ -1,24 +1,5 @@ +include=~/.local/share/omarchy/default/mako/core.ini + text-color=#C1C497 border-color=#214237 background-color=#11221C -width=420 -height=110 -padding=10 -border-size=2 -font=Liberation Sans 12 -anchor=top-right -outer-margin=5 -default-timeout=5000 -max-icon-size=32 - -[app-name=Spotify] -invisible=1 - -[mode=do-not-disturb] -invisible=true - -[mode=do-not-disturb app-name=notify-send] -invisible=false - -[urgency=critical] -default-timeout=0 diff --git a/themes/osaka-jade/neovim.lua b/themes/osaka-jade/neovim.lua index b2bd3f2073..30afe40097 100644 --- a/themes/osaka-jade/neovim.lua +++ b/themes/osaka-jade/neovim.lua @@ -1,9 +1,12 @@ return { - "ribru17/bamboo.nvim", - lazy = false, - priority = 1000, - config = function() - require("bamboo").setup({}) - require("bamboo").load() - end, + { + "ribru17/bamboo.nvim", + priority = 1000, + }, + { + "LazyVim/LazyVim", + opts = { + colorscheme = "bamboo", + }, + }, } diff --git a/themes/osaka-jade/preview.png b/themes/osaka-jade/preview.png new file mode 100644 index 0000000000..4b446055f4 Binary files /dev/null and b/themes/osaka-jade/preview.png differ diff --git a/themes/osaka-jade/vscode.json b/themes/osaka-jade/vscode.json new file mode 100644 index 0000000000..efe2d63b68 --- /dev/null +++ b/themes/osaka-jade/vscode.json @@ -0,0 +1,4 @@ +{ + "name": "Ocean Green: Dark", + "extension": "jovejonovski.ocean-green" +} diff --git a/themes/ristretto/alacritty.toml b/themes/ristretto/alacritty.toml index c716798a2c..45236efd35 100644 --- a/themes/ristretto/alacritty.toml +++ b/themes/ristretto/alacritty.toml @@ -22,7 +22,7 @@ white = "#f1e5e7" [colors.cursor] cursor = '#c3b7b8' -text = '#c3b7b8' +text = '#2c2525' [colors.primary] background = '#2c2525' diff --git a/themes/ristretto/ghostty.conf b/themes/ristretto/ghostty.conf new file mode 100644 index 0000000000..94a80fcbb6 --- /dev/null +++ b/themes/ristretto/ghostty.conf @@ -0,0 +1,2 @@ +theme = Monokai Pro Ristretto +cursor-text = #000000 diff --git a/themes/ristretto/hyprland.conf b/themes/ristretto/hyprland.conf index d81a993b3d..d8ffcdb9a0 100644 --- a/themes/ristretto/hyprland.conf +++ b/themes/ristretto/hyprland.conf @@ -1,4 +1,9 @@ +$activeBorderColor = rgb(e6d9db) + general { - # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors - col.active_border = rgb(e6d9db) + col.active_border = $activeBorderColor +} + +group { + col.border_active = $activeBorderColor } diff --git a/themes/ristretto/kitty.conf b/themes/ristretto/kitty.conf new file mode 100644 index 0000000000..7640e7cc7e --- /dev/null +++ b/themes/ristretto/kitty.conf @@ -0,0 +1,53 @@ +## name : Ristretto + +foreground #e6d9db +background #2c2525 + +selection_foreground #e6d9db +selection_background #403e41 + +cursor #c3b7b8 +cursor_text_color #c3b7b8 + +url_color #e6d9db + +active_border_color #e6d9db +inactive_border_color #595959 +bell_border_color #595959 + +active_tab_foreground #2c2525 +active_tab_background #f9cc6c +inactive_tab_foreground #e6d9db +inactive_tab_background #2c2525 +tab_bar_background #404040 + +mark1_foreground #2c2525 +mark1_background #404040 +mark2_foreground #2c2525 +mark2_background #2c2525 +mark3_foreground #2c2525 +mark3_background #a6a6a6 + +color0 #72696a +color8 #948a8b + +color1 #fd6883 +color9 #ff8297 + +color2 #adda78 +color10 #c8e292 + +color3 #f9cc6c +color11 #fcd675 + +color4 #f38d70 +color12 #f8a788 + +color5 #a8a9eb +color13 #bebffd + +color6 #85dacc +color14 #9bf1e1 + +color7 #e6d9db +color15 #f1e5e7 diff --git a/themes/ristretto/mako.ini b/themes/ristretto/mako.ini index 7af1812b0a..732a96df91 100644 --- a/themes/ristretto/mako.ini +++ b/themes/ristretto/mako.ini @@ -1,24 +1,5 @@ +include=~/.local/share/omarchy/default/mako/core.ini + text-color=#e6d9db border-color=#e6d9db background-color=#2c2525 -width=420 -height=110 -padding=10 -border-size=2 -font=Liberation Sans 11 -anchor=top-right -outer-margin=20 -default-timeout=5000 -max-icon-size=32 - -[app-name=Spotify] -invisible=1 - -[mode=do-not-disturb] -invisible=true - -[mode=do-not-disturb app-name=notify-send] -invisible=false - -[urgency=critical] -default-timeout=0 diff --git a/themes/ristretto/neovim.lua b/themes/ristretto/neovim.lua index 38959d4707..4263da701f 100644 --- a/themes/ristretto/neovim.lua +++ b/themes/ristretto/neovim.lua @@ -8,14 +8,14 @@ return { return { NonText = { fg = "#948a8b" }, MiniIconsGrey = { fg = "#948a8b" }, - MiniIconsRed = { fg = "#fd6883" }, - MiniIconsBlue = { fg = "#85dacc" }, - MiniIconsGreen = { fg = "#adda78" }, - MiniIconsYellow = { fg = "#f9cc6c" }, - MiniIconsOrange = { fg = "#f38d70" }, - MiniIconsPurple = { fg = "#a8a9eb" }, - MiniIconsAzure = { fg = "#a8a9eb" }, - MiniIconsCyan = { fg = "#85dacc" }, -- same value as MiniIconsBlue for consistency + MiniIconsRed = { fg = "#fd6883" }, + MiniIconsBlue = { fg = "#85dacc" }, + MiniIconsGreen = { fg = "#adda78" }, + MiniIconsYellow = { fg = "#f9cc6c" }, + MiniIconsOrange = { fg = "#f38d70" }, + MiniIconsPurple = { fg = "#a8a9eb" }, + MiniIconsAzure = { fg = "#a8a9eb" }, + MiniIconsCyan = { fg = "#85dacc" }, -- same value as MiniIconsBlue for consistency } end, }) diff --git a/themes/ristretto/preview.png b/themes/ristretto/preview.png new file mode 100644 index 0000000000..e138d51ea4 Binary files /dev/null and b/themes/ristretto/preview.png differ diff --git a/themes/ristretto/vscode.json b/themes/ristretto/vscode.json new file mode 100644 index 0000000000..41a587e1fd --- /dev/null +++ b/themes/ristretto/vscode.json @@ -0,0 +1,4 @@ +{ + "name": "Monokai Pro (Filter Ristretto)", + "extension": "monokai.theme-monokai-pro-vscode" +} diff --git a/themes/rose-pine/ghostty.conf b/themes/rose-pine/ghostty.conf new file mode 100644 index 0000000000..33bbaa7415 --- /dev/null +++ b/themes/rose-pine/ghostty.conf @@ -0,0 +1 @@ +theme = Rose Pine Dawn diff --git a/themes/rose-pine/hyprland.conf b/themes/rose-pine/hyprland.conf index ae0f2b6bf1..34d47643b1 100644 --- a/themes/rose-pine/hyprland.conf +++ b/themes/rose-pine/hyprland.conf @@ -1,3 +1,9 @@ +$activeBorderColor = rgb(575279) + general { - col.active_border = rgb(575279) + col.active_border = $activeBorderColor +} + +group { + col.border_active = $activeBorderColor } diff --git a/themes/rose-pine/kitty.conf b/themes/rose-pine/kitty.conf new file mode 100644 index 0000000000..6c021dcaf1 --- /dev/null +++ b/themes/rose-pine/kitty.conf @@ -0,0 +1,51 @@ +## name: Rose-Pine + +foreground #575279 +background #faf4ed + +selection_foreground #575279 +selection_background #dfdad9 + +cursor #cecacd +cursor_text_color #575279 + +url_color #575279 + +active_border_color #595959 +inactive_border_color #595959 +bell_border_color #595959 + +active_tab_foreground #575279 +active_tab_background #fffaf3 +inactive_tab_foreground #575279 +inactive_tab_background #fffaf3 +tab_bar_background #575279 + +mark1_foreground #faf4ed +mark1_background #fffaf3 +mark2_foreground #9893a5 +mark2_background #fffaf3 + +color0 #f2e9e1 +color8 #9893a5 + +color1 #b4637a +color9 #b4637a + +color2 #286983 +color10 #286983 + +color3 #ea9d34 +color11 #ea9d34 + +color4 #56949f +color12 #56949f + +color5 #907aa9 +color13 #907aa9 + +color6 #d7827e +color14 #d7827e + +color7 #575279 +color15 #575279 diff --git a/themes/rose-pine/mako.ini b/themes/rose-pine/mako.ini index 65aef345c8..f2284fc8c3 100644 --- a/themes/rose-pine/mako.ini +++ b/themes/rose-pine/mako.ini @@ -1,24 +1,5 @@ +include=~/.local/share/omarchy/default/mako/core.ini + text-color=#575279 border-color=#575279 background-color=#faf4ed -width=420 -height=110 -padding=10 -border-size=2 -font=Liberation Sans 11 -anchor=top-right -outer-margin=20 -default-timeout=5000 -max-icon-size=32 - -[app-name=Spotify] -invisible=1 - -[mode=do-not-disturb] -invisible=true - -[mode=do-not-disturb app-name=notify-send] -invisible=false - -[urgency=critical] -default-timeout=0 diff --git a/themes/rose-pine/preview.png b/themes/rose-pine/preview.png new file mode 100644 index 0000000000..70392181bf Binary files /dev/null and b/themes/rose-pine/preview.png differ diff --git a/themes/rose-pine/vscode.json b/themes/rose-pine/vscode.json new file mode 100644 index 0000000000..07e0050d86 --- /dev/null +++ b/themes/rose-pine/vscode.json @@ -0,0 +1,4 @@ +{ + "name": "Rosé Pine Dawn", + "extension": "mvllow.rose-pine" +} diff --git a/themes/tokyo-night/ghostty.conf b/themes/tokyo-night/ghostty.conf new file mode 100644 index 0000000000..845659fbdd --- /dev/null +++ b/themes/tokyo-night/ghostty.conf @@ -0,0 +1 @@ +theme = TokyoNight diff --git a/themes/tokyo-night/hyprland.conf b/themes/tokyo-night/hyprland.conf index f0b824a162..779a27d414 100644 --- a/themes/tokyo-night/hyprland.conf +++ b/themes/tokyo-night/hyprland.conf @@ -1,4 +1,10 @@ +$activeBorderColor = rgba(33ccffee) rgba(00ff99ee) 45deg + general { - col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg + col.active_border = $activeBorderColor +} + +group { + col.border_active = $activeBorderColor } diff --git a/themes/tokyo-night/kitty.conf b/themes/tokyo-night/kitty.conf new file mode 100644 index 0000000000..37a5bd2704 --- /dev/null +++ b/themes/tokyo-night/kitty.conf @@ -0,0 +1,48 @@ +## name: Tokyo Night +## license: MIT +## author: Folke Lemaitre +## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_night.conf + + +background #1a1b26 +foreground #c0caf5 +selection_background #283457 +selection_foreground #c0caf5 +url_color #73daca +cursor #c0caf5 +cursor_text_color #1a1b26 + +# Tabs +active_tab_background #7aa2f7 +active_tab_foreground #16161e +inactive_tab_background #292e42 +inactive_tab_foreground #545c7e +#tab_bar_background #15161e + +# Windows +active_border_color #7aa2f7 +inactive_border_color #292e42 + +# normal +color0 #15161e +color1 #f7768e +color2 #9ece6a +color3 #e0af68 +color4 #7aa2f7 +color5 #bb9af7 +color6 #7dcfff +color7 #a9b1d6 + +# bright +color8 #414868 +color9 #f7768e +color10 #9ece6a +color11 #e0af68 +color12 #7aa2f7 +color13 #bb9af7 +color14 #7dcfff +color15 #c0caf5 + +# extended colors +color16 #ff9e64 +color17 #db4b4b diff --git a/themes/tokyo-night/mako.ini b/themes/tokyo-night/mako.ini index bf76a33be8..b1649be184 100644 --- a/themes/tokyo-night/mako.ini +++ b/themes/tokyo-night/mako.ini @@ -1,24 +1,5 @@ -text-color=#a9b1d6 +include=~/.local/share/omarchy/default/mako/core.ini + +text-color=#c0caf5 border-color=#33ccff background-color=#1a1b26 -width=420 -height=110 -padding=10 -border-size=2 -font=Liberation Sans 11 -anchor=top-right -outer-margin=20 -default-timeout=5000 -max-icon-size=32 - -[app-name=Spotify] -invisible=1 - -[mode=do-not-disturb] -invisible=true - -[mode=do-not-disturb app-name=notify-send] -invisible=false - -[urgency=critical] -default-timeout=0 diff --git a/themes/tokyo-night/neovim.lua b/themes/tokyo-night/neovim.lua index dad2d30baf..39327c9b4c 100644 --- a/themes/tokyo-night/neovim.lua +++ b/themes/tokyo-night/neovim.lua @@ -1,8 +1,12 @@ return { + { + "folke/tokyonight.nvim", + priority = 1000, + }, { "LazyVim/LazyVim", opts = { - colorscheme = "tokyonight", + colorscheme = "tokyonight-night", }, }, } diff --git a/themes/tokyo-night/preview.png b/themes/tokyo-night/preview.png new file mode 100644 index 0000000000..8dab01d484 Binary files /dev/null and b/themes/tokyo-night/preview.png differ diff --git a/themes/tokyo-night/vscode.json b/themes/tokyo-night/vscode.json new file mode 100644 index 0000000000..89af98c17e --- /dev/null +++ b/themes/tokyo-night/vscode.json @@ -0,0 +1,4 @@ +{ + "name": "Tokyo Night", + "extension": "enkia.tokyo-night" +} diff --git a/version b/version new file mode 100644 index 0000000000..be94e6f53d --- /dev/null +++ b/version @@ -0,0 +1 @@ +3.2.2