restructured qtile configs and added gitignore
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
#!/usr/bin/env python
|
||||
# coding = utf-8
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from libqtile.config import Key, Drag, Click
|
||||
from libqtile.command import lazy
|
||||
|
||||
from groups import groups
|
||||
from defines import mod, term
|
||||
|
||||
keys = [
|
||||
# moving windows around
|
||||
Key([mod], "h", lazy.layout.left()),
|
||||
Key([mod], "l", lazy.layout.right()),
|
||||
Key([mod], "j", lazy.layout.down()),
|
||||
Key([mod], "k", lazy.layout.up()),
|
||||
Key([mod, "shift"], "h", lazy.layout.swap_left()),
|
||||
Key([mod, "shift"], "l", lazy.layout.swap_right()),
|
||||
Key([mod, "shift"], "j", lazy.layout.shuffle_down()),
|
||||
Key([mod, "shift"], "k", lazy.layout.shuffle_up()),
|
||||
|
||||
# resize windows
|
||||
Key([mod], "plus", lazy.layout.grow()),
|
||||
Key([mod], "minus", lazy.layout.shrink()),
|
||||
Key([mod], "n", lazy.layout.normalize()),
|
||||
Key([mod], "o", lazy.layout.maximize()),
|
||||
Key([mod], "space", lazy.window.toggle_fullscreen()),
|
||||
|
||||
# app hotkeys
|
||||
Key([mod], "Return", lazy.spawn(term), desc="Launch terminal"),
|
||||
Key([mod],"f", lazy.spawn("firefox"),desc="Launch firefox"),
|
||||
Key([mod],"e", lazy.spawn("pcmanfm"),desc="Launch pcmanfm"),
|
||||
Key([mod],"c", lazy.spawn("code"),desc="Launch visual studio code"),
|
||||
|
||||
# Toggle between different layouts as defined below
|
||||
Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
|
||||
Key([mod], "BackSpace", lazy.window.kill(), desc="Kill focused window"),
|
||||
|
||||
# qtile hotkeys
|
||||
Key([mod, "control"], "r", lazy.restart(), desc="Restart qtile"),
|
||||
Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown qtile"),
|
||||
Key([mod], "r", lazy.spawncmd(),desc="Spawn a command using a prompt widget"),
|
||||
|
||||
# Media hotkeys
|
||||
Key([], 'XF86AudioRaiseVolume', lazy.spawn('pulseaudio-ctl up 1')),
|
||||
Key([], 'XF86AudioLowerVolume', lazy.spawn('pulseaudio-ctl down 1')),
|
||||
Key([], 'XF86AudioMute', lazy.spawn('pulseaudio-ctl mute')),
|
||||
]
|
||||
|
||||
|
||||
# Drag floating layouts.
|
||||
mouse = [
|
||||
Drag([mod], "Button1", lazy.window.set_position_floating(),
|
||||
start=lazy.window.get_position()),
|
||||
Drag([mod], "Button3", lazy.window.set_size_floating(),
|
||||
start=lazy.window.get_size()),
|
||||
Click([mod], "Button2", lazy.window.bring_to_front())
|
||||
]
|
||||
|
||||
for i in groups:
|
||||
keys.extend([
|
||||
# mod1 + letter of group = switch to group
|
||||
Key(["mod1","control"], i.name, lazy.group[i.name].toscreen(),
|
||||
desc="Switch to group {}".format(i.name)),
|
||||
|
||||
# mod1 + shift + letter of group = switch to & move focused window to group
|
||||
Key(["mod1","control", "shift"], i.name, lazy.window.togroup(i.name, switch_group=True),
|
||||
desc="Switch to & move focused window to group {}".format(i.name)),
|
||||
# Or, use below if you prefer not to switch to that group.
|
||||
# # mod1 + shift + letter of group = move focused window to group
|
||||
# Key([mod, "shift"], i.name, lazy.window.togroup(i.name),
|
||||
# desc="move focused window to group {}".format(i.name)),
|
||||
])
|
||||
Reference in New Issue
Block a user