From d43639df15a63fab6d53eb73111d11ec8a807f48 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 22 Jun 2025 20:48:38 -0400 Subject: [PATCH] Switch to mako for notifications --- bin/omarchy-theme-next | 13 ++--- config/hypr/hyprland.conf | 2 +- config/swaync/config.json | 93 ----------------------------------- config/swaync/style.css | 30 ----------- install/hyprlandia.sh | 2 +- install/theme.sh | 2 + themes/catppuccin/mako.ini | 10 ++++ themes/catppuccin/swaync.css | 10 ---- themes/everforest/mako.ini | 10 ++++ themes/everforest/swaync.css | 10 ---- themes/gruvbox/mako.ini | 10 ++++ themes/gruvbox/swaync.css | 10 ---- themes/kanagawa/mako.ini | 10 ++++ themes/kanagawa/swaync.css | 10 ---- themes/nord/mako.ini | 10 ++++ themes/nord/swaync.css | 10 ---- themes/tokyo-night/mako.ini | 10 ++++ themes/tokyo-night/swaync.css | 10 ---- 18 files changed, 68 insertions(+), 194 deletions(-) delete mode 100644 config/swaync/config.json delete mode 100644 config/swaync/style.css create mode 100644 themes/catppuccin/mako.ini delete mode 100644 themes/catppuccin/swaync.css create mode 100644 themes/everforest/mako.ini delete mode 100644 themes/everforest/swaync.css create mode 100644 themes/gruvbox/mako.ini delete mode 100644 themes/gruvbox/swaync.css create mode 100644 themes/kanagawa/mako.ini delete mode 100644 themes/kanagawa/swaync.css create mode 100644 themes/nord/mako.ini delete mode 100644 themes/nord/swaync.css create mode 100644 themes/tokyo-night/mako.ini delete mode 100644 themes/tokyo-night/swaync.css diff --git a/bin/omarchy-theme-next b/bin/omarchy-theme-next index 204eab4..580fc47 100755 --- a/bin/omarchy-theme-next +++ b/bin/omarchy-theme-next @@ -36,19 +36,14 @@ ln -nsf "$NEW_THEME" "$HOME/.config/omarchy/current/theme" touch "$HOME/.config/alacritty/alacritty.toml" # Restart for new theme -pkill swaync && setsid swaync pkill -SIGUSR2 waybar +makoctl reload hyprctl reload # Set new background ln -nsf $(find "$HOME/.config/omarchy/current/backgrounds/" -type f | head -n 1) "$HOME/.config/omarchy/current/background" -pkill -x swaybg && setsid swaybg -i "$HOME/.config/omarchy/current/background" -m fill - -# Wait for swaync to get started properly again -while ! pgrep -x swaync >/dev/null; do - sleep 0.05 -done -sleep 0.5 +pkill -x swaybg +setsid swaybg -i "$HOME/.config/omarchy/current/background" -m fill # Notify of the new theme -notify-send "Theme changed to $NEW_THEME_NAME" -t 2000 -e +notify-send "Theme changed to $NEW_THEME_NAME" -t 2000 diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 855aa39..64fac2d 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -4,7 +4,7 @@ source = ~/.config/hypr/hyprland-monitors.conf # Autostart necessary processes -exec-once = hypridle & swaync & waybar & fcitx5 +exec-once = hypridle & mako & waybar & fcitx5 exec-once = wl-clip-persist --clipboard regular & clipse -listen exec-once = ~/.local/share/omarchy/bin/swaybg-next exec-once = dropbox-cli start diff --git a/config/swaync/config.json b/config/swaync/config.json deleted file mode 100644 index d2e18a0..0000000 --- a/config/swaync/config.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "$schema": "/etc/xdg/swaync/configSchema.json", - "positionX": "center", - "positionY": "top", - "layer": "overlay", - "control-center-layer": "top", - "layer-shell": true, - "layer-shell-cover-screen": true, - "cssPriority": "application", - "control-center-margin-top": 0, - "control-center-margin-bottom": 0, - "control-center-margin-right": 0, - "control-center-margin-left": 0, - "notification-2fa-action": true, - "notification-inline-replies": false, - "notification-icon-size": 32, - "notification-body-image-height": 100, - "notification-body-image-width": 200, - "timeout": 10, - "timeout-low": 5, - "timeout-critical": 0, - "fit-to-screen": true, - "relative-timestamps": true, - "control-center-width": 500, - "control-center-height": 600, - "notification-window-width": 500, - "keyboard-shortcuts": true, - "image-visibility": "when-available", - "transition-time": 200, - "hide-on-clear": false, - "hide-on-action": true, - "text-empty": "No Notifications", - "script-fail-notify": true, - "scripts": { - "example-script": { - "exec": "echo 'Do something...'", - "urgency": "Normal" - }, - "example-action-script": { - "exec": "echo 'Do something actionable!'", - "urgency": "Normal", - "run-on": "action" - } - }, - "notification-visibility": { - "example-name": { - "state": "muted", - "urgency": "Low", - "app-name": "Spotify" - } - }, - "widgets": [ - "inhibitors", - "title", - "dnd", - "notifications" - ], - "widget-config": { - "inhibitors": { - "text": "Inhibitors", - "button-text": "Clear All", - "clear-all-button": true - }, - "title": { - "text": "Notifications", - "clear-all-button": true, - "button-text": "Clear All" - }, - "dnd": { - "text": "Do Not Disturb" - }, - "label": { - "max-lines": 5, - "text": "Label Text" - }, - "mpris": { - "image-size": 96, - "image-radius": 12, - "blacklist": [] - }, - "buttons-grid": { - "actions": [ - { - "label": "яки", - "type": "toggle", - "active": true, - "command": "sh -c '[[ $SWAYNC_TOGGLE_STATE == true ]] && nmcli radio wifi on || nmcli radio wifi off'", - "update-command": "sh -c '[[ $(nmcli radio wifi) == \"enabled\" ]] && echo true || echo false'" - } - ] - } - } -} diff --git a/config/swaync/style.css b/config/swaync/style.css deleted file mode 100644 index c8bec32..0000000 --- a/config/swaync/style.css +++ /dev/null @@ -1,30 +0,0 @@ -* { - all: unset; - font-family: Liberation Sans; - font-size: 14px; -} - -.notification { - border-radius: 0px; - padding: 14px; - color: #cdd6f4; - background-color: rgba(26, 27, 38, 0.95); - border: 2px solid #313244; - margin: 20px; -} - -.icon, -.app-icon, -.image { - margin-right: 8px; -} - -.title { - font-weight: bold; -} - -.body { - color: #a6adc8; -} - -@import "../omarchy/current/theme/swaync.css"; diff --git a/install/hyprlandia.sh b/install/hyprlandia.sh index c48608d..5cd64e5 100644 --- a/install/hyprlandia.sh +++ b/install/hyprlandia.sh @@ -1,6 +1,6 @@ yay -S --noconfirm --needed \ hyprland hyprshot hyprpicker hyprlock hypridle hyprpolkitagent hyprland-qtutils \ - wofi waybar swaync swaybg \ + wofi waybar mako swaybg \ xdg-desktop-portal-hyprland xdg-desktop-portal xdg-desktop-portal-gnome # Start Hyprland on first session diff --git a/install/theme.sh b/install/theme.sh index 4183b05..4679ed9 100644 --- a/install/theme.sh +++ b/install/theme.sh @@ -19,3 +19,5 @@ ln -snf ~/.config/omarchy/backgrounds/tokyo-night ~/.config/omarchy/current/back ln -snf ~/.config/omarchy/current/theme/wofi.css ~/.config/wofi/style.css ln -snf ~/.config/omarchy/current/theme/neovim.lua ~/.config/nvim/lua/plugins/theme.lua ln -snf ~/.config/omarchy/current/theme/btop.theme ~/.config/btop/themes/current.theme +mkdir -p ~/.config/mako +ln -snf ~/.config/omarchy/current/theme/mako.ini ~/.config/mako/config diff --git a/themes/catppuccin/mako.ini b/themes/catppuccin/mako.ini new file mode 100644 index 0000000..7d92fe0 --- /dev/null +++ b/themes/catppuccin/mako.ini @@ -0,0 +1,10 @@ +text-color=#cad3f5 +border-color=#8aadf4 +background-color=#24273a +width=300 +height=110 +padding=10 +border-size=2 +font=CaskaydiaMono Nerd Font 10 +anchor=top-right +default-timeout=5000 diff --git a/themes/catppuccin/swaync.css b/themes/catppuccin/swaync.css deleted file mode 100644 index ad2f113..0000000 --- a/themes/catppuccin/swaync.css +++ /dev/null @@ -1,10 +0,0 @@ -.notification { - color: #cdd6f4; - background-color: rgba(30, 30, 46, 0.95); - border: 2px solid #313244; -} - -.body { - color: #a6adc8; -} - diff --git a/themes/everforest/mako.ini b/themes/everforest/mako.ini new file mode 100644 index 0000000..c3af0a0 --- /dev/null +++ b/themes/everforest/mako.ini @@ -0,0 +1,10 @@ +text-color=#d3c6aa +border-color=#a7c080 +background-color=#2d353b +width=300 +height=110 +padding=10 +border-size=2 +font=CaskaydiaMono Nerd Font 10 +anchor=top-right +default-timeout=5000 diff --git a/themes/everforest/swaync.css b/themes/everforest/swaync.css deleted file mode 100644 index 9319568..0000000 --- a/themes/everforest/swaync.css +++ /dev/null @@ -1,10 +0,0 @@ -.notification { - color: #d3c6aa; - background-color: rgba(45, 53, 59, 0.95); - border: 2px solid #475258; -} - -.body { - color: #a7c080; -} - diff --git a/themes/gruvbox/mako.ini b/themes/gruvbox/mako.ini new file mode 100644 index 0000000..67354fb --- /dev/null +++ b/themes/gruvbox/mako.ini @@ -0,0 +1,10 @@ +text-color=#d4be98 +border-color=#a9b665 +background-color=#282828 +width=300 +height=110 +padding=10 +border-size=2 +font=CaskaydiaMono Nerd Font 10 +anchor=top-right +default-timeout=5000 diff --git a/themes/gruvbox/swaync.css b/themes/gruvbox/swaync.css deleted file mode 100644 index 1f5c6b2..0000000 --- a/themes/gruvbox/swaync.css +++ /dev/null @@ -1,10 +0,0 @@ -.notification { - color: #d4be98; - background-color: rgba(40, 40, 40, 0.95); - border: 2px solid #3c3836; -} - -.body { - color: #a9b665; -} - diff --git a/themes/kanagawa/mako.ini b/themes/kanagawa/mako.ini new file mode 100644 index 0000000..8050b71 --- /dev/null +++ b/themes/kanagawa/mako.ini @@ -0,0 +1,10 @@ +text-color=#dcd7ba +border-color=#7e9cd8 +background-color=#1f1f28 +width=300 +height=110 +padding=10 +border-size=2 +font=CaskaydiaMono Nerd Font 10 +anchor=top-right +default-timeout=5000 diff --git a/themes/kanagawa/swaync.css b/themes/kanagawa/swaync.css deleted file mode 100644 index 97aabb6..0000000 --- a/themes/kanagawa/swaync.css +++ /dev/null @@ -1,10 +0,0 @@ -.notification { - color: #dcd7ba; - background-color: rgba(31, 31, 40, 0.95); - border: 2px solid #2d4f67; -} - -.body { - color: #76946a; -} - diff --git a/themes/nord/mako.ini b/themes/nord/mako.ini new file mode 100644 index 0000000..e730dde --- /dev/null +++ b/themes/nord/mako.ini @@ -0,0 +1,10 @@ +text-color=#d8dee9 +border-color=#81a1c1 +background-color=#2e3440 +width=300 +height=110 +padding=10 +border-size=2 +font=CaskaydiaMono Nerd Font 10 +anchor=top-right +default-timeout=5000 diff --git a/themes/nord/swaync.css b/themes/nord/swaync.css deleted file mode 100644 index 3a9a622..0000000 --- a/themes/nord/swaync.css +++ /dev/null @@ -1,10 +0,0 @@ -.notification { - color: #d8dee9; - background-color: rgba(46, 52, 64, 0.95); - border: 2px solid #4c566a; -} - -.body { - color: #a3be8c; -} - diff --git a/themes/tokyo-night/mako.ini b/themes/tokyo-night/mako.ini new file mode 100644 index 0000000..b4b2d82 --- /dev/null +++ b/themes/tokyo-night/mako.ini @@ -0,0 +1,10 @@ +text-color=#a9b1d6 +border-color=#7aa2f7 +background-color=#1a1b26 +width=300 +height=110 +padding=10 +border-size=2 +font=CaskaydiaMono Nerd Font 10 +anchor=top-right +default-timeout=5000 diff --git a/themes/tokyo-night/swaync.css b/themes/tokyo-night/swaync.css deleted file mode 100644 index a736454..0000000 --- a/themes/tokyo-night/swaync.css +++ /dev/null @@ -1,10 +0,0 @@ -.notification { - color: #cdd6f4; - background-color: rgba(26, 27, 38, 0.95); - border: 2px solid #313244; -} - -.body { - color: #a6adc8; -} -