Compare commits
52 Commits
arachnidsG
...
Oyashiro
| Author | SHA1 | Date | |
|---|---|---|---|
| f8643931f0 | |||
| e2772e383c | |||
| 7e3ad70840 | |||
| 2e0102881c | |||
| b139567065 | |||
| 1a60adb7e2 | |||
| 1b9be8f72a | |||
| cffbd4ec54 | |||
| 0d654d09fe | |||
| f3d849ba41 | |||
| 6e8d49ba6a | |||
| 15eaba2230 | |||
| e83a9c48b8 | |||
| f0300a5f79 | |||
| 257f0d724f | |||
| efcc99d06d | |||
| 6d9b419de7 | |||
| 65b26cb14d | |||
| e4083640bd | |||
| 92608f2e4b | |||
| 8b34da498c | |||
| 5b27c94972 | |||
| ec27ae8a22 | |||
| 3501b0b633 | |||
| ad95308459 | |||
| db13710736 | |||
| 029f385a41 | |||
| 623b7fb584 | |||
| 3941e53268 | |||
| e3de89f2d5 | |||
| 887d14a9d0 | |||
| 65833eb514 | |||
| ae6dfbff95 | |||
| 6b396ba033 | |||
| 5d5f49d97f | |||
| 8842455f4c | |||
| a5efbe744d | |||
| be84f20cc4 | |||
| 7cf820c3ff | |||
| 7924ab3ed1 | |||
| 1d9f022627 | |||
| 985b58d41c | |||
| ef3c12e4a2 | |||
| 755457b30e | |||
| 9677587aeb | |||
| 96b1e2ecb1 | |||
| dd98de48b2 | |||
| 11659a506f | |||
| 1379bf56ab | |||
| 21f74a1108 | |||
| 369392c3b0 | |||
| 468f2e1c0a |
@@ -1,9 +1,23 @@
|
||||
alias update='yay -Pw && yay -Sc && yay --editmenu -Syu --sudoloop --devel && yay -c \
|
||||
&& sudo pacdiff \
|
||||
; pkill -SIGUSR1 i3status-rs \
|
||||
; read -s -k "?Update finished! Press any key to exit..."'
|
||||
alias update='yay -Pw && yay -Sc && yay -Syu --sudoloop && yay -c && sudo pacdiff'
|
||||
alias gemocstudio='PATH=/usr/lib/jvm/java-9-jdk/bin/:$PATH ~/gemoc/GemocStudio'
|
||||
alias sl='ls'
|
||||
alias ls='ls --color=auto'
|
||||
alias cat='ccat -G Keyword="*glay*" -G Decimal="glay" -G Plaintext="glay" --bg=dark'
|
||||
alias youtube='URL=https://www.youtube.com/watch\?v\=Mvvsa5HAJiI\&list\=RDMM\&start_radio\=1 && PLAYLIST="" && for i in {1..30} ; do URL="https://www.youtube.com"`curl -s -b ~/.config/youtube-dl/youtube.txt $URL | grep "next-playlist-list-item" | sed '\''s/.*href=\"//'\'' | sed '\''s/\".*//'\'' | sed '\''s/\&/\&/g'\''` ; PLAYLIST="$PLAYLIST\n`echo $URL | sed '\''s/\&list.*//'\''`" ; done ; echo "$PLAYLIST" | mpv --playlist=-'
|
||||
|
||||
function javaversion() {
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Expected parameter <java_version>"
|
||||
else
|
||||
if [ "$1" -eq 8 ]; then
|
||||
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk
|
||||
elif [ "$1" -eq 9 ]; then
|
||||
export JAVA_HOME=/usr/lib/jvm/java-9-jdk
|
||||
elif [ "$1" -eq 10 ]; then
|
||||
export JAVA_HOME=/usr/lib/jvm/java-10-openjdk
|
||||
elif [ "$1" -eq 11 ]; then
|
||||
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk
|
||||
fi
|
||||
export PATH=$JAVA_HOME/bin:$PATH
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
export EDITOR=nvim
|
||||
export CUPS_SERVER=cups-sam.inria.fr:631
|
||||
export GTK_THEME=SolArc-Dark
|
||||
export GTK2_RC_FILES=/usr/share/themes/SolArc-Dark/gtk-2.0/gtkrc
|
||||
export GTK_THEME=NumixSolarizedDarkBlue
|
||||
export GTK2_RC_FILES=/usr/share/themes/NumixSolarizedDarkBlue/gtk-2.0/gtkrc
|
||||
export QT_QPA_PLATFORMTHEME=gtk2
|
||||
|
||||
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
||||
|
||||
2
.config/BetterDiscord/.gitignore
vendored
Normal file
2
.config/BetterDiscord/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
emote_data.json
|
||||
logs.log
|
||||
51
.config/BetterDiscord/bdstorage.json
Normal file
51
.config/BetterDiscord/bdstorage.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"settings": {
|
||||
"stable": {
|
||||
"settings": {
|
||||
"bda-gs-1": true,
|
||||
"bda-gs-2": false,
|
||||
"bda-gs-3": false,
|
||||
"bda-gs-4": false,
|
||||
"bda-gs-5": false,
|
||||
"bda-gs-6": false,
|
||||
"bda-gs-7": false,
|
||||
"bda-gs-8": true,
|
||||
"bda-es-0": false,
|
||||
"bda-es-1": false,
|
||||
"bda-es-2": false,
|
||||
"bda-es-4": false,
|
||||
"bda-es-6": false,
|
||||
"bda-es-7": false,
|
||||
"bda-gs-b": false,
|
||||
"bda-es-8": false,
|
||||
"bda-dc-0": false,
|
||||
"bda-css-0": true,
|
||||
"bda-css-1": false,
|
||||
"bda-es-9": false,
|
||||
"fork-dm-1": false,
|
||||
"fork-ps-1": true,
|
||||
"fork-ps-2": true,
|
||||
"fork-ps-3": true,
|
||||
"fork-ps-4": true,
|
||||
"fork-ps-5": true,
|
||||
"fork-es-2": false,
|
||||
"fork-es-3": false,
|
||||
"fork-wp-1": true,
|
||||
"fork-wp-2": false,
|
||||
"fork-beta": true,
|
||||
"reactDevTools": false,
|
||||
"transparency": true
|
||||
},
|
||||
"plugins": {},
|
||||
"themes": {
|
||||
"Frosted Glass": true
|
||||
}
|
||||
},
|
||||
"canary": {},
|
||||
"ptb": {}
|
||||
},
|
||||
"version": "0.3.5",
|
||||
"emoteCacheDays": 7,
|
||||
"emoteCacheDate": "2020-10-24T10:21:17.385Z",
|
||||
"bdcustomcss": "I2FwcC1tb3VudCAuY2hhdC0zYlJ4eHUgLm1lc3NhZ2VzV3JhcHBlci0zbFpEZlkgW2NsYXNzKj10aW1lc3RhbXBdLAojYXBwLW1vdW50IC5jaGF0LTNiUnh4dSAubWVzc2FnZXNXcmFwcGVyLTNsWkRmWSAubWVzc2FnZUNvbnRlbnQtMnFXV3hDLAojYXBwLW1vdW50IC5zaWRlYmFyLTJLOHBGaCAuY29udGFpbmVyLVBOa2ltYyAuY29udGFpbmVyRGVmYXVsdC0xWm5BRHEgLndyYXBwZXItMXVjalRkOm5vdCgubW9kZU11dGVkLTNvc3k3aik6bm90KC5tb2RlVW5yZWFkLTF6cEZkQSk6bm90KC5tb2RlU2VsZWN0ZWQtMXpBcEpfKSAuY29udGVudC0zYXRfQVUgLm5hbWUtM19Ec21nLAojYXBwLW1vdW50IC5zaWRlYmFyLTJLOHBGaCAuY29udGFpbmVyLVBOa2ltYyAuY29udGFpbmVyRGVmYXVsdC0xWm5BRHEgLndyYXBwZXItMXVjalRkOm5vdCgubW9kZU11dGVkLTNvc3k3aik6bm90KC5tb2RlVW5yZWFkLTF6cEZkQSk6bm90KC5tb2RlU2VsZWN0ZWQtMXpBcEpfKSAuY29udGVudC0zYXRfQVUgc3ZnLAojYXBwLW1vdW50IC5zaWRlYmFyLTJLOHBGaCAuY2hhbm5lbC0yUUQ5X08gewogICAgY29sb3I6ICM5M2ExYTEgIWltcG9ydGFudDsKfQoKI2FwcC1tb3VudCA6OnNlbGVjdGlvbiwKI2FwcC1tb3VudCAuY2hhdC0zYlJ4eHUgLm1lbnRpb24sCiNhcHAtbW91bnQgLm1lbWJlcnMtMTk5OHBCIC5tZW1iZXItMy1ZWFVlLnNlbGVjdGVkLWFYaFFSNiAucm9sZUNvbG9yLXJ6MnZNMCwKI2FwcC1tb3VudCAubWVtYmVycy0xOTk4cEIgLm1lbWJlci0zLVlYVWUgLmJvdFRhZy0yV1BKNzQsCiNhcHAtbW91bnQgLnNpZGViYXItMks4cEZoIC5jb250YWluZXItUE5raW1jIC5jb250YWluZXJEZWZhdWx0LTFabkFEcS5zZWxlY3RlZC0zN2pfaVUgLmNvbnRlbnQtM2F0X0FVIC5uYW1lLTNfRHNtZywKI2FwcC1tb3VudCAuc2lkZWJhci0ySzhwRmggLmNvbnRhaW5lci1QTmtpbWMgLmNvbnRhaW5lckRlZmF1bHQtMVpuQURxLnNlbGVjdGVkLTM3al9pVSAuY29udGVudC0zYXRfQVUgc3ZnLAojYXBwLW1vdW50IC50b29sdGlwQmxhY2stUFBHNDd6LCAjYXBwLW1vdW50IC50b29sdGlwQnJhbmQtZzAzTno4LCAjYXBwLW1vdW50IC50b29sdGlwUmVkLTgtOU5lUCwKI2FwcC1tb3VudCAuYnViYmxlLTN3ZTJkaSwgI2FwcC1tb3VudCAuc2lkZWJhci0ySzhwRmggLmNvbnRhaW5lci1QTmtpbWMgLmNvbnRhaW5lckRlZmF1bHQtMVpuQURxIC53cmFwcGVyLTF1Y2pUZDpub3QoLm1vZGVNdXRlZC0zb3N5N2opLm1vZGVVbnJlYWQtMXpwRmRBIC5jb250ZW50LTNhdF9BVSAubmFtZS0zX0RzbWcsCiNhcHAtbW91bnQgLnNpZGViYXItMks4cEZoIC5jb250YWluZXItUE5raW1jIC5jb250YWluZXJEZWZhdWx0LTFabkFEcSAud3JhcHBlci0xdWNqVGQ6bm90KC5tb2RlTXV0ZWQtM29zeTdqKS5tb2RlVW5yZWFkLTF6cEZkQSAuY29udGVudC0zYXRfQVUgc3ZnIHsKICAgIGNvbG9yOiAjMDAyYjM2ICFpbXBvcnRhbnQ7CiAgICB0ZXh0LXNoYWRvdzogbm9uZSAhaW1wb3J0YW50Owp9CgojYXBwLW1vdW50IC5zaWRlYmFyLTJLOHBGaCAuY29udGFpbmVyLVBOa2ltYyAuY29udGFpbmVyRGVmYXVsdC0xWm5BRHEgLndyYXBwZXItMXVjalRkOm5vdCgubW9kZU11dGVkLTNvc3k3aikubW9kZVVucmVhZC0xenBGZEEgLmNvbnRlbnQtM2F0X0FVIHsKICAgIGJhY2tncm91bmQ6ICMyNjhiZDIgIWltcG9ydGFudDsKfQoKI2FwcC1tb3VudCAuc2lkZWJhci0ySzhwRmggLmNoYW5uZWwtMlFEOV9PLnNlbGVjdGVkLWFYaFFSNiB7CiAgICBiYWNrZ3JvdW5kOiBsaW5lYXItZ3JhZGllbnQodmFyKC0tQkctZ3JhZGllbnQtZGlyZWN0aW9uKSwgcmdiYSh2YXIoLS1CRy1ncmFkaWVudC1vbmUpLCAxKSAyMCUsIHJnYmEodmFyKC0tQkctZ3JhZGllbnQtdHdvKSwgMSkpOwogICAgY29sb3I6ICMwMDJiMzYgIWltcG9ydGFudDsKICAgIHRleHQtc2hhZG93OiBub25lICFpbXBvcnRhbnQ7Cgp9"
|
||||
}
|
||||
45
.config/BetterDiscord/themes/Frosted Glass.theme.css
Normal file
45
.config/BetterDiscord/themes/Frosted Glass.theme.css
Normal file
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* @name Frosted Glass
|
||||
* @author Gibbu#1211
|
||||
* @version 2.0.0
|
||||
* @description Edited with https://gibbu.me/editor/frostedglass | Base theme: Frosted Glass by Gibbu#1211
|
||||
* @invite ZHthyCw
|
||||
* @donate https://paypal.me/IanRGibson
|
||||
* @authorId 174868361040232448
|
||||
* @source https://github.com/Gibbu/BetterDiscord-Themes/tree/master/FrostedGlass
|
||||
* @website https://gibbu.me/editor/frostedglass
|
||||
*/
|
||||
@import url('https://fonts.googleapis.com/css?family=DejaVu+Sans+Mono:300,400,500,600,700,800,900&display=swap');
|
||||
@import url('https://gibbu.github.io/BetterDiscord-Themes/FrostedGlass/base.css');
|
||||
@import url('https://discord-custom-covers.github.io/usrbg/snippets/userPopouts.css');
|
||||
@import url('https://discord-custom-covers.github.io/usrbg/snippets/modals.css');
|
||||
@import url('https://monstrousdev.github.io/themes/addons/user-tags.css');
|
||||
@import url('https://gibbu.github.io/BetterDiscord-Themes/addons/windows-titlebar.css');
|
||||
|
||||
|
||||
:root {
|
||||
|
||||
--background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAADGHpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHja7ZZbkhshDEX/WUWWgCSEYDk8q7KDLD8XGnvsSTKZqXylyk01DwGS4Ehtu/Hj+3Tf8LAX74JaijlGjyfkkLmgk/z1lF2TD7t+lK3xk9zdJxgiQSvXMMUjH5Az1vORt6OnQK4PivI4E/V5ohxFnI6Bm0fHkNBlwPejqBxFwsdyuMb1WI452eMRzr51fDrtft2qghhHjWQBdWBvFjP6iX0w3Ftfjs7Gee3Teul5P3a3pbh55iEkftfp8lKut+BV1CwZ6zCLfsCooB/2/XoHZHABnudzt8Pfb/Ppbm7tHx73mWOdcHgOg1vvhIH7ZeJdGMRx5PKOXry3W+7eT5D+Hvdm+uCRhbthfvIIE/Hp0OntnbOnOcd1uhIijhzPoW4nIbdRzl5XEOxtEcXwKvq2S0ZJyICGGOu++YrSKBMD8aRAnQpNR2N3GjX4GHiwoWVuLFuWwCJzkwU9rEKTTbJ0hABLQ6jICoQ53fGFtt287TVKsNwJS5mgjLDlr8V9ZtFHZc6VS0Tu5AxdgHmlIdxY5FaNZSBC81yq7gu+leeAPGAFCHVfc8IBi6+Xiqr0FluyQQvWKdorucn6tX8pCrCtcIYECHwkUYrkjdmIcJEJgAr5xBK4ggCpcoeTHEQi2CAJYNphj9Fey8qXHF9JkFCJYmCTpQBWCIr4sZAQQ0VFg6pGNU2atUSJwSHDYrS4PrfFxIKpRTNLlq0kSSFpislSSjmVzFnwNdaMdMwp51wKbBZoLtEVrC+QVK5SQ9Uaq9VUcy0N4dNC0xabtdRyK527dORxj9166rmXQQOhNMJQN+KwkUYeZSLWpswwdcZpM808y53aofpL+QI1OtR4k1rr7E4NUrOrdTteoGQxAzEOBOK2CCCgeTHziULgRW4x85mRFcpwUhebTr5Q5OAkDGKddGf3Ru5L3FwMH3Ljz5JzC90/ktvc3NAHbr+h1tcvcdvErixcd+oF2TdpFE6Fa/WTm1vdVNYv6r+1L0UvRS9FL0UvRS9FL0X/tyL8fcjuJ86avGDS/Nk0AAABhGlDQ1BJQ0MgcHJvZmlsZQAAeJx9kT1Iw0AcxV9Ti1IqCnYQUcjQOlkQFXHUKhShQqgVWnUwufQLmjQkKS6OgmvBwY/FqoOLs64OroIg+AHi5Oik6CIl/i8ttIjx4Lgf7+497t4BQr3MNKtrHNB020wl4mImuyp2vyKAEfQjiqDMLGNOkpLwHF/38PH1LsazvM/9OXrVnMUAn0g8ywzTJt4gnt60Dc77xGFWlFXic+Ixky5I/Mh1pclvnAsuCzwzbKZT88RhYrHQwUoHs6KpEU8RR1RNp3wh02SV8xZnrVxlrXvyF4Zy+soy12kOI4FFLEGCCAVVlFCGjRitOikWUrQf9/APuX6JXAq5SmDkWEAFGmTXD/4Hv7u18pMTzaRQHAi8OM5HFOjeBRo1x/k+dpzGCeB/Bq70tr9SB2Y+Sa+1tcgR0LcNXFy3NWUPuNwBBp8M2ZRdyU9TyOeB9zP6piwwcAsE15q9tfZx+gCkqavkDXBwCIwWKHvd4909nb39e6bV3w9c3HKeW1/O7QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAAd0SU1FB+QFHRAqDr9nsVkAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAGElEQVQY02Nk0DbrYSACMDEQCUYVUkchAIoXAQHyaCuwAAAAAElFTkSuQmCC');
|
||||
--background-image-blur: 0px;
|
||||
--popout-modal-image: var(--background-image);
|
||||
--popout-modal-blur: 0px;
|
||||
--home-button-image: url('https://gibbu.github.io/BetterDiscord-Themes/FrostedGlass/assets/discord.svg');
|
||||
--serverlist-brightness: 0;
|
||||
--left-brightness: 0;
|
||||
--middle-brightness: 0;
|
||||
--right-brightness: 0;
|
||||
--popout-modal-brightness: 0.5;
|
||||
--gradient-primary: 133,153,0;
|
||||
--gradient-secondary: 133,153,0;
|
||||
--gradient-direction: 320deg;
|
||||
--tint-colour: 255,51,159;
|
||||
--tint-brightness: 0;
|
||||
--window-padding: 0px;
|
||||
--window-roundness: 0px;
|
||||
--scrollbar-colour: rgba(255,255,255,0.05);
|
||||
--link-colour: #00b0f4;
|
||||
--show-gift-gif-buttons: none;
|
||||
--font: 'DejaVu Sans Mono';
|
||||
--update-notice-1: none;
|
||||
|
||||
}
|
||||
BIN
.config/BetterDiscord/themes/background.png
Normal file
BIN
.config/BetterDiscord/themes/background.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@@ -1,2 +1,3 @@
|
||||
--enable-features=VaapiVideoDecoder,VaapiVideoEncoder,WebUIDarkMode
|
||||
--ozone-platform=wayland
|
||||
--force-dark-mode
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
--enable-features=UseOzonePlatform
|
||||
--enable-features=VaapiVideoDecoder
|
||||
--ozone-platform=wayland
|
||||
--in-process-gpu
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
--enable-features=UseOzonePlatform
|
||||
--ozone-platform=wayland
|
||||
@@ -1 +1,2 @@
|
||||
XDG_CURRENT_DESKTOP=sway
|
||||
export XDG_CURRENT_DESKTOP=sway
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
|
||||
2
.config/kitty/bell.sh
Executable file
2
.config/kitty/bell.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
find ~/.config/kitty/bells -type f | shuf -n 1 | mpv --audio-display=no --playlist=-
|
||||
BIN
.config/kitty/bells/loli.mp3
Normal file
BIN
.config/kitty/bells/loli.mp3
Normal file
Binary file not shown.
@@ -184,11 +184,6 @@ font_family DejaVuSansMono
|
||||
|
||||
#: map cmd+shift+v paste_from_buffer a1
|
||||
|
||||
map ctrl+shift+up send_text application \033[0A
|
||||
map ctrl+shift+right send_text application \033[0C
|
||||
map ctrl+shift+down send_text application \033[0B
|
||||
map ctrl+shift+left send_text application \033[0D
|
||||
|
||||
#: Note that copying to the clipboard is a security risk, as all
|
||||
#: programs, including websites open in your browser can read the
|
||||
#: contents of the system clipboard.
|
||||
@@ -266,7 +261,7 @@ map ctrl+shift+left send_text application \033[0D
|
||||
|
||||
#: Terminal bell {{{
|
||||
|
||||
enable_audio_bell no
|
||||
# enable_audio_bell yes
|
||||
|
||||
#: Enable/disable the audio bell. Useful in environments that require
|
||||
#: silence.
|
||||
@@ -287,7 +282,8 @@ enable_audio_bell no
|
||||
#: windows in the tab and the window is not the currently focused
|
||||
#: window
|
||||
|
||||
# command_on_bell none
|
||||
# command_on_bell mpv --audio-display=no ~/loli.mp3
|
||||
# command_on_bell ~/.config/kitty/bell.sh
|
||||
|
||||
#: Program to run when a bell occurs.
|
||||
|
||||
@@ -495,7 +491,6 @@ color15 #fdf6e3
|
||||
|
||||
#: The foreground and background colors
|
||||
|
||||
#background_opacity 0.8
|
||||
background_opacity 1.0
|
||||
|
||||
#: The opacity of the background. A number between 0 and 1, where 1 is
|
||||
@@ -1040,6 +1035,8 @@ shell /bin/zsh
|
||||
# map kitty_mod+a>1 set_background_opacity 1
|
||||
# map kitty_mod+a>d set_background_opacity default
|
||||
# map kitty_mod+delete clear_terminal reset active
|
||||
map kitty_mod+a>o set_background_opacity 1.0
|
||||
map kitty_mod+a>t set_background_opacity 0.8
|
||||
|
||||
#: You can create shortcuts to clear/reset the terminal. For example::
|
||||
|
||||
|
||||
@@ -2,17 +2,13 @@ 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
|
||||
ctrl+S cycle shuffle
|
||||
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
|
||||
|
||||
- add video-zoom -.25
|
||||
+ add video-zoom .25
|
||||
kp8 add video-pan-y .05
|
||||
kp6 add video-pan-x -.05
|
||||
kp2 add video-pan-y -.05
|
||||
kp4 add video-pan-x .05
|
||||
# increase subtitle font size
|
||||
ALT+k add sub-scale +0.1
|
||||
|
||||
kp5 set video-pan-x 0; set video-pan-y 0; set video-zoom 0
|
||||
# decrease subtitle font size
|
||||
ALT+j add sub-scale -0.1
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
profile=gpu-hq
|
||||
#gpu-api=vulkan
|
||||
#gpu-context=waylandvk
|
||||
gpu-context=wayland
|
||||
hwdec=none
|
||||
fullscreen=yes
|
||||
hdr-compute-peak=no
|
||||
|
||||
#ao=jack
|
||||
#audio-channels=stereo
|
||||
@@ -27,10 +28,18 @@ screenshot-format=png
|
||||
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"
|
||||
#sub-ass-vsfilter-aspect-compat=no
|
||||
#sub-ass-vsfilter-blur-compat=no
|
||||
|
||||
prefetch-playlist=yes
|
||||
rebase-start-time=no
|
||||
ytdl-format=bestvideo[height<=?1080]+bestaudio/best
|
||||
ytdl-format=bestvideo[height<=?1440]+bestaudio/best
|
||||
#ytdl-raw-options="rm-cache-dir=:yes-playlist="
|
||||
|
||||
osd-fractions=yes
|
||||
|
||||
[downmix]
|
||||
profile-desc="downmixing profile"
|
||||
profile-cond=p["audio-params/channel-count"] > 2
|
||||
ad-lavc-downmix=no
|
||||
af=lavfi="pan=stereo|FL=0.707*FC+0.5*FL+0.5*BL+0.1*LFE|FR=0.707*FC+0.5*FR+0.5*BR+0.1*LFE"
|
||||
|
||||
1
.config/mpv/script-opts/.gitignore
vendored
Normal file
1
.config/mpv/script-opts/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
japan7.conf
|
||||
1
.config/mpv/script-opts/autocrop.conf
Normal file
1
.config/mpv/script-opts/autocrop.conf
Normal file
@@ -0,0 +1 @@
|
||||
auto=no
|
||||
@@ -1 +1,29 @@
|
||||
# Socket path (leave empty for auto)
|
||||
socket=
|
||||
|
||||
# Thumbnail path (leave empty for auto)
|
||||
thumbnail=
|
||||
|
||||
# Maximum thumbnail size in pixels (scaled down to fit)
|
||||
# Values are scaled when hidpi is enabled
|
||||
max_height=200
|
||||
max_width=200
|
||||
|
||||
# Overlay id
|
||||
overlay_id=42
|
||||
|
||||
# Thumbnail interval in seconds set to 0 to disable (warning: high cpu usage)
|
||||
interval=6
|
||||
|
||||
# Number of thumbnails
|
||||
min_thumbnails=6
|
||||
max_thumbnails=120
|
||||
|
||||
# Spawn thumbnailer on file load for faster initial thumbnails
|
||||
spawn_first=no
|
||||
|
||||
# Enable on network playback
|
||||
network=yes
|
||||
|
||||
# Enable on audio playback
|
||||
audio=no
|
||||
|
||||
329
.config/mpv/scripts/autocrop.lua
Normal file
329
.config/mpv/scripts/autocrop.lua
Normal file
@@ -0,0 +1,329 @@
|
||||
--[[
|
||||
This script uses the lavfi cropdetect filter to automatically
|
||||
insert a crop filter with appropriate parameters for the
|
||||
currently playing video.
|
||||
|
||||
It will automatically crop the video, when playback starts.
|
||||
|
||||
Also It registers the key-binding "C" (shift+c). You can manually
|
||||
crop the video by pressing the "C" (shift+c) key.
|
||||
|
||||
If the "C" key is pressed again, the crop filter is removed
|
||||
restoring playback to its original state.
|
||||
|
||||
The workflow is as follows: First, it inserts the filter
|
||||
vf=lavfi=cropdetect. After <detect_seconds> (default is 1)
|
||||
seconds, it then inserts the filter vf=crop=w:h:x:y, where
|
||||
w,h,x,y are determined from the vf-metadata gathered by
|
||||
cropdetect. The cropdetect filter is removed immediately after
|
||||
the crop filter is inserted as it is no longer needed.
|
||||
|
||||
Since the crop parameters are determined from the 1 second of
|
||||
video between inserting the cropdetect and crop filters, the "C"
|
||||
key should be pressed at a position in the video where the crop
|
||||
region is unambiguous (i.e., not a black frame, black background
|
||||
title card, or dark scene).
|
||||
|
||||
The default options can be overridden by adding
|
||||
script-opts-append=autocrop-<parameter>=<value> into mpv.conf
|
||||
|
||||
List of available parameters (For default values, see <options>):
|
||||
|
||||
auto: bool - Whether to automatically apply crop at the start of
|
||||
playback. If you don't want to crop automatically, set it to
|
||||
false or add "script-opts-append=autocrop-auto=no" into
|
||||
mpv.conf.
|
||||
|
||||
auto_delay: seconds - Delay before starting crop in auto mode.
|
||||
You can try to increase this value to avoid dark scene or
|
||||
fade in at beginning. Automatic cropping will not occur if
|
||||
the value is larger than the remaining playback time.
|
||||
|
||||
detect_limit: number[0-255] - Black threshold for cropdetect.
|
||||
Smaller values will generally result in less cropping.
|
||||
See limit of https://ffmpeg.org/ffmpeg-filters.html#cropdetect
|
||||
|
||||
detect_round: number[2^n] - The value which the width/height
|
||||
should be divisible by. Smaller values have better detection
|
||||
accuracy. If you have problems with other filters,
|
||||
you can try to set it to 4 or 16.
|
||||
See round of https://ffmpeg.org/ffmpeg-filters.html#cropdetect
|
||||
|
||||
detect_min_ratio: number[0.0-1.0] - The ratio of the minimum clip
|
||||
size to the original. If the picture is over cropped or under
|
||||
cropped, try adjusting this value.
|
||||
|
||||
detect_seconds: seconds - How long to gather cropdetect data.
|
||||
Increasing this may be desirable to allow cropdetect more
|
||||
time to collect data.
|
||||
|
||||
suppress_osd: bool - Whether the OSD shouldn't be used when filters
|
||||
are applied and removed.
|
||||
--]]
|
||||
|
||||
require "mp.msg"
|
||||
require 'mp.options'
|
||||
|
||||
local options = {
|
||||
auto = true,
|
||||
auto_delay = 4,
|
||||
detect_limit = "24/255",
|
||||
detect_round = 2,
|
||||
detect_min_ratio = 0.5,
|
||||
detect_seconds = 1,
|
||||
suppress_osd = false,
|
||||
}
|
||||
read_options(options)
|
||||
|
||||
local label_prefix = mp.get_script_name()
|
||||
local labels = {
|
||||
crop = string.format("%s-crop", label_prefix),
|
||||
cropdetect = string.format("%s-cropdetect", label_prefix)
|
||||
}
|
||||
|
||||
timers = {
|
||||
auto_delay = nil,
|
||||
detect_crop = nil
|
||||
}
|
||||
|
||||
local command_prefix = options.suppress_osd and 'no-osd' or ''
|
||||
|
||||
function is_filter_present(label)
|
||||
local filters = mp.get_property_native("vf")
|
||||
for index, filter in pairs(filters) do
|
||||
if filter["label"] == label then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function is_enough_time(seconds)
|
||||
|
||||
-- Plus 1 second for deviation.
|
||||
local time_needed = seconds + 1
|
||||
local playtime_remaining = mp.get_property_native("playtime-remaining")
|
||||
|
||||
return playtime_remaining and time_needed < playtime_remaining
|
||||
end
|
||||
|
||||
function is_cropable()
|
||||
for _, track in pairs(mp.get_property_native('track-list')) do
|
||||
if track.type == 'video' and track.selected then
|
||||
return not track.albumart
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
function remove_filter(label)
|
||||
if is_filter_present(label) then
|
||||
mp.command(string.format('%s vf remove @%s', command_prefix, label))
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function cleanup()
|
||||
|
||||
-- Remove all existing filters.
|
||||
for key, value in pairs(labels) do
|
||||
remove_filter(value)
|
||||
end
|
||||
|
||||
-- Kill all timers.
|
||||
for index, timer in pairs(timers) do
|
||||
if timer then
|
||||
timer:kill()
|
||||
timer = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function detect_crop()
|
||||
|
||||
-- If it's not cropable, exit.
|
||||
if not is_cropable() then
|
||||
mp.msg.warn("autocrop only works for videos.")
|
||||
return
|
||||
end
|
||||
|
||||
-- Verify if there is enough time to detect crop.
|
||||
local time_needed = options.detect_seconds
|
||||
|
||||
if not is_enough_time(time_needed) then
|
||||
mp.msg.warn("Not enough time to detect crop.")
|
||||
return
|
||||
end
|
||||
|
||||
-- Insert the cropdetect filter.
|
||||
local limit = options.detect_limit
|
||||
local round = options.detect_round
|
||||
|
||||
mp.command(
|
||||
string.format(
|
||||
'%s vf pre @%s:cropdetect=limit=%s:round=%d:reset=0',
|
||||
command_prefix, labels.cropdetect, limit, round
|
||||
)
|
||||
)
|
||||
|
||||
-- Wait to gather data.
|
||||
timers.detect_crop = mp.add_timeout(time_needed, detect_end)
|
||||
end
|
||||
|
||||
function detect_end()
|
||||
|
||||
-- Get the metadata and remove the cropdetect filter.
|
||||
local cropdetect_metadata =
|
||||
mp.get_property_native(
|
||||
string.format("vf-metadata/%s",
|
||||
labels.cropdetect
|
||||
)
|
||||
)
|
||||
remove_filter(labels.cropdetect)
|
||||
|
||||
-- Remove the timer of detect crop.
|
||||
if timers.detect_crop then
|
||||
timers.detect_crop:kill()
|
||||
timers.detect_crop = nil
|
||||
end
|
||||
|
||||
local meta = {}
|
||||
|
||||
-- Verify the existence of metadata.
|
||||
if cropdetect_metadata then
|
||||
meta = {
|
||||
w = cropdetect_metadata["lavfi.cropdetect.w"],
|
||||
h = cropdetect_metadata["lavfi.cropdetect.h"],
|
||||
x = cropdetect_metadata["lavfi.cropdetect.x"],
|
||||
y = cropdetect_metadata["lavfi.cropdetect.y"],
|
||||
}
|
||||
else
|
||||
mp.msg.error("No crop data.")
|
||||
mp.msg.info("Was the cropdetect filter successfully inserted?")
|
||||
mp.msg.info("Does your version of ffmpeg/libav support AVFrame metadata?")
|
||||
return
|
||||
end
|
||||
|
||||
-- Verify that the metadata meets the requirements and convert it.
|
||||
if meta.w and meta.h and meta.x and meta.y then
|
||||
local width = mp.get_property_native("width")
|
||||
local height = mp.get_property_native("height")
|
||||
|
||||
meta = {
|
||||
w = tonumber(meta.w),
|
||||
h = tonumber(meta.h),
|
||||
x = tonumber(meta.x),
|
||||
y = tonumber(meta.y),
|
||||
min_w = width * options.detect_min_ratio,
|
||||
min_h = height * options.detect_min_ratio,
|
||||
max_w = width,
|
||||
max_h = height
|
||||
}
|
||||
else
|
||||
mp.msg.error("Got empty crop data.")
|
||||
mp.msg.info("You might need to increase detect_seconds.")
|
||||
return
|
||||
end
|
||||
|
||||
apply_crop(meta)
|
||||
end
|
||||
|
||||
function apply_crop(meta)
|
||||
|
||||
-- Verify if it is necessary to crop.
|
||||
local is_effective = meta.x > 0 or meta.y > 0
|
||||
or meta.w < meta.max_w or meta.h < meta.max_h
|
||||
|
||||
if not is_effective then
|
||||
mp.msg.info("No area detected for cropping.")
|
||||
return
|
||||
end
|
||||
|
||||
-- Verify it is not over cropped.
|
||||
local is_excessive = meta.w < meta.min_w and meta.h < meta.min_h
|
||||
|
||||
if is_excessive then
|
||||
mp.msg.info("The area to be cropped is too large.")
|
||||
mp.msg.info("You might need to decrease detect_min_ratio.")
|
||||
return
|
||||
end
|
||||
|
||||
-- Remove existing crop.
|
||||
remove_filter(labels.crop)
|
||||
|
||||
-- Apply crop.
|
||||
mp.command(
|
||||
string.format("%s vf pre @%s:lavfi-crop=w=%s:h=%s:x=%s:y=%s",
|
||||
command_prefix, labels.crop, meta.w, meta.h, meta.x, meta.y
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
function on_start()
|
||||
|
||||
-- Clean up at the beginning.
|
||||
cleanup()
|
||||
|
||||
-- If auto is not true, exit.
|
||||
if not options.auto then
|
||||
return
|
||||
end
|
||||
|
||||
-- If it is the beginning, wait for detect_crop
|
||||
-- after auto_delay seconds, otherwise immediately.
|
||||
local playback_time = mp.get_property_native("playback-time")
|
||||
local is_delay_needed = playback_time
|
||||
and options.auto_delay > playback_time
|
||||
|
||||
if is_delay_needed then
|
||||
|
||||
-- Verify if there is enough time for autocrop.
|
||||
local time_needed = options.auto_delay + options.detect_seconds
|
||||
|
||||
if not is_enough_time(time_needed) then
|
||||
mp.msg.warn("Not enough time for autocrop.")
|
||||
return
|
||||
end
|
||||
|
||||
timers.auto_delay = mp.add_timeout(time_needed,
|
||||
function()
|
||||
detect_crop()
|
||||
|
||||
-- Remove the timer of auto delay.
|
||||
timers.auto_delay:kill()
|
||||
timers.auto_delay = nil
|
||||
end
|
||||
)
|
||||
else
|
||||
detect_crop()
|
||||
end
|
||||
end
|
||||
|
||||
function on_toggle()
|
||||
|
||||
-- If it is during auto_delay, kill the timer.
|
||||
if timers.auto_delay then
|
||||
timers.auto_delay:kill()
|
||||
timers.auto_delay = nil
|
||||
end
|
||||
|
||||
-- Cropped => Remove it.
|
||||
if remove_filter(labels.crop) then
|
||||
return
|
||||
end
|
||||
|
||||
-- Detecting => Leave it.
|
||||
if timers.detect_crop then
|
||||
mp.msg.warn("Already cropdetecting!")
|
||||
return
|
||||
end
|
||||
|
||||
-- Neither => Do delectcrop.
|
||||
detect_crop()
|
||||
end
|
||||
|
||||
mp.add_key_binding("C", "toggle_crop", on_toggle)
|
||||
mp.register_event("end-file", cleanup)
|
||||
mp.register_event("file-loaded", on_start)
|
||||
35
.config/mpv/scripts/japan7.lua
Normal file
35
.config/mpv/scripts/japan7.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
local settings = {
|
||||
username = "",
|
||||
password = "",
|
||||
projo_host = ""
|
||||
}
|
||||
|
||||
local opts = require 'mp.options'
|
||||
opts.read_options(settings, "japan7")
|
||||
|
||||
|
||||
local function is_projo(path)
|
||||
return path:match("^https://projection")
|
||||
end
|
||||
|
||||
|
||||
function on_load()
|
||||
local path = mp.get_property("path")
|
||||
local match = path:gsub("^https://fubuki.aidoru.agency", "https://"..settings.username..":"..settings.password.."@fubuki.aidoru.agency")
|
||||
match = match:gsub("^https://korone.aidoru.agency", "https://"..settings.username..":"..settings.password.."@korone.aidoru.agency")
|
||||
match = match:gsub("^https://yuyuko.butaishoujo.moe", "https://"..settings.username..":"..settings.password.."@yuyuko.butaishoujo.moe")
|
||||
match = match:gsub("^https://projo.yuru.moe", "https://"..settings.username..":"..settings.password.."@projo.yuru.moe")
|
||||
match = match:gsub("^https://gungnir.dato.moe", "https://"..settings.username..":"..settings.password.."@gungnir.dato.moe")
|
||||
match = match:gsub("^https://projection", settings.projo_host)
|
||||
if match ~= path then
|
||||
if is_projo(path) then
|
||||
local stream = match:gsub("^(.+)/.-$", "%1/stream")
|
||||
mp.set_property("ordered-chapters-files", stream)
|
||||
end
|
||||
mp.set_property("stream-open-filename", match)
|
||||
local ass = match:gsub("...$", "ass")
|
||||
mp.commandv("sub-add", ass)
|
||||
end
|
||||
end
|
||||
|
||||
mp.register_event('start-file', on_load)
|
||||
@@ -1,34 +0,0 @@
|
||||
local utils = require("mp.utils")
|
||||
|
||||
local function get_kdata(kid)
|
||||
local resp = mp.command_native({
|
||||
name = "subprocess",
|
||||
args = { "curl", "-s", "https://kara.moe/api/karas/" .. kid },
|
||||
capture_stdout = true,
|
||||
})
|
||||
|
||||
return utils.parse_json(resp.stdout)
|
||||
end
|
||||
|
||||
local function get_title(kdata)
|
||||
return kdata.titles[kdata.titles_default_language]
|
||||
end
|
||||
|
||||
local function on_load()
|
||||
local path = mp.get_property("path")
|
||||
local kid = path:match("^https://kara.moe/kara/.-([0-9a-z-]+)$")
|
||||
if kid == nil then
|
||||
kid = path:match("^https://live.karaokes.moe/%?video=([0-9a-z-]+)$")
|
||||
end
|
||||
if kid ~= nil then
|
||||
local kdata = get_kdata(kid)
|
||||
local mediafile = "https://kara.moe/downloads/medias/" .. kdata.mediafile
|
||||
local subfile = "https://kara.moe/downloads/lyrics/" .. kdata.subfile
|
||||
mp.set_property("stream-open-filename", mediafile)
|
||||
mp.set_property("replaygain-fallback", kdata.gain)
|
||||
mp.set_property("title", get_title(kdata))
|
||||
mp.commandv("sub-add", subfile)
|
||||
end
|
||||
end
|
||||
|
||||
mp.register_event("start-file", on_load)
|
||||
@@ -1,675 +0,0 @@
|
||||
-- repl.lua -- A graphical REPL for mpv input commands
|
||||
--
|
||||
-- © 2016, James Ross-Gowan
|
||||
--
|
||||
-- Permission to use, copy, modify, and/or distribute this software for any
|
||||
-- purpose with or without fee is hereby granted, provided that the above
|
||||
-- copyright notice and this permission notice appear in all copies.
|
||||
--
|
||||
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
-- SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
||||
-- OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
-- CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
local utils = require 'mp.utils'
|
||||
local options = require 'mp.options'
|
||||
local assdraw = require 'mp.assdraw'
|
||||
|
||||
-- Default options
|
||||
local opts = {
|
||||
-- All drawing is scaled by this value, including the text borders and the
|
||||
-- cursor. Change it if you have a high-DPI display.
|
||||
scale = 1,
|
||||
-- Set the font used for the REPL and the console. This probably doesn't
|
||||
-- have to be a monospaced font.
|
||||
font = 'monospace',
|
||||
-- Set the font size used for the REPL and the console. This will be
|
||||
-- multiplied by "scale."
|
||||
['font-size'] = 16,
|
||||
}
|
||||
|
||||
function detect_platform()
|
||||
local o = {}
|
||||
-- Kind of a dumb way of detecting the platform but whatever
|
||||
if mp.get_property_native('options/vo-mmcss-profile', o) ~= o then
|
||||
return 'windows'
|
||||
elseif mp.get_property_native('options/cocoa-force-dedicated-gpu', o) ~= o then
|
||||
return 'macos'
|
||||
end
|
||||
return 'linux'
|
||||
end
|
||||
|
||||
-- Pick a better default font for Windows and macOS
|
||||
local platform = detect_platform()
|
||||
if platform == 'windows' then
|
||||
opts.font = 'Consolas'
|
||||
elseif platform == 'macos' then
|
||||
opts.font = 'Menlo'
|
||||
end
|
||||
|
||||
-- Apply user-set options
|
||||
options.read_options(opts)
|
||||
|
||||
-- Build a list of commands, properties and options for tab-completion
|
||||
local option_info = {
|
||||
'name', 'type', 'set-from-commandline', 'set-locally', 'default-value',
|
||||
'min', 'max', 'choices',
|
||||
}
|
||||
local cmd_list = {
|
||||
'ignore', 'seek', 'revert-seek', 'quit', 'quit-watch-later', 'stop',
|
||||
'frame-step', 'frame-back-step', 'playlist-next', 'playlist-prev',
|
||||
'playlist-shuffle', 'sub-step', 'sub-seek', 'osd', 'print-text',
|
||||
'show-text', 'show-progress', 'sub-add', 'sub-remove', 'sub-reload',
|
||||
'tv-last-channel', 'screenshot', 'screenshot-to-file', 'screenshot-raw',
|
||||
'loadfile', 'loadlist', 'playlist-clear', 'playlist-remove',
|
||||
'playlist-move', 'run', 'set', 'add', 'cycle', 'multiply', 'cycle-values',
|
||||
'enable-section', 'disable-section', 'define-section', 'ab-loop',
|
||||
'drop-buffers', 'af', 'af-command', 'ao-reload', 'vf', 'vf-command',
|
||||
'script-binding', 'script-message', 'script-message-to', 'overlay-add',
|
||||
'overlay-remove', 'write-watch-later-config', 'hook-add', 'hook-ack',
|
||||
'mouse', 'keypress', 'keydown', 'keyup', 'audio-add', 'audio-remove',
|
||||
'audio-reload', 'rescan-external-file', 'apply-profile', 'load-script',
|
||||
}
|
||||
local prop_list = mp.get_property_native('property-list')
|
||||
for _, opt in ipairs(mp.get_property_native('options')) do
|
||||
prop_list[#prop_list + 1] = 'options/' .. opt
|
||||
prop_list[#prop_list + 1] = 'file-local-options/' .. opt
|
||||
prop_list[#prop_list + 1] = 'option-info/' .. opt
|
||||
for _, p in ipairs(option_info) do
|
||||
prop_list[#prop_list + 1] = 'option-info/' .. opt .. '/' .. p
|
||||
end
|
||||
end
|
||||
|
||||
local repl_active = false
|
||||
local insert_mode = false
|
||||
local line = ''
|
||||
local cursor = 1
|
||||
local history = {}
|
||||
local history_pos = 1
|
||||
local log_ring = {}
|
||||
|
||||
-- Add a line to the log buffer (which is limited to 100 lines)
|
||||
function log_add(style, text)
|
||||
log_ring[#log_ring + 1] = { style = style, text = text }
|
||||
if #log_ring > 100 then
|
||||
table.remove(log_ring, 1)
|
||||
end
|
||||
end
|
||||
|
||||
-- Escape a string for verbatim display on the OSD
|
||||
function ass_escape(str)
|
||||
-- There is no escape for '\' in ASS (I think?) but '\' is used verbatim if
|
||||
-- it isn't followed by a recognised character, so add a zero-width
|
||||
-- non-breaking space
|
||||
str = str:gsub('\\', '\\\239\187\191')
|
||||
str = str:gsub('{', '\\{')
|
||||
str = str:gsub('}', '\\}')
|
||||
-- Precede newlines with a ZWNBSP to prevent ASS's weird collapsing of
|
||||
-- consecutive newlines
|
||||
str = str:gsub('\n', '\239\187\191\\N')
|
||||
return str
|
||||
end
|
||||
|
||||
-- Render the REPL and console as an ASS OSD
|
||||
function update()
|
||||
local screenx, screeny, aspect = mp.get_osd_size()
|
||||
screenx = screenx / opts.scale
|
||||
screeny = screeny / opts.scale
|
||||
|
||||
-- Clear the OSD if the REPL is not active
|
||||
if not repl_active then
|
||||
mp.set_osd_ass(screenx, screeny, '')
|
||||
return
|
||||
end
|
||||
|
||||
local ass = assdraw.ass_new()
|
||||
local style = '{\\r' ..
|
||||
'\\1a&H00&\\3a&H00&\\4a&H99&' ..
|
||||
'\\1c&Heeeeee&\\3c&H111111&\\4c&H000000&' ..
|
||||
'\\fn' .. opts.font .. '\\fs' .. opts['font-size'] ..
|
||||
'\\bord2\\xshad0\\yshad1\\fsp0\\q1}'
|
||||
-- Create the cursor glyph as an ASS drawing. ASS will draw the cursor
|
||||
-- inline with the surrounding text, but it sets the advance to the width
|
||||
-- of the drawing. So the cursor doesn't affect layout too much, make it as
|
||||
-- thin as possible and make it appear to be 1px wide by giving it 0.5px
|
||||
-- horizontal borders.
|
||||
local cheight = opts['font-size'] * 8
|
||||
local cglyph = '{\\r' ..
|
||||
'\\1a&H44&\\3a&H44&\\4a&H99&' ..
|
||||
'\\1c&Heeeeee&\\3c&Heeeeee&\\4c&H000000&' ..
|
||||
'\\xbord0.5\\ybord0\\xshad0\\yshad1\\p4\\pbo24}' ..
|
||||
'm 0 0 l 1 0 l 1 ' .. cheight .. ' l 0 ' .. cheight ..
|
||||
'{\\p0}'
|
||||
local before_cur = ass_escape(line:sub(1, cursor - 1))
|
||||
local after_cur = ass_escape(line:sub(cursor))
|
||||
|
||||
-- Render log messages as ASS. This will render at most screeny / font-size
|
||||
-- messages.
|
||||
local log_ass = ''
|
||||
local log_messages = #log_ring
|
||||
local log_max_lines = math.ceil(screeny / opts['font-size'])
|
||||
if log_max_lines < log_messages then
|
||||
log_messages = log_max_lines
|
||||
end
|
||||
for i = #log_ring - log_messages + 1, #log_ring do
|
||||
log_ass = log_ass .. style .. log_ring[i].style .. ass_escape(log_ring[i].text)
|
||||
end
|
||||
|
||||
ass:new_event()
|
||||
ass:an(1)
|
||||
ass:pos(2, screeny - 2)
|
||||
ass:append(log_ass .. '\\N')
|
||||
ass:append(style .. '> ' .. before_cur)
|
||||
ass:append(cglyph)
|
||||
ass:append(style .. after_cur)
|
||||
|
||||
-- Redraw the cursor with the REPL text invisible. This will make the
|
||||
-- cursor appear in front of the text.
|
||||
ass:new_event()
|
||||
ass:an(1)
|
||||
ass:pos(2, screeny - 2)
|
||||
ass:append(style .. '{\\alpha&HFF&}> ' .. before_cur)
|
||||
ass:append(cglyph)
|
||||
ass:append(style .. '{\\alpha&HFF&}' .. after_cur)
|
||||
|
||||
mp.set_osd_ass(screenx, screeny, ass.text)
|
||||
end
|
||||
|
||||
-- Set the REPL visibility (`, Esc)
|
||||
function set_active(active)
|
||||
if active == repl_active then return end
|
||||
if active then
|
||||
repl_active = true
|
||||
insert_mode = false
|
||||
mp.enable_key_bindings('repl-input', 'allow-hide-cursor+allow-vo-dragging')
|
||||
else
|
||||
repl_active = false
|
||||
mp.disable_key_bindings('repl-input')
|
||||
end
|
||||
update()
|
||||
end
|
||||
|
||||
-- Show the repl if hidden and replace its contents with 'text'
|
||||
-- (script-message-to repl type)
|
||||
function show_and_type(text)
|
||||
text = text or ''
|
||||
|
||||
-- Save the line currently being edited, just in case
|
||||
if line ~= text and line ~= '' and history[#history] ~= line then
|
||||
history[#history + 1] = line
|
||||
end
|
||||
|
||||
line = text
|
||||
cursor = line:len() + 1
|
||||
history_pos = #history + 1
|
||||
insert_mode = false
|
||||
if repl_active then
|
||||
update()
|
||||
else
|
||||
set_active(true)
|
||||
end
|
||||
end
|
||||
|
||||
-- Naive helper function to find the next UTF-8 character in 'str' after 'pos'
|
||||
-- by skipping continuation bytes. Assumes 'str' contains valid UTF-8.
|
||||
function next_utf8(str, pos)
|
||||
if pos > str:len() then return pos end
|
||||
repeat
|
||||
pos = pos + 1
|
||||
until pos > str:len() or str:byte(pos) < 0x80 or str:byte(pos) > 0xbf
|
||||
return pos
|
||||
end
|
||||
|
||||
-- As above, but finds the previous UTF-8 charcter in 'str' before 'pos'
|
||||
function prev_utf8(str, pos)
|
||||
if pos <= 1 then return pos end
|
||||
repeat
|
||||
pos = pos - 1
|
||||
until pos <= 1 or str:byte(pos) < 0x80 or str:byte(pos) > 0xbf
|
||||
return pos
|
||||
end
|
||||
|
||||
-- Insert a character at the current cursor position (' '-'~', Shift+Enter)
|
||||
function handle_char_input(c)
|
||||
if insert_mode then
|
||||
line = line:sub(1, cursor - 1) .. c .. line:sub(next_utf8(line, cursor))
|
||||
else
|
||||
line = line:sub(1, cursor - 1) .. c .. line:sub(cursor)
|
||||
end
|
||||
cursor = cursor + 1
|
||||
update()
|
||||
end
|
||||
|
||||
-- Remove the character behind the cursor (Backspace)
|
||||
function handle_backspace()
|
||||
if cursor <= 1 then return end
|
||||
local prev = prev_utf8(line, cursor)
|
||||
line = line:sub(1, prev - 1) .. line:sub(cursor)
|
||||
cursor = prev
|
||||
update()
|
||||
end
|
||||
|
||||
-- Remove the character in front of the cursor (Del)
|
||||
function handle_del()
|
||||
if cursor > line:len() then return end
|
||||
line = line:sub(1, cursor - 1) .. line:sub(next_utf8(line, cursor))
|
||||
update()
|
||||
end
|
||||
|
||||
-- Toggle insert mode (Ins)
|
||||
function handle_ins()
|
||||
insert_mode = not insert_mode
|
||||
end
|
||||
|
||||
-- Move the cursor to the next character (Right)
|
||||
function next_char(amount)
|
||||
cursor = next_utf8(line, cursor)
|
||||
update()
|
||||
end
|
||||
|
||||
-- Move the cursor to the previous character (Left)
|
||||
function prev_char(amount)
|
||||
cursor = prev_utf8(line, cursor)
|
||||
update()
|
||||
end
|
||||
|
||||
-- Clear the current line (Ctrl+C)
|
||||
function clear()
|
||||
line = ''
|
||||
cursor = 1
|
||||
insert_mode = false
|
||||
history_pos = #history + 1
|
||||
update()
|
||||
end
|
||||
|
||||
-- Close the REPL if the current line is empty, otherwise do nothing (Ctrl+D)
|
||||
function maybe_exit()
|
||||
if line == '' then
|
||||
set_active(false)
|
||||
end
|
||||
end
|
||||
|
||||
-- Run the current command and clear the line (Enter)
|
||||
function handle_enter()
|
||||
if line == '' then
|
||||
return
|
||||
end
|
||||
if history[#history] ~= line then
|
||||
history[#history + 1] = line
|
||||
end
|
||||
|
||||
mp.command(line)
|
||||
clear()
|
||||
end
|
||||
|
||||
-- Go to the specified position in the command history
|
||||
function go_history(new_pos)
|
||||
local old_pos = history_pos
|
||||
history_pos = new_pos
|
||||
|
||||
-- Restrict the position to a legal value
|
||||
if history_pos > #history + 1 then
|
||||
history_pos = #history + 1
|
||||
elseif history_pos < 1 then
|
||||
history_pos = 1
|
||||
end
|
||||
|
||||
-- Do nothing if the history position didn't actually change
|
||||
if history_pos == old_pos then
|
||||
return
|
||||
end
|
||||
|
||||
-- If the user was editing a non-history line, save it as the last history
|
||||
-- entry. This makes it much less frustrating to accidentally hit Up/Down
|
||||
-- while editing a line.
|
||||
if old_pos == #history + 1 and line ~= '' and history[#history] ~= line then
|
||||
history[#history + 1] = line
|
||||
end
|
||||
|
||||
-- Now show the history line (or a blank line for #history + 1)
|
||||
if history_pos <= #history then
|
||||
line = history[history_pos]
|
||||
else
|
||||
line = ''
|
||||
end
|
||||
cursor = line:len() + 1
|
||||
insert_mode = false
|
||||
update()
|
||||
end
|
||||
|
||||
-- Go to the specified relative position in the command history (Up, Down)
|
||||
function move_history(amount)
|
||||
go_history(history_pos + amount)
|
||||
end
|
||||
|
||||
-- Go to the first command in the command history (PgUp)
|
||||
function handle_pgup()
|
||||
go_history(1)
|
||||
end
|
||||
|
||||
-- Stop browsing history and start editing a blank line (PgDown)
|
||||
function handle_pgdown()
|
||||
go_history(#history + 1)
|
||||
end
|
||||
|
||||
-- Move to the start of the current word, or if already at the start, the start
|
||||
-- of the previous word. (Ctrl+Left)
|
||||
function prev_word()
|
||||
-- This is basically the same as next_word() but backwards, so reverse the
|
||||
-- string in order to do a "backwards" find. This wouldn't be as annoying
|
||||
-- to do if Lua didn't insist on 1-based indexing.
|
||||
cursor = line:len() - select(2, line:reverse():find('%s*[^%s]*', line:len() - cursor + 2)) + 1
|
||||
update()
|
||||
end
|
||||
|
||||
-- Move to the end of the current word, or if already at the end, the end of
|
||||
-- the next word. (Ctrl+Right)
|
||||
function next_word()
|
||||
cursor = select(2, line:find('%s*[^%s]*', cursor)) + 1
|
||||
update()
|
||||
end
|
||||
|
||||
-- List of tab-completions:
|
||||
-- pattern: A Lua pattern used in string:find. Should return the start and
|
||||
-- end positions of the word to be completed in the first and second
|
||||
-- capture groups (using the empty parenthesis notation "()")
|
||||
-- list: A list of candidate completion values.
|
||||
-- append: An extra string to be appended to the end of a successful
|
||||
-- completion. It is only appended if 'list' contains exactly one
|
||||
-- match.
|
||||
local completers = {
|
||||
{ pattern = '^%s*()[%w_-]+()$', list = cmd_list, append = ' ' },
|
||||
{ pattern = '^%s*set%s+()[%w_/-]+()$', list = prop_list, append = ' ' },
|
||||
{ pattern = '^%s*set%s+"()[%w_/-]+()$', list = prop_list, append = '" ' },
|
||||
{ pattern = '^%s*add%s+()[%w_/-]+()$', list = prop_list, append = ' ' },
|
||||
{ pattern = '^%s*add%s+"()[%w_/-]+()$', list = prop_list, append = '" ' },
|
||||
{ pattern = '^%s*cycle%s+()[%w_/-]+()$', list = prop_list, append = ' ' },
|
||||
{ pattern = '^%s*cycle%s+"()[%w_/-]+()$', list = prop_list, append = '" ' },
|
||||
{ pattern = '^%s*multiply%s+()[%w_/-]+()$', list = prop_list, append = ' ' },
|
||||
{ pattern = '^%s*multiply%s+"()[%w_/-]+()$', list = prop_list, append = '" ' },
|
||||
{ pattern = '${()[%w_/-]+()$', list = prop_list, append = '}' },
|
||||
}
|
||||
|
||||
-- Use 'list' to find possible tab-completions for 'part.' Returns the longest
|
||||
-- common prefix of all the matching list items and a flag that indicates
|
||||
-- whether the match was unique or not.
|
||||
function complete_match(part, list)
|
||||
local completion = nil
|
||||
local full_match = false
|
||||
|
||||
for _, candidate in ipairs(list) do
|
||||
if candidate:sub(1, part:len()) == part then
|
||||
if completion and completion ~= candidate then
|
||||
local prefix_len = part:len()
|
||||
while completion:sub(1, prefix_len + 1)
|
||||
== candidate:sub(1, prefix_len + 1) do
|
||||
prefix_len = prefix_len + 1
|
||||
end
|
||||
completion = candidate:sub(1, prefix_len)
|
||||
full_match = false
|
||||
else
|
||||
completion = candidate
|
||||
full_match = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return completion, full_match
|
||||
end
|
||||
|
||||
-- Complete the option or property at the cursor (TAB)
|
||||
function complete()
|
||||
local before_cur = line:sub(1, cursor - 1)
|
||||
local after_cur = line:sub(cursor)
|
||||
|
||||
-- Try the first completer that works
|
||||
for _, completer in ipairs(completers) do
|
||||
-- Completer patterns should return the start and end of the word to be
|
||||
-- completed as the first and second capture groups
|
||||
local _, _, s, e = before_cur:find(completer.pattern)
|
||||
if not s then
|
||||
-- Multiple input commands can be separated by semicolons, so all
|
||||
-- completions that are anchored at the start of the string with
|
||||
-- '^' can start from a semicolon as well. Replace ^ with ; and try
|
||||
-- to match again.
|
||||
_, _, s, e = before_cur:find(completer.pattern:gsub('^^', ';'))
|
||||
end
|
||||
if s then
|
||||
-- If the completer's pattern found a word, check the completer's
|
||||
-- list for possible completions
|
||||
local part = before_cur:sub(s, e)
|
||||
local c, full = complete_match(part, completer.list)
|
||||
if c then
|
||||
-- If there was only one full match from the list, add
|
||||
-- completer.append to the final string. This is normally a
|
||||
-- space or a quotation mark followed by a space.
|
||||
if full and completer.append then
|
||||
c = c .. completer.append
|
||||
end
|
||||
|
||||
-- Insert the completion and update
|
||||
before_cur = before_cur:sub(1, s - 1) .. c
|
||||
cursor = before_cur:len() + 1
|
||||
line = before_cur .. after_cur
|
||||
update()
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Move the cursor to the beginning of the line (HOME)
|
||||
function go_home()
|
||||
cursor = 1
|
||||
update()
|
||||
end
|
||||
|
||||
-- Move the cursor to the end of the line (END)
|
||||
function go_end()
|
||||
cursor = line:len() + 1
|
||||
update()
|
||||
end
|
||||
|
||||
-- Delete from the cursor to the end of the word (Ctrl+W)
|
||||
function del_word()
|
||||
local before_cur = line:sub(1, cursor - 1)
|
||||
local after_cur = line:sub(cursor)
|
||||
|
||||
before_cur = before_cur:gsub('[^%s]+%s*$', '', 1)
|
||||
line = before_cur .. after_cur
|
||||
cursor = before_cur:len() + 1
|
||||
update()
|
||||
end
|
||||
|
||||
-- Delete from the cursor to the end of the line (Ctrl+K)
|
||||
function del_to_eol()
|
||||
line = line:sub(1, cursor - 1)
|
||||
update()
|
||||
end
|
||||
|
||||
-- Delete from the cursor back to the start of the line (Ctrl+U)
|
||||
function del_to_start()
|
||||
line = line:sub(cursor)
|
||||
cursor = 1
|
||||
update()
|
||||
end
|
||||
|
||||
-- Empty the log buffer of all messages (Ctrl+L)
|
||||
function clear_log_buffer()
|
||||
log_ring = {}
|
||||
update()
|
||||
end
|
||||
|
||||
-- Returns a string of UTF-8 text from the clipboard (or the primary selection)
|
||||
function get_clipboard(clip)
|
||||
if platform == 'linux' then
|
||||
local res = utils.subprocess({
|
||||
args = { 'xclip', '-selection', clip and 'clipboard' or 'primary', '-out' },
|
||||
playback_only = false,
|
||||
})
|
||||
if not res.error then
|
||||
return res.stdout
|
||||
end
|
||||
elseif platform == 'windows' then
|
||||
local res = utils.subprocess({
|
||||
args = { 'powershell', '-NoProfile', '-Command', [[& {
|
||||
Trap {
|
||||
Write-Error -ErrorRecord $_
|
||||
Exit 1
|
||||
}
|
||||
|
||||
$clip = ""
|
||||
if (Get-Command "Get-Clipboard" -errorAction SilentlyContinue) {
|
||||
$clip = Get-Clipboard -Raw -Format Text -TextFormatType UnicodeText
|
||||
} else {
|
||||
Add-Type -AssemblyName PresentationCore
|
||||
$clip = [Windows.Clipboard]::GetText()
|
||||
}
|
||||
|
||||
$clip = $clip -Replace "`r",""
|
||||
$u8clip = [System.Text.Encoding]::UTF8.GetBytes($clip)
|
||||
[Console]::OpenStandardOutput().Write($u8clip, 0, $u8clip.Length)
|
||||
}]] },
|
||||
playback_only = false,
|
||||
})
|
||||
if not res.error then
|
||||
return res.stdout
|
||||
end
|
||||
elseif platform == 'macos' then
|
||||
local res = utils.subprocess({
|
||||
args = { 'pbpaste' },
|
||||
playback_only = false,
|
||||
})
|
||||
if not res.error then
|
||||
return res.stdout
|
||||
end
|
||||
end
|
||||
return ''
|
||||
end
|
||||
|
||||
-- Paste text from the window-system's clipboard. 'clip' determines whether the
|
||||
-- clipboard or the primary selection buffer is used (on X11 only.)
|
||||
function paste(clip)
|
||||
local text = get_clipboard(clip)
|
||||
local before_cur = line:sub(1, cursor - 1)
|
||||
local after_cur = line:sub(cursor)
|
||||
line = before_cur .. text .. after_cur
|
||||
cursor = cursor + text:len()
|
||||
update()
|
||||
end
|
||||
|
||||
-- The REPL has pretty specific requirements for key bindings that aren't
|
||||
-- really satisified by any of mpv's helper methods, since they must be in
|
||||
-- their own input section, but they must also raise events on key-repeat.
|
||||
-- Hence, this function manually creates an input section and puts a list of
|
||||
-- bindings in it.
|
||||
function add_repl_bindings(bindings)
|
||||
local cfg = ''
|
||||
for i, binding in ipairs(bindings) do
|
||||
local key = binding[1]
|
||||
local fn = binding[2]
|
||||
local name = '__repl_binding_' .. i
|
||||
mp.add_key_binding(nil, name, fn, 'repeatable')
|
||||
cfg = cfg .. key .. ' script-binding ' .. mp.script_name .. '/' ..
|
||||
name .. '\n'
|
||||
end
|
||||
mp.commandv('define-section', 'repl-input', cfg, 'force')
|
||||
end
|
||||
|
||||
-- Mapping from characters to mpv key names
|
||||
local binding_name_map = {
|
||||
[' '] = 'SPACE',
|
||||
['#'] = 'SHARP',
|
||||
}
|
||||
|
||||
-- List of input bindings. This is a weird mashup between common GUI text-input
|
||||
-- bindings and readline bindings.
|
||||
local bindings = {
|
||||
{ 'esc', function() set_active(false) end },
|
||||
{ 'enter', handle_enter },
|
||||
{ 'shift+enter', function() handle_char_input('\n') end },
|
||||
{ 'bs', handle_backspace },
|
||||
{ 'shift+bs', handle_backspace },
|
||||
{ 'del', handle_del },
|
||||
{ 'shift+del', handle_del },
|
||||
{ 'ins', handle_ins },
|
||||
{ 'shift+ins', function() paste(false) end },
|
||||
{ 'mouse_btn1', function() paste(false) end },
|
||||
{ 'left', function() prev_char() end },
|
||||
{ 'right', function() next_char() end },
|
||||
{ 'up', function() move_history(-1) end },
|
||||
{ 'axis_up', function() move_history(-1) end },
|
||||
{ 'mouse_btn3', function() move_history(-1) end },
|
||||
{ 'down', function() move_history(1) end },
|
||||
{ 'axis_down', function() move_history(1) end },
|
||||
{ 'mouse_btn4', function() move_history(1) end },
|
||||
{ 'axis_left', function() end },
|
||||
{ 'axis_right', function() end },
|
||||
{ 'ctrl+left', prev_word },
|
||||
{ 'ctrl+right', next_word },
|
||||
{ 'tab', complete },
|
||||
{ 'home', go_home },
|
||||
{ 'end', go_end },
|
||||
{ 'pgup', handle_pgup },
|
||||
{ 'pgdwn', handle_pgdown },
|
||||
{ 'ctrl+c', clear },
|
||||
{ 'ctrl+d', maybe_exit },
|
||||
{ 'ctrl+k', del_to_eol },
|
||||
{ 'ctrl+l', clear_log_buffer },
|
||||
{ 'ctrl+u', del_to_start },
|
||||
{ 'ctrl+v', function() paste(true) end },
|
||||
{ 'meta+v', function() paste(true) end },
|
||||
{ 'ctrl+w', del_word },
|
||||
}
|
||||
-- Add bindings for all the printable US-ASCII characters from ' ' to '~'
|
||||
-- inclusive. Note, this is a pretty hacky way to do text input. mpv's input
|
||||
-- system was designed for single-key key bindings rather than text input, so
|
||||
-- things like dead-keys and non-ASCII input won't work. This is probably okay
|
||||
-- though, since all mpv's commands and properties can be represented in ASCII.
|
||||
for b = (' '):byte(), ('~'):byte() do
|
||||
local c = string.char(b)
|
||||
local binding = binding_name_map[c] or c
|
||||
bindings[#bindings + 1] = {binding, function() handle_char_input(c) end}
|
||||
end
|
||||
add_repl_bindings(bindings)
|
||||
|
||||
-- Add a global binding for enabling the REPL. While it's enabled, its bindings
|
||||
-- will take over and it can be closed with ESC.
|
||||
mp.add_key_binding('œ', 'repl-enable', function()
|
||||
set_active(true)
|
||||
end)
|
||||
|
||||
-- Add a script-message to show the REPL and fill it with the provided text
|
||||
mp.register_script_message('type', function(text)
|
||||
show_and_type(text)
|
||||
end)
|
||||
|
||||
-- Redraw the REPL when the OSD size changes. This is needed because the
|
||||
-- PlayRes of the OSD will need to be adjusted.
|
||||
mp.observe_property('osd-width', 'native', update)
|
||||
mp.observe_property('osd-height', 'native', update)
|
||||
|
||||
-- Watch for log-messages and print them in the REPL console
|
||||
mp.enable_messages('info')
|
||||
mp.register_event('log-message', function(e)
|
||||
-- Ignore log messages from the OSD because of paranoia, since writing them
|
||||
-- to the OSD could generate more messages in an infinite loop.
|
||||
if e.prefix:sub(1, 3) == 'osd' then return end
|
||||
|
||||
-- Use color for warn/error/fatal messages. Colors are stolen from base16
|
||||
-- Eighties by Chris Kempson.
|
||||
local style = ''
|
||||
if e.level == 'warn' then
|
||||
style = '{\\1c&H66ccff&}'
|
||||
elseif e.level == 'error' then
|
||||
style = '{\\1c&H7a77f2&}'
|
||||
elseif e.level == 'fatal' then
|
||||
style = '{\\1c&H5791f9&\\b1}'
|
||||
end
|
||||
|
||||
log_add(style, '[' .. e.prefix .. '] ' .. e.text)
|
||||
update()
|
||||
end)
|
||||
@@ -1,7 +1,7 @@
|
||||
(import-macros {: packer-setup : use!} :hibiscus.packer)
|
||||
(import-macros {: packer-setup! : use!} :hibiscus.packer)
|
||||
(import-macros {: packer : setup} :macros)
|
||||
|
||||
(packer-setup)
|
||||
(packer-setup!)
|
||||
|
||||
(packer
|
||||
{:display {:open_fn (. (require :packer.util) :float)}}
|
||||
@@ -12,20 +12,20 @@
|
||||
(use! :udayvir-singh/hibiscus.nvim)
|
||||
|
||||
(use! "~/.config/nvim/themes/solarized.nvim"
|
||||
:module :settings.solarized)
|
||||
:require :settings.solarized)
|
||||
|
||||
(use! :nvim-treesitter/nvim-treesitter
|
||||
:run (fn [] ((. (require :nvim-treesitter.install) :update) {:with_sync true}))
|
||||
:module :settings.treesitter)
|
||||
:require :settings.treesitter)
|
||||
|
||||
(use! :feline-nvim/feline.nvim
|
||||
:requires [:kyazdani42/nvim-web-devicons
|
||||
"~/.config/nvim/themes/solarized.nvim"]
|
||||
:after [:solarized.nvim]
|
||||
:module :settings.feline)
|
||||
:require :settings.feline)
|
||||
|
||||
(use! :s1n7ax/nvim-window-picker
|
||||
:module :settings.window-picker)
|
||||
:require :settings.window-picker)
|
||||
|
||||
(use! :nvim-neo-tree/neo-tree.nvim
|
||||
:branch "v2.x"
|
||||
@@ -37,13 +37,13 @@
|
||||
:edluffy/hologram.nvim]
|
||||
:after [:nvim-window-picker
|
||||
:hologram.nvim]
|
||||
:module :settings.neo-tree)
|
||||
:require :settings.neo-tree)
|
||||
|
||||
(use! :mrjones2014/smart-splits.nvim
|
||||
:module :settings.smart-splits)
|
||||
:require :settings.smart-splits)
|
||||
|
||||
(use! :famiu/bufdelete.nvim
|
||||
:module :bufdelete)
|
||||
:require :bufdelete)
|
||||
|
||||
(use! :akinsho/bufferline.nvim
|
||||
:tag "v2.*"
|
||||
@@ -52,32 +52,32 @@
|
||||
"~/.config/nvim/themes/solarized.nvim"]
|
||||
:after [:bufdelete.nvim
|
||||
:solarized.nvim]
|
||||
:module :settings.bufferline)
|
||||
:require :settings.bufferline)
|
||||
|
||||
(use! :windwp/nvim-autopairs
|
||||
:module :settings.autopairs)
|
||||
:require :settings.autopairs)
|
||||
|
||||
(use! :lewis6991/gitsigns.nvim
|
||||
:module :settings.gitsigns)
|
||||
:require :settings.gitsigns)
|
||||
|
||||
(use! :declancm/cinnamon.nvim
|
||||
:module :settings.cinnamon)
|
||||
:require :settings.cinnamon)
|
||||
|
||||
(use! :stevearc/aerial.nvim
|
||||
:module :settings.aerial)
|
||||
:require :settings.aerial)
|
||||
|
||||
(use! :nmac427/guess-indent.nvim
|
||||
:module :settings.guess-indent)
|
||||
:require :settings.guess-indent)
|
||||
|
||||
(use! :nvim-telescope/telescope.nvim
|
||||
:requires [:nvim-lua/plenary.nvim
|
||||
:s1n7ax/nvim-window-picker]
|
||||
:after [:nvim-window-picker]
|
||||
:module :settings.telescope)
|
||||
:require :settings.telescope)
|
||||
|
||||
(use! :sindrets/diffview.nvim
|
||||
:requires [:nvim-lua/plenary.nvim]
|
||||
:module :settings.diffview)
|
||||
:require :settings.diffview)
|
||||
|
||||
(use! :neovim/nvim-lspconfig
|
||||
:requires [:williamboman/mason-lspconfig.nvim
|
||||
@@ -89,27 +89,24 @@
|
||||
:saadparwaiz1/cmp_luasnip
|
||||
:rafamadriz/friendly-snippets
|
||||
:L3MON4D3/LuaSnip]
|
||||
:module :settings.lspconfig)
|
||||
:require :settings.lspconfig)
|
||||
|
||||
(use! :jose-elias-alvarez/null-ls.nvim
|
||||
:module :settings.null-ls)
|
||||
:require :settings.null-ls)
|
||||
|
||||
(use! :lervag/vimtex
|
||||
:module :settings.vimtex)
|
||||
:require :settings.vimtex)
|
||||
|
||||
(use! :edluffy/hologram.nvim
|
||||
:module :settings.hologram)
|
||||
:require :settings.hologram)
|
||||
|
||||
(use! :lambdalisue/suda.vim)
|
||||
|
||||
(use! :folke/noice.nvim
|
||||
:event :VimEnter
|
||||
:requires [:MunifTanjim/nui.nvim]
|
||||
:module :settings.noice)
|
||||
:require :settings.noice)
|
||||
|
||||
(use! :glacambre/firenvim
|
||||
:run (fn [] ((. vim.fn :firenvim#install) 0))
|
||||
:module :settings.firenvim)
|
||||
|
||||
(use! :iamcco/markdown-preview.nvim
|
||||
:run (fn [] ((. vim.fn :mkdp#util#install)))))
|
||||
:require :settings.firenvim))
|
||||
|
||||
@@ -5,8 +5,5 @@
|
||||
:content "text"
|
||||
:priority 0
|
||||
:selector "textarea"
|
||||
:takeover "never"}
|
||||
:https://www.deepl.com/ {:selector "textarea[aria-labelledby=translation-source-heading]"
|
||||
:takeover "always"}
|
||||
:https://zimbra.inria.fr/ {:selector "body[id=tinymce]"
|
||||
:takeover "always"}}})
|
||||
:takeover "always"}
|
||||
:https://zimbra.inria.fr/ {:selector "body[id=tinymce]"}}})
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
(import-macros {: exec : map!} :hibiscus.vim)
|
||||
(import-macros {: exec! : map!} :hibiscus.vim)
|
||||
|
||||
(local M {})
|
||||
|
||||
@@ -58,15 +58,15 @@
|
||||
(fn [command _] (do_command (. command.arguments 1 :falsePositives) :hiddenFalsePositives)))
|
||||
|
||||
(fn post_attach []
|
||||
(exec [[:setlocal "spell"] [:setlocal "nospell"]])
|
||||
(exec! [setlocal spell] [setlocal nospell])
|
||||
(update_config "en-US" "dictionary")
|
||||
(update_config "en-US" "disabledRules")
|
||||
(update_config "en-US" "hiddenFalsePositives")
|
||||
(map! [n :buffer :verbose] :zug (fn [] (exec [[:normal! "zug"]])
|
||||
(map! [n :buffer :verbose] :zug (fn [] (exec! [normal! zug])
|
||||
(update_config "en-US" "dictionary")
|
||||
nil)
|
||||
"Remove word from spellfile and update ltex")
|
||||
(map! [n :buffer :verbose] :zg (fn [] (exec [[:normal! "zg"]])
|
||||
(map! [n :buffer :verbose] :zg (fn [] (exec! [normal! zg])
|
||||
(update_config "en-US" "dictionary")
|
||||
nil)
|
||||
"Add word to spellfile and update ltex")
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
(import-macros {: setup} :macros)
|
||||
|
||||
(local servers
|
||||
[:eslint
|
||||
[:bashls
|
||||
:eslint
|
||||
:gopls
|
||||
:java_language_server
|
||||
:ltex
|
||||
:lua_ls
|
||||
:pyright
|
||||
:sumneko_lua
|
||||
:tsserver])
|
||||
|
||||
; Mappings.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
(import-macros {: g! : exec : map! : augroup!} :hibiscus.vim)
|
||||
(import-macros {: g! : exec! : map! : augroup!} :hibiscus.vim)
|
||||
(import-macros {: setup} :macros)
|
||||
|
||||
(g! :neo_tree_remove_legacy_commands 1)
|
||||
@@ -14,8 +14,8 @@
|
||||
:window {:mappings {:/ "noop"
|
||||
:g/ "fuzzy_finder"
|
||||
:f "noop"
|
||||
:ff (fn [] (exec [[:Telescope "find_files"]]))
|
||||
:fg (fn [] (exec [[:Telescope "live_grep"]]))
|
||||
:ff (fn [] (exec! [Telescope find_files]))
|
||||
:fg (fn [] (exec! [Telescope live_grep]))
|
||||
:<CR> "custom_open"
|
||||
:e "open"
|
||||
:<S-Right> (fn [])
|
||||
@@ -38,19 +38,19 @@
|
||||
:height (+ (math.ceil height) 1)
|
||||
:row 0
|
||||
:col 2})]
|
||||
(exec [[:setlocal "nonumber"]])
|
||||
(exec! [setlocal nonumber])
|
||||
(vim.api.nvim_buf_attach bufnr false {:on_detach (fn [_ bufnr]
|
||||
(image:delete bufnr {:free true}))})
|
||||
(image:display 1 0 bufnr {}))
|
||||
_ (do
|
||||
(exec [[:silent
|
||||
"!file -bL --mime" quoted_path
|
||||
"| grep -qv '^text\\|^inode\\|^application/json'"]])
|
||||
(exec! [silent
|
||||
!file -bL --mime `(.. "'" quoted_path "'")
|
||||
| grep -qv "'" ^text\\|^inode\\|^application/json "'"])
|
||||
(if (= vim.v.shell_error 1)
|
||||
((. (require :neo-tree.sources.filesystem.commands) :open_with_window_picker) state)
|
||||
(exec [[:silent
|
||||
"!xdg-open" quoted_path
|
||||
"&"]]))))))}}
|
||||
(exec! [silent
|
||||
!xdg-open `(.. "'" quoted_path "'")
|
||||
&]))))))}}
|
||||
:renderers {:directory [[:indent]
|
||||
[:icon]
|
||||
[:current_filter]
|
||||
@@ -67,7 +67,7 @@
|
||||
[:git_status]]}})
|
||||
|
||||
(map! [n] :f ":Neotree focus<CR>")
|
||||
(map! [n] :F (fn [] (exec [[:Neotree "toggle"] [:Neotree "toggle" "action=show"]])))
|
||||
(map! [n] :F (fn [] (exec! [Neotree toggle] [Neotree toggle action=show])))
|
||||
|
||||
(augroup! :neo-tree [[FileType] [qf] "set nobuflisted|call feedkeys(\"F\")"])
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
(setup :nvim-treesitter.configs
|
||||
{:ensure_installed
|
||||
[:c
|
||||
[:bash
|
||||
:c
|
||||
:fennel
|
||||
:java
|
||||
:javascript
|
||||
|
||||
@@ -340,7 +340,7 @@ map i display_file
|
||||
map ? help
|
||||
map W display_log
|
||||
map w taskview_open
|
||||
map S shell zsh
|
||||
map S shell $SHELL
|
||||
|
||||
map : console
|
||||
map ; console
|
||||
|
||||
@@ -163,6 +163,3 @@ textbox-prompt-colon {
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
|
||||
element-text {
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
@@ -23,5 +23,5 @@ fi
|
||||
# choose karaoke
|
||||
[ -z "$kid" ] && exit
|
||||
|
||||
mpv "https://kara.moe/kara/$kid" > /dev/null 2>&1 &
|
||||
umpv "https://kara.moe/kara/$kid" > /dev/null 2>&1 &
|
||||
exec 1>&-
|
||||
|
||||
2
.config/spicetify/.gitignore
vendored
Normal file
2
.config/spicetify/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
Backup/**
|
||||
Extracted/**
|
||||
37
.config/spicetify/Themes/SolarizedDarkGreen/color.ini
Normal file
37
.config/spicetify/Themes/SolarizedDarkGreen/color.ini
Normal file
@@ -0,0 +1,37 @@
|
||||
# Solarized Dark official palette
|
||||
# Base03 #002b36
|
||||
# Base02 #073642
|
||||
# Base01 #586e75
|
||||
# Base00 #657b83
|
||||
# Base0 #839496
|
||||
# Base1 #93a1a1
|
||||
# Base2 #eee8d5
|
||||
# Base3 #fdf6e3
|
||||
# Yellow #b58900
|
||||
# Orange #cb4b16
|
||||
# Red #dc322f
|
||||
# Magenta #d33682
|
||||
# Violet #6c71c4
|
||||
# Blue #268bd2
|
||||
# Cyan #2aa198
|
||||
# Green #859900
|
||||
|
||||
[Base]
|
||||
main_fg = 859900
|
||||
secondary_fg = 93a1a1
|
||||
main_bg = 002b36
|
||||
sidebar_and_player_bg = 002b36
|
||||
cover_overlay_and_shadow = 000000
|
||||
indicator_fg_and_button_bg = 859900
|
||||
pressing_fg = 002b36
|
||||
slider_bg = 073642
|
||||
sidebar_indicator = 859900
|
||||
hover_button_bg = 859900
|
||||
scrollbar_fg_and_selected_row_bg = 073642
|
||||
sidebar_indicator_and_hover_button_bg = 859900
|
||||
pressing_button_fg = 002b36
|
||||
pressing_button_bg = 859900
|
||||
selected_button = 859900
|
||||
miscellaneous_bg = 859900
|
||||
miscellaneous_hover_bg = 859900
|
||||
preserve_1 = FFFFFF
|
||||
657
.config/spicetify/Themes/SolarizedDarkGreen/user.css
Normal file
657
.config/spicetify/Themes/SolarizedDarkGreen/user.css
Normal file
@@ -0,0 +1,657 @@
|
||||
:root {
|
||||
--bar-height: 60px;
|
||||
--modspotify_sidebar_indicator: #839496;
|
||||
--modspotify_hover_button_bg: #b58900;
|
||||
}
|
||||
|
||||
* {
|
||||
font-family: "DejaVu Sans Mono", "Helvetica Neue", "Arial", sans-serif !important;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
/*Round corner cover image*/
|
||||
.card-image,
|
||||
.card-placeholder-wrapper,
|
||||
.card-image-content-wrapper,
|
||||
.Card:not(.Card--artist) .Card__image,
|
||||
.Card:not(.Card--artist) .Card__image-wrapper {
|
||||
border-radius: 0px !important;
|
||||
overflow: hidden !important
|
||||
}
|
||||
|
||||
/*Hide some annoying elements like profile name and pic, upgrade button and device connect bar at bottom, new playlist button*/
|
||||
.upgrade-button,
|
||||
.view-player .remote-playback-bar,
|
||||
.NewPlaylistButton {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
|
||||
/*Exclude these elements from draggable property because it stops them from clickable*/
|
||||
.profile-items-container,
|
||||
.profile {
|
||||
-webkit-app-region: no-drag !important;
|
||||
}
|
||||
|
||||
/*Thinner scrollbar*/
|
||||
::-webkit-scrollbar {
|
||||
height: 6px !important;
|
||||
width: 6px !important;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/*Round corner scrollbar*/
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 0px !important;
|
||||
}
|
||||
|
||||
/*Hide top and bottom buttons of scrollbar */
|
||||
/*who uses those, lol*/
|
||||
::-webkit-scrollbar-button {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/*Hide cover image overlay*/
|
||||
.card-overlay {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
|
||||
/*Lift up cover when hovering on it*/
|
||||
.card-image-content-wrapper,
|
||||
.Card:not(.Card--artist) .Card__image-wrapper {
|
||||
transition-property: transform, box-shadow !important;
|
||||
transition-duration: 1s !important;
|
||||
transition-timing-function: cubic-bezier(.3,0,0,1) !important;
|
||||
box-shadow: 0 5px 20px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.card-image-hit-area:not(.no-hover):hover .card-image-content-wrapper,
|
||||
.Card:not(.Card--artist) .Card__image-hit-area-counter-scale:hover .Card__image-wrapper {
|
||||
transform: translateY(-10px);
|
||||
box-shadow: 0 15px 30px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
.card-image-hit-area .card-button-add,
|
||||
.card-image-hit-area .card-button-play,
|
||||
.card-image-hit-area .card-button-more,
|
||||
.Card__image-hit-area .card-button-add,
|
||||
.Card__image-hit-area .card-button-play,
|
||||
.Card__image-hit-area .card-button-more,
|
||||
.Card__image-hit-area .Card__play-button,
|
||||
.Card__image-hit-area .Card__add-button,
|
||||
.Card__image-hit-area .Card__more-button,
|
||||
.Card__image-hit-area .Card__overlay {
|
||||
transition-property: all !important;
|
||||
transition-duration: 1s !important;
|
||||
transition-timing-function: cubic-bezier(.3,0,0,1) !important;
|
||||
opacity: 0 !important;
|
||||
}
|
||||
.card-image-hit-area:not(.no-hover):hover .card-button-add,
|
||||
.card-image-hit-area:not(.no-hover):hover .card-button-play,
|
||||
.card-image-hit-area:not(.no-hover):hover .card-button-more,
|
||||
.Card__image-hit-area:not(.no-hover):hover .card-button-add,
|
||||
.Card__image-hit-area:not(.no-hover):hover .card-button-play,
|
||||
.Card__image-hit-area:not(.no-hover):hover .card-button-more {
|
||||
opacity: 1 !important;
|
||||
transform: translateY(-10px);
|
||||
}
|
||||
|
||||
.Card__image-hit-area:hover .Card__play-button,
|
||||
.Card__image-hit-area:hover .Card__add-button,
|
||||
.Card__image-hit-area:hover .Card__more-button,
|
||||
.Card__image-hit-area:hover .Card__overlay {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
.glue-page-header__content .glue-page-header__image-inner {
|
||||
border-radius: 0px;
|
||||
box-shadow: unset !important;
|
||||
}
|
||||
|
||||
.glue-page-header__full-description-overlay {
|
||||
box-shadow: unset !important;
|
||||
}
|
||||
|
||||
.card-placeholder-wrapper {
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
/*Spice up search input background*/
|
||||
.SearchInput {
|
||||
color: var(--modspotify_main_fg);
|
||||
}
|
||||
.SearchInput__input {
|
||||
color: var(--modspotify_secondary_fg);
|
||||
background-color: rgba(var(--modspotify_rgb_scrollbar_fg_and_selected_row_bg), 0.5) !important;
|
||||
border-radius: 0px !important;
|
||||
padding-left: 34px;
|
||||
}
|
||||
|
||||
.sidebar:hover .sidebar-navbar.sidebar-scroll-element {
|
||||
opacity: 1!important;
|
||||
}
|
||||
|
||||
.view-player .player-controls-container,
|
||||
.view-player .player-controls-container .controls {
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
||||
.view-player .player-controls-container .controls .button-play{
|
||||
height:50px !important;
|
||||
border-radius:50px !important;
|
||||
background: transparent !important;
|
||||
box-shadow:0 0 0 0 !important;
|
||||
width:50px !important;
|
||||
overflow: visible !important;
|
||||
box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
|
||||
transition:none 0.3s cubic-bezier(.3,0,.7,1);
|
||||
}
|
||||
|
||||
.view-player .player-controls-container .controls .button-play:before{
|
||||
font-size:18px !important;
|
||||
padding-left: 16px !important;
|
||||
padding-top: 9px !important;
|
||||
}
|
||||
|
||||
.view-player .player-controls-container .controls .button-play:after {
|
||||
box-shadow: unset !important;
|
||||
}
|
||||
|
||||
.view-player .player-controls-container {
|
||||
position: absolute !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.view-player .player-controls-container .controls {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
align-items: center !important;
|
||||
margin-top : 0px !important;
|
||||
}
|
||||
|
||||
/*
|
||||
Hide the song duration and elapsed text. I dont know where to put those so I just hide them
|
||||
*/
|
||||
.view-player .player-controls-container .progress-container .elapsed,
|
||||
.view-player .player-controls-container .progress-container .remaining {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Add round corner for Gerne and Mood cards */
|
||||
.gc-image-container,
|
||||
.gc-image {
|
||||
border-radius: 0px !important;
|
||||
}
|
||||
|
||||
/*
|
||||
Collage of 3 album covers is usually seen in Browse and Chart.
|
||||
*/
|
||||
.card-puff__image-wrapper,
|
||||
.card-puff__info-container,
|
||||
.card-puff__card-image {
|
||||
border-radius: 0px !important;
|
||||
}
|
||||
|
||||
.card-puff__image-wrapper {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.card-puff__card-image {
|
||||
box-shadow: 5px 0 30px rgba(0,0,0,0.7);
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.card-puff__title-container {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.card-puff.pressed .card-puff__image-wrapper,
|
||||
.card-puff.pressed .card-puff__info-container {
|
||||
opacity: 0.7 !important;
|
||||
}
|
||||
|
||||
.card-puff__title {
|
||||
padding: 5px 10px 5px 10px !important;
|
||||
background-color: var(--modspotify_main_bg) !important;
|
||||
border-radius: 0px;
|
||||
border: 2px solid var(--modspotify_main_fg);
|
||||
}
|
||||
|
||||
/*
|
||||
We use round corner on cover so they look weird in original
|
||||
form, so I move last cover to the right 20px and first one to the left 20px
|
||||
*/
|
||||
.card-puff__card-image:nth-child(1) {
|
||||
right: 20px;
|
||||
box-shadow: 0 0 0 0 !important;
|
||||
}
|
||||
|
||||
.card-puff__card-image:nth-child(3) {
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.grid-overlay-label {
|
||||
top: 140px !important;
|
||||
}
|
||||
|
||||
/**/
|
||||
.glue-page-header__background-color {
|
||||
background-image: none !important;
|
||||
background: var(--modspotify_main_bg);
|
||||
}
|
||||
|
||||
/* .glue-page-header__sticky {
|
||||
padding-top: 60px !important;
|
||||
} */
|
||||
|
||||
/*
|
||||
Remove those title, cringy description and
|
||||
meaningless followers number
|
||||
*/
|
||||
|
||||
.carousel .card-info-subtitle-description,
|
||||
.carousel .card-info-subtitle-metadata,
|
||||
.carousel .card:not(.card-type-station).card-info-title,
|
||||
.carousel .card.card-type-playlist.image-loaded .card-info-subtitle-description,
|
||||
.carousel .card.card-type-playlist.image-loaded .card-info-subtitle-metadata {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
In top of Browse usually has bunch of Playlist or Album cards,
|
||||
and they has .carousel as a wrapper and it hides anything that
|
||||
overflows from its zone, aka our shadow and lifting animation.
|
||||
*/
|
||||
.carousel {
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
||||
/*
|
||||
Button with text Play
|
||||
*/
|
||||
.button.button-green,
|
||||
.GlueButton.GlueButton--style-green {
|
||||
color: var(--modspotify_main_bg) !important;
|
||||
}
|
||||
|
||||
/*
|
||||
Change text color in playlist
|
||||
*/
|
||||
.tl-explicit .label,
|
||||
.tl-premium .label,
|
||||
.tl-cell:not(.tl-number),
|
||||
.tl-cell a:link,
|
||||
.tl-highlight {
|
||||
color: var(--modspotify_secondary_fg);
|
||||
}
|
||||
|
||||
.card-type-album .card-info-title,
|
||||
.card-type-track .card-info-title,
|
||||
.card-type-collection-album .card-info-title,
|
||||
.card-type-episode .card-info-title {
|
||||
font-size: 15px;
|
||||
font-weight: 600 !important;
|
||||
text-align: center !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.card-type-album .card-info-subtitle-links,
|
||||
.card-type-track .card-info-subtitle-links,
|
||||
.card-type-collection-album .card-info-subtitle-links,
|
||||
.card-type-episode .card-info-subtitle-links {
|
||||
text-align: center !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.tracklist-station-container::after {
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
.GlueHeader__background-overlay {
|
||||
background: var(--modspotify_main_bg) !important;
|
||||
}
|
||||
|
||||
/* Move navigation buttons and search field to the right and down */
|
||||
.browser-navigation-top-bar {
|
||||
margin-left: 40px !important;
|
||||
margin-top: 15px !important;
|
||||
}
|
||||
|
||||
.SearchInput__input,
|
||||
.SearchInput__searchIcon,
|
||||
.SearchInput__clearButton {
|
||||
margin-top: 15px !important;
|
||||
}
|
||||
|
||||
.content-top-bar__profile-menu-button {
|
||||
margin-top: 15px !important;
|
||||
}
|
||||
|
||||
.body-container--windows:not(.with-buddy-list):not(.messagebar) .content-top-bar__profile {
|
||||
margin-right: 110px !important;
|
||||
margin-top: -5px;
|
||||
}
|
||||
|
||||
/* Spice up Fullscreen mode */
|
||||
#view-player .album-art .album-art__image {
|
||||
border-radius: 0px !important;
|
||||
box-shadow: 0 10px 70px rgba(var(--modspotify_rgb_cover_overlay_and_shadow),.5) !important;
|
||||
}
|
||||
|
||||
#view-player .album-art .album-art__image .card-image-content-wrapper,
|
||||
#view-player .album-art .album-art__image .card-image-content-wrapper .card-image {
|
||||
border-radius: 0px !important;
|
||||
}
|
||||
|
||||
/* Daily mixes */
|
||||
.carousel .card-info-wrapper.card-info-with-description.card-info-with-metadata {
|
||||
height: 50px !important;
|
||||
}
|
||||
|
||||
/* Remove section divider */
|
||||
.section-divider {
|
||||
border-bottom: 0 !important;
|
||||
}
|
||||
|
||||
/* Adjust Position of border active tab in Nav bar at top
|
||||
and add little glowing effect
|
||||
*/
|
||||
.nav.navbar-nav {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.nav.navbar-nav a {
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
||||
.nav.navbar-nav a::after {
|
||||
bottom: 0px !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.nav.navbar-nav .active a::after{
|
||||
box-shadow: 0 0px 20px !important;
|
||||
}
|
||||
|
||||
.nav.navbar-nav a:focus:not(.button):active::after{
|
||||
background-color: var(--modspotify_pressing_fg) !important;
|
||||
}
|
||||
|
||||
/* Notification bar */
|
||||
#content-wrapper #view-message-bar {
|
||||
position: absolute !important;
|
||||
width: calc(100% - 160px) !important;
|
||||
margin-left: 80px !important;
|
||||
border-radius: 0 0 0px 0px !important;
|
||||
}
|
||||
|
||||
/* Small cover Big cover mechanism */
|
||||
.now-playing.cover-size-transition.active.image-expanded .cover-image {
|
||||
width: 10px !important;
|
||||
height: 10px !important;
|
||||
}
|
||||
.now-playing.cover-size-transition.active.image-expanded .caption {
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
#view-now-playing a.image {
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
||||
#view-now-playing.expanded {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
#now-playing-image-large .cover-image {
|
||||
height: 200px !important;
|
||||
}
|
||||
|
||||
/* Profile arrow in top left */
|
||||
.content-top-bar__profile-menu-button .dropdown {
|
||||
position: fixed !important;
|
||||
top: 10px !important;
|
||||
-webkit-app-region: no-drag !important;
|
||||
}
|
||||
|
||||
body.body-container--windows .content-top-bar__profile-menu-button .dropdown {
|
||||
right: 190px !important;
|
||||
}
|
||||
|
||||
body:not(.body-container--windows) .content-top-bar__profile-menu-button .dropdown {
|
||||
right: 20px !important;
|
||||
}
|
||||
|
||||
/* Small tooltip */
|
||||
#tooltip {
|
||||
box-shadow: 0 0 10px rgba(0,0,0,0.2) !important;
|
||||
border-radius: 0px !important;
|
||||
border: 2px solid var(--modspotify_main_fg);
|
||||
padding: 10px 10px;
|
||||
}
|
||||
|
||||
.tooltip-arrow-top, .tooltip-arrow-bottom {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.lyrics-lines-container,
|
||||
.message-container {
|
||||
color: #FFFFFF !important;
|
||||
}
|
||||
|
||||
/* Home page */
|
||||
.GlueCarousel__grid-wrapper::-webkit-scrollbar-thumb {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.GlueCard__info-wrapper,
|
||||
.Card__info-wrapper {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.card-horizontal-interior-wrapper .card-info-title {
|
||||
text-align: start !important;
|
||||
}
|
||||
|
||||
.tl-row.selected:hover .tl-cell {
|
||||
background: var(--modspotify_scrollbar_fg_and_selected_row_bg) !important;
|
||||
}
|
||||
|
||||
.GlueTableRow--is-selected {
|
||||
background-color: var(--modspotify_scrollbar_fg_and_selected_row_bg) !important;
|
||||
}
|
||||
|
||||
.tracklist-podcast .tl-progress .row-progress__bar {
|
||||
background-color: var(--modspotify_main_fg);
|
||||
}
|
||||
|
||||
.Header__background-color{
|
||||
background-color: var(--modspotify_main_bg) !important;
|
||||
}
|
||||
|
||||
.Button--style-green,
|
||||
.button.button-green, .button.button-white {
|
||||
border-radius: 25px;
|
||||
color: var(--modspotify_main_bg) !important;
|
||||
}
|
||||
|
||||
.glue-page-header:not(.glue-page-header--album):not(.glue-page-header--playlist):not(.glue-page-header--artist):not(.glue-page-header--dailymix):not(.glue-page-header--user):not(.glue-page-header--show)
|
||||
.glue-page-header__content-inner .glue-page-header__title-text,
|
||||
.HomeHeader .Header__content-inner .Header__title-text-inner,
|
||||
.MadeForYouHeader .Header__content-inner .Header__title-text-inner,
|
||||
.RecentlyPlayedPage__header .Header__content-inner .Header__title-text-inner {
|
||||
background-color: var(--modspotify_main_bg);
|
||||
padding: 5px 20px;
|
||||
border: 5px solid var(--modspotify_main_fg) !important;
|
||||
border-radius: 0px;
|
||||
box-shadow: 0 4px 12px 0 rgba(var(--modspotify_rgb_cover_overlay_and_shadow),.2);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.glue-page-header.glue-page-header--album .glue-page-header__content-inner .glue-page-header__title,
|
||||
.glue-page-header.glue-page-header--artist .glue-page-header__content-inner .glue-page-header__title,
|
||||
.glue-page-header.glue-page-header--dailymix .glue-page-header__content-inner .glue-page-header__title,
|
||||
.glue-page-header.glue-page-header--playlist .glue-page-header__content-inner .glue-page-header__title {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
span.glue-page-header__title-text {
|
||||
color: var(--modspotify_main_fg);
|
||||
}
|
||||
|
||||
.glue-page-header .glue-page-header__content-inner .glue-page-header__button {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.glue-page-header__content-inner,
|
||||
.glue-page-header__data,
|
||||
.glue-page-header__title,
|
||||
.Header__content-inner,
|
||||
.Header__data,
|
||||
.Header__title,
|
||||
.Header__title-text,
|
||||
.Header__title-text-inner {
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
||||
/*Force player bar to has fixed height*/
|
||||
.view-player {
|
||||
height: var(--bar-height) !important;
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.view-player .now-playing {
|
||||
overflow: unset;
|
||||
}
|
||||
|
||||
.view-player .now-playing .cover-image-link,
|
||||
.view-player .now-playing .cover-image-link figure {
|
||||
width: var(--bar-height);
|
||||
height: var(--bar-height);
|
||||
}
|
||||
|
||||
#now-playing-image-small .cover-image {
|
||||
position: fixed !important;
|
||||
width: var(--bar-height);
|
||||
height: var(--bar-height);
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.view-player .now-playing .cover-image-link-wrapper {
|
||||
flex: 0 1 calc(var(--bar-height) + 10px);
|
||||
}
|
||||
|
||||
.text-container {
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.view-player .now-playing-container .button-add {
|
||||
color: var(--modspotify_main_fg) !important;
|
||||
}
|
||||
|
||||
.progress-container .progress-bar,
|
||||
.progress-container .inner {
|
||||
top: 0 !important;
|
||||
margin-top: 0 !important;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
.progress-container .progress-bar-wrapper {
|
||||
top: 0 !important;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
.progress-container {
|
||||
position: fixed !important;
|
||||
width: 100% !important;
|
||||
bottom: var(--bar-height) !important;
|
||||
margin : 0 !important;
|
||||
}
|
||||
|
||||
.progress-container .inner {
|
||||
border-radius: 0 0px 0px 0 !important;
|
||||
background-color: var(--modspotify_main_fg) !important;
|
||||
box-shadow: 0 0px 0px 0 var(--modspotify_main_fg);
|
||||
}
|
||||
|
||||
.glue-page-header__p2s-details,
|
||||
.glue-page-header__p2s-followers {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.context-menu {
|
||||
border: 2px solid var(--modspotify_main_fg);
|
||||
box-shadow: 0 4px 12px 0 rgba(var(--modspotify_rgb_cover_overlay_and_shadow),.2);
|
||||
border-radius: 0px !important;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#menu-wrapper ::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#menu-wrapper {
|
||||
border-right: 3px solid black;
|
||||
border-image: linear-gradient(0deg, transparent , var(--modspotify_scrollbar_fg_and_selected_row_bg) 40%, var(--modspotify_scrollbar_fg_and_selected_row_bg) 60%, transparent 90%) 2 90%;
|
||||
}
|
||||
|
||||
.main-view-wrapper {
|
||||
overflow: unset;
|
||||
}
|
||||
|
||||
.Button--style-icon-stroke:after,
|
||||
.Button--style-icon-stroke:hover:after,
|
||||
.Button--style-icon-stroke,
|
||||
.glue-page-header__button .button-icon-with-stroke,
|
||||
.glue-page-header__button .button-icon-with-stroke::after {
|
||||
box-shadow: unset;
|
||||
}
|
||||
|
||||
.glue-page-header.glue-page-header--artist .glue-page-header__label {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.glue-page-header.glue-page-header--artist.has-custom-image .glue-page-header__label {
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.glue-page-header__content .glue-page-header__label {
|
||||
margin-left: -2px;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.glue-page-header__label span,
|
||||
.Header__label span {
|
||||
background-color: var(--modspotify_main_fg);
|
||||
color: var(--modspotify_main_bg);
|
||||
padding: 2px 10px;
|
||||
}
|
||||
|
||||
.glue-page-header__label .header-verified-check {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
body.remotebar .view-player .player-bar-wrapper {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.SidebarListItem--is-active:after,
|
||||
.RootlistItem--is-active:after,
|
||||
/* For Linux */ #view-navigation-bar .item.active:after {
|
||||
background-color: transparent;
|
||||
background-image: linear-gradient(90deg, var(--modspotify_sidebar_indicator) , transparent);
|
||||
opacity: 0.2;
|
||||
bottom: unset;
|
||||
top: 5%;
|
||||
height: 90%;
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.Header__image-inner {
|
||||
box-shadow: unset;
|
||||
}
|
||||
|
||||
.button.button-green.contextmenu-active, .button.button-green:not(:disabled):hover {
|
||||
background-color: var(--modspotify_hover_button_bg);
|
||||
}
|
||||
31
.config/spicetify/config-xpui.ini
Normal file
31
.config/spicetify/config-xpui.ini
Normal file
@@ -0,0 +1,31 @@
|
||||
[AdditionalOptions]
|
||||
extensions =
|
||||
custom_apps =
|
||||
sidebar_config = 1
|
||||
home_config = 1
|
||||
|
||||
[Patch]
|
||||
|
||||
[Setting]
|
||||
prefs_path = /home/rhiobet/.config/spotify/prefs
|
||||
overwrite_assets = 0
|
||||
check_spicetify_upgrade = 0
|
||||
spotify_path = /opt/spotify
|
||||
current_theme = SpicetifyDefault
|
||||
color_scheme =
|
||||
inject_css = 1
|
||||
replace_colors = 1
|
||||
spotify_launch_flags =
|
||||
|
||||
[Preprocesses]
|
||||
disable_sentry = 1
|
||||
disable_ui_logging = 1
|
||||
remove_rtl_rule = 1
|
||||
expose_apis = 1
|
||||
disable_upgrade_check = 1
|
||||
|
||||
; DO NOT CHANGE!
|
||||
[Backup]
|
||||
version =
|
||||
with =
|
||||
|
||||
39
.config/spicetify/config.ini
Normal file
39
.config/spicetify/config.ini
Normal file
@@ -0,0 +1,39 @@
|
||||
[Setting]
|
||||
spotify_path = /opt/spotify
|
||||
prefs_path = /home/rhiobet/.config/spotify/prefs
|
||||
current_theme = SolarizedDarkGreen
|
||||
color_scheme =
|
||||
inject_css = 1
|
||||
replace_colors = 1
|
||||
overwrite_assets = 0
|
||||
spotify_launch_flags =
|
||||
check_spicetify_upgrade = 0
|
||||
|
||||
[Preprocesses]
|
||||
remove_rtl_rule = 1
|
||||
expose_apis = 1
|
||||
disable_sentry = 1
|
||||
disable_ui_logging = 1
|
||||
disable_upgrade_check = 1
|
||||
|
||||
[AdditionalOptions]
|
||||
home = 0
|
||||
lyric_always_show = 0
|
||||
lyric_force_no_sync = 0
|
||||
tastebuds = 0
|
||||
fastUser_switching = 0
|
||||
made_for_you_hub = 0
|
||||
new_feedback_ui = 0
|
||||
radio = 0
|
||||
song_page = 0
|
||||
extensions =
|
||||
minimal_ui = 0
|
||||
experimental_features = 0
|
||||
search_in_sidebar = 0
|
||||
visualization_high_framerate = 0
|
||||
custom_apps =
|
||||
|
||||
; DO NOT CHANGE!
|
||||
[Backup]
|
||||
version = 1.1.56.595.g2d2da0de
|
||||
|
||||
3
.config/spicetify/user.css
Normal file
3
.config/spicetify/user.css
Normal file
@@ -0,0 +1,3 @@
|
||||
body {
|
||||
--glue-font-family: Karla;
|
||||
}
|
||||
@@ -21,26 +21,28 @@ set $term kitty
|
||||
# set $menu dmenu_path | dmenu | xargs swaymsg exec --
|
||||
set $menu rofi -no-levenshtein-sort -color-enabled -show run\
|
||||
-run-command "zsh -i -c '{cmd}'" | xargs swaymsg exec --
|
||||
set $srclocker swaylock -c 222222 -i eDP-1:~/wallpapers/radiance.png\
|
||||
-i DP-5:~/wallpapers/hornet.jpg -i DP-4:~/wallpapers/knight.jpg\
|
||||
-i DP-7:~/wallpapers/hornet.jpg -i DP-6:~/wallpapers/knight.jpg\
|
||||
-i DP-9:~/wallpapers/hornet.jpg -i DP-8:~/wallpapers/knight.jpg\
|
||||
-i HDMI-A-1:~/wallpapers/radiance.png
|
||||
set $srclocker swaylock -c 222222 -u -i eDP-1:~/wallpapers/radiance.png\
|
||||
-i DP-5:~/wallpapers/hornet.jpg -i DP-4:~/wallpapers/knight.jpg
|
||||
|
||||
### Output configuration
|
||||
#
|
||||
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
||||
# output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
||||
output eDP-1 pos 0 1480 res 1920 1080
|
||||
output HDMI-A-1 pos 1920 1480 res 1920 1080
|
||||
output "Samsung Electric Company SyncMaster H1AK500000" res 3840 2160
|
||||
output "Dell Inc. DELL U2410 F525M0A1082L" pos 1920 680 res 1920 1200
|
||||
#output "Dell Inc. DELL U2717D JXRPT83GAHKS" pos 3840 0 mode --custom 2560x1440@39Hz transform 90
|
||||
output "Dell Inc. DELL U2717D JXRPT83GAHKS" pos 1920 1480 mode 2560 1440
|
||||
output "Hewlett Packard HP LA2405x CN43480QK5" pos 3840 320 mode 1920 1200 transform 270
|
||||
output "Dell Inc. DELL U2410 F525M98C17AL" pos 0 680 mode 1920 1200
|
||||
output * pos 1920 0 res 1920 1080
|
||||
#output eDP-1 pos 0 300 res 3840 2160 scale 1
|
||||
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 3840 0 res 2560 1440
|
||||
output "Dell Inc. DELL U2717D JXRPT83GAHKS" pos 1920 0 res 2560 1440
|
||||
#output "Dell Inc. DELL U2717D JXRPT83GAHKS" pos 1920 0 res 1920 1080
|
||||
output HDMI-A-3 pos 1920 0 res 1920 1080
|
||||
output * bg ~/wallpapers/filianore-u.jpg fill
|
||||
output "Beihai Century Joint Innovation Technology Co.,Ltd MD49DQHD-2 0000000000000" pos 1920 0 res 5120 1440
|
||||
focus output eDP-1
|
||||
|
||||
bindswitch --reload --locked lid:on output eDP-1 disable
|
||||
bindswitch --reload --locked lid:off output eDP-1 enable
|
||||
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
@@ -49,14 +51,7 @@ focus output eDP-1
|
||||
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
||||
|
||||
# Mouse cursor
|
||||
set $my_cursor capitaine-cursors
|
||||
set $my_cursor_size 32
|
||||
|
||||
seat seat0 xcursor_theme $my_cursor $my_cursor_size
|
||||
exec_always {
|
||||
gsettings set org.gnome.desktop.interface cursor-theme $my_cursor
|
||||
gsettings set org.gnome.desktop.interface cursor-size $my_cursor_size
|
||||
}
|
||||
seat seat0 xcursor_theme capitaine-cursors 32
|
||||
|
||||
### Idle configuration
|
||||
#
|
||||
@@ -91,14 +86,11 @@ input "*" {
|
||||
xkb_variant latin9
|
||||
}
|
||||
|
||||
input "1102:4619:DLL07A0:01_044E:120B" {
|
||||
input "1739:0:Synaptics_TM3276-031" {
|
||||
tap enabled
|
||||
natural_scroll enabled
|
||||
}
|
||||
|
||||
input "9653:84:Samsung_electronics_inc._Samsung_HID_Multi-Touch"\
|
||||
map_to_output "Samsung Electric Company SyncMaster H1AK500000"
|
||||
|
||||
### Key bindings
|
||||
#
|
||||
# Basics:
|
||||
@@ -110,14 +102,14 @@ input "9653:84:Samsung_electronics_inc._Samsung_HID_Multi-Touch"\
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# Sound
|
||||
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||
bindsym XF86AudioRaiseVolume exec amixer -c 0 sset Master 5%+
|
||||
bindsym XF86AudioLowerVolume exec amixer -c 0 sset Master 5%-
|
||||
bindsym XF86AudioMute exec 'amixer -c 0 sset Master toggle && amixer -c 0 sset Speaker on && amixer -c 0 sset Headphone on'
|
||||
bindsym XF86AudioMicMute exec amixer -c 0 sset Capture toggle
|
||||
|
||||
# Brightness
|
||||
bindsym XF86MonBrightnessUp exec xbacklight -inc 5
|
||||
bindsym XF86MonBrightnessDown exec xbacklight -dec 5
|
||||
bindsym XF86MonBrightnessUp exec brightnessctl s +5%
|
||||
bindsym XF86MonBrightnessDown exec brightnessctl s 5%-
|
||||
|
||||
# Start your launcher
|
||||
bindsym $mod+r exec $menu
|
||||
@@ -138,9 +130,11 @@ input "9653:84:Samsung_electronics_inc._Samsung_HID_Multi-Touch"\
|
||||
'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
|
||||
#bindsym Shift+Print exec grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') - > /home/rhiobet/screenshots/$(date +%s).png
|
||||
|
||||
#
|
||||
# Moving around:
|
||||
#
|
||||
@@ -210,9 +204,6 @@ input "9653:84:Samsung_electronics_inc._Samsung_HID_Multi-Touch"\
|
||||
# Make the current focus fullscreen
|
||||
bindsym $mod+f fullscreen
|
||||
|
||||
# Maximize current focus
|
||||
bindsym $mod+m exec swaymsg floating true && swaymsg resize set $(swaymsg -t get_workspaces | jq -r '.[] | select(.focused) | .rect | "\(.width)px \(.height)px"')
|
||||
|
||||
# Toggle the current focus between tiling and floating mode
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
@@ -267,7 +258,7 @@ bindsym Ctrl+Alt+l exec $srclocker
|
||||
bar {
|
||||
position top
|
||||
pango_markup enabled
|
||||
font pango:DejaVu Sans Mono, devicons, FontAwesome 10
|
||||
font pango:DejaVu Sans Mono, FontAwesome 10
|
||||
|
||||
# When the status_command prints a new line to stdout, swaybar updates.
|
||||
# The default just shows the current date and time.
|
||||
@@ -275,7 +266,6 @@ bar {
|
||||
# status_command i3status-rs ~/.config/sway/status.toml
|
||||
swaybar_command waybar
|
||||
status_padding 0
|
||||
height 22
|
||||
|
||||
colors {
|
||||
statusline #ffffff
|
||||
@@ -286,11 +276,6 @@ bar {
|
||||
}
|
||||
}
|
||||
|
||||
bindswitch --locked --reload lid:on output eDP-1 disable
|
||||
bindswitch --locked --reload lid:off output eDP-1 enable
|
||||
|
||||
bindsym Ctrl+m exec mpv "$(wl-paste -t text)"
|
||||
|
||||
hide_edge_borders both
|
||||
default_border none
|
||||
gaps inner 6
|
||||
@@ -305,13 +290,22 @@ include /etc/sway/config.d/*
|
||||
# Assignments
|
||||
assign [class="discord"] workspace 3
|
||||
assign [class="Spotify"] workspace 3
|
||||
# for_window [class="Spotify"] opacity 0.8
|
||||
for_window [app_id="boop-gtk"] floating enable
|
||||
|
||||
exec redshift -O 4500 -m wayland
|
||||
#exec redshift -O 4500 -m wayland
|
||||
exec wlanthy -i pass
|
||||
|
||||
# exec ~/.local/start-jack.sh
|
||||
|
||||
exec ~/.config/sway/workspace_rename.py > ~/.cache/workspace_rename.log 2> ~/.cache/workspace_rename_error.log
|
||||
|
||||
for_window [class="Tor Browser"] floating enable
|
||||
|
||||
for_window [class="steam_proton"] floating enable
|
||||
|
||||
for_window [app_id="mpv"] floating enable
|
||||
|
||||
for_window [app_id="kitty-scratch"] {
|
||||
border pixel 1
|
||||
}
|
||||
@@ -327,23 +321,10 @@ exec $term
|
||||
workspace 2 output eDP-1
|
||||
|
||||
workspace 3 output eDP-1
|
||||
|
||||
workspace 4 output "Dell Inc. DELL U2410 F525M0A1082L"
|
||||
|
||||
workspace 5 output "Dell Inc. DELL U2410 F525M0A1082L"
|
||||
|
||||
workspace 6 output "Dell Inc. DELL U2410 F525M0A1082L"
|
||||
|
||||
workspace 7 output "Dell Inc. DELL U2717D JXRPT83GAHKS"
|
||||
|
||||
workspace 8 output "Dell Inc. DELL U2717D JXRPT83GAHKS"
|
||||
|
||||
workspace 9 output "Dell Inc. DELL U2717D JXRPT83GAHKS"
|
||||
exec discord
|
||||
exec spotify-launcher
|
||||
|
||||
exec xrdb -load ~/.Xresources
|
||||
|
||||
exec autotiling
|
||||
|
||||
exec keepassxc
|
||||
|
||||
exec "systemctl --user import-environment; systemctl --user start sway-session.target"
|
||||
# Application keybinds
|
||||
bindsym Ctrl+m exec mpv $(wl-paste -t text)
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if ! pgrep -x $1; then
|
||||
${@:1}
|
||||
fi
|
||||
@@ -10,7 +10,7 @@ good_bg = "#859900ff"
|
||||
warning_bg = "#b58900ff"
|
||||
critical_bg = "#dc322fff"
|
||||
alternating_tint_bg = "#00000000"
|
||||
separator = "<span font='14'>\ue0b2</span>"
|
||||
separator = "<span font='15'>\ue0b2</span>"
|
||||
#separator = ""
|
||||
|
||||
#[[block]]
|
||||
|
||||
35
.config/sway/workspace-rename.sh
Executable file
35
.config/sway/workspace-rename.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
|
||||
swaymsg -t subscribe -m '[ "window" ]' | while read -r event ; do
|
||||
if [ "$(jq -r '.change' <<< $event)" = 'focus' ] ; then
|
||||
current_workspace="$(swaymsg -t get_workspaces | jq -r '.[] | select(.focused)')"
|
||||
workspace_num="$(jq -r '.num' <<< $current_workspace)"
|
||||
workspace_name="$(jq -r '.name' <<< $current_workspace)"
|
||||
|
||||
app_name="$(jq -r '.container.app_id' <<< $event)"
|
||||
if [ $app_name = 'null' ] ; then
|
||||
app_name="$(jq -r '.container.window_properties.instance' <<< $event)"
|
||||
fi
|
||||
|
||||
if [ "$app_name" = "kitty" ] ; then
|
||||
app_name=""
|
||||
elif [[ "$app_name" == *"chrom"* ]] || [[ "$app_name" == *"Chrom"* ]]; then
|
||||
case "$(jq -r '.container.name' <<< $event)" in
|
||||
*YouTube*)
|
||||
app_name=""
|
||||
;;
|
||||
*)
|
||||
app_name=""
|
||||
;;
|
||||
esac
|
||||
elif [ "$app_name" = "discord" ] ; then
|
||||
app_name=""
|
||||
elif [ "$app_name" = "spotify" ] ; then
|
||||
app_name=""
|
||||
elif [ "$app_name" = "GEMOC Studio" ] ; then
|
||||
app_name=""
|
||||
fi
|
||||
|
||||
swaymsg rename workspace "$workspace_name" to "$workspace_num:$app_name"
|
||||
fi
|
||||
done
|
||||
@@ -21,10 +21,7 @@ async def main():
|
||||
for d in w.descendants():
|
||||
app_name = d.app_id
|
||||
if not app_name:
|
||||
if d.name and 'Vivaldi' in d.name:
|
||||
new_name += '<span font=\'10\' rise=\'-500\' letter_spacing=\'2048\'></span>'
|
||||
else:
|
||||
app_name = d.window_instance
|
||||
app_name = d.window_instance
|
||||
|
||||
if app_name:
|
||||
if not first_descendant:
|
||||
|
||||
@@ -1,16 +1,30 @@
|
||||
[{
|
||||
"spacing": 4, // Gaps between modules (4px)
|
||||
"modules-left": ["sway/workspaces"],
|
||||
"modules-left": ["sway/workspaces", "wlr/taskbar"],
|
||||
"modules-center": [],
|
||||
"modules-right": ["pulseaudio", "memory", "cpu", "battery", "network", "custom/pacman", "clock", "tray"],
|
||||
"memory": {
|
||||
"format": "\uf538 {used:0.1f}GiB",
|
||||
"on-click": "kitty --class kitty-scratch -c ~/.config/kitty/kitty-scratch.conf btop"
|
||||
},
|
||||
"sway/workspaces": {
|
||||
"format": "{value}"
|
||||
},
|
||||
"wlr/taskbar": {
|
||||
"on-click": "activate"
|
||||
},
|
||||
"tray": {
|
||||
"spacing": 10
|
||||
},
|
||||
"clock": {
|
||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||
"tooltip-format": "<tt><small>{calendar}</small></tt>",
|
||||
"calendar": {
|
||||
"mode": "year",
|
||||
"mode-mon-col": 3,
|
||||
"format": {
|
||||
"today": "<b><u>{}</u></b>"
|
||||
}
|
||||
},
|
||||
"format": "\uf017 {:%A %d/%m/%Y %H:%M}"
|
||||
},
|
||||
"cpu": {
|
||||
|
||||
@@ -14,9 +14,39 @@ window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
tooltip {
|
||||
background-color: #002b36;
|
||||
border: 1px solid #859900;
|
||||
border-radius: 0px;
|
||||
}
|
||||
tooltip label {
|
||||
color: #93a1a1;
|
||||
}
|
||||
|
||||
#taskbar {
|
||||
margin-left: 10px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
#taskbar button {
|
||||
padding: 0px;
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#taskbar button:hover {
|
||||
background: inherit;
|
||||
background-color: #268bd2;
|
||||
-gtk-icon-shadow: none;
|
||||
}
|
||||
|
||||
#taskbar button.active {
|
||||
background-color: #859900;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
color: #93a1a1;
|
||||
padding: 0px;
|
||||
background-color: transparent;
|
||||
/* Use box-shadow instead of border so the text isn't offset */
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
/* Avoid rounded borders under each workspace name */
|
||||
@@ -25,6 +55,8 @@ window#waybar.hidden {
|
||||
|
||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||
#workspaces button:hover {
|
||||
background: inherit;
|
||||
text-shadow: none;
|
||||
background-color: #268bd2;
|
||||
color: #002b36;
|
||||
}
|
||||
@@ -45,6 +77,7 @@ window#waybar.hidden {
|
||||
}
|
||||
|
||||
#workspaces button,
|
||||
#taskbar button,
|
||||
#clock,
|
||||
#battery,
|
||||
#cpu,
|
||||
@@ -66,7 +99,7 @@ window#waybar.hidden {
|
||||
|
||||
#window,
|
||||
#workspaces {
|
||||
margin: 0 4px;
|
||||
margin: 0 20px;
|
||||
}
|
||||
|
||||
/* If workspaces is the leftmost module, omit left margin */
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,2 @@
|
||||
.config/nvim/plugged
|
||||
.config/nvim/.netrwhist
|
||||
.config/mpv/scripts/japan7.lua
|
||||
|
||||
14
.local/start_jack.sh
Executable file
14
.local/start_jack.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
pkill jackd
|
||||
jack_control start
|
||||
sleep 1
|
||||
alsa_in -d hw:PCH,0 -j alsa_in &
|
||||
alsa_out -d hw:PCH,0 -j alsa_out &
|
||||
sleep 1
|
||||
jack_connect system:monitor_1 alsa_out:playback_1
|
||||
jack_connect system:monitor_2 alsa_out:playback_2
|
||||
jack_connect system:capture_1 system:playback_1
|
||||
jack_connect system:capture_2 system:playback_2
|
||||
jack_connect alsa_in:capture_1 "PulseAudio JACK Source":front-left
|
||||
jack_connect alsa_in:capture_2 "PulseAudio JACK Source":front-right
|
||||
7
.zshenv
7
.zshenv
@@ -1,2 +1,7 @@
|
||||
export JAVA_HOME=/usr/lib/jvm/$(archlinux-java get)
|
||||
export JAVAFX_HOME=/lib/jvm/java-16-openjdk
|
||||
#export GDK_BACKEND=x11
|
||||
export EDITOR=nvim
|
||||
|
||||
export XDG_CURRENT_DESKTOP=sway
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
#export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json
|
||||
|
||||
22
.zshrc
22
.zshrc
@@ -13,6 +13,7 @@ compinit
|
||||
|
||||
export ZSH=/usr/share/oh-my-zsh
|
||||
export ZSH_CUSTOM=/usr/share/zsh
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=10"
|
||||
ZSH_THEME="af-magic"
|
||||
|
||||
plugins=(
|
||||
@@ -28,34 +29,27 @@ plugins=(
|
||||
)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
#bindkey '^R' history-incremental-pattern-search-backward
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
source ~/.bash_aliases
|
||||
fi
|
||||
eval $(thefuck --alias)
|
||||
|
||||
ranger() {
|
||||
if [ -z "$RANGER_LEVEL" ]; then
|
||||
/usr/bin/ranger "$@"
|
||||
else
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
alias start_gnome='XDG_SESSION_TYPE=wayland exec dbus-run-session gnome-session'
|
||||
#alias discord="export GDK_BACKEND=wayland && discord-canary"
|
||||
|
||||
# >>> mamba initialize >>>
|
||||
# !! Contents within this block are managed by 'mamba init' !!
|
||||
export MAMBA_EXE="/usr/bin/micromamba";
|
||||
export MAMBA_ROOT_PREFIX="/home/rhiobet/micromamba";
|
||||
__mamba_setup="$('/usr/bin/micromamba' shell hook --shell zsh --prefix '/home/rhiobet/micromamba' 2> /dev/null)"
|
||||
export MAMBA_ROOT_PREFIX="/home/rhiobet/.mamba";
|
||||
__mamba_setup="$("$MAMBA_EXE" shell hook --shell zsh --prefix "$MAMBA_ROOT_PREFIX" 2> /dev/null)"
|
||||
if [ $? -eq 0 ]; then
|
||||
eval "$__mamba_setup"
|
||||
else
|
||||
if [ -f "/home/rhiobet/micromamba/etc/profile.d/micromamba.sh" ]; then
|
||||
. "/home/rhiobet/micromamba/etc/profile.d/micromamba.sh"
|
||||
if [ -f "/home/rhiobet/.mamba/etc/profile.d/micromamba.sh" ]; then
|
||||
. "/home/rhiobet/.mamba/etc/profile.d/micromamba.sh"
|
||||
else
|
||||
export PATH="/home/rhiobet/micromamba/bin:$PATH" # extra space after export prevents interference from conda init
|
||||
export PATH="/home/rhiobet/.mamba/bin:$PATH" # extra space after export prevents interference from conda init
|
||||
fi
|
||||
fi
|
||||
unset __mamba_setup
|
||||
|
||||
Reference in New Issue
Block a user