Add auto xrandr, nvim on mapping and clear a lost print
This commit is contained in:
parent
75f65ed897
commit
ad84ab7d82
3 changed files with 3 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
||||||
from libqtile import hook
|
from libqtile import hook
|
||||||
|
from subprocess import run
|
||||||
|
|
||||||
|
|
||||||
@hook.subscribe.client_new
|
@hook.subscribe.client_new
|
||||||
|
@ -19,5 +20,6 @@ def auto_group(c):
|
||||||
|
|
||||||
@hook.subscribe.screen_change
|
@hook.subscribe.screen_change
|
||||||
def restart_on_randr(qtile, ev):
|
def restart_on_randr(qtile, ev):
|
||||||
|
run(["xrandr", "--auto"])
|
||||||
qtile.cmd_restart()
|
qtile.cmd_restart()
|
||||||
|
|
||||||
|
|
|
@ -118,6 +118,7 @@ keys = [
|
||||||
Key([mod, "mod1"], "t", lazy.spawn(f"{exitvenv} telegram-desktop")),
|
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"], "r", lazy.spawn(f"{exitvenv} kitty --name ranger ranger")),
|
||||||
Key([mod, "mod1"], "h", lazy.spawn(f"{exitvenv} kitty --name htop htop")),
|
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 = [
|
mouse = [
|
||||||
|
|
|
@ -17,7 +17,6 @@ def main(q):
|
||||||
ps_screens = int(run("xrandr -q | grep ' connected' | wc -l", shell=True, stdout=PIPE).stdout)
|
ps_screens = int(run("xrandr -q | grep ' connected' | wc -l", shell=True, stdout=PIPE).stdout)
|
||||||
screens.clear()
|
screens.clear()
|
||||||
for i in range(ps_screens):
|
for i in range(ps_screens):
|
||||||
print(1)
|
|
||||||
screens.append(Screen(
|
screens.append(Screen(
|
||||||
top=bar.Bar(
|
top=bar.Bar(
|
||||||
[
|
[
|
||||||
|
|
Reference in a new issue