From bf962f00426ca8029558658c81c8e7112262fadb Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 20 Feb 2026 16:48:36 +0100 Subject: [PATCH 1/4] Add idle lock indicator --- bin/omarchy-toggle-idle | 2 ++ config/waybar/config.jsonc | 8 ++++++- config/waybar/style.css | 9 +++++-- default/waybar/indicators/idle.sh | 7 ++++++ migrations/1771602477.sh | 39 +++++++++++++++++++++++++++++++ 5 files changed, 62 insertions(+), 3 deletions(-) create mode 100755 default/waybar/indicators/idle.sh create mode 100755 migrations/1771602477.sh diff --git a/bin/omarchy-toggle-idle b/bin/omarchy-toggle-idle index aa69cf50..2dcb7f28 100755 --- a/bin/omarchy-toggle-idle +++ b/bin/omarchy-toggle-idle @@ -7,3 +7,5 @@ else uwsm-app -- hypridle >/dev/null 2>&1 & notify-send "Now locking computer when idle" fi + +pkill -RTMIN+9 waybar diff --git a/config/waybar/config.jsonc b/config/waybar/config.jsonc index 5c28742c..5ec5ed3c 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", "custom/voxtype", "custom/screenrecording-indicator"], + "modules-center": ["clock", "custom/update", "custom/voxtype", "custom/screenrecording-indicator", "custom/idle-indicator"], "modules-right": [ "group/tray-expander", "bluetooth", @@ -142,6 +142,12 @@ "signal": 8, "return-type": "json" }, + "custom/idle-indicator": { + "on-click": "omarchy-toggle-idle", + "exec": "$OMARCHY_PATH/default/waybar/indicators/idle.sh", + "signal": 9, + "return-type": "json" + }, "custom/voxtype": { "exec": "omarchy-voxtype-status", "return-type": "json", diff --git a/config/waybar/style.css b/config/waybar/style.css index 19e934c2..45d5a6c3 100644 --- a/config/waybar/style.css +++ b/config/waybar/style.css @@ -34,7 +34,6 @@ #battery, #pulseaudio, #custom-omarchy, -#custom-screenrecording-indicator, #custom-update { min-width: 12px; margin: 0 7.5px; @@ -72,9 +71,11 @@ tooltip { opacity: 0; } -#custom-screenrecording-indicator { +#custom-screenrecording-indicator, +#custom-idle-indicator { min-width: 12px; margin-left: 5px; + margin-right: 0; font-size: 10px; padding-bottom: 1px; } @@ -83,6 +84,10 @@ tooltip { color: #a55555; } +#custom-idle-indicator.active { + color: #a55555; +} + #custom-voxtype { min-width: 12px; margin: 0 0 0 7.5px; diff --git a/default/waybar/indicators/idle.sh b/default/waybar/indicators/idle.sh new file mode 100755 index 00000000..ebb5f4f5 --- /dev/null +++ b/default/waybar/indicators/idle.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +if pgrep -x hypridle >/dev/null; then + echo '{"text": ""}' +else + echo '{"text": "󱫖", "tooltip": "Idle lock disabled", "class": "active"}' +fi diff --git a/migrations/1771602477.sh b/migrations/1771602477.sh new file mode 100755 index 00000000..6d1621ba --- /dev/null +++ b/migrations/1771602477.sh @@ -0,0 +1,39 @@ +echo "Add idle lock indicator to Waybar" + +STYLE_FILE=~/.config/waybar/style.css +CONFIG_FILE=~/.config/waybar/config.jsonc + +# Add idle-indicator to modules-center if not present +if ! grep -q "custom/idle-indicator" "$CONFIG_FILE"; then + sed -i 's/"custom\/screenrecording-indicator"]/"custom\/screenrecording-indicator", "custom\/idle-indicator"]/' "$CONFIG_FILE" + + sed -i '/"tray": {/i\ "custom/idle-indicator": {\n "on-click": "omarchy-toggle-idle",\n "exec": "$OMARCHY_PATH/default/waybar/indicators/idle.sh",\n "signal": 9,\n "return-type": "json"\n },' "$CONFIG_FILE" +fi + +# Add idle-indicator CSS if not present +if ! grep -q "#custom-idle-indicator" "$STYLE_FILE"; then + # Remove screenrecording-indicator from shared margin block and pair it with idle-indicator instead + sed -i 's/^#custom-screenrecording-indicator,$//' "$STYLE_FILE" + + # Add shared rule for both indicators and idle-indicator active state + sed -i '/#custom-screenrecording-indicator.active {/i\#custom-screenrecording-indicator,\n#custom-idle-indicator {\n min-width: 12px;\n margin-left: 5px;\n margin-right: 0;\n font-size: 10px;\n padding-bottom: 1px;\n}\n' "$STYLE_FILE" + + # Remove the now-duplicated properties from the standalone screenrecording block + sed -i '/#custom-screenrecording-indicator {/,/^}/ { + /min-width:/d + /margin-left:/d + /font-size:/d + /padding-bottom:/d + /^#custom-screenrecording-indicator {/d + /^}$/d + }' "$STYLE_FILE" + + cat >> "$STYLE_FILE" << 'EOF' + +#custom-idle-indicator.active { + color: #a55555; +} +EOF +fi + +omarchy-restart-waybar From fcf883e827bc4c08383465ad3bc4a1bf5eb5899d Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 20 Feb 2026 16:52:09 +0100 Subject: [PATCH 2/4] Add notification silencing indicator to waybar --- bin/omarchy-toggle-notification-silencing | 11 ++++++++++ config/waybar/config.jsonc | 8 ++++++- config/waybar/style.css | 6 +++-- default/hypr/bindings/utilities.conf | 2 +- .../indicators/notification-silencing.sh | 7 ++++++ migrations/1771602647.sh | 22 +++++++++++++++++++ 6 files changed, 52 insertions(+), 4 deletions(-) create mode 100755 bin/omarchy-toggle-notification-silencing create mode 100755 default/waybar/indicators/notification-silencing.sh create mode 100755 migrations/1771602647.sh diff --git a/bin/omarchy-toggle-notification-silencing b/bin/omarchy-toggle-notification-silencing new file mode 100755 index 00000000..eabbff13 --- /dev/null +++ b/bin/omarchy-toggle-notification-silencing @@ -0,0 +1,11 @@ +#!/bin/bash + +makoctl mode -t do-not-disturb + +if makoctl mode | grep -q 'do-not-disturb'; then + notify-send "Silenced notifications" +else + notify-send "Enabled notifications" +fi + +pkill -RTMIN+10 waybar diff --git a/config/waybar/config.jsonc b/config/waybar/config.jsonc index 5ec5ed3c..9049f00e 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", "custom/voxtype", "custom/screenrecording-indicator", "custom/idle-indicator"], + "modules-center": ["clock", "custom/update", "custom/voxtype", "custom/screenrecording-indicator", "custom/idle-indicator", "custom/notification-silencing-indicator"], "modules-right": [ "group/tray-expander", "bluetooth", @@ -148,6 +148,12 @@ "signal": 9, "return-type": "json" }, + "custom/notification-silencing-indicator": { + "on-click": "omarchy-toggle-notification-silencing", + "exec": "$OMARCHY_PATH/default/waybar/indicators/notification-silencing.sh", + "signal": 10, + "return-type": "json" + }, "custom/voxtype": { "exec": "omarchy-voxtype-status", "return-type": "json", diff --git a/config/waybar/style.css b/config/waybar/style.css index 45d5a6c3..4bbf0ddb 100644 --- a/config/waybar/style.css +++ b/config/waybar/style.css @@ -72,7 +72,8 @@ tooltip { } #custom-screenrecording-indicator, -#custom-idle-indicator { +#custom-idle-indicator, +#custom-notification-silencing-indicator { min-width: 12px; margin-left: 5px; margin-right: 0; @@ -84,7 +85,8 @@ tooltip { color: #a55555; } -#custom-idle-indicator.active { +#custom-idle-indicator.active, +#custom-notification-silencing-indicator.active { color: #a55555; } diff --git a/default/hypr/bindings/utilities.conf b/default/hypr/bindings/utilities.conf index 86e1c808..a6f8a01f 100644 --- a/default/hypr/bindings/utilities.conf +++ b/default/hypr/bindings/utilities.conf @@ -18,7 +18,7 @@ bindd = SUPER SHIFT, BACKSPACE, Toggle workspace gaps, exec, omarchy-hyprland-wo # Notifications bindd = SUPER, COMMA, Dismiss last notification, exec, makoctl dismiss bindd = SUPER SHIFT, COMMA, Dismiss all notifications, exec, makoctl dismiss --all -bindd = SUPER CTRL, COMMA, Toggle silencing notifications, exec, makoctl mode -t do-not-disturb && makoctl mode | grep -q 'do-not-disturb' && notify-send "Silenced notifications" || notify-send "Enabled notifications" +bindd = SUPER CTRL, COMMA, Toggle silencing notifications, exec, omarchy-toggle-notification-silencing bindd = SUPER ALT, COMMA, Invoke last notification, exec, makoctl invoke bindd = SUPER SHIFT ALT, COMMA, Restore last notification, exec, makoctl restore diff --git a/default/waybar/indicators/notification-silencing.sh b/default/waybar/indicators/notification-silencing.sh new file mode 100755 index 00000000..d5a68276 --- /dev/null +++ b/default/waybar/indicators/notification-silencing.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +if makoctl mode | grep -q 'do-not-disturb'; then + echo '{"text": "󰂛", "tooltip": "Notifications silenced", "class": "active"}' +else + echo '{"text": ""}' +fi diff --git a/migrations/1771602647.sh b/migrations/1771602647.sh new file mode 100755 index 00000000..fa880780 --- /dev/null +++ b/migrations/1771602647.sh @@ -0,0 +1,22 @@ +echo "Add notification silencing indicator to Waybar" + +STYLE_FILE=~/.config/waybar/style.css +CONFIG_FILE=~/.config/waybar/config.jsonc + +# Add notification-silencing-indicator to modules-center if not present +if ! grep -q "custom/notification-silencing-indicator" "$CONFIG_FILE"; then + sed -i 's/"custom\/idle-indicator"]/"custom\/idle-indicator", "custom\/notification-silencing-indicator"]/' "$CONFIG_FILE" + + sed -i '/"tray": {/i\ "custom/notification-silencing-indicator": {\n "on-click": "omarchy-toggle-notification-silencing",\n "exec": "$OMARCHY_PATH/default/waybar/indicators/notification-silencing.sh",\n "signal": 10,\n "return-type": "json"\n },' "$CONFIG_FILE" +fi + +# Add notification-silencing-indicator CSS if not present +if ! grep -q "#custom-notification-silencing-indicator" "$STYLE_FILE"; then + # Add to the shared indicator rule + sed -i 's/#custom-idle-indicator {/#custom-idle-indicator,\n#custom-notification-silencing-indicator {/' "$STYLE_FILE" + + # Add to the shared active color rule + sed -i 's/#custom-idle-indicator.active {/#custom-idle-indicator.active,\n#custom-notification-silencing-indicator.active {/' "$STYLE_FILE" +fi + +omarchy-restart-waybar From 5788da54af1c1652a40763de8ca684f4d38d7c28 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 20 Feb 2026 16:54:08 +0100 Subject: [PATCH 3/4] Use proper notification icons --- bin/omarchy-toggle-idle | 4 ++-- bin/omarchy-toggle-notification-silencing | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/omarchy-toggle-idle b/bin/omarchy-toggle-idle index 2dcb7f28..58f0a85d 100755 --- a/bin/omarchy-toggle-idle +++ b/bin/omarchy-toggle-idle @@ -2,10 +2,10 @@ if pgrep -x hypridle >/dev/null; then pkill -x hypridle - notify-send "Stop locking computer when idle" + notify-send "󱫖 Stop locking computer when idle" else uwsm-app -- hypridle >/dev/null 2>&1 & - notify-send "Now locking computer when idle" + notify-send "󱫖 Now locking computer when idle" fi pkill -RTMIN+9 waybar diff --git a/bin/omarchy-toggle-notification-silencing b/bin/omarchy-toggle-notification-silencing index eabbff13..c8117059 100755 --- a/bin/omarchy-toggle-notification-silencing +++ b/bin/omarchy-toggle-notification-silencing @@ -3,9 +3,9 @@ makoctl mode -t do-not-disturb if makoctl mode | grep -q 'do-not-disturb'; then - notify-send "Silenced notifications" + notify-send "󰂛 Silenced notifications" else - notify-send "Enabled notifications" + notify-send "󰂚 Enabled notifications" fi pkill -RTMIN+10 waybar From a493fc8b969944de7d1947b20980bf617bf507a2 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 20 Feb 2026 17:06:20 +0100 Subject: [PATCH 4/4] Humans would think vertical = vertical split, horizontal = horizontal split Gotta love Linux nerds --- config/tmux/tmux.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf index 9aeb7a17..5aa42094 100644 --- a/config/tmux/tmux.conf +++ b/config/tmux/tmux.conf @@ -12,8 +12,8 @@ bind -T copy-mode-vi v send -X begin-selection bind -T copy-mode-vi y send -X copy-selection-and-cancel # Pane Controls -bind h split-window -h -c "#{pane_current_path}" -bind v split-window -v -c "#{pane_current_path}" +bind h split-window -v -c "#{pane_current_path}" +bind v split-window -h -c "#{pane_current_path}" bind x kill-pane bind -n C-M-Left select-pane -L