Sai Karthik
Balancing the braces ...Sway Monitor Swapping Script
-
This is a simple python script i wrote & use swap between monitors in sway window manager.
-
Although, there is a more advanced tool named kanshi where the user can setup profiles to switch between & supports hotswapping of monitors when plugged in/out, My use case is simple. So, i wrote my own.
-
This script takes advantage of the
swaymsg
command’s json output feature. This command is used to configure sway while it’s running. -
When invoked, This script checks if more than one monitor is attached & switches the output to the monitor with defined name.
|
|