Compare commits
No commits in common. "main" and "lazy-nvim" have entirely different histories.
27 changed files with 116 additions and 3636 deletions
|
@ -1,31 +0,0 @@
|
||||||
{
|
|
||||||
"$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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
Before Width: | Height: | Size: 495 KiB |
|
@ -1,10 +0,0 @@
|
||||||
/* MacOS Specific padding for buttons */
|
|
||||||
@media (-moz-platform: macos) {
|
|
||||||
#TabsToolbar {
|
|
||||||
padding: 6px 0 !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.toolbar-items {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
|
@ -19,7 +19,7 @@ vim.opt.rtp:prepend(lazypath)
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = { { import = "plugins" } },
|
spec = { { import = "plugins" } },
|
||||||
install = { colorscheme = { "catppuccin" } },
|
install = { colorscheme = { "catppuccin" } },
|
||||||
checker = { enabled = true, notify = false }
|
checker = { enabled = true }
|
||||||
})
|
})
|
||||||
|
|
||||||
-- General vim
|
-- General vim
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
{
|
{
|
||||||
"barbar.nvim": { "branch": "master", "commit": "549ee11d97057eae207bafa2c23c315942cca097" },
|
"barbar.nvim": { "branch": "master", "commit": "807bede7ef1d8e2ac5f108e9ac8123b1e2d321e3" },
|
||||||
"catppuccin": { "branch": "main", "commit": "30fa4d122d9b22ad8b2e0ab1b533c8c26c4dde86" },
|
"catppuccin": { "branch": "main", "commit": "4bb938bbba41d306db18bf0eb0633a5f28fd7ba0" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "9ddab4e14c44196d393a72b958b4da6dab99ecef" },
|
"conform.nvim": { "branch": "master", "commit": "a6f5bdb78caa305496357d17e962bbc4c0b392e2" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" },
|
"gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "cea666ef965884414b1b71f6b39a537f9238bdb2" },
|
"neo-tree.nvim": { "branch": "v3.x", "commit": "e96fd85bf18bc345dab332b345098fa5460dffac" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
"nvim-cmp": { "branch": "main", "commit": "5a11682453ac6b13dbf32cd403da4ee9c07ef1c3" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "ce45ccd6a97be8752ed83d1e14ac2aff1d5a4238" },
|
"nvim-lspconfig": { "branch": "master", "commit": "99c75820f2606b6b446cad7c75ec2ef7ee8a1317" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "c2599a81ecabaae07c49ff9b45dcd032a8d90f1a" },
|
"nvim-web-devicons": { "branch": "master", "commit": "1020869742ecb191f260818234517f4a1515cfe8" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||||
"todo.txt-vim": { "branch": "master", "commit": "3bb5f9cf0d6c7ee91b476a97054c336104d2b6f5" },
|
|
||||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ return {
|
||||||
mantle = "#000000"
|
mantle = "#000000"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
transparent_background = true,
|
transparent_background = false,
|
||||||
no_italic = false,
|
no_italic = false,
|
||||||
no_bold = false,
|
no_bold = false,
|
||||||
styles = {
|
styles = {
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
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 {}
|
|
|
@ -1,3 +0,0 @@
|
||||||
return {
|
|
||||||
"freitass/todo.txt-vim"
|
|
||||||
}
|
|
|
@ -1,8 +1,3 @@
|
||||||
local function insert_current_date()
|
|
||||||
local date = vim.fn.system('date "+%a %d %b"'):gsub('\n', '')
|
|
||||||
vim.api.nvim_put({date}, 'c', false, true)
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
|
@ -13,7 +8,5 @@ return {
|
||||||
{ "<leader>s", "<cmd>:Telescope live_grep<cr>", desc = "Search file content (requires ripgrep)" },
|
{ "<leader>s", "<cmd>:Telescope live_grep<cr>", desc = "Search file content (requires ripgrep)" },
|
||||||
{ "<leader>>", "<cmd>:lua vim.diagnostic.goto_next()<cr>", desc = "Jump to next issue" },
|
{ "<leader>>", "<cmd>:lua vim.diagnostic.goto_next()<cr>", desc = "Jump to next issue" },
|
||||||
{ "<leader><", "<cmd>:lua vim.diagnostic.goto_prev()<cr>", desc = "Jump to prev issue" },
|
{ "<leader><", "<cmd>:lua vim.diagnostic.goto_prev()<cr>", desc = "Jump to prev issue" },
|
||||||
{ "<leader>t", insert_current_date, desc = "Enter current date" },
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -41,18 +41,6 @@ export B2_ACCOUNT_KEY=$(getSecret "/server/mac-mini-1/b2-account-key")
|
||||||
--exclude ".pnpm-store" \
|
--exclude ".pnpm-store" \
|
||||||
--exclude ".Trashes" | jq 'select(.message_type | test("summary"))' > /tmp/restic-backup.json
|
--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 \
|
/Users/noahheague/.config/scripts/util/webhook.sh \
|
||||||
-c "backup" \
|
-c "backup" \
|
||||||
-m "Restic Backup Completed!"
|
-m "Restic Backup Completed!"
|
||||||
|
|
27
.config/scripts/cron/check-manga.sh
Executable file
27
.config/scripts/cron/check-manga.sh
Executable file
|
@ -0,0 +1,27 @@
|
||||||
|
#!/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
|
||||||
|
|
|
@ -12,8 +12,6 @@ source ~/.config/scripts/tool/git.sh
|
||||||
source ~/.config/scripts/tool/kill.sh
|
source ~/.config/scripts/tool/kill.sh
|
||||||
# Generate thumbnails for videos
|
# Generate thumbnails for videos
|
||||||
source ~/.config/scripts/tool/thumb.sh
|
source ~/.config/scripts/tool/thumb.sh
|
||||||
# Scratch
|
|
||||||
source ~/.config/scripts/tool/scratch.sh
|
|
||||||
|
|
||||||
# Text colour utility variables
|
# Text colour utility variables
|
||||||
source ~/.config/scripts/util/colours.sh
|
source ~/.config/scripts/util/colours.sh
|
||||||
|
|
|
@ -30,9 +30,7 @@ function commit() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$BRANCH_NAME" != 'master' -a "$BRANCH_NAME" != 'main' -a "$BRANCH_NAME" != 'rnd'; then
|
if test "$BRANCH_NAME" != 'master' -a "$BRANCH_NAME" != 'main' -a "$BRANCH_NAME" != 'rnd'; then
|
||||||
# Disabling due to practice changes at new job
|
git commit -m "[$BRANCH_NAME] $*"
|
||||||
# git commit -m "[$BRANCH_NAME] $*"
|
|
||||||
git commit -m "$*"
|
|
||||||
else
|
else
|
||||||
echo "$RED_TEXT\nAre you sure you want to commit directly to $BRANCH_NAME?$DEFAULT_TEXT"
|
echo "$RED_TEXT\nAre you sure you want to commit directly to $BRANCH_NAME?$DEFAULT_TEXT"
|
||||||
select answer in "Yes" "No"; do
|
select answer in "Yes" "No"; do
|
||||||
|
|
|
@ -1,11 +1,45 @@
|
||||||
function note () {
|
function nscratch () {
|
||||||
NOTE_LOCATION=~/todo.txt
|
requestedDate=$(date +"%y-%m-%d")
|
||||||
INPUT=${1:-"TODAY"}
|
if [ ! -e ~/Documents/Scratchpad-now/$requestedDate-write.md ]; then
|
||||||
DATE=$(date --date="$INPUT" '+%a %d %b')
|
touch ~/Documents/Scratchpad-now/$requestedDate-write.md
|
||||||
|
echo "---" >> ~/Documents/Scratchpad-now/$requestedDate-write.md
|
||||||
TOTAL_LINES=$(wc -l $NOTE_LOCATION | cut -d' ' -f8)
|
echo "title: " >> ~/Documents/Scratchpad-now/$requestedDate-write.md
|
||||||
DATE_LINE=$(grep -Fn "$DATE" $NOTE_LOCATION | cut -d':' -f1)
|
echo "---" >> ~/Documents/Scratchpad-now/$requestedDate-write.md
|
||||||
JUMP_TO=${DATE_LINE:-$TOTAL_LINES}
|
echo "" >> ~/Documents/Scratchpad-now/$requestedDate-write.md
|
||||||
|
echo "Today I " >> ~/Documents/Scratchpad-now/$requestedDate-write.md
|
||||||
vim $NOTE_LOCATION +$JUMP_TO
|
fi
|
||||||
|
vim ~/Documents/Scratchpad-now/$requestedDate-write.md
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function codeScratch () {
|
||||||
|
cd ~/Developer/Scratch/ || exit
|
||||||
|
DATE=$(date +"%y-%m-%d")
|
||||||
|
if test ! -d "$(pwd)/$DATE"; then
|
||||||
|
mkdir "$(pwd)/$DATE";
|
||||||
|
cd "$(pwd)/$DATE" || exit
|
||||||
|
|
||||||
|
# Setup project
|
||||||
|
pnpm init
|
||||||
|
pnpm install @types/node ts-node-dev typescript prettier -D
|
||||||
|
if test ! $# -eq 0; then
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
pnpm install $*
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Essential files
|
||||||
|
echo '{"compilerOptions": {"module": "commonjs","esModuleInterop": true,"target": "es6","moduleResolution": "node","sourceMap": true,"outDir": "dist"},"lib": ["es2015"]}' > tsconfig.json
|
||||||
|
echo 'module.exports={semi: true,singleQuote: true,tabWidth: 2,trailingComma: "all",arrowParens: "always",printWidth: 80};' > .prettierrc.js
|
||||||
|
echo 'console.log("hello world")' > scratch.ts
|
||||||
|
jq '.scripts = { start: "ts-node-dev --respawn scratch.ts" }' package.json > tmp.json
|
||||||
|
rm package.json
|
||||||
|
mv tmp.json package.json
|
||||||
|
else
|
||||||
|
cd "$(pwd)/$DATE"
|
||||||
|
fi
|
||||||
|
# Start editor session
|
||||||
|
# tmux new-session \; \
|
||||||
|
# send-keys 'vim scratch.ts' C-m \; \
|
||||||
|
# split-window -v \; \
|
||||||
|
# send-keys 'yarn start' C-m \;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
19
.config/scripts/util/mouse-battery.sh
Executable file
19
.config/scripts/util/mouse-battery.sh
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
DETAILS=$(rivalcfg --battery-level)
|
||||||
|
STATUS=$(echo $DETAILS | cut -d' ' -f1)
|
||||||
|
LEVEL=$(echo $DETAILS | cut -d']' -f2 | tr -d '[:space:]')
|
||||||
|
|
||||||
|
if [ "$STATUS" != 'Discharging' ] && [ "$STATUS" != 'Charging' ]; then
|
||||||
|
cat /tmp/last-mouse-level.txt
|
||||||
|
else
|
||||||
|
if [ $STATUS == 'Discharging' ]; then
|
||||||
|
STATUS_EMOJI='🐁'
|
||||||
|
else
|
||||||
|
STATUS_EMOJI='⚡'
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "| $STATUS_EMOJI $LEVEL |" > /tmp/last-mouse-level.txt
|
||||||
|
cat /tmp/last-mouse-level.txt
|
||||||
|
fi
|
||||||
|
|
|
@ -1,90 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
NOW=$(date +%s)
|
|
||||||
|
|
||||||
# TODO: Consider refactoring to return via stdout for POSIX compatibility
|
|
||||||
# instead of using nameref (local -n) which isn't POSIX-compatible
|
|
||||||
# eg. MOUSE_STRING=$(debounce MOUSE_STRING 3600 "get_mouse_text" "fallback")
|
|
||||||
debounce () {
|
|
||||||
local -n VAR_REFERENCE=$1 # Funky Bash Pass-by-reference here!
|
|
||||||
VAR_NAME="$1"
|
|
||||||
DEBOUNCE_TIME="$2" # In Seconds
|
|
||||||
FUNCTION=$3
|
|
||||||
FALLBACK=$4
|
|
||||||
|
|
||||||
if [ ! -f "/tmp/debounce-$VAR_NAME" ]; then
|
|
||||||
VAR_REFERENCE="$($FUNCTION)"
|
|
||||||
echo "$(date +%s)" > "/tmp/debounce-$VAR_NAME"
|
|
||||||
else
|
|
||||||
LAST_CHECK=$(cat "/tmp/debounce-$VAR_NAME")
|
|
||||||
|
|
||||||
if [ $(($NOW - $LAST_CHECK)) -gt $DEBOUNCE_TIME ]; then
|
|
||||||
VAR_REFERENCE="$($FUNCTION)"
|
|
||||||
echo "$(date +%s)" > "/tmp/debounce-$VAR_NAME"
|
|
||||||
else
|
|
||||||
VAR_REFERENCE="$(eval "$FALLBACK")"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
get_mouse_text () {
|
|
||||||
MOUSE_DETAILS=$(rivalcfg --battery-level)
|
|
||||||
MOUSE_STATUS=$(echo $MOUSE_DETAILS | cut -d' ' -f1)
|
|
||||||
MOUSE_BATTERY=$(echo $MOUSE_DETAILS | cut -d']' -f2 | tr -d '[:space:]')
|
|
||||||
|
|
||||||
if [ "$MOUSE_STATUS" != 'Discharging' ] && [ "$MOUSE_STATUS" != 'Charging' ]; then
|
|
||||||
cat /tmp/last-mouse-level
|
|
||||||
else
|
|
||||||
if [ $MOUSE_STATUS == 'Discharging' ]; then
|
|
||||||
MOUSE_STATUS_EMOJI='🐁'
|
|
||||||
else
|
|
||||||
MOUSE_STATUS_EMOJI='⚡'
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$MOUSE_STATUS_EMOJI $MOUSE_BATTERY" > /tmp/last-mouse-level
|
|
||||||
cat /tmp/last-mouse-level
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
get_monero_text () {
|
|
||||||
MONERO_DETAILS=$(monerod status | grep "Height")
|
|
||||||
MONERO_PERCENT=$(echo $MONERO_DETAILS | cut -d" " -f3 | tr -d "()")
|
|
||||||
|
|
||||||
if [ -n "$MONERO_DETAILS" ]; then
|
|
||||||
echo "🟢 $MONERO_PERCENT" > /tmp/last-monero-value
|
|
||||||
else
|
|
||||||
echo "🔴" > /tmp/last-monero-value
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat /tmp/last-monero-value
|
|
||||||
}
|
|
||||||
|
|
||||||
get_date () {
|
|
||||||
date +%a" "%d" "%b" "%I:%M" "%P > /tmp/last-date
|
|
||||||
cat /tmp/last-date
|
|
||||||
}
|
|
||||||
|
|
||||||
get_temps () {
|
|
||||||
TEMP=$(sensors | grep Tctl | cut -d"+" -f 2 | cut -d"." -f 1)
|
|
||||||
|
|
||||||
echo "$TEMP°C" > /tmp/last-temp
|
|
||||||
cat /tmp/last-temp
|
|
||||||
}
|
|
||||||
|
|
||||||
debounce MOUSE_STRING 3600 \
|
|
||||||
"get_mouse_text" \
|
|
||||||
"cat /tmp/last-mouse-level || get_mouse_text";
|
|
||||||
|
|
||||||
debounce MONERO_STRING 60 \
|
|
||||||
"get_monero_text" \
|
|
||||||
"cat /tmp/last-monero-value || get_monero_text";
|
|
||||||
|
|
||||||
debounce DATE_STRING 5 \
|
|
||||||
"get_date" \
|
|
||||||
"cat /tmp/last-date || get_date";
|
|
||||||
|
|
||||||
debounce TEMP_STRING 5 \
|
|
||||||
"get_temps" \
|
|
||||||
"cat /tmp/last-temp || get_temps"
|
|
||||||
|
|
||||||
echo " $TEMP_STRING | $MOUSE_STRING | $MONERO_STRING | $DATE_STRING"
|
|
|
@ -1,13 +1,9 @@
|
||||||
local wezterm = require 'wezterm'
|
local wezterm = require 'wezterm'
|
||||||
local config = wezterm.config_builder()
|
local config = wezterm.config_builder()
|
||||||
local opacity = 0.85
|
|
||||||
|
|
||||||
config.font = wezterm.font('Monaco Nerd Font Mono', { weight = 'Medium' })
|
config.font = wezterm.font('Monaco Nerd Font Mono', { weight = 'Medium' })
|
||||||
config.font_size = 12
|
config.font_size = 12
|
||||||
config.freetype_load_target = 'Normal'
|
config.freetype_load_target = 'Normal'
|
||||||
config.window_background_opacity = opacity
|
|
||||||
config.macos_window_background_blur = 20
|
|
||||||
config.harfbuzz_features = {"calt=0", "clig=0", "liga=0"}
|
|
||||||
|
|
||||||
if wezterm.gui.get_appearance():find "Dark" then
|
if wezterm.gui.get_appearance():find "Dark" then
|
||||||
config.color_scheme = 'Catppuccin Mocha'
|
config.color_scheme = 'Catppuccin Mocha'
|
||||||
|
@ -18,18 +14,4 @@ else
|
||||||
config.color_scheme = 'Catppuccin Latte'
|
config.color_scheme = 'Catppuccin Latte'
|
||||||
end
|
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
|
return config
|
||||||
|
|
|
@ -6,9 +6,6 @@ fi
|
||||||
export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH:${HOME}/.local/bin:/usr/local/sbin:${HOME}/.local/share/gem/ruby/2.0.0/bin:/usr/local/bin"
|
export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH:${HOME}/.local/bin:/usr/local/sbin:${HOME}/.local/share/gem/ruby/2.0.0/bin:/usr/local/bin"
|
||||||
export ANDROID_SDK_ROOT=/Users/$USER/Library/Android/sdk
|
export ANDROID_SDK_ROOT=/Users/$USER/Library/Android/sdk
|
||||||
|
|
||||||
export LC_ALL=en_AU.UTF-8
|
|
||||||
export LANG=en_AU.UTF-8
|
|
||||||
|
|
||||||
eval "$(rbenv init - zsh)"
|
eval "$(rbenv init - zsh)"
|
||||||
|
|
||||||
alias date=gdate;
|
alias date=gdate;
|
||||||
|
|
|
@ -1,24 +1,16 @@
|
||||||
source "$CONFIGDIR/zsh/plugins/zsh-git-prompt/zshrc.sh"
|
source "$CONFIGDIR/zsh/plugins/zsh-git-prompt/zshrc.sh"
|
||||||
source "$CONFIGDIR/zsh/plugins/catppuccin-zsh-syntax-highlighting/themes/catppuccin_mocha-zsh-syntax-highlighting.zsh"
|
source "$CONFIGDIR/zsh/plugins/catppuccin-zsh-syntax-highlighting/themes/catppuccin_mocha-zsh-syntax-highlighting.zsh"
|
||||||
source "$CONFIGDIR/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh"
|
source "$CONFIGDIR/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
||||||
source "$CONFIGDIR/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
source "$CONFIGDIR/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
||||||
|
|
||||||
# Autocomplete
|
# Autocomplete
|
||||||
ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE="20"
|
|
||||||
ZSH_AUTOSUGGEST_USE_ASYNC=true
|
ZSH_AUTOSUGGEST_USE_ASYNC=true
|
||||||
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
||||||
|
|
||||||
# FZF
|
|
||||||
source <(fzf --zsh)
|
|
||||||
|
|
||||||
# NVM
|
|
||||||
export NVM_LAZY_LOAD=true
|
|
||||||
source "$CONFIGDIR/zsh/plugins/zsh-nvm/zsh-nvm.plugin.zsh"
|
|
||||||
|
|
||||||
# Prompt
|
# Prompt
|
||||||
configPrompt() {
|
configPrompt() {
|
||||||
case $(uname -n) in
|
case $(uname -n) in
|
||||||
" PPAU_MAC07") PROMPT_EMOJI="🌊";;
|
"Noahs-M3-MacBook-Pro.local") PROMPT_EMOJI="🌊";;
|
||||||
"Noahs-Mac-mini.local") PROMPT_EMOJI="💿";;
|
"Noahs-Mac-mini.local") PROMPT_EMOJI="💿";;
|
||||||
"pfych-desktop") PROMPT_EMOJI="✨";;
|
"pfych-desktop") PROMPT_EMOJI="✨";;
|
||||||
"violets-laptop") PROMPT_EMOJI="🏳️⚧️";;
|
"violets-laptop") PROMPT_EMOJI="🏳️⚧️";;
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 3d574ccf48804b10dca52625df13da5edae7f553
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 745291dcf20686ec421935f1c3f8f3a2918dd106
|
|
1
.config/zsh/plugins/zsh-syntax-highlighting
Submodule
1
.config/zsh/plugins/zsh-syntax-highlighting
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 5eb677bb0fa9a3e60f0eff031dc13926e093df92
|
|
@ -1,20 +1,11 @@
|
||||||
# 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
|
# Use NVIM
|
||||||
alias vim=nvim
|
alias vim=nvim
|
||||||
|
|
||||||
|
# NVM
|
||||||
|
export NVM_DIR="$CONFIGDIR/nvm"
|
||||||
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||||
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||||
|
|
||||||
# Nodejs
|
# Nodejs
|
||||||
export SKIP_PREFLIGHT_CHECK=true
|
export SKIP_PREFLIGHT_CHECK=true
|
||||||
|
|
||||||
|
@ -28,8 +19,3 @@ alias a=fuck
|
||||||
|
|
||||||
# Load extra functions
|
# Load extra functions
|
||||||
source "$CONFIGDIR/scripts/scripts.sh"
|
source "$CONFIGDIR/scripts/scripts.sh"
|
||||||
|
|
||||||
# Show fastfetch
|
|
||||||
if [ "$TERM_PROGRAM" = "WezTerm" ]; then
|
|
||||||
fastfetch;
|
|
||||||
fi
|
|
||||||
|
|
9
.gitmodules
vendored
9
.gitmodules
vendored
|
@ -1,15 +1,12 @@
|
||||||
[submodule ".config/zsh/plugins/zsh-git-prompt"]
|
[submodule ".config/zsh/plugins/zsh-git-prompt"]
|
||||||
path = .config/zsh/plugins/zsh-git-prompt
|
path = .config/zsh/plugins/zsh-git-prompt
|
||||||
url = https://github.com/zsh-git-prompt/zsh-git-prompt.git
|
url = https://github.com/zsh-git-prompt/zsh-git-prompt.git
|
||||||
|
[submodule ".config/zsh/plugins/zsh-syntax-highlighting"]
|
||||||
|
path = .config/zsh/plugins/zsh-syntax-highlighting
|
||||||
|
url = https://github.com/zsh-users/zsh-syntax-highlighting.git
|
||||||
[submodule ".config/zsh/plugins/zsh-autosuggestions"]
|
[submodule ".config/zsh/plugins/zsh-autosuggestions"]
|
||||||
path = .config/zsh/plugins/zsh-autosuggestions
|
path = .config/zsh/plugins/zsh-autosuggestions
|
||||||
url = https://github.com/zsh-users/zsh-autosuggestions
|
url = https://github.com/zsh-users/zsh-autosuggestions
|
||||||
[submodule ".config/zsh/plugins/catppuccin-zsh-syntax-highlighting"]
|
[submodule ".config/zsh/plugins/catppuccin-zsh-syntax-highlighting"]
|
||||||
path = .config/zsh/plugins/catppuccin-zsh-syntax-highlighting
|
path = .config/zsh/plugins/catppuccin-zsh-syntax-highlighting
|
||||||
url = https://github.com/catppuccin/zsh-syntax-highlighting.git
|
url = https://github.com/catppuccin/zsh-syntax-highlighting.git
|
||||||
[submodule ".config/zsh/plugins/zsh-nvm"]
|
|
||||||
path = .config/zsh/plugins/zsh-nvm
|
|
||||||
url = https://github.com/lukechilds/zsh-nvm.git
|
|
||||||
[submodule ".config/zsh/plugins/fast-syntax-highlighting"]
|
|
||||||
path = .config/zsh/plugins/fast-syntax-highlighting
|
|
||||||
url = https://github.com/zdharma-continuum/fast-syntax-highlighting
|
|
||||||
|
|
1
.zshrc
1
.zshrc
|
@ -15,4 +15,3 @@ source "$CONFIGDIR/zsh/shared.sh"
|
||||||
|
|
||||||
# Load plugin related items
|
# Load plugin related items
|
||||||
source "$CONFIGDIR/zsh/plugins.sh"
|
source "$CONFIGDIR/zsh/plugins.sh"
|
||||||
|
|
||||||
|
|
17
README.md
17
README.md
|
@ -4,23 +4,6 @@ Dot-files and scripts to be synced between my home system and work system
|
||||||
|
|
||||||
All ZSH plugins are submodules
|
All ZSH plugins are submodules
|
||||||
|
|
||||||
## Setup
|
|
||||||
```sh
|
```sh
|
||||||
# Using package manager
|
|
||||||
# Install: yadm thefuck fastfetch fzf
|
|
||||||
|
|
||||||
yadm clone ssh://git@git.pfy.ch/pfych/unix-config.git
|
|
||||||
yadm submodule update --init --recursive
|
yadm submodule update --init --recursive
|
||||||
```
|
```
|
||||||
|
|
||||||
## Firefox
|
|
||||||
|
|
||||||
Firefox profile location differs between MacOS & Linux, so the actual config files cannot be synced
|
|
||||||
|
|
||||||
1. Navigate to `about:config`
|
|
||||||
2. Enable `toolkit.legacyUserProfileCustomizations.stylesheets`
|
|
||||||
3. Disable `browser.tabs.inTitlebar`
|
|
||||||
4. Navigate to `about:support` and open `Profile folder`
|
|
||||||
5. Symlink `~/.config/firefox/chrome` to `<profile>/chrome`
|
|
||||||
6. Restart Firefox
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue