mirror of
https://github.com/ksyasuda/dotfiles.git
synced 2025-12-05 02:53:38 -08:00
Compare commits
6 Commits
3628e70b72
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
a93761b042
|
|||
|
a1ec1a54ba
|
|||
|
|
7b7fae9b91 | ||
|
d8a0e95bb5
|
|||
|
154f9e3ea6
|
|||
|
4983623860
|
@@ -26,7 +26,6 @@ monitorv2 {
|
|||||||
scale = 1
|
scale = 1
|
||||||
vrr = 2
|
vrr = 2
|
||||||
cm = srgb
|
cm = srgb
|
||||||
|
|
||||||
# Optional HDR settings
|
# Optional HDR settings
|
||||||
# cm = hdr
|
# cm = hdr
|
||||||
# bitdepth = 10
|
# bitdepth = 10
|
||||||
@@ -40,6 +39,7 @@ monitorv2 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
source = ~/.config/hypr/keybindings.conf
|
source = ~/.config/hypr/keybindings.conf
|
||||||
|
source = ~/.config/hypr/windowrules.conf
|
||||||
source = ~/.config/hypr/macchiato.conf
|
source = ~/.config/hypr/macchiato.conf
|
||||||
|
|
||||||
# unscale XWayland
|
# unscale XWayland
|
||||||
@@ -248,7 +248,8 @@ misc {
|
|||||||
font_family = JetBrainsMono Nerd Font
|
font_family = JetBrainsMono Nerd Font
|
||||||
}
|
}
|
||||||
|
|
||||||
# {{{ WORKSPACES
|
# {{{ WORKSPACES - HANDLED IN WAYBAR CONFIG
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||||
# workspace = name:,monitor:DP-1
|
# workspace = name:,monitor:DP-1
|
||||||
# workspace = 2,monitor:DP-1,defaultName:
|
# workspace = 2,monitor:DP-1,defaultName:
|
||||||
# workspace = 2,monitor:DP-1,persistent:false
|
# workspace = 2,monitor:DP-1,persistent:false
|
||||||
@@ -262,48 +263,7 @@ misc {
|
|||||||
# workspace = 10,monitor:DP-3,persistent:false
|
# workspace = 10,monitor:DP-3,persistent:false
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
|
||||||
##############################
|
|
||||||
### WINDOWS AND WORKSPACES ###
|
|
||||||
##############################
|
|
||||||
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
|
|
||||||
|
|
||||||
# windowrule = match:class my-window, border_size 10
|
# windowrule = match:class my-window, border_size 10
|
||||||
windowrule = float on, match:class discord
|
|
||||||
windowrule = float on, match:class mpv
|
|
||||||
windowrule = float on, match:class steam
|
|
||||||
windowrule = float on, match:class anki
|
|
||||||
windowrule = float on, match:class python, match:title Import
|
|
||||||
windowrule = workspace 10 silent, match:class discord
|
|
||||||
windowrule = workspace 9 silent, match:class steam
|
|
||||||
windowrule = workspace 8 silent, match:class anki
|
|
||||||
windowrule = match:float 1, match:class discord, center on
|
|
||||||
windowrule = match:float 1, match:class steam, center on
|
|
||||||
windowrule = size 2118 1182, match:class anki
|
|
||||||
# windowrule = opacity 0.88, match:class .* fullscreen:0
|
|
||||||
windowrule = opacity 1.0 override, match:class mpv
|
|
||||||
windowrule = opacity 1.0 override, match:title (.*)asbplayer
|
|
||||||
windowrule = tile on, match:title (.*)asbplayer
|
|
||||||
windowrule = opacity 1.0 override, match:class ^(remote-viewer)$
|
|
||||||
windowrule = opacity 1.0 override, match:class com.obsproject.Studio
|
|
||||||
windowrule = opacity 1.0 override, match:title (.*)(- YouTube(.*))
|
|
||||||
windowrule = opacity 1.0 override, match:class zen, match:title (.*)YouTube TV(.*)
|
|
||||||
windowrule = opacity 1.0 override, match:class anki
|
|
||||||
# Ignore maximize requests from apps. You'll probably like this.
|
|
||||||
windowrule = suppress_event maximize, match:class .*
|
|
||||||
# Fix some dragging issues with XWayland
|
|
||||||
windowrule = no_focus on,match:class ^$,match:title ^$,match:xwayland 1,match:float 1,match:fullscreen 0,match:pin 0
|
|
||||||
|
|
||||||
# {{{ Screen sharing workaround: https://wiki.hyprland.org/Useful-Utilities/Screen-Sharing/#xwayland
|
|
||||||
windowrule = opacity 0.0 override, match:class ^(xwaylandvideobridge)$
|
|
||||||
windowrule = no_anim on, match:class ^(xwaylandvideobridge)$
|
|
||||||
windowrule = no_initial_focus on, match:class ^(xwaylandvideobridge)$
|
|
||||||
windowrule = max_size 1 1, match:class ^(xwaylandvideobridge)$
|
|
||||||
windowrule = no_blur on, match:class ^(xwaylandvideobridge)$
|
|
||||||
windowrule = no_focus on, match:class ^(xwaylandvideobridge)$
|
|
||||||
# }}}
|
|
||||||
|
|
||||||
debug {
|
debug {
|
||||||
disable_logs = true
|
disable_logs = true
|
||||||
|
|||||||
Submodule .config/mpv-modules/mpv-anilist-updater updated: a5851c4c0e...8c1630d8e6
Submodule .config/mpv-modules/mpvacious updated: 4a6700e182...9f9e9df06d
@@ -25,7 +25,7 @@ sub-fix-timing=yes
|
|||||||
sub-ass-override=scale
|
sub-ass-override=scale
|
||||||
sub-gauss=1.0
|
sub-gauss=1.0
|
||||||
sub-gray=yes
|
sub-gray=yes
|
||||||
sub-pos=90
|
sub-pos=100
|
||||||
|
|
||||||
# --- Audio chain ---
|
# --- Audio chain ---
|
||||||
volume=75
|
volume=75
|
||||||
@@ -154,9 +154,11 @@ ytdl-raw-options-append=sponsorblock-mark=all
|
|||||||
ytdl-raw-options-append=sponsorblock-remove=sponsor,selfpromo,interaction
|
ytdl-raw-options-append=sponsorblock-remove=sponsor,selfpromo,interaction
|
||||||
ytdl-format=bestvideo+bestaudio/best
|
ytdl-format=bestvideo+bestaudio/best
|
||||||
sub-auto=fuzzy
|
sub-auto=fuzzy
|
||||||
slang=ja,jpn
|
alang=ja,jp,jpn,japanese,en,eng,english,English,enUS,en-US
|
||||||
alang=ja,jpn
|
slang=ja,jp,jpn,japanese,en,eng,english,English,enUS,en-US
|
||||||
vlang=ja,jpn
|
vlang=ja,jpn
|
||||||
|
subs-with-matching-audio=yes
|
||||||
|
sub-font="Noto Sans CJK JP Regular"
|
||||||
glsl-shaders="~~/shaders/ArtCNN_C4F32.glsl"
|
glsl-shaders="~~/shaders/ArtCNN_C4F32.glsl"
|
||||||
scale=ewa_lanczossharp
|
scale=ewa_lanczossharp
|
||||||
dither=error-diffusion
|
dither=error-diffusion
|
||||||
@@ -164,7 +166,7 @@ deband=yes # Crucial for anime gradients
|
|||||||
|
|
||||||
[anime-subs]
|
[anime-subs]
|
||||||
profile-cond=p["slang"] == "ja" or p["slang"] == "ja.hi"
|
profile-cond=p["slang"] == "ja" or p["slang"] == "ja.hi"
|
||||||
sub-font="Noto Sans CJK JP"
|
sub-font="Noto Sans CJK JP Regular"
|
||||||
sub-font-size=42
|
sub-font-size=42
|
||||||
sub-border-size=1.2
|
sub-border-size=1.2
|
||||||
sub-shadow-color=0.0/0.0/0.0/0.6
|
sub-shadow-color=0.0/0.0/0.0/0.6
|
||||||
|
|||||||
@@ -186,14 +186,15 @@ ytdl-raw-options-append=sponsorblock-mark=all
|
|||||||
ytdl-raw-options-append=sponsorblock-remove=sponsor
|
ytdl-raw-options-append=sponsorblock-remove=sponsor
|
||||||
ytdl-format=bestvideo+bestaudio/best
|
ytdl-format=bestvideo+bestaudio/best
|
||||||
sub-auto=fuzzy
|
sub-auto=fuzzy
|
||||||
slang=ja,jpn,ja.hi,ja.*
|
alang=ja,jp,jpn,japanese,en,eng,english,English,enUS,en-US
|
||||||
alang=ja,jpn
|
slang=ja,jp,jpn,japanese,en,eng,english,English,enUS,en-US
|
||||||
vlang=ja,jpn
|
vlang=ja,jpn
|
||||||
sub-font="Noto Sans CJK JP"
|
subs-with-matching-audio=yes
|
||||||
sub-font-size=42
|
sub-font="Noto Sans CJK JP Regular"
|
||||||
sub-border-size=1.2
|
glsl-shaders="~~/shaders/ArtCNN_C4F32.glsl"
|
||||||
sub-shadow-color=0.0/0.0/0.0/0.6
|
scale=ewa_lanczossharp
|
||||||
sub-shadow-offset=3
|
dither=error-diffusion
|
||||||
|
deband=yes # Crucial for anime gradients
|
||||||
|
|
||||||
# Anime subtitles profile
|
# Anime subtitles profile
|
||||||
[anime-subs]
|
[anime-subs]
|
||||||
|
|||||||
@@ -436,6 +436,14 @@ local misc_utilities_mappings = {
|
|||||||
end,
|
end,
|
||||||
group = "mkdir under cursor",
|
group = "mkdir under cursor",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
mode = "v",
|
||||||
|
key = "<leader>m",
|
||||||
|
cmd = function()
|
||||||
|
mkdir_under_cursor()
|
||||||
|
end,
|
||||||
|
group = "mkdir selection",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,20 @@ local M = {}
|
|||||||
vim.notify = require("notify")
|
vim.notify = require("notify")
|
||||||
|
|
||||||
function M.mkdir_under_cursor()
|
function M.mkdir_under_cursor()
|
||||||
-- Get the word under the cursor
|
local word
|
||||||
local word = vim.fn.expand("<cWORD>")
|
|
||||||
|
-- Check if in visual mode
|
||||||
|
if vim.fn.mode():match("[vV]") then
|
||||||
|
-- Get visual selection
|
||||||
|
local start_pos = vim.fn.getpos("'<")
|
||||||
|
local end_pos = vim.fn.getpos("'>")
|
||||||
|
local line = vim.fn.getline(start_pos[2])
|
||||||
|
word = line:sub(start_pos[3], end_pos[3])
|
||||||
|
else
|
||||||
|
-- Get word under cursor
|
||||||
|
word = vim.fn.expand("<cWORD>")
|
||||||
|
end
|
||||||
|
|
||||||
-- Remove quotes if present
|
-- Remove quotes if present
|
||||||
word = word:gsub("^[\"']", ""):gsub("[\"']$", "")
|
word = word:gsub("^[\"']", ""):gsub("[\"']$", "")
|
||||||
-- Check if directory exists
|
-- Check if directory exists
|
||||||
|
|||||||
@@ -10,8 +10,10 @@
|
|||||||
"Cloudflare - https://dash.cloudflare.com/",
|
"Cloudflare - https://dash.cloudflare.com/",
|
||||||
"CoinMarketCap - https://coinmarketcap.com/",
|
"CoinMarketCap - https://coinmarketcap.com/",
|
||||||
"Deemix - http://pve-main:3358",
|
"Deemix - http://pve-main:3358",
|
||||||
|
"Ephemera - https://ephemera.suda.codes",
|
||||||
"F1TV - https://f1tv.suda.codes",
|
"F1TV - https://f1tv.suda.codes",
|
||||||
"Fidelity - https://login.fidelity.com/",
|
"Fidelity - https://login.fidelity.com/",
|
||||||
|
"Ghstats - http://oracle-vm:3340",
|
||||||
"Gitea - https://gitea.suda.codes",
|
"Gitea - https://gitea.suda.codes",
|
||||||
"Github - https://github.com",
|
"Github - https://github.com",
|
||||||
"Ghostfolio - http://pve-main:3334",
|
"Ghostfolio - http://pve-main:3334",
|
||||||
@@ -23,7 +25,7 @@
|
|||||||
"Jellyfin (Vue) - http://pve-main:8098",
|
"Jellyfin (Vue) - http://pve-main:8098",
|
||||||
"Karakeep - https://karakeep.suda.codes",
|
"Karakeep - https://karakeep.suda.codes",
|
||||||
"Komodo - https://komodo.suda.codes",
|
"Komodo - https://komodo.suda.codes",
|
||||||
"Komga - http://oracle-vm:3332",
|
"Komga - http://pve-main:3332",
|
||||||
"Lidarr - http://pve-main:3357",
|
"Lidarr - http://pve-main:3357",
|
||||||
"MeTube - https://metube.suda.codes",
|
"MeTube - https://metube.suda.codes",
|
||||||
"Navidrome - https://navidrome.suda.codes",
|
"Navidrome - https://navidrome.suda.codes",
|
||||||
@@ -32,7 +34,8 @@
|
|||||||
"Pihole - https://pihole.suda.codes/admin",
|
"Pihole - https://pihole.suda.codes/admin",
|
||||||
"Pihole2 - https://pihole2.suda.codes/admin",
|
"Pihole2 - https://pihole2.suda.codes/admin",
|
||||||
"Proxmox - https://thebox.unicorn-ilish.ts.net",
|
"Proxmox - https://thebox.unicorn-ilish.ts.net",
|
||||||
"qBittorrent - https://qbit.suda.codes",
|
"qBittorrent - https://qbittorrent.suda.codes",
|
||||||
|
"qui - https://qui.suda.codes",
|
||||||
"Plausible - https://plausible.sudacode.com",
|
"Plausible - https://plausible.sudacode.com",
|
||||||
"Paperless - https://paperless.suda.codes",
|
"Paperless - https://paperless.suda.codes",
|
||||||
"Prometheus - http://prometheus:9090",
|
"Prometheus - http://prometheus:9090",
|
||||||
@@ -42,6 +45,7 @@
|
|||||||
"Sabnzbd - https://sabnzbd.suda.codes",
|
"Sabnzbd - https://sabnzbd.suda.codes",
|
||||||
"Sonarr - https://sonarr.suda.codes",
|
"Sonarr - https://sonarr.suda.codes",
|
||||||
"Sonarr Anime - http://pve-main:6969",
|
"Sonarr Anime - http://pve-main:6969",
|
||||||
|
"Speedtest Tracker - http://pve-main:8765",
|
||||||
"Sudacode - https://sudacode.com",
|
"Sudacode - https://sudacode.com",
|
||||||
"Suwayomi - https://suwayomi.suda.codes",
|
"Suwayomi - https://suwayomi.suda.codes",
|
||||||
"Tailscale - https://login.tailscale.com/admin/machines",
|
"Tailscale - https://login.tailscale.com/admin/machines",
|
||||||
|
|||||||
@@ -31,6 +31,9 @@ generate_thumbnail() {
|
|||||||
local temp_thumb="/tmp/rmpv-thumbnail-$$.jpg"
|
local temp_thumb="/tmp/rmpv-thumbnail-$$.jpg"
|
||||||
local thumbnail_file="${video_file%.*}.jpg"
|
local thumbnail_file="${video_file%.*}.jpg"
|
||||||
|
|
||||||
|
# Clean up previous thumbnail
|
||||||
|
rm -f "$THUMBNAIL_PATH"
|
||||||
|
|
||||||
# Validate input
|
# Validate input
|
||||||
if [[ -z "$video_file" ]]; then
|
if [[ -z "$video_file" ]]; then
|
||||||
echo "Error: No video file specified" >&2
|
echo "Error: No video file specified" >&2
|
||||||
@@ -51,28 +54,39 @@ generate_thumbnail() {
|
|||||||
# Generate thumbnail if it doesn't exist
|
# Generate thumbnail if it doesn't exist
|
||||||
if [[ ! -f "$thumbnail_file" ]]; then
|
if [[ ! -f "$thumbnail_file" ]]; then
|
||||||
echo "Generating thumbnail for $(basename "$video_file")..."
|
echo "Generating thumbnail for $(basename "$video_file")..."
|
||||||
if ! ffmpeg -i "$video_file" \
|
# Try generating thumbnail side-by-side
|
||||||
-vf "select='gt(scene,0.4)',scale=320:240:force_original_aspect_ratio=decrease,pad=320:240:(ow-iw)/2:(oh-ih)/2" \
|
if ! ffmpeg -ss 00:00:01 -i "$video_file" \
|
||||||
|
-vf "scale=320:240:force_original_aspect_ratio=decrease,pad=320:240:(ow-iw)/2:(oh-ih)/2" \
|
||||||
-frames:v 1 \
|
-frames:v 1 \
|
||||||
-q:v 4 \
|
-q:v 4 \
|
||||||
"$thumbnail_file" \
|
"$thumbnail_file" \
|
||||||
-loglevel error -y 2>/dev/null; then
|
-loglevel error -y 2>/dev/null; then
|
||||||
echo "Error: Failed to generate thumbnail" >&2
|
|
||||||
return 1
|
# Fallback to temp file if side-by-side fails (e.g. read-only fs)
|
||||||
|
echo "Warning: Failed to write to $thumbnail_file, trying temp location" >&2
|
||||||
|
thumbnail_file="$temp_thumb"
|
||||||
|
|
||||||
|
if ! ffmpeg -ss 00:00:01 -i "$video_file" \
|
||||||
|
-vf "scale=320:240:force_original_aspect_ratio=decrease,pad=320:240:(ow-iw)/2:(oh-ih)/2" \
|
||||||
|
-frames:v 1 \
|
||||||
|
-q:v 4 \
|
||||||
|
"$thumbnail_file" \
|
||||||
|
-loglevel error -y 2>/dev/null; then
|
||||||
|
echo "Error: Failed to generate thumbnail" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy to temporary location with error handling
|
# Copy to consistent location for notify-send
|
||||||
if ! cp "$thumbnail_file" "$temp_thumb" 2>/dev/null; then
|
# We use a fixed path so notify-send always finds it
|
||||||
echo "Error: Failed to copy thumbnail to temporary location" >&2
|
if cp "$thumbnail_file" "$THUMBNAIL_PATH" 2>/dev/null; then
|
||||||
return 1
|
echo "Thumbnail ready at: $THUMBNAIL_PATH"
|
||||||
|
ls -l "$THUMBNAIL_PATH"
|
||||||
|
file "$THUMBNAIL_PATH"
|
||||||
|
else
|
||||||
|
echo "Error: Failed to copy thumbnail to $THUMBNAIL_PATH" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create symlink for consistent access
|
|
||||||
ln -sf "$temp_thumb" /tmp/rmpv-thumbnail.jpg 2>/dev/null
|
|
||||||
sleep 0.1
|
|
||||||
|
|
||||||
echo "Thumbnail ready: $temp_thumb"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
choice="$(find . -iname "*[.mkv|.mp4]" | sort -h | rofi -dmenu -i -theme "$THEME" -theme-str 'listview {columns: 1; lines: 15;} window {width: 88%;}' -p "Choose Video")"
|
choice="$(find . -iname "*[.mkv|.mp4]" | sort -h | rofi -dmenu -i -theme "$THEME" -theme-str 'listview {columns: 1; lines: 15;} window {width: 88%;}' -p "Choose Video")"
|
||||||
@@ -89,3 +103,4 @@ notify-send -i "$THUMBNAIL_PATH" "Playing Video" "$(basename "$choice")"
|
|||||||
$COMMAND "$choice" &
|
$COMMAND "$choice" &
|
||||||
|
|
||||||
# vim: ft=sh
|
# vim: ft=sh
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user