From f200a4704de56928bf2a84a67e690bb33bd5ad0f Mon Sep 17 00:00:00 2001 From: janolehuebner Date: Sun, 6 Apr 2025 20:33:52 +0200 Subject: [PATCH 01/30] Backed up pre-existing configs to local branch --- .config/nvim/coc-settings.json | 4 - .config/nvim/init.vim | 84 ------------------- .dotfiles/.zsh_functions/autosource.sh | 25 ------ .dotfiles/.zsh_functions/test.zsh | 1 - .environment.d/dotfiles.env | 4 - .environment.d/nas.env | 3 - .environment.d/path.env | 6 -- .environment.d/youtube.env | 1 - .zshrc | 28 ------- .zshrc.d/aliases.zsh | 12 --- .zshrc.d/install_dotfiles.zsh | 22 ----- .zshrc.d/p10k.zsh | 112 ------------------------- 12 files changed, 302 deletions(-) delete mode 100644 .config/nvim/coc-settings.json delete mode 100755 .config/nvim/init.vim delete mode 100644 .dotfiles/.zsh_functions/autosource.sh delete mode 100644 .dotfiles/.zsh_functions/test.zsh delete mode 100644 .environment.d/dotfiles.env delete mode 100644 .environment.d/nas.env delete mode 100644 .environment.d/path.env delete mode 100644 .environment.d/youtube.env delete mode 100755 .zshrc delete mode 100644 .zshrc.d/aliases.zsh delete mode 100644 .zshrc.d/install_dotfiles.zsh delete mode 100644 .zshrc.d/p10k.zsh diff --git a/.config/nvim/coc-settings.json b/.config/nvim/coc-settings.json deleted file mode 100644 index 4ccd0c0..0000000 --- a/.config/nvim/coc-settings.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "suggest.noselect": false, - "suggest.enablePreselect": true -} diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim deleted file mode 100755 index a6c79bd..0000000 --- a/.config/nvim/init.vim +++ /dev/null @@ -1,84 +0,0 @@ -call plug#begin() - -Plug 'semanser/vim-outdated-plugins' - -" Show trailing whitespaces (this could also easily be achieved by settings, -" but the plugin is very neat) -Plug 'ntpeters/vim-better-whitespace' -Plug 'vim-airline/vim-airline' -Plug 'w0rp/ale' -Plug 'AndrewRadev/bufferize.vim' -Plug 'airblade/vim-gitgutter' -Plug 'hashivim/vim-terraform' -Plug 'tpope/vim-fugitive' -Plug 'tpope/vim-rhubarb' -Plug 'neoclide/coc.nvim', {'branch': 'release'} - - -"Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} -call plug#end() -"lua require'nvim-treesitter.configs'.setup{highlight={enable=true}} - -" Explicitely set legacy colorscheme to overwrite the new neovim default -" colorscheme until I find the time to configure colors properly -colorscheme vim -set notermguicolors - -" Add a set of commands that will make the 80th column of a document visible -highlight ColorColumn ctermbg=244 guibg=lightgrey -command Col let &colorcolumn=join(range(81,100),",") -command NoCol set colorcolumn= -Col - -" Disable line wrapping and use some Unicode characters to signify overflow -" instead. This might obviously cause problems. Also make tabs and -" non-breaking spaces visible. Tab visibility may be toggled using ShowTabs -" and HideTabs. -set nowrap -set list -set showbreak=❱ -set listchars=tab:╾─,extends:❱,precedes:❰,nbsp:␣ -command ShowTabs set listchars-=tab:\ \ -command HideTabs set listchars+=tab:\ \ -set sidescroll=1 -set sidescrolloff=8 -set scrolloff=2 - -" Tweak the neovim popup-style(pum) wildmenu for file selection. Slightly -" alter the behaviour when you press the tab key and rotate the axis of the -" arrow keys. https://vi.stackexchange.com/a/22628 -" FIXME: Pressing left during file selection moves up 2 levels in the dir -" tree. This is a problem with the wildmenu file selector in general. -set wildmode=longest:full,full -set wildcharm= -cnoremap wildmenumode() ? "\" : "\" -cnoremap wildmenumode() ? "\" : "\" -cnoremap wildmenumode() ? "\" : "\" -cnoremap wildmenumode() ? " \\" : "\" - -" Rebind Redo to U -nnoremap U - -" Classic -set number -set nofoldenable - -" If this is not set, neovim will hide tabs instead of closing them, resulting -" in errors if you close a file as tab in one vim instance and subsecuently -" try to open it in another instance. I have not checked if this has other -" side effects. -set nohidden - -" Yaml Indent -autocmd BufNewFile,BufReadPost *.{yaml,yml} set filetype=yaml foldmethod=indent -autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab indentkeys-=0# indentkeys-=<:> - -" Treat .hcl files like terraform files (used by hashivim/vim-terraform) -autocmd BufNewFile,BufReadPost *.hcl set filetype=terraform - -" Overwrite airblade/vim-gitgutter highlight colors. -" https://vi.stackexchange.com/questions/10897/how-do-i-customize-vimdiff-colors -hi DiffAdd gui=none guifg=NONE guibg=#bada9f -hi DiffChange gui=none guifg=NONE guibg=#e5d5ac -hi DiffDelete gui=bold guifg=#ff8080 guibg=#ffb0b0 -hi DiffText gui=none guifg=NONE guibg=#8cbee2 diff --git a/.dotfiles/.zsh_functions/autosource.sh b/.dotfiles/.zsh_functions/autosource.sh deleted file mode 100644 index c0b8128..0000000 --- a/.dotfiles/.zsh_functions/autosource.sh +++ /dev/null @@ -1,25 +0,0 @@ -function autosource { - local zsh_function_dirs zsh_function_dir - - # Check for required argument - if (( $# == 0 )); then - echo "autosource: basename of a file in ZSH_FUNC_PATH required" - echo "autosource: usage: autosource basename [arguments]" - return 1 - fi - - # Split ZSH_FUNC_PATH into an array - IFS=':' read -rA zsh_function_dirs <<< "${ZSH_FUNC_PATH}" - - # Search each dir for a matching .zsh file - for zsh_function_dir in "${zsh_function_dirs[@]}"; do - if [[ -r "${zsh_function_dir}/${1}.zsh" ]]; then - source "${zsh_function_dir}/${1}.zsh" "${@:2}" - return - fi - done - - echo "autosource: no ${1} in (${ZSH_FUNC_PATH})" - return 1 -} - diff --git a/.dotfiles/.zsh_functions/test.zsh b/.dotfiles/.zsh_functions/test.zsh deleted file mode 100644 index 541d587..0000000 --- a/.dotfiles/.zsh_functions/test.zsh +++ /dev/null @@ -1 +0,0 @@ -echo test autosourced diff --git a/.environment.d/dotfiles.env b/.environment.d/dotfiles.env deleted file mode 100644 index b35818b..0000000 --- a/.environment.d/dotfiles.env +++ /dev/null @@ -1,4 +0,0 @@ -DOTFILES_ACTIVE=true -DOTFILES_DIR="${HOME}/.dotfiles" -DOTFILES_GITDIR="${HOME}/.dotgit" -ZSH_FUNC_PATH="${HOME}/.zsh_functions:${DOTFILES_DIR}/.zsh_functions" diff --git a/.environment.d/nas.env b/.environment.d/nas.env deleted file mode 100644 index f4fdb3b..0000000 --- a/.environment.d/nas.env +++ /dev/null @@ -1,3 +0,0 @@ -NAS_IP="192.168.84.3" -NAS_USER="janolehuebner" -NAS_TOKEN_NAME_IN_STORE="sudo-lana" diff --git a/.environment.d/path.env b/.environment.d/path.env deleted file mode 100644 index 95d194a..0000000 --- a/.environment.d/path.env +++ /dev/null @@ -1,6 +0,0 @@ -# Add directories to PATH -export PATH="/opt/homebrew/bin:$PATH" -export PATH="$HOME/.local/bin:$PATH" -export PATH="$HOME/Library/Python/3.9/bin:$PATH" -export PATH="$HOME/.cargo/bin:$PATH" -export PATH="$HOME/bin:$PATH" diff --git a/.environment.d/youtube.env b/.environment.d/youtube.env deleted file mode 100644 index cf2c388..0000000 --- a/.environment.d/youtube.env +++ /dev/null @@ -1 +0,0 @@ -TUBE_TOKEN_NAME_IN_STORE="tube.lan" diff --git a/.zshrc b/.zshrc deleted file mode 100755 index 4f22c1e..0000000 --- a/.zshrc +++ /dev/null @@ -1,28 +0,0 @@ -# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. -# Initialization code that may require console input (password prompts, [y/n] -# confirmations, etc.) must go above this block; everything else may go below. -if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then - source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" -fi - -# Load a function that allows us to import other function definitions from -# the ZSH_FUNC_PATH without providing their exact location -source "$DOTFILES_DIR/.zsh_functions/autosource.sh" - -# Load the rest of the zsh configs in ~/.zshrc.d/ -setopt allexport -for file in ~/.zshrc.d/*.zsh(.N); do - source "$file" -done - -unset file -unsetopt allexport - -autosource youtube -autosource milan -autosource nas -autosource fuck - -test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh" - - diff --git a/.zshrc.d/aliases.zsh b/.zshrc.d/aliases.zsh deleted file mode 100644 index 3c8e267..0000000 --- a/.zshrc.d/aliases.zsh +++ /dev/null @@ -1,12 +0,0 @@ -# Aliases -alias d="$HOME/dev/bin/mdl" -alias vim="nvim" -alias vi="nvim" -alias nano="nvim" -alias tg="terragrunt" -alias tf="tofu" -alias terraform="tofu" -alias pip="pip3" -alias python="python3" -alias cookies="open $HOME/Library/Containers/com.apple.Safari/Data/Library/Cookies/" -alias dotfiles="git --work-tree=$HOME --git-dir=$HOME/.dotgit " diff --git a/.zshrc.d/install_dotfiles.zsh b/.zshrc.d/install_dotfiles.zsh deleted file mode 100644 index 91ae7b6..0000000 --- a/.zshrc.d/install_dotfiles.zsh +++ /dev/null @@ -1,22 +0,0 @@ -install_dotfiles () { - echo "Installing stuff..." - # vim-plug - if ! [[ -f ~/.local/share/nvim/site/autoload/plug.vim ]]; then - echo "Dotfiles: Downloading vim-plug..." - if curl \ - --fail \ - --location \ - --retry 5 \ - --retry-delay 1 \ - --create-dirs \ - --progress-bar \ - --output ~/.local/share/nvim/site/autoload/plug.vim \ - https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - then - echo "Dotfiles: Done" - else - echo "Dotfiles: Error downloading vim-plug" - dotfiles_install_error="yes" - fi - fi -} diff --git a/.zshrc.d/p10k.zsh b/.zshrc.d/p10k.zsh deleted file mode 100644 index 30b7277..0000000 --- a/.zshrc.d/p10k.zsh +++ /dev/null @@ -1,112 +0,0 @@ -# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. -# Initialization code that may require console input (password prompts, [y/n] -# confirmations, etc.) must go above this block; everything else may go below. -if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then - source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" -fi - -# If you come from bash you might have to change your $PATH. -# export PATH=$HOME/bin:/usr/local/bin:$PATH - -# Path to your oh-my-zsh installation. -export ZSH="$HOME/.oh-my-zsh" - -#------ -# Set name of the theme to load --- if set to "random", it will -# load a random theme each time oh-my-zsh is loaded, in which case, -# to know which specific one was loaded, run: echo $RANDOM_THEME -# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes -ZSH_THEME="powerlevel10k/powerlevel10k" - -# Set list of themes to pick from when loading at random -# Setting this variable when ZSH_THEME=random will cause zsh to load -# a theme from this variable instead of looking in $ZSH/themes/ -# If set to an empty array, this variable will have no effect. -# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) - -# Uncomment the following line to use case-sensitive completion. -# CASE_SENSITIVE="true" - -# Uncomment the following line to use hyphen-insensitive completion. -# Case-sensitive completion must be off. _ and - will be interchangeable. -# HYPHEN_INSENSITIVE="true" - -# Uncomment one of the following lines to change the auto-update behavior -# zstyle ':omz:update' mode disabled # disable automatic updates -# zstyle ':omz:update' mode auto # update automatically without asking -# zstyle ':omz:update' mode reminder # just remind me to update when it's time - -# Uncomment the following line to change how often to auto-update (in days). -# zstyle ':omz:update' frequency 13 - -# Uncomment the following line if pasting URLs and other text is messed up. -# DISABLE_MAGIC_FUNCTIONS="true" - -# Uncomment the following line to disable colors in ls. -# DISABLE_LS_COLORS="true" - -# Uncomment the following line to disable auto-setting terminal title. -# DISABLE_AUTO_TITLE="true" - -# Uncomment the following line to enable command auto-correction. -# ENABLE_CORRECTION="true" - -# Uncomment the following line to display red dots whilst waiting for completion. -# You can also set it to another string to have that shown instead of the default red dots. -# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" -# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) -# COMPLETION_WAITING_DOTS="true" - -# Uncomment the following line if you want to disable marking untracked files -# under VCS as dirty. This makes repository status check for large repositories -# much, much faster. -# DISABLE_UNTRACKED_FILES_DIRTY="true" - -# Uncomment the following line if you want to change the command execution time -# stamp shown in the history command output. -# You can set one of the optional three formats: -# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" -# or set a custom format using the strftime function format specifications, -# see 'man strftime' for details. -# HIST_STAMPS="mm/dd/yyyy" - -# Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder - -# Which plugins would you like to load? -# Standard plugins can be found in $ZSH/plugins/ -# Custom plugins may be added to $ZSH_CUSTOM/plugins/ -# Example format: plugins=(rails git textmate ruby lighthouse) -# Add wisely, as too many plugins slow down shell startup. -plugins=(git) - -source $ZSH/oh-my-zsh.sh - -# User configuration - -# export MANPATH="/usr/local/man:$MANPATH" - -# You may need to manually set your language environment -# export LANG=en_US.UTF-8 - -# Preferred editor for local and remote sessions -# if [[ -n $SSH_CONNECTION ]]; then -# export EDITOR='vim' -# else -# export EDITOR='mvim' -# fi - -# Compilation flags -# export ARCHFLAGS="-arch x86_64" - -# Set personal aliases, overriding those provided by oh-my-zsh libs, -# plugins, and themes. Aliases can be placed here, though oh-my-zsh -# users are encouraged to define aliases within the ZSH_CUSTOM folder. -# For a full list of active aliases, run `alias`. -# -# Example aliases -# alias zshconfig="mate ~/.zshrc" -# alias ohmyzsh="mate ~/.oh-my-zsh" - -# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. -[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh From 3f0a914c8c83cc84b028354d7e9a30be131f46a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20Hu=CC=88bner?= Date: Sun, 6 Apr 2025 22:47:34 +0200 Subject: [PATCH 02/30] feat: add p10k installation --- .zshrc.d/install_dotfiles.zsh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.zshrc.d/install_dotfiles.zsh b/.zshrc.d/install_dotfiles.zsh index 91ae7b6..811978c 100644 --- a/.zshrc.d/install_dotfiles.zsh +++ b/.zshrc.d/install_dotfiles.zsh @@ -19,4 +19,13 @@ install_dotfiles () { dotfiles_install_error="yes" fi fi + + if [[ ! -d ~/.oh-my-zsh ]]; then + sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended --keep-zshrc + git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $HOME/.oh-my-zsh/themes/powerlevel10k + fi + + + } + From f201724cbdbbd256db5e3754c18ca742d71c1959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20Hu=CC=88bner?= Date: Mon, 7 Apr 2025 01:45:13 +0200 Subject: [PATCH 03/30] feature: move mdl into dotfiles --- .zprofile | 19 +++------ .zsh_functions/download.zsh | 85 +++++++++++++++++++++++++++++++++++++ .zshrc | 20 ++++++--- .zshrc.d/aliases.zsh | 1 - 4 files changed, 105 insertions(+), 20 deletions(-) create mode 100644 .zsh_functions/download.zsh diff --git a/.zprofile b/.zprofile index e4638f8..b562e80 100755 --- a/.zprofile +++ b/.zprofile @@ -1,15 +1,8 @@ -export PATH="$PATH:$HOME/.local/bin:$HOME/bin" - -# ── 2. Load .env files from ~/.environment.d/ ─────────────────── -# Automatically export all variables defined while sourcing .env files -setopt allexport -for file in ~/.environment.d/*.env(.N); do - source "$file" -done -unset file -unsetopt allexport - -# ── 3. Source ~/.zshrc (if this is a login shell sourcing a profile file) ─ -# In Zsh, this is unnecessary in most setups unless you separate login/init logic. +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block; everything else may go below. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi [[ -r ~/.zshrc ]] && source ~/.zshrc diff --git a/.zsh_functions/download.zsh b/.zsh_functions/download.zsh new file mode 100644 index 0000000..d346ab7 --- /dev/null +++ b/.zsh_functions/download.zsh @@ -0,0 +1,85 @@ +if ! typeset -f ytr >/dev/null; then + + export PATH="$PATH:$HOME/.local/bin:$HOME/bin" + + # ── 2. Load .env files from ~/.environment.d/ ─────────────────── + # Automatically export all variables defined while sourcing .env files + setopt allexport + for file in ~/.environment.d/*.env(.N); do + source "$file" + done + unset file + unsetopt allexport + + + + + # Load a function that allows us to import other function definitions from + # the ZSH_FUNC_PATH without providing their exact location + source "$DOTFILES_DIR/.zsh_functions/autosource.sh" + + # Load the rest of the zsh configs in ~/.zshrc.d/ + setopt allexport + for file in ~/.zshrc.d/*.zsh(.N); do + source "$file" + done + + source ~/.zsh_functions/youtube.zsh +fi + +d () { + local url="${1:-$(pbpaste)}" + if [[ -z "$url" ]]; then + echo "No URL provided and clipboard is empty." + return 1 + fi + case "$url" in + (*youtube*|*youtu.be*) echo "Detected YouTube URL: $url" + ytr "$url" ;; + (*qobuz*) echo "Detected Qobuz URL: $url" + mdl "$url" ;; + (*) echo "Unknown URL: $url" ;; + esac +} +mdl () { +cwd=$(pwd) +share_on_nas="192.168.84.3/media" +path_on_nas="Music/__INBOX" +check_smb_mount() { + mount | grep -q "$mount_point" +} + +mount_point="$HOME/NAS/Music" +if [ ! -d "$mount_point" ]; then + echo "Creating mount point directory..." + mkdir -p "$mount_point" +fi + +if ! check_smb_mount; then + echo "Mounting SMB share..." + /sbin/mount_smbfs "smb://janolehuebner:$(pass sudo-lana)@$share_on_nas" "$mount_point" +fi + +if ! check_smb_mount; then + echo "Failed to mount SMB share. Exiting." + exit 1 +fi + +# Move to target directory +cd "$mount_point/$path_on_nas" + +echo "SMB share mounted successfully." +if [[ "$*" == *"tidal.com"* ]]; then + echo "TIDAL DETECTED" + tidal-dl -l $* +else + echo "QOBUZ DETECTED" + qobuz-dl dl $* +fi + +echo "Unmounting SMB share..." +sleep 1 +umount "$mount_point" +cd $cwd +open "http://bliss.lan/" +} diff --git a/.zshrc b/.zshrc index 4f22c1e..e3eb137 100755 --- a/.zshrc +++ b/.zshrc @@ -1,9 +1,16 @@ -# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. -# Initialization code that may require console input (password prompts, [y/n] -# confirmations, etc.) must go above this block; everything else may go below. -if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then - source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" -fi +export PATH="$PATH:$HOME/.local/bin:$HOME/bin" + +# ── 2. Load .env files from ~/.environment.d/ ─────────────────── +# Automatically export all variables defined while sourcing .env files +setopt allexport +for file in ~/.environment.d/*.env(.N); do + source "$file" +done +unset file +unsetopt allexport + + + # Load a function that allows us to import other function definitions from # the ZSH_FUNC_PATH without providing their exact location @@ -22,6 +29,7 @@ autosource youtube autosource milan autosource nas autosource fuck +autosource download test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh" diff --git a/.zshrc.d/aliases.zsh b/.zshrc.d/aliases.zsh index 3c8e267..5ee23bc 100644 --- a/.zshrc.d/aliases.zsh +++ b/.zshrc.d/aliases.zsh @@ -1,5 +1,4 @@ # Aliases -alias d="$HOME/dev/bin/mdl" alias vim="nvim" alias vi="nvim" alias nano="nvim" From f4a52bf623e41a621e298123e890361ad3cf0c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20Hu=CC=88bner?= Date: Mon, 7 Apr 2025 02:24:32 +0200 Subject: [PATCH 04/30] fix qobuz and use uvx --- .zsh_functions/download.zsh | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.zsh_functions/download.zsh b/.zsh_functions/download.zsh index d346ab7..8baa34e 100644 --- a/.zsh_functions/download.zsh +++ b/.zsh_functions/download.zsh @@ -27,20 +27,6 @@ if ! typeset -f ytr >/dev/null; then source ~/.zsh_functions/youtube.zsh fi -d () { - local url="${1:-$(pbpaste)}" - if [[ -z "$url" ]]; then - echo "No URL provided and clipboard is empty." - return 1 - fi - case "$url" in - (*youtube*|*youtu.be*) echo "Detected YouTube URL: $url" - ytr "$url" ;; - (*qobuz*) echo "Detected Qobuz URL: $url" - mdl "$url" ;; - (*) echo "Unknown URL: $url" ;; - esac -} mdl () { cwd=$(pwd) share_on_nas="192.168.84.3/media" @@ -73,8 +59,9 @@ if [[ "$*" == *"tidal.com"* ]]; then echo "TIDAL DETECTED" tidal-dl -l $* else - echo "QOBUZ DETECTED" - qobuz-dl dl $* + echo "Using qobuz-dl via uvx at: $(which uvx)" + echo "QOBUZ URL: $*" + uvx qobuz-dl dl $* fi echo "Unmounting SMB share..." @@ -83,3 +70,19 @@ umount "$mount_point" cd $cwd open "http://bliss.lan/" } + +d () { + local url="${1:-$(pbpaste)}" + if [[ -z "$url" ]] + then + echo "No URL provided and clipboard is empty." + return 1 + fi + case "$url" in + (*youtube*|*youtu.be*) echo "Detected YouTube URL: $url" + ytr "$url" ;; + (*qobuz*) echo "Detected Qobuz URL: $url" + mdl "$url" ;; + (*) echo "Unknown URL: $url" ;; + esac +} From ebe4ef95263e17525dbd0db1fe40d51bf7272382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20Hu=CC=88bner?= Date: Mon, 7 Apr 2025 10:20:54 +0200 Subject: [PATCH 05/30] feat: add git graph --- .gitconfig | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 .gitconfig diff --git a/.gitconfig b/.gitconfig new file mode 100755 index 0000000..3ea9bdb --- /dev/null +++ b/.gitconfig @@ -0,0 +1,29 @@ +[user] + name = Jan-Ole Hübner + email = jan-ole@huebner.pink +[core] + excludesfile = /Users/janolehuebner/.gitignore_global + autocrlf = input +[color] + diff = auto + status = auto + branch = auto + interactive = auto + ui = true + pager = true + submodule = true + fetch = true + pull = true +[push] + default = simple +[pull] + ff = only +[status] + submoduleSummary = true +[pager] + log = less --chop-long-lines --shift 3 +[alias] + graph = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all + chronograph = graph --date-order +[init] + defaultBranch = main From e2bce96d76ec37a5140b73739106c7ba78fb1e77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20Hu=CC=88bner?= Date: Sun, 13 Apr 2025 02:02:11 +0200 Subject: [PATCH 06/30] feature(zsh_functions): instagram downloader --- .zsh_functions/insta.zsh | 68 ++++++++++++++++++++++++++++++++++++++++ .zshrc | 1 + 2 files changed, 69 insertions(+) create mode 100644 .zsh_functions/insta.zsh diff --git a/.zsh_functions/insta.zsh b/.zsh_functions/insta.zsh new file mode 100644 index 0000000..4eaa6a4 --- /dev/null +++ b/.zsh_functions/insta.zsh @@ -0,0 +1,68 @@ +function insta() { + local cwd=$(pwd) + + check_smb_mount() { + /sbin/mount | grep -q "$insta_mount_point" + } + + local stories_only=false + local user_list=() + + # Parse arguments + while [[ $# -gt 0 ]]; do + case "$1" in + --cron) + local random_wait=$((RANDOM % 1800)) + echo "--------------------------------------------" + echo "Waiting for $((random_wait / 60)) minutes..." + sleep $random_wait + stories_only=true + ;; + --stories) + stories_only=true + ;; + *) + user_list+=("$1") + ;; + esac + shift + done + + if [ ! -d "$insta_mount_point" ]; then + echo "Creating mount point directory..." + mkdir -p "$insta_mount_point" + fi + + if ! check_smb_mount; then + echo "Mounting SMB share..." + /sbin/mount_smbfs "smb://janolehuebner:$(pass sudo-lana)@$insta_share_on_nas" "$insta_mount_point" + fi + + if ! check_smb_mount; then + echo "Failed to mount SMB share. Exiting." + return 1 + fi + + cd "$insta_mount_point/$insta_path_on_nas" || return 1 + + # Use default users if no user was specified + if [[ ${#user_list[@]} -eq 0 ]]; then + user_list=("${insta_default_users[@]}") + fi + + # Build the instaloader command + local cmd=(uvx --with browser_cookie3 instaloader -b Safari -B "$insta_cookiefile" "${user_list[@]}" --fast-update) + + if $stories_only; then + cmd+=(--stories --no-profile-pic --no-posts) + else + cmd+=(--stories --reels) + fi + + "${cmd[@]}" + + echo "Unmounting SMB share..." + sleep 3 + /sbin/umount -f "$insta_mount_point" + cd "$cwd" +} diff --git a/.zshrc b/.zshrc index e3eb137..c7b3f52 100755 --- a/.zshrc +++ b/.zshrc @@ -25,6 +25,7 @@ done unset file unsetopt allexport +autosource insta autosource youtube autosource milan autosource nas From 7ea19b30fda75e3ab582c4e64f0bb2ae9bae2362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20Hu=CC=88bner?= Date: Sun, 13 Apr 2025 02:16:02 +0200 Subject: [PATCH 07/30] amend(environment): add insta skel --- .environment.d/insta.env.skel | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .environment.d/insta.env.skel diff --git a/.environment.d/insta.env.skel b/.environment.d/insta.env.skel new file mode 100644 index 0000000..deca591 --- /dev/null +++ b/.environment.d/insta.env.skel @@ -0,0 +1,5 @@ +insta_share_on_nas="192....../DATA" +insta_path_on_nas="social/insta" +insta_cookiefile="" +insta_mount_point="$HOME/NAS/insta" +insta_default_users=(user_a user_b) From 650c2b167e02182aae97335ae1b387054425669f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20Hu=CC=88bner?= Date: Sun, 13 Apr 2025 02:25:56 +0200 Subject: [PATCH 08/30] alias to edit insta variables --- .zshrc.d/aliases.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/.zshrc.d/aliases.zsh b/.zshrc.d/aliases.zsh index 5ee23bc..c810788 100644 --- a/.zshrc.d/aliases.zsh +++ b/.zshrc.d/aliases.zsh @@ -9,3 +9,4 @@ alias pip="pip3" alias python="python3" alias cookies="open $HOME/Library/Containers/com.apple.Safari/Data/Library/Cookies/" alias dotfiles="git --work-tree=$HOME --git-dir=$HOME/.dotgit " +alias instaedit="nvim ~/.environment.d/insta.env" From 0f958de2a816c4902a9370a914bb34b746f9be4e Mon Sep 17 00:00:00 2001 From: $GIT_AUTHOR <$GIT_EMAIL> Date: Sun, 13 Apr 2025 02:37:09 +0200 Subject: [PATCH 09/30] fix(git): move config to .config --- .gitconfig => .config/git/config | 13 +++++++++---- .environment.d/git.env.skel | 2 ++ 2 files changed, 11 insertions(+), 4 deletions(-) rename .gitconfig => .config/git/config (71%) create mode 100644 .environment.d/git.env.skel diff --git a/.gitconfig b/.config/git/config similarity index 71% rename from .gitconfig rename to .config/git/config index 3ea9bdb..f527f2a 100755 --- a/.gitconfig +++ b/.config/git/config @@ -1,9 +1,9 @@ [user] - name = Jan-Ole Hübner - email = jan-ole@huebner.pink + name = $GIT_AUTHOR + email = $GIT_EMAIL [core] - excludesfile = /Users/janolehuebner/.gitignore_global - autocrlf = input + excludesfile = $HOME/.config/git/.gitignore_global + autocrlf = input [color] diff = auto status = auto @@ -18,6 +18,9 @@ default = simple [pull] ff = only +[core] + excludesfile = ~/.gitignore + autocrlf = input [status] submoduleSummary = true [pager] @@ -25,5 +28,7 @@ [alias] graph = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all chronograph = graph --date-order + ff = merge --ff-only + amend = commit --amend --reuse-message=HEAD [init] defaultBranch = main diff --git a/.environment.d/git.env.skel b/.environment.d/git.env.skel new file mode 100644 index 0000000..0439b63 --- /dev/null +++ b/.environment.d/git.env.skel @@ -0,0 +1,2 @@ +GIT_AUTHOR="" +GIT_EMAIL="" From f2a3df682e6e0aa588f79d935572b2795bc814fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Sun, 13 Apr 2025 02:46:59 +0200 Subject: [PATCH 10/30] fix(git): fix broken git config and author name and email --- .config/git/config | 6 ------ .environment.d/git.env.skel | 6 ++++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.config/git/config b/.config/git/config index f527f2a..256bed3 100755 --- a/.config/git/config +++ b/.config/git/config @@ -1,9 +1,3 @@ -[user] - name = $GIT_AUTHOR - email = $GIT_EMAIL -[core] - excludesfile = $HOME/.config/git/.gitignore_global - autocrlf = input [color] diff = auto status = auto diff --git a/.environment.d/git.env.skel b/.environment.d/git.env.skel index 0439b63..eebccae 100644 --- a/.environment.d/git.env.skel +++ b/.environment.d/git.env.skel @@ -1,2 +1,4 @@ -GIT_AUTHOR="" -GIT_EMAIL="" +GIT_AUTHOR_NAME="" +GIT_AUTHOR_EMAIL="" +GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME +GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL From df7bec8f9049f88031910e89f03f4c365eb27a3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Sun, 13 Apr 2025 03:25:42 +0200 Subject: [PATCH 11/30] feat(install): add brew installation and Brewfile install --- .zshrc.d/install_dotfiles.zsh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.zshrc.d/install_dotfiles.zsh b/.zshrc.d/install_dotfiles.zsh index 811978c..f324c07 100644 --- a/.zshrc.d/install_dotfiles.zsh +++ b/.zshrc.d/install_dotfiles.zsh @@ -21,10 +21,29 @@ install_dotfiles () { fi if [[ ! -d ~/.oh-my-zsh ]]; then - sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended --keep-zshrc + sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended --keep-zshrc git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $HOME/.oh-my-zsh/themes/powerlevel10k fi + # Path to Brewfile + BREWFILE="$HOME/.Brewfile" + + if ! command -v brew &>/dev/null; then + echo "Homebrew not found. Installing..." + + if [[ "$OSTYPE" == "darwin"* ]]; then + + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + + + if [[ -f "$BREWFILE" ]]; then + echo "Installing from Brewfile: $BREWFILE" + brew bundle --file="$BREWFILE" + else + echo "No Brewfile found at $BREWFILE" + fi + fi + fi } From 8eed110642c2fa5cc08a417c27358664b75b8711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Sun, 13 Apr 2025 16:52:15 +0200 Subject: [PATCH 12/30] feat(insta): add echoing of date --- .zsh_functions/insta.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zsh_functions/insta.zsh b/.zsh_functions/insta.zsh index 4eaa6a4..779cf25 100644 --- a/.zsh_functions/insta.zsh +++ b/.zsh_functions/insta.zsh @@ -27,7 +27,7 @@ function insta() { esac shift done - + echo "-----$(date)------" if [ ! -d "$insta_mount_point" ]; then echo "Creating mount point directory..." mkdir -p "$insta_mount_point" From 2b71f2a7cb05ecfdcaf54a2e802caa8b0dd58ae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Sun, 13 Apr 2025 16:53:13 +0200 Subject: [PATCH 13/30] fix(youtube): change tubearch api status to pending --- .zsh_functions/youtube.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zsh_functions/youtube.zsh b/.zsh_functions/youtube.zsh index f07a179..007bf5e 100644 --- a/.zsh_functions/youtube.zsh +++ b/.zsh_functions/youtube.zsh @@ -66,7 +66,7 @@ yts() { # Get the video IDs from yt-dlp and loop through each one while read -r youtube_id; do # Add each video ID to the array of data (accumulating in $video_data) - video_data=$(echo "$video_data" | jq --arg youtube_id "$youtube_id" '. + [{youtube_id: $youtube_id, status: "priority"}]') + video_data=$(echo "$video_data" | jq --arg youtube_id "$youtube_id" '. + [{youtube_id: $youtube_id, status: "pending"}]') done < <(yt-dlp "https://www.youtube.com/@$1/shorts" --flat-playlist --print "%(id)s") # Check if video_data is still an empty array (meaning no videos were found) From 3f0b8e878fad58d70a2dfe2e71822b561324a5b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Sun, 13 Apr 2025 17:30:38 +0200 Subject: [PATCH 14/30] feat(path):add custom nvim path on truenas --- .zshrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index c7b3f52..9372eb3 100755 --- a/.zshrc +++ b/.zshrc @@ -1,4 +1,7 @@ export PATH="$PATH:$HOME/.local/bin:$HOME/bin" +if uname -r | grep -qi "truenas"; then + export PATH="$HOME/bin:$HOME/bin/nvim/bin:$PATH" +fi # ── 2. Load .env files from ~/.environment.d/ ─────────────────── # Automatically export all variables defined while sourcing .env files @@ -32,6 +35,6 @@ autosource nas autosource fuck autosource download -test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh" +#test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh" From c6cab93f4d21fec01bc32c2700271cf3ce7d32c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Sun, 13 Apr 2025 18:15:02 +0200 Subject: [PATCH 15/30] feat(brew): add homebrew quirks for truenas --- .environment.d/path.env | 10 +++++++--- .zshrc | 4 ---- .zshrc.d/install_dotfiles.zsh | 6 ++++++ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.environment.d/path.env b/.environment.d/path.env index 95d194a..2320178 100644 --- a/.environment.d/path.env +++ b/.environment.d/path.env @@ -1,6 +1,10 @@ -# Add directories to PATH -export PATH="/opt/homebrew/bin:$PATH" export PATH="$HOME/.local/bin:$PATH" -export PATH="$HOME/Library/Python/3.9/bin:$PATH" export PATH="$HOME/.cargo/bin:$PATH" export PATH="$HOME/bin:$PATH" +if uname -r | grep -qi "truenas"; then + export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH" +elif [[ "$OSTYPE" == darwin* ]]; then + export PATH="/opt/homebrew/bin:$PATH" + export PATH="$HOME/Library/Python/3.9/bin:$PATH" +fi + diff --git a/.zshrc b/.zshrc index 9372eb3..b541348 100755 --- a/.zshrc +++ b/.zshrc @@ -1,8 +1,4 @@ export PATH="$PATH:$HOME/.local/bin:$HOME/bin" -if uname -r | grep -qi "truenas"; then - export PATH="$HOME/bin:$HOME/bin/nvim/bin:$PATH" -fi - # ── 2. Load .env files from ~/.environment.d/ ─────────────────── # Automatically export all variables defined while sourcing .env files setopt allexport diff --git a/.zshrc.d/install_dotfiles.zsh b/.zshrc.d/install_dotfiles.zsh index f324c07..ec5a27f 100644 --- a/.zshrc.d/install_dotfiles.zsh +++ b/.zshrc.d/install_dotfiles.zsh @@ -30,6 +30,12 @@ install_dotfiles () { if ! command -v brew &>/dev/null; then echo "Homebrew not found. Installing..." + + if uname -r | grep -qi "truenas"; then + mkdir $HOME/linuxbrew + sudo ln -s $HOME/linuxbrew /home/linuxbrew + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + fi if [[ "$OSTYPE" == "darwin"* ]]; then From b9af444e746a98c40e28d94b66c1542f5f6be376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Sun, 13 Apr 2025 18:23:53 +0200 Subject: [PATCH 16/30] feat(install): add uv install --- .zshrc.d/install_dotfiles.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.zshrc.d/install_dotfiles.zsh b/.zshrc.d/install_dotfiles.zsh index ec5a27f..419dd9b 100644 --- a/.zshrc.d/install_dotfiles.zsh +++ b/.zshrc.d/install_dotfiles.zsh @@ -37,6 +37,11 @@ install_dotfiles () { /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" fi + #----uv + command -v uv >/dev/null 2>&1 || curl -LsSf https://astral.sh/uv/install.sh | sh + # + + if [[ "$OSTYPE" == "darwin"* ]]; then /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" From e602d788b06f2964ec9690baa145c5b9760169c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Sun, 13 Apr 2025 19:02:27 +0200 Subject: [PATCH 17/30] fix(insta): add temporary local fix for insta on nas --- .zsh_functions/insta.zsh | 119 +++++++++++++++++++++------------------ 1 file changed, 63 insertions(+), 56 deletions(-) diff --git a/.zsh_functions/insta.zsh b/.zsh_functions/insta.zsh index 779cf25..fca9843 100644 --- a/.zsh_functions/insta.zsh +++ b/.zsh_functions/insta.zsh @@ -1,68 +1,75 @@ -function insta() { - local cwd=$(pwd) +insta () { + local cwd=$(pwd) + check_smb_mount () { + /sbin/mount | grep -q "$insta_mount_point" + } - check_smb_mount() { - /sbin/mount | grep -q "$insta_mount_point" - } + local stories_only=false + local user_list=() + while [[ $# -gt 0 ]] + do + case "$1" in + --cron) + local random_wait=$((RANDOM % 1800)) + echo "--------------------------------------------" + echo "Waiting for $((random_wait / 60)) minutes..." + sleep $random_wait + stories_only=true + ;; + --stories) + stories_only=true + ;; + *) + user_list+=("$1") + ;; + esac + shift + done - local stories_only=false - local user_list=() + echo "-----$(date)------" - # Parse arguments - while [[ $# -gt 0 ]]; do - case "$1" in - --cron) - local random_wait=$((RANDOM % 1800)) - echo "--------------------------------------------" - echo "Waiting for $((random_wait / 60)) minutes..." - sleep $random_wait - stories_only=true - ;; - --stories) - stories_only=true - ;; - *) - user_list+=("$1") - ;; - esac - shift - done - echo "-----$(date)------" - if [ ! -d "$insta_mount_point" ]; then - echo "Creating mount point directory..." - mkdir -p "$insta_mount_point" - fi + local is_local_nas=false + if [[ "$NAS_IP" == "127.0.0.1" || "$NAS_IP" == "localhost" ]]; then + is_local_nas=true + fi - if ! check_smb_mount; then - echo "Mounting SMB share..." - /sbin/mount_smbfs "smb://janolehuebner:$(pass sudo-lana)@$insta_share_on_nas" "$insta_mount_point" - fi + if [ ! -d "$insta_mount_point" ]; then + echo "Creating mount point directory..." + mkdir -p "$insta_mount_point" + fi - if ! check_smb_mount; then - echo "Failed to mount SMB share. Exiting." - return 1 - fi + if ! $is_local_nas; then + if ! check_smb_mount; then + echo "Mounting SMB share..." + /sbin/mount_smbfs "smb://janolehuebner:$(pass sudo-lana)@$insta_share_on_nas" "$insta_mount_point" + fi + if ! check_smb_mount; then + echo "Failed to mount SMB share. Exiting." + return 1 + fi + fi - cd "$insta_mount_point/$insta_path_on_nas" || return 1 + cd "$insta_mount_point/$insta_path_on_nas" || return 1 - # Use default users if no user was specified - if [[ ${#user_list[@]} -eq 0 ]]; then - user_list=("${insta_default_users[@]}") - fi + if [[ ${#user_list[@]} -eq 0 ]]; then + user_list=("${insta_default_users[@]}") + fi - # Build the instaloader command - local cmd=(uvx --with browser_cookie3 instaloader -b Safari -B "$insta_cookiefile" "${user_list[@]}" --fast-update) + local cmd=(uvx --with browser_cookie3 instaloader -b Safari -B "$insta_cookiefile" "${user_list[@]}" --fast-update) + if $stories_only; then + cmd+=(--stories --no-profile-pic --no-posts) + else + cmd+=(--stories --reels) + fi - if $stories_only; then - cmd+=(--stories --no-profile-pic --no-posts) - else - cmd+=(--stories --reels) - fi + "${cmd[@]}" - "${cmd[@]}" + if ! $is_local_nas; then + echo "Unmounting SMB share..." + sleep 3 + /sbin/umount -f "$insta_mount_point" + fi - echo "Unmounting SMB share..." - sleep 3 - /sbin/umount -f "$insta_mount_point" - cd "$cwd" + cd "$cwd" } + From 40153d6e10981b7b66024e4be9f464783708521d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Sun, 13 Apr 2025 19:25:58 +0200 Subject: [PATCH 18/30] fix(youtube): use uvx --- .zsh_functions/youtube.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zsh_functions/youtube.zsh b/.zsh_functions/youtube.zsh index 007bf5e..78269bd 100644 --- a/.zsh_functions/youtube.zsh +++ b/.zsh_functions/youtube.zsh @@ -67,7 +67,7 @@ yts() { while read -r youtube_id; do # Add each video ID to the array of data (accumulating in $video_data) video_data=$(echo "$video_data" | jq --arg youtube_id "$youtube_id" '. + [{youtube_id: $youtube_id, status: "pending"}]') - done < <(yt-dlp "https://www.youtube.com/@$1/shorts" --flat-playlist --print "%(id)s") + done < <(uvx yt-dlp "https://www.youtube.com/@$1/shorts" --flat-playlist --print "%(id)s") # Check if video_data is still an empty array (meaning no videos were found) if [[ "$video_data" == "[]" ]]; then From 3559b1c113ff7b4fec99e3799b59c8a8ef0bca0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Sun, 13 Apr 2025 19:36:21 +0200 Subject: [PATCH 19/30] fix(pass): ignore errors from pass --- .zsh_functions/insta.zsh | 2 +- .zsh_functions/youtube.zsh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.zsh_functions/insta.zsh b/.zsh_functions/insta.zsh index fca9843..efb1e9f 100644 --- a/.zsh_functions/insta.zsh +++ b/.zsh_functions/insta.zsh @@ -41,7 +41,7 @@ insta () { if ! $is_local_nas; then if ! check_smb_mount; then echo "Mounting SMB share..." - /sbin/mount_smbfs "smb://janolehuebner:$(pass sudo-lana)@$insta_share_on_nas" "$insta_mount_point" + /sbin/mount_smbfs "smb://janolehuebner:$(pass sudo-lana 2>/dev/null)@$insta_share_on_nas" "$insta_mount_point" fi if ! check_smb_mount; then echo "Failed to mount SMB share. Exiting." diff --git a/.zsh_functions/youtube.zsh b/.zsh_functions/youtube.zsh index 78269bd..771e49a 100644 --- a/.zsh_functions/youtube.zsh +++ b/.zsh_functions/youtube.zsh @@ -29,7 +29,7 @@ ytr () { return 1 fi - local token="$(pass $TUBE_TOKEN_NAME_IN_STORE)" + local token="$(pass $TUBE_TOKEN_NAME_IN_STORE 2>/dev/null)" local json_data=$(jq -n --arg youtube_id "$youtube_id" '{ data: [ { @@ -58,7 +58,7 @@ yts() { fi # Set the token and URL - local token="$(pass $TUBE_TOKEN_NAME_IN_STORE)" + local token="$(pass $TUBE_TOKEN_NAME_IN_STORE 2>/dev/null)" # Initialize an empty array to store video data local video_data="[]" From 1e73c34288b3bd6dd0cdfa0d695374d97ffe9bae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Sun, 13 Apr 2025 19:55:04 +0200 Subject: [PATCH 20/30] feat(youtube): make check_shorts users configurable --- .environment.d/{youtube.env => youtube.env.skel} | 1 + .zsh_functions/youtube.zsh | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-) rename .environment.d/{youtube.env => youtube.env.skel} (55%) diff --git a/.environment.d/youtube.env b/.environment.d/youtube.env.skel similarity index 55% rename from .environment.d/youtube.env rename to .environment.d/youtube.env.skel index cf2c388..4deb20e 100644 --- a/.environment.d/youtube.env +++ b/.environment.d/youtube.env.skel @@ -1 +1,2 @@ TUBE_TOKEN_NAME_IN_STORE="tube.lan" +TUBE_DEFAULT_USERS=("a" "b") diff --git a/.zsh_functions/youtube.zsh b/.zsh_functions/youtube.zsh index 771e49a..100bdd1 100644 --- a/.zsh_functions/youtube.zsh +++ b/.zsh_functions/youtube.zsh @@ -90,13 +90,7 @@ yts() { # check_shorts() { - # List of channels to check (you can hardcode them or pass them as arguments) - channels=( - "DarkBlondii" - "littlesiha" - "lenaindica" - ) - + channels=$TUBE_DEFAULT_USERS # Loop through each channel and call yts for channel in "${channels[@]}"; do echo "Checking shorts for channel: $channel" From 5521f3de6c006d7c5e49b2a976e625b1e72b0083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Sun, 13 Apr 2025 20:07:53 +0200 Subject: [PATCH 21/30] amend(youtube): fix list handling --- .zsh_functions/youtube.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zsh_functions/youtube.zsh b/.zsh_functions/youtube.zsh index 100bdd1..4651f39 100644 --- a/.zsh_functions/youtube.zsh +++ b/.zsh_functions/youtube.zsh @@ -90,7 +90,7 @@ yts() { # check_shorts() { - channels=$TUBE_DEFAULT_USERS + channels=("${TUBE_DEFAULT_USERS[@]}") # Loop through each channel and call yts for channel in "${channels[@]}"; do echo "Checking shorts for channel: $channel" From 74c37f0a2a72b0cede51e9842fb60e59bdf3b67f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Mon, 14 Apr 2025 11:38:22 +0200 Subject: [PATCH 22/30] fix(nas): environment loaded in wrong order / use safari again because of a cookie library bug --- .environment.d/{nas.env => 01_nas.env} | 0 .zsh_functions/insta.zsh | 122 ++++++++++++------------- 2 files changed, 61 insertions(+), 61 deletions(-) rename .environment.d/{nas.env => 01_nas.env} (100%) diff --git a/.environment.d/nas.env b/.environment.d/01_nas.env similarity index 100% rename from .environment.d/nas.env rename to .environment.d/01_nas.env diff --git a/.zsh_functions/insta.zsh b/.zsh_functions/insta.zsh index efb1e9f..a0f2503 100644 --- a/.zsh_functions/insta.zsh +++ b/.zsh_functions/insta.zsh @@ -1,75 +1,75 @@ insta () { - local cwd=$(pwd) - check_smb_mount () { - /sbin/mount | grep -q "$insta_mount_point" - } + local cwd=$(pwd) + check_smb_mount () { + /sbin/mount | grep -q "$insta_mount_point" + } - local stories_only=false - local user_list=() - while [[ $# -gt 0 ]] - do - case "$1" in - --cron) - local random_wait=$((RANDOM % 1800)) - echo "--------------------------------------------" - echo "Waiting for $((random_wait / 60)) minutes..." - sleep $random_wait - stories_only=true - ;; - --stories) - stories_only=true - ;; - *) - user_list+=("$1") - ;; - esac - shift - done + local stories_only=false + local user_list=() + while [[ $# -gt 0 ]] + do + case "$1" in + --cron) + local random_wait=$((RANDOM % 1800)) + echo "--------------------------------------------" + echo "Waiting for $((random_wait / 60)) minutes..." + sleep $random_wait + stories_only=true + ;; + --stories) + stories_only=true + ;; + *) + user_list+=("$1") + ;; + esac + shift + done - echo "-----$(date)------" + echo "-----$(date)------" - local is_local_nas=false - if [[ "$NAS_IP" == "127.0.0.1" || "$NAS_IP" == "localhost" ]]; then - is_local_nas=true - fi + local is_local_nas=false + if [[ "$NAS_IP" == "127.0.0.1" || "$NAS_IP" == "localhost" ]]; then + is_local_nas=true + fi - if [ ! -d "$insta_mount_point" ]; then - echo "Creating mount point directory..." - mkdir -p "$insta_mount_point" - fi + if [ ! -d "$insta_mount_point" ]; then + echo "Creating mount point directory..." + mkdir -p "$insta_mount_point" + fi - if ! $is_local_nas; then - if ! check_smb_mount; then - echo "Mounting SMB share..." - /sbin/mount_smbfs "smb://janolehuebner:$(pass sudo-lana 2>/dev/null)@$insta_share_on_nas" "$insta_mount_point" - fi - if ! check_smb_mount; then - echo "Failed to mount SMB share. Exiting." - return 1 - fi - fi + if ! $is_local_nas; then + if ! check_smb_mount; then + echo "Mounting SMB share..." + /sbin/mount_smbfs "smb://janolehuebner:$(pass sudo-lana 2>/dev/null)@$insta_share_on_nas" "$insta_mount_point" + fi + if ! check_smb_mount; then + echo "Failed to mount SMB share. Exiting." + return 1 + fi + fi - cd "$insta_mount_point/$insta_path_on_nas" || return 1 + cd "$insta_mount_point/$insta_path_on_nas" || return 1 - if [[ ${#user_list[@]} -eq 0 ]]; then - user_list=("${insta_default_users[@]}") - fi + if [[ ${#user_list[@]} -eq 0 ]]; then + user_list=("${insta_default_users[@]}") + fi - local cmd=(uvx --with browser_cookie3 instaloader -b Safari -B "$insta_cookiefile" "${user_list[@]}" --fast-update) - if $stories_only; then - cmd+=(--stories --no-profile-pic --no-posts) - else - cmd+=(--stories --reels) - fi + local cmd=(uvx --with browser_cookie3 instaloader -b Safari "${user_list[@]}" --fast-update) + if $stories_only; then + cmd+=(--stories --no-profile-pic --no-posts) + else + cmd+=(--stories --reels) + fi - "${cmd[@]}" + "${cmd[@]}" - if ! $is_local_nas; then - echo "Unmounting SMB share..." - sleep 3 - /sbin/umount -f "$insta_mount_point" - fi + if ! $is_local_nas; then + echo "Unmounting SMB share..." + sleep 3 + /sbin/umount -f "$insta_mount_point" + fi - cd "$cwd" + cd "$cwd" } From 6a462556a26a26b55ba5e8f69b06df655f6c62ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Sat, 19 Apr 2025 01:04:23 +0200 Subject: [PATCH 23/30] feat(homebrew): add Brewfile --- .Brewfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .Brewfile diff --git a/.Brewfile b/.Brewfile new file mode 100644 index 0000000..d9f0c5b --- /dev/null +++ b/.Brewfile @@ -0,0 +1,23 @@ +brew "cmake" +brew "exiv2" +brew "ffmpeg" +brew "git-filter-repo" +brew "go" +brew "jpeg" +brew "leveldb" +brew "neovim" +brew "nmap" +brew "node" +brew "pass" +brew "podman" +brew "python@3.12" +brew "restic" +brew "samba" +brew "subfinder" +brew "yarn" +brew "yt-dlp" +brew "zoxide" +cask "amethyst" +cask "amorphousdiskmark" +cask "android-platform-tools" +cask "iterm2" From 55019903a7135367a4cc739d35ba014c477ca9c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Tue, 13 May 2025 11:35:06 +0200 Subject: [PATCH 24/30] zoxide and abort on error for insta --- .zsh_functions/insta.zsh | 2 +- .zshrc | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.zsh_functions/insta.zsh b/.zsh_functions/insta.zsh index a0f2503..a899cbd 100644 --- a/.zsh_functions/insta.zsh +++ b/.zsh_functions/insta.zsh @@ -55,7 +55,7 @@ insta () { user_list=("${insta_default_users[@]}") fi - local cmd=(uvx --with browser_cookie3 instaloader -b Safari "${user_list[@]}" --fast-update) + local cmd=(uvx --with browser_cookie3 instaloader -b Safari "${user_list[@]}" --fast-update --abort-on=302,400,401,429) if $stories_only; then cmd+=(--stories --no-profile-pic --no-posts) else diff --git a/.zshrc b/.zshrc index b541348..3c4544a 100755 --- a/.zshrc +++ b/.zshrc @@ -31,6 +31,5 @@ autosource nas autosource fuck autosource download -#test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh" - +eval "$(zoxide init --cmd cd zsh)" From 1c5a3ba8e8f6787b532e2a73275c6bc6f52aa83b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Sat, 24 May 2025 00:59:06 +0200 Subject: [PATCH 25/30] feat(download): update qobuz stuff --- .zsh_functions/download.zsh | 45 ++++++++++++++++++++++++++++--------- .zsh_functions/jellyfin.zsh | 8 +++++++ .zshrc | 1 + 3 files changed, 43 insertions(+), 11 deletions(-) create mode 100644 .zsh_functions/jellyfin.zsh diff --git a/.zsh_functions/download.zsh b/.zsh_functions/download.zsh index 8baa34e..0d289f8 100644 --- a/.zsh_functions/download.zsh +++ b/.zsh_functions/download.zsh @@ -29,8 +29,9 @@ fi mdl () { cwd=$(pwd) -share_on_nas="192.168.84.3/media" +share_on_nas="$NAS_IP/media" path_on_nas="Music/__INBOX" +jelly_wait=150 check_smb_mount() { mount | grep -q "$mount_point" } @@ -66,23 +67,45 @@ fi echo "Unmounting SMB share..." sleep 1 -umount "$mount_point" +/sbin/umount -f "$mount_point" cd $cwd -open "http://bliss.lan/" +if declare -f jelly_rescan > /dev/null; then + echo "Waiting $jelly_wait secs before triggering automatic library scan..." + sleep $jelly_wait + jelly_rescan + echo "done" +fi } - d () { local url="${1:-$(pbpaste)}" - if [[ -z "$url" ]] - then + local used_clipboard=0 + + if [[ -z "$url" ]]; then echo "No URL provided and clipboard is empty." return 1 fi + + # Check if URL came from clipboard + if [[ -z "$1" ]]; then + echo "started via clipboard" + used_clipboard=1 + fi + case "$url" in - (*youtube*|*youtu.be*) echo "Detected YouTube URL: $url" - ytr "$url" ;; - (*qobuz*) echo "Detected Qobuz URL: $url" - mdl "$url" ;; - (*) echo "Unknown URL: $url" ;; + (*youtube*|*youtu.be*) + echo "Detected YouTube URL: $url" + ytr "$url" + ;; + (*qobuz*) + echo "Detected Qobuz URL: $url" + mdl "$url" + if [[ $used_clipboard -eq 1 ]]; then + osascript -e "display dialog \"Done with Qobuz: $url\" buttons {\"OK\"}" + fi + ;; + (*) + echo "Unknown URL: $url" + ;; esac } + diff --git a/.zsh_functions/jellyfin.zsh b/.zsh_functions/jellyfin.zsh new file mode 100644 index 0000000..79b15db --- /dev/null +++ b/.zsh_functions/jellyfin.zsh @@ -0,0 +1,8 @@ +jelly_rescan(){ +JELLYFIN_URL="http://$NAS_IP:8096" +API_KEY="$(pass jelly)" +LIBRARY_ID="8a05b0252259a1dbd62df97522638439" + +curl -X POST -H "X-Emby-Token: $API_KEY" \ + "$JELLYFIN_URL/Library/VirtualFolders/$LIBRARY_ID/Refresh" +} diff --git a/.zshrc b/.zshrc index 3c4544a..eb977ad 100755 --- a/.zshrc +++ b/.zshrc @@ -30,6 +30,7 @@ autosource milan autosource nas autosource fuck autosource download +autosource jellyfin eval "$(zoxide init --cmd cd zsh)" From 40d9d75228bafa9622b99b036e7ad74ae396ba6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Sun, 8 Jun 2025 15:19:51 +0200 Subject: [PATCH 26/30] chore: commit pre beets --- .zsh_functions/download.zsh | 104 ++++++++++++++++++------------------ .zsh_functions/insta.zsh | 1 + .zsh_functions/jellyfin.zsh | 4 +- .zshrc.d/aliases.zsh | 5 +- 4 files changed, 55 insertions(+), 59 deletions(-) diff --git a/.zsh_functions/download.zsh b/.zsh_functions/download.zsh index 0d289f8..669dd90 100644 --- a/.zsh_functions/download.zsh +++ b/.zsh_functions/download.zsh @@ -1,30 +1,30 @@ if ! typeset -f ytr >/dev/null; then - export PATH="$PATH:$HOME/.local/bin:$HOME/bin" +export PATH="$PATH:$HOME/.local/bin:$HOME/bin" - # ── 2. Load .env files from ~/.environment.d/ ─────────────────── - # Automatically export all variables defined while sourcing .env files - setopt allexport - for file in ~/.environment.d/*.env(.N); do - source "$file" - done - unset file - unsetopt allexport +# ── 2. Load .env files from ~/.environment.d/ ─────────────────── +# Automatically export all variables defined while sourcing .env files +setopt allexport +for file in ~/.environment.d/*.env(.N); do + source "$file" +done +unset file +unsetopt allexport - # Load a function that allows us to import other function definitions from - # the ZSH_FUNC_PATH without providing their exact location - source "$DOTFILES_DIR/.zsh_functions/autosource.sh" +# Load a function that allows us to import other function definitions from +# the ZSH_FUNC_PATH without providing their exact location +source "$DOTFILES_DIR/.zsh_functions/autosource.sh" - # Load the rest of the zsh configs in ~/.zshrc.d/ - setopt allexport - for file in ~/.zshrc.d/*.zsh(.N); do - source "$file" - done +# Load the rest of the zsh configs in ~/.zshrc.d/ +setopt allexport +for file in ~/.zshrc.d/*.zsh(.N); do + source "$file" +done - source ~/.zsh_functions/youtube.zsh +source ~/.zsh_functions/youtube.zsh fi mdl () { @@ -58,7 +58,7 @@ cd "$mount_point/$path_on_nas" echo "SMB share mounted successfully." if [[ "$*" == *"tidal.com"* ]]; then echo "TIDAL DETECTED" - tidal-dl -l $* + uvx tidal-dl -l $* else echo "Using qobuz-dl via uvx at: $(which uvx)" echo "QOBUZ URL: $*" @@ -69,43 +69,43 @@ echo "Unmounting SMB share..." sleep 1 /sbin/umount -f "$mount_point" cd $cwd -if declare -f jelly_rescan > /dev/null; then - echo "Waiting $jelly_wait secs before triggering automatic library scan..." - sleep $jelly_wait - jelly_rescan - echo "done" -fi +#if declare -f jelly_rescan > /dev/null; then +# echo "Waiting $jelly_wait secs before triggering automatic library scan..." +# sleep $jelly_wait +# jelly_rescan +# echo "done" +#fi } d () { - local url="${1:-$(pbpaste)}" - local used_clipboard=0 +local url="${1:-$(pbpaste)}" +local used_clipboard=0 - if [[ -z "$url" ]]; then - echo "No URL provided and clipboard is empty." - return 1 - fi +if [[ -z "$url" ]]; then + echo "No URL provided and clipboard is empty." + return 1 +fi - # Check if URL came from clipboard - if [[ -z "$1" ]]; then - echo "started via clipboard" - used_clipboard=1 - fi +# Check if URL came from clipboard +if [[ -z "$1" ]]; then + echo "started via clipboard" + used_clipboard=1 +fi - case "$url" in - (*youtube*|*youtu.be*) - echo "Detected YouTube URL: $url" - ytr "$url" - ;; - (*qobuz*) - echo "Detected Qobuz URL: $url" - mdl "$url" - if [[ $used_clipboard -eq 1 ]]; then - osascript -e "display dialog \"Done with Qobuz: $url\" buttons {\"OK\"}" - fi - ;; - (*) - echo "Unknown URL: $url" - ;; - esac +case "$url" in + (*youtube*|*youtu.be*) + echo "Detected YouTube URL: $url" + ytr "$url" + ;; + (*qobuz*) + echo "Detected Qobuz URL: $url" + mdl "$url" + if [[ $used_clipboard -eq 1 ]]; then + osascript -e "display dialog \"Done with Qobuz: $url\" buttons {\"OK\"}" + fi + ;; + (*) + echo "Unknown URL: $url" + ;; +esac } diff --git a/.zsh_functions/insta.zsh b/.zsh_functions/insta.zsh index a899cbd..65c6fa3 100644 --- a/.zsh_functions/insta.zsh +++ b/.zsh_functions/insta.zsh @@ -55,6 +55,7 @@ insta () { user_list=("${insta_default_users[@]}") fi + #local cmd=(uvx --with browser_cookie3 instaloader -b Firefox -B '/Users/janolehuebner/Library/Application Support/zen/Profiles/frbi8zqc.insta/cookies.sqlite' "${user_list[@]}" --fast-update --abort-on=302,400,401,429) local cmd=(uvx --with browser_cookie3 instaloader -b Safari "${user_list[@]}" --fast-update --abort-on=302,400,401,429) if $stories_only; then cmd+=(--stories --no-profile-pic --no-posts) diff --git a/.zsh_functions/jellyfin.zsh b/.zsh_functions/jellyfin.zsh index 79b15db..f8a6ab9 100644 --- a/.zsh_functions/jellyfin.zsh +++ b/.zsh_functions/jellyfin.zsh @@ -2,7 +2,5 @@ jelly_rescan(){ JELLYFIN_URL="http://$NAS_IP:8096" API_KEY="$(pass jelly)" LIBRARY_ID="8a05b0252259a1dbd62df97522638439" - -curl -X POST -H "X-Emby-Token: $API_KEY" \ - "$JELLYFIN_URL/Library/VirtualFolders/$LIBRARY_ID/Refresh" +curl -X POST -H "X-Emby-Token: $API_KEY" "$JELLYFIN_URL/Items/$LIBRARY_ID/Refresh?Recursive=true" } diff --git a/.zshrc.d/aliases.zsh b/.zshrc.d/aliases.zsh index c810788..d9a1746 100644 --- a/.zshrc.d/aliases.zsh +++ b/.zshrc.d/aliases.zsh @@ -5,8 +5,5 @@ alias nano="nvim" alias tg="terragrunt" alias tf="tofu" alias terraform="tofu" -alias pip="pip3" -alias python="python3" -alias cookies="open $HOME/Library/Containers/com.apple.Safari/Data/Library/Cookies/" alias dotfiles="git --work-tree=$HOME --git-dir=$HOME/.dotgit " -alias instaedit="nvim ~/.environment.d/insta.env" +alias instaloader="uvx --with browser_cookie3 instaloader" From 3824cae23e79051286daa3dd29aea242684bdf42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Sun, 8 Jun 2025 15:22:30 +0200 Subject: [PATCH 27/30] feat(nas): add nas.env --- .environment.d/01_nas.env | 2 +- .environment.d/git.env | 4 ++++ .environment.d/insta.env | 5 +++++ .environment.d/youtube.env | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .environment.d/git.env create mode 100644 .environment.d/insta.env create mode 100644 .environment.d/youtube.env diff --git a/.environment.d/01_nas.env b/.environment.d/01_nas.env index f4fdb3b..5a0b4fa 100644 --- a/.environment.d/01_nas.env +++ b/.environment.d/01_nas.env @@ -1,3 +1,3 @@ -NAS_IP="192.168.84.3" +NAS_IP="127.0.0.1" NAS_USER="janolehuebner" NAS_TOKEN_NAME_IN_STORE="sudo-lana" diff --git a/.environment.d/git.env b/.environment.d/git.env new file mode 100644 index 0000000..a9b15d6 --- /dev/null +++ b/.environment.d/git.env @@ -0,0 +1,4 @@ +GIT_AUTHOR_NAME="Jan-Ole Hübner" +GIT_AUTHOR_EMAIL="jan-ole@huebner.pink" +GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME +GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL diff --git a/.environment.d/insta.env b/.environment.d/insta.env new file mode 100644 index 0000000..b4b846f --- /dev/null +++ b/.environment.d/insta.env @@ -0,0 +1,5 @@ +insta_share_on_nas="/mnt/hdd/DATA" +insta_path_on_nas="social/insta" +insta_cookiefile="/mnt/hdd/DATA/Cookies.binarycookies" +insta_mount_point="/mnt/hdd/DATA" +insta_default_users=(calisto.c farbenfuchs_ psykick.fox darkblondii_ tixteafox) diff --git a/.environment.d/youtube.env b/.environment.d/youtube.env new file mode 100644 index 0000000..eda4317 --- /dev/null +++ b/.environment.d/youtube.env @@ -0,0 +1,2 @@ +TUBE_TOKEN_NAME_IN_STORE="tube.lan" +TUBE_DEFAULT_USERS=("littlesiha" "lenaindica") From a76a4c1c68b337918c1418e1c3946f7ed40936e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Sun, 8 Jun 2025 15:34:16 +0200 Subject: [PATCH 28/30] Revert "feat(nas): add nas.env" This reverts commit 3824cae23e79051286daa3dd29aea242684bdf42. --- .environment.d/01_nas.env | 2 +- .environment.d/git.env | 4 ---- .environment.d/insta.env | 5 ----- .environment.d/youtube.env | 2 -- 4 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 .environment.d/git.env delete mode 100644 .environment.d/insta.env delete mode 100644 .environment.d/youtube.env diff --git a/.environment.d/01_nas.env b/.environment.d/01_nas.env index 5a0b4fa..f4fdb3b 100644 --- a/.environment.d/01_nas.env +++ b/.environment.d/01_nas.env @@ -1,3 +1,3 @@ -NAS_IP="127.0.0.1" +NAS_IP="192.168.84.3" NAS_USER="janolehuebner" NAS_TOKEN_NAME_IN_STORE="sudo-lana" diff --git a/.environment.d/git.env b/.environment.d/git.env deleted file mode 100644 index a9b15d6..0000000 --- a/.environment.d/git.env +++ /dev/null @@ -1,4 +0,0 @@ -GIT_AUTHOR_NAME="Jan-Ole Hübner" -GIT_AUTHOR_EMAIL="jan-ole@huebner.pink" -GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME -GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL diff --git a/.environment.d/insta.env b/.environment.d/insta.env deleted file mode 100644 index b4b846f..0000000 --- a/.environment.d/insta.env +++ /dev/null @@ -1,5 +0,0 @@ -insta_share_on_nas="/mnt/hdd/DATA" -insta_path_on_nas="social/insta" -insta_cookiefile="/mnt/hdd/DATA/Cookies.binarycookies" -insta_mount_point="/mnt/hdd/DATA" -insta_default_users=(calisto.c farbenfuchs_ psykick.fox darkblondii_ tixteafox) diff --git a/.environment.d/youtube.env b/.environment.d/youtube.env deleted file mode 100644 index eda4317..0000000 --- a/.environment.d/youtube.env +++ /dev/null @@ -1,2 +0,0 @@ -TUBE_TOKEN_NAME_IN_STORE="tube.lan" -TUBE_DEFAULT_USERS=("littlesiha" "lenaindica") From fda1a3706b54b72b238dcb25207cdd396d038fc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Sun, 8 Jun 2025 15:38:16 +0200 Subject: [PATCH 29/30] chore: add nas env to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0f385d5..6316ddf 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ public/ dev/ keyfile.keyx *.log +.environment.d/01_nas.env From 5e6f5c6014215e39a666a879584ba420736405b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20H=C3=BCbner?= Date: Sun, 8 Jun 2025 15:41:22 +0200 Subject: [PATCH 30/30] chore(env): repair env commits --- .environment.d/{01_nas.env => 01_nas.env.skel} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .environment.d/{01_nas.env => 01_nas.env.skel} (73%) diff --git a/.environment.d/01_nas.env b/.environment.d/01_nas.env.skel similarity index 73% rename from .environment.d/01_nas.env rename to .environment.d/01_nas.env.skel index f4fdb3b..5a0b4fa 100644 --- a/.environment.d/01_nas.env +++ b/.environment.d/01_nas.env.skel @@ -1,3 +1,3 @@ -NAS_IP="192.168.84.3" +NAS_IP="127.0.0.1" NAS_USER="janolehuebner" NAS_TOKEN_NAME_IN_STORE="sudo-lana"