diff options
author | Mike Crute <crutem@amazon.com> | 2019-04-18 09:01:45 -0700 |
---|---|---|
committer | Mike Crute <crutem@amazon.com> | 2019-04-18 09:38:28 -0700 |
commit | 2c60241692cc3db0f00871ca36601893a3e7abe8 (patch) | |
tree | 39a7023badd1bbc0aac9314e356a5ad04cac6fa9 /.bashrc | |
parent | 56ee1874650433f7f54fef57f58b911ce58769fb (diff) | |
download | dotfiles-2c60241692cc3db0f00871ca36601893a3e7abe8.tar.bz2 dotfiles-2c60241692cc3db0f00871ca36601893a3e7abe8.tar.xz dotfiles-2c60241692cc3db0f00871ca36601893a3e7abe8.zip |
Add reset_screens command
Diffstat (limited to '.bashrc')
-rw-r--r-- | .bashrc | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -334,6 +334,17 @@ if have_command git; then | |||
334 | } | 334 | } |
335 | fi | 335 | fi |
336 | 336 | ||
337 | if have_command xrandr; then | ||
338 | # This is a hack around a cheap implementation of screen management in | ||
339 | # awesome. Eventually that should be improved and this removed. It disables | ||
340 | # all display outputs know to xrandr and lets the display manager hook | ||
341 | # re-enable only those currently connected. | ||
342 | function reset_screens | ||
343 | { | ||
344 | xrandr $(xrandr -q | awk '/(disconnected|connected)/ { printf "--output " $1 " --off " }') | ||
345 | } | ||
346 | fi | ||
347 | |||
337 | if have_command systemctl; then | 348 | if have_command systemctl; then |
338 | alias usystemctl="systemctl --user" | 349 | alias usystemctl="systemctl --user" |
339 | alias systemctl-failed-user-units="systemctl --user list-units --state=failed" | 350 | alias systemctl-failed-user-units="systemctl --user list-units --state=failed" |