Skip to content

Commit

Permalink
Add a scratchpad for discord
Browse files Browse the repository at this point in the history
  • Loading branch information
Sigmanificient committed Oct 21, 2023
1 parent f93e8e0 commit 51ff8ce
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
26 changes: 22 additions & 4 deletions home/qtile/src/core/groups.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from libqtile.config import DropDown, Group, Key, ScratchPad
import re

from libqtile.config import DropDown, Group, Key, ScratchPad, Match
from libqtile.lazy import lazy

from .keys import keys, mod
Expand All @@ -20,12 +22,17 @@ def setup_keys(self):
lazy.window.togroup(self.name, switch_group=True),
)

toggle_scratchpad = Key(
toggle_term = Key(
[mod, "shift"], "space",
lazy.group["scratchpad"].dropdown_toggle("term"),
)

keys.extend((move, switch, toggle_scratchpad))
toggle_discord = Key(
[mod, "shift"], "d",
lazy.group["scratchpad"].dropdown_toggle("discord"),
)

keys.extend((move, switch, toggle_term, toggle_discord))


_scratchpads = [
Expand All @@ -40,8 +47,19 @@ def setup_keys(self):
height=0.9,
width=0.9,
on_focus_lost_hide=False,
),
DropDown(
"discord",
"discord",
x=0.05,
y=0.05,
opacity=0.95,
height=0.9,
width=0.9,
on_focus_lost_hide=False,
match=Match(title=re.compile(".*(d|D)iscord.*"))
)
],
]
)
]

Expand Down
3 changes: 3 additions & 0 deletions home/qtile/src/core/layouts.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import re

from libqtile.layout.columns import Columns
from libqtile.layout.floating import Floating
from libqtile.config import Match
Expand Down Expand Up @@ -27,6 +29,7 @@
Match(title="branchdialog"), # gitk
Match(title="pinentry"), # GPG key password entry
Match(title="splash"), # .Idea loader
Match(title=re.compile(".*(d|D)iscord.*")), # Discord
Match(title="kitty"),
],
)

0 comments on commit 51ff8ce

Please sign in to comment.