Compare commits

...

20 Commits

Author SHA1 Message Date
a93761b042 update 2025-12-04 22:42:27 -08:00
a1ec1a54ba update 2025-12-03 22:49:24 -08:00
kyasuda
7b7fae9b91 update 2025-12-03 14:12:00 -08:00
d8a0e95bb5 bump versions 2025-12-02 18:49:10 -08:00
154f9e3ea6 update 2025-12-02 18:48:58 -08:00
4983623860 update mpv config 2025-12-02 18:48:51 -08:00
3628e70b72 update 2025-12-01 18:40:58 -08:00
31cfb8dd1c fux docs script 2025-12-01 18:09:32 -08:00
3fc0b32a9d update 2025-11-30 22:58:47 -08:00
4005e4650e move float center window rule down 2025-11-30 22:58:39 -08:00
3b87c06731 update rofi scripts 2025-11-30 22:57:56 -08:00
099d5e8ba6 update 2025-11-30 12:25:38 -08:00
21d6320cc1 update to new monitor 2025-11-30 12:25:25 -08:00
kyasuda
cb3641a9d9 send input directly to codecompanion inline command 2025-11-25 09:32:26 -08:00
b2cda94362 update window rules to new format 2025-11-20 12:26:07 -08:00
36d458c378 set sub-pos 2025-11-18 23:48:27 -08:00
5ec72352b8 update 2025-11-18 22:36:38 -08:00
7378fe9826 disable vrr on monitors 2025-11-16 20:54:53 -08:00
2006748e1d update keybindings 2025-11-14 10:24:20 -08:00
db9b3b65f1 update mpv config and remove osc.conf 2025-11-13 22:07:31 -08:00
17 changed files with 481 additions and 431 deletions

View File

