From 352597151e01b9b818f8ed27d618705e9cd0ee04 Mon Sep 17 00:00:00 2001 From: Jan Ehrhardt Date: Thu, 2 Oct 2025 06:29:30 +0200 Subject: [PATCH] Make dotfiles CachyOS compatible This config has been derived from Omarchy, but CachyOS does few things different. This change updates everything to become CachyOS compatible. There are still few things left that reference Omarchy and require a later clean up, but most things are working fine now. Signed-off-by: Jan Ehrhardt --- dot_config/hypr/autostart.conf | 5 +- dot_config/hypr/bindings.conf | 33 +++------ dot_config/waybar/config.jsonc | 62 +++++++++++++---- dot_config/wlogout/layout | 36 ++++++++++ dot_config/wlogout/style.css | 50 ++++++++++++++ run_once_after_setup.sh | 123 +++++++-------------------------- 6 files changed, 171 insertions(+), 138 deletions(-) create mode 100644 dot_config/wlogout/layout create mode 100644 dot_config/wlogout/style.css diff --git a/dot_config/hypr/autostart.conf b/dot_config/hypr/autostart.conf index a82b9e1..f4bc061 100644 --- a/dot_config/hypr/autostart.conf +++ b/dot_config/hypr/autostart.conf @@ -1,14 +1,11 @@ # Omarchy default autostart processes 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/hypr/background.jpg -m fill exec-once = uwsm app -- swayosd-server -exec-once = uwsm app -- walker --gapplication-service & -exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 +exec-once = /usr/lib/polkit-kde-authentication-agent-1 & exec-once = wl-clip-persist --clipboard regular --all-mime-type-regex '^(?!x-kde-passwordManagerHint).+' -exec-once = omarchy-cmd-first-run # Extra autostart processes # exec-once = uwsm app -- my-service diff --git a/dot_config/hypr/bindings.conf b/dot_config/hypr/bindings.conf index 74b4d04..5a2b4dd 100644 --- a/dot_config/hypr/bindings.conf +++ b/dot_config/hypr/bindings.conf @@ -1,29 +1,14 @@ # Application bindings -$terminal = uwsm app -- $TERMINAL -$browser = omarchy-launch-browser +$terminal = uwsm app -- alacritty +$browser = uwsm app -- chromium -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, return, Terminal, exec, $terminal +bindd = SUPER, F, File manager, exec, $terminal -e yazi 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 SHIFT, B, Browser (private), exec, $browser --incognito 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" +bindd = SUPER, N, Obsidian, exec, omarchy-launch-or-focus obsidian "uwsm app -- obsidian -disable-gpu --enable-wayland-ime" # Overwrite existing bindings, like putting Omarchy Menu on Super + Space # unbind = SUPER, SPACE @@ -60,7 +45,7 @@ bindld = SUPER, XF86AudioMute, Switch audio output, exec, omarchy-cmd-audio-swit # ===== TILING BINDINGS ===== # Close windows -bindd = SUPER, W, Close active window, killactive, +bindd = SUPER, Q, Close active window, killactive, bindd = CTRL ALT, DELETE, Close all Windows, exec, omarchy-cmd-close-all-windows # Control tiling @@ -134,10 +119,10 @@ bindmd = SUPER, mouse:273, Resize window, resizewindow # ===== UTILITIES BINDINGS ===== # Menus -bindd = SUPER, SPACE, Launch apps, exec, walker -p "Start…" +bindd = SUPER, SPACE, Launch apps, exec, wofi bindd = SUPER CTRL, E, Emoji picker, exec, walker -m Emojis bindd = SUPER ALT, SPACE, Omarchy menu, exec, omarchy-menu -bindd = SUPER, ESCAPE, Power menu, exec, omarchy-menu system +bindd = SUPER, ESCAPE, Power menu, exec, wlogout bindld = , XF86PowerOff, Power menu, exec, omarchy-menu system bindd = SUPER, K, Show key bindings, exec, omarchy-menu-keybindings bindd = , XF86Calculator, Calculator, exec, gnome-calculator diff --git a/dot_config/waybar/config.jsonc b/dot_config/waybar/config.jsonc index 521532b..de00ad3 100644 --- a/dot_config/waybar/config.jsonc +++ b/dot_config/waybar/config.jsonc @@ -4,8 +4,12 @@ "position": "top", "spacing": 0, "height": 26, - "modules-left": ["hyprland/workspaces"], - "modules-center": ["clock"], + "modules-left": [ + "hyprland/workspaces" + ], + "modules-center": [ + "clock" + ], "modules-right": [ "group/tray-expander", "bluetooth", @@ -38,20 +42,25 @@ "5": [] } }, - "cpu": { "interval": 5, "format": "󰍛", "on-click": "$TERMINAL -e btop" }, "clock": { - "format": "{:L%A %H:%M}", - "format-alt": "{:L%d %B W%V %Y}", + "format": "{:%A %H:%M}", + "format-alt": "{:%d %B W%V %Y}", "tooltip": false, "on-click-right": "$HOME/.config/waybar/tzupdate.sh" }, "network": { - "format-icons": ["󰤯", "󰤟", "󰤢", "󰤥", "󰤨"], + "format-icons": [ + "󰤯", + "󰤟", + "󰤢", + "󰤥", + "󰤨" + ], "format": "{icon}", "format-wifi": "{icon}", "format-ethernet": "󰀂", @@ -60,8 +69,7 @@ "tooltip-format-ethernet": "⇣{bandwidthDownBytes} ⇡{bandwidthUpBytes}", "tooltip-format-disconnected": "Disconnected", "interval": 3, - "spacing": 1, - "on-click": "omarchy-launch-wifi" + "spacing": 1 }, "battery": { "format": "{capacity}% {icon}", @@ -69,14 +77,35 @@ "format-charging": "{icon}", "format-plugged": "", "format-icons": { - "charging": ["󰢜", "󰂆", "󰂇", "󰂈", "󰢝", "󰂉", "󰢞", "󰂊", "󰂋", "󰂅"], - "default": ["󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"] + "charging": [ + "󰢜", + "󰂆", + "󰂇", + "󰂈", + "󰢝", + "󰂉", + "󰢞", + "󰂊", + "󰂋", + "󰂅" + ], + "default": [ + "󰁺", + "󰁻", + "󰁼", + "󰁽", + "󰁾", + "󰁿", + "󰂀", + "󰂁", + "󰂂", + "󰁹" + ] }, "format-full": "󰂅", "tooltip-format-discharging": "{power:>1.0f}W↓ {capacity}%", "tooltip-format-charging": "{power:>1.0f}W↑ {capacity}%", "interval": 5, - "on-click": "omarchy-menu power", "states": { "warning": 20, "critical": 10 @@ -97,7 +126,11 @@ "scroll-step": 5, "format-muted": "", "format-icons": { - "default": ["", "", ""] + "default": [ + "", + "", + "" + ] } }, "group/tray-expander": { @@ -106,7 +139,10 @@ "transition-duration": 600, "children-class": "tray-group-item" }, - "modules": ["custom/expand-icon", "tray"] + "modules": [ + "custom/expand-icon", + "tray" + ] }, "custom/expand-icon": { "format": " ", diff --git a/dot_config/wlogout/layout b/dot_config/wlogout/layout new file mode 100644 index 0000000..69c5568 --- /dev/null +++ b/dot_config/wlogout/layout @@ -0,0 +1,36 @@ +{ + "label" : "lock", + "action" : "pidof hyprlock || hyprlock &", + "text" : "Lock", + "keybind" : "l" +} +{ + "label" : "hibernate", + "action" : "systemctl hibernate", + "text" : "Hibernate", + "keybind" : "h" +} +{ + "label" : "relaunch", + "action" : "uwsm stop", + "text" : "Relaunch", + "keybind" : "e" +} +{ + "label" : "shutdown", + "action" : "systemctl poweroff", + "text" : "Shutdown", + "keybind" : "s" +} +{ + "label" : "suspend", + "action" : "systemctl suspend", + "text" : "Suspend", + "keybind" : "u" +} +{ + "label" : "reboot", + "action" : "systemctl reboot", + "text" : "Reboot", + "keybind" : "r" +} diff --git a/dot_config/wlogout/style.css b/dot_config/wlogout/style.css new file mode 100644 index 0000000..f14ecff --- /dev/null +++ b/dot_config/wlogout/style.css @@ -0,0 +1,50 @@ +* { + background-image: none; + box-shadow: none; +} + +window { + background-color: rgba(17, 24, 38, 0.9); /* cachydblue with alpha */ +} + +button { + border-radius: 0; + border-color: #007d6f; /* cachydgreen */ + text-decoration-color: #ffffff; /* cachywhite */ + color: #ffffff; /* cachywhite */ + background-color: #111826; /* cachydblue */ + border-style: solid; + border-width: 1px; + background-repeat: no-repeat; + background-position: center; + background-size: 25%; +} + +button:focus, button:active, button:hover { + background-color: #00aa84; /* cachymgreen */ + outline-style: none; +} + +#lock { + background-image: image(url("/usr/share/wlogout/icons/lock.png"), url("/usr/local/share/wlogout/icons/lock.png")); +} + +#logout { + background-image: image(url("/usr/share/wlogout/icons/logout.png"), url("/usr/local/share/wlogout/icons/logout.png")); +} + +#suspend { + background-image: image(url("/usr/share/wlogout/icons/suspend.png"), url("/usr/local/share/wlogout/icons/suspend.png")); +} + +#hibernate { + background-image: image(url("/usr/share/wlogout/icons/hibernate.png"), url("/usr/local/share/wlogout/icons/hibernate.png")); +} + +#shutdown { + background-image: image(url("/usr/share/wlogout/icons/shutdown.png"), url("/usr/local/share/wlogout/icons/shutdown.png")); +} + +#reboot { + background-image: image(url("/usr/share/wlogout/icons/reboot.png"), url("/usr/local/share/wlogout/icons/reboot.png")); +} diff --git a/run_once_after_setup.sh b/run_once_after_setup.sh index b574cc3..1e50a21 100755 --- a/run_once_after_setup.sh +++ b/run_once_after_setup.sh @@ -5,118 +5,47 @@ set -euo pipefail # Colors for output RED='\033[0;31m' GREEN='\033[0;32m' -YELLOW='\033[1;33m' NC='\033[0m' # No Color log_info() { - echo -e "${GREEN}[INFO]${NC} $1" -} - -log_warn() { - echo -e "${YELLOW}[WARN]${NC} $1" + echo -e "${GREEN}[INFO]${NC} $1" } log_error() { - echo -e "${RED}[ERROR]${NC} $1" + echo -e "${RED}[ERROR]${NC} $1" } # Check if running on Arch Linux -if ! command -v pacman &> /dev/null; then - log_error "This script requires Arch Linux (pacman not found)" - exit 1 +if ! command -v pacman &>/dev/null; then + log_error "This script requires Arch Linux (pacman not found)" + exit 1 fi log_info "Starting package installation..." -# Install base prerequisites for paru with pacman -log_info "Installing base packages with pacman..." -sudo pacman -S --needed --noconfirm base-devel fish rustup - -# Set fish as default shell before setting up Rust -log_info "Setting fish as default shell..." -FISH_PATH=$(which fish) - -# Add fish to /etc/shells if not already present -if ! grep -q "^$FISH_PATH$" /etc/shells; then - echo "$FISH_PATH" | sudo tee -a /etc/shells - log_info "Added fish to /etc/shells" -else - log_info "Fish already in /etc/shells" -fi - -# Change default shell to fish -if [ "$SHELL" != "$FISH_PATH" ]; then - chsh -s "$FISH_PATH" - log_info "Changed default shell to fish (will take effect on next login)" -else - log_info "Fish is already the default shell" -fi - -# Configure rustup with stable toolchain -log_info "Setting up Rust stable toolchain..." -rustup default stable - -# Install paru AUR helper if not already installed -if ! command -v paru &> /dev/null; then - log_info "Installing paru AUR helper..." - - # Create temporary directory for paru installation - TEMP_DIR=$(mktemp -d) - cd "$TEMP_DIR" - - # Clone and build paru - git clone https://aur.archlinux.org/paru.git - cd paru - makepkg -si --noconfirm - - # Clean up - cd / - rm -rf "$TEMP_DIR" - - log_info "paru installed successfully" -else - log_info "paru already installed, skipping..." -fi - # Install required packages with paru log_info "Installing required packages ..." paru -S --needed --noconfirm \ - alacritty \ - atuin \ - bat \ - less \ - chezmoi \ - mise \ - yazi \ - btop \ - impala \ - lazydocker \ - docker \ - docker-buildx \ - docker-compose \ - lazygit \ - starship \ - ttf-firacode-nerd \ - mako \ - hyprland \ - walker-bin \ - waybar \ - hypridle \ - hyprlock \ - libnotify \ - blueberry \ - brightnessctl \ - btop \ - ripgrep \ - fd \ - eza \ - zoxide \ - tree-sitter-cli \ - neovim \ - xdg-desktop-portal-gtk \ - xdg-desktop-portal-hyprland \ - qt5-wayland \ - qt6-wayland \ - hyprpolkitagent + ttf-firacode-nerd \ + fcitx5 \ + hypridle \ + hyprlock \ + libnotify \ + blueberry \ + brightnessctl \ + libfido2 \ + starship \ + eza \ + zoxide \ + atuin \ + mise \ + yazi \ + lazygit \ + lazydocker \ + docker \ + docker-buildx \ + docker-compose \ + tree-sitter-cli \ + neovim log_info "All packages installed and configured successfully!" -- 2.51.2