add swaync

This commit is contained in:
Alexander Navarro 2025-08-25 16:47:51 -04:00
parent 75452f4c81
commit 8f3259a19a
6 changed files with 609 additions and 1 deletions

View file

@ -117,6 +117,8 @@ ctrl_n_shortcuts = false
# "^/very/secret/area", # "^/very/secret/area",
# ] # ]
store_failed = true
## Configure the maximum height of the preview to show. ## Configure the maximum height of the preview to show.
## Useful when you have long scripts in your history that you want to distinguish ## Useful when you have long scripts in your history that you want to distinguish
## by more than the first few lines. ## by more than the first few lines.

View file

@ -18,6 +18,7 @@ exec-once = hyprctl setcursor catppuccin-macchiato-lavender-cursors 24
# ── Utils ─────────────────────────────────────────────────────────────── # ── Utils ───────────────────────────────────────────────────────────────
exec-once = wpaperd -d exec-once = wpaperd -d
exec-once = swaync --skip-system-css
# ╭──────────────────────────────────────────────────────────╮ # ╭──────────────────────────────────────────────────────────╮
# │ Config │ # │ Config │

View file

@ -168,6 +168,7 @@ vim.lsp.enable({
"nushell", "nushell",
"pyright", "pyright",
"ruff", "ruff",
"intelephense",
-- "rust_analyzer", -- managed by rustacean.nvim -- "rust_analyzer", -- managed by rustacean.nvim
}) })

View file

@ -0,0 +1,134 @@
{
"$schema": "/etc/xdg/swaync/configSchema.json",
"ignore-gtk-theme": true,
"positionX": "right",
"positionY": "top",
"cssPriority": "user",
"hide-on-clear": true,
"hide-on-action": true,
"relative-timestamps": true,
"keyboard-shortcuts": true,
"notification-grouping": true,
"layer": "overlay",
"control-center-layer": "top",
"layer-shell": true,
"layer-shell-cover-screen": true,
"control-center-width": 500,
"control-center-height": 600,
"control-center-margin-top": 10,
"control-center-margin-bottom": 10,
"control-center-margin-right": 10,
"control-center-margin-left": 10,
"notification-2fa-action": true,
"notification-inline-replies": false,
"notification-body-image-height": 100,
"notification-body-image-width": 200,
"notification-window-width": 500,
"timeout": 10,
"timeout-low": 5,
"timeout-critical": 0,
"fit-to-screen": true,
"image-visibility": "when-available",
"transition-time": 500,
"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": [
"buttons-grid",
"volume",
"mpris",
"title",
"notifications",
"inhibitors",
"dnd"
],
"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"
},
"volume": {
"label": " 󰕾 ",
"expand-button-label": " ",
"collapse-button-label": " ",
"show-per-app": true
},
"mpris": {
"blacklist": [],
"autohide": true,
"show-album-art": "always",
"loop-carousel": false,
"image-size": 80
},
"buttons-grid": {
"actions": [
{
"label": "󰄜",
"type": "normal",
"command": "scrcpy",
"right-click-command": "scrcpy --help | head -20 | foot -e less"
},
{
"label": "󰌘",
"type": "normal",
"command": "kdeconnect-app",
"right-click-command": "kdeconnect-settings"
},
{
"label": " ",
"type": "toggle",
"active": false,
"command": "sh -c '[[ $SWAYNC_TOGGLE_STATE == true ]] && pactl set-source-mute @DEFAULT_SOURCE@ 1 || pactl set-source-mute @DEFAULT_SOURCE@ 0'",
"update-command": "sh -c '[[ $(pactl get-source-mute @DEFAULT_SOURCE@) == *yes* ]] && echo true || echo false'"
},
{
"label": " ",
"type": "toggle",
"active": false,
"command": "sh -c '[[ $SWAYNC_TOGGLE_STATE == true ]] && pactl set-sink-mute @DEFAULT_SINK@ 1 || pactl set-sink-mute @DEFAULT_SINK@ 0'",
"update-command": "sh -c '[[ $(pactl get-sink-mute @DEFAULT_SINK@) == *yes* ]] && echo true || echo false'"
}
]
}
}
}

