From 72a97ff1b67635ea6017ecb7df6d7e4876afd335 Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Mon, 2 Sep 2024 14:53:41 +0700 Subject: [PATCH] swaync and ags configs --- ags/media/style.css | 10 +- ags/notification-popups/style.css | 4 +- ags/volume/config.js | 50 +++ hypr/keybinds.conf | 2 + hypr/startup.conf | 3 +- swaync/config.json | 88 +++++ swaync/configSchema.json | 622 ++++++++++++++++++++++++++++++ swaync/style.css | 479 +++++++++++++++++++++++ waybar/config | 3 +- 9 files changed, 1254 insertions(+), 7 deletions(-) create mode 100644 ags/volume/config.js create mode 100644 swaync/config.json create mode 100644 swaync/configSchema.json create mode 100644 swaync/style.css diff --git a/ags/media/style.css b/ags/media/style.css index 8488ac8..12630a3 100644 --- a/ags/media/style.css +++ b/ags/media/style.css @@ -27,11 +27,13 @@ } .player scale.position trough { - min-height: 8px; + min-height: 10px; + border-radius: 10px; } .player scale.position highlight { background-color: @theme_fg_color; + border-radius: 10px; } .player scale.position slider { @@ -39,9 +41,11 @@ } .player button { - min-height: 1em; - min-width: 1em; + min-height: 2em; + min-width: 2em; + border-radius: 2em; padding: .3em; + border: none; } .player button.play-pause { diff --git a/ags/notification-popups/style.css b/ags/notification-popups/style.css index 7f1ff0b..4e28e73 100644 --- a/ags/notification-popups/style.css +++ b/ags/notification-popups/style.css @@ -23,7 +23,7 @@ window.notification-popups box.notifications { .notification { min-width: 350px; - border-radius: 11px; + border-radius: 16px; padding: 1em; margin: .5em; border: 1px solid @wm_borders_edge; @@ -31,7 +31,7 @@ window.notification-popups box.notifications { } .notification.critical { - border: 1px solid lightcoral; + border: 2px solid lightcoral; } .title { diff --git a/ags/volume/config.js b/ags/volume/config.js new file mode 100644 index 0000000..de16f31 --- /dev/null +++ b/ags/volume/config.js @@ -0,0 +1,50 @@ +const audio = await ServiceWorker.import('audio') + +/** @param {'speaker' | 'microphone'} type */ +const vol = () => { + const VolumeSlider = (type = 'speaker') => Widget.Slider({ + hexpand: true, + drawValue: false, + onChange: ({value}) => audio[type].volume = value, + value: audio[type].bind('volume') + }) + + const speakerSlider = VolumeSlider('speaker') + const micSlider = VolumeSlider('microphone') + return Widget.Window({ + child: [speakerSlider, micSlider] + }) +} + +// const audio = await Service.import('audio') + +// const vol = () => { +// const volumeIndicator = Widget.Button({ +// on_clicked: () => audio.speaker.is_muted = !audio.speaker.is_muted, +// child: Widget.Icon().hook(audio.speaker, self => { +// const vol = audio.speaker.volume * 100; +// const icon = [ +// [101, 'overamplified'], +// [67, 'high'], +// [34, 'medium'], +// [1, 'low'], +// [0, 'muted'], +// ].find(([threshold]) => threshold <= vol)?.[1]; + +// self.icon = `audio-volume-${icon}-symbolic`; +// self.tooltip_text = `Volume ${Math.floor(vol)}%`; +// }), +// }) +// return Widget.Window({ +// child: volumeIndicator +// }) +// } + +App.config({ + style: "./style.css", + windows: [ + vol() + // speakerSlider, + // micSlider + ], +}) diff --git a/hypr/keybinds.conf b/hypr/keybinds.conf index 268f009..f4aefd8 100644 --- a/hypr/keybinds.conf +++ b/hypr/keybinds.conf @@ -19,6 +19,8 @@ bind = $mainMod, S, exec, spotify bind = $mainMod, Y, exec, $calculator bind = $mainMod, E, exec, $emojipicker bind = $mainMod, M, exec, ~/dotfiles/ags/media/toggle_media +bind = $mainMod, Z, exec, swaync-client -t +bind = $mainMod SHIFT, R, exec, swaync-client -R #--------------------------------------------------- #-------------- windows -------------------------- diff --git a/hypr/startup.conf b/hypr/startup.conf index 973a673..9caea9a 100644 --- a/hypr/startup.conf +++ b/hypr/startup.conf @@ -23,7 +23,8 @@ exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESK exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP #------------------------------------------------------------------------------------------------ -exec-once = ~/dotfiles/ags/notification-popups/start_notification_service +exec-once = swaync +# exec-once = ~/dotfiles/ags/notification-popups/start_notification_service # exec-once = mako exec-once = nm-applet --indicator exec-once = greenclip daemon diff --git a/swaync/config.json b/swaync/config.json new file mode 100644 index 0000000..36a5b76 --- /dev/null +++ b/swaync/config.json @@ -0,0 +1,88 @@ +{ + "$schema": "/etc/xdg/swaync/configSchema.json", + "positionX": "right", + "positionY": "top", + "layer": "overlay", + "control-center-layer": "top", + "layer-shell": true, + "cssPriority": "application", + + "control-center-width": 350, + "control-center-height": 600, + "control-center-margin-top": 1, + "control-center-margin-bottom": 2, + "control-center-margin-right": 1, + "control-center-margin-left": 0, + + "notification-2fa-action": true, + "notification-inline-replies": true, + "notification-window-width": 350, + "notification-icon-size": 100, + "notification-body-image-height": 140, + "notification-body-image-width": 180, + + "timeout": 6, + "timeout-low": 3, + "timeout-critical": 0, + "fit-to-screen": false, + "keyboard-shortcuts": true, + "image-visibility": "when available", + "transition-time": 200, + "hide-on-clear": false, + "hide-on-action": true, + "script-fail-notify": true, + "widgets": [ + "title", + "mpris", + "volume", + "backlight", + "notifications" + ], + "widget-config": { + "title": { + "text": "Notifications", + "clear-all-button": true, + "button-text": "Clear" + }, + "dnd": { + "text": " " + }, + "label": { + "max-lines":2, + "text": "Notification" + }, + "mpris": { + "image-size": 60, + "image-radius": 10 + }, + "volume": { + "label": "󰕾" + }, + "backlight": { + "label": "󰃟" + }, + "buttons-grid": { + "actions": [ + { + "label": " Wi-FI", + "command": "nm-connection-editor" + }, + { + "label": "󰕾 Mute", + "command": "pactl set-sink-mute @DEFAULT_SINK@ toggle" + + }, + { + "label": "󰂯 Bluetooth", + "command": "blueman-manager" + }, + { + "label": " Theme", + "command":"/home/alien/.config/hypr/scripts/themechanging" + + + } + ] + } + } + } \ No newline at end of file diff --git a/swaync/configSchema.json b/swaync/configSchema.json new file mode 100644 index 0000000..8d96c68 --- /dev/null +++ b/swaync/configSchema.json @@ -0,0 +1,622 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SwayNotificationCenter JSON schema", + "type": "object", + "additionalProperties": false, + "properties": { + "$schema": { + "type": "string", + "description": "Pointer to the schema against which this document should be validated." + }, + "positionX": { + "type": "string", + "description": "Horizontal position of control center and notification window", + "default": "right", + "enum": ["right", "left", "center"] + }, + "layer": { + "type": "string", + "description": "Layer of notification window", + "default": "overlay", + "enum": ["background", "bottom", "top", "overlay"] + }, + "layer-shell": { + "type": "boolean", + "description": "Wether or not the windows should be opened as layer-shell surfaces. Note: Requires swaync restart to apply", + "default": true + }, + "cssPriority": { + "type": "string", + "description": "Which GTK priority to use when loading the default and user CSS files. Pick \"user\" to override XDG_CONFIG_HOME/gtk-3.0/gtk.css", + "default": "application", + "enum": ["application", "user"] + }, + "positionY": { + "type": "string", + "description": "Vertical position of control center and notification window", + "default": "top", + "enum": ["top", "center", "bottom"] + }, + "control-center-positionX": { + "type": "string", + "description": "Optional: Horizontal position of the control center. Supersedes positionX if not set to `none`", + "default": "none", + "enum": ["right", "left", "center", "none"] + }, + "control-center-positionY": { + "type": "string", + "description": "Optional: Vertical position of the control center. Supersedes positionY if not set to `none`", + "default": "none", + "enum": ["top", "bottom", "none"] + }, + "control-center-margin-top": { + "type": "integer", + "description": "The margin (in pixels) at the top of the control center. 0 to disable", + "default": 0 + }, + "control-center-margin-bottom": { + "type": "integer", + "description": "The margin (in pixels) at the bottom of the control center. 0 to disable", + "default": 0 + }, + "control-center-margin-right": { + "type": "integer", + "description": "The margin (in pixels) at the right of the control center. 0 to disable", + "default": 0 + }, + "control-center-margin-left": { + "type": "integer", + "description": "The margin (in pixels) at the left of the control center. 0 to disable", + "default": 0 + }, + "control-center-layer": { + "type": "string", + "description": "Layer of control center window", + "default": "none", + "enum": ["background", "bottom", "top", "overlay", "none"] + }, + "control-center-exclusive-zone": { + "type": "boolean", + "description": "Whether or not the control center should follow the compositors exclusive zones. An example would be setting it to \"false\" to cover your panel/dock.", + "default": true + }, + "notification-2fa-action": { + "type": "boolean", + "description": "If each notification should display a 'COPY \"1234\"' action", + "default": true + }, + "notification-inline-replies": { + "type": "boolean", + "description": "If notifications should display a text field to reply if the sender requests it. NOTE: Replying in popup notifications is only available if the compositor supports GTK Layer-Shell ON_DEMAND keyboard interactivity.", + "default": false + }, + "notification-icon-size": { + "type": "integer", + "description": "The notification icon size (in pixels). The app icon size is 1/3", + "default": 64, + "minimum": 16 + }, + "notification-body-image-height": { + "type": "integer", + "description": "The notification body image height (in pixels)", + "default": 100, + "minimum": 100 + }, + "notification-body-image-width": { + "type": "integer", + "description": "The notification body image width (in pixels)", + "default": 200, + "minimum": 200 + }, + "timeout": { + "type": "integer", + "description": "The notification timeout for notifications with normal priority", + "default": 10 + }, + "timeout-low": { + "type": "integer", + "description": "The notification timeout for notifications with low priority", + "default": 5 + }, + "timeout-critical": { + "type": "integer", + "description": "The notification timeout for notifications with critical priority. 0 to disable", + "default": 0 + }, + "notification-window-width": { + "type": "integer", + "description": "Width of the notification in pixels", + "default": 500 + }, + "fit-to-screen": { + "type": "boolean", + "description": "If the control center should expand to both edges of the screen", + "default": true + }, + "relative-timestamps": { + "type": "boolean", + "description": "Display notification timestamps relative to now e.g. \"26 minutes ago\". If false, a local iso8601-formatted absolute timestamp is displayed.", + "default": true + }, + "control-center-height": { + "type": "integer", + "description": "Height of the control center in pixels. Ignored when 'fit-to-screen' is set to 'true'", + "default": 600, + "minimum": 300 + }, + "control-center-width": { + "type": "integer", + "description": "Width of the control center in pixels", + "default": 500, + "minimum": 300 + }, + "keyboard-shortcuts": { + "type": "boolean", + "description": "If control center should use keyboard shortcuts", + "default": true + }, + "image-visibility": { + "type": "string", + "description": "The notification image visibility when no icon is available.", + "default": "when-available", + "enum": ["always", "when-available", "never"] + }, + "transition-time": { + "type": "integer", + "description": "The notification animation duration. 0 to disable", + "default": 200 + }, + "hide-on-clear": { + "type": "boolean", + "description": "Hides the control center after pressing \"Clear All\"", + "default": false + }, + "hide-on-action": { + "type": "boolean", + "description": "Hides the control center when clicking on notification action", + "default": true + }, + "script-fail-notify": { + "type": "boolean", + "description": "Sends a notification if a script fails to run", + "default": true + }, + "scripts": { + "type": "object", + "description": "Which scripts to check and potentially run for every notification. If the notification doesn't include one of the properties, that property will be ignored. All properties (except for exec) use regex. If all properties match the given notification, the script will be run. Only the first matching script will be run.", + "minProperties": 1, + "additionalProperties": false, + "patternProperties": { + "^.{1,}$": { + "type": "object", + "description": "Your script object.", + "required": ["exec"], + "minProperties": 2, + "additionalProperties": false, + "properties": { + "exec": { + "type": "string", + "description": "The script to run. Can also run regular shell commands." + }, + "app-name": { + "type": "string", + "description": "The app-name. Uses Regex." + }, + "desktop-entry": { + "type": "string", + "description": "The desktop-entry. Uses Regex." + }, + "summary": { + "type": "string", + "description": "The summary of the notification. Uses Regex." + }, + "body": { + "type": "string", + "description": "The body of the notification. Uses Regex." + }, + "urgency": { + "type": "string", + "description": "The urgency of the notification.", + "default": "Normal", + "enum": ["Low", "Normal", "Critical"] + }, + "category": { + "type": "string", + "description": "Which category the notification belongs to. Uses Regex." + }, + "run-on": { + "type": "string", + "description": "Whether to run the script on an action being activated, or when the notification is received.", + "enum": ["action", "receive"], + "default": "receive" + } + } + } + } + }, + "notification-visibility": { + "type": "object", + "description": "Set the visibility of each incoming notification. If the notification doesn't include one of the properties, that property will be ignored. All properties (except for state) use regex. If all properties match the given notification, the notification will be follow the provided state. Only the first matching object will be used.", + "minProperties": 1, + "additionalProperties": false, + "patternProperties": { + "^.{1,}$": { + "type": "object", + "description": "Your script object.", + "required": ["state"], + "minProperties": 2, + "additionalProperties": false, + "properties": { + "state": { + "type": "string", + "description": "The notification visibility state.", + "default": "enabled", + "enum": ["ignored", "muted", "enabled", "transient"] + }, + "app-name": { + "type": "string", + "description": "The app-name. Uses Regex." + }, + "desktop-entry": { + "type": "string", + "description": "The desktop-entry. Uses Regex." + }, + "summary": { + "type": "string", + "description": "The summary of the notification. Uses Regex." + }, + "body": { + "type": "string", + "description": "The body of the notification. Uses Regex." + }, + "urgency": { + "type": "string", + "description": "The urgency of the notification.", + "default": "Normal", + "enum": ["Low", "Normal", "Critical"] + }, + "override-urgency": { + "type": "string", + "description": "The new urgency of the notification (optional)", + "default": "unset", + "enum": ["unset", "low", "normal", "critical"] + }, + "category": { + "type": "string", + "description": "Which category the notification belongs to. Uses Regex." + } + } + } + } + }, + "widgets": { + "type": "array", + "description": "Which order and which widgets to display. If the \"notifications\" widget isn't specified, it will be placed at the bottom.", + "default": ["inhibitors", "title", "dnd", "notifications"], + "items": { + "type": "string", + "$comment": "Sadly can't use regex and enums at the same time. Fix in the future?", + "pattern": "^[a-zA-Z0-9_-]{1,}(#[a-zA-Z0-9_-]{1,}){0,1}?$" + } + }, + "widget-config": { + "type": "object", + "description": "Configure specific widget properties.", + "additionalProperties": false, + "$comment": "New widgets go here in \"patternProperties\" ↓", + "patternProperties": { + "^title(#[a-zA-Z0-9_-]{1,}){0,1}?$": { + "$comment": "References the widget structure from \"widgets\" below", + "$ref": "#/widgets/title" + }, + "^dnd(#[a-zA-Z0-9_-]{1,}){0,1}?$": { + "$ref": "#/widgets/dnd" + }, + "^label(#[a-zA-Z0-9_-]{1,}){0,1}?$": { + "$ref": "#/widgets/label" + }, + "^mpris(#[a-zA-Z0-9_-]{1,}){0,1}?$": { + "$ref": "#/widgets/mpris" + }, + "^buttons-grid(#[a-zA-Z0-9_-]{1,}){0,1}?$": { + "$ref": "#/widgets/buttons-grid" + }, + "^menubar(#[a-zA-Z0-9_-]{1,}){0,1}?$": { + "$ref": "#/widgets/menubar" + }, + "^volume(#[a-zA-Z0-9_-]{1,}){0,1}?$": { + "$ref": "#/widgets/volume" + }, + "^backlight(#[a-zA-Z0-9_-]{1,}){0,1}?$": { + "$ref": "#/widgets/backlight" + }, + "^inhibitors(#[a-zA-Z0-9_-]{1,}){0,1}?$": { + "$comment": "References the widget structure from \"widgets\" below", + "$ref": "#/widgets/inhibitors" + } + } + } + }, + "widgets": { + "$comment": "New widgets go here", + "title": { + "type": "object", + "description": "Control Center Title Widget", + "additionalProperties": false, + "properties": { + "text": { + "type": "string", + "description": "The title of the widget", + "default": "Notifications" + }, + "clear-all-button": { + "type": "boolean", + "description": "Wether to display a \"Clear All\" button", + "default": true + }, + "button-text": { + "type": "string", + "description": "\"Clear All\" button text", + "default": "Clear All" + } + } + }, + "dnd": { + "type": "object", + "description": "Control Center Do Not Disturb Widget", + "additionalProperties": false, + "properties": { + "text": { + "type": "string", + "description": "The title of the widget", + "default": "Do Not Disturb" + } + } + }, + "label": { + "type": "object", + "description": "A generic widget that allows the user to add custom text", + "additionalProperties": false, + "properties": { + "text": { + "type": "string", + "description": "The text content of the widget", + "default": "Label Text" + }, + "max-lines": { + "type": "integer", + "description": "The maximum lines", + "default": 5 + } + } + }, + "mpris": { + "type": "object", + "description": "A widget that displays multiple music players", + "additionalProperties": false, + "properties": { + "image-size": { + "type": "integer", + "description": "The size of the album art", + "default": 96 + }, + "image-radius": { + "type": "integer", + "description": "The border radius of the album art. Will be overriden by setting the border-radius in the style.css for the \".widget-mpris-album-art\" class", + + "default": 12 + }, + "blur": { + "type": "bool", + "description": "Appy the artwork as the MPRIS background and blur it", + "default": true + } + } + }, + "buttons-grid": { + "type": "object", + "description": "A widget to add a grid of buttons that execute shell commands", + "additionalProperties": false, + "properties": { + "actions": { + "type": "array", + "description": "A list of actions containing a label and a command", + "items": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "Text to be displayed in button", + "default": "label" + }, + "command": { + "type": "string", + "description": "Command to be executed on click", + "default": "" + }, + "type": { + "type": "string", + "description": "Type of the button; toggle buttons receive the .active css class and an env variable 'SWAYNC_TOGGLE_STATE' is set. See example in the default config.json", + "default": "normal", + "enum": ["normal", "toggle"] + }, + "update-command": { + "type": "string", + "description": "Command to be executed on visibility change of cc to update the active state of the toggle button (should echo true or false)", + "default": "" + }, + "active": { + "type": "bool", + "description": "Wether the toggle button is active as default or not", + "default": false + } + } + } + } + } + }, + "menubar": { + "type": "object", + "description": "A bar that contains action-buttons and buttons to open a dropdown with action-buttons", + "additionalProperties": false, + "patternProperties": { + "^menu(#[a-zA-Z0-9_-]{1,}){0,1}?$": { + "type": "object", + "description": "A button that opens a dropdown with action-buttons", + "additionalProperties": false, + "properties": { + "label": { + "type": "string", + "description": "Text to be displayed in button", + "default": "Menu" + }, + "position": { + "type": "string", + "description": "Horizontal position of the button in the bar", + "default": "right", + "enum": ["right", "left"] + }, + "animation-type": { + "type": "string", + "default": "slide_down", + "description": "Animation type for menu", + "enum": ["slide_down", "slide_up", "none"] + }, + "animation-duration":{ + "type": "integer", + "default": 250, + "description": "Duration of animation in milliseconds" + }, + "actions": { + "$ref" : "#/widgets/buttons-grid/properties/actions" + } + } + }, + "^buttons(#[a-zA-Z0-9_-]{1,}){0,1}?$": { + "type": "object", + "description": "A list of action-buttons to be displayed in the topbar", + "additionalProperties": false, + "properties": { + "position": { + "type": "string", + "description": "Horizontal position of the button in the bar", + "default": "right", + "enum": ["right", "left"] + }, + "actions": { + "$ref" : "#/widgets/buttons-grid/properties/actions" + } + } + } + } + }, + "volume": { + "type": "object", + "description": "Slider to control pulse volume", + "additionalProperties": false, + "properties": { + "label": { + "type": "string", + "description": "Text displayed in front of the volume slider", + "default": "Volume" + }, + "show-per-app": { + "type": "boolean", + "default": false, + "description": "Show per app volume control" + }, + "show-per-app-icon": { + "type": "boolean", + "default": true, + "description": "Show application icon in per app control" + }, + "show-per-app-label": { + "type": "boolean", + "default": false, + "description": "Show application name in per app control" + }, + "empty-list-label": { + "type": "string", + "default": "No active sink input", + "description": "Text displayed when there are not active sink inputs" + }, + "expand-button-label": { + "type": "string", + "default": "⇧", + "description": "Label displayed on button to show per app volume control" + }, + "collapse-button-label": { + "type": "string", + "default": "⇩", + "description": "Label displayed on button to hide per app volume control" + }, + "icon-size": { + "type": "integer", + "default": 24, + "description": "Size of the application icon in per app volume control" + }, + "animation-type": { + "type": "string", + "default": "slide_down", + "description": "Animation type for menu", + "enum": ["slide_down", "slide_up", "none"] + }, + "animation-duration":{ + "type": "integer", + "default": 250, + "description": "Duration of animation in milliseconds" + } + } + }, + "backlight": { + "type": "object", + "description": "Slider to control monitor brightness", + "additionalProperties": false, + "properties": { + "label": { + "type": "string", + "description": "Text displayed in front of the backlight slider", + "default": "Brightness" + }, + "device": { + "type": "string", + "description": "Name of monitor (find possible devices using `ls /sys/class/backlight` or `ls /sys/class/leds`)", + "default": "intel_backlight" + }, + "subsystem": { + "type": "string", + "description": "Kernel subsystem for brightness control", + "default": "backlight", + "enum": ["backlight", "leds"] + }, + "min": { + "type": "integer", + "default": 0, + "description": "Lowest possible value for brightness" + } + } + }, + "inhibitors": { + "type": "object", + "description": "Control Center Inhibitors Widget", + "additionalProperties": false, + "properties": { + "text": { + "type": "string", + "description": "The title of the widget", + "default": "Inhibitors" + }, + "clear-all-button": { + "type": "boolean", + "description": "Wether to display a \"Clear All\" button", + "default": true + }, + "button-text": { + "type": "string", + "description": "\"Clear All\" button text", + "default": "Clear All" + } + } + } + } +} diff --git a/swaync/style.css b/swaync/style.css new file mode 100644 index 0000000..2acb647 --- /dev/null +++ b/swaync/style.css @@ -0,0 +1,479 @@ +@define-color cc-bg rgba(20, 20, 20, 0.7); +@define-color noti-border-color rgba(255, 255, 255, 0.15); +@define-color noti-bg rgba(50, 50, 50, 0.8); +@define-color noti-bg-opaque rgb(48, 48, 48); +@define-color noti-bg-darker rgb(38, 38, 38); +@define-color noti-bg-hover rgb(56, 56, 56); +@define-color noti-bg-hover-opaque rgb(56, 56, 56); +@define-color noti-bg-focus rgba(68, 68, 68, 0.6); +@define-color noti-close-bg rgba(255, 255, 255, 0.1); +@define-color noti-close-bg-hover rgba(255, 255, 255, 0.15); +@define-color text-color rgb(255, 255, 255); +@define-color text-color-disabled rgb(150, 150, 150); +@define-color bg-selected rgb(0, 128, 255); +/* @import url("/home/tola/.cache/wal/colors-waybar.css") */ + +.testing { + background-color: red; +} + +.control-center { + background: alpha(@background, 0.6); + border-radius: 24px; + border: 0px solid @foreground; + margin: 2px; + padding: 4px; +} + +.control-center-list { + background: transparent; +} + +.control-center-list-placeholder { + opacity: 0.8; +} + +/* Window behind control center and on all other monitors */ +.blank-window { + background: transparent; +} + +/*** Widgets ***/ + +/* Title widget */ +.widget-title { + margin: 8px; + font-size: 1.5rem; + background: alpha(@color0,0.0); +} +.widget-title > button { + font-size: initial; + color:@color7; + text-shadow: none; + background: alpha(@background,0.0); + border: 1px solid alpha(@color7,0.5); + box-shadow: none; + border-radius: 12px; +} +.widget-title > button:hover { + background: @color1; +} + +.widget-label { + background: @color0; + padding: 20px; + padding-bottom: 50px; + border-radius: 20px; +} + +/* DND widget */ +.widget-dnd { + background-color: @color; +} +.widget-dnd > switch { + font-size: initial; + border-radius: 14px; + background: @noti-bg; + border: 2px solid @noti-border-color; + box-shadow: none; +} +.widget-dnd > switch:checked { + background: @color5; +} +.widget-dnd > switch slider { + background: @noti-bg-hover; + border-radius: 12px; +} + +/* Label widget */ +.widget-label { + margin: 8px; +} +.widget-label > label { + font-size: 1.1rem; +} + +/* Mpris widget */ +.widget-mpris { + font-family: "JetBrains Mono Nerd Font"; + /* The parent to all players */ + border: 0px; +} +.widget-mpris-player { + padding: 14px; + margin: 14px; + background-color: @mpris-album-art-overlay; + border-radius: 20px; +} +.widget-mpris-album-art { + border-radius: 12px; +} +.widget-mpris-player button:hover { + /* The media player buttons (play, pause, next, etc...) */ + background: @noti-bg-hover; +} +.widget-mpris > box > button { + /* Change player side buttons */ +} +.widget-mpris > box > button:disabled { + /* Change player side buttons insensitive */ +} +.widget-mpris-title { + font-family: "JetBrains Mono Nerd Font"; + font-weight: bold; + font-size: 1.25rem; +} +.widget-mpris-subtitle { + font-family: "JetBrains Mono Nerd Font"; + font-size: 1.1rem; +} + +/* Buttons widget */ +.widget-buttons-grid { + font-size: 15px; + background: alpha(@background, 0.9); + font-family: "JetBrains Mono Nerd Font"; + padding-left: 5px; + margin-left: 10px; + margin-right: 10px; + border-radius: 20px; + padding-top: 10px; + padding-bottom: 10px; + background-color: alpha(@background, 0.9); +} + +.widget-buttons-grid > flowbox > flowboxchild > button { + padding: 10px; + background: @color1; + color:@color7; + border-radius: 20px; + margin: 2px; + border: 0px solid #04030a; +} + +.widget-buttons-grid > flowbox > flowboxchild > button:hover { + background: @color4; + transition: all 0.3s ease-in-out; +} + +/* Menubar widget */ +.widget-menubar > box > .menu-button-bar > button { + border: none; + background: transparent; + background: red; +} + +.topbar-buttons > button { + /* Name defined in config after # */ + border: none; + background: transparent; + background: rgba(69, 133, 136, 1); +} + +/* Volume widget */ +trough { + border-radius: 20px; + background: @background; + border: 1px solid @background; +} + +trough highlight { + /* ´trough´ is the background of the slider, ´highlight´ is the actual slider */ + padding-top: 1px; + background: @color4; + border: 1px solid @color4; + border-radius: 20px; +} + +trough slider { + padding: 1px; + background: @color4; + border: 1px solid @color4; +} +trough slider:hover { + padding: 1px; + background: @color4; +} + +.widget-volume { + background-color: alpha(@background, 0.0); + border-radius: 20px 20px 0px 0px; + font-size: 15px; + margin-left: 10px; + margin-right: 10px; + padding-bottom: 5px; + border: 0px solid transparent; +} + +.widget-backlight { + padding-left: 5px; + background-color: alpha(@background, 0.0); + font-size: 15px; + margin-top: -8px; + margin-left: 10px; + margin-right: 10px; + border-radius: 0px 0px 20px 20px; + border: 0px solid transparent; +} + +/* Title widget */ +.widget-inhibitors { + margin: 8px; + font-size: 1.5rem; +} +.widget-inhibitors > button { + font-size: initial; + color: white; + text-shadow: none; + background: @noti-bg; + border: 1px solid @noti-border-color; + box-shadow: none; + border-radius: 12px; +} +.widget-inhibitors > button:hover { + background: @noti-bg-hover; +} +.notification-row { + outline: none; +} + +.notification-row:focus, +.notification-row:hover { + background: alpha(@color14, 0.5); /* @noti-bg-focus */ +} + +.notification-row .notification-background { + padding: 6px 12px; +} + +.notification-row .notification-background .close-button { + /* The notification Close Button */ + background: alpha(@color4, 0.5); /* @noti-close-bg */ + color: alpha(@color15, 1.0); /* @text-color */ + text-shadow: none; + padding: 0; + border-radius: 100%; + margin-top: 5px; + margin-right: 5px; + box-shadow: none; + border: none; + min-width: 24px; + min-height: 24px; +} + +.notification-row .notification-background .close-button:hover { + background: alpha(@color12, 0.5); /* @noti-close-bg-hover */ + transition: background 0.15s ease-in-out; +} + +.notification-row .notification-background .notification { + /* The actual notification */ + border-radius: 12px; + border: 2px solid alpha(@color8, 0.5); /* @border */ + padding: 0; + transition: background 0.15s ease-in-out; + background: alpha(@color0, 0.5); /* @noti-bg */ +} + +.notification-row .notification-background .notification.low { + /* Low Priority Notification */ +} + +.notification-row .notification-background .notification.normal { + /* Normal Priority Notification */ +} + +.notification-row .notification-background .notification.critical { + /* Critical Priority Notification */ +} + +.notification-row .notification-background .notification .notification-action, +.notification-row .notification-background .notification .notification-default-action { + padding: 4px; + margin: 0; + box-shadow: none; + background: transparent; + border: none; + color: alpha(@color15, 1.0); /* @text-color */ + transition: background 0.15s ease-in-out; +} + +.notification-row .notification-background .notification .notification-action:hover, +.notification-row .notification-background .notification .notification-default-action:hover { + background: alpha(@color13, 0.5); /* @noti-bg-hover */ +} + +.notification-row .notification-background .notification .notification-default-action { + /* The large action that also displays the notification summary and body */ + border-radius: 12px; +} + +.notification-row .notification-background .notification .notification-default-action:not(:only-child) { + /* When alternative actions are visible */ + border-bottom-left-radius: 0px; + border-bottom-right-radius: 0px; +} + +.notification-row .notification-background .notification .notification-default-action .notification-content { + background: transparent; + border-radius: 12px; + padding: 4px; +} + +.notification-row .notification-background .notification .notification-default-action .notification-content .image { + /* Notification Primary Image */ + border-radius: 100px; + /* Size in px */ + margin: 4px; +} + +.notification-row .notification-background .notification .notification-default-action .notification-content .app-icon { + /* Notification app icon (only visible when the primary image is set) */ + -gtk-icon-shadow: 0 1px 4px black; + margin: 6px; +} + +.notification-row .notification-background .notification .notification-default-action .notification-content .text-box .summary { + /* Notification summary/title */ + font-size: 16px; + font-weight: bold; + background: transparent; + color: alpha(@color15, 1.0); /* @text-color */ + text-shadow: none; +} + +.notification-row .notification-background .notification .notification-default-action .notification-content .text-box .time { + /* Notification time-ago */ + font-size: 16px; + font-weight: bold; + background: transparent; + color: alpha(@color15, 1.0); /* @text-color */ + text-shadow: none; + margin-right: 30px; +} + +.notification-row .notification-background .notification .notification-default-action .notification-content .text-box .body { + /* Notification body */ + font-size: 15px; + font-weight: normal; + background: transparent; + color: alpha(@color15, 1.0); /* @text-color */ + text-shadow: none; +} + +.notification-row .notification-background .notification .notification-default-action .notification-content progressbar { + /* The optional notification progress bar */ + margin-top: 4px; +} + +.notification-row .notification-background .notification .notification-default-action .notification-content .body-image { + /* The "extra" optional bottom notification image */ + margin-top: 4px; + background-color: alpha(@color15, 0.5); + border-radius: 12px; +} + +.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply { + /* The inline reply section */ + margin-top: 4px; +} + +.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-entry { + background: alpha(@color1, 0.5); /* @noti-bg-darker */ + color: alpha(@color15, 1.0); /* @text-color */ + caret-color: alpha(@color15, 1.0); /* @text-color */ + border: 1px solid alpha(@color8, 0.5); /* @border */ + border-radius: 12px; +} + +.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-button { + margin-left: 4px; + background: alpha(@color0, 0.5); /* @noti-bg */ + border: 1px solid alpha(@color8, 0.5); /* @border */ + border-radius: 12px; + color: alpha(@color15, 1.0); /* @text-color */ +} + +.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-button:disabled { + background: initial; + color: alpha(@color7, 0.5); /* @text-color-disabled */ + border: 1px solid alpha(@color8, 0.5); /* @border */ + border-color: transparent; +} + +.notification-row .notification-background .notification .notification-default-action .inline-reply .inline-reply-button:hover { + background: alpha(@color13, 0.5); /* @noti-bg-hover */ +} + +.notification-row .notification-background .notification .notification-action { + /* The alternative actions below the default action */ + border-top: 1px solid alpha(@color8, 0.5); /* @border */ + border-radius: 0px; + border-right: 1px solid alpha(@color8, 0.5); /* @border */ +} + +.notification-row .notification-background .notification .notification-action:first-child { + /* Add bottom border radius to eliminate clipping */ + border-bottom-left-radius: 12px; +} + +.notification-row .notification-background .notification .notification-action:last-child { + border-bottom-right-radius: 12px; + border-right: none; +} + +.notification-group { + /* Styling only for Grouped Notifications */ +} + +.notification-group.low { + /* Low Priority Group */ +} + +.notification-group.normal { + /* Normal Priority Group */ +} + +.notification-group.critical { + /* Critical Priority Group */ +} + +.notification-group .notification-group-buttons, +.notification-group .notification-group-headers { + margin: 0 16px; + color: alpha(@color15, 1.0); /* @text-color */ +} + +.notification-group .notification-group-headers { + /* Notification Group Headers */ +} + +.notification-group .notification-group-headers .notification-group-icon { + color: alpha(@color15, 1.0); /* @text-color */ +} + +.notification-group .notification-group-headers .notification-group-header { + color: alpha(@color15, 1.0); /* @text-color */ +} + +.notification-group .notification-group-buttons { + /* Notification Group Buttons */ +} + +.notification-group.collapsed .notification-row .notification { + background-color: alpha(@color0, 0.5); /* @noti-bg-opaque */ +} + +.notification-group.collapsed .notification-row:not(:last-child) { + /* Top notification in stack */ + /* Set lower stacked notifications opacity to 0 */ +} + +.notification-group.collapsed .notification-row:not(:last-child) .notification-action, +.notification-group.collapsed .notification-row:not(:last-child) .notification-default-action { + opacity: 0; +} + +.notification-group.collapsed:hover .notification-row:not(:only-child) .notification { + background-color: alpha(@color13, 0.5); /* @noti-bg-hover-opaque */ +} \ No newline at end of file diff --git a/waybar/config b/waybar/config index a9cb094..5f9bd82 100644 --- a/waybar/config +++ b/waybar/config @@ -38,7 +38,8 @@ "hyprland/language": { "format": "{}", "format-en": "US", - "format-ru": "RU" + "format-ru": "RU", + "on-click": "swaync-client -t" }, "tray": { "spacing": 10