@@ -14,12 +14,34 @@
################
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=DP-1,2560x1440@144,0x0,1, vrr, 1
monitor=DP-3,2560x1440@144,2560x0,1, vrr, 1
# monitor=DP-1,2560x1440@144,0x0,1
# monitor=DP-3,2560x1440@144,2560x0,1
# vrr 2 enables vrr if application is fullscreen
# vrr 3 enables vrr if application is fullscreen and video or game content
# monitor = DP-1, 3440x1440@240,0x0,1,vrr,3
monitorv2 {
output = DP-1
mode = 3440x1440@240
position = 0x0
scale = 1
vrr = 2
cm = srgb
# Optional HDR settings
# cm = hdr
# bitdepth = 10
# sdr_min_luminance = 0.005
# sdr_max_luminance = 200
# min_luminance = 0
# max_luminance = 1000
# max_avg_luminance = 200
# sdrbrightness = 1.2
# sdrsaturation = 0.98
}
source = ~/.config/hypr/keybindings.conf
source = ~/.config/hypr/windowrules.conf
source = ~/.config/hypr/macchiato.conf
# source = ~/.config/hypr/env.conf
# unscale XWayland
xwayland {
force_zero_scaling = true
@@ -46,8 +68,8 @@ $notification_daemon = uwsm app -- swaync -c ~/.config/swaync/config.json
# Autostart necessary processes (like notifications daemons, status bars, etc.)
# Or execute your favorite apps at launch like this:
exec-once = uwsm app -sb -- hyprpm update -nn
exec-once = uwsm app -sb -- hyprpm reload -nn
exec-once = uwsm app -sb -- hyprpm update -n
exec-once = uwsm app -sb -- hyprpm reload -n
exec-once = $notification_daemon
exec-once = $terminal
exec-once = uwsm app -sb -S both -t scope -- hyprpm update -nn
@@ -166,10 +188,6 @@ animations {
# uncomment all if you wish to use that.
# workspace = w[tv1], gapsout:0, gapsin:0
# workspace = f[1], gapsout:0, gapsin:0
# windowrulev2 = bordersize 0, floating:0, onworkspace:w[tv1]
# windowrulev2 = rounding 0, floating:0, onworkspace:w[tv1]
# windowrulev2 = bordersize 0, floating:0, onworkspace:f[1]
# windowrulev2 = rounding 0, floating:0, onworkspace:f[1]
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
dwindle {
@@ -230,7 +248,8 @@ misc {
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 = 2,monitor:DP-1,defaultName:
# workspace = 2,monitor:DP-1,persistent:false
@@ -244,66 +263,9 @@ misc {
# workspace = 10,monitor:DP-3,persistent:false
# }}}
# windowrule = match:class my-window, border_size 10
##############################
### WINDOWS AND WORKSPACES ###
##############################
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
# Example windowrule v1
# windowrulev2 = float, class:com.mitchellh.ghostty
windowrule = float, class:discord
windowrule = float, class:mpv
windowrule = float, class:steam
windowrule = float, class:anki
windowrule = float, class:python, title:Import
windowrule = workspace 10 silent, class:discord
windowrule = workspace 9 silent, class:steam
windowrule = size 2118 1182, class:anki
windowrule = workspace 8 silent, class:anki
# windowrule = opacity 0.88, class:.* fullscreen:0
windowrule = opacity 1.0 override, class:mpv
windowrule = opacity 1.0 override, title:(.*)asbplayer
windowrule = tile, title:(.*)asbplayer
windowrule = opacity 1.0 override, class:^(remote-viewer)$
windowrule = opacity 1.0 override, class:com.obsproject.Studio
windowrule = opacity 1.0 override, title:(.*)(- YouTube(.*))
windowrule = opacity 1.0 override, class:zen, title:(.*)YouTube TV(.*)
windowrule = opacity 1.0 override, class:anki
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# Ignore maximize requests from apps. You'll probably like this.
windowrule = suppressevent maximize, class:.*
# Fix some dragging issues with XWayland
windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
# https://github.com/hyprwm/Hyprland/issues/3835#issuecomment-2004448245
windowrule = suppressevent maximize, class:^(zen)$
exec-once = $HOME/.local/bin/bitwarden-nofloat.sh
# ENABLE_HDR_WSI=1 mpv --vo=gpu-next --target-colorspace-hint --gpu-api=vulkan --gpu-context=waylandvk "filename"
# {{{ Screen sharing workaround: https://wiki.hyprland.org/Useful-Utilities/Screen-Sharing/#xwayland
windowrule = opacity 0.0 override, class:^(xwaylandvideobridge)$
windowrule = noanim, class:^(xwaylandvideobridge)$
windowrule = noinitialfocus, class:^(xwaylandvideobridge)$
windowrule = maxsize 1 1, class:^(xwaylandvideobridge)$
windowrule = noblur, class:^(xwaylandvideobridge)$
windowrule = nofocus, class:^(xwaylandvideobridge)$
# }}}
plugin {
split-monitor-workspaces {
count = 5
keep_focused = 1
enable_notifications = 1
enable_persistent_workspaces = 1
}
debug {
disable_logs = true
enable_stdout_logs = false
}

View File

@@ -40,28 +40,28 @@ bind = CTRL+ALT, j, focusmonitor, r
bind = CTRL+ALT, k, focusmonitor, l
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, split-workspace, 1
bind = $mainMod, 2, split-workspace, 2
bind = $mainMod, 3, split-workspace, 3
bind = $mainMod, 4, split-workspace, 4
bind = $mainMod, 5, split-workspace, 5
bind = $mainMod, 6, split-workspace, 6
bind = $mainMod, 7, split-workspace, 7
bind = $mainMod, 8, split-workspace, 8
bind = $mainMod, 9, split-workspace, 9
bind = $mainMod, 0, split-workspace, 10
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, split-movetoworkspacesilent, 1
bind = $mainMod SHIFT, 2, split-movetoworkspacesilent, 2
bind = $mainMod SHIFT, 3, split-movetoworkspacesilent, 3
bind = $mainMod SHIFT, 4, split-movetoworkspacesilent, 4
bind = $mainMod SHIFT, 5, split-movetoworkspacesilent, 5
bind = $mainMod SHIFT, 6, split-movetoworkspacesilent, 6
bind = $mainMod SHIFT, 7, split-movetoworkspacesilent, 7
bind = $mainMod SHIFT, 8, split-movetoworkspacesilent, 8
bind = $mainMod SHIFT, 9, split-movetoworkspacesilent, 9
bind = $mainMod SHIFT, 0, split-movetoworkspacesilent, 10
bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1
bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2
bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3
bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4
bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5
bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6
bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7
bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8
bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9
bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10
# Example special workspace (scratchpad)
bind = SUPER, S, togglespecialworkspace, magic
@@ -128,9 +128,14 @@ bind = $mainMod, z, exec, uwsm app -sb -- zen-browser
bind = $mainMod SHIFT, s, exec , rofi -show ssh -theme "$HOME/.config/rofi/launchers/type-2/style-2.rasi" -terminal -theme-str 'window{width: 25%;} listview {columns: 1; lines: 10;}' ghostty -ssh-command "ghostty --initial-command='TERM=kitty ssh {host}'"
# reload monitors
bind = $mainMod SHIFT, R, exec, hyprctl dispatch dpms off && sleep 1 && hyprctl dispatch dpms on
# Disable keybinds with one master keybind
# https://wiki.hypr.land/0.49.0/Configuring/Uncommon-tips--tricks/#disabling-keybinds-with-one-master-keybind
bind = $mainMod, code:117, submap, clean
submap = clean
bind = $mainMod, code:112, submap, reset
submap = reset
bind = SUPER, l, exec, hyprlock

View File

@@ -1,124 +1,143 @@
profile=high-quality
user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"
cache=yes
demuxer-max-bytes=500M
demuxer-max-back-bytes=100M
cache-pause=no
glsl-shaders="" # Disable heavy shaders for regular content
# glsl-shaders="~~/shaders/ArtCNN_C4F32_DS.glsl"
# glsl-shaders="~~/shaders/ArtCNN_C4F32.glsl"
scale=spline36 # Faster than ewa_lanczos for high-res video when shaders are off
dither=fruit # Lighter dithering aimed at 8-bit or FRC panels
# --- Window & interface ---
ontop=yes
border=no
no-border
autofit=50% # Start at half of the screen to avoid oversized windows on UHD displays
osc=no
blend-subtitles=video # Keeps subtitles composited into the video plane
opengl-early-flush=no # Delay buffer flushes to reduce micro-stutter on some GPUs
# --- Subtitle defaults ---
sub-font="JetBrainsMono Nerd Font"
sub-font-size=45
# osd-font="Fluent System Icons"
border=no
# geometry=50%
autofit=50%
sub-auto=fuzzy
slang=en,eng
subs-with-matching-audio=no
sub-fix-timing=yes
sub-ass-override=scale
sub-gauss=1.0
sub-gray=yes
sub-pos=100
# --- Audio chain ---
volume=75
ao=pipewire,pulse
audio-spdif=ac3,dts-hd,truehd
# glsl-shaders="~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"
# glsl-shaders="~~/shaders/FSRCNNX.glsl:~~/shaders/FSR.glsl:~~/shaders/NVScaler.glsl:~~/shaders/CAS-scaled.glsl"
# glsl-shaders="~~/shaders/ArtCNN_C4F32_DS.glsl"
glsl-shaders="~~/shaders/ArtCNN_C4F32.glsl"
# Can fix stuttering in some cases, in other cases probably causes it. Try it if you experience stuttering.
opengl-early-flush=no
video-sync=display-resample
osc=no
no-border
audio-stream-silence=yes # Keep the device primed to avoid startup pops
audio-wait-open=0.1 # Shorten audio device warm-up for snappier playback
# --- Networking & remote sources ---
ytdl-format=bestvideo+bestaudio/best
ytdl-raw-options=sub-langs=en.*,write-auto-subs=
ytdl-raw-options-append=sponsorblock-mark=all
ytdl-raw-options-append=sponsorblock-remove=sponsor,selfpromo,interaction
# get subtitles for videos automatically
sub-auto=fuzzy
slang=en,eng
# profile=svp
profile=high-quality
blend-subtitles=video
# GPU OPTIONS
# --- Video output & decoding ---
vo=gpu-next
hwdec=nvdec
hwdec-codecs=all
gpu-api=vulkan
gpu-context=waylandvk
vulkan-queue-count=2
vulkan-async-compute=yes # Use independent compute queues for tone mapping/shaders
vulkan-async-transfer=yes # Parallelize frame uploads to free the graphics queue
vd-lavc-dr=yes # Direct rendering keeps frames resident on the GPU longer
vd-lavc-threads=0 # Let ffmpeg auto-pick the optimal thread count
video-sync=display-resample # Smoothly match video speed to the display refresh
# --- Scaling, interpolation, and dithering ---
scale=ewa_lanczossharp
dscale=catmull_rom
cscale=ewa_lanczos
tscale=oversample
interpolation=yes
interpolation-preserve=no
interpolation-threshold=0.5
sigmoid-upscaling=yes
temporal-dither=yes
# fruit: 8-Bit/8-Bit+FRC display
# ordered: true 10-Bit/12-Bit display
# error-diffusion: high-end GPUs
interpolation-threshold=0.5 # Only blend nearby frames to reduce SOE artifacts
sigmoid-upscaling=yes # Protect highlights when upscaling SDR video
temporal-dither=yes # Prefer temporal noise over spatial patterns on SDR panels
# Dithering presets reference:
# fruit -> 8-bit / 8-bit + FRC displays
# ordered -> True 10-bit / 12-bit displays
# error-diffusion -> High-end GPUs
dither=error-diffusion
dither-depth=auto
error-diffusion=sierra-lite # uncomment if not 'error-diffusion'
error-diffusion=sierra-lite # Balanced diffusion kernel for 8-bit panels
###### Antiring
# --- Antiring controls ---
scale-antiring=0.5
dscale-antiring=0.5
cscale-antiring=0.5
# laptop
# vo=gpu
# gpu-api=opengl
# gpu-context=wayland
# profile=opengl-hq
gpu-context=waylandvk
gpu-api=vulkan
vulkan-swap-mode=mailbox
swapchain-depth=2
vulkan-async-compute=no
vd-lavc-threads=0
opengl-pbo=yes
vd-lavc-film-grain=gpu
input-ipc-server=/tmp/mpvsocket
# ao=pule,pipewire
ao=pipewire,pulse
# --- Post-processing ---
deband=yes
deband-iterations=2
deband-threshold=24
deband-range=16
deband-grain=4
subs-with-matching-audio=no
sub-fix-timing=yes
sub-ass-override=scale
#Some settings fixing VOB/PGS subtitles (creating blur & changing yellow subs to gray)
sub-gauss=1.0
sub-gray=yes
# --- IPC & automation ---
input-ipc-server=/tmp/mpvsocket # Allows external tools (e.g., SVP) to control mpv
###### High-quality screenshots
# --- Screenshot workflow ---
screenshot-format=webp
screenshot-webp-lossless=yes
screenshot-high-bit-depth=yes
screenshot-sw=no
screenshot-sw=no # Force GPU path so tone mapping stays consistent
screenshot-directory="/truenas/sudacode/pictures/mpv"
screenshot-template="%f-%wH.%wM.%wS.%wT-#%#00n"
# --- Session persistence ---
save-position-on-quit
watch-later-dir="~~/.watch-later"
resume-playback=yes
save-watch-history
watch-history-path="~~/state/watch_history.jsonl"
# --- HDR/SDR hints ---
target-colorspace-hint=yes
# --- Caching & buffers ---
cache=yes
demuxer-max-bytes=1GiB # Buffer up to 1 GiB for high-bitrate remuxes
demuxer-max-back-bytes=200MiB # Keep recent data handy for quick reverse seeks
cache-secs=30
demuxer-readahead-secs=30
[anime]
profile-desc="Anime upscaling with ArtCNN"
glsl-shaders="~~/shaders/ArtCNN_C4F32.glsl"
scale=ewa_lanczossharp
dither=error-diffusion
deband=yes # Crucial for anime gradients
[movies]
profile-desc="Movies and TV shows"
profile-cond=width >= 1920 and filename:match("mkv$|mp4$")
glsl-shaders=""
scale=ewa_lanczos
target-peak=800
[hdr]
target-colorspace-hint=yes
gpu-api=vulkan
gpu-context=waylandvk
tone-mapping-param=0.5
tone-mapping-max-boost=2.0
allow-delayed-peak-detect=yes
# For SDR content on HDR display (or vice versa)
icc-profile-auto=yes
[svp]
interpolation=no
input-ipc-server=/tmp/mpvsocket # Receives input from SVP
hr-seek-framedrop=no # Fixes audio desync
resume-playback=no # Not compatible with SVP
input-ipc-server=/tmp/mpvsocket
hr-seek-framedrop=no
resume-playback=no
[Idle]
profile-cond=p["idle-active"]
@@ -134,12 +153,22 @@ ytdl-raw-options-append=cookies=/truenas/sudacode/japanese/cookies.Japanese.txt
ytdl-raw-options-append=sponsorblock-mark=all
ytdl-raw-options-append=sponsorblock-remove=sponsor,selfpromo,interaction
ytdl-format=bestvideo+bestaudio/best
# get subtitles for videos automatically
sub-auto=fuzzy
slang=ja,jpn,ja.hi,ja.*
alang=ja,jpn
alang=ja,jp,jpn,japanese,en,eng,english,English,enUS,en-US
slang=ja,jp,jpn,japanese,en,eng,english,English,enUS,en-US
vlang=ja,jpn
sub-font="Noto Sans CJK JP"
sub-border-size=1
sub-shadow-color=0.0/0.0/0.0/0.50
sub-shadow-offset=2
subs-with-matching-audio=yes
sub-font="Noto Sans CJK JP Regular"
glsl-shaders="~~/shaders/ArtCNN_C4F32.glsl"
scale=ewa_lanczossharp
dither=error-diffusion
deband=yes # Crucial for anime gradients
[anime-subs]
profile-cond=p["slang"] == "ja" or p["slang"] == "ja.hi"
sub-font="Noto Sans CJK JP Regular"
sub-font-size=42
sub-border-size=1.2
sub-shadow-color=0.0/0.0/0.0/0.6
sub-shadow-offset=3
sub-hinting=light

View File

@@ -1,233 +1,182 @@
#
# Example mpv configuration file
#
# Warning:
#
# The commented example options usually do _not_ set the default values. Call
# mpv with --list-options to see the default values for most options. There is
# no builtin or example mpv.conf with all the defaults.
#
#
# Configuration files are read system-wide from /usr/local/etc/mpv.conf
# and per-user from ~~/mpv.conf, where per-user settings override
# system-wide settings, all of which are overridden by the command line.
#
# Configuration file settings and the command line options use the same
# underlying mechanisms. Most options can be put into the configuration file
# by dropping the preceding '--'. See the man page for a complete list of
# options.
#
# Lines starting with '#' are comments and are ignored.
#
# See the CONFIGURATION FILES section in the man page
# for a detailed description of the syntax.
#
# Profiles should be placed at the bottom of the configuration file to ensure
# that settings wanted as defaults are not restricted to specific profiles.
user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"
##################
# video settings #
##################
glsl-shaders=""
scale=spline36 # Fast, high-quality fallback
dither=fruit # Lightweight dithering
# Start in fullscreen mode by default.
#fs=yes
# Window & interface
ontop=yes
border=no
no-border
autofit=50% # Reasonable default size
# force starting with centered window
# geometry=50%:50%
# don't allow a new window to have a size larger than 90% of the screen size
#autofit-larger=90%x90%
# Do not close the window on exit.
#keep-open=yes
# Do not wait with showing the video window until it has loaded. (This will
# resize the window once video is loaded. Also always shows a window with
# audio.)
#force-window=immediate
# Disable the On Screen Controller (OSC).
# osc=no
# Keep the player window on top of all other windows.
# window=scale=1.0
# Specify high quality video rendering preset (for --vo=gpu only)
# Can cause performance problems with some drivers and GPUs.
# profile=gpu-hq
# Force video to lock on the display's refresh rate, and change video and audio
# speed to some degree to ensure synchronous playback - can cause problems
# with some drivers and desktop environments.
#video-sync=display-resample
# Enable hardware decoding if available. Often, this does not work with all
# video outputs, but should work well with default settings on most systems.
# If performance or energy usage is an issue, forcing the vdpau or vaapi VOs
# may or may not help.
# discourged by mpv devs and not likely to make significant difference
# hwdec=auto-copy
# hwdec-codecs=all
##################
# audio settings #
##################
# Specify default audio device. You can list devices with: --audio-device=help
# The option takes the device string (the stuff between the '...').
#audio-device=alsa/default
# Do not filter audio to keep pitch when changing playback speed.
#audio-pitch-correction=no
# Output 5.1 audio natively, and upmix/downmix audio with a different format.
#audio-channels=5.1
# Disable any automatic remix, _if_ the audio output accepts the audio format.
# of the currently played file. See caveats mentioned in the manpage.
# (The default is "auto-safe", see manpage.)
#audio-channels=auto
##################
# other settings #
##################
# Pretend to be a web browser. Might fix playback with some streaming sites,
# but also will break with shoutcast streams.
# user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"
user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"
# user-agent="Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36"
# user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36"
# user-agent="Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36"
# cache settings
#
# Use a large seekable RAM cache even for local input.
cache=yes
#
# Use extra large RAM cache (needs cache=yes to make it useful).
demuxer-max-bytes=500M
demuxer-max-back-bytes=100M
#
# Disable the behavior that the player will pause if the cache goes below a
# certain fill size.
cache-pause=no
#
# Store cache payload on the hard disk instead of in RAM. (This may negatively
# impact performance unless used for slow input such as network.)
#cache-dir=~/.cache/
#cache-on-disk=yes
# Display English subtitles if available.
#slang=en
# Play Finnish audio if available, fall back to English otherwise.
#alang=fi,en
# Change subtitle encoding. For Arabic subtitles use 'cp1256'.
# If the file seems to be valid UTF-8, prefer UTF-8.
# (You can add '+' in front of the codepage to force it.)
#sub-codepage=cp1256
# You can also include other configuration files.
#include=/path/to/the/file/you/want/to/include
############
# Profiles #
############
# The options declared as part of profiles override global default settings,
# but only take effect when the profile is active.
# The following profile can be enabled on the command line with: --profile=eye-cancer
#[eye-cancer]
#sharpen=5
# Audio (macOS-specific)
volume=75
ao=coreaudio # Native macOS audio
audio-stream-silence=no # FIXED: Prevents player behavior issues
audio-wait-open=0.1 # Faster audio startup
# Subtitle defaults
sub-font="JetBrainsMono Nerd Font"
sub-font-size=45
# osd-font="Fluent System Icons"
border=no
geometry=50%
volume=50
# speed-step=0.05
# audio-spdif=ac3,eac3,dts-hd,truehd
# glsl-shaders="~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"
glsl-shaders="~~/shaders/ArtCNN_C4F16.glsl"
# glsl-shaders="~~/shaders/FSR.glsl"
# Can fix stuttering in some cases, in other cases probably causes it. Try it if you experience stuttering.
opengl-early-flush=no
video-sync=display-resample
osc=no
no-border
ytdl-raw-options=sub-langs=en.*,write-auto-subs=
ytdl-format=bestvideo+bestaudio/best
# get subtitles for videos automatically
sub-auto=fuzzy
slang=en,eng
subs-with-matching-audio=no
sub-fix-timing=yes
sub-ass-override=scale
sub-gauss=1.0
sub-gray=yes
sub-pos=90
# CATPPUCCIN MACHIATTO
# Main mpv options
# Networking & streaming
ytdl-format=bestvideo+bestaudio/best
ytdl-raw-options=sub-langs=en.*,write-auto-subs=
ytdl-raw-options-append=sponsorblock-mark=all
ytdl-raw-options-append=sponsorblock-remove=sponsor,selfpromo,interaction
# Stats & UI colors (Catppuccin Macchiato)
background-color='#24273a'
osd-back-color='#181926'
osd-border-color='#181926'
osd-color='#cad3f5'
osd-shadow-color='#24273a'
# Stats script options
# Options are on separate lines for clarity
# Colors are in #BBGGRR format
script-opts-append=stats-border_color=30201e
script-opts-append=stats-font_color=f5d3ca
script-opts-append=stats-plot_bg_border_color=f8bdb7
script-opts-append=stats-plot_bg_color=30201e
script-opts-append=stats-plot_color=f8bdb7
# profile=svp
profile=gpu-hq
# GPU OPTIONS
##################
# Video/Graphics #
##################
vo=gpu-next
# hwdec=nvdec-copy
hwdec=videotoolbox
scale=bicubic
dscale=bicubic
cscale=bicubic
hwdec=videotoolbox # macOS hardware decoding
hwdec-codecs=all
gpu-api=vulkan
gpu-context=macvk # macOS-specific Vulkan context
# Vulkan optimizations (prevents crashes and memory leaks)
vulkan-queue-count=1 # FIXED: Prevents buffer overflow
vulkan-async-compute=no # FIXED: Improves stability
vulkan-async-transfer=no # FIXED: Reduces memory pressure
vulkan-swap-mode=fifo # Most compatible presentation mode
fbo-format=rgba8 # FIXED: Memory-safe format
# Video filtering & quality
vd-lavc-film-grain=cpu # FIXED: GPU grain not supported on macOS
vd-lavc-threads=0
vd-lavc-dr=yes # Keep frames on GPU
video-sync=display-resample # Smooth playback
# Scaling & interpolation
scale=ewa_lanczossharp
dscale=catmull_rom
cscale=ewa_lanczos
tscale=oversample
interpolation=yes
interpolation-preserve=no
interpolation-threshold=0.5
sigmoid-upscaling=yes
temporal-dither=yes
input-ipc-server=/tmp/mpvsocket
# ao=pule,pipewire
# ao=pipewire,pulse
ontop=yes
# High-quality dithering
dither=error-diffusion
dither-depth=auto
error-diffusion=sierra-lite
# Antiring
scale-antiring=0.5
dscale-antiring=0.5
cscale-antiring=0.5
# Post-processing
deband=yes
deband-iterations=2
deband-threshold=24
deband-range=16
deband-grain=4
##################
# Screenshot #
##################
screenshot-format=webp
screenshot-webp-lossless=yes
screenshot-high-bit-depth=yes
screenshot-sw=no
screenshot-directory="/Volumes/sudacode/pictures/mpv"
screenshot-template="%f-%wH.%wM.%wS.%wT-#%#00n"
##################
# Session #
##################
ao=coreaudio
save-position-on-quit
watch-later-dir="~~.watch-later"
watch-later-dir="~~/.watch-later"
resume-playback=yes
save-watch-history
watch-history-path="~~state/watch_history.jsonl"
vd-lavc-threads=0
gpu-api=vulkan
gpu-context=macvk
opengl-pbo=yes
watch-history-path="~~/state/watch_history.jsonl"
input-ipc-server=/tmp/mpvsocket
##################
# Caching #
##################
cache=yes
demuxer-max-bytes=1GiB
demuxer-max-back-bytes=200MiB
cache-pause=no
cache-secs=30
demuxer-readahead-secs=30
############
# Profiles #
############
# Base high-quality preset (inherits above settings)
[base]
profile=gpu-hq
# Anime profile (ArtCNN is memory-heavy, use cautiously)
[anime]
profile-desc="Anime upscaling with ArtCNN"
profile-cond=filename:match("mkv$") and height <= 1080
glsl-shaders="~~/shaders/ArtCNN_C4F16.glsl" # Use F16 variant (lighter)
scale=ewa_lanczossharp
deband=yes
# Movies profile (no shaders, HDR support)
[movies]
profile-desc="Movies and TV shows"
profile-cond=width >= 1920 and filename:match("mkv$|mp4$")
glsl-shaders=""
scale=ewa_lanczos
target-peak=800
hdr-tone-mapping=bt.2390
# HDR profile
[hdr]
target-colorspace-hint=yes
tone-mapping-param=0.5
tone-mapping-max-boost=2.0
allow-delayed-peak-detect=yes
icc-profile-auto=yes
# SVP compatibility profile
[svp]
input-ipc-server=/tmp/mpvsocket # Receives input from SVP
hr-seek-framedrop=no # Fixes audio desync
resume-playback=no # Not compatible with SVP
interpolation=no
input-ipc-server=/tmp/mpvsocket
hr-seek-framedrop=no
resume-playback=no
# Idle profile
[Idle]
profile-cond=p["idle-active"]
profile-restore=copy-equal
title=' '
keepaspect=no
# Japanese immersion profile
[immersion]
cookies=yes
cookies-file=/Volumes/sudacode/japanese/cookies.Japanese.txt
@@ -236,8 +185,22 @@ ytdl-raw-options-append=cookies=/Volumes/sudacode/japanese/cookies.Japanese.txt
ytdl-raw-options-append=sponsorblock-mark=all
ytdl-raw-options-append=sponsorblock-remove=sponsor
ytdl-format=bestvideo+bestaudio/best
# get subtitles for videos automatically
sub-auto=fuzzy
slang=ja,jpn
alang=ja,jpn
alang=ja,jp,jpn,japanese,en,eng,english,English,enUS,en-US
slang=ja,jp,jpn,japanese,en,eng,english,English,enUS,en-US
vlang=ja,jpn
subs-with-matching-audio=yes
sub-font="Noto Sans CJK JP Regular"
glsl-shaders="~~/shaders/ArtCNN_C4F32.glsl"
scale=ewa_lanczossharp
dither=error-diffusion
deband=yes # Crucial for anime gradients
# Anime subtitles profile
[anime-subs]
profile-cond=p["slang"] == "ja" or p["slang"] == "ja.hi"
sub-font="Noto Sans CJK JP"
sub-font-size=42
sub-border-size=1.2
sub-shadow-color=0.0/0.0/0.0/0.6
sub-shadow-offset=3

View File

@@ -1,19 +0,0 @@
showwindowed=yes
showfullscreen=yes
scalewindowed=1
scalefullscreen=1
scaleforcedwindow=2
vidscale=yes
hidetimeout=1000
fadeduration=500
minmousemove=3
iamaprogrammer=yes
font='mpv-osd-symbols'
seekrangealpha=128
title='${media-title}'
showtitle=yes
visibility=auto
windowcontrols=auto
volumecontrol=yes
processvolume=yes
language=eng

View File

@@ -239,7 +239,9 @@ local code_companion_mappings = {
{
mode = "n",
key = "<leader>Ci",
cmd = ":CodeCompanion #{buffer} ",
cmd = function()
vim.api.nvim_feedkeys(":CodeCompanion #{buffer} ", "n", false)
end,
group = "Inline CodeCompanion",
opts = nosilent,
},
@@ -249,7 +251,9 @@ local code_companion_mappings = {
{
mode = "v",
key = "<leader>Ci",
cmd = ":CodeCompanion #{buffer} ",
cmd = function()
vim.api.nvim_feedkeys(":CodeCompanion #{buffer} ", "n", false)
end,
group = "CodeCompanion Inline",
opts = nosilent,
},
@@ -432,6 +436,14 @@ local misc_utilities_mappings = {
end,
group = "mkdir under cursor",
},
{
mode = "v",
key = "<leader>m",
cmd = function()
mkdir_under_cursor()
end,
group = "mkdir selection",
},
}
-- }}}

View File

@@ -2,8 +2,20 @@ local M = {}
vim.notify = require("notify")
function M.mkdir_under_cursor()
-- Get the word under the cursor
local word = vim.fn.expand("<cWORD>")
local word
-- 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
word = word:gsub("^[\"']", ""):gsub("[\"']$", "")
-- Check if directory exists

View File

@@ -1,7 +1,7 @@
{
"$schema": "https://opencode.ai/config.json",
"theme": "catppuccin",
"model": "github-copilot/gpt-4.1",
"model": "github-copilot/gpt-5.1",
"provider": {
"openai": {
"models": {
@@ -19,7 +19,7 @@
"agent": {
"build": {
"mode": "primary",
"model": "github-copilot/gpt-4.1",
"model": "github-copilot/gpt-5.1",
"tools": {
"write": true,
"edit": true,
@@ -28,7 +28,7 @@
},
"plan": {
"mode": "primary",
"model": "github-copilot/gpt-4.1",
"model": "github-copilot/gpt-5.1-codex",
"tools": {
"write": false,
"edit": false,
@@ -38,7 +38,7 @@
"code-reviewer": {
"description": "Reviews code for best practices and potential issues",
"mode": "subagent",
"model": "github-copilot/gpt-4.1",
"model": "github-copilot/gpt-5.1",
"prompt": "You are a code reviewer. Focus on security, performance, and maintainability.",
"tools": {
"write": false,

View File

@@ -10,8 +10,10 @@
"Cloudflare - https://dash.cloudflare.com/",
"CoinMarketCap - https://coinmarketcap.com/",
"Deemix - http://pve-main:3358",
"Ephemera - https://ephemera.suda.codes",
"F1TV - https://f1tv.suda.codes",
"Fidelity - https://login.fidelity.com/",
"Ghstats - http://oracle-vm:3340",
"Gitea - https://gitea.suda.codes",
"Github - https://github.com",
"Ghostfolio - http://pve-main:3334",
@@ -23,7 +25,7 @@
"Jellyfin (Vue) - http://pve-main:8098",
"Karakeep - https://karakeep.suda.codes",
"Komodo - https://komodo.suda.codes",
"Komga - http://oracle-vm:3332",
"Komga - http://pve-main:3332",
"Lidarr - http://pve-main:3357",
"MeTube - https://metube.suda.codes",
"Navidrome - https://navidrome.suda.codes",
@@ -32,7 +34,9 @@
"Pihole - https://pihole.suda.codes/admin",
"Pihole2 - https://pihole2.suda.codes/admin",
"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",
"Paperless - https://paperless.suda.codes",
"Prometheus - http://prometheus:9090",
"Radarr - https://radarr.suda.codes",
@@ -41,14 +45,16 @@
"Sabnzbd - https://sabnzbd.suda.codes",
"Sonarr - https://sonarr.suda.codes",
"Sonarr Anime - http://pve-main:6969",
"Speedtest Tracker - http://pve-main:8765",
"Sudacode - https://sudacode.com",
"Suwayomi - https://suwayomi.suda.codes",
"Tailscale - https://login.tailscale.com/admin/machines",
"Tranga - http://pve-main:9555",
"Truenas - https://truenas.unicorn-ilish.ts.net",
"Tdarr - https://tdarr.suda.codes",
"Tubearchivist - https://tubearchivist.suda.codes",
"T3Chat - https://t3.chat",
"Umami - https://umami.sudacode.com",
"Unifi - https://unifi.suda.codes",
"Vaultwarden - https://vault.suda.codes",
"Wallabag - https://wallabag.suda.codes",
"Youtube - https://youtube.com",

View File

@@ -37,7 +37,7 @@ window {
location: center;
anchor: center;
fullscreen: false;
width: 45%;
width: 37%;
x-offset: 0px;
y-offset: 0px;

View File

@@ -1,20 +1,68 @@
#!/usr/bin/env bash
BROWSER=/usr/bin/zen-browser
URLS=(
OPTIONS=(
"Arch Linux (btw)"
"Hyprland"
)
ARCH=(
"Archlinux Wiki|https://wiki.archlinux.org/title/Main_page"
)
HYPRLAND=(
"Hyprland Docs|https://wiki.hypr.land/"
"Hyprland Window Rules|https://wiki.hypr.land/Configuring/Window-Rules/"
)
DISPLAY_URLS=()
declare -A URL_MAP
for url in "${URLS[@]}"; do
DISPLAY_URLS+=("${url%%|*}")
get_url() {
urls=("$@")
display_urls=()
declare -A url_map
for url in "${urls[@]}"; do
display_urls+=("${url%%|*}")
label="${url%%|*}"
URL_MAP["$label"]="${url##*|}"
done
url_map["$label"]="${url##*|}"
done
display_urls+=("Back")
url_map["Back"]="Back"
SELECTION="$(printf "%s\n" "${DISPLAY_URLS[@]}" | rofi -theme-str 'window {width: 25%;} listview {columns: 1; lines: 10;}' -theme ~/.config/rofi/launchers/type-2/style-2.rasi -dmenu -l 5 -i -p "Select Documentation")"
URL="${URL_MAP[$SELECTION]}"
$BROWSER "$URL" &>/dev/null &
selection="$(printf "%s\n" "${display_urls[@]}" | rofi -theme-str 'window {width: 25%;} listview {columns: 1; lines: 10;}' -theme ~/.config/rofi/launchers/type-2/style-2.rasi -dmenu -l 5 -i -p "Select Documentation")"
url="${url_map[$selection]}"
if [ -z "$url" ]; then
exit 0
fi
printf "%s\n" "$url"
}
get_docs_list() {
selection="$(printf "%s\n" "${OPTIONS[@]}" | rofi -theme-str 'window {width: 25%;} listview {columns: 1; lines: 10;}' -theme ~/.config/rofi/launchers/type-2/style-2.rasi -dmenu -l 5 -i -p "Select Documentation Group")"
case "$selection" in
"Arch Linux (btw)")
urls=("${ARCH[@]}")
;;
"Hyprland")
urls=("${HYPRLAND[@]}")
;;
*)
exit 0
;;
esac
printf "%s\n" "${urls[@]}"
}
main() {
mapfile -t urls < <(get_docs_list)
url="$(get_url "${urls[@]}")"
if [ -z "$url" ]; then
printf "No URL selected.\n"
exit 0
elif [ "$url" == "Back" ]; then
main
exit 0
fi
$BROWSER "$url" &>/dev/null &
}
main

View File

@@ -7,5 +7,7 @@ DIR="$HOME/Pictures/wallpapers/favorites"
SELECTED_WALL=$(cd "$DIR" && for a in *.jpg *.png; do echo -en "$a\0icon\x1f$a\n"; done | rofi -dmenu -i -no-custom -theme "$THEME" -p "Select a wallpaper" -theme-str 'configuration {icon-size: 128; dpi: 96;} window {width: 45%; height: 45%;}')
PTH="$(printf "%s" "$DIR/$SELECTED_WALL" | tr -s '/')"
notify-send -a "rofi-wallpaper" "Wallpaper set to" -i "$PTH" "$PTH"
hyprctl hyprpaper reload , "$DIR/$SELECTED_WALL"
echo "$PTH" > "$HOME/.wallpaper"
hyprctl hyprpaper preload "$PTH"
hyprctl hyprpaper wallpaper "DP-1,$PTH"
hyprctl hyprpaper unload "$(cat "$HOME/.wallpaper")"
echo "$PTH" >"$HOME/.wallpaper"

View File

@@ -2,7 +2,7 @@
"layer": "bottom",
"position": "top",
"height": 40,
"width": 2545,
"width": 3422,
"spacing": 1,
"reload_style_on_change": true,
"fixed-center": true,
@@ -232,8 +232,8 @@
// "20": "十",
},
"persistent-workspaces": {
// "*": 10,
"*": 5,
"*": 10,
// "*": 5,
},
"sort-by": "number",
"all-outputs": false,

View File

@@ -175,7 +175,7 @@ func downloadRandomWallpaper(wallpaperPath string, r *rand.Rand, topics []string
fmt.Fprintf(os.Stderr, "Searching for wallpapers related to: %s\n", displayName)
// Get wallpapers from Wallhaven API
resp, err := http.Get(fmt.Sprintf("%s/search?q=%s&purity=100&categories=110&sorting=random", wallhavenAPI, query))
resp, err := http.Get(fmt.Sprintf("%s/search?q=%s&purity=100&categories=110&sorting=random&atleast=3440x1440", wallhavenAPI, query))
if err != nil {
fmt.Fprintf(os.Stderr, "Error fetching from Wallhaven: %v\n", err)
return "", ""
@@ -272,11 +272,26 @@ func ensureSized(wallpaperPath string) (string, error) {
return "", err
}
if src.Bounds().Dx() == targetWidth && src.Bounds().Dy() == targetHeight {
srcWidth := float64(src.Bounds().Dx())
srcHeight := float64(src.Bounds().Dy())
targetW := float64(targetWidth)
targetH := float64(targetHeight)
// Calculate scale factor to fit image within target while maintaining aspect ratio
scaleW := targetW / srcWidth
scaleH := targetH / srcHeight
scale := min(scaleW, scaleH)
// If image already fits within target dimensions, no resize needed
if scale >= 1.0 {
return wallpaperPath, nil
}
dst := image.NewRGBA(image.Rect(0, 0, targetWidth, targetHeight))
// Calculate new dimensions maintaining aspect ratio (best fit)
newWidth := int(srcWidth * scale)
newHeight := int(srcHeight * scale)
dst := image.NewRGBA(image.Rect(0, 0, newWidth, newHeight))
draw.CatmullRom.Scale(dst, dst.Bounds(), src, src.Bounds(), draw.Over, nil)
var ext string
@@ -295,7 +310,7 @@ func ensureSized(wallpaperPath string) (string, error) {
}
base := strings.TrimSuffix(filepath.Base(wallpaperPath), filepath.Ext(wallpaperPath))
resizedPath := filepath.Join(filepath.Dir(wallpaperPath), fmt.Sprintf("%s-%dx%d%s", base, targetWidth, targetHeight, ext))
resizedPath := filepath.Join(filepath.Dir(wallpaperPath), fmt.Sprintf("%s-%dx%d%s", base, newWidth, newHeight, ext))
outFile, err := os.Create(resizedPath)
if err != nil {

View File

@@ -31,6 +31,9 @@ generate_thumbnail() {
local temp_thumb="/tmp/rmpv-thumbnail-$$.jpg"
local thumbnail_file="${video_file%.*}.jpg"
# Clean up previous thumbnail
rm -f "$THUMBNAIL_PATH"
# Validate input
if [[ -z "$video_file" ]]; then
echo "Error: No video file specified" >&2
@@ -51,8 +54,20 @@ generate_thumbnail() {
# Generate thumbnail if it doesn't exist
if [[ ! -f "$thumbnail_file" ]]; then
echo "Generating thumbnail for $(basename "$video_file")..."
if ! ffmpeg -i "$video_file" \
-vf "select='gt(scene,0.4)',scale=320:240:force_original_aspect_ratio=decrease,pad=320:240:(ow-iw)/2:(oh-ih)/2" \
# Try generating thumbnail side-by-side
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
# 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" \
@@ -61,18 +76,17 @@ generate_thumbnail() {
return 1
fi
fi
# Copy to temporary location with error handling
if ! cp "$thumbnail_file" "$temp_thumb" 2>/dev/null; then
echo "Error: Failed to copy thumbnail to temporary location" >&2
return 1
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"
# Copy to consistent location for notify-send
# We use a fixed path so notify-send always finds it
if cp "$thumbnail_file" "$THUMBNAIL_PATH" 2>/dev/null; then
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
}
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" &
# vim: ft=sh