Updates
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
{
|
{
|
||||||
"editor.rulers": [80, 100, 120],
|
"editor.rulers": [
|
||||||
|
80,
|
||||||
|
100,
|
||||||
|
120
|
||||||
|
],
|
||||||
"editor.fontLigatures": true,
|
"editor.fontLigatures": true,
|
||||||
"files.watcherExclude": {
|
"files.watcherExclude": {
|
||||||
"**/.bloop": true,
|
"**/.bloop": true,
|
||||||
@@ -18,7 +22,6 @@
|
|||||||
"editor.codeLensFontFamily": "FiraCode",
|
"editor.codeLensFontFamily": "FiraCode",
|
||||||
"metals.enableIndentOnPaste": true,
|
"metals.enableIndentOnPaste": true,
|
||||||
"editor.detectIndentation": false,
|
"editor.detectIndentation": false,
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
||||||
"vetur.format.options.tabSize": 4,
|
"vetur.format.options.tabSize": 4,
|
||||||
"monkeyC.developerKeyPath": "/home/chris/.config/connectiq/developer_key",
|
"monkeyC.developerKeyPath": "/home/chris/.config/connectiq/developer_key",
|
||||||
"monkeyC.typeCheckLevel": "Off",
|
"monkeyC.typeCheckLevel": "Off",
|
||||||
@@ -31,5 +34,9 @@
|
|||||||
"files.trimTrailingWhitespace": false
|
"files.trimTrailingWhitespace": false
|
||||||
},
|
},
|
||||||
"editor.formatOnPaste": true,
|
"editor.formatOnPaste": true,
|
||||||
"editor.formatOnSave": true,
|
"[php]": {
|
||||||
|
"editor.defaultFormatter": "DEVSENSE.phptools-vscode"
|
||||||
|
},
|
||||||
|
"prettier.tabWidth": 4,
|
||||||
|
"prettier.enable": false
|
||||||
}
|
}
|
||||||
@@ -167,4 +167,4 @@ set -o ignoreeof # Stop CTRL-D from quitting
|
|||||||
# Load syntax highlighting; should be last.
|
# Load syntax highlighting; should be last.
|
||||||
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null
|
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null
|
||||||
|
|
||||||
[ -f /etc/profile.d/autojump.sh ] && source /etc/profile.d/autojump.sh
|
[[ -s /etc/profile.d/autojump.sh ]] && source /etc/profile.d/autojump.sh
|
||||||
|
|||||||
62
.local/bin/fa_dd_download
Executable file
62
.local/bin/fa_dd_download
Executable file
@@ -0,0 +1,62 @@
|
|||||||
|
#! /bin/zsh
|
||||||
|
|
||||||
|
target_dir="/home/chris/.local/share/Dungeondraft/asset_packs"
|
||||||
|
download_dir="/home/chris/Downloads"
|
||||||
|
|
||||||
|
for file in $download_dir/FA_(Objects|Textures)_*.zip; do
|
||||||
|
dir=$(mktemp -d)
|
||||||
|
unzip -qq $file -d $dir
|
||||||
|
|
||||||
|
extracted=$(find "$dir" -type f -name "*.dungeondraft_pack")
|
||||||
|
|
||||||
|
if [[ -z "$extracted" ]]; then
|
||||||
|
echo "No .dungeondraft_pack file found in the ZIP."
|
||||||
|
rm -rf "$dir"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Extracted file: $extracted"
|
||||||
|
|
||||||
|
# Extract the version number from the filename
|
||||||
|
file=$(basename "$extracted")
|
||||||
|
basename=$(echo "$file" | grep -oP '^FA_[^_]+_[^_]+')
|
||||||
|
version_rx="v([0-9]+\.[0-9]+)"
|
||||||
|
if [[ "$file" =~ v([0-9]+\.[0-9]+) ]]; then
|
||||||
|
new_version=${match[1]}
|
||||||
|
else
|
||||||
|
echo "Could not extract version number from filename."
|
||||||
|
rm -rf "$fir"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "New version detected: $new_version"
|
||||||
|
|
||||||
|
# Check for an existing file in the target directory
|
||||||
|
existing=$(ls "$target_dir"/"${basename}"_v*.dungeondraft_pack 2>/dev/null | head -n 1)
|
||||||
|
|
||||||
|
if [[ -n "$existing" ]]; then
|
||||||
|
existing_filename=$(basename "$existing")
|
||||||
|
if [[ "$existing_filename" =~ v([0-9]+\.[0-9]+) ]]; then
|
||||||
|
existing_version=${match[1]}
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Existing file found: $existing_filename (Version: $existing_version)"
|
||||||
|
|
||||||
|
if [[ "$existing_version" == "$new_version" ]]; then
|
||||||
|
echo "Same version already exists. No action taken."
|
||||||
|
rm -rf "$dir"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Different version detected. Removing old version."
|
||||||
|
rm -f "$existing"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Move the new file to the target directory
|
||||||
|
mv "$extracted" "$target_dir"
|
||||||
|
|
||||||
|
echo "File moved to $target_dir: $filename"
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf "$dir"
|
||||||
|
done
|
||||||
@@ -3,7 +3,8 @@
|
|||||||
target_dir="/home/chris/Foundry/FA"
|
target_dir="/home/chris/Foundry/FA"
|
||||||
download_dir="/home/chris/Downloads"
|
download_dir="/home/chris/Downloads"
|
||||||
|
|
||||||
for file in $download_dir/(FA_|Creature_Tokens)*.zip; do
|
for file in $download_dir/(Creature_Tokens|Adversaries_|Epic_Creatures_)*.zip; do
|
||||||
|
echo "Unzipping ${file}"
|
||||||
dir=$(mktemp -d)
|
dir=$(mktemp -d)
|
||||||
unzip -qq $file -d $dir
|
unzip -qq $file -d $dir
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
|
|
||||||
notebook="$(joplin ls / --sort updated_time | dmenu -i -l 30)"
|
|
||||||
|
|
||||||
[ -z "$notebook" ] && exit 1;
|
|
||||||
|
|
||||||
joplin use "$notebook"
|
|
||||||
|
|
||||||
joplin
|
|
||||||
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
|
|
||||||
notebook="$(joplin ls / --sort updated_time | dmenu -i -l 30)"
|
|
||||||
|
|
||||||
[ -z "$notebook" ] && exit 1;
|
|
||||||
|
|
||||||
joplin use "$notebook"
|
|
||||||
|
|
||||||
notes="$(joplin ls --sort updated_time --long)"
|
|
||||||
|
|
||||||
index="$(echo "$notes" | cut -d" " -f4- | dmenu -n -ix -i -l 30 || exit 1)"
|
|
||||||
|
|
||||||
[ -z "$index" ] && exit 1;
|
|
||||||
|
|
||||||
line="$(($index + 1))"
|
|
||||||
|
|
||||||
id="$(echo "$notes" | sed "${line}q;d")"
|
|
||||||
|
|
||||||
echo "$id"
|
|
||||||
|
|
||||||
joplin edit "$id"
|
|
||||||
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if echo "$1" | grep "https*://\S\+\.[A-Za-z]\+\S*" >/dev/null; then
|
|
||||||
url="$1"
|
|
||||||
else
|
|
||||||
url="$(grep -Eom1 '<[^>]+(rel="self"|application/[a-z]+\+xml)[^>]+>' "$1" |
|
|
||||||
sed -E 's_^.*href="(https?://[^"]+)".*$_\1_')"
|
|
||||||
|
|
||||||
! grep "https*://\S\+\.[A-Za-z]\+\S*" <<<"$url" &&
|
|
||||||
notify-send "That doesn't look like a full URL." && exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
RSSFILE="${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls"
|
|
||||||
if awk '{print $1}' "$RSSFILE" | grep "^$url$" >/dev/null; then
|
|
||||||
notify-send "You already have this RSS feed."
|
|
||||||
else
|
|
||||||
echo "$url" >> "$RSSFILE" && notify-send "RSS feed added."
|
|
||||||
fi
|
|
||||||
Reference in New Issue
Block a user