Compare commits

..

3 Commits

Author SHA1 Message Date
Gil Portenseigne 9adae124eb retour de tmux 2024-09-25 11:37:54 +02:00
Gil Portenseigne 71675a6693 suppression exec inutile 2024-09-25 09:33:26 +02:00
Gil Portenseigne 5476cee926 config EDITOR 2024-09-25 09:33:26 +02:00
2 changed files with 23 additions and 4 deletions

View File

@ -1,6 +1,8 @@
export EDITOR=$HOME/.local/bin/nvim.appimage
export TERMINAL=gnome-terminal
export SHELL=/usr/bin/bash
export TERMINAL=st
export SHELL=/usr/bin/tmux
export PATH=$HOME/.local/bin:$PATH
alias vi="$EDITOR"
alias wakeup="wakeonlan -i 192.168.1.50 58:11:22:C9:D5:B9"
@ -57,3 +59,22 @@ reboot_to_windows ()
sudo grub-reboot "$windows_title" && sudo reboot
}
alias windows='reboot_to_windows'
session_name="gil"
# 1. First you check if a tmux session exists with a given name.
tmux has-session -t=$session_name 2> /dev/null
# 2. Create the session if it doesn't exists.
if [[ $? -ne 0 ]]; then
TMUX='' tmux new-session -d -s "$session_name"
fi
# 3. Attach if outside of tmux, switch if you're in tmux.
if [[ -z "$TMUX" ]]; then
tmux attach -t "$session_name"
else
tmux switch-client -t "$session_name"
fi

View File

@ -1,2 +0,0 @@
#!/bin/sh
~/.local/bin/nvim.appimage