Skip to content

Instantly share code, notes, and snippets.

@GoSteven
Last active August 29, 2015 14:16
Show Gist options
  • Save GoSteven/0ad893dbf46fe5e4fe66 to your computer and use it in GitHub Desktop.
Save GoSteven/0ad893dbf46fe5e4fe66 to your computer and use it in GitHub Desktop.
wmctl custom gnome shortcut

maximise current window

wmctrl -r :ACTIVE: -e 0,25,50,2100,1500 

switch to tmux

bash -c 'if wmctrl -l | grep -q "^[^ ]\+  0 [^ ]\+ tmux"; then wmctrl -r "tmux" -t 1; else wmctrl -R "tmux"; fi'

Screenshot Area

gnome-screenshot -a -i

Laptop monitor

bash -c 'xrandr --output DP-2 --off; xrandr --output VGA-1 --off --output HDMI-1 --off --output DP-1 --off --output DP-2 --off --output LVDS-1 --mode 1920x1080 --pos 0x1080 --rotate normal'

Desk monitor

bash -c 'xrandr --output VGA-1 --off --output HDMI-1 --off --output DP-1 --mode 1680x1050 --pos 0x0 --rotate left --output LVDS-1 --off;xrandr --output VGA-1 --off --output HDMI-1 --off --output DP-1 --mode 1680x1050 --pos 0x0 --rotate left --output DP-2 --mode 1680x1050 --pos 1050x0 --rotate left --output LVDS-1 --off'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment