mirror of
https://github.com/ksyasuda/dotfiles.git
synced 2026-02-04 06:36:35 -08:00
Compare commits
7 Commits
5b9cbbba99
...
da80481d63
| Author | SHA1 | Date | |
|---|---|---|---|
|
da80481d63
|
|||
|
e6c89cf38b
|
|||
|
35357f1674
|
|||
|
bd6eefe084
|
|||
| 4eda790932 | |||
| d57275597d | |||
| 75a9cc360c |
@@ -1 +0,0 @@
|
||||
settings.json##os.Linux
|
||||
@@ -39,6 +39,5 @@
|
||||
"excludedCommands": [
|
||||
"docker"
|
||||
]
|
||||
},
|
||||
"model": "haiku"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ bind = $mainMod SHIFT, j, movewindow, d
|
||||
bind = $mainMod SHIFT, k, movewindow, u
|
||||
bind = $mainMod SHIFT, h, movewindow, l
|
||||
bind = $mainMod SHIFT, l, movewindow, r
|
||||
bind = CTRL+SHIFT, c, centerwindow
|
||||
bind = $mainMod+SHIFT, c, centerwindow
|
||||
|
||||
|
||||
# Move focus to next monitor
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
{
|
||||
"subtitlePosition": {
|
||||
"yPercent": 15.376111685625649
|
||||
},
|
||||
"keybindings": [
|
||||
{
|
||||
"key": "Space",
|
||||
"command": [
|
||||
"cycle",
|
||||
"pause"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "ArrowRight",
|
||||
"command": [
|
||||
"seek",
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "ArrowLeft",
|
||||
"command": [
|
||||
"seek",
|
||||
-5
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "Ctrl+Shift+KeyN",
|
||||
"command": [
|
||||
"script-binding",
|
||||
"mpvacious-export-note"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "Ctrl+KeyC",
|
||||
"command": [
|
||||
"script-binding",
|
||||
"mpvacious-copy-primary-sub-to-clipboard"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "Ctrl+Shift+KeyV",
|
||||
"command": [
|
||||
"script-binding",
|
||||
"mpvacious-secondary-sid-toggle"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "Shift+KeyL",
|
||||
"command": [
|
||||
"script-binding",
|
||||
"mpvacious-sub-seek-forward"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "Shift+KeyH",
|
||||
"command": [
|
||||
"script-binding",
|
||||
"mpvacious-sub-seek-back"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "Ctrl+Shift+KeyH",
|
||||
"command": [
|
||||
"script-binding",
|
||||
"mpvacious-sub-replay"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "Ctrl+Shift+KeyL",
|
||||
"command": [
|
||||
"script-binding",
|
||||
"mpvacious-sub-play-up-to-next"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "Ctrl+KeyV",
|
||||
"command": [
|
||||
"script-binding",
|
||||
"animecards/update-anki-card"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "KeyQ",
|
||||
"command": [
|
||||
"quit"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "Ctrl+KeyW",
|
||||
"command": [
|
||||
"quit"
|
||||
]
|
||||
}
|
||||
],
|
||||
"texthooker": {
|
||||
"openBrowser": false
|
||||
},
|
||||
"websocket": {
|
||||
"enabled": "auto",
|
||||
"port": 6677
|
||||
},
|
||||
"ankiConnect": {
|
||||
"enabled": true,
|
||||
"url": "http://127.0.0.1:8765",
|
||||
"deck": "Minecraft",
|
||||
"pollingRate": 200,
|
||||
"audioField": "ExpressionAudio",
|
||||
"imageField": "Picture",
|
||||
"sentenceField": "Sentence",
|
||||
"generateAudio": true,
|
||||
"generateImage": true,
|
||||
"imageType": "avif",
|
||||
"imageFormat": "webp",
|
||||
"miscInfoPattern": "[mpv-yomitan] %f (%t)",
|
||||
"overwriteAudio": true,
|
||||
"overwriteImage": true,
|
||||
"highlightWord": true,
|
||||
"showNotificationOnUpdate": true,
|
||||
"audioPadding": 0.5,
|
||||
"fallbackDuration": 3
|
||||
}
|
||||
}
|
||||
96
.config/mpv-yomitan-overlay/config.jsonc
Normal file
96
.config/mpv-yomitan-overlay/config.jsonc
Normal file
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"subtitlePosition": {
|
||||
"yPercent": 16.541882109617372,
|
||||
},
|
||||
"keybindings": [
|
||||
{
|
||||
"key": "Space",
|
||||
"command": ["cycle", "pause"],
|
||||
},
|
||||
{
|
||||
"key": "ArrowRight",
|
||||
"command": ["seek", 5],
|
||||
},
|
||||
{
|
||||
"key": "ArrowLeft",
|
||||
"command": ["seek", -5],
|
||||
},
|
||||
{
|
||||
"key": "Ctrl+Shift+KeyN",
|
||||
"command": ["script-binding", "mpvacious-export-note"],
|
||||
},
|
||||
{
|
||||
"key": "Ctrl+Shift+KeyV",
|
||||
"command": ["script-binding", "mpvacious-secondary-sid-toggle"],
|
||||
},
|
||||
{
|
||||
"key": "Shift+KeyL",
|
||||
"command": ["script-binding", "mpvacious-sub-seek-forward"],
|
||||
},
|
||||
{
|
||||
"key": "Shift+KeyH",
|
||||
"command": ["script-binding", "mpvacious-sub-seek-back"],
|
||||
},
|
||||
{
|
||||
"key": "Ctrl+Shift+KeyH",
|
||||
"command": ["script-binding", "mpvacious-sub-replay"],
|
||||
},
|
||||
{
|
||||
"key": "Ctrl+Shift+KeyL",
|
||||
"command": ["script-binding", "mpvacious-sub-play-up-to-next"],
|
||||
},
|
||||
{
|
||||
"key": "KeyQ",
|
||||
"command": ["quit"],
|
||||
},
|
||||
{
|
||||
"key": "Ctrl+KeyW",
|
||||
"command": ["quit"],
|
||||
},
|
||||
],
|
||||
"texthooker": {
|
||||
"openBrowser": false,
|
||||
},
|
||||
"websocket": {
|
||||
"enabled": "auto",
|
||||
"port": 6677,
|
||||
},
|
||||
"ankiConnect": {
|
||||
"enabled": true,
|
||||
"url": "http://127.0.0.1:8765",
|
||||
"deck": "Minecraft",
|
||||
"pollingRate": 200,
|
||||
"audioField": "ExpressionAudio",
|
||||
"imageField": "Picture",
|
||||
"sentenceField": "Sentence",
|
||||
"generateAudio": true,
|
||||
"generateImage": true,
|
||||
"imageType": "avif",
|
||||
"imageFormat": "webp",
|
||||
"miscInfoPattern": "[mpv-yomitan] %f (%t)",
|
||||
"overwriteAudio": false,
|
||||
"overwriteImage": true,
|
||||
"highlightWord": true,
|
||||
"showNotificationOnUpdate": true,
|
||||
"notificationType": "system",
|
||||
"audioPadding": 0.5,
|
||||
"fallbackDuration": 3,
|
||||
"animatedFps": 24,
|
||||
"animatedMaxWidth": 640,
|
||||
"animatedMaxHeight": null,
|
||||
"animatedCrf": 35,
|
||||
"autoUpdateNewCards": false,
|
||||
"sentenceCardModel": "Lapis Morph",
|
||||
"sentenceCardSentenceField": "Sentence",
|
||||
"sentenceCardAudioField": "SentenceAudio",
|
||||
"isLapis": true,
|
||||
},
|
||||
"shortcuts": {
|
||||
"copySubtitle": "CommandOrControl+C",
|
||||
"copySubtitleMultiple": "CommandOrControl+Shift+C",
|
||||
"updateLastCardFromClipboard": "CommandOrControl+V",
|
||||
"mineSentence": "CommandOrControl+S",
|
||||
"mineSentenceMultiple": "CommandOrControl+Shift+S",
|
||||
"multiCopyTimeoutMs": 3000,
|
||||
},
|
||||
}
|
||||
@@ -8,7 +8,7 @@ dither=fruit # Lightweight dithering
|
||||
ontop=yes
|
||||
border=no
|
||||
no-border
|
||||
autofit=50% # Reasonable default size
|
||||
autofit=69% # Reasonable default size
|
||||
|
||||
# Audio (macOS-specific)
|
||||
volume=75
|
||||
@@ -155,7 +155,7 @@ profile-cond=width >= 1920 and filename:match("mkv$|mp4$")
|
||||
glsl-shaders=""
|
||||
scale=ewa_lanczos
|
||||
target-peak=800
|
||||
hdr-tone-mapping=bt.2390
|
||||
# hdr-tone-mapping=bt.2390
|
||||
|
||||
# HDR profile
|
||||
[hdr]
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
../../submodules/mpv-anilist-updater/anilistUpdater/anilistUpdater.py
|
||||
@@ -1 +0,0 @@
|
||||
../../submodules/mpv-anilist-updater/anilistUpdater/main.lua
|
||||
@@ -1 +1 @@
|
||||
../../../projects/lua/mpv-youtube-queue/mpv-youtube-queue.lua
|
||||
../../mpv-modules/mpv-youtube-queue/mpv-youtube-queue.lua
|
||||
@@ -1,17 +1,17 @@
|
||||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ import sys
|
||||
|
||||
import requests
|
||||
|
||||
# Configuration
|
||||
OPENROUTER_API_KEY = os.environ.get("OPENROUTER_API_KEY", "")
|
||||
MODEL = os.environ.get("OPENROUTER_MODEL", "google/gemini-2.0-flash-001")
|
||||
# MODEL = os.environ.get("OPENROUTER_MODEL", "google/gemini-2.0-flash-001")
|
||||
MODEL = os.environ.get("OPENROUTER_MODEL", "openai/gpt-oss-120b:free")
|
||||
API_URL = "https://openrouter.ai/api/v1/chat/completions"
|
||||
|
||||
# Try to load API key from file if not in environment
|
||||
|
||||
@@ -7,74 +7,74 @@ VIDEO_EXTENSIONS="mkv|mp4|avi|webm|mov|flv|wmv|m4v|ts|m2ts"
|
||||
|
||||
# Parse command-line options first
|
||||
while getopts ":it:" opt; do
|
||||
case $opt in
|
||||
i)
|
||||
COMMAND="$COMMAND --profile=immersion"
|
||||
;;
|
||||
t)
|
||||
THEME="$OPTARG"
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
exit 1
|
||||
;;
|
||||
:)
|
||||
echo "Option -$OPTARG requires an argument." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
case $opt in
|
||||
i)
|
||||
COMMAND="$COMMAND --profile=immersion"
|
||||
;;
|
||||
t)
|
||||
THEME="$OPTARG"
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
exit 1
|
||||
;;
|
||||
:)
|
||||
echo "Option -$OPTARG requires an argument." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
find_videos() {
|
||||
find "$PWD" -maxdepth 1 -type f -regextype posix-extended \
|
||||
-iregex ".*\.($VIDEO_EXTENSIONS)$" 2>/dev/null | sort -V
|
||||
find "$PWD" -maxdepth 1 -type f -regextype posix-extended \
|
||||
-iregex ".*\.($VIDEO_EXTENSIONS)$" 2> /dev/null | sort -V
|
||||
}
|
||||
|
||||
build_rofi_menu() {
|
||||
while IFS= read -r video; do
|
||||
[ -z "$video" ] && continue
|
||||
local display_name
|
||||
display_name=$(basename "$video")
|
||||
printf '%s\0icon\x1fthumbnail://%s\n' "$display_name" "$video"
|
||||
done < <(find_videos)
|
||||
while IFS= read -r video; do
|
||||
[ -z "$video" ] && continue
|
||||
local display_name
|
||||
display_name=$(basename "$video")
|
||||
printf '%s\0icon\x1fthumbnail://%s\n' "$display_name" "$video"
|
||||
done < <(find_videos)
|
||||
}
|
||||
|
||||
get_video_thumbnail() {
|
||||
local video="$1"
|
||||
local thumb_dir="$HOME/.cache/thumbnails/large"
|
||||
local video_uri="file://$(realpath "$video")"
|
||||
local thumb_hash=$(echo -n "$video_uri" | md5sum | cut -d' ' -f1)
|
||||
local thumb_path="$thumb_dir/$thumb_hash.png"
|
||||
local video="$1"
|
||||
local thumb_dir="$HOME/.cache/thumbnails/large"
|
||||
local video_uri="file://$(realpath "$video")"
|
||||
local thumb_hash=$(echo -n "$video_uri" | md5sum | cut -d' ' -f1)
|
||||
local thumb_path="$thumb_dir/$thumb_hash.png"
|
||||
|
||||
if [[ -f "$thumb_path" ]]; then
|
||||
echo "$thumb_path"
|
||||
return 0
|
||||
fi
|
||||
if [[ -f "$thumb_path" ]]; then
|
||||
echo "$thumb_path"
|
||||
return 0
|
||||
fi
|
||||
|
||||
local tmp_thumb="/tmp/rmpv-thumb-$$.jpg"
|
||||
if command -v ffmpegthumbnailer &>/dev/null; then
|
||||
ffmpegthumbnailer -i "$video" -o "$tmp_thumb" -s 512 -q 5 2>/dev/null && echo "$tmp_thumb"
|
||||
elif command -v ffmpeg &>/dev/null; then
|
||||
ffmpeg -i "$video" -ss 00:00:30 -vframes 1 -vf "scale=512:-1" "$tmp_thumb" 2>/dev/null && echo "$tmp_thumb"
|
||||
fi
|
||||
local tmp_thumb="/tmp/rmpv-thumb-$$.jpg"
|
||||
if command -v ffmpegthumbnailer &> /dev/null; then
|
||||
ffmpegthumbnailer -i "$video" -o "$tmp_thumb" -s 512 -q 5 2> /dev/null && echo "$tmp_thumb"
|
||||
elif command -v ffmpeg &> /dev/null; then
|
||||
ffmpeg -i "$video" -ss 00:00:30 -vframes 1 -vf "scale=512:-1" "$tmp_thumb" 2> /dev/null && echo "$tmp_thumb"
|
||||
fi
|
||||
}
|
||||
|
||||
selection=$(build_rofi_menu | rofi -dmenu -i -show-icons -theme "$THEME" \
|
||||
-theme-str 'listview {columns: 1; lines: 15;} window {width: 88%;}' -p "Choose Video ")
|
||||
-theme-str 'configuration {font: "JetBrainsMono Nerd Font 10";} listview {columns: 1; lines: 15;} window {width: 88%;}' -p "Choose Video ")
|
||||
|
||||
if [[ -z "$selection" ]]; then
|
||||
echo "No video selected."
|
||||
exit 1
|
||||
echo "No video selected."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
choice="./$selection"
|
||||
|
||||
THUMBNAIL_PATH=$(get_video_thumbnail "$choice")
|
||||
if [[ -n "$THUMBNAIL_PATH" && -f "$THUMBNAIL_PATH" ]]; then
|
||||
notify-send -i "$THUMBNAIL_PATH" "Playing Video" "$(basename "$choice")"
|
||||
notify-send -i "$THUMBNAIL_PATH" "Playing Video" "$(basename "$choice")"
|
||||
else
|
||||
notify-send "Playing Video" "$(basename "$choice")"
|
||||
notify-send "Playing Video" "$(basename "$choice")"
|
||||
fi
|
||||
$COMMAND "$choice" &
|
||||
|
||||
|
||||
Reference in New Issue
Block a user