فهرست منبع

Adding a few things

Simon Watson 1 سال پیش
والد
کامیت
b4fdb934ea
4فایلهای تغییر یافته به همراه70 افزوده شده و 7 حذف شده
  1. 4 7
      bashrc/bashrc-all
  2. 12 0
      rofi/fzf_tmux.sh
  3. 15 0
      rofi/wtmux.sh
  4. 39 0
      tmux/tmux_init.sh

+ 4 - 7
bashrc/bashrc-all

@@ -5,6 +5,8 @@ if [ -f ~/.wal_alias ]; then
 fi
 
 [ -f ~/.fzf.bash ] && source ~/.fzf.bash
+source /usr/share/fzf/key-bindings.bash
+source /usr/share/fzf/completion.bash
 
 # Cargo config
 [ -f ~/.cargo ] && source "$HOME/.cargo/env"
@@ -204,7 +206,7 @@ case $(cat /etc/hostname) in
 
 	;;
 
-    swatson-casana)
+    swatson-casana2)
 
 	export TERM=xterm-256color # This fixes some vim issues
 	export PS1="\[\033[36m\]\w\[\033[m\] λ " 
@@ -222,12 +224,7 @@ case $(cat /etc/hostname) in
 	alias ssh-aws="ssh -i ~/.ssh/aws_key"
 	
 	tmux_init () {
-		$TMUX_PATH new -s services -d
-		$TMUX_PATH new -s admin -d
-		$TMUX_PATH new -s personal -d
-		$TMUX_PATH new -s music -d
-		$TMUX_PATH new -s lisp-koans -d
-		$TMUX_PATH new -s emacs -d
+	    /home/swatson/Repos/dotfiles/tmux/tmux_init.sh
 	}
 	
 	# Load non tracked aliases for work specific things

+ 12 - 0
rofi/fzf_tmux.sh

@@ -0,0 +1,12 @@
+#!/bin/bash
+
+function tmux_sesh_wind() {
+    for sesh in $(tmux list-sessions -F "#S"); do
+	for win in $(tmux list-windows -t $sesh -F "#W"); do
+	    echo "$sesh:$win";
+	done;
+    done;
+}
+
+RET=$(tmux_sesh_wind | fzf)
+tmux switch-client -t $RET

+ 15 - 0
rofi/wtmux.sh

@@ -0,0 +1,15 @@
+#!/bin/bash
+
+TERMINAL="/usr/bin/st"
+
+function tmux_sesh_wind() {
+    for sesh in $(tmux list-sessions -F "#S"); do
+	for win in $(tmux list-windows -t $sesh -F "#W"); do
+	    echo "$sesh:$win";
+	done;
+    done;
+}
+
+RET=$(tmux_sesh_wind | wofi --dmenu -p "tmux window:")
+
+$TERMINAL tmux switch-client -t $RET

+ 39 - 0
tmux/tmux_init.sh

@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# Replace shell aliases with properly configured
+# tmux state init
+
+	# tmux_init () {
+	# 	$TMUX_PATH new -s services -d
+	# 	$TMUX_PATH new -s admin -d
+	# 	$TMUX_PATH new -s personal -d
+	# 	$TMUX_PATH new -s music -d
+	# 	$TMUX_PATH new -s lisp-koans -d
+	# 	$TMUX_PATH new -s emacs -d
+# }
+
+# Long runningish services that are not
+# daemonized
+tmux new -s services -d
+# Pipewire
+tmux new-window -t 'services:1' -n 'pipewire'
+# OpenVPN
+tmux new-window -t 'services:2' -n 'openvpn'
+tmux send-keys -t 'services:openvpn' 'cd /home/swatson/old_home/mnt/disk_tmpfs/Work/aws_vpn/' C-m
+tmux send-keys -t 'services:openvpn' 'sudo openvpn --config aws-admin-vpn-config.ovpn'
+# Gdrive
+tmux new-window -t 'services:3' -n 'gdrive'
+tmux new-window -t 'services:4' -n 'upgrades'
+tmux send-keys -t 'services:upgrades' 'sudo xbps-install -Syu'
+
+# Work windows
+tmux new -s admin -d
+tmux rename-window -t 'admin:0' 'python1'
+tmux new-window -t 'admin:1' -n 'algo-api'
+tmux send-keys -t 'admin:algo-api' 'ssh-aws ubuntu@algo-api'
+tmux new-window -t 'admin:2' -n 'cloudv2-test'
+tmux new-window -t 'admin:3' -n 'cloudv2-dev'
+
+# Personal
+tmux new -s personal -d
+tmux rename-window -t 'personal:0' 'foobar'