diff options
-rw-r--r-- | dunst/.config/dunst/dunstrc | 83 | ||||
-rwxr-xr-x | i3blocks/.local/lib/i3blocks/i3blocks-dunst | 21 | ||||
-rw-r--r-- | sway/.config/sway/config | 2 | ||||
-rwxr-xr-x | sway/.local/bin/wmenu | 14 |
4 files changed, 88 insertions, 32 deletions
diff --git a/dunst/.config/dunst/dunstrc b/dunst/.config/dunst/dunstrc index a805462..7615328 100644 --- a/dunst/.config/dunst/dunstrc +++ b/dunst/.config/dunst/dunstrc @@ -1,33 +1,54 @@ +# vim:ft=cfg ts=4 + [global] - follow = mouse - width = (0,300) - height = 300 - offset = 10x10 - notification_limit = 20 + background = "#282828" + foreground = "#ebdbb2" + highlight = "#ebdbb2" + follow = mouse + width = (0,300) + height = 143 + offset = 10x10 + notification_limit = 10 + indicate_hidden = true frame_color = "#fe8019" - frame_width = 2 - idle_threshold = 120 - font = sans-serif 12 - markup = full - min_icon_size = 16 - icon_theme = gruvbox-dark-icons-gtk, Adwaita, hicolor - enable_recursive_icon_lookup = true - dmenu = "/usr/bin/wmenu -i -f 'monospace 12' -nebdbb2 -N282828 -S282828 -sfe8019 -mebdbb2 -M8ec07c" - mouse_left_click = do_action, close_current - mouse_middle_click = context, close_current - mouse_right_click = close_current - -[urgency_low] - background = "#282828" - foreground = "#ebdbb2" - timeout = 5 - -[urgency_normal] - background = "#282828" - foreground = "#ebdbb2" - timeout = 20 - -[urgency_critical] - background = "#282828" - foreground = "#ebdbb2" - timeout = 0 + frame_width = 2 + idle_threshold = 5m + font = sans-serif 12 + markup = full + min_icon_size = 16 + icon_theme = gruvbox-dark-icons-gtk, Adwaita, hicolor + enable_recursive_icon_lookup = true + dmenu = ~/.local/bin/wmenu + mouse_left_click = do_action,close_current + mouse_middle_click = context,close_current + mouse_right_click = close_current + +[spotify] + appname = Spotify + msg_urgency = low + set_transient = true + +[low] + msg_urgency = low + frame_color = "#a89984" + timeout = 5 + +[critical] + msg_urgency = critical + frame_color = "#fb4934" + timeout = 0 + +[transient] + match_transient = true + history_ignore = true + +[transient_skip] + enabled = false + format = "" + +[fullscreen] + fullscreen = delay + +[fullscreen_critical] + msg_urgency = critical + fullscreen = show diff --git a/i3blocks/.local/lib/i3blocks/i3blocks-dunst b/i3blocks/.local/lib/i3blocks/i3blocks-dunst index c2b07db..a683adf 100755 --- a/i3blocks/.local/lib/i3blocks/i3blocks-dunst +++ b/i3blocks/.local/lib/i3blocks/i3blocks-dunst @@ -6,12 +6,20 @@ import sys import json from dbus_next.aio import MessageBus +import i3ipc +from i3ipc.aio import Connection BUS_NAME = "org.freedesktop.Notifications" OBJECT_PATH = "/org/freedesktop/Notifications" DUNST_INTERFACE = "org.dunstproject.cmd0" PROPERTIES_INTERFACE = "org.freedesktop.DBus.Properties" +I3_EVENTS = [ + i3ipc.Event.WINDOW_FOCUS, + i3ipc.Event.WINDOW_FULLSCREEN_MODE, + i3ipc.Event.WINDOW_CLOSE, + i3ipc.Event.WORKSPACE_FOCUS, +] class Dunst: @@ -31,8 +39,20 @@ class Dunst: self.displayed = await self.dunst.get_displayed_length() self.waiting = await self.dunst.get_waiting_length() + self.i3 = await Connection().connect() + + for event in I3_EVENTS: + self.i3.on(event, self.handle_i3_event) + 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) + else: + await self.dunst.call_rule_enable("transient_skip", e.container.fullscreen_mode) + + def print_status(self): if self.paused: icon = "\U000f009b" # @@ -110,6 +130,7 @@ async def main(): try: async with asyncio.TaskGroup() as task_group: + task_group.create_task(dunst.i3.main()) task_group.create_task(dunst.listener()) task_group.create_task(dunst.button_handler()) except asyncio.CancelledError: diff --git a/sway/.config/sway/config b/sway/.config/sway/config index cdc9eb5..334e270 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -38,7 +38,7 @@ set $base0F #d65d0e include ~/.config/sway/config.d/* -set $menu wmenu -i -f'monospace 12' -n$base06 -N$base00 -S$base00 -s$base09 -m$base06 -M$base0C +set $menu ~/.local/bin/wmenu set $j4_sock $XDG_RUNTIME_DIR/j4-dmenu-desktop.sock diff --git a/sway/.local/bin/wmenu b/sway/.local/bin/wmenu new file mode 100755 index 0000000..75f9ce9 --- /dev/null +++ b/sway/.local/bin/wmenu @@ -0,0 +1,14 @@ +#!/bin/sh + +base00=${BASE16_COLOR_00_HEX#\#} +base06=${BASE16_COLOR_06_HEX#\#} +base09=${BASE16_COLOR_09_HEX#\#} +base0C=${BASE16_COLOR_0C_HEX#\#} + +base00=${base00:-1d2021} +base06=${base06:-ebdbb2} +base09=${base09:-fe8019} +base0C=${base0C:-8ec07c} + +exec /usr/bin/wmenu -i -f'monospace 12' -n"$base06" -N"$base00" -S"$base00" \ + -s"$base09" -m"$base06" -M"$base0C" "$@" |