Commit 7a24c36ceb01f77d1700e967fd0b8122823ff30e Parent: 66477417049cf9838e1760b9e39e313f4890a279 Author: mcol <mcol@posteo.net> Date: 2021-06-29 01:53:47 +0100 Committer: mcol <mcol@posteo.net> Committed: 2021-06-29 01:53:47 +0100 Update notification options
config.py Modified
@@ -495,55 +495,38 @@ ] -# Config variables -reconfigure_screens = True -follow_mouse_focus = True -bring_front_click = True -cursor_warp = False -auto_fullscreen = True -focus_on_window_activation = 'smart' -keys = [Key(mods, key, cmd, desc=desc) for mods, key, cmd, desc in my_keys] -groups.append(scratchpad) - - # Notification server reload("notification") import notification -notification.Server( - background='#888888', - foreground='#00ffff', +# Remove defunct callbacks left when reloading the config +import libqtile.notify +libqtile.notify.notifier.callbacks.clear() + +notifier = notification.Server( + background=colours[12], + foreground=background, x=50, y=50, width=320, height=100, - border='#dddddd', - border_width=8, - font_size=16, - max_windows=1, + font_size=18, + font='TamzenForPowerline Bold', ) -keys.extend([EzKey(k, v) for k, v in { - 'M-<grave>': notifier.lazy_prev, - 'M-S-<grave>': notifier.lazy_next, - 'C-<space>': notifier.lazy_close, -}.items()]) - - - - -from libqtile.popup import Popup -p = Popup(qtile, background='#33ff33', foreground='#ff33ff') -p.text = "hello" - -from libqtile.log_utils import logger +my_keys.extend([ + ([mod], 'grave', notifier.lazy_prev, "Previous notification"), + ([mod, 'shift'], 'grave', notifier.lazy_next, "Next notification"), + (['control'], 'space', notifier.lazy_close, "Close notification"), +]) -def func(*a): - if p.win.mapped: - p.hide() - else: - p.unhide() - p.draw_text() - p.draw() -keys.append(Key([mod], 't', lazy.function(func))) +# Config variables +reconfigure_screens = True +follow_mouse_focus = True +bring_front_click = True +cursor_warp = False +auto_fullscreen = True +focus_on_window_activation = 'smart' +keys = [Key(mods, key, cmd, desc=desc) for mods, key, cmd, desc in my_keys] +groups.append(scratchpad)