Skip to content

Commit bc9777c

Browse files
authored
Merge pull request #5388 from basecamp/rc
Omarchy 3.6.0
2 parents 236a34b + add6a3c commit bc9777c

90 files changed

Lines changed: 623 additions & 272 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bin/omarchy-cmd-audio-switch

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@
22

33
# Switch between audio outputs while preserving the mute status. By default mapped to Super + Mute.
44

5-
focused_monitor=$(omarchy-hyprland-monitor-focused)
6-
75
sinks=$(pactl -f json list sinks | jq '[.[] | select((.ports | length == 0) or ([.ports[]? | .availability != "not available"] | any))]')
86
sinks_count=$(echo "$sinks" | jq '. | length')
97

108
if (( sinks_count == 0 )); then
11-
swayosd-client \
12-
--monitor "$focused_monitor" \
13-
--custom-message "No audio devices found"
9+
omarchy-swayosd-client --custom-message "No audio devices found"
1410
exit 1
1511
fi
1612

@@ -57,10 +53,10 @@ fi
5753
next_sink_volume_icon="sink-volume-${icon_state}-symbolic"
5854

5955
if [[ $next_sink_name != $current_sink_name ]]; then
60-
pactl set-default-sink "$next_sink_name"
56+
next_sink_wpid=$(echo "$next_sink" | jq -r '.properties."object.id"')
57+
wpctl set-default "$next_sink_wpid"
6158
fi
6259

63-
swayosd-client \
64-
--monitor "$focused_monitor" \
60+
omarchy-swayosd-client \
6561
--custom-message "$next_sink_description" \
6662
--custom-icon "$next_sink_volume_icon"

bin/omarchy-cmd-first-run

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ if [[ -f $FIRST_RUN_MODE ]]; then
1010
rm -f "$FIRST_RUN_MODE"
1111

1212
bash "$OMARCHY_PATH/install/first-run/battery-monitor.sh"
13+
bash "$OMARCHY_PATH/install/first-run/recover-internal-monitor.sh"
1314
bash "$OMARCHY_PATH/install/first-run/cleanup-reboot-sudoers.sh"
1415
bash "$OMARCHY_PATH/install/first-run/firewall.sh"
1516
bash "$OMARCHY_PATH/install/first-run/dns-resolver.sh"

bin/omarchy-cmd-mic-mute

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#!/bin/bash
22

3-
# Toggle microphone mute. Dell XPS systems get special handling for the hardware LED.
3+
# Toggle microphone mute. Dell XPS and ThinkPad systems get special handling for the hardware LED.
44

55
if omarchy-hw-match "XPS"; then
66
omarchy-cmd-mic-mute-xps
7+
elif omarchy-hw-match "ThinkPad"; then
8+
omarchy-cmd-mic-mute-thinkpad
79
else
8-
swayosd-client --monitor "$(omarchy-hyprland-monitor-focused)" --input-volume mute-toggle
10+
omarchy-swayosd-client --input-volume mute-toggle
911
fi

bin/omarchy-cmd-mic-mute-thinkpad

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
# Toggle microphone mute on ThinkPad systems. Uses wpctl for reliable toggling
4+
# and syncs the platform::micmute LED via brightnessctl.
5+
6+
wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle >/dev/null
7+
8+
if pactl get-source-mute @DEFAULT_SOURCE@ | grep -q 'yes'; then
9+
osd_message='Microphone muted'
10+
osd_icon='microphone-sensitivity-muted-symbolic'
11+
led_value=1
12+
else
13+
osd_message='Microphone on'
14+
osd_icon='audio-input-microphone-symbolic'
15+
led_value=0
16+
fi
17+
18+
brightnessctl --device="platform::micmute" set "$led_value" >/dev/null 2>&1 || true
19+
20+
swayosd-client \
21+
--monitor "$(omarchy-hyprland-monitor-focused)" \
22+
--custom-message "$osd_message" \
23+
--custom-icon "$osd_icon"

