Some good empty last line of files and add steam to hook
This commit is contained in:
parent
1c2647ec45
commit
d6d2323b0f
8 changed files with 7 additions and 120 deletions
|
@ -23,3 +23,4 @@ cursor_warp = False
|
|||
auto_fullscreen = True
|
||||
focus_on_window_activation = "smart"
|
||||
wmname = "LG3D"
|
||||
|
||||
|
|
|
@ -13,3 +13,4 @@ for i in [["F1", "\N{globe with meridians}"], ["F2", "\N{incoming envelope}"], [
|
|||
Key([mod], i[0], lazy.group[i[1]].toscreen()),
|
||||
Key([mod, "shift"], i[0], lazy.window.togroup(i[1], switch_group=True))
|
||||
])
|
||||
|
||||
|
|
|
@ -13,10 +13,11 @@ def auto_group(c):
|
|||
c.togroup("\N{floppy disk}")
|
||||
elif c.name == "docs":
|
||||
c.togroup("\N{bookmark tabs}")
|
||||
elif c.name in ["Lutris", "Shadow"]:
|
||||
elif c.name in ["Lutris", "Shadow", "Steam"]:
|
||||
c.togroup("\N{video game}")
|
||||
|
||||
|
||||
@hook.subscribe.screen_change
|
||||
def restart_on_randr(qtile, ev):
|
||||
qtile.cmd_restart()
|
||||
|
||||
|
|
|
@ -125,3 +125,4 @@ mouse = [
|
|||
Drag([mod], "Button3", lazy.window.set_size_floating(), start=lazy.window.get_size()),
|
||||
Click([mod], "Button2", lazy.window.toggle_floating()),
|
||||
]
|
||||
|
||||
|
|
|
@ -35,3 +35,4 @@ floating_layout = layout.Floating(float_rules=[
|
|||
{"wname": "win0"},
|
||||
{"wmclass": "ssh-askpass"}, # ssh-askpass
|
||||
])
|
||||
|
||||
|
|
|
@ -43,3 +43,4 @@ def main(q):
|
|||
24,
|
||||
)
|
||||
))
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ pulseaudio -D
|
|||
|
||||
|
||||
feh --bg-fill ~/Nextcloud/Images/Furry/Commis/Kat-LUK.J_/poster_etha.png
|
||||
xbrightness 0.5
|
||||
|
||||
|
||||
# Fix touchscreen
|
||||
|
|
|
@ -1,118 +0,0 @@
|
|||
from . import base
|
||||
from .. import bar, utils, pangocffi
|
||||
from libqtile.notify import notifier
|
||||
from os import path
|
||||
|
||||
|
||||
class Notify(base._TextBox):
|
||||
"""A notify widget"""
|
||||
orientations = base.ORIENTATION_HORIZONTAL
|
||||
defaults = [
|
||||
("foreground_urgent", "ff0000", "Foreground urgent priority colour"),
|
||||
("foreground_low", "dddddd", "Foreground low priority colour"),
|
||||
(
|
||||
"default_timeout",
|
||||
None,
|
||||
"Default timeout (seconds) for notifications"
|
||||
),
|
||||
("audiofile", None, "Audiofile played during notifications"),
|
||||
]
|
||||
|
||||
def __init__(self, width=bar.CALCULATED, **config):
|
||||
base._TextBox.__init__(self, "", width, **config)
|
||||
self.add_defaults(Notify.defaults)
|
||||
notifier.register(self.update)
|
||||
self.current_id = 0
|
||||
|
||||
def _configure(self, qtile, bar):
|
||||
base._TextBox._configure(self, qtile, bar)
|
||||
self.layout = self.drawer.textlayout(
|
||||
self.text,
|
||||
self.foreground,
|
||||
self.font,
|
||||
self.fontsize,
|
||||
self.fontshadow,
|
||||
markup=True
|
||||
)
|
||||
|
||||
def set_notif_text(self, notif):
|
||||
self.text = pangocffi.markup_escape_text(notif.summary)
|
||||
urgency = notif.hints.get('urgency', 1)
|
||||
if urgency != 1:
|
||||
self.text = '<span color="%s">%s</span>' % (
|
||||
utils.hex(
|
||||
self.foreground_urgent if urgency == 2
|
||||
else self.foreground_low
|
||||
),
|
||||
self.text
|
||||
)
|
||||
if notif.body:
|
||||
self.text = '<span weight="bold">%s</span> - %s' % (
|
||||
self.text, pangocffi.markup_escape_text(notif.body)
|
||||
)
|
||||
if self.audiofile and path.exists(self.audiofile):
|
||||
self.qtile.cmd_spawn("aplay -q '%s'" % self.audiofile)
|
||||
|
||||
def update(self, notif):
|
||||
self.qtile.call_soon_threadsafe(self.real_update, notif)
|
||||
|
||||
def real_update(self, notif):
|
||||
self.set_notif_text(notif)
|
||||
self.current_id = notif.id - 1
|
||||
if notif.timeout and notif.timeout > 0:
|
||||
self.timeout_add(notif.timeout / 1000, self.clear)
|
||||
elif self.default_timeout:
|
||||
self.timeout_add(self.default_timeout, self.clear)
|
||||
self.bar.draw()
|
||||
return True
|
||||
|
||||
def display(self):
|
||||
self.set_notif_text(notifier.notifications[self.current_id])
|
||||
self.bar.draw()
|
||||
|
||||
def clear(self):
|
||||
self.text = ''
|
||||
self.current_id = len(notifier.notifications) - 1
|
||||
self.bar.draw()
|
||||
|
||||
def prev(self):
|
||||
if self.current_id > 0:
|
||||
self.current_id -= 1
|
||||
self.display()
|
||||
|
||||
def next(self):
|
||||
if self.current_id < len(notifier.notifications) - 1:
|
||||
self.current_id += 1
|
||||
self.display()
|
||||
|
||||
def button_press(self, x, y, button):
|
||||
if button == 1:
|
||||
self.clear()
|
||||
elif button == 4:
|
||||
self.prev()
|
||||
elif button == 5:
|
||||
self.next()
|
||||
|
||||
def cmd_display(self):
|
||||
"""Display the notifcication"""
|
||||
self.display()
|
||||
|
||||
def cmd_clear(self):
|
||||
"""Clear the notification"""
|
||||
self.clear()
|
||||
|
||||
def cmd_toggle(self):
|
||||
"""Toggle showing/clearing the notification"""
|
||||
if self.text == '':
|
||||
self.display()
|
||||
else:
|
||||
self.clear()
|
||||
|
||||
def cmd_prev(self):
|
||||
"""Show previous notification"""
|
||||
self.prev()
|
||||
|
||||
def cmd_next(self):
|
||||
"""Show next notification"""
|
||||
self.next()
|
||||
|
Reference in a new issue