diff --git a/users/natalie/desktop/configuration.nix b/users/natalie/desktop/configuration.nix index 4c02281c5ba27e7b623f71cf2f8f5ab421d20102..56bb397fbcb1dfbd91e223216b0940d6a8d8bdc4 100644 --- a/users/natalie/desktop/configuration.nix +++ b/users/natalie/desktop/configuration.nix @@ -11,6 +11,7 @@ ]; documentation.man.generateCaches = false; programs = { + hyprland.enable = true; gamemode.enable = true; _1password.enable = true; @@ -145,11 +146,6 @@ # Enable sound with pipewire. security.rtkit.enable = true; - services = { - desktopManager.cosmic.enable = true; - displayManager.cosmic-greeter.enable = true; - desktopManager.cosmic.xwayland.enable = true; - }; # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; diff --git a/users/natalie/home/default.nix b/users/natalie/home/default.nix index 6a15901141e20096e6bf7e28deb7302f8b67db82..17c17e9dfdb47331f6757fe5fb789e94c25caefa 100644 --- a/users/natalie/home/default.nix +++ b/users/natalie/home/default.nix @@ -4,5 +4,6 @@ ./tmux.nix ./hyprland ./vicinae.nix + ./swaync.nix ]; } diff --git a/users/natalie/home/swaync.nix b/users/natalie/home/swaync.nix new file mode 100644 index 0000000000000000000000000000000000000000..2768a4dc9012f80f4256f54f60dbd86ac03fc094 --- /dev/null +++ b/users/natalie/home/swaync.nix @@ -0,0 +1,595 @@ +{ pkgs, ... }: +{ + services.swaync = { + enable = true; + settings = { + ignore-gtk-theme = true; + positionX = "right"; + positionY = "top"; + layer = "overlay"; + control-center-layer = "top"; + layer-shell = true; + layer-shell-cover-screen = true; + cssPriority = "user"; + control-center-margin-top = 15; + control-center-margin-bottom = 15; + control-center-margin-right = 15; + control-center-margin-left = 0; + notification-2fa-action = true; + notification-inline-replies = false; + notification-body-image-height = 100; + notification-body-image-width = 200; + notification-icon-size = 48; + timeout = 8; + timeout-low = 6; + timeout-critical = 0; + fit-to-screen = true; + relative-timestamps = true; + control-center-width = 400; + control-center-height = 600; + notification-window-width = 350; + keyboard-shortcuts = true; + notification-grouping = true; + image-visibility = "when-available"; + transition-time = 200; + hide-on-clear = false; + hide-on-action = true; + text-empty = "No Notifications"; + script-fail-notify = true; + widgets = [ + "dnd" + "mpris" + "notifications" + "volume" + "backlight" + ]; + 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 = { + show-album-art = "always"; + loop-carousel = false; + }; + volume = { + label = "󰕾 "; + expand-button-label = ""; + collapse-button-label = ""; + show-per-app = true; + show-per-app-icon = true; + show-per-app-label = false; + }; + backlight = { + label = "󰃟 "; + }; + }; + }; + style = '' + :root { + --bg-primary: #1d2021; + --bg-secondary: #282828; + --bg-button: #4E4E4E; + --bg-button-hover: #5E5E5E; + --text-primary: #EBDBB2; + --text-disabled: #5C554A; + --border-color: #928374; + --priority-low: #EBDBB2; + --priority-normal: #83A598; + --priority-critical: #FB4934; + --transition-standard: 0.15s ease-in-out; + } + + /* Base styles */ + * { + outline: none; + } + + *:focus { + outline: none; + box-shadow: none; + } + + /* Scrollbar */ + scrollbar, + scrollbar slider { + opacity: 0; + min-width: 0px; + min-height: 0px; + background: transparent; + } + + /* Common button styles */ + .close-button, + .widget-title>button, + .widget-dnd switch, + .widget-menubar>.menu-button-bar>.widget-menubar-container button, + .widget-menubar>revealer button, + .widget-inhibitors>button { + border-radius: 0px; + border: none; + box-shadow: none; + transition: background var(--transition-standard); + } + + /* Close button */ + .close-button { + background: var(--bg-button); + color: var(--text-primary); + text-shadow: none; + padding: 0; + border-radius: 50%; + margin-top: 8px; + margin-right: 8px; + min-width: 20px; + min-height: 20px; + } + + .close-button:hover { + background: var(--bg-button-hover); + } + + /* Notification rows */ + .notification-row { + background: none; + } + + .notification-row:focus, + .notification-group:focus { + background: var(--bg-primary); + } + + .notification-row .notification-background { + margin: 0px 0px 0px 0px; + } + + /* Base notification styles */ + .notification-row .notification-background .notification { + border-radius: 0px; + border: 1px solid var(--border-color); + transition: background var(--transition-standard); + background: var(--bg-primary); + padding: 2px 4px; + } + + /* Priority-based notification styles */ + .notification-row .notification-background .notification.low { + border-left: 3px solid var(--priority-low); + } + + .notification-row .notification-background .notification.normal { + border-left: 3px solid var(--priority-normal); + } + + .notification-row .notification-background .notification.critical { + border-left: 3px solid var(--priority-critical); + } + + /* Notification default action */ + .notification-default-action { + padding: 4px; + margin: 0; + box-shadow: none; + background: transparent; + border: none; + color: var(--text-primary); + transition: background var(--transition-standard); + border-radius: 0px; + } + + .notification-default-action:hover { + -gtk-icon-filter: none; + background: var(--bg-primary); + } + + .notification-default-action:not(:only-child) { + border-bottom-left-radius: 0px; + border-bottom-right-radius: 0px; + } + + /* Notification content */ + .notification-content { + background: transparent; + border-radius: 0px; + padding: 0; + } + + .notification-content .image { + -gtk-icon-filter: none; + -gtk-icon-size: 30px; + border-radius: 50px; + margin: 0px 7px 0px 0px; + } + + .notification-content .app-icon { + -gtk-icon-filter: none; + -gtk-icon-size: calc(25px / 3); + -gtk-icon-shadow: 0 1px 4px black; + margin: 6px; + } + + .notification-content .text-box label { + filter: none; + } + + /* Text elements */ + .notification-content .text-box .summary, + .notification-content .text-box .time, + .notification-content .text-box .body { + font-size: 16px; + background: transparent; + color: var(--text-primary); + text-shadow: none; + } + + .notification-content .text-box .summary, + .notification-content .text-box .time { + font-weight: bold; + } + + .notification-content .text-box .time { + margin-right: 30px; + } + + .notification-content .text-box .body { + font-weight: normal; + } + + /* Progress and images */ + .notification-content progressbar { + margin-top: 4px; + } + + .notification-content .body-image { + margin-top: 4px; + background-color: white; + -gtk-icon-filter: none; + } + + /* Inline reply */ + .notification-content .inline-reply { + margin-top: 4px; + } + + .notification-content .inline-reply .inline-reply-entry { + background: var(--bg-secondary); + color: var(--text-primary); + caret-color: var(--text-primary); + border: 1px solid var(--border-color); + border-radius: 0px; + } + + .notification-content .inline-reply .inline-reply-button { + margin-left: 4px; + background: rgb(48, 48, 48); + border: 1px solid var(--border-color); + border-radius: 0px; + color: var(--text-primary); + } + + .notification-content .inline-reply .inline-reply-button:disabled { + background: initial; + color: rgb(150, 150, 150); + border: 1px solid var(--border-color); + border-color: transparent; + } + + .notification-content .inline-reply .inline-reply-button:hover { + background: var(--bg-primary); + } + + /* Alternative actions */ + .notification-alt-actions { + background: none; + border-bottom-left-radius: 12px; + border-bottom-right-radius: 12px; + padding: 4px; + } + + .notification-action { + margin: 4px; + padding: 0; + font-size: 16px; + } + + .notification-action>button { + border-radius: 0px; + font-size: 16px; + padding: 1px; + } + + /* Notification groups */ + .notification-group { + transition: opacity 200ms ease-in-out; + } + + .notification-group .notification-group-close-button .close-button { + margin: 12px 20px; + } + + .notification-group .notification-group-buttons, + .notification-group .notification-group-headers { + margin: 0 16px; + color: var(--text-primary); + } + + .notification-group .notification-group-headers { + font-size: 16px; + } + + .notification-group .notification-group-headers .notification-group-icon { + color: var(--text-primary); + -gtk-icon-size: 20px; + font-size: 16px; + font-weight: 700; + margin: 5px 5px 5px 0px; + } + + .notification-group .notification-group-headers .notification-group-header { + font-size: 16px; + font-weight: 700; + color: var(--text-primary); + } + + .notification-group .notification-group-buttons { + margin: 5px; + } + + .notification-group.collapsed.not-expanded { + opacity: 1.0; + } + + .notification-group.collapsed .notification-row .notification { + background-color: var(--bg-primary); + } + + .notification-group.collapsed .notification-row:not(:last-child) .notification-action, + .notification-group.collapsed .notification-row:not(:last-child) .notification-default-action { + opacity: 1.0; + } + + .notification-group.collapsed:hover .notification-row:not(:only-child) .notification { + background-color: var(--bg-primary); + } + + /* Control center */ + .control-center { + background: var(--bg-primary); + color: var(--text-primary); + border-radius: 0px; + border: 2px solid var(--border-color); + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5); + } + + .control-center .control-center-list-placeholder { + opacity: 1.0; + } + + .control-center .control-center-list { + background: transparent; + } + + .control-center .control-center-list .notification .notification-default-action, + .control-center .control-center-list .notification .notification-action { + transition: opacity 400ms ease-in-out, background var(--transition-standard); + } + + .control-center .control-center-list .notification .notification-default-action:hover, + .control-center .control-center-list .notification .notification-action:hover { + background-color: var(--bg-primary); + } + + /* Floating notifications */ + .blank-window, + .floating-notifications { + background: transparent; + } + + .floating-notifications .notification { + box-shadow: none; + } + + /* Widgets */ + .widget-title>label { + margin: 8px; + font-weight: 700; + font-size: 16px; + } + + .widget-title>button { + margin: 8px; + font-size: 16px; + background: var(--bg-primary); + border: 2px solid var(--text-disabled); + padding: 3px 10px; + color: var(--text-primary); + font-weight: 700; + } + + /* Common widget styles */ + .widget-dnd, + .widget-label, + .widget-volume, + .widget-slider, + .widget-backlight { + margin-left: 8px; + margin-right: 8px; + margin-top: 0px; + margin-bottom: 0px; + } + + .widget-dnd label, + .widget-label>label { + color: var(--text-primary); + font-size: 18px; + } + + .widget-dnd label { + margin: 8px; + margin-top: 16px; + } + + .widget-dnd switch { + margin: 8px; + margin-top: 16px; + } + + .widget-dnd switch slider { + border-radius: 0px; + } + + .widget-label { + margin: 8px; + } + + /* Mpris widget */ + .widget-mpris { + margin: 5px; + } + + .widget-mpris .widget-mpris-player { + margin: 10px 10px; + border-radius: 0px; + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.75); + border: 1px solid var(--border-color); + } + + .widget-mpris .widget-mpris-player .mpris-background { + filter: blur(2px); + } + + .widget-mpris .widget-mpris-player .mpris-overlay { + padding: 16px; + background-color: rgba(0, 0, 0, 0.55); + } + + .widget-mpris .widget-mpris-player .mpris-overlay button:hover { + background: var(--bg-primary); + } + + .widget-mpris .widget-mpris-player .mpris-overlay .widget-mpris-album-art { + border-radius: 0px; + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.75); + -gtk-icon-size: 50px; + } + + .widget-mpris .widget-mpris-player .mpris-overlay .widget-mpris-title { + font-weight: bold; + font-size: 16px; + } + + .widget-mpris .widget-mpris-player .mpris-overlay .widget-mpris-subtitle { + font-size: 16px; + } + + .widget-mpris .widget-mpris-player .mpris-overlay>box>button { + margin: 2px; + color: var(--text-primary); + } + + .widget-mpris .widget-mpris-player .mpris-overlay>box>button:hover { + background-color: rgba(0, 0, 0, 0.5); + } + + .widget-mpris>box>button { + color: var(--text-primary); + } + + .widget-mpris>box>button:disabled { + color: var(--text-disabled); + } + + /* Buttons widget */ + .widget-buttons-grid { + padding: 8px; + margin: 8px; + border-radius: 0px; + } + + .widget-buttons-grid flowboxchild>button { + border-radius: 0px; + } + + /* Menubar widget */ + .widget-menubar>.menu-button-bar>.start { + margin-left: 8px; + } + + .widget-menubar>.menu-button-bar>.end { + margin-right: 8px; + } + + .widget-menubar>.menu-button-bar>.widget-menubar-container button { + margin: 0 4px; + } + + .widget-menubar>revealer { + margin-top: 8px; + } + + .widget-menubar>revealer button { + margin: 8px; + margin-top: 0; + } + + /* Volume widget */ + .widget-volume { + padding: 8px; + margin-bottom: 8px; + border-radius: 0px; + } + + .widget-volume row image { + -gtk-icon-size: 24px; + } + + .per-app-volume { + background-color: var(--bg-secondary); + padding: 8px 8px 8px 8px; + margin: 8px 8px 8px 8px; + border-radius: 0px; + } + + /* Slider widget */ + .widget-slider { + padding: 8px; + border-radius: 0px; + } + + .widget-slider label { + font-size: inherit; + } + + /* Backlight widget */ + .widget-backlight { + padding: 8px; + border-radius: 0px; + margin-top: -8px; + margin-bottom: 8px; + } + + /* Inhibitors widget */ + .widget-inhibitors>label { + margin: 8px; + font-size: 16px; + } + + .widget-inhibitors>button { + margin: 8px; + } + ''; + }; +}