swaync and waybar
This commit is contained in:
parent
9a6cecf875
commit
3166921340
4 changed files with 126 additions and 1 deletions
93
.config/swaync/config.json
Normal file
93
.config/swaync/config.json
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
{
|
||||||
|
"$schema": "/etc/xdg/swaync/configSchema.json",
|
||||||
|
"positionX": "right",
|
||||||
|
"positionY": "top",
|
||||||
|
"layer": "overlay",
|
||||||
|
"control-center-layer": "top",
|
||||||
|
"layer-shell": true,
|
||||||
|
"layer-shell-cover-screen": true,
|
||||||
|
"cssPriority": "application",
|
||||||
|
"control-center-margin-top": 20,
|
||||||
|
"control-center-margin-bottom": 400,
|
||||||
|
"control-center-margin-right": 20,
|
||||||
|
"control-center-margin-left": 0,
|
||||||
|
"notification-2fa-action": true,
|
||||||
|
"notification-inline-replies": false,
|
||||||
|
"notification-icon-size": 64,
|
||||||
|
"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'"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -33,6 +33,7 @@
|
||||||
// Modules Right
|
// Modules Right
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
"hyprland/language",
|
"hyprland/language",
|
||||||
|
"custom/notification",
|
||||||
"keyboard-state",
|
"keyboard-state",
|
||||||
"pulseaudio",
|
"pulseaudio",
|
||||||
"battery",
|
"battery",
|
||||||
|
|
|
@ -122,6 +122,27 @@
|
||||||
"default": [" ", " ", " "]
|
"default": [" ", " ", " "]
|
||||||
},
|
},
|
||||||
"on-click": "pavucontrol"
|
"on-click": "pavucontrol"
|
||||||
|
},
|
||||||
|
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,10 +199,20 @@ window#waybar.empty #window {
|
||||||
* ----------------------------------------------------- */
|
* ----------------------------------------------------- */
|
||||||
|
|
||||||
#keyboard-state {
|
#keyboard-state {
|
||||||
margin-right: 15px;
|
margin-right: 10px;
|
||||||
|
margin-left: 10px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -----------------------------------------------------
|
||||||
|
* Notifications
|
||||||
|
* ----------------------------------------------------- */
|
||||||
|
|
||||||
|
#custom-notification {
|
||||||
|
padding-right: 10px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
/* -----------------------------------------------------
|
/* -----------------------------------------------------
|
||||||
* Pulseaudio
|
* Pulseaudio
|
||||||
* ----------------------------------------------------- */
|
* ----------------------------------------------------- */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue