Skip to content

Instantly share code, notes, and snippets.

View m-col's full-sized avatar
🐢

Matt Colligan m-col

🐢
View GitHub Profile
@m-col
m-col / position_floats.py
Created April 27, 2022 10:14
Qtile: Make matching windows floating at a specific position
"""
Make matching windows floating at a specific position.
"""
from libqtile import config, hook
from libqtile.backend import base
# Also add this `Match` to `Floating(float_rules=...)`,
# making these windows to always start as floating.
@m-col
m-col / go_to_group.py
Last active July 9, 2020 18:08
Go to group on different screen
"""
The idea here is that we've split the groups across 2 monitors, 0 and 1,
and each group is locked to one of these monitors. The groups here are
named '1', '2', '3', 'q', 'w', 'e', and 3 of these are locked to each
screen (see line 9). These can be changed of course, but update lines 9, 13 and 19.
"""
def _go_to_group(group):
if group in '123':
def _inner(qtile):
@m-col
m-col / scroll_groups.py
Created May 6, 2020 19:14
scroll groups in qtile
"""
mod-m and mod-n scroll between groups right and left respectively.
Depending on the number of screens used the integers will need changing (where there are 3s, 4s and 5s below).
The numbers below are for 3 groups on one screen and 2 on the other - knowing that it can be worked out (hopefully!)
"""
def _scroll_screen(direction):
""" Scroll next group of subset allocated to specific screen """
if num_monitors > 1:
def _inner(qtile):
@m-col
m-col / config_extract.py
Created April 7, 2020 13:42
Lock Qtile groups to screens
groups = [
Group('1'),
Group('2'),
Group('3'),
Group('4'),
Group('5'),
]
def _go_to_group(group):
if num_monitors > 1: