Browse Source

Proper mpv setup. Split gpg/ssh agents. Misc changes.

master
SolitudeSF 4 months ago
parent
commit
e43b2fdd2e
No known key found for this signature in database
13 changed files with 91 additions and 89 deletions
  1. 1
    1
      bin/mpw-get
  2. 14
    0
      elvish/lib/completers.elv
  3. 3
    4
      kak.kak
  4. 3
    0
      mpv/input.conf
  5. 16
    11
      mpv/mpv.conf
  6. 3
    0
      mpv/script-opts/webm.conf
  7. 0
    2
      ntr/finishers/lockscreen
  8. 0
    1
      ntr/profiles/default
  9. 0
    10
      ntr/templates/lockscreen
  10. 3
    6
      profile
  11. 43
    41
      setup
  12. 4
    12
      splug.toml
  13. 1
    1
      xbps-src

+ 1
- 1
bin/mpw-get View File

@@ -7,4 +7,4 @@ if (eq 0 (count $args)) {
} else {
t=$args[0]
}
gpg2 -d -q ~/sns/password.gpg | mpwc -S -k max -n $name -s $t 2>&- | xclip -sel c -r -l 1
gpg2 -d -q ~/sns/password.gpg | mpwc -S -k max -n $name -s $t 2>/dev/null | xclip -sel c -r -l 1

+ 14
- 0
elvish/lib/completers.elv View File

@@ -171,6 +171,20 @@ edit:completion:arg-completer[ntr] = [@cmd]{
}
}

edit:completion:arg-completer[mpv] = [@cmd]{
if (and (> (count $cmd[-1]) 0) (eq $cmd[-1][0] '-')) {
mpv --list-options | drop 2 | take 872 | eawk [_ a @b]{
if (eq (count $b) 0) {
put $a
} else {
edit:complex-candidate $a &display-suffix=' '(joins ' ' $b)
}
}
} else {
edit:complete-filename $cmd[-1]
}
}

edit:completion:arg-completer[update] = [@cmd]{
update | each [x]{ if (has-prefix $x " ") { put $x[4:] } }
}

+ 3
- 4
kak.kak View File

@@ -92,9 +92,9 @@ def type -params 1 -docstring 'Set buffer filetype' %{
}

def lint-engage -docstring 'Enable linting' %{
lint-enable
map global user -docstring "next error" l ': lint-next-error<ret>'
map global user -docstring "previous error" L ': lint-previous-error<ret>'
lint-enable
map global user -docstring "next error" l ': lint-next-error<ret>'
map global user -docstring "previous error" L ': lint-previous-error<ret>'
}

def lsp-engage -docstring 'Enable language server' %{
@@ -135,7 +135,6 @@ hook global WinCreate .* %{
readline-enable
colorcol-enable
colorcol-auto-refresh
discord-presence-enable
}

hook global KakBegin .* %{

+ 3
- 0
mpv/input.conf View File

@@ -0,0 +1,3 @@
V vf toggle "vapoursynth=~~/filters/mvtools.vpy"
Alt+a change-list glsl-shaders toggle "~~/shaders/Anime4K.glsl"
Alt+i cycle interpolation

+ 16
- 11
mpv/mpv.conf View File

@@ -2,19 +2,24 @@ term-osd-bar
msg-module
msg-color

autofit-larger=100%x100%
autofit-smaller=40%x40%

# Video
profile=gpu-hq
# scale=ewa_lanczossharp
# cscale=ewa_lanczossharp
# glsl-shaders="~~/shaders/KrigBilateral.glsl"
# glsl-shaders="~~/shaders/FSRCNNX_x2_8-0-4-1.glsl"

# video-sync=display-resample
# interpolation=yes
# tscale=box
# tscale-window=sphinx
# tscale-radius=1.0
# tscale-clamp=0.0
gpu-api=vulkan

scale=ewa_lanczossharp
cscale=ewa_lanczossharp
dscale=ewa_lanczossharp
glsl-shader="~~/shaders/Anime4K.glsl"

video-sync=display-resample
interpolation=no
tscale=box
tscale-window=sphinx
tscale-radius=1.0
tscale-clamp=0.0

# Audio
alang=en,eng,English

+ 3
- 0
mpv/script-opts/webm.conf View File

@@ -0,0 +1,3 @@
target_filesize=7500
twopass=yes
write_filename_on_metadata=yes

+ 0
- 2
ntr/finishers/lockscreen View File

@@ -1,2 +0,0 @@
#!/bin/sh
chmod +x "$HOME/.local/bin/lockscreen"

+ 0
- 1
ntr/profiles/default View File

@@ -5,4 +5,3 @@ dunst: <{$XDG_CONFIG_HOME}>/dunst/dunstrc
zathura: <{$XDG_CONFIG_HOME}>/zathura/zathurarc
polybar: <{$XDG_CONFIG_HOME}>/polybar/config
rofi-theme: <{$XDG_CONFIG_HOME}>/rofi/theme.rasi
lockscreen: <{$HOME}>/.local/bin/lockscreen

+ 0
- 10
ntr/templates/lockscreen View File

@@ -1,10 +0,0 @@
#!/bin/sh
XSECURELOCK_SAVER="$DOTS_DIR/bin/saver_mpv" \
XSECURELOCK_FONT='Iosevka SS04' \
XSECURELOCK_AUTH_BACKGROUND_COLOR='<{color.bg}>' \
XSECURELOCK_AUTH_FOREGROUND_COLOR='<{color.fg}>' \
XSECURELOCK_AUTH_WARNING_COLOR='<{color1}>' \
XSECURELOCK_SHOW_HOSTNAME=0 \
XSECURELOCK_SHOW_USERNAME=0 \
XSECURELOCK_SHOW_DATETIME=1 \
exec xsecurelock

+ 3
- 6
profile View File

@@ -37,12 +37,9 @@ export \
_JAVA_AWT_WM_NONREPARENTING _JAVA_OPTIONS NO_AT_BRIDGE

# Init sharable {ssh,gpg}-agent
if [ -z "$SSH_AUTH_SOCK" ]; then
if ! pgrep -xu "$(id -u)" gpg-agent >/dev/null; then
gpg-agent -q --daemon >"$XDG_CACHE_HOME/ssh-env"
fi
. "$XDG_CACHE_HOME/ssh-env"
fi
pgrep -xu "$(id -u)" gpg-agent || gpg-agent -q --daemon
pgrep -xu "$(id -u)" ssh-agent || ssh-agent >"$XDG_CACHE_HOME/ssh-env"
. "$XDG_CACHE_HOME/ssh-env"

# Start X or shell
if [ "$GPG_TTY" = /dev/tty1 ]; then

+ 43
- 41
setup View File

@@ -1,11 +1,11 @@
#!/bin/sh

cd "$(dirname "$0")"
cd "$(dirname "$0")" || exit

OP="ln -s"
DIR="$(pwd)"
CONF=${XDG_CONFIG_HOME:-$HOME/.config/}
CONTEXT=${COLORSCHEME:-$(ls "$DIR/ntr/contexts" | sort -R | head -1)}
CONTEXT=${COLORSCHEME:-$(find "$DIR/ntr/contexts" | sort -R | head -1)}

_help() {
echo 'Available targets:
@@ -58,80 +58,82 @@ for arg; do
-c)
OP="cp -r";;
nim)
_install $arg.nim "$CONF/nim/config.nims";;
_install nim.nim "$CONF/nim/config.nims";;
bspwm)
_install $arg "$CONF/bspwm/bspwmrc";;
_install bspwm "$CONF/bspwm/bspwmrc";;
sxhkd)
_install $arg "$CONF/sxhkd/sxhkdrc";;
_install sxhkd "$CONF/sxhkd/sxhkdrc";;
dunst)
_render $arg "$CONF/dunst/dunstrc";;
_render dunst "$CONF/dunst/dunstrc";;
polybar)
_render $arg "$CONF/polybar/config";;
_render polybar "$CONF/polybar/config";;
rofi)
_install $arg.rasi "$CONF/rofi/config.rasi";;
_install rofi.rasi "$CONF/rofi/config.rasi";;
mpv)
_install $arg/mpv.conf "$CONF/mpv/mpv.conf";;
_install mpv/mpv.conf "$CONF/mpv/mpv.conf"
_install mpv/input.conf "$CONF/mpv/input.conf"
_install mpv/script-opts "$CONF/mpv/script-opts";;
mpd)
_install $arg "$CONF/mpd/mpd.conf";;
_install mpd "$CONF/mpd/mpd.conf";;
ncmpcpp)
_install $arg "$CONF/ncmpcpp/config";;
_install ncmpcpp "$CONF/ncmpcpp/config";;
lc)
_install $arg "$CONF/lc/config";;
_install lc "$CONF/lc/config";;
kak)
_install $arg.kak "$CONF/kak/kakrc";;
_install kak.kak "$CONF/kak/kakrc";;
zathura)
_render $arg "$CONF/zathura/zathurarc";;
_render zathura "$CONF/zathura/zathurarc";;
ranger)
_install $arg/commands.py "$CONF/ranger/commands.py"
_install $arg/rc.conf "$CONF/ranger/rc.conf"
_install $arg/rifle.conf "$CONF/ranger/rifle.conf"
_install $arg/scope.sh "$CONF/ranger/scope.sh";;
_install ranger/commands.py "$CONF/ranger/commands.py"
_install ranger/rc.conf "$CONF/ranger/rc.conf"
_install ranger/rifle.conf "$CONF/ranger/rifle.conf"
_install ranger/scope.sh "$CONF/ranger/scope.sh";;
kitty)
_install $arg/kitty.conf "$CONF/kitty/kitty.conf"
_install $arg/diff.conf "$CONF/kitty/diff.conf"
_install kitty/kitty.conf "$CONF/kitty/kitty.conf"
_install kitty/diff.conf "$CONF/kitty/diff.conf"
_render kitty-colors "$CONF/kitty/colors.conf";;
firefox)
FF_DIR=$HOME/.mozilla/firefox/$(ls -tr "$HOME/.mozilla/firefox/" | grep -v profiles.ini | tail -1)
FF_DIR=$HOME/.mozilla/firefox/$(ls -t "$HOME/.mozilla/firefox/" | grep -v profiles.ini | head -1)
FF_CHROME=$FF_DIR/chrome
_install $arg/user.js "$FF_DIR/user.js"
_install $arg/userChrome.css "$FF_CHROME/userChrome.css";;
_install firefox/user.js "$FF_DIR/user.js"
_install firefox/userChrome.css "$FF_CHROME/userChrome.css";;
elvish)
_install $arg/rc.elv "$HOME/.elvish/rc.elv"
for i in "$arg"/lib/* ; do
_install elvish/rc.elv "$HOME/.elvish/rc.elv"
for i in elvish/lib/* ; do
_install "$i" "$HOME/.elvish/lib/$(basename "$i")"
done;;
neofetch)
_install $arg.sh "$CONF/neofetch/config.conf";;
_install neofetch.sh "$CONF/neofetch/config.conf";;
gitconfig)
_install $arg.ini "$CONF/git/config";;
_install gitconfig.ini "$CONF/git/config";;
xbps-src)
_install $arg "$XBPS_DISTDIR/etc/conf";;
_install xbps-src "$XBPS_DISTDIR/etc/conf";;
profile)
_install $arg "$HOME/.profile";;
_install profile "$HOME/.profile";;
Xresources)
_render $arg "$HOME/.Xresources";;
_render Xresources "$HOME/.Xresources";;
XCompose)
_install $arg "$HOME/.XCompose";;
_install XCompose "$HOME/.XCompose";;
xinit)
_install sx.sh "$HOME/.xinitrc";;
sx)
_install $arg.sh "$CONF/sx/sxrc";;
_install sx.sh "$CONF/sx/sxrc";;
ntr)
_install $arg "$CONF/ntr";;
_install ntr "$CONF/ntr";;
splug)
_install $arg.toml "$CONF/splug/config.toml";;
_install splug.toml "$CONF/splug/config.toml";;
gtk)
_install $arg/gtkrc "${GTK2_RC_FILES:-$HOME/.gtkrc}"
_install $arg/settings.ini "$CONF/gtk-3.0/settings.ini";;
_install gtk/gtkrc "${GTK2_RC_FILES:-$HOME/.gtkrc}"
_install gtk/settings.ini "$CONF/gtk-3.0/settings.ini";;
user-dirs)
_install $arg "$CONF/user-dirs.dirs";;
_install user-dirs "$CONF/user-dirs.dirs";;
pulse)
_install $arg/default.pa "$CONF/pulse/default.pa"
_install $arg/daemon.conf "$CONF/pulse/daemon.conf";;
_install pulse/default.pa "$CONF/pulse/default.pa"
_install pulse/daemon.conf "$CONF/pulse/daemon.conf";;
fontconfig)
_install $arg "$CONF/fontconfig/fonts.conf";;
_install fontconfig "$CONF/fontconfig/fonts.conf";;
xonotic)
_install $arg.cfg "$HOME/.xonotic/autoexec.cfg";;
_install xonotic.cfg "$HOME/.xonotic/autoexec.cfg";;
*)
echo "Not recognized argument: $arg";;
esac

+ 4
- 12
splug.toml View File

@@ -50,6 +50,9 @@ files = ["vertical-selection.kak"]
["https://github.com/occivink/kakoune-sort-selections"]
files = ["sort-selections.kak"]

["https://gitlab.com/notramo/elvish.kak"]
files = ["elvish.kak"]

["https://github.com/andreyorst/smarttab.kak"]
files = ["rc/smarttab.kak"]

@@ -65,27 +68,16 @@ files = ["state-save.kak"]
["https://github.com/JJK96/kakoune-repl-send"]
files = ["repl.kak"]

["https://github.com/JJK96/kakoune-rainbow"]
files = ["rainbow.kak"]

# mpv plugins

["https://github.com/ElegantMonkey/mpv-webm"]
["https://github.com/ekisu/mpv-webm"]
files = ["build/webm.lua"]

["https://github.com/kevinlekiller/mpv_scripts"]
files = ["perfstats/perfstats.lua"]

["https://github.com/mpv-player/mpv"]
files = ["TOOLS/lua/autoload.lua"]

["https://github.com/nimatrueway/mpv-locatefile-lua-script"]
files = ["locatefile.lua"]

["https://github.com/rossy/mpv-repl"]
files = ["repl.lua"]

["https://github.com/mfcc64/mpv-scripts"]
files = ["visualizer.lua"]

["https://github.com/occivink/mpv-scripts"]

+ 1
- 1
xbps-src View File

@@ -11,7 +11,7 @@ XBPS_MAKEJOBS="${THREADS}"
XBPS_CCACHE=yes
XBPS_ALLOW_RESTRICTED=yes

XBPS_PKG_OPTIONS_mpv=~jack,~sndio,~alsa,~wayland
XBPS_PKG_OPTIONS_mpv=~jack,~sndio,~alsa,~wayland,vapoursynth
XBPS_PKG_OPTIONS_mpd=~sndio
XBPS_PKG_OPTIONS_SDL2=~sndio
XBPS_PKG_OPTIONS_mediainfo=~GUI

Loading…
Cancel
Save