View file

@ -0,0 +1,449 @@
/* ========================================================================
SwayNC CSS Configuration - Catppuccin Theme
Reformatted for better readability and maintainability
======================================================================== */
/* ========================================================================
COLOR PALETTE - Gruvbox Inspired
======================================================================== */
@define-color bg-primary #24273a; /* Dark background - main canvas */
@define-color bg-secondary #363a4f; /* Secondary background - panels */
@define-color bg-tertiary #494d64; /* Tertiary background - hover states */
@define-color bg-selected #8bd5ca; /* Selection background */
@define-color fg-primary #cad3f5; /* Primary text - cream/off-white */
@define-color fg-secondary #d5c4a1; /* Secondary text - muted cream */
@define-color fg-tertiary #bdae93; /* Tertiary text - greyish cream */
@define-color fg-disabled #665c54; /* Disabled text - dark grey */
@define-color accent-green #8bd5ca; /* Spotify green accent */
@define-color accent-orange #f5a97f; /* Warm orange accent */
@define-color accent-red #ed8796; /* Error/critical red */
@define-color accent-maroon #ee99a0; /* Error/critical red */
@define-color accent-blue #8aadf4; /* Info blue */
@define-color accent-purple #c6a0f6; /* Purple accent */
@define-color accent-primary #8bd5ca; /* alternative color */
@define-color accent-secondary #c6a0f6; /* selected and hightlighted stuff */
@define-color border-primary #8bd5ca; /* Primary border color */
@define-color border-focus #c6a0f6; /* Focus border - green accent */
/* Special Purpose Colors */
@define-color mpris-album-art-overlay rgba(0, 0, 0, 0.55);
@define-color mpris-button-hover rgba(0, 0, 0, 0.5);
:root {
--container-border-radius: 4px;
--widget-padding: 12px 0px;
--widget-border-radius: 10px;
--transition-color: background-color 200ms ease-out, color 200ms ease-out;
}
/* ========================================================================
GLOBAL STYLES
======================================================================== */
* {
outline: none;
font-family: "JetbrainsMono Nerd Font", monospace;
font-size: 18px;
text-shadow: none;
color: @fg-primary;
}
/*
* Rest of the screen overlay
*/
.blank-window {
background-color: rgba(0, 0, 0, 0.25);
transition: background-color 500ms ease;
}
.text-box label {
/* Fixes base GTK 4 CSS setting a filter of opacity 50% for some odd reason */
filter: none;
}
/* ========================================================================
CONTROL CENTER - Main notification panel
======================================================================== */
.control-center {
background-color: @bg-primary;
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.65);
border: 2px solid @border-primary;
padding: .75rem;
border-radius: var(--container-border-radius);
}
/*
* Each item box
*/
.control-center > viewport > .vertical > * {
border-radius: var(--widget-border-radius);
padding: 0.75rem;
}
.control-center > viewport > box.vertical > * {
margin-bottom: 1rem;
}
.control-center > viewport > box.vertical > *:nth-child(5),
.control-center > viewport > box.vertical > *:last-child {
margin-bottom: 0;
padding: 0;
}
.notification-row {
background: none;
outline: none;
}
.control-center .notification-row .notification-background {
border-radius: var(--container-border-radius);
margin-top: 5px;
background: none;
}
.control-center .notification-row .notification-background .notification {
border-radius: var(--container-border-radius);
}
.control-center .notification-row .notification-background .close-button {
border-radius: var(--container-border-radius);
}
.control-center-clear-all label {
font-size: 1rem;
}
/* ========================================================================
NOTIFICATION STYLES
======================================================================== */
.floating-notifications {
background: transparent;
margin-right: 10px;
}
.floating-notifications .notification {
margin-bottom: 10px;
}
.notification {
border-radius: var(--container-border-radius);
border: 1px solid @border-primary;
}
.notification.low,
.notification.normal {
background-color: @bg-secondary;
}
/* Notification Priority Styles */
.notification.critical {
background-color: @bg-secondary;
border-color: @accent-red;
box-shadow: 0 0 1px 1px @accent-red;
}
.notification > *:last-child > * {
margin: 5px;
}
/* Notification Content */
.notification-content {
padding: 15px 10px 10px 20px;
border-radius: 4px;
}
/* Text Elements */
.summary {
font-size: 1.1rem;
}
.time {
font-size: 0.8rem;
}
.body {
font-size: 1rem;
}
/* Notification Actions */
.notification-action > button {
padding: unset;
margin: unset;
border-radius: 4px;
}
.notification-action > label {
font-size: 1rem;
font-weight: normal;
}
/* Close Button */
.close-button {
font-size: 1rem;
background-color: @bg-tertiary;
}
.close-button:hover {
background-color: @accent-red;
}
/* ========================================================================
NOTIFICATION GROUPS
======================================================================== */
.control-center-list {
background: none;
}
.notification-group-header,
.notification-group-icon {
font-size: 0.9rem;
}
.notification-group-collapse-button,
.notification-group-close-all-button {
background-color: @bg-tertiary;
border-radius: 50%;
}
.notification-group-collapse-button:hover {
background-color: @accent-blue;
}
.notification-group-close-all-button:hover {
background-color: @accent-red;
}
/* ========================================================================
SCROLLBARS & SLIDERS
======================================================================== */
trough highlight {
background: @accent-blue;
border-radius: 4px;
}
scale trough {
margin: 0rem 1rem;
background-color: @bg-tertiary;
min-height: 8px;
min-width: 70px;
border-radius: 4px;
}
slider {
background-color: @fg-primary;
border-radius: 50%;
transition: var(--transition-color);
}
slider:hover {
background-color: @accent-secondary;
}
tooltip {
font-size: 0.25rem;
background-color: @bg-tertiary;
border-radius: 4px;
}
/* ========================================================================
WIDGET STYLES
======================================================================== */
/* ========================================================================
BUTTONS GRID WIDGET - Quick action buttons
======================================================================== */
.widget-buttons-grid {
font-size: 1rem;
background: @bg-secondary;
}
.widget-buttons-grid > flowbox > flowboxchild > button {
background: @bg-secondary;
/* border: 1px solid @accent-green; */
box-shadow: 0px 0px 10px @bg-primary;
border-radius: 4px;
padding: 12px 0px;
transition: background-color 0.15s ease, color 0.15s ease;
}
.widget-buttons-grid > flowbox > flowboxchild > button:hover {
background: @bg-selected;
color: @bg-primary;
}
.widget-buttons-grid > flowbox > flowboxchild > button:hover > label {
color: @bg-primary;
}
.widget-buttons-grid > flowbox > flowboxchild > button.toggle:checked {
background: @accent-green;
color: @bg-primary;
}
.widget-buttons-grid > flowbox > flowboxchild > button.toggle:checked > label {
color: @bg-primary;
}
.widget-buttons-grid > flowbox > flowboxchild > button.toggle:checked:hover {
background: @accent-green;
color: @bg-primary;
}
.widget-buttons-grid > flowbox > flowboxchild > button.toggle:checked:hover > label {
color: @bg-primary;
}
/* ========================================================================
MPRIS WIDGET - Media player controls
======================================================================== */
.widget-mpris {
background: @bg-secondary;
border-radius: var(--widget-border-radius);
}
.mpris-background {
background: transparent;
opacity: 0;
}
.widget-mpris .widget-mpris-player {
background: transparent;
}
.widget-mpris .widget-mpris-player .widget-mpris-album-art {
border-radius: var(--widget-border-radius);
}
.widget-mpris .widget-mpris-player .widget-mpris-title {
font-weight: bold;
font-size: 1.2rem;
color: @accent-purple;
}
.widget-mpris .widget-mpris-player .widget-mpris-subtitle {
font-size: 1rem;
color: @accent-purple;
}
.widget-mpris .widget-mpris-player > box > button:hover {
background-color: @mpris-button-hover;
}
.widget-mpris > box > button:hover {
background: alpha(@bg-selected, 0.6);
}
/* ========================================================================
VOLUME WIDGET - Audio controls
======================================================================== */
.widget-volume {
background-color: @bg-secondary;
}
.widget-volume trough highlight {
background: @bg-selected;
}
.widget-volume > box > button {
border: none;
background-color: @bg-tertiary;
}
.widget-volume > box > button:active,
.widget-volume > box > button:hover {
background-color: @bg-selected;
color: @bg-primary;
}
.per-app-volume {
background: inherit;
padding: 4px 8px 8px 8px;
margin: 0px 48px 8px 8px;
border-radius: var(--widget-border-radius);
}
/* ========================================================================
BACKLIGHT WIDGET - Brightness controls
======================================================================== */
.widget-backlight {
margin: unset;
font-size: 1.1rem;
}
/* ========================================================================
DND WIDGET - Do Not Disturb toggle
======================================================================== */
/* DND text */
.widget-dnd > label {
color: @accent-purple; /* Replace with your desired color */
}
.widget-dnd {
font-weight: bold;
margin: unset;
}
.widget-dnd > switch {
font-size: initial;
border-radius: 4px;
background: @bg-tertiary;
border: none;
box-shadow: none;
padding: 3px;
}
.widget-dnd > switch:checked {
background: @accent-purple;
}
.widget-dnd > switch slider {
background: @bg-primary;
border-radius: 4px;
min-width: 18px;
min-height: 18px;
}
/* ========================================================================
TITLE WIDGET - Header with clear all button
======================================================================== */
.widget-title, .widget-inhibitors {
font-weight: bold;
}
.widget-title > label {
font-size: 1.25rem;
}
.widget-inhibitors > label {
font-size: 1rem;
}
.widget-title > button, .widget-inhibitors > button {
background: @accent-red;
border-radius: var(--widget-border-radius);
transition: var(--transition-color);
}
.widget-title > button:hover, .widget-inhibitors > button:hover {
background: @accent-maroon;
color: @bg-primary;
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.65);
}
.widget-title > button > label, .widget-inhibitors > button > label {
transition: color 200ms ease;
}
.widget-title > button:hover > label, .widget-inhibitors > button:hover > label {
color: @bg-primary;
}

View file

@ -14,11 +14,12 @@
"modules-right": [ "modules-right": [
"tray", "tray",
"idle_inhibitor", "idle_inhibitor",
// "network", // "network",
"bluetooth", "bluetooth",
"backlight", "backlight",
"wireplumber", "wireplumber",
"battery", "battery",
"custom/notification",
"custom/power" "custom/power"
], ],
@ -129,5 +130,25 @@
}, },
"tray": { "tray": {
"show-passive-items": true "show-passive-items": true
},
"custom/notification": {
"tooltip": false,
"format": "{} {icon}",
"format-icons": {
"notification": "<span foreground='red'><sup></sup></span>",
"none": "",
"dnd-notification": "<span foreground='red'><sup></sup></span>",
"dnd-none": "",
"inhibited-notification": "<span foreground='red'><sup></sup></span>",
"inhibited-none": "",
"dnd-inhibited-notification": "<span foreground='red'><sup></sup></span>",
"dnd-inhibited-none": ""
},
"return-type": "json",
"exec-if": "which swaync-client",
"exec": "swaync-client -swb",
"on-click": "swaync-client -t -sw",
"on-click-right": "swaync-client -d -sw",
"escape": true
} }
} }