Ejemplo n.º 1
0
    "",
    "",
    "",
    "",
]
# group_labels = ["", "", "", "", "",]

group_layouts = [
    "tile", "tile", "tile", "tile", "tile", "tile", "tile", "tile", "tile"
]

for i in range(len(group_names)):
    groups.append(
        Group(
            name=group_names[i],
            layout=group_layouts[i].lower(),
            label=group_labels[i],
        ))

for i in groups:
    keys.extend([
        # CHANGE WORKSPACES
        Key([mod], i.name, lazy.group[i.name].toscreen()),
        Key([mod], "Tab", lazy.screen.next_group()),
        Key(["mod1"], "Tab", lazy.screen.next_group()),
        Key(["mod1", "shift"], "Tab", lazy.screen.prev_group()),
        # MOVE WINDOW TO SELECTED WORKSPACE 1-10 AND STAY ON WORKSPACE
        Key([mod, "shift"], i.name, lazy.window.togroup(i.name)),
    ])
    # }}}
# LAYOUTS {{{
Ejemplo n.º 2
0
    # multiple stack panes
    Key([mod, "shift"], "Return", lazy.layout.toggle_split(),
        desc="Toggle between split and unsplit sides of stack"),
    Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),

    # Toggle between different layouts as defined below
    Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
    Key([mod], "w", lazy.window.kill(), desc="Kill focused window"),

    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"),
]

groups = [Group(i) for i in "123456789"]

for i in groups:
    keys.extend([
        # mod1 + letter of group = switch to group
        Key([mod], 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([mod, "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)),
    ])
Ejemplo n.º 3
0
        [mod],
        "d",
        # lazy.spawn('dmenu_run -b -i -fn "Iosevka Nerd Font" -p "Select File: " -nb "#282a36" -nf "#f8f8f2" -sf "#44475a" -sb "#bd93f9"'),
        lazy.spawn('rofi -show drun'),
        desc="Running Old School Dmenu"),
    Key(
        [mod, "shift"],
        "s",
        # lazy.spawn('dmenu_run -b -i -fn "Iosevka Nerd Font" -p "Select File: " -nb "#282a36" -nf "#f8f8f2" -sf "#44475a" -sb "#bd93f9"'),
        lazy.spawn('flameshot full --path /home/vivekascoder/Pictures'),
        desc="Taking screenshot of full monitor")
]

# groups = [Group(i) for i in "123456789"]
groups = [
    Group(i) for i in [
        "   ",
        "   ",
        "   ",
        "   ",
        "   ",
        "   ",
        "   ",
        "   ",
        "   ",
    ]
]

# for i in groups:
#     keys.extend([
#         # mod1 + letter of group = switch to group
Ejemplo n.º 4
0
        spawn=["my-program", "my-other-program"],
        # Layout to use (must be in the listed layouts)
        layout="MonadTall",
        # Should this group exist even when there are no windows?
        persist=True,
        # Create this group when qtile starts?
        init=True
    )
