diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..625c576e --- /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 index ae5d17d4..9619e450 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -1,5 +1,5 @@ name: Bug -description: Report a problem +description: Report a validated bug -- NOT FOR SUPPORT REQUESTS labels: [bug] body: - type: markdown @@ -19,5 +19,6 @@ body: 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 index 3ba13e0c..2e9a3140 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1 +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/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml deleted file mode 100644 index 33edaeab..00000000 --- a/.github/ISSUE_TEMPLATE/documentation.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Documentation -description: New pages or changes to existing -labels: [documentation] -body: - - type: markdown - attributes: - value: | - Remember: Omarchy is an open source gift, not a product you bought from a vendor - - - type: textarea - id: steps - attributes: - label: What correction or addition do we need? - validations: - required: true diff --git a/.github/ISSUE_TEMPLATE/enhancement.yml b/.github/ISSUE_TEMPLATE/enhancement.yml deleted file mode 100644 index b640c39f..00000000 --- a/.github/ISSUE_TEMPLATE/enhancement.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Enhancement -description: Feature or change -labels: [enhancement] -body: - - type: markdown - attributes: - value: | - Remember: Omarchy is an open source gift, not a product you bought from a vendor - - - type: textarea - id: steps - attributes: - label: What do you need? - validations: - required: true diff --git a/README.md b/README.md index b76136b2..a630d13c 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 00000000..e1e3e173 --- /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 00000000..e1e3e173 --- /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 00000000..e1e3e173 --- /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 00000000..e1e3e173 --- /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 00000000..e1e3e173 --- /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 00000000..e1e3e173 --- /dev/null +++ b/applications/hidden/jshell-java-openjdk.desktop @@ -0,0 +1,2 @@ +[Desktop Entry] +Hidden=true diff --git a/applications/icons/ChatGPT.png b/applications/icons/ChatGPT.png index cc68d786..9907eaf8 100644 Binary files a/applications/icons/ChatGPT.png and b/applications/icons/ChatGPT.png differ diff --git a/applications/icons/GitHub.png b/applications/icons/GitHub.png index f3248e4f..5a4295c2 100644 Binary files a/applications/icons/GitHub.png and b/applications/icons/GitHub.png differ diff --git a/applications/icons/X.png b/applications/icons/X.png index 99131def..22fe6987 100644 Binary files a/applications/icons/X.png and b/applications/icons/X.png differ diff --git a/applications/icons/windows.png b/applications/icons/windows.png new file mode 100644 index 00000000..ce7b366d 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 ed118590..00000000 --- a/applications/nvim.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Name=Neovim -GenericName=Text Editor -Comment=Edit text files -Exec=$TERMINAL --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 00000000..fa7bdfe2 --- /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 fd16afb1..84c42974 100755 --- a/bin/omarchy-battery-monitor +++ b/bin/omarchy-battery-monitor @@ -4,33 +4,20 @@ BATTERY_THRESHOLD=10 NOTIFICATION_FLAG="/run/user/$UID/omarchy_battery_notified" - -get_battery_percentage() { - upower -i "$(upower -e | grep 'BAT')" \ - | awk -F: '/percentage/ { - gsub(/[%[:space:]]/, "", $2); - val=$2; - printf("%d\n", (val+0.5)) - exit - }' -} - -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 00000000..855b4c6b --- /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 00000000..a6af4fa3 --- /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 00000000..653d3bb3 --- /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 e611e8b7..7ba3d20a 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 63ce7a1e..d73205c3 100755 --- a/bin/omarchy-cmd-audio-switch +++ b/bin/omarchy-cmd-audio-switch @@ -23,7 +23,13 @@ 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') diff --git a/bin/omarchy-cmd-first-run b/bin/omarchy-cmd-first-run index f9b9d578..b400a584 100755 --- a/bin/omarchy-cmd-first-run +++ b/bin/omarchy-cmd-first-run @@ -8,10 +8,13 @@ if [[ -f "$FIRST_RUN_MODE" ]]; then rm -f "$FIRST_RUN_MODE" 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/wifi.sh" bash "$OMARCHY_PATH/install/first-run/welcome.sh" + bash "$OMARCHY_PATH/install/first-run/wifi.sh" fi diff --git a/bin/omarchy-cmd-reboot b/bin/omarchy-cmd-reboot new file mode 100755 index 00000000..c1f6472d --- /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 29fda33d..ec243ddb 100755 --- a/bin/omarchy-cmd-screenrecord +++ b/bin/omarchy-cmd-screenrecord @@ -8,31 +8,92 @@ if [[ ! -d "$OUTPUT_DIR" ]]; then exit 1 fi -# Selects region or output -SCOPE="$1" +DESKTOP_AUDIO="false" +MICROPHONE_AUDIO="false" +WEBCAM="false" +STOP_RECORDING="false" -# Selects audio inclusion or not -AUDIO=$([[ $2 == "audio" ]] && echo "--audio") +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() { - filename="$OUTPUT_DIR/screenrecording-$(date +'%Y-%m-%d_%H-%M-%S').mp4" + local filename="$OUTPUT_DIR/screenrecording-$(date +'%Y-%m-%d_%H-%M-%S').mp4" + local audio_devices="" + local audio_args="" - if lspci | grep -qi 'nvidia'; then - wf-recorder $AUDIO -f "$filename" -c libx264 -p crf=23 -p preset=medium -p movflags=+faststart "$@" & - else - wl-screenrec $AUDIO -f "$filename" --ffmpeg-encoder-options="-c:v libx264 -crf 23 -preset medium -movflags +faststart" "$@" & + [[ "$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 + [[ -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 -x wl-screenrec - pkill -x wf-recorder + pkill -SIGINT -f "^gpu-screen-recorder" # SIGINT required to save video properly - notify-send "Screen recording saved to $OUTPUT_DIR" -t 2000 + # 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 - sleep 0.2 # ensures the process is actually dead before we check + if pgrep -f "^gpu-screen-recorder" >/dev/null; then + pkill -9 -f "^gpu-screen-recorder" + cleanup_webcam + notify-send "Screen recording error" "Recording process had to be force-killed. Video may be corrupted." -u critical -t 5000 + else + cleanup_webcam + notify-send "Screen recording saved to $OUTPUT_DIR" -t 2000 + fi toggle_screenrecording_indicator } @@ -41,14 +102,19 @@ toggle_screenrecording_indicator() { } screenrecording_active() { - pgrep -x wl-screenrec >/dev/null || pgrep -x wf-recorder >/dev/null + pgrep -f "^gpu-screen-recorder" >/dev/null || pgrep -f "WebcamOverlay" >/dev/null } if screenrecording_active; then - stop_screenrecording -elif [[ "$SCOPE" == "output" ]]; then - start_screenrecording + 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 - start_screenrecording -g "$region" + exit 1 fi diff --git a/bin/omarchy-cmd-screensaver b/bin/omarchy-cmd-screensaver index e336c8b0..d17ff55b 100755 --- a/bin/omarchy-cmd-screensaver +++ b/bin/omarchy-cmd-screensaver @@ -1,28 +1,30 @@ #!/bin/bash screensaver_in_focus() { - hyprctl activewindow -j | jq -e '.class == "Screensaver"' >/dev/null 2>&1 + 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 "alacritty --class Screensaver" 2>/dev/null + pkill -f org.omarchy.screensaver 2>/dev/null exit 0 } trap exit_screensaver SIGINT SIGTERM SIGHUP SIGQUIT -hyprctl keyword cursor:invisible true +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 3 || ! screensaver_in_focus; then + if read -n 1 -t 1 || ! screensaver_in_focus; then exit_screensaver fi done diff --git a/bin/omarchy-cmd-screenshot b/bin/omarchy-cmd-screenshot index 330dde3b..f4450f89 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-shutdown b/bin/omarchy-cmd-shutdown new file mode 100755 index 00000000..cd5748ed --- /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 2d3cd0ce..b651148d 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 || echo "$HOME" + 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 eb39bf0a..00000000 --- a/bin/omarchy-cmd-tzupdate +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -notify-send " Updating time and timezone..." -sudo systemctl restart systemd-timesyncd -sudo tzupdate -new_timezone=$(timedatectl show -p Timezone --value) -omarchy-restart-waybar -notify-send " Time updated and timezone set to $new_timezone" diff --git a/bin/omarchy-debug b/bin/omarchy-debug new file mode 100755 index 00000000..05c35df8 --- /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-font-set b/bin/omarchy-font-set index 5ac0ef4b..d8f19742 100755 --- a/bin/omarchy-font-set +++ b/bin/omarchy-font-set @@ -18,6 +18,7 @@ if [[ -n "$font_name" && "$font_name" != "CNCLD" ]]; then 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 \ @@ -27,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 00000000..30b7b1f6 --- /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 00000000..d1e8ef3c --- /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 00000000..f7882305 --- /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-dev-env b/bin/omarchy-install-dev-env index a1329a91..ca9925a0 100755 --- a/bin/omarchy-install-dev-env +++ b/bin/omarchy-install-dev-env @@ -50,6 +50,7 @@ ruby) 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" ;; diff --git a/bin/omarchy-install-docker-dbs b/bin/omarchy-install-docker-dbs index f7b624ad..658a2b08 100755 --- a/bin/omarchy-install-docker-dbs +++ b/bin/omarchy-install-docker-dbs @@ -1,9 +1,9 @@ #!/bin/bash -options=("MySQL" "PostgreSQL" "Redis" "MongoDB" "MariaDB") +options=("MySQL" "PostgreSQL" "Redis" "MongoDB" "MariaDB" "MSSQL") if [[ "$#" -eq 0 ]]; then - choices=$(printf "%s\n" "${options[@]}" | gum choose --header "Select databases (space to select, return to install, esc to cancel)") || main_menu + choices=$(printf "%s\n" "${options[@]}" | gum choose --header "Select database (return to install, esc to cancel)") || main_menu else choices="$@" fi @@ -16,6 +16,7 @@ if [[ -n "$choices" ]]; then 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 diff --git a/bin/omarchy-install-dropbox b/bin/omarchy-install-dropbox index ac5710c8..7473e9e8 100755 --- a/bin/omarchy-install-dropbox +++ b/bin/omarchy-install-dropbox @@ -4,5 +4,5 @@ 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 & -echo "See Dropbox icon behind  hover tray in top right and right-click for setup." +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 75333700..a5764bb4 100755 --- a/bin/omarchy-install-steam +++ b/bin/omarchy-install-steam @@ -1,5 +1,7 @@ #!/bin/bash +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 index 68285068..e962f3f3 100755 --- a/bin/omarchy-install-terminal +++ b/bin/omarchy-install-terminal @@ -7,13 +7,53 @@ 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 -omarchy-pkg-add $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= -# Set as default terminal -echo "Setting $package as new default terminal..." -sed -i "/export TERMINAL=/ c\export TERMINAL=$package" ~/.config/uwsm/default +[Desktop Action New] +Name=New Terminal +Exec=alacritty +EOF + fi -# Relaunch is needed for new default to take effect -echo -gum confirm "Relaunch Hyprland to use new terminal?" && uwsm stop + # 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 00000000..4c5b036a --- /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 00000000..b50067b0 --- /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 index 00722221..135f4d79 100755 --- a/bin/omarchy-launch-about +++ b/bin/omarchy-launch-about @@ -1,3 +1,3 @@ #!/bin/bash -exec setsid uwsm app -- alacritty --class=Omarchy -o font.size=9 -e bash -c 'fastfetch; read -n 1 -s' +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 00000000..8eb823b7 --- /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 536e212c..d6ae00cb 100755 --- a/bin/omarchy-launch-browser +++ b/bin/omarchy-launch-browser @@ -9,4 +9,4 @@ else private_flag="--incognito" fi -exec setsid uwsm app -- "$browser_exec" "${@/--private/$private_flag}" +exec setsid uwsm-app -- "$browser_exec" "${@/--private/$private_flag}" diff --git a/bin/omarchy-launch-editor b/bin/omarchy-launch-editor index 157168a8..7597cfcc 100755 --- a/bin/omarchy-launch-editor +++ b/bin/omarchy-launch-editor @@ -1,10 +1,12 @@ #!/bin/bash -case "${EDITOR:-nvim}" in -nvim | vim | nano | micro | hx) - exec setsid uwsm app -- "$TERMINAL" -e "$EDITOR" "$@" +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" "$@" + 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 0529f2ae..cc779efd 100755 --- a/bin/omarchy-launch-floating-terminal-with-presentation +++ b/bin/omarchy-launch-floating-terminal-with-presentation @@ -1,4 +1,4 @@ #!/bin/bash cmd="$*" -exec setsid uwsm app -- alacritty --class=Omarchy --title=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 index a0075632..ce932fb7 100755 --- a/bin/omarchy-launch-or-focus +++ b/bin/omarchy-launch-or-focus @@ -6,11 +6,11 @@ if (($# == 0)); then fi WINDOW_PATTERN="$1" -LAUNCH_COMMAND="${2:-"uwsm app -- $WINDOW_PATTERN"}" +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 $LAUNCH_COMMAND + 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 00000000..8c9cdfcc --- /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 index c54159f5..aa56db73 100755 --- a/bin/omarchy-launch-or-focus-webapp +++ b/bin/omarchy-launch-or-focus-webapp @@ -1,8 +1,12 @@ #!/bin/bash if (($# == 0)); then - echo "Usage: omarchy-launch-or-focus-webapp [window-pattern] [url]" + echo "Usage: omarchy-launch-or-focus-webapp [window-pattern] [url-and-flags...]" exit 1 fi -exec omarchy-launch-or-focus "$1" "omarchy-launch-webapp '$2'" +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 f81b4cde..6fa5b2c4 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,15 +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 - # FIXME: Find a way to make this generic where we it can work for kitty + ghostty - 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 00000000..67440b2b --- /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 00000000..805da5c1 --- /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 0276d966..09a6fc30 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 index fe04f846..d942f680 100755 --- a/bin/omarchy-launch-wifi +++ b/bin/omarchy-launch-wifi @@ -1,3 +1,4 @@ #!/bin/bash -exec setsid uwsm app -- "$TERMINAL" --class=Impala -e impala "$@" +rfkill unblock wifi +omarchy-launch-or-focus-tui impala diff --git a/bin/omarchy-lock-screen b/bin/omarchy-lock-screen index cad6f814..b16c56a2 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 "$TERMINAL --class Screensaver" +pkill -f org.omarchy.screensaver diff --git a/bin/omarchy-menu b/bin/omarchy-menu index 0dd68ec1..b80d6178 100755 --- a/bin/omarchy-menu +++ b/bin/omarchy-menu @@ -29,15 +29,15 @@ 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() { @@ -104,27 +104,27 @@ show_capture_menu() { } 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 Region + Audio\n Display\n Display + Audio") in - *"Region + Audio"*) omarchy-cmd-screenrecord region audio ;; - *Region*) omarchy-cmd-screenrecord ;; - *"Display + Audio"*) omarchy-cmd-screenrecord output audio ;; - *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*) terminal bash -c "omarchy-cmd-share clipboard" ;; + *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 ;; @@ -154,16 +154,11 @@ show_style_menu() { } show_theme_menu() { - theme=$(menu "Theme" "$(omarchy-theme-list)" "" "$(omarchy-theme-current)") - if [[ "$theme" == "CNCLD" || -z "$theme" ]]; then - back_to show_style_menu - else - omarchy-theme-set "$theme" - fi + omarchy-launch-walker -m menus:omarchythemes --width 800 --minheight 400 } show_font_menu() { - theme=$(menu "Font" "$(omarchy-font-list)" "-w 350" "$(omarchy-font-current)") + theme=$(menu "Font" "$(omarchy-font-list)" "--width 350" "$(omarchy-font-current)") if [[ "$theme" == "CNCLD" || -z "$theme" ]]; then back_to show_style_menu else @@ -178,15 +173,9 @@ show_setup_menu() { options="$options\n Defaults\n󰱔 DNS\n Security\n Config" case $(menu "Setup" "$options") in - *Audio*) $TERMINAL --class=Wiremix -e wiremix ;; - *Wifi*) - rfkill unblock wifi - omarchy-launch-wifi - ;; - *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*) open_in_editor ~/.config/hypr/monitors.conf ;; *Keybindings*) open_in_editor ~/.config/hypr/bindings.conf ;; @@ -232,7 +221,7 @@ show_setup_security_menu() { } show_install_menu() { - case $(menu "Install" "󰣇 Package\n󰣇 AUR\n Web App\n TUI\n Service\n Style\n󰵮 Development\n Editor\n Terminal\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 ;; @@ -243,6 +232,7 @@ show_install_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 @@ -260,10 +250,10 @@ show_install_service_menu() { show_install_editor_menu() { case $(menu "Install" " VSCode\n Cursor\n Zed\n Sublime Text\n Helix\n Emacs") in - *VSCode*) install_and_launch "VSCode" "visual-studio-code-bin" "code" ;; + *VSCode*) present_terminal omarchy-install-vscode ;; *Cursor*) install_and_launch "Cursor" "cursor-bin" "cursor" ;; - *Zed*) install_and_launch "Zed" "zed" "dev.zed.Zed" ;; - *Sublime*) aur_install_and_launch "Sublime Text" "sublime-text-4" "sublime_text" ;; + *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 ;; @@ -286,10 +276,11 @@ show_install_ai_menu() { echo ollama ) - case $(menu "Install" "󱚤 Claude Code\n󱚤 Gemini [AUR]\n󱚤 OpenAI Codex [AUR]\n󱚤 LM Studio\n󱚤 Ollama\n󱚤 Crush\n󱚤 opencode") in + 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" ;; - *OpenAI*) aur_install "OpenAI Codex" "openai-codex-bin" ;; - *Gemini*) aur_install "Gemini" "gemini-cli" ;; + *Cursor*) install "Cursor CLI" "cursor-cli" ;; + *OpenAI*) install "OpenAI Codex" "openai-codex-bin" ;; + *Gemini*) install "Gemini" "gemini-cli" ;; *Studio*) install "LM Studio" "lmstudio" ;; *Ollama*) install "Ollama" $ollama_pkg ;; *Crush*) install "Crush" "crush-bin" ;; @@ -299,10 +290,11 @@ show_install_ai_menu() { } 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*) aur_install_and_launch "Minecraft [AUR]" "minecraft-launcher" "minecraft-launcher" ;; + *Minecraft*) install_and_launch "Minecraft" "minecraft-launcher" "minecraft-launcher" ;; + *Xbox*) present_terminal omarchy-install-xbox-controllers ;; *) show_install_menu ;; esac } @@ -317,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" ;; @@ -372,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 ;; @@ -384,26 +377,20 @@ show_remove_menu() { } show_update_menu() { - case $(menu "Update" " Omarchy\n Branch\n Config\n󰸌 Extra Themes\n Process\n󰇅 Hardware\n Password\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 ;; - *Branch*) show_update_branch_menu ;; *Config*) show_update_config_menu ;; *Themes*) present_terminal omarchy-theme-update ;; *Process*) show_update_process_menu ;; *Hardware*) show_update_hardware_menu ;; - *Timezone*) omarchy-cmd-tzupdate ;; + *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 } -show_update_branch_menu() { - case $(menu "Branch" "master\ndev" "" "$(omarchy-version-branch)") in - *master*) present_terminal "omarchy-update-branch master" ;; - *dev*) present_terminal "omarchy-update-branch dev" ;; - *) show_update_menu ;; - esac -} show_update_process_menu() { case $(menu "Restart" " Hypridle\n Hyprsunset\n Swayosd\n󰌧 Walker\n󰍜 Waybar") in *Hypridle*) omarchy-restart-hypridle ;; @@ -447,13 +434,12 @@ show_update_password_menu() { } 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 ;; + *Restart*) omarchy-cmd-reboot ;; + *Shutdown*) omarchy-cmd-shutdown ;; *) back_to show_main_menu ;; esac } diff --git a/bin/omarchy-menu-keybindings b/bin/omarchy-menu-keybindings index 1d1b40ac..39a9e0b6 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,11 +163,67 @@ parse_bindings() { }' } +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)) -dynamic_bindings | \ - sort -u | \ - parse_bindings | \ - walker --dmenu --theme keybindings -p 'Keybindings' -w 800 -h "$menu_height" +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-pkg-add b/bin/omarchy-pkg-add index 116435be..486a2f45 100755 --- a/bin/omarchy-pkg-add +++ b/bin/omarchy-pkg-add @@ -1,8 +1,14 @@ #!/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 - sudo pacman -S --noconfirm "$pkg" || exit 1 + echo -e "\033[31mError: Package '$pkg' did not install\033[0m" >&2 + exit 1 fi done diff --git a/bin/omarchy-pkg-aur-install b/bin/omarchy-pkg-aur-install index 41710e0e..da0d5884 100755 --- a/bin/omarchy-pkg-aur-install +++ b/bin/omarchy-pkg-aur-install @@ -3,7 +3,7 @@ fzf_args=( --multi --preview 'yay -Siia {1}' - --preview-label='alt-p: toggle description, alt-b/B: toggle PKGBUILD, alt-j/k: scroll, tab: multi-select, F11: maximize' + --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' diff --git a/bin/omarchy-pkg-ignored b/bin/omarchy-pkg-ignored deleted file mode 100755 index 765fe69c..00000000 --- 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 c654e17e..49f7b33b 100755 --- a/bin/omarchy-pkg-install +++ b/bin/omarchy-pkg-install @@ -3,7 +3,7 @@ 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' diff --git a/bin/omarchy-pkg-remove b/bin/omarchy-pkg-remove index 63c6147e..1da761f9 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' diff --git a/bin/omarchy-refresh-hyprland b/bin/omarchy-refresh-hyprland index 7c0a278b..1f1ab0cc 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 00000000..0e1bf7f2 --- /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 00000000..d9ab3d2a --- /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-pacman-mirrorlist b/bin/omarchy-refresh-pacman-mirrorlist deleted file mode 100755 index d0294909..00000000 --- a/bin/omarchy-refresh-pacman-mirrorlist +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist /etc/pacman.d/mirrorlist diff --git a/bin/omarchy-refresh-walker b/bin/omarchy-refresh-walker index aa7a0210..e32e2fcb 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 00000000..52c826ca --- /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 8cf2a036..4cc474fa 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-pipewire b/bin/omarchy-restart-pipewire index f6a7260b..f26ee09e 100755 --- a/bin/omarchy-restart-pipewire +++ b/bin/omarchy-restart-pipewire @@ -1,4 +1,4 @@ #!/bin/bash -echo -e "Restarting pirewire audio service...\n" +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 00000000..6de616ed --- /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 b2dc9a45..b3886e18 100755 --- a/bin/omarchy-restart-walker +++ b/bin/omarchy-restart-walker @@ -1,7 +1,22 @@ #!/bin/bash +pkill elephant pkill walker -# FIXME: Just deal with the memory leak for now. -# 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-setup-fingerprint b/bin/omarchy-setup-fingerprint index 422fb1e4..5319fdae 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 7174081b..ee79512a 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 21cddf98..52c1355e 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 e3733feb..21959454 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 73059712..40404265 100755 --- a/bin/omarchy-theme-set +++ b/bin/omarchy-theme-set @@ -24,15 +24,21 @@ ln -nsf "$THEME_PATH" "$CURRENT_THEME_DIR" omarchy-theme-bg-next # Restart components to apply new theme -omarchy-restart-waybar +if pgrep -x waybar >/dev/null; then + omarchy-restart-waybar +fi omarchy-restart-swayosd +omarchy-restart-terminal hyprctl reload pkill -SIGUSR2 btop makoctl reload -# Change gnome, browser, vscode themes -omarchy-theme-set-terminal +# Change gnome, browser, vscode, cursor themes omarchy-theme-set-gnome -omarchy-theme-set-eza 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 index 759d2c4e..00afa68f 100755 --- a/bin/omarchy-theme-set-browser +++ b/bin/omarchy-theme-set-browser @@ -2,18 +2,25 @@ CHROMIUM_THEME=~/.config/omarchy/current/theme/chromium.theme -if omarchy-cmd-present chromium || omarchy-cmd-present brave; then +if omarchy-cmd-present chromium || omarchy-cmd-present helium-browser || omarchy-cmd-present brave; then if [[ -f $CHROMIUM_THEME ]]; then - rgb=$(<$CHROMIUM_THEME) - THEME_HEX_COLOR=$(printf '#%02x%02x%02x' ${rgb//,/ }) + 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 - echo "{\"BrowserThemeColor\": \"$THEME_HEX_COLOR\"}" | tee "/etc/chromium/policies/managed/color.json" >/dev/null - chromium --refresh-platform-policy --no-startup-window + 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 diff --git a/bin/omarchy-theme-set-cursor b/bin/omarchy-theme-set-cursor new file mode 100755 index 00000000..2db672e1 --- /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-eza b/bin/omarchy-theme-set-eza deleted file mode 100755 index cde362cc..00000000 --- a/bin/omarchy-theme-set-eza +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -if [ -f ~/.config/omarchy/current/theme/eza.yml ]; then - ln -snf ~/.config/omarchy/current/theme/eza.yml ~/.config/eza/theme.yml -else - rm -f ~/.config/eza/theme.yml -fi diff --git a/bin/omarchy-theme-set-obsidian b/bin/omarchy-theme-set-obsidian new file mode 100755 index 00000000..83980f6b --- /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-terminal b/bin/omarchy-theme-set-terminal deleted file mode 100755 index 8a6bdbdd..00000000 --- a/bin/omarchy-theme-set-terminal +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -case "$TERMINAL" in -"alacritty") touch ~/.config/alacritty/alacritty.toml ;; -"kitty") killall -SIGUSR1 kitty ;; -"ghostty") killall -SIGUSR2 ghostty ;; -esac diff --git a/bin/omarchy-theme-set-vscode b/bin/omarchy-theme-set-vscode index 1fa975d1..c04010ca 100755 --- a/bin/omarchy-theme-set-vscode +++ b/bin/omarchy-theme-set-vscode @@ -3,44 +3,45 @@ # Note: We cannot use `jq` to update settings.json because it’s JSONC (allows comments), # which jq doesn’t support. -VS_CODE_THEME="$HOME/.config/omarchy/current/theme/vscode.json" -VS_CODE_SETTINGS="$HOME/.config/Code/User/settings.json" -VS_CODE_SKIP_FLAG="$HOME/.local/state/omarchy/toggles/skip-vscode-theme-changes" +# 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}" -if omarchy-cmd-present code && [[ ! -f "$VS_CODE_SKIP_FLAG" ]]; then +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 VS Code theme extension - if [[ -n "$extension" ]] && ! code --list-extensions | grep -Fxq "$extension"; then - notify-send " Installing VS Code theme for $theme_name" - code --install-extension "$extension" >/dev/null + # 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 "$VS_CODE_SETTINGS")" - if [[ ! -f "$VS_CODE_SETTINGS" ]]; then - printf '{\n}\n' > "$VS_CODE_SETTINGS" + 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"' "$VS_CODE_SETTINGS"; then + # 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": "",/}' "$VS_CODE_SETTINGS" + 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/" \ - "$VS_CODE_SETTINGS" + "$SETTINGS_PATH" else - # Remove theme from settings.json when the theme doesn't have vscode support - if [[ -f "$VS_CODE_SETTINGS" ]]; then - sed -i --follow-symlinks -E '/"workbench\.colorTheme"[[:space:]]*:[^,}]*,?/d' "$VS_CODE_SETTINGS" - + # 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 a4ecbde6..aa68f095 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 a1954614..aa69cf50 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 2ab2deb6..99b0286b 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 9714185f..71387827 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 121ce940..657b70a6 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" @@ -43,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 index f31e3c88..f2b7ddc0 100755 --- a/bin/omarchy-update-perform +++ b/bin/omarchy-update-perform @@ -2,7 +2,10 @@ 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 513cf80b..2811e937 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 28baffda..dd58586f 100755 --- a/bin/omarchy-update-system-pkgs +++ b/bin/omarchy-update-system-pkgs @@ -1,19 +1,15 @@ #!/bin/bash -# Used in package emergencies if a bad package has been pushed and we can't revoke. -# Requires manually installing the good package using sudo pacman -U -ignored_packages=$(omarchy-pkg-ignored) +set -e echo -e "\e[32m\nUpdate system packages\e[0m" -[[ -n $ignored_packages ]] && echo "sudo pacman -Syu --noconfirm --ignore \"$ignored_packages\"" -sudo pacman -Syu --noconfirm --ignore "$ignored_packages" +sudo pacman -Syu --noconfirm # Update AUR packages if any are installed if pacman -Qem >/dev/null; then if omarchy-pkg-aur-accessible; then echo -e "\e[32m\nUpdate AUR packages\e[0m" - [[ -n $ignored_packages ]] && echo "yay -Sua --noconfirm --ignore \"$ignored_packages\"" - yay -Sua --noconfirm --ignore "$ignored_packages" + yay -Sua --noconfirm echo else echo -e "\e[31m\nAUR is unavailable (so skipping updates)\e[0m" @@ -21,7 +17,7 @@ if pacman -Qem >/dev/null; then 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 00000000..14fc8b6f --- /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-version b/bin/omarchy-version index 4ac84815..5ddc823f 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 00000000..8affb87e --- /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 00000000..bc638110 --- /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 00000000..37f4cf2d --- /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-remove b/bin/omarchy-webapp-remove index 833e8989..a6f4ea46 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 00000000..3ef9eb11 --- /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/config/alacritty/alacritty.toml b/config/alacritty/alacritty.toml index 63fb85b7..be44031c 100644 --- a/config/alacritty/alacritty.toml +++ b/config/alacritty/alacritty.toml @@ -4,9 +4,9 @@ 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] @@ -16,5 +16,6 @@ decorations = "None" [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 d6d120e6..bce00d52 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 c510f3e7..c150ea0a 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 88c8082b..bce00d52 100644 --- a/config/chromium-flags.conf +++ b/config/chromium-flags.conf @@ -2,3 +2,5 @@ --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 00000000..95d00d12 --- /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 00000000..de17325b --- /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 31542724..ddee6f36 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,7 +128,7 @@ "break", { "type": "custom", - "format": "\u001b[90m┌────────────────────Uptime / Age────────────────────┐" + "format": "\u001b[90m┌────────────────Age / Uptime / Update───────────────┐" }, { "type": "command", @@ -135,6 +141,12 @@ "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 00000000..8aef5a8f --- /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 85c37b99..5463ba30 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 index e8420d1b..4360f279 100644 --- a/config/ghostty/config +++ b/config/ghostty/config @@ -2,20 +2,33 @@ config-file = ?"~/.config/omarchy/current/theme/ghostty.conf" # Font -font-family = "CaskaydiaMono Nerd 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 -shell-integration-features = no-cursor + +# Cursor styling + SSH session terminfo +# (all shell integration options must be passed together) +shell-integration-features = no-cursor,ssh-env # Keyboard bindings -keybind = f11=toggle_fullscreen +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 00000000..0f8e9797 --- /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 3b7c62d2..708b3a29 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 6076049b..cb4c1ed2 100644 --- a/config/hypr/bindings.conf +++ b/config/hypr/bindings.conf @@ -1,29 +1,28 @@ # Application bindings -$terminal = uwsm app -- $TERMINAL -$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 SHIFT, B, Browser (private), exec, $browser --private -bindd = SUPER, M, Music, exec, omarchy-launch-or-focus spotify -bindd = SUPER, N, Editor, exec, omarchy-launch-editor -bindd = SUPER, T, Activity, exec, $terminal -e btop -bindd = SUPER, D, Docker, exec, $terminal -e lazydocker -bindd = SUPER, G, Signal, exec, omarchy-launch-or-focus signal "uwsm app -- signal-desktop" -bindd = SUPER, O, Obsidian, exec, omarchy-launch-or-focus obsidian "uwsm app -- obsidian -disable-gpu --enable-wayland-ime" -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-or-focus-webapp YouTube "https://youtube.com/" -bindd = SUPER SHIFT, G, WhatsApp, exec, omarchy-launch-or-focus-webapp WhatsApp "https://web.whatsapp.com/" -bindd = SUPER ALT, G, Google Messages, exec, omarchy-launch-or-focus-webapp "Google Messages" "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 diff --git a/config/hypr/envs.conf b/config/hypr/envs.conf deleted file mode 100644 index a2a36410..00000000 --- a/config/hypr/envs.conf +++ /dev/null @@ -1,2 +0,0 @@ -# Extra env variables -# env = MY_GLOBAL_ENV,setting diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 3a91c979..4786e7e2 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,6 +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 d2df6965..f7a939c0 100644 --- a/config/hypr/hyprlock.conf +++ b/config/hypr/hyprlock.conf @@ -1,5 +1,9 @@ source = ~/.config/omarchy/current/theme/hyprlock.conf +general { + ignore_empty_input = true +} + background { monitor = color = $color @@ -13,7 +17,7 @@ animations { input-field { monitor = - size = 600, 100 + size = 650, 100 position = 0, 0 halign = center valign = center @@ -22,12 +26,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 78bba7d0..c4d0f8d3 100644 --- a/config/hypr/hyprsunset.conf +++ b/config/hypr/hyprsunset.conf @@ -3,4 +3,12 @@ profile { 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 ca5f1f5e..fd0cd701 100644 --- a/config/hypr/input.conf +++ b/config/hypr/input.conf @@ -12,7 +12,7 @@ input { # Start with numlock on by default numlock_by_default = true - # Increase sensitity for mouse/trackpack (default: 0) + # Increase sensitivity for mouse/trackpad (default: 0) # sensitivity = 0.35 touchpad { diff --git a/config/hypr/looknfeel.conf b/config/hypr/looknfeel.conf index 1816d776..62e26344 100644 --- a/config/hypr/looknfeel.conf +++ b/config/hypr/looknfeel.conf @@ -2,9 +2,10 @@ # https://wiki.hyprland.org/Configuring/Variables/#general general { - # No gaps between windows + # No gaps between windows or borders # gaps_in = 0 # gaps_out = 0 + # border_size = 0 # Use master layout instead of dwindle # layout = master @@ -15,3 +16,9 @@ decoration { # Use round window corners # rounding = 8 } + +# https://wiki.hypr.land/Configuring/Dwindle-Layout/ +dwindle { + # Avoid overly wide single-window layouts on wide screens + # single_window_aspect_ratio = 1 1 +} diff --git a/config/hypr/monitors.conf b/config/hypr/monitors.conf index 6fc13876..875ad265 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 00000000..176b0c9e --- /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 00000000..46493240 --- /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 index 5e2faf17..04b7440f 100644 --- a/config/kitty/kitty.conf +++ b/config/kitty/kitty.conf @@ -1,7 +1,7 @@ include ~/.config/omarchy/current/theme/kitty.conf # Font -font_family CaskaydiaMono Nerd Font +font_family JetBrainsMono Nerd Font bold_italic_font auto font_size 9.0 @@ -13,7 +13,8 @@ show_window_resize_notification no confirm_os_window_close 0 # Keybindings -map F11 toggle_fullscreen +map ctrl+insert copy_to_clipboard +map shift+insert paste_from_clipboard # Allow remote access single_instance yes @@ -23,7 +24,7 @@ allow_remote_control yes cursor_shape block enable_audio_bell no -# Minimal Tab bar styling +# Minimal Tab bar styling tab_bar_edge bottom tab_bar_style powerline tab_powerline_style slanted diff --git a/config/nvim/lazyvim.json b/config/nvim/lazyvim.json deleted file mode 100644 index 71fc8325..00000000 --- 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 cbb0a58e..00000000 --- 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 dad2d30b..00000000 --- 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 d0090f07..00000000 --- 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 00000000..36d8c3ec --- /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 00000000..486352e5 --- /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 00000000..b2a5fe1d --- /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 3c372e6b..b95ab9f3 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 3c47283b..6e2e8e99 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 index c072e320..946fbe5f 100644 --- a/config/uwsm/default +++ b/config/uwsm/default @@ -1,4 +1,13 @@ -# Changes require a relaunch of Hyprland to take effect. +# Changes require a restart to take effect. -export TERMINAL=alacritty +# 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 4fbfa76c..b988bc29 100644 --- a/config/uwsm/env +++ b/config/uwsm/env @@ -1,8 +1,8 @@ -# Changes require a relaunch of Hyprland to take effect. +# 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 PATH=$OMARCHY_PATH/bin:$PATH # Set default terminal and editor source ~/.config/uwsm/default diff --git a/config/walker/config.toml b/config/walker/config.toml index cfd79aab..9bd2b05e 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 adb981ae..f0191c14 100644 --- a/config/waybar/config.jsonc +++ b/config/waybar/config.jsonc @@ -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": { @@ -49,19 +51,19 @@ "on-click": "omarchy-launch-floating-terminal-with-presentation omarchy-update", "tooltip-format": "Omarchy update available", "signal": 7, - "interval": 3600 + "interval": 21600 }, "cpu": { "interval": 5, "format": "󰍛", - "on-click": "$TERMINAL -e btop" + "on-click": "omarchy-launch-or-focus-tui btop" }, "clock": { "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": ["󰤯", "󰤟", "󰤢", "󰤥", "󰤨"], @@ -98,13 +100,14 @@ "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": "$TERMINAL --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, @@ -122,7 +125,7 @@ "modules": ["custom/expand-icon", "tray"] }, "custom/expand-icon": { - "format": " ", + "format": "", "tooltip": false }, "custom/screenrecording-indicator": { @@ -133,6 +136,6 @@ }, "tray": { "icon-size": 12, - "spacing": 12 + "spacing": 17 } } diff --git a/config/waybar/style.css b/config/waybar/style.css index 2cf371b3..7b7a980e 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,11 +30,8 @@ opacity: 0.5; } -#tray, #cpu, #battery, -#network, -#bluetooth, #pulseaudio, #custom-omarchy, #custom-screenrecording-indicator, @@ -43,8 +40,20 @@ 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 { diff --git a/config/xdg-terminals.list b/config/xdg-terminals.list new file mode 100644 index 00000000..bc27bcf6 --- /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 53254cbb..eabd0c62 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 & } diff --git a/default/bash/functions b/default/bash/functions index 152deebb..1839e242 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,19 +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 149b16c5..e9228edb 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 4901a584..00000000 --- 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 b0b572c9..487bdd40 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 7b39de7b..7eb48672 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="$HOME/.local/bin:$PATH" +# Ensure command hashing is off for mise set +h diff --git a/default/bashrc b/default/bashrc index f9ea4fd4..eaf13c66 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 diff --git a/default/elephant/omarchy_themes.lua b/default/elephant/omarchy_themes.lua new file mode 100644 index 00000000..1f21d847 --- /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 00000000..dc359062 --- /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 6b4ebbbd..354339de 100644 --- a/default/hypr/apps.conf +++ b/default/hypr/apps.conf @@ -12,3 +12,4 @@ source = ~/.local/share/omarchy/default/hypr/apps/steam.conf source = ~/.local/share/omarchy/default/hypr/apps/system.conf source = ~/.local/share/omarchy/default/hypr/apps/terminals.conf source = ~/.local/share/omarchy/default/hypr/apps/walker.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 3d825fe0..d5fc8888 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/browser.conf b/default/hypr/apps/browser.conf index 1ff18150..ad278edd 100644 --- a/default/hypr/apps/browser.conf +++ b/default/hypr/apps/browser.conf @@ -1,5 +1,5 @@ # Browser types -windowrule = tag +chromium-based-browser, class:([cC]hrom(e|ium)|[bB]rave-browser|Microsoft-edge|Vivaldi-stable) +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 diff --git a/default/hypr/apps/davinci-resolve.conf b/default/hypr/apps/davinci-resolve.conf new file mode 100644 index 00000000..33b04f2f --- /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 661b0a4c..6e8708af 100644 --- a/default/hypr/apps/jetbrains.conf +++ b/default/hypr/apps/jetbrains.conf @@ -1,6 +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 tab dragging (always have a single space character as their title) -windowrule = noinitialfocus, class:^(.*jetbrains.*)$, title:^\\s$ -windowrule = nofocus, class:^(.*jetbrains.*)$, title:^\\s$ +# Center popups/find windows +windowrule = tag +jetbrains, class:^(jetbrains-.*), title:^()$, floating:1 +windowrule = center, tag:jetbrains + +# 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/pip.conf b/default/hypr/apps/pip.conf index 363c1ed2..18e14406 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/steam.conf b/default/hypr/apps/steam.conf index bd6386cc..77d8a4bc 100644 --- a/default/hypr/apps/steam.conf +++ b/default/hypr/apps/steam.conf @@ -1,4 +1,4 @@ -# Float Steam, fullscreen RetroArch +# Float Steam windowrule = float, class:steam windowrule = center, class:steam, title:Steam windowrule = opacity 1 1, class:steam diff --git a/default/hypr/apps/system.conf b/default/hypr/apps/system.conf index cfbfe5ee..ccf2dd27 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|org.gnome.Nautilus), title:^(Open.*Files?|Open [F|f]older.*|Save.*Files?|Save.*As|Save|All Files) +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/webcam-overlay.conf b/default/hypr/apps/webcam-overlay.conf new file mode 100644 index 00000000..eca1c751 --- /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 5c2f60b1..0462f73a 100644 --- a/default/hypr/autostart.conf +++ b/default/hypr/autostart.conf @@ -1,10 +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 -- walker --gapplication-service & +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 2927eb34..20fee804 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 00000000..ffaede7a --- /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 00000000..d75e28b7 --- /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 ff2437b9..b1dc65cc 100644 --- a/default/hypr/bindings/tiling.conf +++ b/default/hypr/bindings/tiling.conf @@ -1,19 +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 @@ -39,22 +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 @@ -63,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 c8b3efdb..2e442630 100644 --- a/default/hypr/bindings/utilities.conf +++ b/default/hypr/bindings/utilities.conf @@ -1,8 +1,8 @@ # 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 @@ -10,13 +10,16 @@ bindd = , XF86Calculator, Calculator, exec, gnome-calculator # Aesthetics 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, Restore last notification, exec, makoctl restore # Toggle idling bindd = SUPER CTRL, I, Toggle locking on idle, exec, omarchy-toggle-idle @@ -29,19 +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 - -# Screen recordings -bindd = ALT, PRINT, Screen record a region, exec, omarchy-cmd-screenrecord region -bindd = ALT SHIFT, PRINT, Screen record a region with audio, exec, omarchy-cmd-screenrecord region audio -bindd = CTRL ALT, PRINT, Screen record display, exec, omarchy-cmd-screenrecord output -bindd = CTRL ALT SHIFT, PRINT, Screen record display with audio, exec, omarchy-cmd-screenrecord output audio - -# Color picker +# 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 # File sharing -bindd = CTRL SUPER, S, Share, exec, omarchy-menu share +bindd = SUPER CTRL, S, Share, exec, omarchy-menu share + +# 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/input.conf b/default/hypr/input.conf index bb4d610b..74b2acab 100644 --- a/default/hypr/input.conf +++ b/default/hypr/input.conf @@ -14,3 +14,8 @@ input { natural_scroll = 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 9b8f3077..26a55948 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 - - vibrancy = 0.1696 + size = 2 + passes = 2 + special = true + brightness = 0.60 + contrast = 0.75 } } +# 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,9 +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 index 05f60534..927d8d40 100644 --- a/default/mako/core.ini +++ b/default/mako/core.ini @@ -1,7 +1,11 @@ anchor=top-right default-timeout=5000 width=420 -height=110 +outer-margin=20 +padding=10,15 +border-size=2 +max-icon-size=32 +font=sans-serif 14px [app-name=Spotify] invisible=1 @@ -20,3 +24,6 @@ on-button-left=exec sh -c 'omarchy-notification-dismiss "Setup Wi-Fi"; omarchy-l [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 b/default/pacman/mirrorlist deleted file mode 100644 index 2d92d05a..00000000 --- a/default/pacman/mirrorlist +++ /dev/null @@ -1,3 +0,0 @@ -Server = https://mirror.omarchy.org/$repo/os/$arch -Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch -Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch diff --git a/default/pacman/mirrorlist-edge b/default/pacman/mirrorlist-edge new file mode 100644 index 00000000..914c1fa7 --- /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 00000000..1c2dc11c --- /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 index f5760877..5dafbc84 100644 --- a/default/pacman/pacman.conf +++ b/default/pacman/pacman.conf @@ -27,4 +27,4 @@ Include = /etc/pacman.d/mirrorlist [omarchy] SigLevel = Optional TrustAll -Server = https://pkgs.omarchy.org/$arch +Server = https://pkgs.omarchy.org/stable/$arch diff --git a/default/walker/themes/dmenu_150.css b/default/walker/themes/dmenu_150.css deleted file mode 100644 index 14bafe7a..00000000 --- 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 3c139976..00000000 --- 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 14bafe7a..00000000 --- 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 b9ffc1e7..00000000 --- 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 14bafe7a..00000000 --- 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 c5d1b78d..00000000 --- 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 6e453b6e..00000000 --- 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 9abc5d8f..00000000 --- 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 00000000..3b7bda71 --- /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 00000000..0dc824fb --- /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 index d0d00822..80038e0e 100755 --- a/default/waybar/indicators/screen-recording.sh +++ b/default/waybar/indicators/screen-recording.sh @@ -1,6 +1,6 @@ #!/bin/bash -if pgrep -x wl-screenrec >/dev/null || pgrep -x wf-recorder >/dev/null; then +if pgrep -f "^gpu-screen-recorder" >/dev/null; then echo '{"text": "󰻂", "tooltip": "Stop recording", "class": "active"}' else echo '{"text": ""}' diff --git a/install/config/all.sh b/install/config/all.sh index 1336dee3..5c19829c 100644 --- a/install/config/all.sh +++ b/install/config/all.sh @@ -14,6 +14,8 @@ 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 @@ -24,6 +26,8 @@ run_logged $OMARCHY_INSTALL/config/hardware/usb-autosuspend.sh run_logged $OMARCHY_INSTALL/config/hardware/ignore-power-button.sh run_logged $OMARCHY_INSTALL/config/hardware/nvidia.sh run_logged $OMARCHY_INSTALL/config/hardware/fix-f13-amd-audio-input.sh -run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-bcm4360.sh +run_logged $OMARCHY_INSTALL/config/hardware/fix-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/fast-shutdown.sh b/install/config/fast-shutdown.sh new file mode 100644 index 00000000..bbbfafdc --- /dev/null +++ b/install/config/fast-shutdown.sh @@ -0,0 +1,7 @@ +sudo mkdir -p /etc/systemd/system.conf.d + +cat </dev/null)" =~ MacBook12,1|MacBookPro13,[123]|MacBookPro14,[123] ]]; then +product_name="$(cat /sys/class/dmi/id/product_name 2>/dev/null)" +if [[ "$product_name" =~ MacBook[89],1|MacBook1[02],1|MacBookPro13,[123]|MacBookPro14,[123] ]]; then echo "Detected MacBook with SPI keyboard" sudo pacman -S --noconfirm --needed macbook12-spi-driver-dkms - echo "MODULES=(applespi intel_lpss_pci spi_pxa2xx_platform)" | sudo tee /etc/mkinitcpio.conf.d/macbook_spi_modules.conf >/dev/null + if [[ "$product_name" == "MacBook8,1" ]]; then + echo "MODULES=(applespi spi_pxa2xx_platform spi_pxa2xx_pci)" | sudo tee /etc/mkinitcpio.conf.d/macbook_spi_modules.conf >/dev/null + else + echo "MODULES=(applespi intel_lpss_pci spi_pxa2xx_platform)" | sudo tee /etc/mkinitcpio.conf.d/macbook_spi_modules.conf >/dev/null + fi fi diff --git a/install/config/hardware/fix-apple-suspend-nvme.sh b/install/config/hardware/fix-apple-suspend-nvme.sh new file mode 100644 index 00000000..35724112 --- /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-bcm43xx.sh b/install/config/hardware/fix-bcm43xx.sh new file mode 100644 index 00000000..5078f69e --- /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-surface-keyboard.sh b/install/config/hardware/fix-surface-keyboard.sh new file mode 100644 index 00000000..d68fe5ae --- /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/printer.sh b/install/config/hardware/printer.sh index 781a9871..244368e6 100644 --- a/install/config/hardware/printer.sh +++ b/install/config/hardware/printer.sh @@ -6,7 +6,7 @@ echo -e "[Resolve]\nMulticastDNS=no" | sudo tee /etc/systemd/resolved.conf.d/10- chrootable_systemctl_enable avahi-daemon.service # Enable mDNS resolution for .local domains -sudo sed -i 's/^hosts:.*/hosts: mymachines mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns/' /etc/nsswitch.conf +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 diff --git a/install/config/increase-lockout-limit.sh b/install/config/increase-lockout-limit.sh index 522deb72..5932906f 100644 --- a/install/config/increase-lockout-limit.sh +++ b/install/config/increase-lockout-limit.sh @@ -1,3 +1,7 @@ # 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/lazyvim.sh b/install/config/lazyvim.sh deleted file mode 100644 index 325f6310..00000000 --- a/install/config/lazyvim.sh +++ /dev/null @@ -1 +0,0 @@ -omarchy-lazyvim-setup diff --git a/install/config/mimetypes.sh b/install/config/mimetypes.sh index 48bb8cfa..ea8e1aff 100644 --- a/install/config/mimetypes.sh +++ b/install/config/mimetypes.sh @@ -33,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-work.sh b/install/config/mise-work.sh index 15d71923..532ad350 100644 --- a/install/config/mise-work.sh +++ b/install/config/mise-work.sh @@ -1,9 +1,27 @@ -# Add ./bin to path for all items in ~/Work +# 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/sudoless-asdcontrol.sh b/install/config/sudoless-asdcontrol.sh index 120c6fc2..5ae03563 100644 --- a/install/config/sudoless-asdcontrol.sh +++ b/install/config/sudoless-asdcontrol.sh @@ -1,3 +1,3 @@ # Setup sudo-less controls for controlling brightness on Apple Displays -echo "$USER ALL=(ALL) NOPASSWD: /usr/local/bin/asdcontrol" | sudo tee /etc/sudoers.d/asdcontrol +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 index a0a6a694..a4ed8b3e 100644 --- a/install/config/theme.sh +++ b/install/config/theme.sh @@ -12,7 +12,7 @@ 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 @@ -20,9 +20,6 @@ ln -snf ~/.config/omarchy/current/theme/btop.theme ~/.config/btop/themes/current mkdir -p ~/.config/mako ln -snf ~/.config/omarchy/current/theme/mako.ini ~/.config/mako/config -mkdir -p ~/.config/eza -ln -snf ~/.config/omarchy/current/theme/eza.yml ~/.config/eza/theme.yml - # 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 diff --git a/install/config/walker-elephant.sh b/install/config/walker-elephant.sh new file mode 100644 index 00000000..745450f3 --- /dev/null +++ b/install/config/walker-elephant.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Ensure Walker service is started automatically on boot +mkdir -p ~/.config/autostart/ +cp $OMARCHY_PATH/autostart/walker.desktop ~/.config/autostart/ + +# Create pacman hook to restart walker after updates +sudo mkdir -p /etc/pacman.d/hooks +sudo tee /etc/pacman.d/hooks/walker-restart.hook > /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/first-run/cleanup-reboot-sudoers.sh b/install/first-run/cleanup-reboot-sudoers.sh new file mode 100644 index 00000000..ccc9966b --- /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 00000000..bf46388a --- /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 00000000..9517f6b9 --- /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 index a38f5a56..cc187dc2 100644 --- a/install/first-run/firewall.sh +++ b/install/first-run/firewall.sh @@ -6,9 +6,6 @@ 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' diff --git a/install/first-run/welcome.sh b/install/first-run/welcome.sh index 3b846610..9c5d06af 100644 --- a/install/first-run/welcome.sh +++ b/install/first-run/welcome.sh @@ -1,2 +1 @@ -notify-send " Update System" "When you have internet, click to update the system." -u critical -notify-send "👋 Welcome to Omarchy" "You're in for a great computing adventure. Have fun!" -t 30000 +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 index 9d391f1e..f8d7fc8f 100644 --- a/install/first-run/wifi.sh +++ b/install/first-run/wifi.sh @@ -1,3 +1,6 @@ if ! ping -c3 -W1 1.1.1.1 >/dev/null 2>&1; then - notify-send "󰖩 Click to Setup Wi-Fi" "Tab between sections, space selects, ? for help." -u critical -t 30000 + 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/login/all.sh b/install/login/all.sh index e4be282f..2c03df32 100644 --- a/install/login/all.sh +++ b/install/login/all.sh @@ -1,4 +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 -run_logged $OMARCHY_INSTALL/login/enable-mkinitcpio.sh -run_logged $OMARCHY_INSTALL/login/alt-bootloaders.sh diff --git a/install/login/alt-bootloaders.sh b/install/login/alt-bootloaders.sh deleted file mode 100644 index bb35d9b0..00000000 --- a/install/login/alt-bootloaders.sh +++ /dev/null @@ -1,115 +0,0 @@ -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 00000000..134fefb6 --- /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/enable-mkinitcpio.sh b/install/login/enable-mkinitcpio.sh deleted file mode 100644 index 7422d8db..00000000 --- a/install/login/enable-mkinitcpio.sh +++ /dev/null @@ -1,18 +0,0 @@ -echo "Re-enabling mkinitcpio hooks..." - -# Restore the specific mkinitcpio pacman hooks -if [ -f /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled ]; then - sudo mv /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled /usr/share/libalpm/hooks/90-mkinitcpio-install.hook -fi - -if [ -f /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled ]; then - sudo mv /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook -fi - -echo "mkinitcpio hooks re-enabled" - -if command -v limine &>/dev/null; then - sudo limine-update -else - sudo mkinitcpio -P -fi diff --git a/install/login/limine-snapper.sh b/install/login/limine-snapper.sh index d2bdd5ae..917d6cdc 100644 --- a/install/login/limine-snapper.sh +++ b/install/login/limine-snapper.sh @@ -1,4 +1,6 @@ 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 MODULES=(thunderbolt) HOOKS=(base udev plymouth keyboard autodetect microcode modconf kms keymap consolefont block encrypt filesystems fsck btrfs-overlayfs) @@ -35,6 +37,7 @@ KERNEL_CMDLINE[default]="$CMDLINE" KERNEL_CMDLINE[default]+="quiet splash" ENABLE_UKI=yes +CUSTOM_UKI_NAME="omarchy" ENABLE_LIMINE_FALLBACK=yes @@ -73,10 +76,14 @@ 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 + # 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 @@ -97,13 +104,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" && - ! 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\\$(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 index 72102f27..fad64fe2 100644 --- a/install/login/plymouth.sh +++ b/install/login/plymouth.sh @@ -1,151 +1,4 @@ -# 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 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 </dev/null - echo - echo_in_style "Remember to remove USB installer!" fi # Exit gracefully if user chooses not to reboot @@ -31,10 +29,10 @@ if gum confirm --padding "0 0 0 $((PADDING_LEFT + 32))" --show-help=false --defa # Clear screen to hide any shutdown messages clear - # Use systemctl if available, otherwise fallback to reboot command - if command -v systemctl &>/dev/null; then - systemctl reboot --no-wall 2>/dev/null + if [[ -n "${OMARCHY_CHROOT_INSTALL:-}" ]]; then + touch /var/tmp/omarchy-install-completed + exit 0 else - reboot 2>/dev/null + sudo reboot 2>/dev/null fi fi diff --git a/install/post-install/pacman.sh b/install/post-install/pacman.sh index c91a2c9d..dbd6bcfc 100644 --- a/install/post-install/pacman.sh +++ b/install/post-install/pacman.sh @@ -1,6 +1,6 @@ # 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 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 diff --git a/install/preflight/first-run-mode.sh b/install/preflight/first-run-mode.sh index 44649496..536058cc 100644 --- a/install/preflight/first-run-mode.sh +++ b/install/preflight/first-run-mode.sh @@ -5,9 +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/pacman.sh b/install/preflight/pacman.sh index 1d9a2f2f..b4e03ef7 100644 --- a/install/preflight/pacman.sh +++ b/install/preflight/pacman.sh @@ -6,6 +6,13 @@ if [[ -n ${OMARCHY_ONLINE_INSTALL:-} ]]; then 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/migrations/1751134560.sh b/migrations/1751134560.sh index d34a2b60..928b98fa 100644 --- a/migrations/1751134560.sh +++ b/migrations/1751134560.sh @@ -4,12 +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 mkdir -p ~/.local/state/omarchy/migrations -gum confirm "Ready to relaunch Hyprland? (All applications will be closed)" && - touch ~/.local/state/omarchy/migrations/1751134560.sh && - uwsm stop +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 46a7ebf2..00000000 --- a/migrations/1751134561.sh +++ /dev/null @@ -1,9 +0,0 @@ -echo "Add Omarchy Package Repository" - -omarchy-refresh-pacman-mirrorlist - -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 00000000..0be8ee25 --- /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 14c8f414..99cd600f 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/1751672984.sh b/migrations/1751672984.sh index b2d9ecb0..f48834bb 100644 --- a/migrations/1751672984.sh +++ b/migrations/1751672984.sh @@ -1,3 +1,4 @@ echo "Add LocalSend as new default application" +omarchy-pkg-drop localsend-bin omarchy-pkg-add localsend diff --git a/migrations/1752885858.sh b/migrations/1752885858.sh deleted file mode 100644 index 2d2b25ac..00000000 --- a/migrations/1752885858.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Install slurp + wl-screenrec for new ALT+PrintScreen screen recorder" - -omarchy-pkg-add slurp wl-screenrec diff --git a/migrations/1753138691.sh b/migrations/1753138691.sh index d9197ba5..ef55a91f 100644 --- a/migrations/1753138691.sh +++ b/migrations/1753138691.sh @@ -2,5 +2,5 @@ echo "Install swayOSD to show volume status" if omarchy-cmd-missing swayosd-server; then omarchy-pkg-add swayosd - setsid uwsm app -- swayosd-server &>/dev/null & + setsid uwsm-app -- swayosd-server &>/dev/null & fi diff --git a/migrations/1753176520.sh b/migrations/1753176520.sh deleted file mode 100644 index 186b8a76..00000000 --- a/migrations/1753176520.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Install wf-recorder for screen recording for nvidia" - -omarchy-pkg-add wf-recorder diff --git a/migrations/1753224615.sh b/migrations/1753224615.sh index cd6c7978..6f9dcfb5 100644 --- 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/1754515289.sh b/migrations/1754515289.sh deleted file mode 100644 index 23f4db5e..00000000 --- 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/1754929737.sh b/migrations/1754929737.sh deleted file mode 100644 index e3645dba..00000000 --- a/migrations/1754929737.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Update Walker config to add 60s timeout such that it won't conflict with screensaver" - -omarchy-refresh-walker diff --git a/migrations/1755548643.sh b/migrations/1755548643.sh deleted file mode 100644 index f98b730b..00000000 --- a/migrations/1755548643.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Install wf-recorder for intel based device" - -omarchy-pkg-add wf-recorder diff --git a/migrations/1755870033.sh b/migrations/1755870033.sh index fde865be..d7b6e8f9 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/1756060611.sh b/migrations/1756060611.sh index b1bc95da..2aab819a 100644 --- a/migrations/1756060611.sh +++ b/migrations/1756060611.sh @@ -13,8 +13,6 @@ 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/1756360552.sh b/migrations/1756360552.sh index 056853d4..0ea76157 100644 --- a/migrations/1756360552.sh +++ b/migrations/1756360552.sh @@ -1,7 +1,4 @@ echo "Move Omarchy Package Repository after Arch core/extra/multilib and remove AUR" -sudo cp /etc/pacman.conf /etc/pacman.conf.bak -sudo sed -i '/\[omarchy\]/,+2 d' /etc/pacman.conf -sudo sed -i '/\[chaotic-aur\]/,+2 d' /etc/pacman.conf -sudo bash -c 'echo -e "\n[omarchy]\nSigLevel = Optional TrustAll\nServer = https://pkgs.omarchy.org/\$arch" >> /etc/pacman.conf' +omarchy-refresh-pacman sudo pacman -Syu --noconfirm diff --git a/migrations/1756372498.sh b/migrations/1756372498.sh deleted file mode 100644 index 40ba5ad6..00000000 --- a/migrations/1756372498.sh +++ /dev/null @@ -1,8 +0,0 @@ -echo "Add eza themeing" - -mkdir -p ~/.config/eza - -if [ -f ~/.config/omarchy/current/theme/eza.yml ]; then - ln -snf ~/.config/omarchy/current/theme/eza.yml ~/.config/eza/theme.yml -fi - diff --git a/migrations/1756411333.sh b/migrations/1756411333.sh index c44e9ce1..5312a6f5 100644 --- a/migrations/1756411333.sh +++ b/migrations/1756411333.sh @@ -1,3 +1,3 @@ echo "Use new Omarchy mirror as default" -omarchy-refresh-pacman-mirrorlist +omarchy-refresh-pacman diff --git a/migrations/1757361128.sh b/migrations/1757361128.sh index b6c8413e..0bd0b407 100644 --- a/migrations/1757361128.sh +++ b/migrations/1757361128.sh @@ -2,6 +2,6 @@ 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 [!UNAVAIL=return] files myhostname dns/' /etc/nsswitch.conf + 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/1757535736.sh b/migrations/1757535736.sh new file mode 100644 index 00000000..25fcd190 --- /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/1757877852.sh b/migrations/1757877852.sh index a0b88bdd..51ecd105 100644 --- a/migrations/1757877852.sh +++ b/migrations/1757877852.sh @@ -2,9 +2,9 @@ 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, 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, 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/1758019332.sh b/migrations/1758019332.sh index 003acd56..50caed1e 100644 --- a/migrations/1758019332.sh +++ b/migrations/1758019332.sh @@ -3,7 +3,7 @@ echo "Set \$TERMINAL and \$EDITOR in ~/.config/uwsm/default so entire system can # Set terminal and editor default in uwsm omarchy-refresh-config uwsm/default omarchy-refresh-config uwsm/env -omarchy-state set relaunch-required +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 @@ -17,5 +17,5 @@ fi # Use default terminal for keybinding if grep -q "terminal = uwsm app" ~/.config/hypr/bindings.conf; then - sed -i '/terminal = uwsm app -- alacritty/ c\$terminal = uwsm app -- $TERMINAL' ~/.config/hypr/bindings.conf + sed -Ei '/terminal = uwsm[- ]app -- alacritty/ c\$terminal = uwsm-app -- $TERMINAL' ~/.config/hypr/bindings.conf fi diff --git a/migrations/1758107879.sh b/migrations/1758107879.sh new file mode 100644 index 00000000..aaae09df --- /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/1758142943.sh b/migrations/1758142943.sh new file mode 100644 index 00000000..ef800abc --- /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 00000000..b9a2e7b5 --- /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 00000000..3c10c840 --- /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 00000000..731bba2a --- /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 00000000..5c4c357e --- /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 00000000..f0b10693 --- /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 00000000..69cf8963 --- /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 00000000..dce79803 --- /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 00000000..40d0098d --- /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 00000000..37fefa7c --- /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 00000000..084d8e2b --- /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 00000000..fcaeb417 --- /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 00000000..8ce4ad13 --- /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 00000000..4745b187 --- /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 00000000..b383b6fb --- /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 00000000..e1c519c6 --- /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 00000000..5e5ca300 --- /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 00000000..e08649f4 --- /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 00000000..1c2d89d3 --- /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 00000000..fec87d8c --- /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 00000000..5a6b1e0f --- /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 00000000..fb7c54e4 --- /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 00000000..c4b977f0 --- /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 00000000..eff3980d --- /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 00000000..8d29f613 --- /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 00000000..7d0f5657 --- /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 00000000..5c85b362 --- /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 00000000..f45e7bfd --- /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 00000000..bafbfe27 --- /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 00000000..05a1fb16 --- /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 00000000..49680d09 --- /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 00000000..34dbc1fd --- /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 00000000..e56d16ca --- /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 00000000..3314021e --- /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 00000000..9b69745a --- /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 00000000..a3c9e03c --- /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 00000000..37ad3b1b --- /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 00000000..3ef9a1cd --- /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 00000000..5f48b054 --- /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 00000000..0ebf1d8a --- /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 00000000..93bc3634 --- /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 00000000..f312b393 --- /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 00000000..36e6a4b4 --- /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 00000000..8291dd0f --- /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 00000000..95856362 --- /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 00000000..6ad354da --- /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 00000000..e6d806d4 --- /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 00000000..f84cf74d --- /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 00000000..74199ce4 --- /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 00000000..ad1995be --- /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 00000000..f7eec943 --- /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 00000000..3da9eec0 --- /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 00000000..b3956966 --- /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 00000000..d69e51e1 --- /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 00000000..85cd0c2f --- /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 00000000..aa02e9f9 --- /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 00000000..d93893f7 --- /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 00000000..267558b6 --- /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 00000000..46e2af14 --- /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 00000000..db73b86e --- /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 00000000..40d83994 --- /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 00000000..01843585 --- /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 00000000..99590cbb --- /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 00000000..f9df037d --- /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 00000000..e6d5fee5 --- /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/migrations/1764378788.sh b/migrations/1764378788.sh new file mode 100644 index 00000000..de9b5f13 --- /dev/null +++ b/migrations/1764378788.sh @@ -0,0 +1,5 @@ +echo "Ignore empty passwords on lock screen" + +if ! grep -q "ignore_empty_input" ~/.config/hypr/hyprlock.conf; then + sed -i "/source =/a\ \ngeneral {\n ignore_empty_input = true\n}" ~/.config/hypr/hyprlock.conf +fi diff --git a/themes/catppuccin-latte/hyprland.conf b/themes/catppuccin-latte/hyprland.conf index afc429d4..4a72d792 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/mako.ini b/themes/catppuccin-latte/mako.ini index 6461da0e..fa46cfff 100644 --- a/themes/catppuccin-latte/mako.ini +++ b/themes/catppuccin-latte/mako.ini @@ -3,8 +3,3 @@ include=~/.local/share/omarchy/default/mako/core.ini text-color=#4c4f69 border-color=#1e66f5 background-color=#eff1f5 -padding=10 -border-size=2 -font=Liberation Sans 11 -max-icon-size=32 -outer-margin=20 \ No newline at end of file diff --git a/themes/catppuccin-latte/neovim.lua b/themes/catppuccin-latte/neovim.lua index 07a53cf8..53eaf45c 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 index 4c594da8..8befd6f4 100644 Binary files a/themes/catppuccin-latte/preview.png and b/themes/catppuccin-latte/preview.png differ diff --git a/themes/catppuccin/alacritty.toml b/themes/catppuccin/alacritty.toml index bfa455ad..7762dcdb 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 18a4ff61..f0395b35 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/eza.yml b/themes/catppuccin/eza.yml deleted file mode 100644 index 198febcc..00000000 --- a/themes/catppuccin/eza.yml +++ /dev/null @@ -1,104 +0,0 @@ -# see https://github.com/eza-community/eza-themes/blob/main/themes/catppuccin.yml - -colourful: true - -filekinds: - normal: {foreground: "#BAC2DE"} - directory: {foreground: "#89B4FA"} - symlink: {foreground: "#89DCEB"} - pipe: {foreground: "#7F849C"} - block_device: {foreground: "#EBA0AC"} - char_device: {foreground: "#EBA0AC"} - socket: {foreground: "#585B70"} - special: {foreground: "#CBA6F7"} - executable: {foreground: "#A6E3A1"} - mount_point: {foreground: "#74C7EC"} - -perms: - user_read: {foreground: "#CDD6F4"} - user_write: {foreground: "#F9E2AF"} - user_execute_file: {foreground: "#A6E3A1"} - user_execute_other: {foreground: "#A6E3A1"} - group_read: {foreground: "#BAC2DE"} - group_write: {foreground: "#F9E2AF"} - group_execute: {foreground: "#A6E3A1"} - other_read: {foreground: "#A6ADC8"} - other_write: {foreground: "#F9E2AF"} - other_execute: {foreground: "#A6E3A1"} - special_user_file: {foreground: "#CBA6F7"} - special_other: {foreground: "#585B70"} - attribute: {foreground: "#A6ADC8"} - -size: - major: {foreground: "#A6ADC8"} - minor: {foreground: "#89DCEB"} - number_byte: {foreground: "#CDD6F4"} - number_kilo: {foreground: "#BAC2DE"} - number_mega: {foreground: "#89B4FA"} - number_giga: {foreground: "#CBA6F7"} - number_huge: {foreground: "#CBA6F7"} - unit_byte: {foreground: "#A6ADC8"} - unit_kilo: {foreground: "#89B4FA"} - unit_mega: {foreground: "#CBA6F7"} - unit_giga: {foreground: "#CBA6F7"} - unit_huge: {foreground: "#74C7EC"} - -users: - user_you: {foreground: "#CDD6F4"} - user_root: {foreground: "#F38BA8"} - user_other: {foreground: "#CBA6F7"} - group_yours: {foreground: "#BAC2DE"} - group_other: {foreground: "#7F849C"} - group_root: {foreground: "#F38BA8"} - -links: - normal: {foreground: "#89DCEB"} - multi_link_file: {foreground: "#74C7EC"} - -git: - new: {foreground: "#A6E3A1"} - modified: {foreground: "#F9E2AF"} - deleted: {foreground: "#F38BA8"} - renamed: {foreground: "#94E2D5"} - typechange: {foreground: "#F5C2E7"} - ignored: {foreground: "#7F849C"} - conflicted: {foreground: "#EBA0AC"} - -git_repo: - branch_main: {foreground: "#CDD6F4"} - branch_other: {foreground: "#CBA6F7"} - git_clean: {foreground: "#A6E3A1"} - git_dirty: {foreground: "#F38BA8"} - -security_context: - colon: {foreground: "#7F849C"} - user: {foreground: "#BAC2DE"} - role: {foreground: "#CBA6F7"} - typ: {foreground: "#585B70"} - range: {foreground: "#CBA6F7"} - -file_type: - image: {foreground: "#F9E2AF"} - video: {foreground: "#F38BA8"} - music: {foreground: "#A6E3A1"} - lossless: {foreground: "#94E2D5"} - crypto: {foreground: "#585B70"} - document: {foreground: "#CDD6F4"} - compressed: {foreground: "#F5C2E7"} - temp: {foreground: "#EBA0AC"} - compiled: {foreground: "#74C7EC"} - build: {foreground: "#585B70"} - source: {foreground: "#89B4FA"} - -punctuation: {foreground: "#7F849C"} -date: {foreground: "#F9E2AF"} -inode: {foreground: "#A6ADC8"} -blocks: {foreground: "#9399B2"} -header: {foreground: "#CDD6F4"} -octal: {foreground: "#94E2D5"} -flags: {foreground: "#CBA6F7"} - -symlink_path: {foreground: "#89DCEB"} -control_char: {foreground: "#74C7EC"} -broken_symlink: {foreground: "#F38BA8"} -broken_path_overlay: {foreground: "#585B70"} diff --git a/themes/catppuccin/hyprland.conf b/themes/catppuccin/hyprland.conf index 46ff7e64..da3374ba 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/mako.ini b/themes/catppuccin/mako.ini index dc5f9c64..e530b7d5 100644 --- a/themes/catppuccin/mako.ini +++ b/themes/catppuccin/mako.ini @@ -3,8 +3,3 @@ include=~/.local/share/omarchy/default/mako/core.ini text-color=#cad3f5 border-color=#c6d0f5 background-color=#24273a -padding=10 -border-size=2 -font=Liberation Sans 11 -max-icon-size=32 -outer-margin=20 \ No newline at end of file diff --git a/themes/catppuccin/neovim.lua b/themes/catppuccin/neovim.lua index dbe34f5e..a8683876 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 index 019de1d8..25c40d51 100644 Binary files a/themes/catppuccin/preview.png and b/themes/catppuccin/preview.png differ diff --git a/themes/catppuccin/vscode.json b/themes/catppuccin/vscode.json index 26e1188e..a94d2cf8 100644 --- a/themes/catppuccin/vscode.json +++ b/themes/catppuccin/vscode.json @@ -1,4 +1,4 @@ { - "name": "Catppuccin Macchiato", + "name": "Catppuccin Mocha", "extension": "catppuccin.catppuccin-vsc" } diff --git a/themes/ethereal/alacritty.toml b/themes/ethereal/alacritty.toml new file mode 100644 index 00000000..215c3c09 --- /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 00000000..e5c1463f 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 00000000..135da3db --- /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 00000000..164d85c8 --- /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 00000000..1ac9168b --- /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 00000000..9b72328f --- /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 00000000..7d9b62e2 --- /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 00000000..6ce2f147 --- /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 00000000..fe3bae7d --- /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 00000000..fde27a45 --- /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 00000000..885bece6 --- /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 00000000..0064a2ab 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 00000000..7cdfeead --- /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 00000000..2fccd6b0 --- /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 00000000..ceb5d953 --- /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 00000000..d03dff38 --- /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 f6aeadfe..2ad33bbe 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 index c3b0aadb..6208b9ce 100644 --- a/themes/everforest/ghostty.conf +++ b/themes/everforest/ghostty.conf @@ -1 +1,20 @@ -theme = Everforest Dark Hard +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 e88f030c..10e2c5d4 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 index 07cea61f..825cac23 100644 --- a/themes/everforest/kitty.conf +++ b/themes/everforest/kitty.conf @@ -4,66 +4,25 @@ ## 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 -foreground #d3c6aa -background #272e33 -selection_foreground #9da9a0 -selection_background #464e53 +background #2d353b +foreground #d3c6aa -cursor #d3c6aa -cursor_text_color #2e383c +# Normal colors +color0 #475258 +color1 #e67e80 +color2 #a7c080 +color3 #dbbc7f +color4 #7fbbb3 +color5 #d699b6 +color6 #83c092 +color7 #d3c6aa -url_color #7fbbb3 - -active_border_color #a7c080 -inactive_border_color #4f5b58 -bell_border_color #e69875 -visual_bell_color none - -wayland_titlebar_color system -macos_titlebar_color system - -active_tab_background #272e33 -active_tab_foreground #d3c6aa -inactive_tab_background #374145 -inactive_tab_foreground #9da9a0 -tab_bar_background #2e383c -tab_bar_margin_color none - -mark1_foreground #272e33 -mark1_background #7fbbb3 -mark2_foreground #272e33 -mark2_background #d3c6aa -mark3_foreground #272e33 -mark3_background #d699b6 - -#: black -color0 #343f44 -color8 #868d80 - -#: red -color1 #e67e80 -color9 #e67e80 - -#: green -color2 #a7c080 -color10 #a7c080 - -#: yellow -color3 #dbbc7f -color11 #dbbc7f - -#: blue -color4 #7fbbb3 -color12 #7fbbb3 - -#: magenta -color5 #d699b6 -color13 #d699b6 - -#: cyan -color6 #83c092 -color14 #83c092 - -#: white -color7 #859289 -color15 #9da9a0 +# 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 05b50e86..0008121f 100644 --- a/themes/everforest/mako.ini +++ b/themes/everforest/mako.ini @@ -3,8 +3,3 @@ include=~/.local/share/omarchy/default/mako/core.ini text-color=#d3c6aa border-color=#d3c6aa background-color=#2d353b -padding=10 -border-size=2 -font=Liberation Sans 11 -max-icon-size=32 -outer-margin=20 \ No newline at end of file diff --git a/themes/everforest/preview.png b/themes/everforest/preview.png index 113396cc..3124f21e 100644 Binary files a/themes/everforest/preview.png and b/themes/everforest/preview.png differ diff --git a/themes/flexoki-light/alacritty.toml b/themes/flexoki-light/alacritty.toml new file mode 100644 index 00000000..e59fce8b --- /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 00000000..a564a176 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 00000000..cc755b1f 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 00000000..0caf9c65 --- /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 00000000..31cd573a --- /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 00000000..5bc755a1 --- /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 00000000..1baef471 --- /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 00000000..e1d0dd4a --- /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 00000000..6ce2f147 --- /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 00000000..c8ee0142 --- /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 00000000..e65461b9 --- /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 00000000..19cf1af4 --- /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 00000000..230c5512 --- /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 00000000..dce1c542 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 00000000..444964d5 --- /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 00000000..00a20456 --- /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 00000000..e2ecdfb2 --- /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 00000000..edc54c16 --- /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/eza.yml b/themes/gruvbox/eza.yml deleted file mode 100644 index 68d126d6..00000000 --- a/themes/gruvbox/eza.yml +++ /dev/null @@ -1,104 +0,0 @@ -# see https://github.com/eza-community/eza-themes/blob/main/themes/gruvbox-dark.yml - -colourful: true - -filekinds: - normal: {foreground: "#ebdbb2"} - directory: {foreground: "#83a598"} - symlink: {foreground: "#8ec07c"} - pipe: {foreground: "#928374"} - block_device: {foreground: "#fb4934"} - char_device: {foreground: "#fb4934"} - socket: {foreground: "#665c54"} - special: {foreground: "#d3869b"} - executable: {foreground: "#b8bb26"} - mount_point: {foreground: "#fe8019"} - -perms: - user_read: {foreground: "#ebdbb2"} - user_write: {foreground: "#fabd2f"} - user_execute_file: {foreground: "#b8bb26"} - user_execute_other: {foreground: "#b8bb26"} - group_read: {foreground: "#ebdbb2"} - group_write: {foreground: "#fabd2f"} - group_execute: {foreground: "#b8bb26"} - other_read: {foreground: "#bdae93"} - other_write: {foreground: "#fabd2f"} - other_execute: {foreground: "#b8bb26"} - special_user_file: {foreground: "#d3869b"} - special_other: {foreground: "#928374"} - attribute: {foreground: "#bdae93"} - -size: - major: {foreground: "#bdae93"} - minor: {foreground: "#8ec07c"} - number_byte: {foreground: "#ebdbb2"} - number_kilo: {foreground: "#ebdbb2"} - number_mega: {foreground: "#83a598"} - number_giga: {foreground: "#d3869b"} - number_huge: {foreground: "#d3869b"} - unit_byte: {foreground: "#bdae93"} - unit_kilo: {foreground: "#83a598"} - unit_mega: {foreground: "#d3869b"} - unit_giga: {foreground: "#d3869b"} - unit_huge: {foreground: "#fe8019"} - -users: - user_you: {foreground: "#ebdbb2"} - user_root: {foreground: "#fb4934"} - user_other: {foreground: "#d3869b"} - group_yours: {foreground: "#ebdbb2"} - group_other: {foreground: "#928374"} - group_root: {foreground: "#fb4934"} - -links: - normal: {foreground: "#8ec07c"} - multi_link_file: {foreground: "#fe8019"} - -git: - new: {foreground: "#b8bb26"} - modified: {foreground: "#fabd2f"} - deleted: {foreground: "#fb4934"} - renamed: {foreground: "#8ec07c"} - typechange: {foreground: "#d3869b"} - ignored: {foreground: "#928374"} - conflicted: {foreground: "#cc241d"} - -git_repo: - branch_main: {foreground: "#ebdbb2"} - branch_other: {foreground: "#d3869b"} - git_clean: {foreground: "#b8bb26"} - git_dirty: {foreground: "#fb4934"} - -security_context: - colon: {foreground: "#928374"} - user: {foreground: "#ebdbb2"} - role: {foreground: "#d3869b"} - typ: {foreground: "#665c54"} - range: {foreground: "#d3869b"} - -file_type: - image: {foreground: "#fabd2f"} - video: {foreground: "#fb4934"} - music: {foreground: "#b8bb26"} - lossless: {foreground: "#8ec07c"} - crypto: {foreground: "#928374"} - document: {foreground: "#ebdbb2"} - compressed: {foreground: "#d3869b"} - temp: {foreground: "#cc241d"} - compiled: {foreground: "#83a598"} - build: {foreground: "#928374"} - source: {foreground: "#83a598"} - -punctuation: {foreground: "#928374"} -date: {foreground: "#fabd2f"} -inode: {foreground: "#bdae93"} -blocks: {foreground: "#a89984"} -header: {foreground: "#ebdbb2"} -octal: {foreground: "#8ec07c"} -flags: {foreground: "#d3869b"} - -symlink_path: {foreground: "#8ec07c"} -control_char: {foreground: "#83a598"} -broken_symlink: {foreground: "#fb4934"} -broken_path_overlay: {foreground: "#928374"} diff --git a/themes/gruvbox/hyprland.conf b/themes/gruvbox/hyprland.conf index 85dbf144..029cc908 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/mako.ini b/themes/gruvbox/mako.ini index 669c6f5a..5d2d17cc 100644 --- a/themes/gruvbox/mako.ini +++ b/themes/gruvbox/mako.ini @@ -3,8 +3,3 @@ include=~/.local/share/omarchy/default/mako/core.ini text-color=#d4be98 border-color=#a89984 background-color=#282828 -padding=10 -border-size=2 -font=Liberation Sans 11 -max-icon-size=32 -outer-margin=20 \ No newline at end of file diff --git a/themes/gruvbox/preview.png b/themes/gruvbox/preview.png index 61d13c3f..f934bafa 100644 Binary files a/themes/gruvbox/preview.png and b/themes/gruvbox/preview.png differ diff --git a/themes/hackerman/alacritty.toml b/themes/hackerman/alacritty.toml new file mode 100644 index 00000000..120c8c3a --- /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 00000000..7a36f6aa 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 00000000..a18aff80 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 00000000..76091891 --- /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 00000000..6950bd95 --- /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 00000000..e4ead98f --- /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 00000000..92d76498 --- /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 00000000..6a16b1ec --- /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 00000000..66be38a1 --- /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 00000000..628715f7 --- /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 00000000..0727a1f1 --- /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 00000000..d4588f0e --- /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 00000000..b574b952 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 00000000..b89c9617 --- /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 00000000..95f432be --- /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 00000000..82521c58 --- /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 00000000..8f44e7a0 --- /dev/null +++ b/themes/hackerman/waybar.css @@ -0,0 +1,2 @@ +@define-color background #0B0C16; +@define-color foreground #ddf7ff; diff --git a/themes/kanagawa/hyprland.conf b/themes/kanagawa/hyprland.conf index 5153e8a8..b5b6403a 100644 --- a/themes/kanagawa/hyprland.conf +++ b/themes/kanagawa/hyprland.conf @@ -1,5 +1,11 @@ +$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 diff --git a/themes/kanagawa/mako.ini b/themes/kanagawa/mako.ini index fe944d8a..ca2e939c 100644 --- a/themes/kanagawa/mako.ini +++ b/themes/kanagawa/mako.ini @@ -3,8 +3,3 @@ include=~/.local/share/omarchy/default/mako/core.ini text-color=#dcd7ba border-color=#dcd7ba background-color=#1f1f28 -padding=10 -border-size=2 -font=Liberation Sans 11 -max-icon-size=32 -outer-margin=20 \ No newline at end of file diff --git a/themes/kanagawa/preview.png b/themes/kanagawa/preview.png index e75e1189..db3ab75a 100644 Binary files a/themes/kanagawa/preview.png and b/themes/kanagawa/preview.png 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 00000000..b76792cb Binary files /dev/null and b/themes/matte-black/backgrounds/2-matte-black-hands.jpg differ diff --git a/themes/matte-black/hyprland.conf b/themes/matte-black/hyprland.conf index bb90b384..4fd7ff60 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/mako.ini b/themes/matte-black/mako.ini index a0e6653b..0515363c 100644 --- a/themes/matte-black/mako.ini +++ b/themes/matte-black/mako.ini @@ -3,8 +3,3 @@ include=~/.local/share/omarchy/default/mako/core.ini text-color=#8a8a8d border-color=#8A8A8D background-color=#1e1e1e -padding=10 -border-size=2 -font=Liberation Sans 11 -max-icon-size=32 -outer-margin=20 diff --git a/themes/matte-black/preview.png b/themes/matte-black/preview.png index 63a7ceaf..3aff6390 100644 Binary files a/themes/matte-black/preview.png and b/themes/matte-black/preview.png differ diff --git a/themes/matte-black/swayosd.css b/themes/matte-black/swayosd.css index 3f24dbb4..b00ea2f5 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/nord/hyprland.conf b/themes/nord/hyprland.conf index bce729fe..ac91e8bb 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/mako.ini b/themes/nord/mako.ini index 2976506d..5eaadd9a 100644 --- a/themes/nord/mako.ini +++ b/themes/nord/mako.ini @@ -3,8 +3,3 @@ include=~/.local/share/omarchy/default/mako/core.ini text-color=#d8dee9 border-color=#D8DEE9 background-color=#2e3440 -padding=10 -border-size=2 -font=Liberation Sans 11 -max-icon-size=32 -outer-margin=20 \ No newline at end of file diff --git a/themes/nord/preview.png b/themes/nord/preview.png index 4e36427f..07a1692b 100644 Binary files a/themes/nord/preview.png and b/themes/nord/preview.png differ diff --git a/themes/osaka-jade/alacritty.toml b/themes/osaka-jade/alacritty.toml index 6229daa0..3cb8513a 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 index f26aa996..75eb6685 100644 --- a/themes/osaka-jade/ghostty.conf +++ b/themes/osaka-jade/ghostty.conf @@ -17,7 +17,7 @@ palette = 7=#F6F5DD # bright colors palette = 8=#53685B palette = 9=#db9f9c -palette = 10=#143614 +palette = 10=#63b07a palette = 11=#E5C736 palette = 12=#ACD4CF palette = 13=#75bbb3 diff --git a/themes/osaka-jade/hyprland.conf b/themes/osaka-jade/hyprland.conf index 1b8b0a9b..fd7c0363 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 index 78317228..cd6c84e5 100644 --- a/themes/osaka-jade/kitty.conf +++ b/themes/osaka-jade/kitty.conf @@ -20,7 +20,7 @@ color9 #DB9F9C # green color2 #549E6A -color10 #143614 +color10 #63b07a # yellow color3 #459451 diff --git a/themes/osaka-jade/mako.ini b/themes/osaka-jade/mako.ini index 44897998..22fe2aae 100644 --- a/themes/osaka-jade/mako.ini +++ b/themes/osaka-jade/mako.ini @@ -3,8 +3,3 @@ include=~/.local/share/omarchy/default/mako/core.ini text-color=#C1C497 border-color=#214237 background-color=#11221C -padding=10 -border-size=2 -font=Liberation Sans 12 -max-icon-size=32 -outer-margin=5 \ No newline at end of file diff --git a/themes/osaka-jade/neovim.lua b/themes/osaka-jade/neovim.lua index b2bd3f20..30afe400 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 index bd99eed0..4b446055 100644 Binary files a/themes/osaka-jade/preview.png and b/themes/osaka-jade/preview.png differ diff --git a/themes/ristretto/ghostty.conf b/themes/ristretto/ghostty.conf index f4ba692b..94a80fcb 100644 --- a/themes/ristretto/ghostty.conf +++ b/themes/ristretto/ghostty.conf @@ -1 +1,2 @@ theme = Monokai Pro Ristretto +cursor-text = #000000 diff --git a/themes/ristretto/hyprland.conf b/themes/ristretto/hyprland.conf index d81a993b..d8ffcdb9 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 index 7af91435..7640e7cc 100644 --- a/themes/ristretto/kitty.conf +++ b/themes/ristretto/kitty.conf @@ -11,15 +11,15 @@ cursor_text_color #c3b7b8 url_color #e6d9db -active_border_color #595959 +active_border_color #e6d9db inactive_border_color #595959 bell_border_color #595959 -active_tab_foreground #e6d9db -active_tab_background #2c2525 +active_tab_foreground #2c2525 +active_tab_background #f9cc6c inactive_tab_foreground #e6d9db inactive_tab_background #2c2525 -tab_bar_background #e6d9db +tab_bar_background #404040 mark1_foreground #2c2525 mark1_background #404040 diff --git a/themes/ristretto/mako.ini b/themes/ristretto/mako.ini index a88e281b..732a96df 100644 --- a/themes/ristretto/mako.ini +++ b/themes/ristretto/mako.ini @@ -3,8 +3,3 @@ include=~/.local/share/omarchy/default/mako/core.ini text-color=#e6d9db border-color=#e6d9db background-color=#2c2525 -padding=10 -border-size=2 -font=Liberation Sans 11 -max-icon-size=32 -outer-margin=20 \ No newline at end of file diff --git a/themes/ristretto/neovim.lua b/themes/ristretto/neovim.lua index 38959d47..4263da70 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 index d4ab5ca8..e138d51e 100644 Binary files a/themes/ristretto/preview.png and b/themes/ristretto/preview.png differ diff --git a/themes/rose-pine/eza.yml b/themes/rose-pine/eza.yml deleted file mode 100644 index cc65ef0e..00000000 --- a/themes/rose-pine/eza.yml +++ /dev/null @@ -1,123 +0,0 @@ -# see https://github.com/eza-community/eza-themes/blob/main/themes/rose-pine.yml - -colourful: true - -# Colors are in format of: -# color/paletteRef (Description) #color code - -# Gold (Terminal Yellow) #f6c177 -# Love (Terminal Red) #eb6f92 -# Rose (Terminal Cyan) #ebbcba -# Base (Primary Background) #191724 -# Iris (Terminal Magenta) #c4a7e7 -# Foam (Terminal Blue) #9ccfd8 -# Pine (Terminal Green) #31748f -# Muted (Low Contrast Foreground) #6e6a86 -# Surface (Secondary Background Atop Base) #1f1d2e -# Overlay (Tertiary Background Atop Surface) #26233a -# Subtle (Medium Contrast Foreground) #908caa -# Text (High Contrast Foreground) #e0def4 -# Highlight Low (Low Contrast Highlight) #21202e -# Highlight Med (Medium Contrast Highlight) #403d52 -# Highlight High (High Contrast Highlight) #524f67 - -filekinds: - normal: {foreground: "#e0def4"} - directory: {foreground: "#9ccfd8"} - symlink: {foreground: "#524f67"} - pipe: {foreground: "#908caa"} - block_device: {foreground: "#ebbcba"} - char_device: {foreground: "#f6c177"} - socket: {foreground: "#21202e"} - special: {foreground: "#c4a7e7"} - executable: {foreground: "#c4a7e7"} - mount_point: {foreground: "#403d52"} - -perms: - user_read: {foreground: "#908caa"} - user_write: {foreground: "#403d52"} - user_execute_file: {foreground: "#c4a7e7"} - user_execute_other: {foreground: "#c4a7e7"} - group_read: {foreground: "#908caa"} - group_write: {foreground: "#403d52"} - group_execute: {foreground: "#c4a7e7"} - other_read: {foreground: "#908caa"} - other_write: {foreground: "#403d52"} - other_execute: {foreground: "#c4a7e7"} - special_user_file: {foreground: "#c4a7e7"} - special_other: {foreground: "#403d52"} - attribute: {foreground: "#908caa"} - -size: - major: {foreground: "#908caa"} - minor: {foreground: "#9ccfd8"} - number_byte: {foreground: "#908caa"} - number_kilo: {foreground: "#524f67"} - number_mega: {foreground: "#31748f"} - number_giga: {foreground: "#c4a7e7"} - number_huge: {foreground: "#c4a7e7"} - unit_byte: {foreground: "#908caa"} - unit_kilo: {foreground: "#31748f"} - unit_mega: {foreground: "#c4a7e7"} - unit_giga: {foreground: "#c4a7e7"} - unit_huge: {foreground: "#9ccfd8"} - -users: - user_you: {foreground: "#f6c177"} - user_root: {foreground: "#eb6f92"} - user_other: {foreground: "#c4a7e7"} - group_yours: {foreground: "#524f67"} - group_other: {foreground: "#6e6a86"} - group_root: {foreground: "#eb6f92"} - -links: - normal: {foreground: "#9ccfd8"} - multi_link_file: {foreground: "#31748f"} - -git: - new: {foreground: "#9ccfd8"} - modified: {foreground: "#f6c177"} - deleted: {foreground: "#eb6f92"} - renamed: {foreground: "#31748f"} - typechange: {foreground: "#c4a7e7"} - ignored: {foreground: "#6e6a86"} - conflicted: {foreground: "#ebbcba"} - -git_repo: - branch_main: {foreground: "#908caa"} - branch_other: {foreground: "#c4a7e7"} - git_clean: {foreground: "#9ccfd8"} - git_dirty: {foreground: "#eb6f92"} - -security_context: - colon: {foreground: "#908caa"} - user: {foreground: "#9ccfd8"} - role: {foreground: "#c4a7e7"} - typ: {foreground: "#6e6a86"} - range: {foreground: "#c4a7e7"} - -file_type: - image: {foreground: "#f6c177"} - video: {foreground: "#eb6f92"} - music: {foreground: "#9ccfd8"} - lossless: {foreground: "#6e6a86"} - crypto: {foreground: "#403d52"} - document: {foreground: "#908caa"} - compressed: {foreground: "#c4a7e7"} - temp: {foreground: "#ebbcba"} - compiled: {foreground: "#31748f"} - build: {foreground: "#6e6a86"} - source: {foreground: "#ebbcba"} - -punctuation: {foreground: "#524f67"} -date: {foreground: "#31748f"} -inode: {foreground: "#908caa"} -blocks: {foreground: "#6e6a86"} -header: {foreground: "#908caa"} -octal: {foreground: "#9ccfd8"} -flags: {foreground: "#c4a7e7"} - -symlink_path: {foreground: "#9ccfd8"} -control_char: {foreground: "#31748f"} -broken_symlink: {foreground: "#eb6f92"} -broken_path_overlay: {foreground: "#524f67"} diff --git a/themes/rose-pine/hyprland.conf b/themes/rose-pine/hyprland.conf index ae0f2b6b..34d47643 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/mako.ini b/themes/rose-pine/mako.ini index 10f76e58..f2284fc8 100644 --- a/themes/rose-pine/mako.ini +++ b/themes/rose-pine/mako.ini @@ -3,8 +3,3 @@ include=~/.local/share/omarchy/default/mako/core.ini text-color=#575279 border-color=#575279 background-color=#faf4ed -padding=10 -border-size=2 -font=Liberation Sans 11 -max-icon-size=32 -outer-margin=20 \ No newline at end of file diff --git a/themes/rose-pine/preview.png b/themes/rose-pine/preview.png index 02d85d08..70392181 100644 Binary files a/themes/rose-pine/preview.png and b/themes/rose-pine/preview.png differ diff --git a/themes/tokyo-night/eza.yml b/themes/tokyo-night/eza.yml deleted file mode 100644 index c2271238..00000000 --- a/themes/tokyo-night/eza.yml +++ /dev/null @@ -1,104 +0,0 @@ -# see https://github.com/eza-community/eza-themes/blob/main/themes/tokyonight.yml - -colourful: true - -filekinds: - normal: { foreground: "#c0caf5" } - directory: { foreground: "#7aa2f7" } - symlink: { foreground: "#2ac3de" } - pipe: { foreground: "#414868" } - block_device: { foreground: "#e0af68" } - char_device: { foreground: "#e0af68" } - socket: { foreground: "#414868" } - special: { foreground: "#9d7cd8" } - executable: { foreground: "#9ece6a" } - mount_point: { foreground: "#b4f9f8" } - -perms: - user_read: { foreground: "#2ac3de" } - user_write: { foreground: "#bb9af7" } - user_execute_file: { foreground: "#9ece6a" } - user_execute_other: { foreground: "#9ece6a" } - group_read: { foreground: "#2ac3de" } - group_write: { foreground: "#ff9e64" } - group_execute: { foreground: "#9ece6a" } - other_read: { foreground: "#2ac3de" } - other_write: { foreground: "#ff007c" } - other_execute: { foreground: "#9ece6a" } - special_user_file: { foreground: "#ff007c" } - special_other: { foreground: "#db4b4b" } - attribute: { foreground: "#737aa2" } - -size: - major: { foreground: "#2ac3de" } - minor: { foreground: "#9d7cd8" } - number_byte: { foreground: "#a9b1d6" } - number_kilo: { foreground: "#89ddff" } - number_mega: { foreground: "#2ac3de" } - number_giga: { foreground: "#ff9e64" } - number_huge: { foreground: "#ff007c" } - unit_byte: { foreground: "#a9b1d6" } - unit_kilo: { foreground: "#89ddff" } - unit_mega: { foreground: "#2ac3de" } - unit_giga: { foreground: "#ff9e64" } - unit_huge: { foreground: "#ff007c" } - -users: - user_you: { foreground: "#3d59a1" } - user_root: { foreground: "#bb9af7" } - user_other: { foreground: "#2ac3de" } - group_yours: { foreground: "#89ddff" } - group_root: { foreground: "#bb9af7" } - group_other: { foreground: "#c0caf5" } - -links: - normal: { foreground: "#89ddff" } - multi_link_file: { foreground: "#2ac3de" } - -git: - new: { foreground: "#9ece6a" } - modified: { foreground: "#bb9af7" } - deleted: { foreground: "#db4b4b" } - renamed: { foreground: "#2ac3de" } - typechange: { foreground: "#2ac3de" } - ignored: { foreground: "#545c7e" } - conflicted: { foreground: "#ff9e64" } - -git_repo: - branch_main: { foreground: "#737aa2" } - branch_other: { foreground: "#b4f9f8" } - git_clean: { foreground: "#292e42" } - git_dirty: { foreground: "#bb9af7" } - -security_context: - colon: { foreground: "#545c7e" } - user: { foreground: "#737aa2" } - role: { foreground: "#2ac3de" } - typ: { foreground: "#3d59a1" } - range: { foreground: "#9d7cd8" } - -file_type: - image: { foreground: "#89ddff" } - video: { foreground: "#b4f9f8" } - music: { foreground: "#73daca" } - lossless: { foreground: "#41a6b5" } - crypto: { foreground: "#db4b4b" } - document: { foreground: "#a9b1d6" } - compressed: { foreground: "#ff9e64" } - temp: { foreground: "#737aa2" } - compiled: { foreground: "#737aa2" } - build: { foreground: "#1abc9c" } - source: { foreground: "#bb9af7" } - -punctuation: { foreground: "#414868" } -date: { foreground: "#e0af68" } -inode: { foreground: "#737aa2" } -blocks: { foreground: "#737aa2" } -header: { foreground: "#a9b1d6" } -octal: { foreground: "#ff9e64" } -flags: { foreground: "#9d7cd8" } - -symlink_path: { foreground: "#89ddff" } -control_char: { foreground: "#ff9e64" } -broken_symlink: { foreground: "#ff007c" } -broken_path_overlay: { foreground: "#ff007c" } diff --git a/themes/tokyo-night/hyprland.conf b/themes/tokyo-night/hyprland.conf index f0b824a1..779a27d4 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/mako.ini b/themes/tokyo-night/mako.ini index c0fae2eb..b1649be1 100644 --- a/themes/tokyo-night/mako.ini +++ b/themes/tokyo-night/mako.ini @@ -1,10 +1,5 @@ include=~/.local/share/omarchy/default/mako/core.ini -text-color=#a9b1d6 +text-color=#c0caf5 border-color=#33ccff background-color=#1a1b26 -padding=10 -border-size=2 -font=Liberation Sans 11 -max-icon-size=32 -outer-margin=20 \ No newline at end of file diff --git a/themes/tokyo-night/neovim.lua b/themes/tokyo-night/neovim.lua index dad2d30b..39327c9b 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 index 2c0eb4fa..8dab01d4 100644 Binary files a/themes/tokyo-night/preview.png and b/themes/tokyo-night/preview.png differ diff --git a/version b/version new file mode 100644 index 00000000..be94e6f5 --- /dev/null +++ b/version @@ -0,0 +1 @@ +3.2.2