diff --git a/applications/hidden/uuctl.desktop b/applications/hidden/uuctl.desktop new file mode 100644 index 0000000..e1e3e17 --- /dev/null +++ b/applications/hidden/uuctl.desktop @@ -0,0 +1,2 @@ +[Desktop Entry] +Hidden=true diff --git a/applications/omarchy.desktop b/applications/omarchy.desktop new file mode 100644 index 0000000..0447829 --- /dev/null +++ b/applications/omarchy.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Omarchy +Comment=Omarchy TUI +Exec=alacritty --class=Omarchy --title=Omarchy -e bash -c '$HOME/.local/share/omarchy/bin/omarchy' +Icon=Arch +Terminal=false +Categories=System;Utility; +StartupNotify=false \ No newline at end of file diff --git a/applications/xtras/typora.desktop b/applications/xtras/typora.desktop new file mode 100644 index 0000000..c1af035 --- /dev/null +++ b/applications/xtras/typora.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Typora +GenericName=Markdown Editor +Exec=typora --enable-wayland-ime %U +Icon=typora +Type=Application +StartupNotify=true +Categories=Office;WordProcessor; +MimeType=text/markdown;text/x-markdown; + diff --git a/bin/omarchy b/bin/omarchy new file mode 100755 index 0000000..ccb8564 --- /dev/null +++ b/bin/omarchy @@ -0,0 +1,137 @@ +#!/bin/bash + +OMARCHY_VERSION=$(git -C ~/.local/share/omarchy describe --tags --abbrev=0 2>/dev/null) +PATH="$PATH:$HOME/.local/share/omarchy/bin" + +show_ascii_art() { + clear + cat <<'EOF' + ▄██████▄ ▄▄▄▄███▄▄▄▄ ▄████████ ▄████████ ▄████████ ▄█ █▄ ▄██ ▄ +███ ███ ▄██▀▀▀███▀▀▀██▄ ███ ███ ███ ███ ███ ███ ███ ███ ███ ██▄ +███ ███ ███ ███ ███ ███ ███ ███ ███ ███ █▀ ███ ███ ███▄▄▄███ +███ ███ ███ ███ ███ ███ ███ ▄███▄▄▄▄██▀ ███ ▄███▄▄▄▄███▄▄ ▀▀▀▀▀▀███ +███ ███ ███ ███ ███ ▀███████████ ▀▀███▀▀▀▀▀ ███ ▀▀███▀▀▀▀███▀ ▄██ ███ +███ ███ ███ ███ ███ ███ ███ ▀███████████ ███ █▄ ███ ███ ███ ███ +███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ + ▀██████▀ ▀█ ███ █▀ ███ █▀ ███ ███ ████████▀ ███ █▀ ▀█████▀ + ███ ███ +EOF + echo " $OMARCHY_VERSION" +} + +main_menu() { + show_ascii_art + + local options=("Theme" "Setup" "Update" "Manual" "Exit") + choice=$(printf "%s\n" "${options[@]}" | gum choose --header "") || exit 0 + case "$choice" in + Theme) theme_menu ;; + Update) update_menu ;; + Setup) setup_menu ;; + Manual) open_manual ;; + Exit) clear && exit 0 ;; + esac +} + +update_menu() { + show_ascii_art + local menu=("Omarchy" "Waybar" "Wofi" "Plymouth" "Desktop apps" "Back") + local commands=( + "omarchy-update" + "omarchy-refresh-waybar" + "omarchy-refresh-wofi" + "omarchy-refresh-plymouth" + "omarchy-refresh-applications" + "main_menu" + ) + local choice + choice=$(printf "%s\n" "${menu[@]}" | gum choose --header="Update") || main_menu + for i in "${!menu[@]}"; do + if [[ "${menu[$i]}" == "$choice" ]]; then + if [[ "$choice" == "Back" ]]; then + main_menu + else + eval "${commands[$i]}" + ack_command + main_menu + fi + break + fi + done +} + +theme_menu() { + show_ascii_art + local menu=("Install" "Remove" "Back") + local commands=( + "install_theme_prompt" + "remove_theme_prompt" + "main_menu" + ) + local choice + choice=$(printf "%s\n" "${menu[@]}" | gum choose --header="Theme") || main_menu + for i in "${!menu[@]}"; do + if [[ "${menu[$i]}" == "$choice" ]]; then + if [[ "$choice" == "Back" ]]; then + main_menu + else + eval "${commands[$i]}" + ack_command + main_menu + fi + break + fi + done +} + +install_theme_prompt() { + local url + url=$(gum input --placeholder="Git repo URL for theme" --header="") + if [[ -n "$url" ]]; then + omarchy-theme-install "$url" + fi + theme_menu +} + +remove_theme_prompt() { + local theme + theme=$(gum input --placeholder="Theme name" --header="") + if [[ -n "$theme" ]]; then + omarchy-theme-remove "$theme" + fi + theme_menu +} + +setup_menu() { + show_ascii_art + local menu=("Fingerprint sensor" "Back") + local commands=( + "omarchy-fingerprint-setup" + "main_menu" + ) + local choice + choice=$(printf "%s\n" "${menu[@]}" | gum choose --header="Setup") || main_menu + for i in "${!menu[@]}"; do + if [[ "${menu[$i]}" == "$choice" ]]; then + if [[ "$choice" == "Back" ]]; then + main_menu + else + eval "${commands[$i]}" + ack_command + main_menu + fi + break + fi + done +} + +open_manual() { + xdg-open "https://manuals.omamix.org/2/the-omarchy-manual" +} + +ack_command() { + gum spin --spinner "globe" --title "Done!" -- sleep 1 +} + +main_menu + diff --git a/bin/apple-display-brightness b/bin/omarchy-apple-display-brightness similarity index 100% rename from bin/apple-display-brightness rename to bin/omarchy-apple-display-brightness diff --git a/bin/omarchy-config-link b/bin/omarchy-dev-config-link similarity index 100% rename from bin/omarchy-config-link rename to bin/omarchy-dev-config-link diff --git a/bin/omarchy-fingerprint-setup b/bin/omarchy-fingerprint-setup index dd71aaa..18545eb 100755 --- a/bin/omarchy-fingerprint-setup +++ b/bin/omarchy-fingerprint-setup @@ -2,7 +2,7 @@ yay -S --noconfirm --needed fprintd usbutils -if ! lsusb | grep -iq fingerprint; then +if ! lsusb | grep -Eiq 'fingerprint|synaptics|goodix'; then echo -e "\e[31m\nNo fingerprint sensor detected.\e[0m" else # Add fingerprint authentication as an option for sudo diff --git a/bin/omarchy-power-menu b/bin/omarchy-power-menu index 6c8d6a7..b9989e4 100755 --- a/bin/omarchy-power-menu +++ b/bin/omarchy-power-menu @@ -15,7 +15,7 @@ show_power_menu() { case "$selection" in *Lock*) hyprlock ;; *Suspend*) systemctl suspend ;; - *Relaunch*) hyprctl dispatch exit ;; + *Relaunch*) uwsm stop ;; *Restart*) systemctl reboot ;; *Shutdown*) systemctl poweroff ;; esac diff --git a/bin/omarchy-sync-applications b/bin/omarchy-refresh-applications similarity index 100% rename from bin/omarchy-sync-applications rename to bin/omarchy-refresh-applications diff --git a/bin/omarchy-refresh-waybar b/bin/omarchy-refresh-waybar index 1d63341..8317168 100755 --- a/bin/omarchy-refresh-waybar +++ b/bin/omarchy-refresh-waybar @@ -1,6 +1,6 @@ #!/bin/bash -if gum confirm "Refresh Waybar config? This will replace your current Waybar settings with Omarchy defaults."; then +if gum confirm "Refresh Waybar config? This will replace your current settings with Omarchy defaults."; then # Overwrite local waybar settings with the latest in Omarchy cp -f ~/.local/share/omarchy/config/waybar/config ~/.config/waybar/ 2>/dev/null cp -f ~/.local/share/omarchy/config/waybar/style.css ~/.config/waybar/ 2>/dev/null diff --git a/bin/omarchy-refresh-wofi b/bin/omarchy-refresh-wofi new file mode 100755 index 0000000..d6d359c --- /dev/null +++ b/bin/omarchy-refresh-wofi @@ -0,0 +1,7 @@ +#!/bin/bash + +if gum confirm "Refresh Wofi config? This will replace your current settings with Omarchy defaults."; then + # Overwrite local waybar settings with the latest in Omarchy + cp -f ~/.local/share/omarchy/config/wofi/config ~/.config/wofi/ 2>/dev/null + cp -f ~/.local/share/omarchy/config/wofi/style.css ~/.config/wofi/ 2>/dev/null +fi diff --git a/bin/swaybg-next b/bin/omarchy-theme-bg-next similarity index 100% rename from bin/swaybg-next rename to bin/omarchy-theme-bg-next diff --git a/bin/omarchy-theme-install b/bin/omarchy-theme-install new file mode 100755 index 0000000..f7d3008 --- /dev/null +++ b/bin/omarchy-theme-install @@ -0,0 +1,38 @@ +#!/bin/bash + +# omarchy-theme-install: Install a new theme from a git repo for Omarchy +# Usage: omarchy-theme-install + +if [ -z "$1" ]; then + echo "Usage: omarchy-theme-install " + exit 1 +fi + +REPO_URL="$1" +THEMES_DIR="$HOME/.config/omarchy/themes" +THEME_NAME=$(basename "$REPO_URL" .git) +THEME_PATH="$THEMES_DIR/$THEME_NAME" +THEME_BACKGROUND_PATH="$THEME_PATH/backgrounds" +BACKGROUNDS_PATH="$HOME/.config/omarchy/backgrounds" +BACKGROUNDS_THEME_PATH="$BACKGROUNDS_PATH/$THEME_NAME" + +# Remove existing theme if present +if [ -d "$THEME_PATH" ]; then + rm -rf "$THEME_PATH" +fi + +# Clone the repo directly to ~/.config/omarchy/themes +if ! git clone "$REPO_URL" "$THEME_PATH"; then + echo "Error: Failed to clone theme repo." + exit 1 +fi + +# Copy backgrounds if present +if [ -d $THEME_BACKGROUND_PATH ]; then + mkdir -p $BACKGROUNDS_THEME_PATH + cp $THEME_BACKGROUND_PATH/* $BACKGROUNDS_THEME_PATH/ +fi + +# Apply the new theme with omarchy-theme-set +omarchy-theme-set $THEME_NAME + diff --git a/bin/omarchy-theme-menu b/bin/omarchy-theme-menu new file mode 100755 index 0000000..433c954 --- /dev/null +++ b/bin/omarchy-theme-menu @@ -0,0 +1,38 @@ +#!/bin/bash + +THEMES_DIR="$HOME/.config/omarchy/themes/" +CURRENT_THEME_DIR="$HOME/.config/omarchy/current/theme" +CURRENT_THEME_NAME=$(basename "$(realpath "$CURRENT_THEME_DIR")") + +# Build themes list with pretty display names +mapfile -t themes < <( + find "$THEMES_DIR" -mindepth 1 -maxdepth 1 \( -type d -o -type l \) | while read -r path; do + filename=$(basename "$path") + display_name=$(echo "$filename" | sed -E 's/(^|-)([a-z])/\1\u\2/g; s/-/ /g') + + if [[ "$filename" == "$CURRENT_THEME_NAME" ]]; then + echo "$display_name" + else + echo "$display_name" + fi + done | sort +) + +# Show Wofi menu (with markup support) +selection=$(printf '%s\n' "${themes[@]}" | wofi \ + --show dmenu \ + --allow-markup \ + --width 150 \ + --height 300 \ + -O alphabetical \ + --style ~/.local/share/omarchy/default/wofi/select.css) + +# Remove any Pango markup before converting back to filename +clean_selection=$(echo "$selection" | sed -E 's/<[^>]+>//g') + +# Convert to lowercase and dash-separated: "Tokyo Night" -> "tokyo-night" +selected_theme=$(echo "$clean_selection" | tr '[:upper:]' '[:lower:]' | tr ' ' '-') + +# Apply the selected theme +"$HOME/.local/share/omarchy/bin/omarchy-theme-set" "$selected_theme" + diff --git a/bin/omarchy-theme-next b/bin/omarchy-theme-next index 40ace80..eb97d90 100755 --- a/bin/omarchy-theme-next +++ b/bin/omarchy-theme-next @@ -3,20 +3,22 @@ THEMES_DIR="$HOME/.config/omarchy/themes/" CURRENT_THEME_LINK="$HOME/.config/omarchy/current/theme" -THEMES=($(find "$THEMES_DIR" -mindepth 1 | sort)) +THEMES=($(find "$THEMES_DIR" -mindepth 1 -maxdepth 1 | sort)) TOTAL=${#THEMES[@]} # Get current theme from symlink if [[ -L "$CURRENT_THEME_LINK" ]]; then - CURRENT_THEME=$(readlink "$CURRENT_THEME_LINK") + CURRENT_THEME=$(realpath "$CURRENT_THEME_LINK") else # Default to first theme if no symlink exists - CURRENT_THEME=${THEMES[0]} + CURRENT_THEME=$(realpath "${THEMES[0]}") fi # Find current theme index INDEX=0 for i in "${!THEMES[@]}"; do + THEMES[$i]=$(realpath "${THEMES[$i]}") + if [[ "${THEMES[$i]}" == "$CURRENT_THEME" ]]; then INDEX=$i break @@ -28,22 +30,5 @@ NEXT_INDEX=$(((INDEX + 1) % TOTAL)) NEW_THEME=${THEMES[$NEXT_INDEX]} NEW_THEME_NAME=$(basename "$NEW_THEME") -# Set current theme -ln -nsf "$HOME/.config/omarchy/backgrounds/$NEW_THEME_NAME" "$HOME/.config/omarchy/current/backgrounds" -ln -nsf "$NEW_THEME" "$HOME/.config/omarchy/current/theme" - -# Touch alacritty config to pickup the changed theme -touch "$HOME/.config/alacritty/alacritty.toml" - -# Restart for new theme -pkill -SIGUSR2 waybar -makoctl reload -hyprctl reload - -# Set new background -ln -nsf $(find "$HOME/.config/omarchy/current/backgrounds/" -type f | head -n 1) "$HOME/.config/omarchy/current/background" -pkill -x swaybg -setsid swaybg -i "$HOME/.config/omarchy/current/background" -m fill & - -# Notify of the new theme +omarchy-theme-set $NEW_THEME_NAME notify-send "Theme changed to $NEW_THEME_NAME" -t 2000 diff --git a/bin/omarchy-theme-remove b/bin/omarchy-theme-remove new file mode 100755 index 0000000..b1fe7a2 --- /dev/null +++ b/bin/omarchy-theme-remove @@ -0,0 +1,33 @@ +#!/bin/bash + +# omarchy-theme-remove: Remove a theme from Omarchy by name +# Usage: omarchy-theme-remove + +if [ -z "$1" ]; then + echo "Usage: omarchy-theme-remove " + exit 1 +fi + +THEME_NAME="$1" +THEMES_DIR="$HOME/.config/omarchy/themes" +BACKGROUND_DIR="$HOME/.config/omarchy/backgrounds" +CURRENT_DIR="$HOME/.config/omarchy/current" + +THEME_PATH="$THEMES_DIR/$THEME_NAME" +BACKGROUND_PATH="$BACKGROUND_DIR/$THEME_NAME" + +# Check if theme exists before attempting removal +if [ ! -d "$THEME_PATH" ]; then + echo "Error: Theme '$THEME_NAME' not found." + exit 1 +fi + +# Use readlink -f to resolve symlinks and get the absolute path +if [ "$(readlink -f "$CURRENT_DIR/theme")" = "$(readlink -f "$THEME_PATH")" ]; then + "$HOME/.local/share/omarchy/bin/omarchy-theme-next" +fi + +# Now remove the theme directory and backgrounds for THEME_NAME +rm -rf "$THEME_PATH" +rm -rf "$BACKGROUND_PATH" + diff --git a/bin/omarchy-theme-set b/bin/omarchy-theme-set new file mode 100755 index 0000000..46a5c35 --- /dev/null +++ b/bin/omarchy-theme-set @@ -0,0 +1,42 @@ +#!/bin/bash + +# omarchy-theme-set: Set a theme, specified by its name. +# Usage: omarchy-theme-set + +if [[ -z "$1" ]]; then + echo "Usage: omarchy-theme-set " >&2 + exit 1 +fi + +THEMES_DIR="$HOME/.config/omarchy/themes/" +CURRENT_THEME_DIR="$HOME/.config/omarchy/current/theme" + +THEME_NAME="$1" +THEME_PATH="$THEMES_DIR/$THEME_NAME" +BACKGROUND_PATH="$HOME/.config/omarchy/backgrounds/$THEME_NAME" + +# Check if the theme entered exists +if [[ ! -d "$THEME_PATH" ]]; then + echo "Theme '$THEME_NAME' does not exist in $THEMES_DIR" >&2 + exit 2 +fi + +# Update theme symlinks +ln -nsf "$BACKGROUND_PATH" "$HOME/.config/omarchy/current/backgrounds" +ln -nsf "$THEME_PATH" "$CURRENT_THEME_DIR" + +# Trigger alacritty config reload +touch "$HOME/.config/alacritty/alacritty.toml" + +# Restart components to apply new theme +pkill -SIGUSR2 waybar +makoctl reload +hyprctl reload + +# Set new background +first_bg=$(find "$HOME/.config/omarchy/current/backgrounds/" -type f | head -n 1) +if [[ -n "$first_bg" ]]; then + ln -nsf "$first_bg" "$HOME/.config/omarchy/current/background" + pkill -x swaybg + setsid swaybg -i "$HOME/.config/omarchy/current/background" -m fill >/dev/null & +fi diff --git a/config/environment.d/fcitx.conf b/config/environment.d/fcitx.conf index fbb5e69..ecedbcc 100644 --- a/config/environment.d/fcitx.conf +++ b/config/environment.d/fcitx.conf @@ -1,5 +1,4 @@ INPUT_METHOD=fcitx -GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx SDL_IM_MODULE=fcitx diff --git a/config/fontconfig/fonts.conf b/config/fontconfig/fonts.conf new file mode 100644 index 0000000..85c37b9 --- /dev/null +++ b/config/fontconfig/fonts.conf @@ -0,0 +1,58 @@ + + + + + + sans-serif + + + Liberation Sans + + + + + + serif + + + Liberation Serif + + + + + + monospace + + + CaskaydiaMono Nerd Font + + + + + system-ui + + Liberation Sans + + + + + ui-monospace + + monospace + + + + + -apple-system + + Liberation Sans + + + + + BlinkMacSystemFont + + Liberation Sans + + + diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 37223da..df35a76 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -1,5 +1,9 @@ # Learn how to configure Hyprland: https://wiki.hyprland.org/Configuring/ +# You're encouraged to tailor your Hyprland config in this file by adding or overwriting any settings. +# But don't change anything that lives in ~/.local/share/omarchy, if you can help it! +# Those files are overwritten when Omarchy is updated. + # Change your personal monitor setup in here to keep the main config portable source = ~/.config/hypr/monitors.conf @@ -44,6 +48,7 @@ bind = SUPER SHIFT, X, exec, $webapp="https://x.com/compose/post" # exec-once = dropbox-cli start # Extra env variables +# Note: You must relaunch Hyprland after changing envs (use Super+Esc, then Relaunch) # env = MY_GLOBAL_ENV,setting # Control your input devices diff --git a/config/hypr/monitors.conf b/config/hypr/monitors.conf index 8325e21..84db2ff 100644 --- a/config/hypr/monitors.conf +++ b/config/hypr/monitors.conf @@ -2,6 +2,7 @@ # Change to 1 if on a 1x display (then change last "auto" to 1 in monitor=) # Change to something like 1.75 for fractional scaling (can work well with 1.66667 monitor scaling) +# Note: You must relaunch Hyprland after changing any env like this (use Super+Esc, then Relaunch) env = GDK_SCALE,2 # Use single default monitor (see all monitors with: hyprctl monitors) diff --git a/config/waybar/config b/config/waybar/config index a71b652..9349bba 100644 --- a/config/waybar/config +++ b/config/waybar/config @@ -11,11 +11,12 @@ "clock" ], "modules-right": [ - "bluetooth", - "network", - "pulseaudio", - "cpu", - "battery" + "group/tray-expander", + "bluetooth", + "network", + "pulseaudio", + "cpu", + "battery" ], "hyprland/workspaces": { "on-click": "activate", @@ -41,6 +42,89 @@ "5": [] } }, + "cpu": { + "interval": 5, + "format": "󰍛", + "on-click": "alacritty -e btop" + }, + "clock": { + "format": "{:%A %H:%M}", + "format-alt": "{:%d %B W%V %Y}", + "tooltip": false + }, + "network": { + "format-icons": ["󰤯","󰤟","󰤢","󰤥","󰤨"], + "format" : "{icon}", + "format-wifi" : "{icon}", + "format-ethernet" : "󰀂", + "format-disconnected" : "󰖪", + "tooltip-format-wifi": "{essid} ({frequency} GHz)\n⇣{bandwidthDownBytes} ⇡{bandwidthUpBytes}", + "tooltip-format-ethernet": "⇣{bandwidthDownBytes} ⇡{bandwidthUpBytes}", + "tooltip-format-disconnected": "Disconnected", + "interval": 3, + "nospacing": 1, + "on-click": "alacritty --class=Impala -e impala" + }, + "battery": { + "format": "{capacity}% {icon}", + "format-discharging": "{icon}", + "format-charging": "{icon}", + "format-plugged": "", + "format-icons": { + "charging": [ + "󰢜", "󰂆", "󰂇", "󰂈", "󰢝", "󰂉", "󰢞", "󰂊", "󰂋", "󰂅" + ], + "default": [ + "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹" + ] + }, + "format-full": "󰂅", + "tooltip-format-discharging": "{power:>1.0f}W↓ {capacity}%", + "tooltip-format-charging": "{power:>1.0f}W↑ {capacity}%", + "interval": 5, + "states": { + "warning": 20, + "critical": 10 + } + }, + "bluetooth": { + "format": "", + "format-disabled": "󰂲", + "format-connected": "", + "tooltip-format": "Devices connected: {num_connections}", + "on-click": "GTK_THEME=Adwaita-dark blueberry" + }, + "pulseaudio": { + "format": "{icon}", + "on-click": "GTK_THEME=Adwaita-dark pavucontrol", + "on-click-right": "pamixer -t", + "tooltip-format": "Playing at {volume}%", + "scroll-step": 5, + "format-muted": "󰝟", + "format-icons": { + "default": ["", "", ""] + } + }, + "group/tray-expander": { + "orientation": "inherit", + "drawer": { + "transition-duration": 600, + "children-class": "tray-group-item" + }, + "modules": [ + "custom/expand-icon", + "tray" + ] + }, + "custom/expand-icon": { + "format": " ", + "tooltip": false + }, + "tray": { + "icon-size": 12, + "spacing": 12 + } +}, "cpu": { "interval": 5, "format": "󰍛", diff --git a/config/waybar/style.css b/config/waybar/style.css index 5762928..108d8d3 100644 --- a/config/waybar/style.css +++ b/config/waybar/style.css @@ -1,4 +1,9 @@ +@import "../omarchy/current/theme/waybar.css"; + * { + background-color: @background; + color: @foreground; + border: none; border-radius: 0; min-height: 0; @@ -6,17 +11,21 @@ font-size: 12px; } -#workspaces { - margin-left: 7px; +.modules-left { + margin-left: 8px; +} + +.modules-right { + margin-right: 8px; } #workspaces button { all: initial; - padding: 2px 6px; - margin-right: 3px; + padding: 0 6px; + margin: 0 1.5px; } -#custom-dropbox, +#tray, #cpu, #battery, #network, @@ -25,15 +34,13 @@ #clock, #custom-power-menu { min-width: 12px; - margin-right: 13px; + margin: 0 7.5px; +} + +#custom-expand-icon { + margin-right: 12px; } tooltip { padding: 2px; } - -tooltip label { - padding: 2px; -} - -@import "../omarchy/current/theme/waybar.css"; diff --git a/config/wofi/omarchy-power-menu.css b/config/wofi/omarchy-power-menu.css deleted file mode 100644 index e6c9790..0000000 --- a/config/wofi/omarchy-power-menu.css +++ /dev/null @@ -1,65 +0,0 @@ -@define-color selected-text #7dcfff; -@define-color text #cfc9c2; -@define-color base #1a1b26; - -* { - font-family: 'CaskaydiaMono Nerd Font', monospace; - font-size: 18px; -} - -window { - margin: 0px; - padding: 20px; - background-color: @base; - opacity: 0.95; -} - -#inner-box { - margin: 0; - padding: 0; - border: none; - background-color: @base; -} - -#outer-box { - margin: 0; - padding: 20px; - border: none; - background-color: @base; -} - -#scroll { - margin: 0; - padding: 0; - border: none; - background-color: @base; -} - -#input { - display: none; - opacity: 0; - margin-top: -200px; -} - -#text { - margin: 5px; - border: none; - color: @text; -} - -#entry { - background-color: @base; -} - -#entry:selected { - outline: none; - border: none; -} - -#entry:selected #text { - color: @selected-text; -} - -#entry image { - -gtk-icon-transform: scale(0.7); -} \ No newline at end of file diff --git a/config/wofi/style.css b/config/wofi/style.css new file mode 100644 index 0000000..97b3775 --- /dev/null +++ b/config/wofi/style.css @@ -0,0 +1,73 @@ +/* Colors are defined by theme files and can be referenced via @base, @text, @selected-text, and @border */ + +* { + font-family: 'CaskaydiaMono Nerd Font', monospace; + font-size: 18px; +} + +window { + margin: 0px; + padding: 20px; + background-color: @base; + opacity: 0.95; +} + +#inner-box { + margin: 0; + padding: 0; + border: none; + background-color: @base; +} + +#outer-box { + margin: 0; + padding: 20px; + border: none; + background-color: @base; + border: 2px solid @border; +} + +#scroll { + margin: 0; + padding: 0; + border: none; + background-color: @base; +} + +#input { + margin: 0; + padding: 10px; + border: none; + background-color: @base; + color: @text; +} + +#input:focus { + outline: none; + box-shadow: none; + border: none; +} + +#text { + margin: 5px; + border: none; + color: @text; +} + +#entry { + background-color: @base; +} + +#entry:selected { + outline: none; + border: none; +} + +#entry:selected #text { + color: @selected-text; +} + +#entry image { + -gtk-icon-transform: scale(0.7); +} + diff --git a/default/gpg/dirmngr.conf b/default/gpg/dirmngr.conf new file mode 100644 index 0000000..8d32790 --- /dev/null +++ b/default/gpg/dirmngr.conf @@ -0,0 +1,7 @@ +keyserver hkps://keyserver.ubuntu.com +keyserver hkps://pgp.surfnet.nl +keyserver hkps://keys.mailvelope.com +keyserver hkps://keyring.debian.org +keyserver hkps://pgp.mit.edu + +connect-quick-timeout 4 diff --git a/default/hypr/bindings/utilities.conf b/default/hypr/bindings/utilities.conf index 0e6b1b7..fe985d4 100644 --- a/default/hypr/bindings/utilities.conf +++ b/default/hypr/bindings/utilities.conf @@ -4,8 +4,8 @@ bind = SUPER, K, exec, ~/.local/share/omarchy/bin/omarchy-show-keybindings # Aesthetics bind = SUPER SHIFT, SPACE, exec, pkill -SIGUSR1 waybar -bind = SUPER CTRL, SPACE, exec, ~/.local/share/omarchy/bin/swaybg-next -bind = SUPER SHIFT CTRL, SPACE, exec, ~/.local/share/omarchy/bin/omarchy-theme-next +bind = SUPER CTRL, SPACE, exec, ~/.local/share/omarchy/bin/omarchy-theme-bg-next +bind = SUPER SHIFT CTRL, SPACE, exec, ~/.local/share/omarchy/bin/omarchy-theme-menu # Notifications bind = SUPER, comma, exec, makoctl dismiss @@ -19,9 +19,9 @@ bind = SUPER, ESCAPE, exec, ~/.local/share/omarchy/bin/omarchy-power-menu bind = SUPER CTRL, I, exec, ~/.local/share/omarchy/bin/omarchy-toggle-idle # Control Apple Display brightness -bind = CTRL, F1, exec, ~/.local/share/omarchy/bin/apple-display-brightness -5000 -bind = CTRL, F2, exec, ~/.local/share/omarchy/bin/apple-display-brightness +5000 -bind = SHIFT CTRL, F2, exec, ~/.local/share/omarchy/bin/apple-display-brightness +60000 +bind = CTRL, F1, exec, ~/.local/share/omarchy/bin/omarchy-apple-display-brightness -5000 +bind = CTRL, F2, exec, ~/.local/share/omarchy/bin/omarchy-apple-display-brightness +5000 +bind = SHIFT CTRL, F2, exec, ~/.local/share/omarchy/bin/omarchy-apple-display-brightness +60000 # Screenshots bind = , PRINT, exec, hyprshot -m region diff --git a/default/hypr/envs.conf b/default/hypr/envs.conf index 34343d8..ddfc8f5 100644 --- a/default/hypr/envs.conf +++ b/default/hypr/envs.conf @@ -15,9 +15,6 @@ xwayland { force_zero_scaling = true } -# Make .desktop files available for wofi -env = XDG_DATA_DIRS,/usr/share:/usr/local/share:~/.local/share - # Use XCompose file env = XCOMPOSEFILE,~/.XCompose diff --git a/default/hypr/looknfeel.conf b/default/hypr/looknfeel.conf index be474d1..d73f677 100644 --- a/default/hypr/looknfeel.conf +++ b/default/hypr/looknfeel.conf @@ -95,5 +95,5 @@ master { misc { disable_hyprland_logo = true disable_splash_rendering = true + focus_on_activate = true } - diff --git a/default/hypr/windows.conf b/default/hypr/windows.conf index 5dad14d..828aff0 100644 --- a/default/hypr/windows.conf +++ b/default/hypr/windows.conf @@ -4,14 +4,15 @@ windowrule = suppressevent maximize, class:.* # Force chromium into a tile to deal with --app bug windowrule = tile, class:^(Chromium)$ -# Float and center sound, bluetooth, and wifi settings, as well as nautilus previews -windowrule = float, class:^(org.pulseaudio.pavucontrol|blueberry.py|Impala|org.gnome.NautilusPreviewer)$ +# Float and center settings and previews +windowrule = float, class:^(org.pulseaudio.pavucontrol|blueberry.py|Impala|org.gnome.NautilusPreviewer|Omarchy)$ windowrule = size 800 600, class:^(org.pulseaudio.pavucontrol|blueberry.py|Impala|org.gnome.NautilusPreviewer)$ -windowrule = center, class:^(org.pulseaudio.pavucontrol|blueberry.py|Impala|org.gnome.NautilusPreviewer)$ +windowrule = size 645 350, class:Omarchy +windowrule = center, class:^(org.pulseaudio.pavucontrol|blueberry.py|Impala|org.gnome.NautilusPreviewer|Omarchy)$ # Float and center file pickers -windowrule = float, class:xdg-desktop-portal-gtk, title:^(Open.*Files?|Save.*Files?) -windowrule = center, class:xdg-desktop-portal-gtk, title:^(Open.*Files?|Save.*Files?) +windowrule = float, class:xdg-desktop-portal-gtk, title:^(Open.*Files?|Save.*Files?|All Files|Save) +windowrule = center, class:xdg-desktop-portal-gtk, title:^(Open.*Files?|Save.*Files?|All Files|Save) # Float Steam, fullscreen RetroArch windowrule = float, class:^(steam)$ diff --git a/default/plymouth/omarchy.script b/default/plymouth/omarchy.script index 07b2cd0..663f4f5 100644 --- a/default/plymouth/omarchy.script +++ b/default/plymouth/omarchy.script @@ -20,6 +20,7 @@ global.fake_progress_active = 0; # 0 / 1 boolean global.animation_frame = 0; global.fake_progress_start_time = 0; # Track when fake progress started global.password_shown = 0; # Track if password dialog has been shown +global.max_progress = 0.0; # Track the maximum progress reached to prevent backwards movement fun refresh_callback () { @@ -55,11 +56,16 @@ Plymouth.SetRefreshFunction (refresh_callback); fun update_progress_bar(progress) { - width = Math.Int(progress_bar.original_image.GetWidth() * progress); - if (width < 1) width = 1; # Ensure minimum width of 1 pixel - - progress_bar.image = progress_bar.original_image.Scale(width, progress_bar.original_image.GetHeight()); - progress_bar.sprite.SetImage(progress_bar.image); + # Only update if progress is moving forward + if (progress > global.max_progress) + { + global.max_progress = progress; + width = Math.Int(progress_bar.original_image.GetWidth() * progress); + if (width < 1) width = 1; # Ensure minimum width of 1 pixel + + progress_bar.image = progress_bar.original_image.Scale(width, progress_bar.original_image.GetHeight()); + progress_bar.sprite.SetImage(progress_bar.image); + } } fun show_progress_bar() @@ -90,11 +96,15 @@ fun hide_password_dialog() fun start_fake_progress() { - global.fake_progress = 0.0; - global.real_progress = 0.0; + # Don't reset if we already have progress + if (global.max_progress == 0.0) + { + global.fake_progress = 0.0; + global.real_progress = 0.0; + update_progress_bar(0.0); + } global.fake_progress_active = 1; global.animation_frame = 0; - update_progress_bar(0.0); } fun stop_fake_progress() @@ -149,8 +159,12 @@ fun display_password_callback (prompt, bullets) { global.password_shown = 1; # Mark that password dialog has been shown + # Reset progress when password dialog appears stop_fake_progress(); hide_progress_bar(); + global.max_progress = 0.0; + global.fake_progress = 0.0; + global.real_progress = 0.0; show_password_dialog(); # Clear all bullets first diff --git a/default/wofi/search.css b/default/wofi/search.css index 318c916..c6db56e 100644 --- a/default/wofi/search.css +++ b/default/wofi/search.css @@ -1,4 +1,5 @@ @import ".config/omarchy/current/theme/wofi.css"; +@import ".config/wofi/style.css"; * { font-family: 'CaskaydiaMono Nerd Font', monospace; diff --git a/install/1-yay.sh b/install/1-yay.sh index 9913bfa..4941958 100644 --- a/install/1-yay.sh +++ b/install/1-yay.sh @@ -8,4 +8,7 @@ if ! command -v yay &>/dev/null; then cd - rm -rf yay-bin cd ~ + + # Add fun and color to the pacman installer + sudo sed -i '/^\[options\]/a Color\nILoveCandy' /etc/pacman.conf fi diff --git a/install/4-config.sh b/install/4-config.sh index 8314790..bfa6fa4 100644 --- a/install/4-config.sh +++ b/install/4-config.sh @@ -4,17 +4,16 @@ cp -R ~/.local/share/omarchy/config/* ~/.config/ # Ensure application directory exists for update-desktop-database mkdir -p ~/.local/share/applications +# Setup GPG configuration with multiple keyservers for better reliability +sudo mkdir -p /etc/gnupg +sudo cp ~/.local/share/omarchy/default/gpg/dirmngr.conf /etc/gnupg/ +sudo chmod 644 /etc/gnupg/dirmngr.conf +sudo gpgconf --kill dirmngr || true +sudo gpgconf --launch dirmngr || true + # Use default bashrc from Omarchy echo "source ~/.local/share/omarchy/default/bash/rc" >~/.bashrc -# Login directly as user, rely on disk encryption + hyprlock for security -sudo mkdir -p /etc/systemd/system/getty@tty1.service.d -sudo tee /etc/systemd/system/getty@tty1.service.d/override.conf >/dev/null <~/.bash_profile diff --git a/install/login.sh b/install/login.sh new file mode 100644 index 0000000..48ac5c4 --- /dev/null +++ b/install/login.sh @@ -0,0 +1,115 @@ +#!/bin/bash +# Hyprland launched via UWSM and login directly as user, rely on disk encryption + hyprlock for security +yay -S --noconfirm --needed uwsm + +# 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 + +cat </dev/null; then yay -S --noconfirm --needed iwd sudo systemctl enable --now iwd.service fi + +# Fix systemd-networkd-wait-online timeout for multiple interfaces +# Wait for any interface to be online rather than all interfaces +# https://wiki.archlinux.org/title/Systemd-networkd#Multiple_interfaces_that_are_not_connected_all_the_time +sudo mkdir -p /etc/systemd/system/systemd-networkd-wait-online.service.d +sudo tee /etc/systemd/system/systemd-networkd-wait-online.service.d/wait-for-only-one-interface.conf >/dev/null </dev/null; then # 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 + # 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 + # 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 # Alternate UKI kernel cmdline location @@ -95,10 +95,10 @@ if ! command -v plymouth &>/dev/null; then # Add splash and quiet if not present new_cmdline="$current_cmdline" if [[ ! "$current_cmdline" =~ splash ]]; then - new_cmdline="$new_cmdline splash" + new_cmdline="$new_cmdline splash" fi if [[ ! "$current_cmdline" =~ quiet ]]; then - new_cmdline="$new_cmdline quiet" + new_cmdline="$new_cmdline quiet" fi # Trim any leading/trailing spaces diff --git a/install/theme.sh b/install/theme.sh index 989ad5c..65184bc 100644 --- a/install/theme.sh +++ b/install/theme.sh @@ -18,7 +18,6 @@ ln -snf ~/.config/omarchy/backgrounds/tokyo-night ~/.config/omarchy/current/back ln -snf ~/.config/omarchy/current/backgrounds/1-Pawel-Czerwinski-Abstract-Purple-Blue.jpg ~/.config/omarchy/current/background # Set specific app links for current theme -ln -snf ~/.config/omarchy/current/theme/wofi.css ~/.config/wofi/style.css ln -snf ~/.config/omarchy/current/theme/neovim.lua ~/.config/nvim/lua/plugins/theme.lua mkdir -p ~/.config/btop/themes ln -snf ~/.config/omarchy/current/theme/btop.theme ~/.config/btop/themes/current.theme diff --git a/install/xtras.sh b/install/xtras.sh index c4272e8..2801d7a 100644 --- a/install/xtras.sh +++ b/install/xtras.sh @@ -1,10 +1,14 @@ if [ -z "$OMARCHY_BARE" ]; then yay -S --noconfirm --needed \ - gnome-calculator \ - signal-desktop spotify dropbox-cli zoom \ - obsidian-bin typora libreoffice obs-studio kdenlive \ - 1password-beta 1password-cli gnome-keyring \ + gnome-calculator gnome-keyring signal-desktop \ + obsidian-bin libreoffice obs-studio kdenlive \ pinta xournalpp localsend-bin + + yay -S --noconfirm --needed typora || + echo -e "\e[31mFailed to install Typora. Continuing without!\e[0m" + + yay -S --noconfirm --needed spotify dropbox-cli 1password-beta 1password-cli || + echo -e "\e[31mFailed to install Spotify, Dropbox, and/or 1password because of a keyserver problem. Continuing without!\e[0m" fi # Copy over Omarchy applications diff --git a/migrations/1752249974.sh b/migrations/1752249974.sh new file mode 100644 index 0000000..30dad9e --- /dev/null +++ b/migrations/1752249974.sh @@ -0,0 +1,13 @@ +echo "Add new matte black theme" + +BACKGROUNDS_DIR=~/.config/omarchy/backgrounds/ +download_background_image() { + local url="$1" + local path="$2" + gum spin --title "Downloading $url as $path..." -- curl -sL -o "$BACKGROUNDS_DIR/$path" "$url" +} + +if [[ ! -L "~/.config/omarchy/themes/matte-black" ]]; then + ln -snf ~/.local/share/omarchy/themes/matte-black ~/.config/omarchy/themes/ + source ~/.local/share/omarchy/themes/matte-black/backgrounds.sh +fi diff --git a/migrations/1752251002.sh b/migrations/1752251002.sh new file mode 100644 index 0000000..39cb487 --- /dev/null +++ b/migrations/1752251002.sh @@ -0,0 +1,5 @@ +echo "Migrate to the modular, variable-based implementation of waybar style.css" +if [ -L ~/.config/waybar/style.css ]; then + rm ~/.config/waybar/style.css + cp ~/.local/share/omarchy/config/waybar/style.css ~/.config/waybar/style.css +fi diff --git a/migrations/1752292967.sh b/migrations/1752292967.sh new file mode 100644 index 0000000..293d74a --- /dev/null +++ b/migrations/1752292967.sh @@ -0,0 +1,18 @@ +echo "Update to use UWSM and seamless login" +sudo rm /etc/systemd/system/getty@tty1.service.d/override.conf +sudo rmdir /etc/systemd/system/getty@tty1.service.d/ 2>/dev/null || true + +if [ -f "$HOME/.bash_profile" ]; then + # Remove the specific line + sed -i '/^\[\[ -z \$DISPLAY && \$(tty) == \/dev\/tty1 \]\] && exec Hyprland$/d' "$HOME/.bash_profile" + echo "Cleaned up .bash_profile" +fi + +if [ -f "$HOME/.config/environment.d/fcitx.conf" ]; then + echo "Removing GTK_IM_MODULE from fcitx config for Wayland..." + sed -i 's/^GTK_IM_MODULE=fcitx$//' "$HOME/.config/environment.d/fcitx.conf" +fi + +omarchy-refresh-plymouth + +source ~/.local/share/omarchy/install/login.sh diff --git a/migrations/1752365998.sh b/migrations/1752365998.sh new file mode 100644 index 0000000..8eff5a3 --- /dev/null +++ b/migrations/1752365998.sh @@ -0,0 +1,7 @@ +echo "Add override to only require one network interface to be online" +sudo mkdir -p /etc/systemd/system/systemd-networkd-wait-online.service.d +sudo tee /etc/systemd/system/systemd-networkd-wait-online.service.d/wait-for-only-one-interface.conf >/dev/null <