{ lib, pkgs, homeManagerModules, ... }: { imports = [ homeManagerModules.zaphyra.programs.wleave ]; services.swaync = { enable = true; settings = { "$schema" = "/etc/xdg/swaync/configSchema.json"; keyboard-shortcuts = true; cssPriority = "user"; positionX = "center"; positionY = "top"; fit-to-screen = false; control-center-layer = "top"; control-center-height = 900; control-center-positionX = "none"; control-center-positionY = "none"; widgets = [ "buttons-grid#actions" "buttons-grid#powerprofiles" "backlight" "volume" "title" ]; widget-config = { volume.label = ""; backlight.label = "󰃟"; title = { text = "Notification Center"; clear-all-button = true; button-text = "󰆴 Clear"; }; "buttons-grid#powerprofiles".actions = [ { type = "toggle"; label = "  Power Saver "; update-command = "sh -c '[[ $(powerprofilesctl get) == \"power-saver\" ]] && echo true || echo false'"; command = "sh -c 'swaync-client -cp; powerprofilesctl set power-saver'"; } { type = "toggle"; label = "  Balanced "; update-command = "sh -c '[[ $(powerprofilesctl get) == \"balanced\" ]] && echo true || echo false'"; command = "sh -c 'swaync-client -cp; powerprofilesctl set balanced'"; } { type = "toggle"; label = "  Performance "; update-command = "sh -c '[[ $(powerprofilesctl get) == \"performance\" ]] && echo true || echo false'"; command = "sh -c 'swaync-client -cp; powerprofilesctl set performance'"; } ]; "buttons-grid#actions".actions = [ { type = "toggle"; label = " ☕ "; command = "systemctl --user is-active --quiet swayidle.service && systemctl --user stop swayidle.service || systemctl --user start swayidle.service"; update-command = "systemctl --user is-active --quiet swayidle.service && echo false || echo true"; } { type = "toggle"; label = "󰂛"; command = "swaync-client -d"; tooltip = "Do not disturb"; update-command = "swaync-client --get-dnd"; } { type = "toggle"; active = true; label = "󰥻 󰛨"; command = "sh -c '[[ $SWAYNC_TOGGLE_STATE == true ]] && ${lib.getExe pkgs.brightnessctl} --device='tpacpi::kbd_backlight' set 1 || ${lib.getExe pkgs.brightnessctl} --device='tpacpi::kbd_backlight' set 0'"; update-command = "sh -c '[[ $(${lib.getExe pkgs.brightnessctl} --device='tpacpi::kbd_backlight' get) == \"1\" ]] && echo true || echo false'"; } { type = "toggle"; active = true; label = "直"; 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'"; } { type = "toggle"; label = ""; # command = "swaync-client -cp; ${config.home.sessionVariables.TERMINAL} --confirm-close-surface=false -e ${lib.getExe pkgs.bluetui}"; command = "swaync-client -cp; ${lib.getExe pkgs.overskride}"; update-command = "sh -c 'bluetoothctl show | grep -q \\\"Powered: yes\\\" && echo true || echo false'"; } { label = ""; command = "swaync-client -cp; wleave"; } ]; }; }; style = '' @define-color border-color rgba(255, 255, 255, 0.08); * { font-family: "Adwaita Sans", "Symbols Nerd Font"; } .control-center { background-color: #222226; border-radius: 0 0 10px 10px; border: 2px solid @border-color; border-top: 0; box-shadow: 0 0 10px 0 rgba(0,0,0,.80); padding: 4px; } .widget-title > button { background: rgba(255, 255, 255, 0.06); border: 1px solid @border-color; border-radius: 4px; } .widget-title > button:hover { background: rgba(255, 255, 255, 0.1); } .widget-backlight, .widget-volume, .widget-buttons-grid { background: transparent; } .widget-backlight, .widget-volume { margin: 0px; padding: 5px 10px; } /* Buttons */ .widget-buttons-grid { padding: 0px; } .widget-buttons-grid > flowbox > flowboxchild > button { background: rgba(255, 255, 255, 0.06); border: 1px solid @border-color; border-radius: 4px; } .widget-buttons-grid > flowbox > flowboxchild > button:checked { border-bottom: 2px solid rgb(74, 169, 108); } .widget-buttons-grid > flowbox > flowboxchild > button:hover { background: rgba(255, 255, 255, 0.1); } /* Sliders */ scale { padding: 2px; margin: 0px 5px 0px 5px; } scale trough { background: rgba(255, 255, 255, 0.06); } scale highlight { background: rgb(74, 169, 108); border-radius: 5px; } /* Notification */ .control-center .notification { box-shadow: unset; background: rgba(47, 47, 51, 0.95); border: 1px solid @border-color; } .close-button { border-radius: 0; margin-top: 0; margin-right: -2px; background: unset; } .close-button:hover { background: rgba(255, 255, 255, 0.1); border-bottom-left-radius: 4px; border-top-right-radius: 4px; } .notification-group-headers { margin-bottom: 4px; } .notification-group-icon { opacity: 0; } .notification-group .notification-group-header { font-weight: 400; font-size: 16pt; } .notification-group .notification-group-buttons { margin: 4px; } .notification-group-collapse-button, .notification-group-close-all-button { border-radius: 4px; background: rgba(47, 47, 51, 0.95); border: 1px solid @border-color; margin: 0 4px; } .notification-background { padding: 5px 5px; } .notification { background: rgba(0, 0, 0, 0.5); border: 2px solid rgba(59, 135, 86, 0.5); border-radius: 4px; } .notification .notification-default-action:hover, .notification button:hover { background: rgba(255, 255, 255, 0.06); border-radius: 0; } .notification .text-box { margin: 2px; } .notification .text-box .image { border-radius: 10px; } .notification .text-box .time { font-weight: 200; font-size: 13px; margin-right: 0; } ''; }; }