bin/omarchy-cmd-mic-mute-xps

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ if [[ -e /sys/class/leds/platform::micmute/brightness ]]; then
3838
done
3939
fi
4040

41-
swayosd-client \
42-
--monitor "$(omarchy-hyprland-monitor-focused)" \
41+
omarchy-swayosd-client \
4342
--custom-message "$osd_message" \
4443
--custom-icon "$osd_icon"

bin/omarchy-cmd-screenrecord

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ stop_screenrecording() {
134134
pkill -9 -f "^gpu-screen-recorder"
135135
notify-send "Screen recording error" "Recording process had to be force-killed. Video may be corrupted." -u critical -t 5000
136136
else
137-
trim_first_frame
137+
finalize_recording
138138
local filename=$(cat "$RECORDING_FILE" 2>/dev/null)
139139
local preview="${filename%.mp4}-preview.png"
140140

@@ -159,17 +159,24 @@ screenrecording_active() {
159159
pgrep -f "^gpu-screen-recorder" >/dev/null
160160
}
161161

162-
trim_first_frame() {
162+
finalize_recording() {
163163
local latest
164164
latest=$(cat "$RECORDING_FILE" 2>/dev/null)
165+
[[ -f $latest ]] || return
165166

166-
if [[ -n $latest && -f $latest ]]; then
167-
local trimmed="${latest%.mp4}-trimmed.mp4"
168-
if ffmpeg -y -ss 0.1 -i "$latest" -c copy "$trimmed" -loglevel quiet 2>/dev/null; then
169-
mv "$trimmed" "$latest"
170-
else
171-
rm -f "$trimmed"
172-
fi
167+
# Trim the first frame, and normalize audio to -14 LUFS if present, in a single pass
168+
local args=(-y -ss 0.1 -i "$latest")
169+
if ffprobe -v error -select_streams a -show_entries stream=codec_type -of csv=p=0 "$latest" 2>/dev/null | grep -q audio; then
170+
args+=(-af loudnorm=I=-14:TP=-1.5:LRA=11 -c:v copy)
171+
else
172+
args+=(-c copy)
173+
fi
174+
175+
local processed="${latest%.mp4}-processed.mp4"
176+
if ffmpeg "${args[@]}" "$processed" -loglevel quiet 2>/dev/null; then
177+
mv "$processed" "$latest"
178+
else
179+
rm -f "$processed"
173180
fi
174181
}
175182

bin/omarchy-hw-external-monitors

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
# Returns true when an external monitor is physically connected.
4+
# Uses kernel DRM state so the result is independent of Hyprland's startup timing.
5+
6+
for status in /sys/class/drm/card*-*/status; do
7+
[[ "$status" == *-eDP-*/status ]] && continue
8+
[[ "$(<"$status")" == "connected" ]] && exit 0
9+
done
10+
exit 1

bin/omarchy-hw-hybrid-gpu

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
(($(lspci | grep -cE 'VGA|3D|Display') >= 2))

bin/omarchy-hw-match

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

3-
# Match against the computer's DMI product name (case-insensitive).
4-
# Usage: omarchy-hw-match "XPS"
3+
# Match against the computer's DMI product name or product family (case-insensitive).
4+
# Usage: omarchy-hw-match "XPS" or omarchy-hw-match "ThinkPad"
55

6-
grep -qi "$1" /sys/class/dmi/id/product_name 2>/dev/null
6+
grep -qi "$1" /sys/class/dmi/id/product_name 2>/dev/null ||
7+
grep -qi "$1" /sys/class/dmi/id/product_family 2>/dev/null
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
# Clear the internal-monitor-disable toggle if no external display is connected.
4+
# Runs before the graphical session so Hyprland doesn't block on having no output
5+
# to render to when the user rebooted with the external unplugged.
6+
7+
TOGGLE="$HOME/.local/state/omarchy/toggles/hypr/internal-monitor-disable.conf"
8+
9+
if [[ -f $TOGGLE ]] && ! omarchy-hw-external-monitors; then
10+
rm -f "$TOGGLE"
11+
fi

0 commit comments

Comments
 (0)