Merge branch 'dev' into update-omarchy-refresh-plymouth

This commit is contained in:
David Heinemeier Hansson
2025-09-10 19:08:34 +02:00
committed by GitHub
16 changed files with 80 additions and 33 deletions

View File

@@ -2,7 +2,7 @@
focused_monitor="$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')"
sinks=$(pactl -f json list sinks)
sinks=$(pactl -f json list sinks | jq '[.[] | select([.ports[]? | .availability == "available"] | any)]')
sinks_count=$(echo "$sinks" | jq '. | length')
if [ "$sinks_count" -eq 0 ]; then

View File

@@ -8,5 +8,6 @@ if [[ -f "$FIRST_RUN_MODE" ]]; then
rm -f "$FIRST_RUN_MODE"
$OMARCHY_PATH/install/first-run/battery-monitor.sh
$OMARCHY_PATH/install/first-run/firewall.sh
$OMARCHY_PATH/install/first-run/gnome-theme.sh
sudo rm -f /etc/sudoers.d/first-run
fi

View File

@@ -8,31 +8,47 @@ if [[ ! -d "$OUTPUT_DIR" ]]; then
exit 1
fi
if [[ $2 == "audio" ]]; then
AUDIO="--audio"
else
AUDIO=""
fi
# Selects region or output
SCOPE="$1"
screenrecording() {
# Selects audio inclusion or not
AUDIO=$([[ $2 == "audio" ]] && echo "--audio")
start_screenrecording() {
filename="$OUTPUT_DIR/screenrecording-$(date +'%Y-%m-%d_%H-%M-%S').mp4"
notify-send "Screen recording starting..." -t 1000
sleep 1
if lspci | grep -Eqi 'nvidia|intel.*graphics'; then
wf-recorder $AUDIO -f "$filename" -c libx264 -p crf=23 -p preset=medium -p movflags=+faststart "$@"
wf-recorder $AUDIO -f "$filename" -c libx264 -p crf=23 -p preset=medium -p movflags=+faststart "$@" &
else
wl-screenrec $AUDIO -f "$filename" --ffmpeg-encoder-options="-c:v libx264 -crf 23 -preset medium -movflags +faststart" "$@"
wl-screenrec $AUDIO -f "$filename" --ffmpeg-encoder-options="-c:v libx264 -crf 23 -preset medium -movflags +faststart" "$@" &
fi
toggle_screenrecording_indicator
}
if pgrep -x wl-screenrec >/dev/null || pgrep -x wf-recorder >/dev/null; then
stop_screenrecording() {
pkill -x wl-screenrec
pkill -x wf-recorder
notify-send "Screen recording saved to $OUTPUT_DIR" -t 2000
elif [[ "$1" == "output" ]]; then
screenrecording
sleep 0.2 # ensures the process is actually dead before we check
toggle_screenrecording_indicator
}
toggle_screenrecording_indicator() {
pkill -RTMIN+8 waybar
}
screenrecording_active() {
pgrep -x wl-screenrec >/dev/null || pgrep -x wf-recorder >/dev/null
}
if screenrecording_active; then
stop_screenrecording
elif [[ "$SCOPE" == "output" ]]; then
start_screenrecording
else
region=$(slurp) || exit 1
screenrecording -g "$region"
start_screenrecording -g "$region"
fi

View File

@@ -1,7 +0,0 @@
#!/bin/bash
if pgrep -x wl-screenrec >/dev/null || pgrep -x wf-recorder >/dev/null; then
pkill -x wl-screenrec
pkill -x wf-recorder
notify-send "Screen recording stopped" -t 2000
fi

View File

@@ -7,4 +7,4 @@ if command -v limine-mkinitcpio &>/dev/null; then
sudo limine-mkinitcpio
else
sudo mkinitcpio -P
fi
fi

View File

@@ -7,4 +7,4 @@ omarchy-update-git
omarchy-migrate
omarchy-update-system-pkgs
omarchy-update-restart
omarchy-restart-waybar # removes update-available icon
omarchy-update-available-reset

View File

@@ -0,0 +1,4 @@
#!/bin/bash
# Ensure Waybar icon offering the available update is removed
pkill -RTMIN+7 waybar

View File

@@ -5,7 +5,7 @@
"spacing": 0,
"height": 26,
"modules-left": ["custom/omarchy", "hyprland/workspaces"],
"modules-center": ["clock", "custom/update"],
"modules-center": ["clock", "custom/update", "custom/screenrecording-indicator"],
"modules-right": [
"group/tray-expander",
"bluetooth",
@@ -48,6 +48,7 @@
"exec": "omarchy-update-available",
"on-click": "omarchy-launch-floating-terminal-with-presentation omarchy-update",
"tooltip-format": "Omarchy update available",
"signal": 7,
"interval": 3600
},
@@ -124,6 +125,12 @@
"format": " ",
"tooltip": false
},
"custom/screenrecording-indicator": {
"on-click": "omarchy-cmd-screenrecord",
"exec": "$OMARCHY_PATH/default/waybar/indicators/screen-recording.sh",
"signal": 8,
"return-type": "json"
},
"tray": {
"icon-size": 12,
"spacing": 12

View File

@@ -37,6 +37,7 @@
#bluetooth,
#pulseaudio,
#custom-omarchy,
#custom-screenrecording-indicator,
#custom-update {
min-width: 12px;
margin: 0 7.5px;
@@ -61,3 +62,13 @@ tooltip {
.hidden {
opacity: 0;
}
#custom-screenrecording-indicator {
min-width: 12px;
margin-left: 8.75px;
font-size: 10px;
}
#custom-screenrecording-indicator.active {
color: #a55555;
}

View File

@@ -0,0 +1,7 @@
#!/bin/bash
if pgrep -x wl-screenrec >/dev/null || pgrep -x wf-recorder >/dev/null; then
echo '{"text": "󰻂", "tooltip": "Stop recording", "class": "active"}'
else
echo '{"text": ""}'
fi

View File

@@ -1,9 +1,5 @@
#!/bin/bash
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"
gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
gsettings set org.gnome.desktop.interface icon-theme "Yaru-blue"
# Set links for Nautilius action icons
sudo ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-previous-symbolic.svg /usr/share/icons/Yaru/scalable/actions/go-previous-symbolic.svg
sudo ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-next-symbolic.svg /usr/share/icons/Yaru/scalable/actions/go-next-symbolic.svg
@@ -26,4 +22,3 @@ ln -snf ~/.config/omarchy/current/theme/btop.theme ~/.config/btop/themes/current
mkdir -p ~/.config/mako
ln -snf ~/.config/omarchy/current/theme/mako.ini ~/.config/mako/config

View File

@@ -0,0 +1,5 @@
#!/bin/bash
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"
gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
gsettings set org.gnome.desktop.interface icon-theme "Yaru-blue"

View File

@@ -31,4 +31,7 @@ catch_errors() {
fi
}
# Ensure gum is available as early as possible to retry errors
sudo pacman -S --noconfirm gum
trap catch_errors ERR

View File

@@ -3,6 +3,3 @@ echo "Add new Omarchy Menu icon to Waybar"
mkdir -p ~/.local/share/fonts
cp ~/.local/share/omarchy/config/omarchy.ttf ~/.local/share/fonts/
fc-cache
echo
gum confirm "Replace current Waybar config (backup will be made)?" && omarchy-refresh-waybar

3
migrations/1757511571.sh Normal file
View File

@@ -0,0 +1,3 @@
echo "Add screen recording indicator to Waybar"
gum confirm "Replace current Waybar config (backup will be made)?" && omarchy-refresh-waybar

5
migrations/1757512135.sh Normal file
View File

@@ -0,0 +1,5 @@
echo "Make it possible to remove update-available icon with signal in Waybar"
if ! grep -q '"signal": 7' ~/.config/waybar/config.jsonc; then
sed -i '/"tooltip-format": "Omarchy update available",/a\ "signal": 7,' ~/.config/waybar/config.jsonc
fi