aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorphilw <dscr@duck.com>2024-02-10 20:00:48 +0100
committerphilw <dscr@duck.com>2024-02-10 20:00:48 +0100
commit51573d35e989d45f047b0b34fd9293be459d346b (patch)
treea59277e4b8c841a196de792e507d635a3db14ba2 /shell
downloaddotfiles-51573d35e989d45f047b0b34fd9293be459d346b.tar.gz
dotfiles-51573d35e989d45f047b0b34fd9293be459d346b.zip
Update dots
Diffstat (limited to '')
-rw-r--r--shell/bash/.bash_profile6
-rw-r--r--shell/bash/.bashrc100
m---------shell/zsh/.zsh/zsh-autosuggestions0
m---------shell/zsh/.zsh/zsh-syntax-highlighting0
-rw-r--r--shell/zsh/.zshenv1
-rw-r--r--shell/zsh/.zshrc106
6 files changed, 213 insertions, 0 deletions
diff --git a/shell/bash/.bash_profile b/shell/bash/.bash_profile
new file mode 100644
index 0000000..aeac56a
--- /dev/null
+++ b/shell/bash/.bash_profile
@@ -0,0 +1,6 @@
1#
2# ~/.bash_profile
3#
4
5[[ -f ~/.bashrc ]] && . ~/.bashrc
6. "$HOME/.cargo/env"
diff --git a/shell/bash/.bashrc b/shell/bash/.bashrc
new file mode 100644
index 0000000..289d237
--- /dev/null
+++ b/shell/bash/.bashrc
@@ -0,0 +1,100 @@
1
2parse_git_branch() {
3 local branch=""
4 branch=$(git branch 2> /dev/null | sed -n '/^[^*]/d;s/* \(.*\)/\1/p')
5 local git_status=$(git status --porcelain 2>/dev/null)
6
7 if [ -n "$branch" ]; then
8 branch="(${branch}) "
9 fi
10
11 echo "$branch"
12}
13
14update_prompt() {
15 PS1="\[\e[31m\][\[\e[33m\]\u\[\e[32m\]@\[\e[34m\]\h \[\e[35m\]\w\[\e[31m\]]\[\e[35m\] \[\e[33m\]\$(parse_git_branch)\[\e[34m\]# \[\e[0m\]"
16}
17
18PROMPT_COMMAND="update_prompt"
19
20
21eval "$(zoxide init bash)"
22
23export XDG_DATA_HOME="$HOME"/.local/share
24export XDG_CONFIG_HOME="$HOME"/.config
25export XDG_STATE_HOME="$HOME"/.local/state
26export XDG_CACHE_HOME="$HOME"/.cache
27#export PATH=$PATH:$(xdg-user-dir USER)/.local/bin
28export XDG_CURRENT_DESKTOP=dwm
29export XDG_SESSION_DESKTOP=dwm
30export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv
31export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
32export LESSHISTFILE="$XDG_CACHE_HOME"/less/history
33export EDITOR=nvim
34export BUILDDIR=/tmp/makepkg
35export RAVEDUDE_PORT=/dev/ttyACM0
36export BUN_INSTALL="$HOME/.bun"
37export PATH="$BUN_INSTALL/bin:$PATH"
38export PATH="$HOME/.cargo/bin:$PATH"
39export ANDROID_HOME=$HOME/Android/sdk
40export PATH=$PATH:$ANDROID_HOME/emulator
41export PATH=$PATH:$ANDROID_HOME/platform-tools
42export AWT_TOOLKIT=MToolkit
43export JAVA_HOME=/usr/lib/jvm/java-21-openjdk
44export GEM="/home/fw/.local/share/gem/ruby/3.0.0/bin"
45
46alias acl="arduino-cli"
47alias acl="arduino-cli compile"
48alias aclbl="arduino-cli board list"
49
50alias ls="eza -l --icons --color=always"
51alias l="eza -l --icons --color=always"
52alias ls="eza -l --icons --color=always"
53alias la="eza -la --icons --color=always"
54alias ll="eza -l --color=always --group-directories-first"
55alias lt="eza -T --color=always --group-directories-first"
56alias v="nvim"
57alias c="clear"
58alias e="exit"
59alias j="joshuto"
60alias g="grep"
61alias g="rg"
62alias zl="zellij"
63alias h="htop"
64alias n="neofetch"
65alias poweroff="doas /usr/bin/poweroff"
66alias reboot="doas /usr/bin/reboot"
67
68alias latexmk="latex-mk"
69
70alias orphans="doas pacman -Rcns $(pacman -Qqdt)"
71
72alias pf="prettier --write ."
73
74
75alias gts="git status"
76alias gta="git add ."
77alias gtc="git commit -m"
78alias gpo="git push origin"
79alias pull="git pull origin"
80alias glg="git log"
81
82[ -s "/home/fw/.bun/_bun" ] && source "/home/fw/.bun/_bun"
83
84if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
85 exec startx &> /dev/null
86# exec dbus-run-session run_something &> /dev/null
87fi
88
89case ":$PATH:" in
90 *":$GEM:"*) ;;
91 *) export PATH="$GEM:$PATH" ;;
92esac
93
94
95# If not running interactively, don't do anything
96[[ $- != *i* ]] && return
97
98. "$HOME/.cargo/env"
99# export PATH=$PATH:$(xdg-user-dir USER)/.local/bin
100# export PATH=$PATH:$(xdg-user-dir USER)/.local/bin
diff --git a/shell/zsh/.zsh/zsh-autosuggestions b/shell/zsh/.zsh/zsh-autosuggestions
new file mode 160000
Subproject c3d4e576c9c86eac62884bd47c01f6faed043fc
diff --git a/shell/zsh/.zsh/zsh-syntax-highlighting b/shell/zsh/.zsh/zsh-syntax-highlighting
new file mode 160000
Subproject e0165eaa730dd0fa321a6a6de74f092fe87630b
diff --git a/shell/zsh/.zshenv b/shell/zsh/.zshenv
new file mode 100644
index 0000000..c2f3182
--- /dev/null
+++ b/shell/zsh/.zshenv
@@ -0,0 +1 @@
. "$HOME/.cargo/env"
diff --git a/shell/zsh/.zshrc b/shell/zsh/.zshrc
new file mode 100644
index 0000000..11170c6
--- /dev/null
+++ b/shell/zsh/.zshrc
@@ -0,0 +1,106 @@
1parse_git_branch() {
2 local branch=""
3 branch=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')
4 local git_status=$(git status --porcelain 2>/dev/null)
5 local color=red
6 if [[ -n "$branch" ]]; then
7 branch=" (${branch})"
8 fi
9 echo "$branch "
10}
11update_prompt() {
12 PS1="%F{red}[%F{yellow}%n%F{green}@%F{blue}%m %F{magenta}%c%f%F{red}]%F{magenta}%F{yellow}$(parse_git_branch)%F{blue}# %F{reset}"
13}
14precmd_functions+=(update_prompt)
15update_prompt
16
17HISTFILE="$XDG_CACHE_HOME"/zsh-histfile
18HISTSIZE=2500
19SAVEHIST=2000
20setopt INC_APPEND_HISTORY
21setopt HIST_EXPIRE_DUPS_FIRST
22setopt HIST_FIND_NO_DUPS
23unsetopt beep
24bindkey -e
25zstyle :compinstall filename "/home/$USER/.zshrc"
26autoload -Uz compinit
27compinit
28setopt autocd
29eval "$(zoxide init zsh)"
30
31export XDG_DATA_HOME="$HOME"/.local/share
32export XDG_CONFIG_HOME="$HOME"/.config
33export XDG_STATE_HOME="$HOME"/.local/state
34export XDG_CACHE_HOME="$HOME"/.cache
35#export PATH=$PATH:$(xdg-user-dir USER)/.local/bin
36export XDG_CURRENT_DESKTOP=dwm
37export XDG_SESSION_DESKTOP=dwm
38export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv
39export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
40export LESSHISTFILE="$XDG_CACHE_HOME"/less/history
41export EDITOR=nvim
42export BUILDDIR=/tmp/makepkg
43export RAVEDUDE_PORT=/dev/ttyACM0
44export BUN_INSTALL="$HOME/.bun"
45export PATH="$BUN_INSTALL/bin:$PATH"
46export PATH="$HOME/.cargo/bin:$PATH"
47export ANDROID_HOME=$HOME/Android/sdk
48export PATH=$PATH:$ANDROID_HOME/emulator
49export PATH=$PATH:$ANDROID_HOME/platform-tools
50export AWT_TOOLKIT=MToolkit
51export JAVA_HOME=/usr/lib/jvm/java-21-openjdk
52export GEM="/home/fw/.local/share/gem/ruby/3.0.0/bin"
53. "${HOME}/.cache/wal/colors.sh"
54
55alias dmenu='dmenu_run -nb "$color0" -nf "$color15" -sb "$color1" -sf "$color15"'
56
57alias acl='arduino-cli'
58alias acl='arduino-cli compile'
59alias aclbl='arduino-cli board list'
60
61alias ls='eza -l --icons --color=always'
62alias l='eza -l --icons --color=always'
63alias ls='eza -l --icons --color=always'
64alias la='eza -la --icons --color=always'
65alias ll='eza -l --color=always --group-directories-first'
66alias lt='eza -T --color=always --group-directories-first'
67alias v="nvim"
68alias c="clear"
69alias e="exit"
70alias j="joshuto"
71alias g="grep"
72alias g="rg"
73alias zl="zellij"
74alias h="htop"
75alias n="neofetch"
76alias poweroff="doas /usr/bin/poweroff"
77alias reboot="doas /usr/bin/reboot"
78
79alias latexmk="latex-mk"
80
81alias orphans='doas pacman -Rcns $(pacman -Qqdt)'
82
83alias pf="prettier --write ."
84
85
86alias gts="git status"
87alias gta="git add ."
88alias gtc="git commit -m"
89alias gpo="git push origin"
90alias pull="git pull origin"
91alias glg="git log"
92
93[ -s "/home/fw/.bun/_bun" ] && source "/home/fw/.bun/_bun"
94
95if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
96 exec startx &> /dev/null
97# exec dbus-run-session run_something &> /dev/null
98fi
99
100case ":$PATH:" in
101 *":$GEM:"*) ;;
102 *) export PATH="$GEM:$PATH" ;;
103esac
104
105source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
106source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh