Skip to content

Commit 04d2f10

Browse files
authored
Merge pull request #3295 from basecamp/dev
Omarchy 3.2.0
2 parents d833b45 + 45e3272 commit 04d2f10

File tree

174 files changed

+1180
-368
lines changed

Some content is hidden

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

174 files changed

+1180
-368
lines changed

autostart/walker.desktop

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[Desktop Entry]
2+
Name=Walker
3+
Comment=Walker Service
4+
Exec=walker --gapplication-service
5+
StartupNotify=false
6+
Terminal=false
7+
Type=Application

bin/omarchy-cmd-first-run

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ if [[ -f "$FIRST_RUN_MODE" ]]; then
1212
bash "$OMARCHY_PATH/install/first-run/firewall.sh"
1313
bash "$OMARCHY_PATH/install/first-run/dns-resolver.sh"
1414
bash "$OMARCHY_PATH/install/first-run/gnome-theme.sh"
15+
bash "$OMARCHY_PATH/install/first-run/elephant.sh"
1516
sudo rm -f /etc/sudoers.d/first-run
1617

1718
bash "$OMARCHY_PATH/install/first-run/welcome.sh"

bin/omarchy-cmd-screenrecord

Lines changed: 26 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ if [[ ! -d "$OUTPUT_DIR" ]]; then
88
exit 1
99
fi
1010

11-
SCOPE=""
12-
AUDIO="false"
11+
DESKTOP_AUDIO="false"
12+
MICROPHONE_AUDIO="false"
1313
WEBCAM="false"
14+
STOP_RECORDING="false"
1415

1516
for arg in "$@"; do
1617
case "$arg" in
17-
--with-audio) AUDIO="true" ;;
18+
--with-desktop-audio) DESKTOP_AUDIO="true" ;;
19+
--with-microphone-audio) MICROPHONE_AUDIO="true" ;;
1820
--with-webcam) WEBCAM="true" ;;
19-
output|region) SCOPE="$arg" ;;
21+
--stop-recording) STOP_RECORDING="true"
2022
esac
2123
done
2224

@@ -57,27 +59,35 @@ start_webcam_overlay() {
5759

5860
start_screenrecording() {
5961
local filename="$OUTPUT_DIR/screenrecording-$(date +'%Y-%m-%d_%H-%M-%S').mp4"
62+
local audio_devices=""
6063
local audio_args=""
6164

62-
# Merge audio tracks into one - separate tracks only play one at a time in most players
63-
[[ "$AUDIO" == "true" ]] && audio_args="-a default_output|default_input"
65+
[[ "$DESKTOP_AUDIO" == "true" ]] && audio_devices+="default_output"
6466

65-
gpu-screen-recorder -w "$@" -f 60 -c mp4 -o "$filename" $audio_args &
67+
if [[ "$MICROPHONE_AUDIO" == "true" ]]; then
68+
# Merge audio tracks into one - separate tracks only play one at a time in most players
69+
[[ -n "$audio_devices" ]] && audio_devices+="|"
70+
audio_devices+="default_input"
71+
fi
72+
73+
[[ -n "$audio_devices" ]] && audio_args+="-a $audio_devices"
74+
75+
gpu-screen-recorder -w portal -f 60 -fallback-cpu-encoding yes -o "$filename" $audio_args -ac aac &
6676
toggle_screenrecording_indicator
6777
}
6878

6979
stop_screenrecording() {
70-
pkill -SIGINT -f "gpu-screen-recorder" # SIGINT required to save video properly
80+
pkill -SIGINT -f "^gpu-screen-recorder" # SIGINT required to save video properly
7181

7282
# Wait a maximum of 5 seconds to finish before hard killing
7383
local count=0
74-
while pgrep -f "gpu-screen-recorder" >/dev/null && [ $count -lt 50 ]; do
84+
while pgrep -f "^gpu-screen-recorder" >/dev/null && [ $count -lt 50 ]; do
7585
sleep 0.1
7686
count=$((count + 1))
7787
done
7888

79-
if pgrep -f "gpu-screen-recorder" >/dev/null; then
80-
pkill -9 -f "gpu-screen-recorder"
89+
if pgrep -f "^gpu-screen-recorder" >/dev/null; then
90+
pkill -9 -f "^gpu-screen-recorder"
8191
cleanup_webcam
8292
notify-send "Screen recording error" "Recording process had to be force-killed. Video may be corrupted." -u critical -t 5000
8393
else
@@ -92,51 +102,19 @@ toggle_screenrecording_indicator() {
92102
}
93103

94104
screenrecording_active() {
95-
pgrep -f "gpu-screen-recorder" >/dev/null || pgrep -x slurp >/dev/null || pgrep -f "WebcamOverlay" >/dev/null
105+
pgrep -f "^gpu-screen-recorder" >/dev/null || pgrep -f "WebcamOverlay" >/dev/null
96106
}
97107

98108
if screenrecording_active; then
99-
if pgrep -x slurp >/dev/null; then
100-
pkill -x slurp 2>/dev/null
101-
elif pgrep -f "WebcamOverlay" >/dev/null && ! pgrep -f "gpu-screen-recorder" >/dev/null; then
109+
if pgrep -f "WebcamOverlay" >/dev/null && ! pgrep -f "^gpu-screen-recorder" >/dev/null; then
102110
cleanup_webcam
103111
else
104112
stop_screenrecording
105113
fi
106-
elif [[ "$SCOPE" == "output" ]]; then
114+
elif [[ "$STOP_RECORDING" == "false" ]]; then
107115
[[ "$WEBCAM" == "true" ]] && start_webcam_overlay
108116

109-
if ! output=$(slurp -o -f "%o"); then
110-
[[ "$WEBCAM" == "true" ]] && cleanup_webcam
111-
exit 1
112-
fi
113-
114-
if [[ -z "$output" ]]; then
115-
notify-send "Error" "Could not detect monitor" -u critical
116-
[[ "$WEBCAM" == "true" ]] && cleanup_webcam
117-
exit 1
118-
fi
119-
120-
start_screenrecording "$output"
117+
start_screenrecording || cleanup_webcam
121118
else
122-
[[ "$WEBCAM" == "true" ]] && start_webcam_overlay
123-
124-
scale=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .scale')
125-
126-
if ! region=$(slurp -f "%wx%h+%x+%y"); then
127-
[[ "$WEBCAM" == "true" ]] && cleanup_webcam
128-
exit 1
129-
fi
130-
131-
if [[ "$region" =~ ^([0-9]+)x([0-9]+)\+([0-9]+)\+([0-9]+)$ ]]; then
132-
w=$(awk "BEGIN {printf \"%.0f\", ${BASH_REMATCH[1]} * $scale}")
133-
h=$(awk "BEGIN {printf \"%.0f\", ${BASH_REMATCH[2]} * $scale}")
134-
x=$(awk "BEGIN {printf \"%.0f\", ${BASH_REMATCH[3]} * $scale}")
135-
y=$(awk "BEGIN {printf \"%.0f\", ${BASH_REMATCH[4]} * $scale}")
136-
scaled_region="${w}x${h}+${x}+${y}"
137-
else
138-
scaled_region="$region"
139-
fi
140-
141-
start_screenrecording region -region "$scaled_region"
119+
exit 1
142120
fi

bin/omarchy-cmd-screensaver

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

33
screensaver_in_focus() {
4-
hyprctl activewindow -j | jq -e '.class == "Screensaver"' >/dev/null 2>&1
4+
hyprctl activewindow -j | jq -e '.class == "org.omarchy.screensaver"' >/dev/null 2>&1
55
}
66

77
exit_screensaver() {
88
hyprctl keyword cursor:invisible false
99
pkill -x tte 2>/dev/null
10-
pkill -f "alacritty --class Screensaver" 2>/dev/null
10+
pkill -f org.omarchy.screensaver 2>/dev/null
1111
exit 0
1212
}
1313

1414
trap exit_screensaver SIGINT SIGTERM SIGHUP SIGQUIT
1515

16+
printf '\033]11;rgb:00/00/00\007' # Set background color to black
17+
1618
hyprctl keyword cursor:invisible true &>/dev/null
1719

1820
while true; do
19-
effect=$(tte 2>&1 | grep -oP '{\K[^}]+' | tr ',' ' ' | tr ' ' '\n' | sed -n '/^beams$/,$p' | sort -u | shuf -n1)
2021
tte -i ~/.config/omarchy/branding/screensaver.txt \
21-
--frame-rate 240 --canvas-width 0 --canvas-height $(($(tput lines) - 2)) --anchor-canvas c --anchor-text c \
22-
"$effect" &
22+
--frame-rate 120 --canvas-width 0 --canvas-height 0 --anchor-canvas c --anchor-text c\
23+
--no-eol --no-restore-cursor random_effect &
2324

2425
while pgrep -x tte >/dev/null; do
2526
if read -n 1 -t 3 || ! screensaver_in_focus; then

bin/omarchy-cmd-terminal-cwd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ shell_pid=$(pgrep -P "$terminal_pid" | tail -n1)
66

77
if [[ -n $shell_pid ]]; then
88
cwd=$(readlink -f "/proc/$shell_pid/cwd" 2>/dev/null)
9+
shell=$(readlink -f "/proc/$shell_pid/exe" 2>/dev/null)
910

10-
if [[ -d $cwd ]]; then
11+
# Check if $shell is a valid shell and $cwd is a directory.
12+
if grep -qs "$shell" /etc/shells && [[ -d $cwd ]]; then
1113
echo "$cwd"
1214
else
1315
echo "$HOME"

bin/omarchy-font-set

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ if [[ -n "$font_name" && "$font_name" != "CNCLD" ]]; then
1818
pkill -SIGUSR2 ghostty
1919
fi
2020

21+
sed -i "s/font_family = .*/font_family = $font_name/g" ~/.config/hypr/hyprlock.conf
2122
sed -i "s/font-family: .*/font-family: '$font_name';/g" ~/.config/waybar/style.css
2223
sed -i "s/font-family: .*/font-family: '$font_name';/g" ~/.config/swayosd/style.css
2324
xmlstarlet ed -L \
@@ -27,7 +28,10 @@ if [[ -n "$font_name" && "$font_name" != "CNCLD" ]]; then
2728

2829
omarchy-restart-waybar
2930
omarchy-restart-swayosd
30-
omarchy-restart-walker
31+
32+
if pgrep -x ghostty; then
33+
notify-send " You must restart Ghostty to see font change"
34+
fi
3135

3236
omarchy-hook font-set "$font_name"
3337
else

bin/omarchy-hyprland-window-pop

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,45 @@
22

33
# Toggle to pop-out a tile to stay fixed on a display basis.
44

5+
# Usage:
6+
# omarchy-hyprland-window-pop [width height [x y]]
7+
#
8+
# Arguments:
9+
# width Optional. Width of the floating window. Default: 1300
10+
# height Optional. Height of the floating window. Default: 900
11+
# x Optional. X position of the window. Must provide both X and Y to take effect.
12+
# y Optional. Y position of the window. Must provide both X and Y to take effect.
13+
#
14+
# Behavior:
15+
# - If the window is already pinned, it will be unpinned and removed from the pop layer.
16+
# - If the window is not pinned, it will be floated, resized, moved/centered, pinned, brought to top, and popped.
17+
18+
width=${1:-1300}
19+
height=${2:-900}
20+
x=${3:-}
21+
y=${4:-}
22+
523
active=$(hyprctl activewindow -j)
6-
pinned=$(echo "$active" | jq .pinned)
7-
addr=$(echo "$active" | jq -r ".address")
8-
[ -z "$addr" ] && { echo "No active window"; exit 0; }
24+
pinned=$(echo "$active" | jq ".pinned")
25+
addr=$(echo "$active" | jq -r ".address")
926

10-
if [ "$pinned" = "true" ]; then
27+
if [[ $pinned == "true" ]]; then
1128
hyprctl -q --batch \
12-
"dispatch pin address:$addr;" \
13-
"dispatch togglefloating address:$addr;" \
14-
"dispatch tagwindow -pop address:$addr;"
15-
else
29+
dispatch pin address:$addr; \
30+
dispatch togglefloating address:$addr; \
31+
dispatch tagwindow -pop address:$addr;
32+
elif [[ -n $addr ]]; then
33+
hyprctl dispatch togglefloating address:$addr
34+
hyprctl dispatch resizeactive exact $width $height address:$addr
35+
36+
if [[ -n $x && -n $y ]]; then
37+
hyprctl dispatch moveactive $x $y address:$addr
38+
else
39+
hyprctl dispatch centerwindow address:$addr
40+
fi
41+
1642
hyprctl -q --batch \
17-
"dispatch togglefloating address:$addr;" \
18-
"dispatch centerwindow address:$addr;" \
19-
"dispatch pin address:$addr;" \
20-
"dispatch alterzorder top address:$addr;" \
21-
"dispatch tagwindow +pop address:$addr;"
43+
dispatch pin address:$addr; \
44+
dispatch alterzorder top address:$addr; \
45+
dispatch tagwindow +pop address:$addr;
2246
fi

bin/omarchy-install-dev-env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ ruby)
5050
omarchy-pkg-add libyaml
5151
mise use --global ruby@latest
5252
mise settings add idiomatic_version_file_enable_tools ruby
53+
echo "gem: --no-document" > ~/.gemrc
5354
mise x ruby -- gem install rails --no-document
5455
echo -e "\nYou can now run: rails new myproject"
5556
;;

bin/omarchy-install-steam

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

3+
set -e
4+
35
echo "Now pick dependencies matching your graphics card"
4-
sudo pacman -Syu --noconfirm steam
6+
sudo pacman -S --noconfirm steam
57
setsid gtk-launch steam >/dev/null 2>&1 &

bin/omarchy-install-terminal

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,43 @@ package="$1"
99

1010
# Map package name to desktop entry ID
1111
case "$package" in
12-
alacritty)
13-
desktop_id="Alacritty.desktop"
14-
;;
15-
ghostty)
16-
desktop_id="com.mitchellh.ghostty.desktop"
17-
;;
18-
kitty)
19-
desktop_id="kitty.desktop"
20-
;;
21-
*)
22-
echo "Unknown terminal: $package"
23-
exit 1
24-
;;
12+
alacritty) desktop_id="Alacritty.desktop" ;;
13+
ghostty) desktop_id="com.mitchellh.ghostty.desktop" ;;
14+
kitty) desktop_id="kitty.desktop" ;;
15+
*)
16+
echo "Unknown terminal: $package"
17+
exit 1
18+
;;
2519
esac
2620

