move to next screen
This commit is contained in:
parent
fc13b25aed
commit
7bc75f1f30
20
config.py
20
config.py
|
@ -1,5 +1,6 @@
|
|||
from libqtile.config import Click, Drag, Group, Key
|
||||
from libqtile.lazy import lazy
|
||||
from libqtile.log_utils import logger
|
||||
|
||||
import autostart
|
||||
import my_layouts
|
||||
|
@ -9,17 +10,30 @@ import my_widgets
|
|||
mod = "mod4"
|
||||
terminal = "kitty"
|
||||
|
||||
screens = my_widgets.get_screens()
|
||||
|
||||
|
||||
@lazy.function
|
||||
def go_to_next_screen(qtile):
|
||||
logger.warning(dir(qtile))
|
||||
current_screen = qtile.current_screen
|
||||
lazy.to_screen((current_screen + 1) % len(screens))
|
||||
|
||||
|
||||
keys = [
|
||||
# A list of available commands that can be bound to keys can be found
|
||||
# at https://docs.qtile.org/en/latest/manual/config/lazy.html
|
||||
# Switch between windows
|
||||
Key(
|
||||
[mod],
|
||||
"q",
|
||||
lazy.next_screen(),
|
||||
),
|
||||
Key([mod], "h", lazy.layout.left(), desc="Move focus to left"),
|
||||
Key([mod], "l", lazy.layout.right(), desc="Move focus to right"),
|
||||
Key([mod], "j", lazy.layout.down(), desc="Move focus down"),
|
||||
Key([mod], "k", lazy.layout.up(), desc="Move focus up"),
|
||||
Key([mod], "space", lazy.layout.next(), desc="Move window focus to other window"),
|
||||
Key([mod], "a", lazy.to_screen(0)),
|
||||
Key([mod], "s", lazy.to_screen(1)),
|
||||
# Move windows between left/right columns or move up/down in current stack.
|
||||
# Moving out of range in Columns layout will create new column.
|
||||
Key(
|
||||
|
@ -100,8 +114,6 @@ for i in groups:
|
|||
|
||||
extension_defaults = my_widgets.get_defaults().copy()
|
||||
|
||||
screens = my_widgets.get_screens()
|
||||
|
||||
|
||||
layouts = my_layouts.get_layouts()
|
||||
|
||||
|
|
|
@ -3,25 +3,25 @@ from libqtile import bar, widget
|
|||
from enum import Enum
|
||||
import my_globals
|
||||
import os
|
||||
from screeninfo import get_monitors
|
||||
|
||||
|
||||
def get_screens():
|
||||
return [
|
||||
Screen(
|
||||
top=bar.Bar(
|
||||
_get_bar_contents(primary=True),
|
||||
18,
|
||||
background=my_globals.colors["bg"],
|
||||
screen_count = len(get_monitors())
|
||||
screens = []
|
||||
for s in range(screen_count):
|
||||
screens.append(
|
||||
Screen(
|
||||
top=bar.Bar(
|
||||
_get_bar_contents(
|
||||
primary=True if s == 0 else False,
|
||||
),
|
||||
18,
|
||||
background=my_globals.colors["bg"],
|
||||
)
|
||||
)
|
||||
),
|
||||
Screen(
|
||||
top=bar.Bar(
|
||||
_get_bar_contents(),
|
||||
18,
|
||||
background=my_globals.colors["bg"],
|
||||
)
|
||||
),
|
||||
]
|
||||
)
|
||||
return screens
|
||||
|
||||
|
||||
def get_defaults():
|
||||
|
|
2
setup.sh
2
setup.sh
|
@ -3,7 +3,7 @@
|
|||
sudo apt install xserver-xorg xinit
|
||||
sudo apt install libpangocairo-1.0-0
|
||||
sudo apt install python3-pip python3-xcffib python3-cairocffi
|
||||
sudo apt install rofi kitty xosd-bin flameshot xfce4-power-manager apt-show-versions
|
||||
sudo apt install rofi kitty xosd-bin flameshot xfce4-power-manager apt-show-versions python3-screeninfo
|
||||
|
||||
sudo pip install qtile dbus-next
|
||||
|
||||
|
|
Loading…
Reference in New Issue