mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Merge branch 'dev' into rc
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
# Switch between audio outputs while preserving the mute status. By default mapped to Super + Mute.
|
||||
|
||||
focused_monitor="$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')"
|
||||
focused_monitor=$(omarchy-hyprland-monitor-focused)
|
||||
|
||||
sinks=$(pactl -f json list sinks | jq '[.[] | select((.ports | length == 0) or ([.ports[]? | .availability != "not available"] | any))]')
|
||||
sinks_count=$(echo "$sinks" | jq '. | length')
|
||||
|
||||
@@ -15,6 +15,7 @@ if [[ -f $FIRST_RUN_MODE ]]; then
|
||||
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"
|
||||
bash "$OMARCHY_PATH/install/first-run/powerprofilesctl-rules.sh"
|
||||
sudo rm -f /etc/sudoers.d/first-run
|
||||
|
||||
bash "$OMARCHY_PATH/install/first-run/welcome.sh"
|
||||
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Toggle microphone mute. Dell XPS systems get special handling for the hardware LED.
|
||||
|
||||
if omarchy-hw-match "XPS"; then
|
||||
omarchy-cmd-mic-mute-xps
|
||||
else
|
||||
swayosd-client --monitor "$(omarchy-hyprland-monitor-focused)" --input-volume mute-toggle
|
||||
fi
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Toggle microphone mute on Dell XPS systems. Uses wpctl for reliable toggling
|
||||
# and syncs the ALSA capture switch so the hardware mic mute LED follows state.
|
||||
|
||||
wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle >/dev/null
|
||||
|
||||
if pactl get-source-mute @DEFAULT_SOURCE@ | rg -q 'yes'; then
|
||||
alsa_value='off,off'
|
||||
osd_message='Microphone muted'
|
||||
osd_icon='microphone-sensitivity-muted-symbolic'
|
||||
else
|
||||
alsa_value='on,on'
|
||||
osd_message='Microphone on'
|
||||
osd_icon='audio-input-microphone-symbolic'
|
||||
fi
|
||||
|
||||
if [[ -e /sys/class/leds/platform::micmute/brightness ]]; then
|
||||
default_source=$(pactl get-default-source)
|
||||
alsa_card=$(pactl -f json list sources | jq -r --arg source "$default_source" '
|
||||
.[] | select(.name == $source) |
|
||||
.properties["alsa.card"] // .properties["api.alsa.card"] // .properties["api.alsa.pcm.card"] // empty
|
||||
' | head -1)
|
||||
|
||||
if [[ -n $alsa_card ]]; then
|
||||
cards=("$alsa_card")
|
||||
else
|
||||
mapfile -t cards < <(compgen -G '/proc/asound/card*' | rg -o 'card[0-9]+' | sed 's/card//' | sort -u)
|
||||
fi
|
||||
|
||||
for card in "${cards[@]}"; do
|
||||
while IFS= read -r control; do
|
||||
if [[ $control != *"Jack Microphone"* ]]; then
|
||||
amixer -c "$card" cset "$control" "$alsa_value" >/dev/null 2>&1 || true
|
||||
break 2
|
||||
fi
|
||||
done < <(amixer -c "$card" controls 2>/dev/null | rg -o "name='[^']*Microphone Capture Switch'")
|
||||
done
|
||||
fi
|
||||
|
||||
swayosd-client \
|
||||
--monitor "$(omarchy-hyprland-monitor-focused)" \
|
||||
--custom-message "$osd_message" \
|
||||
--custom-icon "$osd_icon"
|
||||
@@ -11,7 +11,6 @@ Trigger protocol used by these Synaptics touchpads.
|
||||
import fcntl, glob, os, struct, sys
|
||||
|
||||
VENDOR = "06CB"
|
||||
PRODUCT = "D01A"
|
||||
REPORT_ID = 0x37
|
||||
INTENSITY = 40 # 0-100
|
||||
|
||||
@@ -34,7 +33,7 @@ def find_hidraw():
|
||||
try:
|
||||
with open(uevent) as f:
|
||||
content = f.read().upper()
|
||||
if f"0000{VENDOR}" in content and f"0000{PRODUCT}" in content:
|
||||
if f"0000{VENDOR}" in content:
|
||||
return os.path.join("/dev", os.path.basename(path))
|
||||
except OSError:
|
||||
continue
|
||||
@@ -46,7 +45,7 @@ def find_touchpad_event():
|
||||
try:
|
||||
with open(path) as f:
|
||||
name = f.read().strip().upper()
|
||||
if VENDOR in name and PRODUCT in name and "TOUCHPAD" in name:
|
||||
if VENDOR in name and "TOUCHPAD" in name:
|
||||
event = path.split("/")[-3]
|
||||
return os.path.join("/dev/input", event)
|
||||
except OSError:
|
||||
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Print the name of the currently focused Hyprland monitor.
|
||||
|
||||
hyprctl monitors -j | jq -r '.[] | select(.focused == true).name'
|
||||
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Toggle the internal laptop display on/off.
|
||||
# Useful when connected to an external monitor and you want to close the lid
|
||||
# or just use the external display only.
|
||||
|
||||
INTERNAL=$(hyprctl monitors all -j | jq -r '.[] | select(.name | startswith("eDP")) | .name')
|
||||
|
||||
if [[ -z $INTERNAL ]]; then
|
||||
notify-send -u low " No internal display found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DISABLED=$(hyprctl monitors all -j | jq -r --arg m "$INTERNAL" '.[] | select(.name == $m) | .disabled')
|
||||
|
||||
if [[ $DISABLED == "true" ]]; then
|
||||
hyprctl keyword monitor "$INTERNAL,preferred,auto,auto"
|
||||
notify-send -u low " Internal display on"
|
||||
else
|
||||
hyprctl keyword monitor "$INTERNAL,disable"
|
||||
notify-send -u low " Internal display off"
|
||||
fi
|
||||
@@ -18,7 +18,5 @@ case "$CURRENT_INT" in
|
||||
*) NEW_SCALE=1 ;;
|
||||
esac
|
||||
|
||||
hyprctl keyword misc:disable_scale_notification true
|
||||
hyprctl keyword monitor "$ACTIVE_MONITOR,${WIDTH}x${HEIGHT}@${REFRESH_RATE},auto,$NEW_SCALE"
|
||||
hyprctl keyword misc:disable_scale_notification false
|
||||
notify-send -u low " Display scaling set to ${NEW_SCALE}x"
|
||||
|
||||
@@ -18,7 +18,7 @@ fi
|
||||
# Silently quit Walker on overlay
|
||||
walker -q
|
||||
|
||||
focused=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')
|
||||
focused=$(omarchy-hyprland-monitor-focused)
|
||||
terminal=$(xdg-terminal-exec --print-id)
|
||||
|
||||
for m in $(hyprctl monitors -j | jq -r '.[] | .name'); do
|
||||
|
||||
+2
-1
@@ -168,7 +168,7 @@ show_share_menu() {
|
||||
}
|
||||
|
||||
show_toggle_menu() {
|
||||
case $(menu "Toggle" " Screensaver\n Nightlight\n Idle Lock\n Top Bar\n Workspace Layout\n Window Gaps\n 1-Window Ratio\n Display Scaling") in
|
||||
case $(menu "Toggle" " Screensaver\n Nightlight\n Idle Lock\n Top Bar\n Workspace Layout\n Window Gaps\n 1-Window Ratio\n Monitor Scaling\n Laptop Display") in
|
||||
|
||||
*Screensaver*) omarchy-toggle-screensaver ;;
|
||||
*Nightlight*) omarchy-toggle-nightlight ;;
|
||||
@@ -178,6 +178,7 @@ show_toggle_menu() {
|
||||
*Ratio*) omarchy-hyprland-window-single-square-aspect-toggle ;;
|
||||
*Gaps*) omarchy-hyprland-window-gaps-toggle ;;
|
||||
*Scaling*) omarchy-hyprland-monitor-scaling-cycle ;;
|
||||
*Laptop*) omarchy-hyprland-monitor-internal-toggle ;;
|
||||
*) back_to show_trigger_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ mkdir -p "$HOME/.local/bin"
|
||||
|
||||
cat > "$HOME/.local/bin/$command" <<EOF
|
||||
#!/bin/bash
|
||||
exec npx --yes $package "\$@"
|
||||
exec mise exec node@latest -- npx --yes $package "\$@"
|
||||
EOF
|
||||
|
||||
chmod +x "$HOME/.local/bin/$command"
|
||||
|
||||
@@ -1,8 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Reload the intel_quicki2c driver to fix a dead trackpad.
|
||||
# The THC (Touch Host Controller) can fail to initialize interrupts
|
||||
# during boot or after suspend, leaving the trackpad registered but
|
||||
# not delivering events.
|
||||
# Reset the trackpad by unbinding and rebinding its driver.
|
||||
# Covers both driver paths:
|
||||
# - i2c_hid_acpi (DesignWare I2C, e.g. XPS 14/16 Synaptics trackpad)
|
||||
# - intel_quicki2c (THC Touch Host Controller)
|
||||
|
||||
sudo modprobe -r intel_quicki2c && sudo modprobe intel_quicki2c
|
||||
# Try i2c_hid_acpi path (DesignWare I2C trackpads)
|
||||
for dev in /sys/bus/i2c/drivers/i2c_hid_acpi/i2c-*; do
|
||||
[ -e "$dev" ] || continue
|
||||
I2C_DEVICE=$(basename "$dev")
|
||||
echo "Resetting $I2C_DEVICE via i2c_hid_acpi unbind/rebind..."
|
||||
echo "$I2C_DEVICE" | sudo tee /sys/bus/i2c/drivers/i2c_hid_acpi/unbind > /dev/null
|
||||
sleep 1
|
||||
echo "$I2C_DEVICE" | sudo tee /sys/bus/i2c/drivers/i2c_hid_acpi/bind > /dev/null
|
||||
echo "Done"
|
||||
done
|
||||
|
||||
# Also try THC path
|
||||
if lsmod | grep -q intel_quicki2c; then
|
||||
echo "Reloading intel_quicki2c..."
|
||||
sudo modprobe -r intel_quicki2c && sudo modprobe intel_quicki2c
|
||||
fi
|
||||
|
||||
@@ -9,7 +9,7 @@ progress="$(awk -v p="$percent" 'BEGIN{printf "%.2f", p/100}')"
|
||||
[[ $progress == "0.00" ]] && progress="0.01"
|
||||
|
||||
swayosd-client \
|
||||
--monitor "$(hyprctl monitors -j | jq -r '.[]|select(.focused==true).name')" \
|
||||
--monitor "$(omarchy-hyprland-monitor-focused)" \
|
||||
--custom-icon display-brightness \
|
||||
--custom-progress "$progress" \
|
||||
--custom-progress-text "${percent}%"
|
||||
|
||||
@@ -9,7 +9,7 @@ progress="$(awk -v p="$percent" 'BEGIN{printf "%.2f", p/100}')"
|
||||
[[ $progress == "0.00" ]] && progress="0.01"
|
||||
|
||||
swayosd-client \
|
||||
--monitor "$(hyprctl monitors -j | jq -r '.[]|select(.focused==true).name')" \
|
||||
--monitor "$(omarchy-hyprland-monitor-focused)" \
|
||||
--custom-icon keyboard-brightness \
|
||||
--custom-progress "$progress" \
|
||||
--custom-progress-text "${percent}%"
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Run the update inside a PTY so pacman/yay keep showing download progress
|
||||
# while still logging the full session for later analysis.
|
||||
if [[ -z $OMARCHY_UPDATE_LOGGED ]]; then
|
||||
script_command=$(printf '%q ' "$0" "$@")
|
||||
exec env OMARCHY_UPDATE_LOGGED=1 script -qefc "$script_command" "/tmp/omarchy-update.log"
|
||||
fi
|
||||
|
||||
trap 'echo ""; echo -e "\033[0;31mSomething went wrong during the update!\n\nPlease review the output above carefully, correct the error, and retry the update.\n\nIf you need assistance, get help from the community at https://omarchy.org/discord\033[0m"' ERR
|
||||
|
||||
if [[ $1 == "-y" ]] || omarchy-update-confirm; then
|
||||
|
||||
@@ -6,5 +6,10 @@ echo -e "\e[32mUpdate Omarchy\e[0m"
|
||||
|
||||
omarchy-update-time
|
||||
|
||||
# Suppress Hyprland config errors while git updates default config files mid-pull
|
||||
hyprctl keyword debug:suppress_errors true &>/dev/null || true
|
||||
|
||||
git -C $OMARCHY_PATH pull --autostash
|
||||
git -C $OMARCHY_PATH --no-pager diff --check || git -C $OMARCHY_PATH reset --merge
|
||||
|
||||
hyprctl reload &>/dev/null || true
|
||||
|
||||
@@ -2,13 +2,6 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Run the update inside a PTY so pacman/yay keep showing download progress
|
||||
# while still logging the full session for later analysis.
|
||||
if [[ -z $OMARCHY_UPDATE_LOGGED ]]; then
|
||||
script_command=$(printf '%q ' "$0" "$@")
|
||||
exec env OMARCHY_UPDATE_LOGGED=1 script -qefc "$script_command" "/tmp/omarchy-update.log"
|
||||
fi
|
||||
|
||||
# Ensure screensaver/sleep doesn't set in during updates
|
||||
hyprctl dispatch tagwindow +noidle &>/dev/null || true
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
[Desktop Entry]
|
||||
Hidden=true
|
||||
+1
-1
@@ -2,7 +2,7 @@ if command -v mise &> /dev/null; then
|
||||
eval "$(mise activate bash)"
|
||||
fi
|
||||
|
||||
if command -v starship &> /dev/null; then
|
||||
if [[ $- == *i* ]] && [[ ${TERM:-} != "dumb" ]] && command -v starship &> /dev/null; then
|
||||
eval "$(starship init bash)"
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# Only display the OSD on the currently focused monitor
|
||||
$osdclient = swayosd-client --monitor "$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')"
|
||||
$osdclient = swayosd-client --monitor "$(omarchy-hyprland-monitor-focused)"
|
||||
|
||||
# Laptop multimedia keys for volume and LCD brightness (with OSD)
|
||||
bindeld = ,XF86AudioRaiseVolume, Volume up, exec, $osdclient --output-volume raise
|
||||
bindeld = ,XF86AudioLowerVolume, Volume down, exec, $osdclient --output-volume lower
|
||||
bindeld = ,XF86AudioMute, Mute, exec, $osdclient --output-volume mute-toggle
|
||||
bindeld = ,XF86AudioMicMute, Mute microphone, exec, $osdclient --input-volume mute-toggle
|
||||
bindeld = ,XF86AudioMicMute, Mute microphone, exec, omarchy-cmd-mic-mute
|
||||
bindeld = ,XF86MonBrightnessUp, Brightness up, exec, omarchy-brightness-display +5%
|
||||
bindeld = ,XF86MonBrightnessDown, Brightness down, exec, omarchy-brightness-display 5%-
|
||||
bindeld = ,XF86KbdBrightnessUp, Keyboard brightness up, exec, omarchy-brightness-keyboard up
|
||||
|
||||
@@ -122,6 +122,7 @@ master {
|
||||
misc {
|
||||
disable_hyprland_logo = true
|
||||
disable_splash_rendering = true
|
||||
disable_scale_notification = true
|
||||
focus_on_activate = true
|
||||
anr_missed_pings = 3
|
||||
on_focus_under_fullscreen = 1
|
||||
|
||||
@@ -15,7 +15,6 @@ 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/nautilus-python.sh
|
||||
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
|
||||
@@ -24,7 +23,6 @@ run_logged $OMARCHY_INSTALL/config/sudoless-asdcontrol.sh
|
||||
run_logged $OMARCHY_INSTALL/config/input-group.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
|
||||
run_logged $OMARCHY_INSTALL/config/wifi-powersave-rules.sh
|
||||
run_logged $OMARCHY_INSTALL/config/plocate-ac-only.sh
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Fix Dell XPS haptic touchpad.
|
||||
# The Synaptics haptic touchpad (06CB:D01A) uses the HID Manual Trigger
|
||||
# The Synaptics haptic touchpad (vendor 06CB) uses the HID Manual Trigger
|
||||
# protocol, but the kernel's HID haptic subsystem only supports Auto Trigger.
|
||||
# This sets up a lightweight daemon that monitors touchpad button events and
|
||||
# sends haptic pulses via HID feature reports on the hidraw device.
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
# Fix display issues on Dell XPS 2026+ with LG OLED panel and Intel Panther Lake (Xe3) GPU.
|
||||
# Power-saving features cause the screen to run at 10hz.
|
||||
# Power-saving features (PSR and Panel Replay) cause freezes and display glitches.
|
||||
if omarchy-hw-match "XPS" \
|
||||
&& omarchy-hw-intel-ptl \
|
||||
&& test "$(od -An -tx1 -j8 -N2 /sys/class/drm/card*-eDP-*/edid 2>/dev/null | tr -d ' \n')" = "30e4"; then
|
||||
|
||||
echo "Detected Dell XPS with LG OLED panel on Panther Lake, applying display power-saving fix..."
|
||||
|
||||
CMDLINE='KERNEL_CMDLINE[default]+=" xe.enable_panel_replay=0"'
|
||||
CMDLINE='KERNEL_CMDLINE[default]+=" xe.enable_psr=0 xe.enable_panel_replay=0"'
|
||||
|
||||
sudo mkdir -p /etc/limine-entry-tool.d
|
||||
cat <<EOF | sudo tee /etc/limine-entry-tool.d/dell-xps-ptl-display.conf >/dev/null
|
||||
# Fix Dell XPS OLED display issues by disabling Xe PSR2 power-saving feature
|
||||
# Fix Dell XPS OLED display issues by disabling Xe PSR and Panel Replay power-saving features
|
||||
$CMDLINE
|
||||
EOF
|
||||
|
||||
# Also append to /etc/default/limine if it exists, since it overrides drop-in configs
|
||||
if [ -f /etc/default/limine ] && ! grep -q 'xe.enable_panel_replay' /etc/default/limine; then
|
||||
if [ -f /etc/default/limine ] && ! grep -q 'xe.enable_psr' /etc/default/limine; then
|
||||
echo "$CMDLINE" | sudo tee -a /etc/default/limine >/dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -6,5 +6,6 @@ if omarchy-hw-intel && omarchy-battery-present; then
|
||||
cpu_model=$(grep -m1 "^model\s*:" /proc/cpuinfo 2>/dev/null | cut -d: -f2 | tr -d ' ')
|
||||
if [[ "$cpu_model" =~ ^(151|154|170|172|183|186|189|191|204)$ ]]; then
|
||||
omarchy-pkg-add intel-lpmd
|
||||
sudo systemctl enable intel_lpmd.service
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
sudo rm -f /etc/xdg/autostart/org.fcitx.Fcitx5.desktop
|
||||
@@ -10,6 +10,8 @@ $USER ALL=(ALL) NOPASSWD: /usr/bin/systemctl
|
||||
$USER ALL=(ALL) NOPASSWD: /usr/bin/ufw
|
||||
$USER ALL=(ALL) NOPASSWD: /usr/bin/ufw-docker
|
||||
$USER ALL=(ALL) NOPASSWD: /usr/bin/gtk-update-icon-cache
|
||||
$USER ALL=(ALL) NOPASSWD: /usr/bin/tee /etc/udev/rules.d/*
|
||||
$USER ALL=(ALL) NOPASSWD: /usr/bin/udevadm
|
||||
$USER ALL=(ALL) NOPASSWD: SYMLINK_RESOLVED
|
||||
$USER ALL=(ALL) NOPASSWD: FIRST_RUN_CLEANUP
|
||||
EOF
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
echo "Set power profile based on source switching (AC or Battery)"
|
||||
|
||||
source $OMARCHY_PATH/install/config/powerprofilesctl-rules.sh
|
||||
source $OMARCHY_PATH/install/first-run/powerprofilesctl-rules.sh
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
echo "Remove Fcitx5 XDG autostart desktop entry"
|
||||
|
||||
source $OMARCHY_PATH/install/config/remove-fcitx5-autostart.sh
|
||||
@@ -0,0 +1,3 @@
|
||||
echo "Update npx wrappers to run through mise node@latest"
|
||||
|
||||
source "$OMARCHY_PATH/install/packaging/npx.sh"
|
||||
@@ -0,0 +1,5 @@
|
||||
echo "Enable Intel LPMD service if installed"
|
||||
|
||||
if pacman -Q intel-lpmd &>/dev/null; then
|
||||
sudo systemctl enable --now intel_lpmd.service
|
||||
fi
|
||||
@@ -0,0 +1,6 @@
|
||||
echo "Copy Fcitx5 autostart desktop file to ~/.config/autostart"
|
||||
|
||||
mkdir -p ~/.config/autostart/
|
||||
cp "$OMARCHY_PATH/config/autostart/org.fcitx.Fcitx5.desktop" ~/.config/autostart/
|
||||
|
||||
omarchy-restart-xcompose
|
||||
Reference in New Issue
Block a user