This file contains hidden or 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
| #!/bin/bash | |
| # | |
| # rotate_desktop.sh | |
| # | |
| # Rotates modern Linux desktop screen and input devices to match. Handy for | |
| # convertible notebooks. Call this script from panel launchers, keyboard | |
| # shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.). | |
| # | |
| # Using transformation matrix bits taken from: | |
| # https://wiki.ubuntu.com/X/InputCoordinateTransformation |
This file contains hidden or 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
| def recursive_dict_merge(DICT1, DICT2): | |
| """ | |
| Merges 2 dictionaries recursively | |
| Updates DICT1 with DICT2 keys/values | |
| Does not remove existing values from DICT1 | |
| Does not add new keys from DICT2 if they don't exist in DICT1 already | |
| :param DICT1: | |
| :param DICT2: | |
| :return: dict |