'''
from libqtile.config import Group, ScratchPad, DropDown


# Named Groups copied from i3
# >>> See https://fontawesome.com/cheatsheet for more fontawesome icons
groups = [
    Group("1 "),
    Group("2 "),
    Group("3 "),
    Group("4 "),
    Group("5 "),
    Group("6 "),
    Group("7 "),
    Group("8 λ"),
    Group("9 "),
    Group("10 "),
    # Group("scratchpad"),
    # Scratchpads on M-/ and M-S-/
    ScratchPad("scratchpad", [
        # NOTE :: Need to force spawning as a new process so that
        #         qtile can capture the new terminal by pid.
        DropDown("term", "tilix --new-process",
Ejemplo n.º 5
0
    Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"),
    Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
    Key([mod], "q", lazy.window.kill(), desc="Kill focused window"),
    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"),
    Key([mod],
        "b",
        lazy.layout.toggle_split(),
        desc="Toggle between split and unsplit sides of stack"),
]

groups = [Group(i) for i in "234780"]
groups_short = "weruip"

#  def to_group_screen(group):
#  def callback(qtile):
#  if group.name == "0":
#  qtile.cmd_to_screen(1)
#  qtile.current_screen.toggle_group(group.name)

#  windows = windows_matching_shuffle(qtile, **kwargs)
#  if windows:
#  window = windows[0]
#  if window.group != qtile.current_group:
#  if window.group.screen:
#  qtile.cmd_to_screen(window.group.screen.index)
#  qtile.current_screen.set_group(window.group)
Ejemplo n.º 6
0
			desc='increases volume'
			),
]

##### GROUPS #####
group_names = [("", {'layout': 'bsp'}),
               ("", {'layout': 'monadtall'}),
               ("", {'layout': 'max'}),
               ("", {'layout': 'monadtall'}),
               ("", {'layout': 'floating'}),
               ("", {'layout': 'floating'}),
               ("", {'layout': 'max'}),
               ("", {'layout': 'floating'}),
               ("", {'layout': 'floating'})]

groups = [Group(name, **kwargs) for name, kwargs in group_names]

for i, (name, kwargs) in enumerate(group_names, 1):
    keys.append(Key([mod], str(i), lazy.group[name].toscreen()))        # Switch to another group
    keys.append(Key([mod, "shift"], str(i), lazy.window.togroup(name))) # Send current window to another group	

##### DEFAULT THEME SETTINGS FOR LAYOUTS #####
layout_theme = {"border_width": 2,
                "margin": 4,
                "border_focus": "cd1f3f",
                "border_normal": "000000"
                }

##### THE LAYOUTS #####
layouts = [
    layout.MonadWide(**layout_theme),
Ejemplo n.º 7
0
    Key([], 'XF86AudioRaiseVolume', lazy.spawn('amixer -q set Master 5%+')),
    Key([], 'XF86AudioLowerVolume', lazy.spawn('amixer -q set Master 5%-')),
    Key([], 'XF86AudioMute', lazy.spawn('amixer -q set Master toggle')),

    # brighness controls
    Key([], 'XF86MonBrightnessUp', lazy.spawn('xbacklight -inc 10')),
    Key([], 'XF86MonBrightnessDown', lazy.spawn('xbacklight -dec 10')),
]

groups = []

group_names = [i for i in '1234567']
group_labels = ['', '', '', '', '', '', '']
for i in range(len(group_names)):
    groups.append(
        Group(name=group_names[i], layout="monadtall", label=group_labels[i]))

for i in groups:
    keys.extend([
        # mod1 + letter of group = switch to group
        Key([mod], i.name, lazy.group[i.name].toscreen()),

        # mod1 + shift + letter of group = switch to & move focused window to group
        Key([mod, "shift"], i.name, lazy.window.togroup(i.name)),
    ])

layouts = [
    layout.MonadTall(),
]

widget_defaults = dict(
Ejemplo n.º 8
0
COLOR13 = theme["colors"]["color13"]
COLOR14 = theme["colors"]["color14"]
COLOR15 = theme["colors"]["color15"]

ACCENT_COLOR = COLOR4
ACCENT_COLOR2 = COLOR2

mod = "mod4"
alt = "mod1"
TERMINAL = "termite"

webex_share = re.compile("dukemed.webex.com is sharing*")

# groups = [Group(i) for i in "123456"]
groups = [
    Group("1"),
    Group("2"),
    Group("3"),
    Group("4",
          matches=[
              Match(wm_class=["Slack"]),
              Match(wm_class=["Microsoft Teams - Preview"]),
              Match(wm_class=["Pidgin"])
          ]
          ),
    Group("5"),
    Group("6",
          matches=[
              Match(wm_class=["Wfica"]),
              Match(wm_class=["Xephyr"]),
              Match(title=[webex_share])
Ejemplo n.º 9
0
def gen_groups():
    back = Group("back", [Match(title=["Transmission"])])
    persist = [Group(str(i), init=False, persist=True) for i in range(1, 11)]
    return [back] + persist
Ejemplo n.º 10
0
        "k",
        lazy.layout.shuffle_up(),
        desc="Move window up"),
    Key([super_key], "Return", lazy.spawn(terminal), desc="Launch terminal"),
    Key([super_key], "z", lazy.spawn("rofi -show run"),
        desc="Open Rofis Menu"),
    Key([alt_key], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
    Key([alt_key], "w", lazy.window.kill(), desc="Kill focused window"),
    Key([alt_key], "f", lazy.spawn("firefox"), desc="Open Firefox"),
    Key([alt_key], "c", lazy.spawn("code"), desc="Open Visual Studio Code"),
    Key([alt_key], "s", lazy.spawn("scrot"), desc="Make a Screenshot"),
    Key([super_key, "control"], "r", lazy.restart(), desc="Restart Qtile"),
    Key([super_key, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile")
]

groups = [Group(i) for i in ["", "", "", "", "爵", ""]]
for i, j in enumerate(groups):
    actual_key = str(i + 1)
    keys.extend([
        Key([alt_key], actual_key, lazy.group[j.name].toscreen()),
        Key([alt_key, "shift"], actual_key, lazy.window.togroup(j.name)),
    ])

layouts = [layout.Max(), layout.MonadTall()]

widget_defaults = dict(font='UbuntuMono Nerd Font Bold',
                       fontsize=14,
                       padding=3)
extension_defaults = widget_defaults.copy()

screens = [
Ejemplo n.º 11
0
    Key([MOD, "shift"], "r", lazy.restart()),
    Key([MOD, "control"], "q", lazy.shutdown()),

    # Layouts movement
    Key([MOD], "Tab", lazy.next_layout()),
    Key([MOD, "shift"], "Tab", lazy.prev_layout()),

    # Apps launching
    Key([MOD], "Return", lazy.spawn(TERMINAL)),
    Key([MOD], "d", lazy.spawn(APP_LAUNCHER)),
    Key([MOD], "w", lazy.spawn(BROWSER)),
    Key([MOD], "m", lazy.spawn(MUSIC_PLAYER)),
]

# Groups
groups = [Group(name) for name in GROUPS]
for idx, name in enumerate(GROUPS, start=1):
    keys.extend([
        Key([MOD], str(idx), lazy.group[name].toscreen()),
        Key([MOD, "shift"], str(idx), lazy.window.togroup(name)),
    ])

# Layouts
layouts = [
    layout.MonadTall(margin=GAPS),  # Main on the left and rest on the right
    layout.MonadWide(margin=GAPS),  # Main on the top and rest on the bottom
    layout.Max(),
]

widget_defaults = dict(
    font='sans',
Ejemplo n.º 12
0
    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())
]

# Next, we specify group names, and use the group name list to generate an appropriate
# set of bindings for group switching.
groups = []
for i in ["a", "s", "d", "f", "u", "i", "o", "p"]:
    groups.append(Group(i))
    # add some more key bindigns
    # go to a specific screen
    keys.append(Key([mod], i, lazy.group[i].toscreen()))
    # take the current window to a specific screen
    keys.append(Key(["control", "mod1"], i, lazy.window.togroup(i)))

# layout instances
# I've not included 'Tile' and 'RatioTile',
# they didn't appeal to me much.
layouts = [
    layout.Max(),
    #layout.Stack(stacks=2, border_width=1),
    layout.xmonad.MonadTall(ratio=0.50),

    # splits screen into equal parts
Ejemplo n.º 13
0
    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"),

    #Zoom into current pane
    Key([mod], "z", lazy.window.toggle_fullscreen(), desc="Toggle in and out of current pane"),

    #Runs dmenu with mod key
    #Key([mod], lazy.(), desc="Toggle in and out of current pane"),


]

#groups = [Group(i) for i in "asdfuiop"]
groups = [Group(i) for i in "123456"]

for i in groups:
    keys.extend([
        # mod1 + letter of group = switch to group
        Key([mod], 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([mod, "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)),
    ])
Ejemplo n.º 14
0

def main(qtile):
    for start_app in startup_apps:
        start_app()


@hook.subscribe.client_new
def dialogs(window):
    if (window.window.get_wm_type() == 'dialog'
            or window.window.get_wm_transient_for()):
        window.floating = True


groups = [
    Group("1"),
    Group("2"),
    Group("3"),
    Group("4"),
    Group("5"),
    Group("6"),
    Group("7"),
    Group("8")
]

dgroups_key_binder = None
dgroups_app_rules = []

layouts = [
    layout.MonadTall(border_width=1, border_focus="#dddddd"),
    layout.Max()
Ejemplo n.º 15
0
from libqtile.lazy import lazy
from libqtile.config import Group, Key
from keys import keys
mod = 'mod3'
alt = 'mod4'

groups = [Group(i) for i in "asdfhjkl"]

for i in groups:
    keys.extend([
        Key([mod], i.name, lazy.group[i.name].toscreen(),
          desc="Switch to group {}".format(i.name)),
        Key([alt], i.name, lazy.window.togroup(i.name),
          desc="move focused window to group {}".format(i.name)),
    ])
Ejemplo n.º 16
0
colors = []
cache = "/home/treverhibbs/.cache/wal/colors"


def load_colors(cache):
    with open(cache, "r") as file:
        for _ in range(15):
            colors.append(file.readline().strip())
    lazy.reload()


load_colors(cache)

group_names = ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
groups = [Group(i) for i in group_names]

groups.append(
    ScratchPad(
        "scratchpad",
        [
            # define a drop down terminal.
            # it is placed in the upper third of screen by default.
            DropDown("term", "kitty", opacity=0.7)
        ]))
keys.extend([
    # Scratchpad
    # toggle visibiliy of above defined DropDown named "term"
    Key([mod], 'd', lazy.group['scratchpad'].dropdown_toggle('term')),
])
Ejemplo n.º 17
0
    Key([], "XF86AudioPlay", lazy.spawn("ncmpcpp pause")),
    Key([], "XF86AudioLowerVolume",
        lazy.spawn("amixer -c 0 sset Master 1- unmute")),
    Key([], "XF86AudioRaiseVolume",
        lazy.spawn("amixer -c 0 sset Master 1+ unmute"))
]

######################################################
#
#            LAYOUT GROUPS DEFINITIONS
#
######################################################

groups = [
    Group("DEV " + u"\u2713",
          matches=[Match(wm_class=["urxvt"]),
                   Match(wm_class=["PyCharm"])]),
    Group("MEDIA " + u"\u266B",
          matches=[
              Match(wm_class=["ncmpcpp"]),
              Match(wm_class=["mpv"]),
              Match(wm_class=["urxvt"])
          ]),
    Group("GRAPHICS " + u"\U0001F58C",
          matches=[
              Match(wm_class=["feh"]),
              Match(wm_class=["mupdf"]),
              Match(wm_class=[
                  "GNU Image \
                                                                Manipulation \
                                                                Program"
Ejemplo n.º 18
0
    ])],
    #Group 9
    None,
    #Group 0
    [Match(wm_class=[
        "discord",
    ])],
]

for i in range(len(group_names)):
    groups.append(
        Group(
            name=group_names[i],
            layout=group_layouts[i].lower(),
            label=group_labels[i],
            matches=group_matches[i],
            exclusive=group_exclusives[i],
            persist=group_persists[i],
            init=group_inits[i],
            ###spawn=group_spawns,
        ))

for i in groups:
    keys.extend([

        #CHANGE WORKSPACES
        Key([mod], i.name, lazy.group[i.name].toscreen()),
        Key([mod], "Tab", lazy.screen.next_group()),
        Key(["mod1"], "Tab", lazy.screen.next_group()),
        Key(["mod1", "shift"], "Tab", lazy.screen.prev_group()),

        # MOVE WINDOW TO SELECTED WORKSPACE 1-10 AND STAY ON WORKSPACE
Ejemplo n.º 19
0
from libqtile.command import lazy
from libqtile.config import Group, Key

# the 12 keys in the number row of the keyboard
_groupKeys = [str(key) for key in range(1, 9) + [0, '-', '+']]

# 24 groups for the above keys with and without control
groups = [Group(mod + key) for key in _groupKeys for mod in ['', '^']]

_mod = "mod4"

keys = [
    Key([_mod], "j", lazy.layout.up()),
    Key([_mod], "k", lazy.layout.down()),
    Key([_mod, "shift"], "j", lazy.layout.shuffle_up()),
    Key([_mod, "shift"], "k", lazy.layout.shuffle_down()),
    Key([_mod], "Space", lazy.layout.next()),
    Key([_mod], "Escape", lazy.restart()),
    Key([_mod, "shift"], "Escape", lazy.shutdown()),
] + [
    # generate key bindings for groups
    Key([_mod] + fmods + gmods, key, func) for fmods, func in [
        ([], lazy.group[group.name].toscreen()),
        (["shift"], lazy.window.togroup(group.name)),
    ] for group, (key, gmods) in zip(groups, [(key, mods) for key in _groupKeys
                                              for mods in [[], ['control']]])
]
Ejemplo n.º 20
0
    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),
    Key([mod], "r", lazy.spawncmd()),

    # Master things
    Key([mod, "shift"], "h", lazy.layout.swap_left()),
    Key([mod], "h", lazy.layout.left()),

    # Dmenu run
    Key([mod], "d",
        lazy.spawn(
            "dmenu_run -nb \"#333333\" -sb \"#8cf5ff\" -sf \"#333333\" -nf white -fn \"UbuntuMono-10\" -p \"Run: \" -h 20"
        ))
]

groups = [Group(i) for i in ["dev", "web", "mus", "gfx", "misc"]]

index = 1

for i in groups:
    keys.extend([
        # mod1 + letter of group = switch to group
        Key([mod], str(index), lazy.group[i.name].toscreen()),

        # mod1 + shift + letter of group = switch to & move focused window to group
        Key([mod, "shift"], str(index),
            lazy.window.togroup(i.name, switch_group=False)),
        # 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)),
    ])
Ejemplo n.º 21
0
@hook.subscribe.startup_once
def autostart():
    once = os.path.expanduser('~/.config/qtile/autostart_once.sh')
    subprocess.call([once])
    processes = [
            ['discord'],
            #['telegram-desktop'],
            ['bitwarden-bin'],
    ]
    for p in processes:
        subprocess.Popen(p)

# Group Config
#groups = [Group(i) for i in "1234567890"]
groups = [
        Group('1',screen_affinity=1),
        #Group('2', spawn='qutebrowser', matches=[Match(wm_class=['qutebrowser'])]),
        Group('2',screen_affinity=1),
        Group('3',screen_affinity=1),
        Group('4',screen_affinity=1),
        Group('5', layouts=[layout.Matrix(border_focus='#dddddd'),layout.Max()],screen_affinity=1),
        Group('6',screen_affinity=1),
        Group('7',screen_affinity=1),
        Group('8', matches=[Match(wm_class=['Bitwarden'])],screen_affinity=1),
        Group('9', matches=[Match(wm_class=['discord', 'TelegramDesktop'])],screen_affinity=2),
        Group('0', matches=[Match(title=['cmus'])],screen_affinity=1),
]
for i in groups:
    keys.extend([
        # mod1 + letter of group = switch to group
        Key([mod], i.name, lazy.group[i.name].toscreen()),
Ejemplo n.º 22
0
    Key([mod], "w", lazy.window.kill()),
    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),
    Key([mod], "r", lazy.spawncmd()),
    Key([], "Print", lazy.spawn(Commands.screenshot_selection)),
    # Sound
    Key([], "XF86MonBrightnessUp", lazy.spawn(Commands.brightness_up)),
    Key([], "XF86MonBrightnessDown", lazy.spawn(Commands.brightness_down)),
    Key([], "XF86AudioRaiseVolume", lazy.spawn(Commands.volume_up)),
    Key([], "XF86AudioLowerVolume", lazy.spawn(Commands.volume_down)),
    Key([], "XF86AudioMute", lazy.spawn(Commands.volume_down)),
    # suspend
    Key([mod, "control"], "s", lazy.spawn(Commands.suspend)),
]

groups = [Group(i) for i in "qsdfuiop"]

for i in groups:
    keys.extend([
        # mod1 + letter of group = switch to group
        Key([mod], i.name, lazy.group[i.name].toscreen()),
        # mod1 + shift + letter of group = switch to & move focused window to group
        Key([mod, "shift"], i.name,
            lazy.window.togroup(i.name, switch_group=True)),
    ])

layouts = [
    layout.Max(),
    # layout.Stack(num_stacks=2),
    # Try more layouts by unleashing below layouts.
    # layout.Bsp(),
Ejemplo n.º 23
0
        lazy.spawn(
            "pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -8%"
        )),
    Key([], "XF86AudioMute",
        lazy.spawn(
            "pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle"
        )),
    Key([], "XF86AudioMicMute",
        lazy.spawn("amixer -D pulse sset Capture toggle")),
    Key([], "XF86AudioPlay", lazy.spawn("playerctl play-pause")),
    Key([], "XF86AudioNext", lazy.spawn("playerctl next")),
    Key([], "XF86AudioPrev", lazy.spawn("playerctl previous")),
]

groups = [
    Group("1"),
    Group("2"),
    Group("3"),
    Group("4"),
    Group("5"),
    Group("6"),
    Group("7"),
    Group("8"),
    Group("9"),
    Group(
        "0",
        label="Chat",
        matches=[
            Match(wm_class="discord"),
            Match(wm_class="signal"),
        ],
Ejemplo n.º 24
0
# Nicolas Alvarez Garrido

# Quitle Workspaces

from libqtile.config import Key, Group
from libqtile.command import lazy
from settings.keys import mod, keys

# Icons from nerd fonts https://www.nerdfonts.com/cheat-sheet
# Icons:
# .
# .
# .

groups = [Group(i) for i in [" ", " ", " ", " ", " "]]
for i, group in enumerate(groups):
    actual_key = str(i + 1)
    keys.extend([
        # Switch to workspace N
        Key([mod], actual_key, lazy.group[group.name].toscreen()),
        # Send window to workspace N
        Key([mod, "shift"], actual_key, lazy.window.togroup(group.name))
    ])
Ejemplo n.º 25
0
from libqtile.config import Group, Key
from libqtile.lazy import lazy
from keyboard import keys

groups = [
    Group("1"),
    Group("2"),
    Group("3"),
    Group("4"),
    Group("5"),
    Group("6"),
    Group("7"),
    Group("8"),
    Group("9"),
    Group("p", matches=None, exclusive=False, spawn=['pcmanfm'], layout='max'),
    Group("c", matches=None, exclusive=False, spawn=['code'], layout='max'),
    Group("f",
          matches=None,
          exclusive=False,
          spawn=['firefox'],
          layout='max',
          layouts=None,
          persist=True,
          init=True,
          layout_opts=None,
          screen_affinity=None,
          position=9223372036854775807,
          label=None),
    Group("m",
          matches=None,
          exclusive=False,
Ejemplo n.º 26
0
 def init_groups(self):
     return [Group(name, **kwargs) for name, kwargs in group_names]
Ejemplo n.º 27
0
    Key([mod], "d", lazy.spawncmd()),
    Key([mod], "g", lazy.switchgroup()),

    # custom keybindings
    Key([], "XF86AudioRaiseVolume",
        lazy.spawn("amixer -c 0 -q set Master 2dB+")),
    Key([], "XF86AudioLowerVolume",
        lazy.spawn("amixer -c 0 -q set Master 2dB-")),
    Key([], "XF86AudioMute", lazy.spawn("amixer -c 0 -q set Master toggle")),
    Key([alt], "Cyrillic_u", lazy.spawn(language_switch('us'))),
    Key([alt], "Escape", lazy.spawn(language_switch('us'))),
    Key([alt], "r", lazy.spawn(language_switch('ru'))),
    Key([alt, "control"], "l", lazy.spawn(screen_lock())),
]

groups = [Group(str(i)) for i in range(1, 6)]

for i in groups:
    # mod1 + letter of group = switch to group
    keys.append(Key([mod], i.name, lazy.group[i.name].toscreen()))

    # mod1 + shift + letter of group = switch to & move focused window to group
    keys.append(Key([mod, "shift"], i.name, lazy.window.togroup(i.name)))

border = dict(
    border_normal='#808080',
    border_width=2,
)

layouts = [
    layout.MonadTall(**border),
Ejemplo n.º 28
0
group_labels = [
    "\uf120",  #1 - Terminal
    "\uf0ac",  #2 - Internet
    "\uf0e0",  #3 - Email
    "\uf07c",  #4 - File manager
    "\uf086",  #5 - Chat
    "\uf001",  #6 - Music
    "\uf03e",  #7 - Picture
    "\uf19c",  #8 - University
    "\uf1b2",  #9 - Cube
    "\uf005"  #0 - Star
]

for i in range(len(group_names)):
    groups.append(Group(
        name=group_names[i],
        label=group_labels[i],
    ))

for i in groups:
    keys.extend([
        Key([mod], i.name, lazy.group[i.name].toscreen()),
        Key([mod, sft], i.name, lazy.window.togroup(i.name,
                                                    switch_group=True)),
        Key([mod, ctrl], i.name, lazy.window.togroup(i.name,
                                                     switch_group=False)),
    ])


# Assign applications to a specific groupname
@hook.subscribe.client_new
def assign_app_group(client):
Ejemplo n.º 29
0
    # Function keys
    Key([], "XF86AudioMute", lazy.spawn("volctl toggle")),
    Key([], "XF86AudioRaiseVolume", lazy.spawn("volctl set +5")),
    Key([], "XF86AudioLowerVolume", lazy.spawn("volctl set -5")),
    Key([], "XF86AudioMicMute", lazy.spawn("amixer set Capture toggle")),
    Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl set 10%-")),
    Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl set +10%")),
]

##############################################################################

# GROUPS

group_names = ['WEB', 'DEV', 'FILES', 'MUSIC']
groups = [Group(name, layout='customstack') for name in group_names]

for g in groups:
    keys.extend([
        # Switch to group with 'mod + goup number'
        Key([mod], str(group_names.index(g.name) + 1),
            lazy.group[g.name].toscreen()),

        # Switch to and move focused window to group
        # with 'mod + shift + group number'
        Key([mod, "shift"], str(group_names.index(g.name) + 1),
            lazy.window.togroup(g.name, switch_group=True)),
        # 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"], str(group_names.index(g.name) + 1),
        #     lazy.window.togroup(g.name)),
Ejemplo n.º 30
0
    def __init__(self, name="", code=""):
        self.code = code

        Group.__init__(self, name)
Ejemplo n.º 31
0
        border_focus_stack=colors['color4'],
        grow_amount=6
    ),
    layout.Matrix(**layout_theme),
    ## Other layouts
    #layout.Tile(**layout_theme),
    #layout.Zoomy(),
    #layout.Stack(),
    #layout.TreeTab(),
    #layout.MonadWide( ),
    #layout.RatioTile(),
    #layout.VerticalTile(),
]

groups = [
    Group("1", position=1, layout="monadtall", matches=[Match(wm_class=['jetbrains-phpstorm'])]),
    Group("2", position=2, layout="max"),
    Group("3", position=3, layout="columns"),
    Group("4", position=4, layout="matrix"),
    Group("5", position=5, layout="monadtall"),
    Group("6", position=6, layout="monadtall"),
    Group("7", position=7, layout="monadtall"),
    Group("8", position=8, layout="monadtall", matches=[Match(wm_class=['discord'])]),
    Group("9", position=9, layout="columns"),
]

for i in groups:
    keys.extend([
        Key([mod], i.name, lazy.group[i.name].toscreen(),
            desc="Switch to group {}".format(i.name)),