2721
# Install package
2822
if omarchy-pkg-add $package; then
29-
# Set as default terminal
30-
echo "Setting $package as new default terminal..."
31-
sed -i "/export TERMINAL=/ c\export TERMINAL=$package" ~/.config/uwsm/default
32-
3323
# Copy custom desktop entry for alacritty with X-TerminalArg* keys
34-
if [ "$package" = "alacritty" ]; then
24+
if [[ $package == "alacritty" ]]; then
3525
mkdir -p ~/.local/share/applications
36-
cp "$OMARCHY_PATH/applications/Alacritty.desktop" ~/.local/share/applications/
26+
cat > ~/.local/share/applications/Alacritty.desktop << EOF
27+
[Desktop Entry]
28+
Type=Application
29+
TryExec=alacritty
30+
Exec=alacritty
31+
Icon=Alacritty
32+
Terminal=false
33+
Categories=System;TerminalEmulator;
34+
Name=Alacritty
35+
GenericName=Terminal
36+
Comment=A fast, cross-platform, OpenGL terminal emulator
37+
StartupNotify=true
38+
StartupWMClass=Alacritty
39+
Actions=New;
40+
X-TerminalArgExec=-e
41+
X-TerminalArgAppId=--class=
42+
X-TerminalArgTitle=--title=
43+
X-TerminalArgDir=--working-directory=
44+
45+
[Desktop Action New]
46+
Name=New Terminal
47+
Exec=alacritty
48+
EOF
3749
fi
3850

3951
# Update xdg-terminals.list to prioritize the proper terminal

0 commit comments

Comments
 (0)