Skip to content

Instantly share code, notes, and snippets.

@anis016
Last active August 16, 2020 10:24
Show Gist options
  • Save anis016/4f82519b761b6fd9ff1fafbb718fd8c7 to your computer and use it in GitHub Desktop.
Save anis016/4f82519b761b6fd9ff1fafbb718fd8c7 to your computer and use it in GitHub Desktop.
This gist contains all the easy hacks
$ sudo apt install tmux
$ mkdir /home/ghost016/tmux-bin
$ touch /home/ghost016/tmux-bin/4panel
$ chmod +x /home/ghost016/tmux-bin/4panel
open ~/.bashrc file and add
export PATH=${PATH}:/home/ghost016/tmux-bin
4panel code:
#!/usr/bin/env bash
# if the session is already running, just attach to it.
tmux has-session -t 4panel
if [[ $? -eq 0 ]]; then
sleep 1
tmux attach -t 4panel
else
tmux new-session -d -s 4panel
tmux split-window -v
tmux split-window -h
tmux select-pane -t 0
tmux split-window -h
tmux select-pane -t 0
tmux -2 attach-session -d
fi
2Panel code:
#!/usr/bin/env bash
# if the session is already running, just attach to it.
tmux has-session -t 2panel
if [[ $? -eq 0 ]]; then
sleep 1
tmux attach -t 2panel
else
tmux new-session -d -s 2panel
tmux split-window -h
tmux select-pane -t 0
tmux -2 attach-session -d
fi
cat ~/.bashrc
# Show git branch name
force_color_prompt=yes
color_prompt=yes
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ '
fi
unset color_prompt force_color_prompt
sudo apt update
sudo apt install wine
wget -q "http://deb.playonlinux.com/public.gpg" -O- | sudo apt-key add -
sudo wget http://deb.playonlinux.com/playonlinux_precise.list -O /etc/apt/sources.list.d/playonlinux.list
sudo apt update
sudo apt install playonlinux
sudo apt install winbind
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment