diff --git a/.config/fastfetch/config.jsonc b/.config/fastfetch/config.jsonc new file mode 100644 index 0000000..d6ca8dc --- /dev/null +++ b/.config/fastfetch/config.jsonc @@ -0,0 +1,31 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "modules": [ + "colors", + "break", + "host", + "kernel", + "uptime", + "shell", + "de", + "terminal", + "cpu", + "gpu", + "memory", + { "type": "localip", "key": "IP" } + ], + "display": { + "key": { "width": 11 }, + "percent": { "type": 2 } + }, + "logo": { + "type": "iterm", + "source": "~/.config/fastfetch/neko.gif", + "width": 14, + "height": 7, + "padding": { + "top": 2, + "left": 2 + } + } +} diff --git a/.config/fastfetch/neko.gif b/.config/fastfetch/neko.gif new file mode 100644 index 0000000..ed07203 Binary files /dev/null and b/.config/fastfetch/neko.gif differ diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 921ae15..8971373 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,16 +1,16 @@ { - "barbar.nvim": { "branch": "master", "commit": "807bede7ef1d8e2ac5f108e9ac8123b1e2d321e3" }, - "catppuccin": { "branch": "main", "commit": "4bb938bbba41d306db18bf0eb0633a5f28fd7ba0" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, - "conform.nvim": { "branch": "master", "commit": "a6f5bdb78caa305496357d17e962bbc4c0b392e2" }, - "gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" }, + "barbar.nvim": { "branch": "master", "commit": "3a74402bdf04745a762de83d5c5e88e3e9b0e2e0" }, + "catppuccin": { "branch": "main", "commit": "1bf070129c0b6f77cc23f6a2212dcdc868308c52" }, + "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, + "conform.nvim": { "branch": "master", "commit": "372fc521f8421b7830ea6db4d6ea3bae1c77548c" }, + "gitsigns.nvim": { "branch": "main", "commit": "7ce11abbb8b038a9de4fb6f75d8289c58d81aed7" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "neo-tree.nvim": { "branch": "v3.x", "commit": "e96fd85bf18bc345dab332b345098fa5460dffac" }, - "nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" }, - "nvim-cmp": { "branch": "main", "commit": "5a11682453ac6b13dbf32cd403da4ee9c07ef1c3" }, - "nvim-lspconfig": { "branch": "master", "commit": "99c75820f2606b6b446cad7c75ec2ef7ee8a1317" }, - "nvim-web-devicons": { "branch": "master", "commit": "1020869742ecb191f260818234517f4a1515cfe8" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "1ef260eb4f54515fe121a2267b477efb054d108a" }, + "nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" }, + "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, + "nvim-lspconfig": { "branch": "master", "commit": "4bc481b6f0c0cf3671fc894debd0e00347089a4e" }, + "nvim-web-devicons": { "branch": "master", "commit": "2c2b4eafce6cdd0cb165036faa17396eff18f847" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } diff --git a/.config/nvim/lua/plugins/cattpuucin.lua b/.config/nvim/lua/plugins/cattpuucin.lua index 08076e1..d62245c 100644 --- a/.config/nvim/lua/plugins/cattpuucin.lua +++ b/.config/nvim/lua/plugins/cattpuucin.lua @@ -15,7 +15,7 @@ return { mantle = "#000000" }, }, - transparent_background = false, + transparent_background = true, no_italic = false, no_bold = false, styles = { diff --git a/.config/nvim/lua/plugins/lazy.lua b/.config/nvim/lua/plugins/lazy.lua new file mode 100644 index 0000000..61991e6 --- /dev/null +++ b/.config/nvim/lua/plugins/lazy.lua @@ -0,0 +1,34 @@ +vim.api.nvim_create_autocmd("User", { + pattern = "LazyUpdate", + callback = function() + vim.schedule(function() + local home = os.getenv("HOME") or "~/" + + local cmd = { + "yadm", + "-C", + string.format("%s", home), + "commit", + ".config/nvim/lazy-lock.json", + "-m", + "Update lazy-lock.json" + } + + local success, process = pcall(function() + return vim.system(cmd):wait() + end) + + if process and process.code == 0 then + vim.notify("Committed lazy-lock") + else + if not success then + vim.notify("Failed to run command") + else + vim.notify("Git ran, but nothing committed") + end + end + end) + end +}) + +return {} diff --git a/.config/scripts/cron/backup-server.sh b/.config/scripts/cron/backup-server.sh index db892a7..0c15b34 100755 --- a/.config/scripts/cron/backup-server.sh +++ b/.config/scripts/cron/backup-server.sh @@ -41,6 +41,18 @@ export B2_ACCOUNT_KEY=$(getSecret "/server/mac-mini-1/b2-account-key") --exclude ".pnpm-store" \ --exclude ".Trashes" | jq 'select(.message_type | test("summary"))' > /tmp/restic-backup.json +/usr/local/bin/restic forget \ + --password-file <(source /Users/noahheague/.config/scripts/util/secret.sh; getSecret '/server/mac-mini-1/restic-key') \ + --keep-daily 7 \ + --keep-weekly 5 \ + --keep-monthly 12 \ + --keep-yearly 1 \ + -r b2:pfych-home-server-backup + +/usr/local/bin/restic prune \ + --password-file <(source /Users/noahheague/.config/scripts/util/secret.sh; getSecret '/server/mac-mini-1/restic-key') \ + -r b2:pfych-home-server-backup + /Users/noahheague/.config/scripts/util/webhook.sh \ -c "backup" \ -m "Restic Backup Completed!" diff --git a/.config/scripts/cron/check-manga.sh b/.config/scripts/cron/check-manga.sh deleted file mode 100755 index d2763f1..0000000 --- a/.config/scripts/cron/check-manga.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -BASE="https://fanfox.net/manga" -declare -a TO_CHECK=( - "the_guy_she_was_interested_in_wasn_t_a_guy_at_all|The Guy She Was Interested In Wasn't A Guy At All" -) - -for MANGA in "${TO_CHECK[@]}" -do - URL=$(echo $MANGA | cut -d "|" -f1) - PRETTY_NAME=$(echo $MANGA | cut -d "|" -f2) - - LAST_CHAPTER=$(cat "/tmp/$URL.txt"); - LATEST_CHAPTER=$(curl "$BASE/$URL/" \ - --cookie "isAdult=1" \ - | perl -ne 'm|detail-main-list">(.\|\n)*?title3">(.*?)<\/p>| && print "$2"' - ) - - if [ ! -f "/tmp/$MANGA.txt" ] && [[ "$LATEST_CHAPTER" != "$LAST_CHAPTER" ]]; then - /Users/noahheague/.config/scripts/util/webhook.sh \ - -c "manga" \ - -m "New chapter of $PRETTY_NAME ($LATEST_CHAPTER)" - fi - - echo $LATEST_CHAPTER > "/tmp/$URL.txt"; -done - diff --git a/.config/wezterm/wezterm.lua b/.config/wezterm/wezterm.lua index 6cfd2a3..a8affa7 100644 --- a/.config/wezterm/wezterm.lua +++ b/.config/wezterm/wezterm.lua @@ -1,9 +1,12 @@ local wezterm = require 'wezterm' local config = wezterm.config_builder() +local opacity = 0.85 config.font = wezterm.font('Monaco Nerd Font Mono', { weight = 'Medium' }) config.font_size = 12 config.freetype_load_target = 'Normal' +config.window_background_opacity = opacity +config.macos_window_background_blur = 20 if wezterm.gui.get_appearance():find "Dark" then config.color_scheme = 'Catppuccin Mocha' @@ -14,4 +17,18 @@ else config.color_scheme = 'Catppuccin Latte' end +wezterm.on('update-status', function(window) + local overrides = window:get_config_overrides() or {} + + if window:is_focused() then + overrides.window_background_opacity = opacity + else + overrides.window_background_opacity = opacity / 1.25 + end + + + + window:set_config_overrides(overrides) +end) + return config diff --git a/.config/zsh/plugins.sh b/.config/zsh/plugins.sh index 7d8af98..f37999a 100644 --- a/.config/zsh/plugins.sh +++ b/.config/zsh/plugins.sh @@ -7,6 +7,9 @@ source "$CONFIGDIR/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" ZSH_AUTOSUGGEST_USE_ASYNC=true ZSH_AUTOSUGGEST_STRATEGY=(history completion) +# FZF +source <(fzf --zsh) + # Prompt configPrompt() { case $(uname -n) in diff --git a/.config/zsh/shared.sh b/.config/zsh/shared.sh index 095d76a..fa6103e 100644 --- a/.config/zsh/shared.sh +++ b/.config/zsh/shared.sh @@ -1,3 +1,17 @@ +# Setup ZSH History +SAVEHIST=1000 +HISTSIZE=1000 +HISTFILE=~/.zsh_history +setopt hist_ignore_all_dups +setopt hist_ignore_space +setopt extendedglob +HISTORY_IGNORE='(git reset*|reboot|shutdown|exit|cd ..|cd ~|..|~|clear)' + +setopt SHARE_HISTORY +setopt HIST_IGNORE_ALL_DUPS +setopt HIST_EXPIRE_DUPS_FIRST +setopt HIST_REDUCE_BLANKS + # Use NVIM alias vim=nvim @@ -19,3 +33,5 @@ alias a=fuck # Load extra functions source "$CONFIGDIR/scripts/scripts.sh" + +fastfetch;