Files
.dotfiles/qtile/.config/qtile/Groups.py
T
2021-03-25 11:08:22 +01:00

89 lines
3.0 KiB
Python

from libqtile.config import Group, ScratchPad, DropDown, Key
from libqtile.command import lazy
from defines import term
from Keys import keys
group_names = [("","Home", 'h',{'layout': 'monadtall'}),
("","Coding", 'c',{'layout': 'monadtall'}),
("","Browser", 'f',{'layout': 'monadtall'}),
("","Mail", 'm',{'layout': 'monadtall'}),
("","Music", 's',{'layout': 'monadtall'}),
("","Video", 'v',{'layout': 'monadtall'}),
("","Documents", 'l',{'layout': 'monadtall'}),
("","Discord", 'd',{'layout': 'monadtall'}),
("","VM's", 'o',{'layout': 'monadtall'}),
("","Gaming", 'g',{'layout': 'monadtall'})]
groups = [Group(icon, **kwargs) for icon, name, key, kwargs in group_names]
groups.append(
ScratchPad("scratchpad",[
DropDown(
"term",
term,
),
DropDown(
"htop",
term + ' -e htop',
),
DropDown(
'sound',
'pavucontrol'
),
DropDown(
'filemanager',
'pcmanfm',
on_focus_lost_hide=False
),
DropDown(
'bitwarden',
'bitwarden',
on_focus_lost_hide=False,
),
DropDown(
'WhatsApp',
'whatsapp-for-linux',
height = 0.5,
width = 0.5,
x = .25,
on_focus_lost_hide=False,
opacity=1
),
DropDown(
'Signal',
'signal-desktop',
height = 0.5,
width = 0.5,
x = .25,
on_focus_lost_hide=False,
opacity = 1
),
])
)
for (icon,name,key, kwargs) in group_names:
keys.extend([
Key(["mod1","control"], str(key), lazy.group[icon].toscreen(),
desc="Switch to group {}".format(name)),
Key(['mod1','control', "shift"], str(key), lazy.window.togroup(icon),
desc="move focused window to group {}".format(name)),
])
keys.extend([
Key(['mod1','control'],'space',lazy.group['scratchpad'].dropdown_toggle('term'),
desc="open the dropdown terminal"),
Key(['control','shift'],'Escape',lazy.group['scratchpad'].dropdown_toggle('htop'),
desc="open the dropdown terminal"),
Key(['mod1','control'],'a',lazy.group['scratchpad'].dropdown_toggle('sound'),
desc="open the dropdown pavucontrol"),
Key(['mod1','control'],'e',lazy.group['scratchpad'].dropdown_toggle('filemanager'),
desc="open the dropdown filemanager"),
Key(['mod1','control'],'b',lazy.group['scratchpad'].dropdown_toggle('bitwarden'),
desc="open the dropdown password manager KeePassXC"),
Key(['mod1','control'],'w',lazy.group['scratchpad'].dropdown_toggle('WhatsApp'),
desc="open the dropdown for WhatsApp"),
Key(['mod1','control'],'i',lazy.group['scratchpad'].dropdown_toggle('Signal'),
desc="open the dropdown for Signal"),
])