Skip to content

Instantly share code, notes, and snippets.

@Douile
Last active May 20, 2019 14:03
Show Gist options
  • Save Douile/2930b48298dfb7e0e32f97174fa4d5c8 to your computer and use it in GitHub Desktop.
Save Douile/2930b48298dfb7e0e32f97174fa4d5c8 to your computer and use it in GitHub Desktop.
Add multi-monitor keybinds fast
#!/bin/sh
# wget -O - -o /dev/null https://gist.githubusercontent.com/Douile/2930b48298dfb7e0e32f97174fa4d5c8/raw/add_multi_monitor.sh | /bin/sh
i3_config=~/.i3/config
# Add i3 config bindsyms
echo "Adding keybinds"
if grep -q "bindsym \$mod+Shift+greater" $i3_config; then
echo "Greater than bind already exists"
else
echo "bindsym \$mod+Shift+greater move container to output right" >> $i3_config
fi
if grep -q "bindsym \$mod+Shift+less" $i3_config; then
echo "Less than bind already exists"
else
echo "bindsym \$mod+Shift+less move container to output left" >> $i3_config
fi
# Reload i3 config
echo "Reloading i3 config"
i3-msg reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment