mirror of
https://github.com/ralsina/xrandroll.git
synced 2024-11-24 20:12:21 +00:00
Basic replication implemented
This commit is contained in:
parent
37a664691a
commit
2c30d9a9b1
17
main.py
17
main.py
@ -169,6 +169,23 @@ class Window(QObject):
|
||||
mon = self.ui.screenCombo.currentText()
|
||||
replicate = self.ui.replicaOf.currentText()
|
||||
print(f"Making {mon} a replica of {replicate}")
|
||||
if replicate == 'None':
|
||||
print('TODO: make things non-replicas')
|
||||
return
|
||||
mon = self.xrandr_info[mon]
|
||||
replicate = self.xrandr_info[replicate]
|
||||
|
||||
# Making a replica implies:
|
||||
# Set the same position
|
||||
mon["pos_x"] = replicate["pos_x"]
|
||||
mon["pos_y"] = replicate["pos_y"]
|
||||
|
||||
# Set the same mode if possible
|
||||
if replicate["current_mode"] in mon["modes"]:
|
||||
mon["current_mode"] = replicate["current_mode"]
|
||||
else:
|
||||
print("TODO: replicas when the modes don't match")
|
||||
mon['item'].update_visuals(mon)
|
||||
|
||||
def do_reset(self):
|
||||
for n in self.xrandr_info:
|
||||
|
Loading…
Reference in New Issue
Block a user