Compare commits

..

No commits in common. "1d683544388ed3ab3ea36c0d9158ff1a54222b97" and "b65f69da7ed71a95d85899e00886ee45bbce563b" have entirely different histories.

4 changed files with 46 additions and 92 deletions

View File

@ -5,5 +5,3 @@
tool = vscode tool = vscode
[difftool "vscode"] [difftool "vscode"]
cmd = "code --wait --diff $LOCAL $REMOTE " cmd = "code --wait --diff $LOCAL $REMOTE "
[fetch]
prune = true

View File

@ -48,7 +48,6 @@ set-option -g status-position bottom
# First line: Center (Window List) # First line: Center (Window List)
set-option -g status-format[0] '#[align=centre]#{W:#{E:window-status-format} ,#{E:window-status-current-format} }' 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) # 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]" 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]"
@ -64,25 +63,21 @@ 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]' set-window-option -g window-status-current-format '#[fg=colour16,bg=colour231] #I:#W #[fg=colour24,bg=colour24]'
# Bind function keys to windows # Bind function keys to windows
bind -n F1 select-window -t :=1 bind -n F1 select-window -t 1
bind -n F2 select-window -t :=2 bind -n F2 select-window -t 2
bind -n F3 select-window -t :=3 bind -n F3 select-window -t 3
bind -n F4 select-window -t :=4 bind -n F4 select-window -t 4
bind -n F5 select-window -t :=5 bind -n F5 select-window -t 5
bind -n F6 select-window -t :=6 bind -n F6 select-window -t 6
bind -n F7 select-window -t :=7 bind -n F7 select-window -t 7
bind -n F8 select-window -t :=8 bind -n F8 select-window -t 8
bind -n F9 select-window -t :=9 bind -n F9 select-window -t 9
bind -n F10 select-window -t :=10 bind -n F10 select-window -t 10
#start programs #start programs
new -s mysession -n "sys-mon" glances new -s mysession -n "sys-mon" glances
neww -n "Log" "journalctl -f" neww -n "Log" "journalctl -f"
#neww -n "Music" if-shell -b '[[ "$TERM" == "xterm-kitty" ]]' "rmpc" if-shell -b '[["$TERM" == " != "kitty" ]] "ncmpcpp" #neww -n "ARA Server" "source ~/Repos/homelab/.venv/bin/activate && ara-manage runserver"
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
#neww -n "Music" ncmpcpp #neww -n "Music" ncmpcpp
#neww -n "Deluge" deluge-console #neww -n "Deluge" deluge-console

103
.zshrc
View File

@ -17,26 +17,13 @@
##History ##History
HISTFILE=~/.zsh_history HISTFILE=~/.zsh_history
HISTSIZE=100000 HISTSIZE=25000
SAVEHIST=50000 SAVEHIST=12500
setopt INC_APPEND_HISTORY setopt INC_APPEND_HISTORY
setopt incappendhistory setopt incappendhistory
setopt sharehistory setopt sharehistory
setopt HIST_REDUCE_BLANKS setopt HIST_REDUCE_BLANKS
setopt HIST_IGNORE_ALL_DUPS 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 # make history searchable with ctrl-r
bindkey "^r" history-incremental-search-backward bindkey "^r" history-incremental-search-backward
@ -50,9 +37,11 @@ export VISUAL=$EDITOR
# export GITEA_TOKEN=a2a8542ad8fcf4de4156e9b5a83c09f826e53dc0 # export GITEA_TOKEN=a2a8542ad8fcf4de4156e9b5a83c09f826e53dc0
# export GITEA_TOKEN=55fa045ffdc1ffabbabcdc429e353e4883b04b17 # export GITEA_TOKEN=55fa045ffdc1ffabbabcdc429e353e4883b04b17
##Alias ##Alias
export SSH_AUTH_SOCK=/home/nick/.bitwarden-ssh-agent.sock
source ~/.alias source ~/.alias
setopt appendhistory autocd beep nomatch correct noclobber
unsetopt extendedglob notify
bindkey -v
zstyle :compinstall filename '/home/nick/.zshrc' zstyle :compinstall filename '/home/nick/.zshrc'
@ -85,28 +74,15 @@ if [ -f "/usr/share/doc/pkgfile/command-not-found.zsh" ]; then
fi fi
# The following lines were added by compinstall #eval 'keychain --eval id_ed25519'
if [[ -f /usr/bin/keychain ]] then
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate keychain --agents gpg,ssh id_ed25519 31936033 github_rsa
zstyle ':completion:*' format ''\''Completing %d'\''' [ -z "$HOSTNAME" ] && HOSTNAME=`uname -n`
zstyle ':completion:*' max-errors 3 numeric [ -f $HOME/.keychian/$HOSTNAME-sh ]
zstyle ':completion:*' prompt 'Errors '\''%e'\''' source $HOME/.keychain/$HOSTNAME-sh ]
zstyle :compinstall filename '/home/nick/.zshrc' [ -f $HOME/.keychain/$HOSTNAME-sh-gpg ]
source $HOME/.keychain/$HOSTNAME-sh-gpg
autoload -Uz compinit fi
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 ##Prompt
@ -124,10 +100,22 @@ else
%#" %#"
fi 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. # 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_PREFIX="%{$fg[green]%}[%{$reset_color%}"
GIT_PROMPT_SUFFIX="%{$fg[green]%}]%{$reset_color%}" GIT_PROMPT_SUFFIX="%{$fg[green]%}]%{$reset_color%}"
GIT_PROMPT_AHEAD="%{$fg[red]%}ANUM%{$reset_color%}" GIT_PROMPT_AHEAD="%{$fg[red]%}ANUM%{$reset_color%}"
@ -199,37 +187,12 @@ RPS1='$(git_prompt_string)'
# Created by `pipx` on 2025-03-03 18:34:12 # Created by `pipx` on 2025-03-03 18:34:12
export PATH="$PATH:/home/nick/.local/bin" 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 # requires direnv to be installed
eval "$(direnv hook zsh)" eval "$(direnv hook zsh)"
## UNTESTED NEEDS REVIEW show_venv() {
# SHOULD Allow > / >> to auto create directories if [[ -n "$VIRTUAL_ENV" && -n "$DIRENV_DIR" ]]; then
# # This function will be called before executing any command echo "($(basename $VIRTUAL_ENV))"
# preexec() { fi
# # Match something like > ~/path/to/file or >> ~/path/to/file }
# if [[ "$1" =~ '>>?\s*(~?/.+)' ]]; then RPS1='$(show_venv)'$RPS1
# 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
# }

View File

@ -19,8 +19,6 @@ import argparse
import subprocess import subprocess
import requests import requests
server = "https://git.theflyingfool.com"
def get_repos(server, token, per_page=100): def get_repos(server, token, per_page=100):
"""Fetch all repositories for the authenticated user from Gitea.""" """Fetch all repositories for the authenticated user from Gitea."""
repos = [] repos = []
@ -76,7 +74,7 @@ def main():
parser.add_argument( parser.add_argument(
"--server", "--server",
type=str, type=str,
default="https://git.theflyingfool.com", default="https://gitea.example.com",
help="Base URL of your Gitea server (e.g. https://gitea.example.com)" help="Base URL of your Gitea server (e.g. https://gitea.example.com)"
) )
parser.add_argument( parser.add_argument(