mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-01 18:51:04 +02:00
feat: swaync notifications module
Adds a new module which connects to SwayNC to display information from the notifications deamon. Resolves #7
This commit is contained in:
parent
660dc81e7d
commit
7742a46578
15 changed files with 592 additions and 3 deletions
|
@ -33,6 +33,18 @@ let {
|
|||
$mpd_local = { type = "music" player_type = "mpd" music_dir = "/home/jake/Music" truncate.mode = "end" truncate.max_length = 100 }
|
||||
$mpd_server = { type = "music" player_type = "mpd" host = "chloe:6600" truncate = "end" }
|
||||
|
||||
$notifications = {
|
||||
type = "notifications"
|
||||
show_count = true
|
||||
|
||||
icons.closed_none = ""
|
||||
icons.closed_some = ""
|
||||
icons.closed_dnd = ""
|
||||
icons.open_none = ""
|
||||
icons.open_some = ""
|
||||
icons.open_dnd = ""
|
||||
}
|
||||
|
||||
$sys_info = {
|
||||
type = "sys_info"
|
||||
|
||||
|
@ -110,7 +122,7 @@ let {
|
|||
// -- end custom --
|
||||
|
||||
$left = [ $workspaces $launcher $label ]
|
||||
$right = [ $mpd_local $mpd_server $phone_battery $sys_info $volume $clipboard $power_menu $clock ]
|
||||
$right = [ $mpd_local $mpd_server $phone_battery $sys_info $volume $clipboard $power_menu $clock $notifications ]
|
||||
}
|
||||
in {
|
||||
anchor_to_edges = true
|
||||
|
|
|
@ -141,6 +141,18 @@
|
|||
},
|
||||
{
|
||||
"type": "clock"
|
||||
},
|
||||
{
|
||||
"type": "notifications",
|
||||
"show_count": true,
|
||||
"icons": {
|
||||
"closed_none": "",
|
||||
"closed_some": "",
|
||||
"closed_dnd": "",
|
||||
"open_none": "",
|
||||
"open_some": "",
|
||||
"open_dnd": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -131,3 +131,15 @@ label = "Uptime: {{30000:uptime -p | cut -d ' ' -f2-}}"
|
|||
[[end]]
|
||||
type = "clock"
|
||||
|
||||
[[end]]
|
||||
type = "notifications"
|
||||
show_count = true
|
||||
|
||||
[end.icons]
|
||||
closed_none = ""
|
||||
closed_some = ""
|
||||
closed_dnd = ""
|
||||
open_none = ""
|
||||
open_some = ""
|
||||
open_dnd = ""
|
||||
|
||||
|
|
|
@ -92,4 +92,13 @@ end:
|
|||
label: 'Uptime: {{30000:uptime -p | cut -d '' '' -f2-}}'
|
||||
tooltip: 'Up: {{30000:uptime -p | cut -d '' '' -f2-}}'
|
||||
- type: clock
|
||||
- type: notifications
|
||||
show_count: true
|
||||
icons:
|
||||
closed_none:
|
||||
closed_some:
|
||||
closed_dnd:
|
||||
open_none:
|
||||
open_some:
|
||||
open_dnd:
|
||||
|
||||
|
|
|
@ -150,6 +150,20 @@ scale trough {
|
|||
border-radius: 100%;
|
||||
}
|
||||
|
||||
/* notifications */
|
||||
|
||||
.notifications .count {
|
||||
font-size: 0.6rem;
|
||||
background-color: @color_text;
|
||||
color: @color_bg;
|
||||
border-radius: 100%;
|
||||
margin-right: 3px;
|
||||
margin-top: 3px;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
/* -- script -- */
|
||||
|
||||
.script {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue