mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-04 12:47:51 +02:00
Compare commits
51
Commits
@@ -9,6 +9,7 @@ BATTERY_STATE=$(upower -i $(upower -e | grep 'BAT') | grep -E "state" | awk '{pr
|
||||
|
||||
send_notification() {
|
||||
notify-send -u critical " Time to recharge!" "Battery is down to ${1}%" -i battery-caution -t 30000
|
||||
omarchy-hook battery-low "$1"
|
||||
}
|
||||
|
||||
if [[ -n $BATTERY_LEVEL && $BATTERY_LEVEL =~ ^[0-9]+$ ]]; then
|
||||
|
||||
@@ -5,12 +5,21 @@
|
||||
battery_info=$(upower -i $(upower -e | grep BAT))
|
||||
|
||||
echo "$battery_info" | awk '/time to (empty|full)/ {
|
||||
hours = int($4)
|
||||
minutes = int(($4 - hours) * 60)
|
||||
if (minutes > 0) {
|
||||
printf "%dh %dm", hours, minutes
|
||||
value = $4
|
||||
unit = $5
|
||||
if (unit == "minutes") {
|
||||
hours = int(value / 60)
|
||||
minutes = int(value % 60)
|
||||
} else {
|
||||
hours = int(value)
|
||||
minutes = int((value - hours) * 60)
|
||||
}
|
||||
if (hours > 0 && minutes > 0) {
|
||||
printf "%dh %dm", hours, minutes
|
||||
} else if (hours > 0) {
|
||||
printf "%dh", hours
|
||||
} else {
|
||||
printf "%dm", minutes
|
||||
}
|
||||
exit
|
||||
}'
|
||||
|
||||
@@ -73,9 +73,10 @@ if [[ ! -f $RESUME_DROP_IN ]]; then
|
||||
echo "Adding resume kernel parameters"
|
||||
sudo swapon -p 0 "$SWAP_FILE" 2>/dev/null
|
||||
RESUME_DEVICE=$(findmnt -no SOURCE -T "$SWAP_FILE" | sed 's/\[.*\]//')
|
||||
RESUME_OFFSET=$(btrfs inspect-internal map-swapfile -r "$SWAP_FILE")
|
||||
RESUME_OFFSET=$(sudo btrfs inspect-internal map-swapfile -r "$SWAP_FILE")
|
||||
sudo mkdir -p /etc/limine-entry-tool.d
|
||||
echo "KERNEL_CMDLINE[default]+=\" resume=$RESUME_DEVICE resume_offset=$RESUME_OFFSET\"" | sudo tee "$RESUME_DROP_IN" >/dev/null
|
||||
sudo tee -a /etc/default/limine < "$RESUME_DROP_IN" >/dev/null
|
||||
fi
|
||||
|
||||
# Use ACPI alarm for RTC wakeup on s2idle systems (needed for suspend-then-hibernate)
|
||||
@@ -85,6 +86,7 @@ if grep -q "\[s2idle\]" /sys/power/mem_sleep 2>/dev/null; then
|
||||
echo "Enabling ACPI RTC alarm for s2idle suspend"
|
||||
sudo mkdir -p /etc/limine-entry-tool.d
|
||||
echo 'KERNEL_CMDLINE[default]+=" rtc_cmos.use_acpi_alarm=1"' | sudo tee "$LIMINE_DROP_IN" >/dev/null
|
||||
sudo tee -a /etc/default/limine < "$LIMINE_DROP_IN" >/dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Detect whether the computer has an Intel CPU.
|
||||
|
||||
[[ $(grep -m1 "vendor_id" /proc/cpuinfo 2>/dev/null | cut -d: -f2 | tr -d ' ') == "GenuineIntel" ]]
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Install support for using Xbox and PlayStation controllers with Steam/RetroArch/etc.
|
||||
|
||||
set -e
|
||||
|
||||
# Xbox: Install xpadneo for improved Xbox controller support
|
||||
omarchy-pkg-add linux-headers
|
||||
omarchy-pkg-aur-add xpadneo-dkms
|
||||
|
||||
# Xbox: 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
|
||||
|
||||
# PlayStation: Ensure hid-playstation module loads at boot
|
||||
echo hid_playstation | sudo tee /etc/modules-load.d/hid-playstation.conf >/dev/null
|
||||
|
||||
# PlayStation: Enable userspace HID for Bluetooth controller support
|
||||
if [ -f /etc/bluetooth/input.conf ]; then
|
||||
grep -q "UserspaceHID=true" /etc/bluetooth/input.conf || \
|
||||
sudo sed -i '/^\[General\]/a UserspaceHID=true' /etc/bluetooth/input.conf
|
||||
else
|
||||
printf '[General]\nUserspaceHID=true\n' | sudo tee /etc/bluetooth/input.conf >/dev/null
|
||||
fi
|
||||
|
||||
# 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
|
||||
@@ -50,9 +50,9 @@ case "$1" in
|
||||
ruby)
|
||||
echo -e "Installing Ruby on Rails...\n"
|
||||
omarchy-pkg-add libyaml
|
||||
mise use --global ruby@latest
|
||||
mise settings add idiomatic_version_file_enable_tools ruby
|
||||
mise settings add ruby.compile false
|
||||
mise settings add idiomatic_version_file_enable_tools ruby
|
||||
mise use --global ruby@latest
|
||||
echo "gem: --no-document" >~/.gemrc
|
||||
mise x ruby -- gem install rails --no-document
|
||||
echo -e "\nYou can now run: rails new myproject"
|
||||
|
||||
@@ -14,4 +14,4 @@ sudo usermod -aG nordvpn "$USER"
|
||||
echo -e "\nNordVPN installed! After reboot, run 'nordvpn login' to authenticate."
|
||||
|
||||
echo
|
||||
gum confirm "Reboot now to make NordVPN usable?" && sudo reboot now
|
||||
gum confirm "Reboot now to make NordVPN usable?" && omarchy-system-reboot
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Install and launch Steam after first letting the user pick the correct grahics card drivers.
|
||||
# Install Steam with gaming essentials (Gamescope, GameMode, MangoHud) and launch.
|
||||
|
||||
set -e
|
||||
|
||||
omarchy-pkg-add gamescope gamemode lib32-gamemode mangohud lib32-mangohud
|
||||
|
||||
echo "Now pick dependencies matching your graphics card"
|
||||
sudo pacman -S steam
|
||||
setsid gtk-launch steam >/dev/null 2>&1 &
|
||||
|
||||
# Override Steam's .desktop to launch inside Gamescope
|
||||
mkdir -p ~/.local/share/applications
|
||||
sed 's|Exec=/usr/bin/steam|Exec=gamescope -e -- steam|' \
|
||||
/usr/share/applications/steam.desktop > ~/.local/share/applications/steam.desktop
|
||||
|
||||
setsid gamescope -e -- steam >/dev/null 2>&1 &
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Install support for using Xbox controllers with Steam/RetroArch/etc.
|
||||
|
||||
set -e
|
||||
|
||||
# Install xpadneo to ensure controllers work out of the box
|
||||
omarchy-pkg-add linux-headers
|
||||
omarchy-pkg-aur-add 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
|
||||
+7
-10
@@ -20,8 +20,8 @@ back_to() {
|
||||
}
|
||||
|
||||
toggle_existing_menu() {
|
||||
if pgrep -f "walker.*--dmenu" > /dev/null; then
|
||||
walker --close > /dev/null 2>&1
|
||||
if pgrep -f "walker.*--dmenu" >/dev/null; then
|
||||
walker --close >/dev/null 2>&1
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
@@ -221,6 +221,7 @@ show_font_menu() {
|
||||
show_setup_menu() {
|
||||
local options=" Audio\n Wifi\n Bluetooth\n Power Profile\n System Sleep\n Monitors"
|
||||
[[ -f ~/.config/hypr/bindings.conf ]] && options="$options\n Keybindings"
|
||||
options="$options\n Key Remapping"
|
||||
[[ -f ~/.config/hypr/input.conf ]] && options="$options\n Input"
|
||||
options="$options\n DNS\n Security\n Config"
|
||||
|
||||
@@ -233,6 +234,7 @@ show_setup_menu() {
|
||||
*Monitors*) open_in_editor ~/.config/hypr/monitors.conf ;;
|
||||
*Keybindings*) open_in_editor ~/.config/hypr/bindings.conf ;;
|
||||
*Input*) open_in_editor ~/.config/hypr/input.conf ;;
|
||||
*Key\ Remapping*) omarchy-setup-makima && open_in_editor "$HOME/.config/makima/AT Translated Set 2 keyboard.toml" && omarchy-restart-makima ;;
|
||||
*DNS*) present_terminal omarchy-setup-dns ;;
|
||||
*Security*) show_setup_security_menu ;;
|
||||
*Config*) show_setup_config_menu ;;
|
||||
@@ -353,13 +355,8 @@ show_install_ai_menu() {
|
||||
echo ollama
|
||||
)
|
||||
|
||||
case $(menu "Install" " Dictation\n Claude Code\n Codex\n Gemini CLI\n Copilot CLI\n Cursor CLI\n LM Studio\n Ollama\n Crush") in
|
||||
case $(menu "Install" " Dictation\n LM Studio\n Ollama\n Crush") in
|
||||
*Dictation*) present_terminal omarchy-voxtype-install ;;
|
||||
*Claude*) install "Claude Code" "claude-code" ;;
|
||||
*Codex*) install "Codex" "openai-codex" ;;
|
||||
*Gemini*) install "Gemini CLI" "gemini-cli" ;;
|
||||
*Copilot*) install "Copilot CLI" "github-copilot-cli" ;;
|
||||
*Cursor*) install "Cursor CLI" "cursor-cli" ;;
|
||||
*Studio*) install "LM Studio" "lmstudio-bin" ;;
|
||||
*Ollama*) install "Ollama" $ollama_pkg ;;
|
||||
*Crush*) install "Crush" "crush-bin" ;;
|
||||
@@ -368,12 +365,12 @@ show_install_ai_menu() {
|
||||
}
|
||||
|
||||
show_install_gaming_menu() {
|
||||
case $(menu "Install" " Steam\n NVIDIA GeForce NOW\n RetroArch [AUR]\n Minecraft\n Xbox Controller [AUR]") in
|
||||
case $(menu "Install" " Steam + Gamescope\n NVIDIA GeForce NOW\n RetroArch [AUR]\n Minecraft\n Xbox + PS Controllers [AUR]") in
|
||||
*Steam*) present_terminal omarchy-install-steam ;;
|
||||
*GeForce*) present_terminal omarchy-install-geforce-now ;;
|
||||
*RetroArch*) aur_install_and_launch "RetroArch" "retroarch retroarch-assets libretro libretro-fbneo" "com.libretro.RetroArch.desktop" ;;
|
||||
*Minecraft*) install_and_launch "Minecraft" "minecraft-launcher" "minecraft-launcher" ;;
|
||||
*Xbox*) present_terminal omarchy-install-xbox-controllers ;;
|
||||
*Controllers*) present_terminal omarchy-install-controllers ;;
|
||||
*) show_install_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Install an npx wrapper for a given npm package.
|
||||
# Usage: omarchy-npx-install <package> [command-name]
|
||||
#
|
||||
# If command-name is omitted, it defaults to the package name.
|
||||
# Example: omarchy-npx-install opencode-ai opencode
|
||||
|
||||
if [[ -z $1 ]]; then
|
||||
echo "Usage: omarchy-npx-install <package> [command-name]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
package=$1
|
||||
command=${2:-$1}
|
||||
|
||||
mkdir -p "$HOME/.local/bin"
|
||||
|
||||
cat > "$HOME/.local/bin/$command" <<EOF
|
||||
#!/bin/bash
|
||||
exec npx --yes $package "\$@"
|
||||
EOF
|
||||
|
||||
chmod +x "$HOME/.local/bin/$command"
|
||||
@@ -20,7 +20,8 @@ pkg_names=$(yay -Slqa | fzf "${fzf_args[@]}")
|
||||
|
||||
if [[ -n $pkg_names ]]; then
|
||||
# Add aur/ prefix to each package name and convert to space-separated for yay
|
||||
sudo -v
|
||||
source omarchy-sudo-keepalive
|
||||
|
||||
echo "$pkg_names" | sed 's/^/aur\//' | tr '\n' ' ' | xargs yay -S --noconfirm
|
||||
sudo updatedb
|
||||
omarchy-show-done
|
||||
|
||||
@@ -17,7 +17,9 @@ fzf_args=(
|
||||
pkg_names=$(pacman -Slq | fzf "${fzf_args[@]}")
|
||||
|
||||
if [[ -n $pkg_names ]]; then
|
||||
# Convert newline-separated selections to space-separated for yay
|
||||
source omarchy-sudo-keepalive
|
||||
|
||||
# Convert newline-separated selections to space-separated for pacman
|
||||
echo "$pkg_names" | tr '\n' ' ' | xargs sudo pacman -S --noconfirm
|
||||
omarchy-show-done
|
||||
fi
|
||||
|
||||
@@ -3,6 +3,6 @@ set -e
|
||||
|
||||
# Reinstall the Omarchy configuration directory from the git source.
|
||||
|
||||
git clone "https://github.com/basecamp/omarchy.git" ~/.local/share/omarchy-new >/dev/null
|
||||
git clone --depth=1 "https://github.com/basecamp/omarchy.git" ~/.local/share/omarchy-new >/dev/null
|
||||
mv $OMARCHY_PATH ~/.local/share/omarchy-old
|
||||
mv ~/.local/share/omarchy-new $OMARCHY_PATH
|
||||
|
||||
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Setup makima - key remapping service for remapping Copilot key to Omarchy Menu
|
||||
|
||||
CONFIG_FILE="$HOME/.config/makima/AT Translated Set 2 keyboard.toml"
|
||||
|
||||
if [[ ! -f $CONFIG_FILE ]]; then
|
||||
omarchy-pkg-add makima-bin
|
||||
|
||||
mkdir -p "$HOME/.config/makima"
|
||||
cp "$OMARCHY_PATH/default/makima/AT Translated Set 2 keyboard.toml" "$CONFIG_FILE"
|
||||
|
||||
sudo mkdir -p /etc/systemd/system/makima.service.d
|
||||
sudo tee /etc/systemd/system/makima.service.d/override.conf >/dev/null <<EOF
|
||||
[Service]
|
||||
User=$USER
|
||||
Environment="MAKIMA_CONFIG=/home/$USER/.config/makima"
|
||||
EOF
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now makima 2>/dev/null || true
|
||||
fi
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Prompt for sudo once and keep the credential alive in the background.
|
||||
# Source this script so the trap applies to the calling shell:
|
||||
# source omarchy-sudo-keepalive
|
||||
|
||||
sudo -v
|
||||
while true; do sudo -n true; sleep 60; done 2>/dev/null &
|
||||
SUDO_KEEPALIVE_PID=$!
|
||||
trap "kill $SUDO_KEEPALIVE_PID 2>/dev/null" EXIT
|
||||
Executable
+43
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Toggle passwordless sudo for the current user.
|
||||
# First run: enables passwordless sudo for 15 minutes (after confirmation).
|
||||
# Second run: disables it early.
|
||||
|
||||
NOPASSWD_FILE="/etc/sudoers.d/99-omarchy-nopasswd-${USER}"
|
||||
TIMER_NAME="omarchy-nopasswd-expire-${USER}"
|
||||
|
||||
# Safety: if the file exists but the timer doesn't (e.g. after reboot), clean up
|
||||
if sudo test -f "$NOPASSWD_FILE" && ! systemctl is-active "${TIMER_NAME}.timer" &>/dev/null; then
|
||||
sudo rm "$NOPASSWD_FILE"
|
||||
fi
|
||||
|
||||
# Check for the file directly — sudo -n can stay cached or be granted by other rules
|
||||
if sudo test -f "$NOPASSWD_FILE"; then
|
||||
sudo rm "$NOPASSWD_FILE"
|
||||
sudo systemctl stop "${TIMER_NAME}.timer" 2>/dev/null
|
||||
echo "Passwordless sudo has been DISABLED. Sudo will require a password again."
|
||||
else
|
||||
echo ""
|
||||
echo "⚠️ WARNING: This will allow ANY process running as your user to"
|
||||
echo "execute ANY command as root WITHOUT a password for 15 minutes."
|
||||
echo ""
|
||||
echo "This is useful for AI agents that need to run sudo commands,"
|
||||
echo "but it significantly weakens the security of your system."
|
||||
echo "Anyone or anything with access to your user account gets full root."
|
||||
echo ""
|
||||
echo "Passwordless sudo will automatically disable after 15 minutes."
|
||||
echo "Run this command again to disable it early."
|
||||
echo ""
|
||||
|
||||
if gum confirm "Enable passwordless sudo for 15 minutes? This is a significant security risk!"; then
|
||||
echo "${USER} ALL=(ALL) NOPASSWD: ALL" | sudo tee "$NOPASSWD_FILE" > /dev/null
|
||||
sudo chmod 440 "$NOPASSWD_FILE"
|
||||
sudo systemd-run --on-active=15m --timer-property=AccuracySec=1s --unit="$TIMER_NAME" \
|
||||
rm "$NOPASSWD_FILE"
|
||||
echo "Passwordless sudo has been ENABLED. It will automatically disable in 15 minutes."
|
||||
echo "Note: if you restart before then, run omarchy-sudo-passwordless-toggle again to disable it."
|
||||
else
|
||||
echo "Aborted. No changes made."
|
||||
fi
|
||||
fi
|
||||
@@ -20,5 +20,6 @@ decorations = "None"
|
||||
[keyboard]
|
||||
bindings = [
|
||||
{ key = "Insert", mods = "Shift", action = "Paste" },
|
||||
{ key = "Insert", mods = "Control", action = "Copy" }
|
||||
{ key = "Insert", mods = "Control", action = "Copy" },
|
||||
{ key = "Return", mods = "Shift", chars = "\u001B\r" }
|
||||
]
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This hook is called with the current battery percentage when the low battery
|
||||
# notification is sent. To put it into use, remove .sample from the name.
|
||||
|
||||
SOUND_FILE="/usr/share/sounds/freedesktop/stereo/dialog-warning.oga"
|
||||
|
||||
if omarchy-cmd-present mpv && [[ -f $SOUND_FILE ]]; then
|
||||
mpv --no-video "$SOUND_FILE" >/dev/null 2>&1
|
||||
fi
|
||||
@@ -4,7 +4,7 @@ set -g prefix2 C-b
|
||||
bind C-Space send-prefix
|
||||
|
||||
# Reload config
|
||||
bind q source-file ~/.config/tmux/tmux.conf
|
||||
bind q source-file ~/.config/tmux/tmux.conf \; display "Configuration reloaded"
|
||||
|
||||
# Vi mode for copy
|
||||
setw -g mode-keys vi
|
||||
@@ -83,7 +83,7 @@ set -gw automatic-rename-format '#{b:pane_current_path}'
|
||||
# Theme
|
||||
set -g status-style "bg=default,fg=default"
|
||||
set -g status-left "#[fg=black,bg=blue,bold] #S #[bg=default] "
|
||||
set -g status-right "#[fg=blue]#{?client_prefix,PREFIX ,}#{?window_zoomed_flag,ZOOM ,}#[fg=brightblack]#h "
|
||||
set -g status-right "#[fg=blue]#{?pane_in_mode,COPY ,}#{?client_prefix,PREFIX ,}#{?window_zoomed_flag,ZOOM ,}#[fg=brightblack]#h "
|
||||
set -g window-status-format "#[fg=brightblack] #I:#W "
|
||||
set -g window-status-current-format "#[fg=blue,bold] #I:#W "
|
||||
set -g pane-border-style "fg=brightblack"
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
# 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:$HOME/.local/bin
|
||||
|
||||
# Set default terminal and editor
|
||||
source ~/.config/uwsm/default
|
||||
|
||||
@@ -6,8 +6,13 @@ if command -v eza &> /dev/null; then
|
||||
alias lta='lt -a'
|
||||
fi
|
||||
|
||||
alias ff="fzf --preview 'bat --style=numbers --color=always {}'"
|
||||
if [[ "$TERM" == "xterm-kitty" ]]; then
|
||||
alias ff="fzf --preview 'case \$(file --mime-type -b {}) in image/*) kitty icat --clear --transfer-mode=memory --stdin=no --place=\${FZF_PREVIEW_COLUMNS}x\${FZF_PREVIEW_LINES}@0x0 {} ;; *) bat --style=numbers --color=always {} ;; esac'"
|
||||
else
|
||||
alias ff="fzf --preview 'bat --style=numbers --color=always {}'"
|
||||
fi
|
||||
alias eff='$EDITOR "$(ff)"'
|
||||
sff() { if [ $# -eq 0 ]; then echo "Usage: sff <destination> (e.g. sff host:/tmp/)"; return 1; fi; local file; file=$(find . -type f -printf '%T@\t%p\n' | sort -rn | cut -f2- | ff) && [ -n "$file" ] && scp "$file" "$1"; }
|
||||
|
||||
if command -v zoxide &> /dev/null; then
|
||||
alias cd="zd"
|
||||
|
||||
@@ -10,6 +10,7 @@ source = ~/.local/share/omarchy/default/hypr/apps/qemu.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/retroarch.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/steam.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/geforce.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/moonlight.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/system.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/telegram.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/apps/terminals.conf
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
windowrule {
|
||||
name = moonlight
|
||||
match:class = com.moonlight_stream.Moonlight
|
||||
fullscreen = 1
|
||||
idle_inhibit = fullscreen
|
||||
}
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Lazy-unmount gvfsd-fuse filesystems before suspend/hibernate to prevent the
|
||||
# kernel's process freeze from timing out. FUSE daemons (like gvfsd-fuse from
|
||||
# Nautilus) can block in uninterruptible sleep during freeze, causing suspend
|
||||
# to silently fail. After wake, restart gvfs so the FUSE mount is restored.
|
||||
|
||||
if [[ $1 == "pre" ]]; then
|
||||
while IFS=' ' read -r _ mountpoint fstype _; do
|
||||
if [[ $fstype == fuse.gvfsd-fuse ]]; then
|
||||
mountpoint=$(printf '%b' "$mountpoint")
|
||||
fusermount3 -uz "$mountpoint" 2>/dev/null || fusermount -uz "$mountpoint" 2>/dev/null || true
|
||||
fi
|
||||
done < /proc/mounts
|
||||
fi
|
||||
|
||||
if [[ $1 == "post" ]]; then
|
||||
# Run in background — user.slice is still frozen at this point, so a
|
||||
# synchronous restart would block the thaw for up to 90 seconds.
|
||||
(
|
||||
sleep 5
|
||||
for uid_dir in /run/user/*; do
|
||||
uid=$(basename "$uid_dir")
|
||||
if [[ -S $uid_dir/bus ]]; then
|
||||
sudo -u "#$uid" env \
|
||||
DBUS_SESSION_BUS_ADDRESS="unix:path=$uid_dir/bus" \
|
||||
XDG_RUNTIME_DIR="$uid_dir" \
|
||||
systemctl --user restart gvfs-daemon.service 2>/dev/null || true
|
||||
fi
|
||||
done
|
||||
) &
|
||||
disown
|
||||
fi
|
||||
@@ -18,9 +18,9 @@ run_logged $OMARCHY_INSTALL/config/remove-fcitx5-autostart.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/unmount-fuse.sh
|
||||
run_logged $OMARCHY_INSTALL/config/sudoless-asdcontrol.sh
|
||||
run_logged $OMARCHY_INSTALL/config/input-group.sh
|
||||
run_logged $OMARCHY_INSTALL/config/makima.sh
|
||||
run_logged $OMARCHY_INSTALL/config/omarchy-ai-skill.sh
|
||||
run_logged $OMARCHY_INSTALL/config/kernel-modules-hook.sh
|
||||
run_logged $OMARCHY_INSTALL/config/powerprofilesctl-rules.sh
|
||||
@@ -35,6 +35,7 @@ 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/intel.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/intel-thermald.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/vulkan.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-intel-panther-lake-display.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-f13-amd-audio-input.sh
|
||||
@@ -46,5 +47,8 @@ run_logged $OMARCHY_INSTALL/config/hardware/fix-surface-keyboard.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-asus-rog-audio-mixer.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-asus-rog-mic.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-yt6801-ethernet-adapter.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-dell-xps-audio.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-synaptic-touchpad.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-tuxedo-backlight.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/framework16-qmk-hid.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/intel-ipu7-camera.sh
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Fix audio on Dell XPS 2026 (Panther Lake) by blacklisting SOF audio modules
|
||||
# that conflict with standard HDA drivers. This turns off audio, but allows boot.
|
||||
# This is meant to be removed as soon as its fixed upstream.
|
||||
|
||||
if lspci | grep -iE 'vga|3d|display' | grep -qi 'panther lake'; then
|
||||
sudo tee /etc/modprobe.d/blacklist-audio.conf << 'EOF'
|
||||
blacklist snd_sof_pci_intel_ptl
|
||||
blacklist snd_sof_pci_intel_lnl
|
||||
blacklist snd_sof_pci_intel_mtl
|
||||
blacklist snd_sof_intel_hda_generic
|
||||
blacklist snd_sof_intel_hda_common
|
||||
blacklist snd_sof_intel_hda
|
||||
blacklist snd_sof_pci
|
||||
blacklist snd_sof
|
||||
blacklist soundwire_intel
|
||||
blacklist snd_soc_cs35l56_sdw
|
||||
blacklist snd_soc_cs35l56
|
||||
blacklist snd_soc_skl_hda_dsp
|
||||
EOF
|
||||
fi
|
||||
@@ -0,0 +1,15 @@
|
||||
# Install Tuxedo drivers for keyboard backlighting on Tuxedo laptops and
|
||||
# compatible devices like the Slimbook Executive (Clevo/Tuxedo chassis).
|
||||
if cat /sys/class/dmi/id/sys_vendor 2>/dev/null | grep -qi "TUXEDO\|Slimbook"; then
|
||||
omarchy-pkg-add linux-headers tuxedo-drivers-nocompatcheck-dkms
|
||||
|
||||
# Blacklist the legacy clevo_xsm_wmi module which conflicts with the tuxedo-drivers
|
||||
# clevo_wmi module. When clevo_xsm_wmi loads first, it grabs the Clevo WMI GUIDs,
|
||||
# preventing tuxedo-drivers from initializing the keyboard backlight properly.
|
||||
echo "blacklist clevo_xsm_wmi" | sudo tee /etc/modprobe.d/blacklist-clevo-xsm-wmi.conf > /dev/null
|
||||
|
||||
# Remove any orphaned clevo_xsm_wmi module files not managed by a package
|
||||
for f in /lib/modules/*/extra/clevo-xsm-wmi.ko; do
|
||||
[ -f "$f" ] && sudo rm "$f"
|
||||
done
|
||||
fi
|
||||
@@ -0,0 +1,5 @@
|
||||
# Install MIPI camera support for Intel IPU7 hardware
|
||||
|
||||
if grep -q "OVTI08F4" /sys/bus/acpi/devices/*/hid 2>/dev/null; then
|
||||
omarchy-pkg-add intel-ipu7-camera
|
||||
fi
|
||||
@@ -0,0 +1,11 @@
|
||||
# Enable thermald for Intel laptops (Sandy Bridge and newer)
|
||||
# Thermald is useful for Intel Sandy Bridge (2nd gen Core, model 42/45) and newer CPUs.
|
||||
|
||||
if omarchy-hw-intel; then
|
||||
# Check if Sandy Bridge or newer (model >= 42). Sandy Bridge: model 42 (mobile), 45 (desktop)
|
||||
cpu_model=$(grep -m1 "^model\s*:" /proc/cpuinfo 2>/dev/null | cut -d: -f2 | tr -d ' ')
|
||||
if ((cpu_model >= 42)) && omarchy-battery-present; then
|
||||
omarchy-pkg-add thermald
|
||||
sudo systemctl enable thermald
|
||||
fi
|
||||
fi
|
||||
@@ -1,14 +0,0 @@
|
||||
# Remap Copilot key (Super+Shift+F23) to Super+Alt+Space (Omarchy Menu) using makima
|
||||
mkdir -p "$HOME/.config/makima"
|
||||
cp "$OMARCHY_PATH/default/makima/AT Translated Set 2 keyboard.toml" "$HOME/.config/makima/"
|
||||
|
||||
# Create systemd override with correct user and config path
|
||||
sudo mkdir -p /etc/systemd/system/makima.service.d
|
||||
sudo tee /etc/systemd/system/makima.service.d/override.conf > /dev/null <<EOF
|
||||
[Service]
|
||||
User=$USER
|
||||
Environment="MAKIMA_CONFIG=/home/$USER/.config/makima"
|
||||
EOF
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now makima 2>/dev/null || true
|
||||
@@ -0,0 +1,2 @@
|
||||
sudo mkdir -p /usr/lib/systemd/system-sleep
|
||||
sudo install -m 0755 -o root -g root "$OMARCHY_PATH/default/systemd/system-sleep/unmount-fuse" /usr/lib/systemd/system-sleep/
|
||||
@@ -16,7 +16,6 @@ brightnessctl
|
||||
btop
|
||||
chromium
|
||||
clang
|
||||
claude-code
|
||||
cups
|
||||
cups-browsed
|
||||
cups-filters
|
||||
@@ -75,7 +74,6 @@ libreoffice-fresh
|
||||
llvm
|
||||
localsend
|
||||
luarocks
|
||||
makima-bin
|
||||
mako
|
||||
man-db
|
||||
mariadb-libs
|
||||
@@ -93,7 +91,6 @@ obs-studio
|
||||
obsidian
|
||||
omarchy-nvim
|
||||
omarchy-walker
|
||||
opencode
|
||||
pamixer
|
||||
pinta
|
||||
playerctl
|
||||
|
||||
@@ -19,6 +19,8 @@ iwd
|
||||
jdk-openjdk
|
||||
libpulse
|
||||
libsass
|
||||
intel-ipu7-camera
|
||||
intel-media-driver
|
||||
libva-intel-driver
|
||||
libva-nvidia-driver
|
||||
limine
|
||||
@@ -42,9 +44,11 @@ pipewire-pulse
|
||||
qt6-wayland
|
||||
sassc
|
||||
snapper
|
||||
thermald
|
||||
webp-pixbuf-loader
|
||||
wget
|
||||
yay-debug
|
||||
tuxedo-drivers-nocompatcheck-dkms
|
||||
yt6801-dkms
|
||||
zram-generator
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ run_logged $OMARCHY_INSTALL/packaging/nvim.sh
|
||||
run_logged $OMARCHY_INSTALL/packaging/icons.sh
|
||||
run_logged $OMARCHY_INSTALL/packaging/webapps.sh
|
||||
run_logged $OMARCHY_INSTALL/packaging/tuis.sh
|
||||
run_logged $OMARCHY_INSTALL/packaging/npx.sh
|
||||
run_logged $OMARCHY_INSTALL/packaging/asus-rog.sh
|
||||
run_logged $OMARCHY_INSTALL/packaging/framework16.sh
|
||||
run_logged $OMARCHY_INSTALL/packaging/surface.sh
|
||||
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
omarchy-npx-install @anthropic-ai/claude-code claude
|
||||
omarchy-npx-install @openai/codex codex
|
||||
omarchy-npx-install @google/gemini-cli gemini
|
||||
omarchy-npx-install @github/copilot copilot
|
||||
omarchy-npx-install opencode-ai opencode
|
||||
omarchy-npx-install playwright playwright-cli
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
echo "Add Shift+Return keyboard binding for multi-line as used by Claude Code to Alacritty"
|
||||
|
||||
ALACRITTY_CONFIG=~/.config/alacritty/alacritty.toml
|
||||
|
||||
if [[ -f $ALACRITTY_CONFIG ]] && ! grep -q 'key = "Return"' "$ALACRITTY_CONFIG"; then
|
||||
sed -i 's/{ key = "Insert", mods = "Control", action = "Copy" }/{ key = "Insert", mods = "Control", action = "Copy" },\n { key = "Return", mods = "Shift", chars = "\\u001B\\r" }/' "$ALACRITTY_CONFIG"
|
||||
fi
|
||||
@@ -0,0 +1,7 @@
|
||||
echo "Add sample low battery notification hook"
|
||||
|
||||
mkdir -p ~/.config/omarchy/hooks
|
||||
|
||||
if [[ ! -f ~/.config/omarchy/hooks/battery-low.sample ]]; then
|
||||
cp "$OMARCHY_PATH/config/omarchy/hooks/battery-low.sample" ~/.config/omarchy/hooks/battery-low.sample
|
||||
fi
|
||||
@@ -0,0 +1,4 @@
|
||||
echo "Install system-sleep hook to unmount gvfsd-fuse before suspend/hibernate"
|
||||
|
||||
sudo mkdir -p /usr/lib/systemd/system-sleep
|
||||
sudo install -m 0755 -o root -g root "$OMARCHY_PATH/default/systemd/system-sleep/unmount-fuse" /usr/lib/systemd/system-sleep/
|
||||
@@ -0,0 +1,3 @@
|
||||
echo "Enable thermald for Intel Sandy Bridge and newer laptops"
|
||||
|
||||
source "$OMARCHY_PATH/install/config/hardware/intel-thermald.sh"
|
||||
@@ -0,0 +1,3 @@
|
||||
echo "Install npx wrappers for AI CLI tools and playwright"
|
||||
|
||||
source "$OMARCHY_PATH/install/packaging/npx.sh"
|
||||
@@ -0,0 +1,8 @@
|
||||
echo "Add COPY mode indicator to tmux status bar"
|
||||
|
||||
if [[ -f ~/.config/tmux/tmux.conf ]]; then
|
||||
if ! grep -q "pane_in_mode" ~/.config/tmux/tmux.conf; then
|
||||
sed -i 's/#{?client_prefix/#{?pane_in_mode,COPY ,}#{?client_prefix/' ~/.config/tmux/tmux.conf
|
||||
omarchy-restart-tmux
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user