aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorToby Vincent <tobyv@tobyvin.dev>2024-09-04 22:48:22 -0500
committerToby Vincent <tobyv@tobyvin.dev>2024-09-04 22:48:22 -0500
commit13d8a7a9abeeeb4b2517caf3b97ac57aa9dd6d7a (patch)
tree4473bbe48e18f1f9bdca7af1d664c26f257f78a6
parentf3c44b81a59550f751bfffbd863e43d1dd42c961 (diff)
fix(dunst): fix fullscreen check
-rwxr-xr-xi3blocks/.local/lib/i3blocks/i3blocks-dunst11
1 files changed, 8 insertions, 3 deletions
diff --git a/i3blocks/.local/lib/i3blocks/i3blocks-dunst b/i3blocks/.local/lib/i3blocks/i3blocks-dunst
index a683adf..df3d9d4 100755
--- a/i3blocks/.local/lib/i3blocks/i3blocks-dunst
+++ b/i3blocks/.local/lib/i3blocks/i3blocks-dunst
@@ -4,6 +4,7 @@ import asyncio
import os
import sys
import json
+import pprint
from dbus_next.aio import MessageBus
import i3ipc
@@ -47,10 +48,14 @@ class Dunst:
return self
async def handle_i3_event(self, conn, e):
- if e.container is None or e.change == "close":
- await self.dunst.call_rule_enable("transient_skip", 0)
+ if e.change == "close":
+ enable = 0
+ elif isinstance(e, i3ipc.WorkspaceEvent):
+ enable = e.current.fullscreen_mode
else:
- await self.dunst.call_rule_enable("transient_skip", e.container.fullscreen_mode)
+ enable = e.container.fullscreen_mode
+
+ await self.dunst.call_rule_enable("transient_skip", enable)
def print_status(self):