From 627b5f4ead088dbf1bb13e378be40b93fbf178a3 Mon Sep 17 00:00:00 2001 From: elpritchos <13980397+elpritchos@users.noreply.github.com> Date: Wed, 10 Sep 2025 15:51:28 +0900 Subject: [PATCH 1/8] Update audio switch script to filter available sinks (#1555) Filter audio sinks to include only available ports. --- bin/omarchy-cmd-audio-switch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/omarchy-cmd-audio-switch b/bin/omarchy-cmd-audio-switch index af6d53ad..b49a83a5 100755 --- a/bin/omarchy-cmd-audio-switch +++ b/bin/omarchy-cmd-audio-switch @@ -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 From a0674703f8db368d936f69860e5f1e4dd0dd971d Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 10 Sep 2025 09:08:04 +0200 Subject: [PATCH 2/8] Can't set gsettings this early so move to first-run --- bin/omarchy-cmd-first-run | 1 + install/config/theme.sh | 5 ----- install/first-run/gnome-theme.sh | 5 +++++ 3 files changed, 6 insertions(+), 5 deletions(-) create mode 100755 install/first-run/gnome-theme.sh diff --git a/bin/omarchy-cmd-first-run b/bin/omarchy-cmd-first-run index 9334d1d3..78a5dc85 100755 --- a/bin/omarchy-cmd-first-run +++ b/bin/omarchy-cmd-first-run @@ -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 diff --git a/install/config/theme.sh b/install/config/theme.sh index 17cda3c8..0a222e39 100755 --- a/install/config/theme.sh +++ b/install/config/theme.sh @@ -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 - diff --git a/install/first-run/gnome-theme.sh b/install/first-run/gnome-theme.sh new file mode 100755 index 00000000..0f163864 --- /dev/null +++ b/install/first-run/gnome-theme.sh @@ -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" From c9bacbe318ad91b7d87e77130b409c08197a7b54 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 10 Sep 2025 14:38:46 +0200 Subject: [PATCH 3/8] Make gum available as early as possible --- install/preflight/trap-errors.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/preflight/trap-errors.sh b/install/preflight/trap-errors.sh index 39381f1e..ff154cba 100755 --- a/install/preflight/trap-errors.sh +++ b/install/preflight/trap-errors.sh @@ -31,4 +31,7 @@ catch_errors() { fi } +# Ensure gum is available as early as possible to retry errors +sudo pacman -S gum + trap catch_errors ERR From 9ca2081742d0c95e7874cbc3950f702c25e65f51 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 10 Sep 2025 14:43:26 +0200 Subject: [PATCH 4/8] No confirm install only --- install/preflight/trap-errors.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/preflight/trap-errors.sh b/install/preflight/trap-errors.sh index ff154cba..6c3ebc6c 100755 --- a/install/preflight/trap-errors.sh +++ b/install/preflight/trap-errors.sh @@ -32,6 +32,6 @@ catch_errors() { } # Ensure gum is available as early as possible to retry errors -sudo pacman -S gum +sudo pacman -S --noconfirm gum trap catch_errors ERR From a57060ee31e4b2e48ad47fa26454ff478b122fd6 Mon Sep 17 00:00:00 2001 From: Ofir Levitan Date: Wed, 10 Sep 2025 16:48:55 +0300 Subject: [PATCH 5/8] feat(waybar): add recording indicator (#1561) * init * remove comment format * add pulse animation * change to signals * Move file to an internal location, match signal with what's being sent * Need to sleep a second to ensure that the recording has either started or stopped before we render config * Put it in a more prominent place * Use OMARCHY_PATH * Sharpen icons and add on-click to stop * Drop animation but reserve space * Lean entirely on waybar indicator rather than notification when starting * Use an explaining function instead of comments * Give time to ensure the process is dead before updating the indicator * No longer needed * Don't need to repeat the on-click * Don't need a full second * Naming * SIRGTMIN shouldn't be here * Don't need any of this that isn't seen or used * Explain the sleep * Mirror start/stop functions * Go all-in on explaining functions * Inline audio toggle * Better just to move the clock rather than have it be permanently offset * Fix all parameters and name them * Add migration * There is now a later omarchy-refresh-waybar offer --------- Co-authored-by: David Heinemeier Hansson --- bin/omarchy-cmd-screenrecord | 44 +++++++++++++------ bin/omarchy-cmd-screenrecord-stop | 7 --- config/waybar/config.jsonc | 8 +++- config/waybar/style.css | 11 +++++ default/waybar/indicators/screen-recording.sh | 7 +++ migrations/1755930114.sh | 3 -- migrations/1757511571.sh | 3 ++ 7 files changed, 58 insertions(+), 25 deletions(-) delete mode 100755 bin/omarchy-cmd-screenrecord-stop create mode 100755 default/waybar/indicators/screen-recording.sh create mode 100644 migrations/1757511571.sh diff --git a/bin/omarchy-cmd-screenrecord b/bin/omarchy-cmd-screenrecord index f9a604b5..570fb582 100755 --- a/bin/omarchy-cmd-screenrecord +++ b/bin/omarchy-cmd-screenrecord @@ -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 diff --git a/bin/omarchy-cmd-screenrecord-stop b/bin/omarchy-cmd-screenrecord-stop deleted file mode 100755 index 5631920c..00000000 --- a/bin/omarchy-cmd-screenrecord-stop +++ /dev/null @@ -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 diff --git a/config/waybar/config.jsonc b/config/waybar/config.jsonc index 0ec9af40..f93a1619 100644 --- a/config/waybar/config.jsonc +++ b/config/waybar/config.jsonc @@ -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", @@ -124,6 +124,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 diff --git a/config/waybar/style.css b/config/waybar/style.css index 924e1851..2cf371b3 100644 --- a/config/waybar/style.css +++ b/config/waybar/style.css @@ -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; +} diff --git a/default/waybar/indicators/screen-recording.sh b/default/waybar/indicators/screen-recording.sh new file mode 100755 index 00000000..d0d00822 --- /dev/null +++ b/default/waybar/indicators/screen-recording.sh @@ -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 diff --git a/migrations/1755930114.sh b/migrations/1755930114.sh index 90d44e5e..fd491d69 100644 --- a/migrations/1755930114.sh +++ b/migrations/1755930114.sh @@ -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 diff --git a/migrations/1757511571.sh b/migrations/1757511571.sh new file mode 100644 index 00000000..7753a28e --- /dev/null +++ b/migrations/1757511571.sh @@ -0,0 +1,3 @@ +echo "Add screen recording indicator to Waybar" + +gum confirm "Replace current Waybar config (backup will be made)?" && omarchy-refresh-waybar From a66e8ebebd1dc4d86173fb3b046879dd5242ae45 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 10 Sep 2025 16:00:14 +0200 Subject: [PATCH 6/8] Stop restarting waybar entirely on updates This had problems and like this we also won't have an ugly flash --- bin/omarchy-update | 2 +- bin/omarchy-update-available-reset | 4 ++++ config/waybar/config.jsonc | 1 + migrations/1757512135.sh | 5 +++++ 4 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 bin/omarchy-update-available-reset create mode 100644 migrations/1757512135.sh diff --git a/bin/omarchy-update b/bin/omarchy-update index 9cf8d514..79260132 100755 --- a/bin/omarchy-update +++ b/bin/omarchy-update @@ -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 diff --git a/bin/omarchy-update-available-reset b/bin/omarchy-update-available-reset new file mode 100755 index 00000000..09396f9e --- /dev/null +++ b/bin/omarchy-update-available-reset @@ -0,0 +1,4 @@ +#!/bin/bash + +# Ensure Waybar icon offering the available update is removed +pkill -RTMIN+7 waybar diff --git a/config/waybar/config.jsonc b/config/waybar/config.jsonc index f93a1619..8bc4e12e 100644 --- a/config/waybar/config.jsonc +++ b/config/waybar/config.jsonc @@ -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 }, diff --git a/migrations/1757512135.sh b/migrations/1757512135.sh new file mode 100644 index 00000000..a7314f66 --- /dev/null +++ b/migrations/1757512135.sh @@ -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 From bf07883e8264a8d2ec4333497c36ba00510c3258 Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Wed, 10 Sep 2025 11:05:13 -0400 Subject: [PATCH 7/8] Set fixed fonts for Plymouth to solve freetype2 issue (#1572) * Set fonts for plymouth to solve freetype2 issue * Fix typo in plymouth theme update message Clarified the reason for the plymouth theme update. --------- Co-authored-by: David Heinemeier Hansson --- default/plymouth/omarchy.plymouth | 2 ++ migrations/1757515650.sh | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 migrations/1757515650.sh diff --git a/default/plymouth/omarchy.plymouth b/default/plymouth/omarchy.plymouth index 9b45fc39..99356303 100644 --- a/default/plymouth/omarchy.plymouth +++ b/default/plymouth/omarchy.plymouth @@ -7,3 +7,5 @@ ModuleName=script ImageDir=/usr/share/plymouth/themes/omarchy ScriptFile=/usr/share/plymouth/themes/omarchy/omarchy.script ConsoleLogBackgroundColor=0x1a1b26 +MonospaceFont=Cantarell 11 +Font=Cantarell 11 diff --git a/migrations/1757515650.sh b/migrations/1757515650.sh new file mode 100644 index 00000000..0087257a --- /dev/null +++ b/migrations/1757515650.sh @@ -0,0 +1,2 @@ +echo "Update plymouth theme to avoid freetype2 issue that broke the styled login screen" +omarchy-refresh-plymouth From 1f5a86ba8ecc186a421fa1e17eb54e4a568fe077 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 10 Sep 2025 18:07:54 +0200 Subject: [PATCH 8/8] Required -y to run --- bin/omarchy-refresh-plymouth | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/omarchy-refresh-plymouth b/bin/omarchy-refresh-plymouth index 81166037..e911d74f 100755 --- a/bin/omarchy-refresh-plymouth +++ b/bin/omarchy-refresh-plymouth @@ -1,6 +1,4 @@ #!/bin/bash -if [[ "$1" == "-y" ]]; then - sudo cp ~/.local/share/omarchy/default/plymouth/* /usr/share/plymouth/themes/omarchy/ - sudo plymouth-set-default-theme -R omarchy -fi +sudo cp ~/.local/share/omarchy/default/plymouth/* /usr/share/plymouth/themes/omarchy/ +sudo plymouth-set-default-theme -R omarchy