From ad84ab7d82110742c430feafd86d801437cc64b5 Mon Sep 17 00:00:00 2001 From: flifloo Date: Wed, 12 Feb 2020 13:30:21 +0100 Subject: [PATCH] Add auto xrandr, nvim on mapping and clear a lost print --- modules/hook.py | 2 ++ modules/keys.py | 1 + modules/main.py | 1 - 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/hook.py b/modules/hook.py index 3eb640e..ae2ba01 100644 --- a/modules/hook.py +++ b/modules/hook.py @@ -1,4 +1,5 @@ from libqtile import hook +from subprocess import run @hook.subscribe.client_new @@ -19,5 +20,6 @@ def auto_group(c): @hook.subscribe.screen_change def restart_on_randr(qtile, ev): + run(["xrandr", "--auto"]) qtile.cmd_restart() diff --git a/modules/keys.py b/modules/keys.py index 8a3914b..f653297 100644 --- a/modules/keys.py +++ b/modules/keys.py @@ -118,6 +118,7 @@ keys = [ Key([mod, "mod1"], "t", lazy.spawn(f"{exitvenv} telegram-desktop")), Key([mod, "mod1"], "r", lazy.spawn(f"{exitvenv} kitty --name ranger ranger")), Key([mod, "mod1"], "h", lazy.spawn(f"{exitvenv} kitty --name htop htop")), + Key([mod, "mod1"], "n", lazy.spawn(f"{exitvenv} kitty --name nvim nvim")), ] mouse = [ diff --git a/modules/main.py b/modules/main.py index f0bc981..a1d1093 100644 --- a/modules/main.py +++ b/modules/main.py @@ -17,7 +17,6 @@ def main(q): ps_screens = int(run("xrandr -q | grep ' connected' | wc -l", shell=True, stdout=PIPE).stdout) screens.clear() for i in range(ps_screens): - print(1) screens.append(Screen( top=bar.Bar( [