pomo and much more i guess
This commit is contained in:
parent
8f915727d1
commit
f297ff713b
|
@ -34,7 +34,7 @@ updatebar
|
||||||
|
|
||||||
|
|
||||||
######################## More or less shell specific #####################
|
######################## More or less shell specific #####################
|
||||||
pathadd () {
|
pathappend () {
|
||||||
# just works
|
# just works
|
||||||
NORM_PATH=":${PATH}:"
|
NORM_PATH=":${PATH}:"
|
||||||
NORM_PATH="$(printf '%s' "${NORM_PATH}" | sed 's/::/:/g')"
|
NORM_PATH="$(printf '%s' "${NORM_PATH}" | sed 's/::/:/g')"
|
||||||
|
@ -45,7 +45,7 @@ pathadd () {
|
||||||
PATH="${PATH:+"${PATH%:}"}${NORM_PATH_TO_ADD%:}"
|
PATH="${PATH:+"${PATH%:}"}${NORM_PATH_TO_ADD%:}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
export pathadd
|
export pathappend
|
||||||
|
|
||||||
ld_lib_path_add () {
|
ld_lib_path_add () {
|
||||||
# just works
|
# just works
|
||||||
|
@ -82,20 +82,20 @@ export GOPATH="${HOME}"/go
|
||||||
ld_lib_path_add "${LD_LIBRARY_PATH}:${HOME}/.local/lib"
|
ld_lib_path_add "${LD_LIBRARY_PATH}:${HOME}/.local/lib"
|
||||||
export LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH
|
||||||
|
|
||||||
pathadd '/bin'
|
pathappend '/bin'
|
||||||
pathadd '/sbin'
|
pathappend '/sbin'
|
||||||
pathadd '/usr/bin'
|
pathappend '/usr/bin'
|
||||||
pathadd '/usr/sbin'
|
pathappend '/usr/sbin'
|
||||||
pathadd '/usr/local/bin'
|
pathappend '/usr/local/bin'
|
||||||
pathadd '/usr/lcoal/sbin'
|
pathappend '/usr/lcoal/sbin'
|
||||||
pathadd '/usr/local/games'
|
pathappend '/usr/local/games'
|
||||||
pathadd '/usr/games'
|
pathappend '/usr/games'
|
||||||
pathadd '/snap/bin'
|
pathappend '/snap/bin'
|
||||||
pathadd "${HOME}"/bin
|
pathappend "${HOME}"/bin
|
||||||
pathadd "${HOME}"/.local/bin
|
pathappend "${HOME}"/.local/bin
|
||||||
pathadd "${HOME}"/.local/include
|
pathappend "${HOME}"/.local/include
|
||||||
pathadd "${HOME}"/.brew/bin
|
pathappend "${HOME}"/.brew/bin
|
||||||
pathadd "${GOPATH}"/bin
|
pathappend "${GOPATH}"/bin
|
||||||
export PATH
|
export PATH
|
||||||
|
|
||||||
# add cargo bin to path
|
# add cargo bin to path
|
||||||
|
|
63
.bashrc
63
.bashrc
|
@ -85,16 +85,6 @@ alias xpaste='xsel --clipboard --output'
|
||||||
alias aptclean='sudo apt -y update && sudo apt -y full-upgrade &&
|
alias aptclean='sudo apt -y update && sudo apt -y full-upgrade &&
|
||||||
sudo apt -y dist-upgrade && sudo apt -y autoremove &&
|
sudo apt -y dist-upgrade && sudo apt -y autoremove &&
|
||||||
sudo apt -y clean'
|
sudo apt -y clean'
|
||||||
alias paruu=' printf "\033[30;41m%s\033[m\n" "pacman -Sy archlinux-keyring" \
|
|
||||||
&& yes | sudo pacman -Sy archlinux-keyring \
|
|
||||||
&& printf "\033[30;41m%s\033[m\n" "pacman -Syyuu --noconfirm" \
|
|
||||||
&& yes | sudo pacman -Syyuu --noconfirm \
|
|
||||||
&& printf "\033[30;41m%s\033[m\n" "paru -Syu --devel --noconfirm" \
|
|
||||||
&& yes | paru -Syu --devel --noconfirm \
|
|
||||||
&& printf "\033[30;41m%s\033[m\n" "pacman -Qtdq | pacman -Rns -" \
|
|
||||||
&& pacman -Qtdq | sudo pacman --noconfirm -Rns - \
|
|
||||||
&& printf "\033[30;41m%s\033[m\n" "########## Done #########"'
|
|
||||||
alias paruuu=' clear && time (paruu)'
|
|
||||||
alias pacman='pacman --color=auto'
|
alias pacman='pacman --color=auto'
|
||||||
alias pcker='nvim "${HOME}"/.config/nvim/lua/*/packer.lua'
|
alias pcker='nvim "${HOME}"/.config/nvim/lua/*/packer.lua'
|
||||||
alias after='nvim "${HOME}"/.config/nvim/after/plugin'
|
alias after='nvim "${HOME}"/.config/nvim/after/plugin'
|
||||||
|
@ -122,6 +112,7 @@ alias cmatrix='cmatrix -u3 -Cred'
|
||||||
alias gca='git add -u && git commit -m "Automatic add"'
|
alias gca='git add -u && git commit -m "Automatic add"'
|
||||||
alias watch='watch -tcn.1'
|
alias watch='watch -tcn.1'
|
||||||
alias pacop='clear && 2>/dev/null paco && 2>/dev/null paco --strict'
|
alias pacop='clear && 2>/dev/null paco && 2>/dev/null paco --strict'
|
||||||
|
alias xterm='xterm -bg black -fg white'
|
||||||
alias norm='alacritty -e sh -c '\''watch -cn.5 \
|
alias norm='alacritty -e sh -c '\''watch -cn.5 \
|
||||||
norminette -R CheckForbiddenSourceHeader'\'' & disown'
|
norminette -R CheckForbiddenSourceHeader'\'' & disown'
|
||||||
alias norm2='alacritty -e sh -c '\''watch -cn.5 \
|
alias norm2='alacritty -e sh -c '\''watch -cn.5 \
|
||||||
|
@ -130,6 +121,49 @@ alias norm2='alacritty -e sh -c '\''watch -cn.5 \
|
||||||
alias dotconf='git --git-dir="${HOME}"/.dotfiles/ --work-tree="${HOME}"'
|
alias dotconf='git --git-dir="${HOME}"/.dotfiles/ --work-tree="${HOME}"'
|
||||||
2>/dev/null dotconf config status.showUntrackedFiles no
|
2>/dev/null dotconf config status.showUntrackedFiles no
|
||||||
|
|
||||||
|
function paruuu () {
|
||||||
|
ssid="$(iw dev wlan0 link |
|
||||||
|
grep SSID |
|
||||||
|
sed -e 's/[[:blank:]]*SSID: //' \
|
||||||
|
-e 's/[[:blank:]]*$//'
|
||||||
|
)"
|
||||||
|
if : \
|
||||||
|
&& [ ! "${ssid}" = "Free Wifi" ] \
|
||||||
|
&& [ ! "${ssid}" = "FreeWifi" ] \
|
||||||
|
&& [ ! "${ssid}" = "DS_JD-Tree" ] \
|
||||||
|
&& [ ! "${ssid}" = "Haihin" ] \
|
||||||
|
&& [ ! "${ssid}" = "∞" ] \
|
||||||
|
&& [ ! "${ssid}" = "\xe2\x88\x9e" ] \
|
||||||
|
&& [ ! "${ssid}" = $'\xe2\x88\x9e' ] \
|
||||||
|
&& [ ! "${ssid}" = "Nichts 5" ] \
|
||||||
|
&& [ ! "${ssid}" = "Nichts 2,4" ] \
|
||||||
|
&& [ ! "${ssid}" = "Pink Flamingo" ] \
|
||||||
|
&& [ ! "${ssid}" = "Pink Flamingo_5G" ] \
|
||||||
|
&& [ ! "${ssid}" = "42Berlin_Student" ] \
|
||||||
|
&& [ ! "${ssid}" = "42Berlin_Guest" ] \
|
||||||
|
&& [ ! "${ssid}" = "ZorgatiHome Guest" ] \
|
||||||
|
&& [ ! "${ssid}" = "Hackme" ] \
|
||||||
|
&& : ; then
|
||||||
|
printf '\033[31m%s\033m\n' "You're connected to '${ssid}', do you want to continue?"
|
||||||
|
read X
|
||||||
|
else
|
||||||
|
clear
|
||||||
|
time (
|
||||||
|
printf "\033[30;41m%s\033[m\n" "pacman -Sy archlinux-keyring" \
|
||||||
|
&& yes | sudo pacman -Sy archlinux-keyring \
|
||||||
|
&& printf "\033[30;41m%s\033[m\n" "pacman -Syyuu --noconfirm" \
|
||||||
|
&& yes | sudo pacman -Syyuu --noconfirm \
|
||||||
|
&& printf "\033[30;41m%s\033[m\n" "paru -Syu --devel --noconfirm" \
|
||||||
|
&& yes | paru -Syu --devel --noconfirm \
|
||||||
|
&& printf "\033[30;41m%s\033[m\n" "pacman -Qtdq | pacman -Rns -" \
|
||||||
|
&& { pacman -Qtdq | 2>/dev/null sudo pacman --noconfirm -Rns - \
|
||||||
|
|| printf "\033[30;42m%s\033[m\n" "No orphan packages!"; } \
|
||||||
|
&& printf "\033[30;42m%s\033[m\n" "###### Done without error ######" \
|
||||||
|
|| printf "\033[30;41m%s\033[m\n" "###### Some error occured! ######"
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function skill () {
|
function skill () {
|
||||||
if [ -n "${1}" ] ; then
|
if [ -n "${1}" ] ; then
|
||||||
# shellcheck disable=SC2046,SC2009
|
# shellcheck disable=SC2046,SC2009
|
||||||
|
@ -140,6 +174,11 @@ function skill () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function wpa_restart () {
|
||||||
|
skill wpa_supplicant
|
||||||
|
sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
|
||||||
|
}
|
||||||
|
|
||||||
function bat () {
|
function bat () {
|
||||||
2>/dev/null command -v batcat && { batcat "${@}"; return 0; }
|
2>/dev/null command -v batcat && { batcat "${@}"; return 0; }
|
||||||
2>/dev/null command -v bat && { $(type -P bat) "${@}"; return 0; }
|
2>/dev/null command -v bat && { $(type -P bat) "${@}"; return 0; }
|
||||||
|
@ -322,9 +361,13 @@ fi
|
||||||
2>/dev/null xset -b
|
2>/dev/null xset -b
|
||||||
# sudo kbdrate --rate=30.0 --delay=250
|
# sudo kbdrate --rate=30.0 --delay=250
|
||||||
|
|
||||||
|
complete -C pomo pomo
|
||||||
|
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
if [ -f "${HOME}"/.userbashrc ]; then . "${HOME}"/.userbashrc; fi
|
if [ -f "${HOME}"/.userbashrc ]; then . "${HOME}"/.userbashrc; fi
|
||||||
|
|
||||||
# Simplified *Bash* Prompt, e.g. for tty/system/linux console
|
# Simplified *Bash* Prompt, e.g. for tty/system/linux console
|
||||||
# unset PS0; PS1='\033[94m\u\033[37m@\033[32m\h\033[37m@\033[33m$(basename -- "$(tty)") \033[36m\w \033[35m\$\033[m '
|
# unset PS0; PS1='\033[94m\u\033[37m@\033[32m\h\033[37m@\033[33m$(basename -- "$(tty)") \033[36m\w \033[35m\$\033[m '
|
||||||
|
|
||||||
|
|
||||||
|
alias new_mp_project='clear && builtin cd -P ./ && python3 -m venv ./env/ && . ./env/bin/activate && pip install --no-input opencv-python mediapipe && pip freeze > ./requirements.txt && printf '\''#!/usr/bin/env python3\n\nfrom typing import NoReturn\n\nimport mediapipe as mp\nimport cv2\n\n\ndef main() -> NoReturn:\n\tpass\n\nif __name__ == '\''"'\''"'\''__main__'\''"'\''"'\'':\n\tmain()\n'\'' 1>./main.py && chmod +x ./main.py && printf '\''__pycache__/\nenv/\n'\'' 1>.gitignore && git init && git add -A && git commit -m '\''Initial commit'\'' && git ls-files && echo Done'
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0 * * * * /home/tosuman/.local/bin/system_update.sh
|
0 * * * * /home/tosuman/.local/bin/system_update.shc
|
||||||
|
|
|
@ -79,7 +79,7 @@ null_ls.setup({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
require("norme").setup({
|
-- require("norme").setup({
|
||||||
-- Your configuration
|
-- -- Your configuration
|
||||||
cmd = os.getenv('HOME') .. '/.local/bin/norminette'
|
-- cmd = os.getenv('HOME') .. '/.local/bin/norminette'
|
||||||
})
|
-- })
|
||||||
|
|
|
@ -2,15 +2,17 @@
|
||||||
|
|
||||||
export PATH="${PATH}:/home/tosuman/.local/bin"
|
export PATH="${PATH}:/home/tosuman/.local/bin"
|
||||||
export SHELL='/usr/bin/bash'
|
export SHELL='/usr/bin/bash'
|
||||||
export DISPLAY=:0
|
|
||||||
|
|
||||||
number_of_tmux_sessions="$(tmux ls | wc -l)"
|
number_of_tmux_sessions="$(tmux ls | wc -l)"
|
||||||
|
|
||||||
if [ "${number_of_tmux_sessions}" = "0" ] ; then
|
if [ "${number_of_tmux_sessions}" = "0" ] ; then
|
||||||
alacritty & disown
|
DISPLAY=:0 alacritty & disown
|
||||||
|
DISPLAY=:1 alacritty & disown
|
||||||
|
DISPLAY=:2 alacritty & disown
|
||||||
sleep 1
|
sleep 1
|
||||||
|
else
|
||||||
|
tmux new-window -c '/home/tosuman' &&
|
||||||
|
tmux rename-window 'System Update'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tmux new-window -c '/home/tosuman' \
|
tmux send-key 'paruuu' ENTER
|
||||||
&& tmux rename-window 'System Update' \
|
|
||||||
&& tmux send-key 'paruuu' ENTER
|
|
||||||
|
|
5
.profile
5
.profile
|
@ -1,3 +1,7 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
# This file ought to be sourced, above line for syntax highlighting purposes.
|
||||||
|
|
||||||
|
# shellcheck disable=SC2009
|
||||||
if ! ps aux|grep -v grep|grep startx 1>/dev/null; then
|
if ! ps aux|grep -v grep|grep startx 1>/dev/null; then
|
||||||
startx 1>/home/tosuman/.startx.log 2>&1
|
startx 1>/home/tosuman/.startx.log 2>&1
|
||||||
fi
|
fi
|
||||||
|
@ -6,6 +10,7 @@ fi
|
||||||
if [ -n "$BASH_VERSION" ] ; then
|
if [ -n "$BASH_VERSION" ] ; then
|
||||||
# include .bashrc if it exists
|
# include .bashrc if it exists
|
||||||
if [ -f "$HOME/.bashrc" ] && [ -r "$HOME/.bashrc" ]; then
|
if [ -f "$HOME/.bashrc" ] && [ -r "$HOME/.bashrc" ]; then
|
||||||
|
# shellcheck disable=SC1091
|
||||||
. "$HOME/.bashrc"
|
. "$HOME/.bashrc"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -11,6 +11,7 @@ bind-key -T copy-mode-vi V send -X select-line
|
||||||
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
|
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
|
||||||
set-option -g escape-time 10
|
set-option -g escape-time 10
|
||||||
set -g focus-events on
|
set -g focus-events on
|
||||||
|
bind-key r source-file "~/.tmux.conf"
|
||||||
|
|
||||||
# After scrolling and selecting text, don't leave copy mode
|
# After scrolling and selecting text, don't leave copy mode
|
||||||
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection
|
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection
|
||||||
|
@ -26,7 +27,7 @@ set -g status-left "#[bg=#fb4934,fg=#3c3836] #{session_name} #[bg=#fe8019,fg
|
||||||
set -g window-status-format "#[bg=#504945] #{window_index}-#{window_name} #{?#{==:#{window_index},#{session_windows}},#[bg=#3c3836 fg=#504945],}"
|
set -g window-status-format "#[bg=#504945] #{window_index}-#{window_name} #{?#{==:#{window_index},#{session_windows}},#[bg=#3c3836 fg=#504945],}"
|
||||||
set -g window-status-current-format "#[bg=#a89984,fg=#504945]#[fg=#282828] #{window_index}-#{window_name} #[bg=#504945,fg=#a89984]#{?#{==:#{window_index},#{session_windows}},#[bg=#3c3836],}"
|
set -g window-status-current-format "#[bg=#a89984,fg=#504945]#[fg=#282828] #{window_index}-#{window_name} #[bg=#504945,fg=#a89984]#{?#{==:#{window_index},#{session_windows}},#[bg=#3c3836],}"
|
||||||
set -g window-status-separator ""
|
set -g window-status-separator ""
|
||||||
set -g status-right "#(pwd) #[fg=#504945]#[bg=#504945,fg=#a89984] #(whoami) #[bg=#a89984,fg=#282828] #{host_short} #[bg=#a89984,fg=#fe8019]#[bg=#fe8019,fg=#fb4934]#[bg=#fb4934,fg=#3c3836] #(date +%H:%M) "
|
set -g status-right "#(2>/dev/null pomo && 2>/dev/null pomo | grep -Fq -- '-' && 2>/dev/null 1>&2 paplay '/home/tosuman/music/Gong Sound Effect.mp3') #(pwd) #[fg=#504945]#[bg=#504945,fg=#a89984] #(whoami) #[bg=#a89984,fg=#282828] #{host_short} #[bg=#a89984,fg=#fe8019]#[bg=#fe8019,fg=#fb4934]#[bg=#fb4934,fg=#3c3836] #(date +%H:%M) "
|
||||||
set -g status-right-length 500
|
set -g status-right-length 500
|
||||||
set -g status-interval 1
|
set -g status-interval 1
|
||||||
set -g pane-base-index 1
|
set -g pane-base-index 1
|
||||||
|
@ -52,4 +53,4 @@ bind-key -r -T prefix C-j resize-pane -D 2
|
||||||
bind-key -r -T prefix C-k resize-pane -U 2
|
bind-key -r -T prefix C-k resize-pane -U 2
|
||||||
bind-key -r -T prefix C-l resize-pane -R 2
|
bind-key -r -T prefix C-l resize-pane -R 2
|
||||||
|
|
||||||
bind-key -T prefix C-u popup '/usr/local/bin/tmux_urls.py'
|
bind-key -T prefix C-u popup -E '~/.local/bin/tmux_urls.py'
|
||||||
|
|
Loading…
Reference in New Issue