Last active
September 19, 2019 15:46
-
-
Save 97-109-107/a4b802197d8b5ca6f54e to your computer and use it in GitHub Desktop.
get the size of current screen in i3wm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import i3 | |
def getCurrentScreen(): | |
workspace = [ws for ws in i3.get_workspaces() if ws['focused']][0] | |
screen_w =str(workspace['rect']['width']) | |
screen_h =str(workspace['rect']['height']) | |
print(screen_w, screen_h); | |
getCurrentScreen(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment