瀏覽代碼

Add work bashrc and Linux config

Simon Watson 3 年之前
父節點
當前提交
fe90f070ec
共有 2 個文件被更改,包括 69 次插入2 次删除
  1. 65 0
      bashrc/bashrc-fedora-work
  2. 4 2
      emacs/.emacs-all

+ 65 - 0
bashrc/bashrc-fedora-work

@@ -0,0 +1,65 @@
+# .bashrc
+
+# Source global definitions
+if [ -f /etc/bashrc ]; then
+	. /etc/bashrc
+fi
+
+if [ -f ~/.wal_alias ]; then
+	. ~/.wal_alias 
+fi
+
+
+# User specific environment
+if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
+then
+    PATH="$HOME/.local/bin:$HOME/bin:$PATH"
+fi
+export PATH
+
+export EDITOR=/usr/bin/vim
+
+# Uncomment the following line if you don't like systemctl's auto-paging feature:
+# export SYSTEMD_PAGER=
+
+# User specific aliases and functions
+if [ -d ~/.bashrc.d ]; then
+	for rc in ~/.bashrc.d/*; do
+		if [ -f "$rc" ]; then
+			. "$rc"
+		fi
+	done
+fi
+
+unset rc
+
+[ -f ~/.fzf.bash ] && source ~/.fzf.bash
+#export PS1="\e[1;32m\u\e[0m@\h: \$PWD $ "
+PS1="[\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]]\$ "
+#PS1='\[\e]1;\s\$ \W\a\e]2;\u@\h\a\]'"$PS1"
+#export $PS1
+
+alias start_od="rclone --vfs-cache-mode writes mount ipconedrive: /home/watonsi/OneDrive/"
+alias pass_server="ssh watsonsi@ffdctpws1.ipc.com"
+alias shorten-ps1="PS1='\$ '"
+alias default-ps1="PS1='[\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]]\$ '"
+alias ls="/usr/bin/exa"
+alias ll="/usr/bin/exa -lah"
+
+cat /home/watonsi/.cache/wal/sequences
+. "$HOME/.cargo/env"
+
+alias tmux="systemd-run --scope --user tmux"
+alias tmuxn="tmux new -s $1"
+alias tmuxa="/bin/tmux attach -t $1"
+alias tmuxl="/bin/tmux ls"
+alias tmuxq="echo $TMUX"
+
+# function to set terminal title
+function set-title() {
+  if [[ -z "$ORIG" ]]; then
+    ORIG=$PS1
+  fi
+  TITLE="\[\e]2;$*\a\]"
+  PS1=${ORIG}${TITLE}
+}

+ 4 - 2
emacs/.emacs-all

@@ -179,7 +179,9 @@
       (load-theme 'nano t)
       (nano-dark)))
 
-;; Load for Linux
+;; Load for GUI Linux
 
-;; Load for Linux Term
+;; Load for Term
+(unless (display-graphic-p)
+  (xterm-mouse-mode t))