Skip to content

Instantly share code, notes, and snippets.

@AstmDesign
Created February 14, 2022 18:24
Show Gist options
  • Save AstmDesign/839d5821b37029b7cfee87fc8802ce0a to your computer and use it in GitHub Desktop.
Save AstmDesign/839d5821b37029b7cfee87fc8802ce0a to your computer and use it in GitHub Desktop.

Terminator common screens for rails developers

Install Terminator

  1. Copy the below script and save it as terminator.sh
#!/bin/bash
#
# Install Terminator on ubuntu 20.04 LTS
# Created by Astm Ali | https://github.com/astmdesign
#

if ! [ -x "$(command -v terminator)" ]; then
  sudo add-apt-repository ppa:gnome-terminator -y
  sudo apt-get install terminator -y
  terminator -v
fi
  1. Change the file permission to be executable by using the command
chmod +x terminator.sh
  1. run the script by the command
./terminator.sh

Common Terminator screens

  1. Copy the below script and save it as terminator_screens.sh
#
# Create needed Terminator screens for rails developers on ubuntu 20.04 LTS
# Created by Astm Ali | https://github.com/astmdesign
#

clear

# Needed commands for app
echo 'rails s'
echo 'rake resque:work QUEUE=*'
echo 'htop'
echo 'rails c'


# Split screen vertical
xdotool key shift+ctrl+e

sleep 1s

# Split screen horizontally
xdotool key shift+ctrl+o

sleep 1s

# Activate left screen
xdotool key alt+Left

sleep 1s

# Split screen horizontally
xdotool key shift+ctrl+o

sleep 1s

# Split screen vertical
xdotool key shift+ctrl+e

sleep 1s

# Activate top screen
xdotool key alt+Up

sleep 1s

# Split screen vertical
xdotool key shift+ctrl+e

sleep 1s

# Activate right screen
xdotool key alt+Right

# Minimize screen size
# i=0
for (( i=0; i <= 50; ++i ))
do
  xdotool key shift+ctrl+Right
done

sleep 1s

# Activate left screen
xdotool key alt+Left
  1. Change the file permission to be executable by using the command
chmod +x terminator_screens.sh
  1. run the script by the command
./terminator_screens.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment