added ability to move to next screen
This commit is contained in:
@@ -13,6 +13,7 @@ keys = [
|
||||
Key([mod,"mod1"], "j", lazy.to_screen(2),desc="move focus to main screen"),
|
||||
Key([mod,"mod1"], "l", lazy.to_screen(2),desc="move focus to main screen"),
|
||||
Key([mod,"mod1"], "h", lazy.to_screen(1),desc="move focus to left screen"),
|
||||
Key([mod,"mod1"], "n", lazy.next_screen(),desc="move focus to left screen"),
|
||||
|
||||
# moving windows around
|
||||
Key([mod, "shift"], "h", lazy.layout.swap_left(),desc="move focused window left"),
|
||||
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
scrot -s '/tmp/screenshots/%F_%T_$wx$h.png' -e 'echo $f | xclip -selection clipboard -target text/uri-list -i'
|
||||
@@ -1,29 +1,4 @@
|
||||
# This is a test file for anything.
|
||||
screens = []
|
||||
main_screen_res = [3840,1440]
|
||||
top_screen_res = [1440,780]
|
||||
|
||||
import subprocess
|
||||
import re
|
||||
import numpy as np
|
||||
|
||||
cmd = ['xrandr']
|
||||
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
|
||||
resolution_string, junk = p.communicate()
|
||||
p.stdout.close()
|
||||
screen_resolutions = [np.array(screen_res.split('x')).astype(np.int) for screen_res in re.findall('[0-9]+x[0-9]+(?=[^\\\\n]*\*)',str(resolution_string))]
|
||||
number_of_screens = len(screen_resolutions)
|
||||
max_width = max(screen_resolutions, key=lambda res: res[0])[0]
|
||||
defined_main_window = False
|
||||
for width, height in screen_resolutions:
|
||||
if width == main_screen_res[0] and height == main_screen_res[1]:
|
||||
screens+=['main_screen']
|
||||
defined_main_window = True
|
||||
elif width == top_screen_res[0] and height == top_screen_res[1]:
|
||||
screens+=['top_screen']
|
||||
elif width == max_width and not defined_main_window:
|
||||
screens+=['laptop_screen']
|
||||
defined_main_window = True
|
||||
else:
|
||||
screens+=['peripheral_screen']
|
||||
print(screens)
|
||||
p = subprocess.run(["bash","/home/paul/.config/qtile/screenshot.sh"])
|
||||
Reference in New Issue
Block a user