From 1379bf56ab9a56a78515aa106426afda40fa6d6f Mon Sep 17 00:00:00 2001 From: Pierre Jeanjean Date: Wed, 27 Jan 2021 13:33:29 +0100 Subject: [PATCH] Updates --- .config/mpv/input.conf | 5 ++++ .config/mpv/mpv.conf | 30 +++++++++++++++---- .../94711DCB57D4938F3E4F7279D5B69224 | 3 -- .config/sway/config | 11 +++++-- .config/sway/workspace-rename.sh | 2 +- .zshenv | 3 ++ .zshrc | 3 ++ 7 files changed, 45 insertions(+), 12 deletions(-) delete mode 100644 .config/mpv/watch_later/94711DCB57D4938F3E4F7279D5B69224 diff --git a/.config/mpv/input.conf b/.config/mpv/input.conf index 32231a8..834ada7 100644 --- a/.config/mpv/input.conf +++ b/.config/mpv/input.conf @@ -1,3 +1,8 @@ ctrl+r cycle-values video-rotate 0 90 180 270 ctrl+b cycle deband +b cycle-values scale "bilinear" "spline64"; cycle-values dscale "bilinear" "mitchell"; cycle-values cscale "bilinear" "sinc" ctrl+s sub-reload +S screenshot-to-file /tmp/mpv-screenshot.png ; run sh -c "cat /tmp/mpv-screenshot.png | wl-copy -t image/png" + +x add sub-delay -0.04 +X add sub-delay +0.04 diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf index 9a8b9d6..ae71e0d 100644 --- a/.config/mpv/mpv.conf +++ b/.config/mpv/mpv.conf @@ -1,17 +1,35 @@ -#profile=gpu-hq +profile=gpu-hq #gpu-api=vulkan -#gpu-context=waylandvk -#hwdec=none +gpu-context=wayland +hwdec=none -ao=jack -audio-channels=stereo +#ao=jack +#audio-channels=stereo +scale=spline64 +dscale=mitchell +cscale=sinc +cscale-window=blackman +cscale-radius=3 deband=yes +screenshot-format=png + +#Interpolation +#blend-subtitles=yes +#video-sync=display-resample +#interpolation=yes +#tscale=box +#tscale-window=sphinx +#tscale-radius=1.0 +#tscale-clamp=0.0 sub-gray=yes # pour pas avoir des subs jaunes de merde sub-gauss=0.7 # ça rend les subs un peu moins carrés, peut-être à adapter à vos envies +sub-font="Roboto Regular" prefetch-playlist=yes rebase-start-time=no ytdl-format=bestvideo[height<=?1080]+bestaudio/best -ytdl-raw-options="rm-cache-dir=:yes-playlist=" +#ytdl-raw-options="rm-cache-dir=:yes-playlist=" + +osd-fractions=yes diff --git a/.config/mpv/watch_later/94711DCB57D4938F3E4F7279D5B69224 b/.config/mpv/watch_later/94711DCB57D4938F3E4F7279D5B69224 deleted file mode 100644 index 328ae6a..0000000 --- a/.config/mpv/watch_later/94711DCB57D4938F3E4F7279D5B69224 +++ /dev/null @@ -1,3 +0,0 @@ -start=0.000000 -audio-delay=-0.000000 -sub-delay=-0.200000 diff --git a/.config/sway/config b/.config/sway/config index 0284741..2de36b1 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -31,6 +31,7 @@ set $srclocker swaylock -c 222222 -u -i eDP-1:~/wallpapers/radiance.png\ output * pos 1920 0 res 1920 1080 output eDP-1 pos 0 300 res 3840 2160 output "Goldstar Company Ltd M2080D 0x00000101" pos 1920 0 res 1920 1080 +output "Dell Inc. DELL U2717D JXRPT83GAHKS" pos 1920 0 res 2560 1440 output HDMI-A-3 pos 1920 0 res 1920 1080 output * bg ~/wallpapers/filianore-u.jpg fill focus output eDP-1 @@ -121,7 +122,10 @@ input "1739:0:Synaptics_TM3276-031" { 'swaymsg exit' # Screenshot - bindsym Print exec grim -g "$(slurp -d)" - | wl-copy -t image/png + bindsym Print exec slurp -d | grim -g - - | wl-copy -t image/png + bindsym Ctrl+Print exec swaymsg -t get_tree | jq -r 'recurse(.nodes[], .floating_nodes[]) | select(.focused and .pid).rect | "\(.x),\(.y) \(.width)x\(.height)"' | grim -g - - | wl-copy -t image/png + bindsym Shift+Print exec grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') - | wl-copy -t image/png + # # Moving around: # @@ -277,7 +281,7 @@ for_window [class="Spotify"] opacity 0.8 #exec redshift -O 4500 -m wayland exec nm-applet --indicator -#exec ~/.local/start-jack.sh +# exec ~/.local/start-jack.sh exec ~/.config/sway/workspace-rename.sh @@ -293,3 +297,6 @@ exec discord exec spotify exec xrdb -load ~/.Xresources + +# Application keybinds +bindsym Ctrl+m exec mpv $(wl-paste -t text) diff --git a/.config/sway/workspace-rename.sh b/.config/sway/workspace-rename.sh index 87aa933..203bca0 100755 --- a/.config/sway/workspace-rename.sh +++ b/.config/sway/workspace-rename.sh @@ -13,7 +13,7 @@ swaymsg -t subscribe -m '[ "window" ]' | while read -r event ; do if [ "$app_name" = "kitty" ] ; then app_name="" - elif [ "$app_name" = "chromium" ] ; then + elif [ "$app_name" = "chromium" ] || [ "$app_name" = "Chromium" ]; then case "$(jq -r '.container.name' <<< $event)" in *YouTube*) app_name="" diff --git a/.zshenv b/.zshenv index 7c09607..498bc95 100644 --- a/.zshenv +++ b/.zshenv @@ -1,3 +1,6 @@ export JAVA_HOME=/usr/lib/jvm/$(archlinux-java get) export GDK_BACKEND=x11 export EDITOR=nvim + +export XDG_CURRENT_DESKTOP=sway +export XDG_SESSION_TYPE=wayland diff --git a/.zshrc b/.zshrc index c9e97e5..da802f1 100644 --- a/.zshrc +++ b/.zshrc @@ -33,3 +33,6 @@ if [ -f ~/.bash_aliases ]; then source ~/.bash_aliases fi eval $(thefuck --alias) + +alias chromium="export GDK_BACKEND=wayland && chromium --enable-features=UseOzonePlatform --ozone-platform=wayland" +alias discord="export GDK_BACKEND=wayland && discord-canary --enable-features=UseOzonePlatform,WebRTCPipeWireCapturer --ozone-platform=wayland"