Merge branch 'master' into ghostty

This commit is contained in:
David Heinemeier Hansson
2025-07-02 19:47:08 -07:00
13 changed files with 144 additions and 22 deletions

20
LICENSE Normal file
View File

@ -0,0 +1,20 @@
Copyright (c) David Heinemeier Hansson
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -2,8 +2,13 @@
cd ~/.local/share/omarchy cd ~/.local/share/omarchy
# Remember the version we're at before upgrading if [[ $1 == "all" ]]; then
last_updated_at=$(git log -1 --format=%cd --date=unix) # Run all migrations
last_updated_at=1
else
# Remember the version we're at before upgrading
last_updated_at=$(git log -1 --format=%cd --date=unix)
fi
# Get the latest # Get the latest
git pull git pull
@ -20,4 +25,4 @@ for file in migrations/*.sh; do
done done
# Back to where we came from # Back to where we came from
cd - cd - >/dev/null

View File

@ -27,10 +27,6 @@ source = ~/.config/omarchy/current/theme/hyprland.conf
# Extra env variables # Extra env variables
env = GDK_SCALE,2 # Change to 1 if on a 1x display env = GDK_SCALE,2 # Change to 1 if on a 1x display
# Extra env variables needed if running an NVIDIA GPU
# env = NVD_BACKEND,direct
# env = LIBVA_DRIVER_NAME,nvidia
# env = __GLX_VENDOR_LIBRARY_NAME,nvidia
# Extra bindings # Extra bindings
bind = SUPER, A, exec, $webapp="https://chatgpt.com" bind = SUPER, A, exec, $webapp="https://chatgpt.com"

View File

@ -34,7 +34,7 @@
"9": "9", "9": "9",
"active": "󱓻" "active": "󱓻"
}, },
"persistent_workspaces": { "persistent-workspaces": {
"1": [], "1": [],
"2": [], "2": [],
"3": [], "3": [],
@ -66,7 +66,6 @@
"on-click": "alacritty -e iwctl" "on-click": "alacritty -e iwctl"
}, },
"battery": { "battery": {
"interval": 5,
"format": "{capacity}% {icon}", "format": "{capacity}% {icon}",
"format-discharging": "{icon}", "format-discharging": "{icon}",
"format-charging": "{icon}", "format-charging": "{icon}",

View File

@ -66,5 +66,11 @@ web2app-remove() {
rm "$ICON_PATH" rm "$ICON_PATH"
} }
# Ensure changes to ~/.XCompose are immediately available
refresh-xcompose() {
pkill fcitx5
setsid fcitx5 &>/dev/null &
}
# Ensure that external keyboards that use an fn key has the F keys as the default # Ensure that external keyboards that use an fn key has the F keys as the default
alias fix_fkeys='echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode' alias fix_fkeys='echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode'

View File

@ -19,7 +19,8 @@ bind = SUPER, W, killactive,
# End active session # End active session
bind = SUPER, ESCAPE, exec, hyprlock bind = SUPER, ESCAPE, exec, hyprlock
bind = SUPER SHIFT, ESCAPE, exit, bind = SUPER SHIFT, ESCAPE, exec, systemctl suspend
bind = SUPER ALT, ESCAPE, exit,
bind = SUPER CTRL, ESCAPE, exec, reboot bind = SUPER CTRL, ESCAPE, exec, reboot
bind = SUPER SHIFT CTRL, ESCAPE, exec, systemctl poweroff bind = SUPER SHIFT CTRL, ESCAPE, exec, systemctl poweroff

View File

@ -2,14 +2,21 @@
windowrule = suppressevent maximize, class:.* windowrule = suppressevent maximize, class:.*
# Force chromium into a tile to deal with --app bug # Force chromium into a tile to deal with --app bug
windowrule = tile, class:^(chromium)$ windowrule = tile, class:^(Chromium)$
# Float sound and bluetooth settings
windowrule = float, class:^(org.pulseaudio.pavucontrol|blueberry.py)$
# Float Steam, fullscreen RetroArch
windowrule = float, class:^(steam)$
windowrule = fullscreen, class:^(com.libretro.RetroArch)$
# Just dash of opacity # Just dash of opacity
windowrule = opacity 0.97 0.9, class:.* windowrule = opacity 0.97 0.9, class:.*
windowrule = opacity 1 0.97, class:^(chromium|google-chrome|google-chrome-unstable)$ windowrule = opacity 1 0.97, class:^(Chromium|chromium|google-chrome|google-chrome-unstable)$
windowrule = opacity 0.97 0.9, initialClass:^(chrome-.*-Default)$ # web apps windowrule = opacity 1 1, initialTitle:^(youtube.com_/)$ # Youtube
windowrule = opacity 1 1, initialClass:^(chrome-youtube.*-Default)$ # Youtube windowrule = opacity 1 1, class:^(zoom|vlc|org.kde.kdenlive|com.obsproject.Studio|com.github.PintaProject.Pinta)$
windowrule = opacity 1 1, class:^(zoom|vlc|org.kde.kdenlive|com.obsproject.Studio)$ windowrule = opacity 1 1, class:^(com.libretro.RetroArch|steam)$
# Fix some dragging issues with XWayland # Fix some dragging issues with XWayland
windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0 windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0

View File

@ -18,6 +18,7 @@ git config --global alias.br branch
git config --global alias.ci commit git config --global alias.ci commit
git config --global alias.st status git config --global alias.st status
git config --global pull.rebase true git config --global pull.rebase true
git config --global init.defaultBranch master
# Set identification from install inputs # Set identification from install inputs
if [[ -n "${OMARCHY_USER_NAME//[[:space:]]/}" ]]; then if [[ -n "${OMARCHY_USER_NAME//[[:space:]]/}" ]]; then

View File

@ -1,5 +1,5 @@
# Turn on bluetooth by default
sudo systemctl enable --now bluetooth.service
# Install bluetooth controls # Install bluetooth controls
yay -S --noconfirm --needed blueberry yay -S --noconfirm --needed blueberry
# Turn on bluetooth by default
sudo systemctl enable --now bluetooth.service

View File

@ -4,4 +4,4 @@ yay -S --noconfirm --needed \
xdg-desktop-portal-hyprland xdg-desktop-portal-gtk xdg-desktop-portal-hyprland xdg-desktop-portal-gtk
# Start Hyprland on first session # Start Hyprland on first session
echo "[[ -z \$DISPLAY && \$(tty) == /dev/tty1 ]] && exec Hyprland" >~/.bash_profile echo "[[ -z \$DISPLAY && \$(tty) == /dev/tty1 ]] && exec Hyprland" >~/.bash_profile

82
install/nvidia.sh Normal file
View File

@ -0,0 +1,82 @@
# ==============================================================================
# Hyprland NVIDIA Setup Script for Arch Linux
# ==============================================================================
# This script automates the installation and configuration of NVIDIA drivers
# for use with Hyprland on Arch Linux, following the official Hyprland wiki.
#
# Author: https://github.com/Kn0ax
#
# ==============================================================================
# --- GPU Detection ---
if [ -n "$(lspci | grep -i 'nvidia')" ]; then
# --- Driver Selection ---
# Turing (16xx, 20xx), Ampere (30xx), Ada (40xx), and newer recommend the open-source kernel modules
if echo "$gpu_info" | grep -q -E "RTX [2-9][0-9]|GTX 16"; then
NVIDIA_DRIVER_PACKAGE="nvidia-open-dkms"
else
NVIDIA_DRIVER_PACKAGE="nvidia-dkms"
fi
# Check which kernel is installed and set appropriate headers package
KERNEL_HEADERS="linux-headers" # Default
if pacman -Q linux-zen &>/dev/null; then
KERNEL_HEADERS="linux-zen-headers"
elif pacman -Q linux-lts &>/dev/null; then
KERNEL_HEADERS="linux-lts-headers"
elif pacman -Q linux-hardened &>/dev/null; then
KERNEL_HEADERS="linux-hardened-headers"
fi
# Enable multilib repository for 32-bit libraries
if ! grep -q "^\[multilib\]" /etc/pacman.conf; then
sudo sed -i '/^#\[multilib\]/,/^#Include/ s/^#//' /etc/pacman.conf
fi
# Install packages
PACKAGES_TO_INSTALL=(
"${KERNEL_HEADERS}"
"${NVIDIA_DRIVER_PACKAGE}"
"nvidia-utils"
"lib32-nvidia-utils"
"egl-wayland"
"libva-nvidia-driver" # For VA-API hardware acceleration
"qt5-wayland"
"qt6-wayland"
)
yay -Syu --needed --noconfirm "${PACKAGES_TO_INSTALL[@]}"
# Configure modprobe for early KMS
echo "options nvidia_drm modeset=1" | sudo tee /etc/modprobe.d/nvidia.conf >/dev/null
# Configure mkinitcpio for early loading
MKINITCPIO_CONF="/etc/mkinitcpio.conf"
# Define modules
NVIDIA_MODULES="nvidia nvidia_modeset nvidia_uvm nvidia_drm"
# Create backup
sudo cp "$MKINITCPIO_CONF" "${MKINITCPIO_CONF}.backup"
# Remove any old nvidia modules to prevent duplicates
sudo sed -i -E 's/ nvidia_drm//g; s/ nvidia_uvm//g; s/ nvidia_modeset//g; s/ nvidia//g;' "$MKINITCPIO_CONF"
# Add the new modules at the start of the MODULES array
sudo sed -i -E "s/^(MODULES=\\()/\\1${NVIDIA_MODULES} /" "$MKINITCPIO_CONF"
# Clean up potential double spaces
sudo sed -i -E 's/ +/ /g' "$MKINITCPIO_CONF"
sudo mkinitcpio -P
# Add NVIDIA environment variables to hyprland.conf
HYPRLAND_CONF="$HOME/.config/hypr/hyprland.conf"
if [ -f "$HYPRLAND_CONF" ]; then
cat >>"$HYPRLAND_CONF" <<'EOF'
# NVIDIA environment variables
env = NVD_BACKEND,direct
env = LIBVA_DRIVER_NAME,nvidia
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
EOF
fi
fi

View File

@ -1,3 +1,5 @@
# Add missing installation of bat if ! command -v bat &>/dev/null; then
echo "Add missing installation of bat (used by the ff alias)" # Add missing installation of bat
yay -S --noconfirm --needed bat echo "Add missing installation of bat (used by the ff alias)"
yay -S --noconfirm --needed bat
fi

3
migrations/1751225707.sh Normal file
View File

@ -0,0 +1,3 @@
echo "Fixing persistent workspaces in waybar config"
sed -i 's/"persistent_workspaces":/"persistent-workspaces":/' ~/.config/waybar/config
pkill -SIGUSR2 waybar