Compare commits
4 Commits
b65f69da7e
...
1d68354438
Author | SHA1 | Date | |
---|---|---|---|
1d68354438 | |||
5c7d86d8ba | |||
bf5d7a584a | |||
c54f7cccf1 |
@ -5,3 +5,5 @@
|
||||
tool = vscode
|
||||
[difftool "vscode"]
|
||||
cmd = "code --wait --diff $LOCAL $REMOTE "
|
||||
[fetch]
|
||||
prune = true
|
||||
|
27
.tmux.conf
27
.tmux.conf
@ -48,6 +48,7 @@ set-option -g status-position bottom
|
||||
|
||||
# First line: Center (Window List)
|
||||
set-option -g status-format[0] '#[align=centre]#{W:#{E:window-status-format} ,#{E:window-status-current-format} }'
|
||||
|
||||
# Second line: Center (Time/Date, ACPI, CPU/Mem, Hostname)
|
||||
set-option -g status-format[1] "#[align=centre]#[fg=red][Pending Updates: #(checkupdates | wc -l || echo "N/A")] #[fg=cyan][%H:%M %d-%b-%y] #[fg=yellow][#(acpi -b | awk -F', ' '{print $2, $3}')] #[fg=green,bg=default,bright][#(tmux-mem-cpu-load)] #[fg=blue][#h]"
|
||||
|
||||
@ -63,21 +64,25 @@ set-window-option -g window-status-format '#[fg=colour117,bg=colour24] #I:#W #[f
|
||||
set-window-option -g window-status-current-format '#[fg=colour16,bg=colour231] #I:#W #[fg=colour24,bg=colour24]'
|
||||
|
||||
# Bind function keys to windows
|
||||
bind -n F1 select-window -t 1
|
||||
bind -n F2 select-window -t 2
|
||||
bind -n F3 select-window -t 3
|
||||
bind -n F4 select-window -t 4
|
||||
bind -n F5 select-window -t 5
|
||||
bind -n F6 select-window -t 6
|
||||
bind -n F7 select-window -t 7
|
||||
bind -n F8 select-window -t 8
|
||||
bind -n F9 select-window -t 9
|
||||
bind -n F10 select-window -t 10
|
||||
bind -n F1 select-window -t :=1
|
||||
bind -n F2 select-window -t :=2
|
||||
bind -n F3 select-window -t :=3
|
||||
bind -n F4 select-window -t :=4
|
||||
bind -n F5 select-window -t :=5
|
||||
bind -n F6 select-window -t :=6
|
||||
bind -n F7 select-window -t :=7
|
||||
bind -n F8 select-window -t :=8
|
||||
bind -n F9 select-window -t :=9
|
||||
bind -n F10 select-window -t :=10
|
||||
|
||||
|
||||
|
||||
|
||||
#start programs
|
||||
new -s mysession -n "sys-mon" glances
|
||||
neww -n "Log" "journalctl -f"
|
||||
#neww -n "ARA Server" "source ~/Repos/homelab/.venv/bin/activate && ara-manage runserver"
|
||||
#neww -n "Music" if-shell -b '[[ "$TERM" == "xterm-kitty" ]]' "rmpc" if-shell -b '[["$TERM" == " != "kitty" ]] "ncmpcpp"
|
||||
neww -n "ARA Server" "bash -c 'cd ~/Repos/homelab-ansible && export ARA_SETTINGS="/home/nick/Repos/homelab-ansible/.ara/server/settings.yaml" && source .venv/bin/activate && ara-manage runserver'"
|
||||
neww
|
||||
#neww -n "Music" ncmpcpp
|
||||
#neww -n "Deluge" deluge-console
|
||||
|
105
.zshrc
105
.zshrc
@ -17,13 +17,26 @@
|
||||
|
||||
##History
|
||||
HISTFILE=~/.zsh_history
|
||||
HISTSIZE=25000
|
||||
SAVEHIST=12500
|
||||
HISTSIZE=100000
|
||||
SAVEHIST=50000
|
||||
setopt INC_APPEND_HISTORY
|
||||
setopt incappendhistory
|
||||
setopt sharehistory
|
||||
setopt HIST_REDUCE_BLANKS
|
||||
setopt HIST_IGNORE_ALL_DUPS
|
||||
setopt appendhistory
|
||||
setopt autocd
|
||||
setopt beep
|
||||
setopt nomatch
|
||||
setopt correct
|
||||
setopt noclobber
|
||||
setopt prompt_subst
|
||||
setopt notify
|
||||
unsetopt extendedglob
|
||||
bindkey -v
|
||||
|
||||
|
||||
|
||||
# make history searchable with ctrl-r
|
||||
bindkey "^r" history-incremental-search-backward
|
||||
|
||||
@ -37,11 +50,9 @@ export VISUAL=$EDITOR
|
||||
# export GITEA_TOKEN=a2a8542ad8fcf4de4156e9b5a83c09f826e53dc0
|
||||
# export GITEA_TOKEN=55fa045ffdc1ffabbabcdc429e353e4883b04b17
|
||||
##Alias
|
||||
export SSH_AUTH_SOCK=/home/nick/.bitwarden-ssh-agent.sock
|
||||
source ~/.alias
|
||||
|
||||
setopt appendhistory autocd beep nomatch correct noclobber
|
||||
unsetopt extendedglob notify
|
||||
bindkey -v
|
||||
|
||||
zstyle :compinstall filename '/home/nick/.zshrc'
|
||||
|
||||
@ -74,15 +85,28 @@ if [ -f "/usr/share/doc/pkgfile/command-not-found.zsh" ]; then
|
||||
fi
|
||||
|
||||
|
||||
#eval 'keychain --eval id_ed25519'
|
||||
if [[ -f /usr/bin/keychain ]] then
|
||||
keychain --agents gpg,ssh id_ed25519 31936033 github_rsa
|
||||
[ -z "$HOSTNAME" ] && HOSTNAME=`uname -n`
|
||||
[ -f $HOME/.keychian/$HOSTNAME-sh ]
|
||||
source $HOME/.keychain/$HOSTNAME-sh ]
|
||||
[ -f $HOME/.keychain/$HOSTNAME-sh-gpg ]
|
||||
source $HOME/.keychain/$HOSTNAME-sh-gpg
|
||||
fi
|
||||
# The following lines were added by compinstall
|
||||
|
||||
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
|
||||
zstyle ':completion:*' format ''\''Completing %d'\'''
|
||||
zstyle ':completion:*' max-errors 3 numeric
|
||||
zstyle ':completion:*' prompt 'Errors '\''%e'\'''
|
||||
zstyle :compinstall filename '/home/nick/.zshrc'
|
||||
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
|
||||
|
||||
# #eval 'keychain --eval id_ed25519'
|
||||
# if [[ -f /usr/bin/keychain ]]; then
|
||||
# keychain --agents gpg,ssh id_ed25519 31936033 github_rsa
|
||||
# [ -z "$HOSTNAME" ] && HOSTNAME=`uname -n`
|
||||
# [ -f $HOME/.keychian/$HOSTNAME-sh ]
|
||||
# source $HOME/.keychain/$HOSTNAME-sh ]
|
||||
# [ -f $HOME/.keychain/$HOSTNAME-sh-gpg ]
|
||||
# source $HOME/.keychain/$HOSTNAME-sh-gpg
|
||||
# fi
|
||||
|
||||
##Prompt
|
||||
|
||||
@ -100,22 +124,10 @@ else
|
||||
%#"
|
||||
fi
|
||||
|
||||
###Alias
|
||||
#alias aurup="cd ~/AUR && echo $PWD && cower -ubddf --color" #AUR Update
|
||||
#alias aurSs="cd ~/AUR && cower -s --color" #Search AUR
|
||||
#alias aurS="cd ~/AUR && cower -dd --color" #Download PKGBUILD and depends
|
||||
#ZFS Related #zfs, and zpool both set to NOPASSWD via sudoers file
|
||||
#alias zfs="sudo zfs"
|
||||
#alias zpool="sudo zpool"
|
||||
#alias scrub="sudo zpool scrub" #preforms scrub
|
||||
|
||||
|
||||
|
||||
# Adapted from code found at <https://gist.github.com/1712320>.
|
||||
|
||||
setopt prompt_subst
|
||||
# Modify the colors and symbols in these variables as desired.
|
||||
#GIT_PROMPT_SYMBOL="%{$fg[blue]%}±"
|
||||
GIT_PROMPT_SYMBOL="%{$fg[blue]%}±"
|
||||
GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$reset_color%}"
|
||||
GIT_PROMPT_SUFFIX="%{$fg[green]%}]%{$reset_color%}"
|
||||
GIT_PROMPT_AHEAD="%{$fg[red]%}ANUM%{$reset_color%}"
|
||||
@ -176,7 +188,7 @@ git_prompt_string() {
|
||||
}
|
||||
|
||||
## alt-s inserts "sudo" at start of line
|
||||
insert_sudo () { zle beginning-of-line; zle -U "sudo " }
|
||||
insert_sudo() { zle beginning-of-line; zle -U "sudo " }
|
||||
zle -N insert-sudo insert_sudo
|
||||
bindkey "^[s" insert-sudo
|
||||
|
||||
@ -187,12 +199,37 @@ RPS1='$(git_prompt_string)'
|
||||
# Created by `pipx` on 2025-03-03 18:34:12
|
||||
export PATH="$PATH:/home/nick/.local/bin"
|
||||
|
||||
# show_venv() {
|
||||
# if [[ -n "$VIRTUAL_ENV" && -n "$DIRENV_DIR" ]]; then
|
||||
# echo "($(basename $VIRTUAL_ENV))"
|
||||
# fi
|
||||
# }
|
||||
#PS1='$(show_venv)'$PS1
|
||||
|
||||
# requires direnv to be installed
|
||||
eval "$(direnv hook zsh)"
|
||||
|
||||
show_venv() {
|
||||
if [[ -n "$VIRTUAL_ENV" && -n "$DIRENV_DIR" ]]; then
|
||||
echo "($(basename $VIRTUAL_ENV))"
|
||||
fi
|
||||
}
|
||||
RPS1='$(show_venv)'$RPS1
|
||||
## UNTESTED NEEDS REVIEW
|
||||
# SHOULD Allow > / >> to auto create directories
|
||||
# # This function will be called before executing any command
|
||||
# preexec() {
|
||||
# # Match something like > ~/path/to/file or >> ~/path/to/file
|
||||
# if [[ "$1" =~ '>>?\s*(~?/.+)' ]]; then
|
||||
# local outfile=${match[1]}
|
||||
# # Expand ~ to full path
|
||||
# outfile=${outfile/#\~/$HOME}
|
||||
# local outdir=$(dirname "$outfile")
|
||||
|
||||
# if [[ ! -d "$outdir" ]]; then
|
||||
# echo "Output redirection to: $outfile"
|
||||
# echo -n "Directory '$outdir' does not exist. Create it? [Y/n]: "
|
||||
# read -r reply
|
||||
# if [[ -z "$reply" || "$reply" =~ ^[Yy] ]]; then
|
||||
# mkdir -p "$outdir"
|
||||
# echo "✅ Created $outdir"
|
||||
# else
|
||||
# echo "❌ Skipped creating directory. Command might fail."
|
||||
# fi
|
||||
# fi
|
||||
# fi
|
||||
# }
|
||||
|
@ -19,6 +19,8 @@ import argparse
|
||||
import subprocess
|
||||
import requests
|
||||
|
||||
server = "https://git.theflyingfool.com"
|
||||
|
||||
def get_repos(server, token, per_page=100):
|
||||
"""Fetch all repositories for the authenticated user from Gitea."""
|
||||
repos = []
|
||||
@ -74,7 +76,7 @@ def main():
|
||||
parser.add_argument(
|
||||
"--server",
|
||||
type=str,
|
||||
default="https://gitea.example.com",
|
||||
default="https://git.theflyingfool.com",
|
||||
help="Base URL of your Gitea server (e.g. https://gitea.example.com)"
|
||||
)
|
||||
parser.add_argument(
|
||||
|
Loading…
Reference in New Issue
Block a user