Sakura, imv on swallow

This commit is contained in:
Neptune 2020-08-03 00:32:24 +02:00
parent fd8d967e03
commit 1c02388325
13 changed files with 348 additions and 38 deletions

2
.gitignore vendored
View file

@ -5,6 +5,8 @@
**/qutebrowser/qsettings
**/qutebrowser/autoconfig.yml
**/mpv/watch_later
**/mpv/scripts
**/mpv/shaders
**/mpd/database
**/mpd/log
**/mpd/pid

View file

@ -52,6 +52,9 @@ mpd &
xset s off &
xset -dpms &
## No time to waste
xset r rate 300 50 &
## Compositor
picom --experimental-backends --backend glx -b &
redshift -l 44.481:0.3545 &
@ -59,3 +62,6 @@ redshift -l 44.481:0.3545 &
## Peripherals
xsetwacom set $(xsetwacom --list devices | awk '/Pen stylus/ { if ($7 == "id:") { print $8 } }') MapToOutput HDMI-A-1 &
xow &
## Swallow
pidswallow --loop &

View file

@ -200,3 +200,5 @@ super + @XF86AudioMute
@XF86ScreenSaver
slock
super + v
bspc query --nodes --node focused | pidswallow -t

View file

@ -0,0 +1,57 @@
[
{
"git":"https://github.com/wiiaboo/mpv-scripts",
"whitelist":"auto%-profiles%.lua$",
"dest":"~~/scripts"
},
{
"git":"https://github.com/po5/uosc",
"whitelist":"%.lua$",
"dest":"~~/scripts"
},
{
"git":"https://github.com/po5/mpv-webm",
"whitelist":"webm%.lua$",
"dest":"~~/scripts"
},
{
"git":"https://github.com/po5/trackselect",
"whitelist":"%.lua$",
"dest":"~~/scripts"
},
{
"git":"https://github.com/po5/chapterskip",
"whitelist":"%.lua$",
"dest":"~~/scripts"
},
{
"git":"https://github.com/po5/groupwatch_sync",
"whitelist":"%.lua$",
"dest":"~~/scripts"
},
{
"git":"https://github.com/po5/mpv_irc",
"whitelist":"%.lua$",
"dest":"~~/scripts"
},
{
"git":"https://github.com/po5/mpv-scripts",
"whitelist":"coverart%.lua$",
"dest":"~~/scripts"
},
{
"git":"https://gist.github.com/igv/8a77e4eb8276753b54bb94c1c50c317e",
"whitelist":"%.glsl$",
"dest":"~~/shaders"
},
{
"git":"https://gist.github.com/igv/a015fc885d5c22e6891820ad89555637",
"whitelist":"%.glsl$",
"dest":"~~/shaders"
},
{
"git":"https://github.com/bjin/mpv-prescalers",
"whitelist":"ravu%-lite%-r4%.hook$|ravu%-zoom%-r4%-chroma%.hook$",
"dest":"~~/shaders"
}
]

159
sway/.config/waybar/config Normal file
View file

@ -0,0 +1,159 @@
// vi: set ft=json :
{
"layer": "top", // Waybar at top layer
// "position": "bottom", // Waybar position (top|bottom|left|right)
"height": 30, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width
// Choose the order of the modules
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["sway/window"],
"modules-right": ["custom/alsa", "mpd", "temperature", "clock"],
// Modules configuration
"sway/workspaces": {
"disable-scroll": true,
"all-outputs": true,
"format": "{name}: {icon}",
"format-icons": {
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"urgent": "",
"focused": "",
"default": ""
}
},
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
"mpd": {
// "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ",
"format": " {stateIcon} {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})",
"format-disconnected": "Disconnected ",
"format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ",
"unknown-tag": "N/A",
"interval": 2,
"consume-icons": {
"on": " "
},
"random-icons": {
"off": "<span color=\"#f53c3c\"></span> ",
"on": " "
},
"repeat-icons": {
"on": " "
},
"single-icons": {
"on": "1 "
},
"state-icons": {
"paused": "",
"playing": ""
},
"tooltip-format": "MPD (connected)",
"tooltip-format-disconnected": "MPD (disconnected)"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
// "icon-size": 21,
"spacing": 10
},
"clock": {
"tooltip-format": "{:%Y-%m-%d | %H:%M}",
"format-alt": "{:%Y-%m-%d}"
},
"cpu": {
"format": "{usage}% ",
"tooltip": false
},
"memory": {
"format": "{}% "
},
"temperature": {
// "thermal-zone": 2,
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
"hwmon-path" : "/sys/devices/pci0000:00/0000:00:03.1/0000:1c:00.0/hwmon/hwmon0/temp1_input",
"critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}",
"format": "{temperatureC}°C {icon}",
// "format-icons": ["", "", ""],
"format-icons": ["", "", "", "", ""]
},
"backlight": {
// "device": "acpi_video1",
"format": "{percent}% {icon}",
"format-icons": ["", ""]
},
"battery": {
"states": {
// "good": 95,
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ",
"format-alt": "{time} {icon}",
// "format-good": "", // An empty format will hide the module
// "format-full": "",
"format-icons": ["", "", "", "", ""]
},
"battery#bat2": {
"bat": "BAT2"
},
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ifname}: {ipaddr}/{cidr} ",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "Disconnected ⚠",
"format-alt": "{ifname}: {ipaddr}/{cidr}"
},
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
"format": "{volume}% {icon} {format_source}",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}",
"format-muted": " {format_source}",
"format-source": "{volume}% ",
"format-source-muted": "",
"format-icons": {
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"on-click": "pavucontrol"
},
"custom/media": {
"format": "{icon} {}",
"return-type": "json",
"max-length": 40,
"format-icons": {
"spotify": "",
"default": "🎜"
},
"escape": true,
"exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
// "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
},
"custom/alsa": {
"exec": "$HOME/.config/waybar/scripts/alsa.sh 2> /dev/null",
// "on-click": "amixer set Master toggle; pkill -x -RTMIN+11 waybar",
// "on-scroll-up": "amixer set Master 1+; pkill -x -RTMIN+11 waybar",
// "on-scroll-down": "amixer set Master 1-; pkill -x -RTMIN+11 waybar",
"signal": 11,
"interval": 1,
"tooltip": false
}
}

View file

@ -1,14 +1,16 @@
# vim: set ft=fish :
# Activate vi mode
fish_vi_key_bindings
set fish_greeting
set -x GOPATH "$HOME/go"
set -x EDITOR nvim
# Accelerate key bindings
set -U SXHKD_SHELL sh
## PATH
set -x PATH "$PATH:$HOME/.gem/ruby/2.7.0/bin"
set -x PATH "$PATH:$HOME/.local/bin"
set -x PATH "$PATH:$HOME/bin"
set -x PATH "$PATH:$HOME/go/bin"
# Default programs:
set -x EDITOR "nvim"
set -x TERMINAL "kitty"
set -x BROWSER "qutebrowser"
## Fuzzy finder
set -x FZF_DEFAULT_OPTS '--preview "~/.config/kitty/preview {}" --preview-window left:40%'
@ -16,43 +18,72 @@ set -x FZF_EXCLUDE_GLOB '--glob "!.git/*" --glob "!.steam/*" --glob "!.local/sha
set -x FZF_DEFAULT_COMMAND "rg --files --hidden --follow $FZF_EXCLUDE_GLOB"
set -x FZF_FIND_FILE_COMMAND "rg --files --hidden --follow $FZF_EXCLUDE_GLOB"
# ~/ Clean-up:
set -x XDG_CONFIG_HOME "$HOME/.config"
set -x XDG_DATA_HOME "$HOME/.local/share"
set -x XDG_CACHE_HOME "$HOME/.cache"
#set -x XAUTHORITY "$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs.
set -x NOTMUCH_CONFIG "$XDG_CONFIG_HOME/notmuch-config"
set -x GTK2_RC_FILES "$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0"
set -x LESSHISTFILE "-"
set -x WGETRC "$XDG_CONFIG_HOME/wget/wgetrc"
set -x INPUTRC "$XDG_CONFIG_HOME/inputrc"
set -x ZDOTDIR "$XDG_CONFIG_HOME/zsh"
#set -x GNUPGHOME "$XDG_DATA_HOME/gnupg"
set -x WINEPREFIX "$XDG_DATA_HOME/wineprefixes/default"
set -x PASSWORD_STORE_DIR "$XDG_DATA_HOME/password-store"
set -x TMUX_TMPDIR "$XDG_RUNTIME_DIR"
set -x ANDROID_SDK_HOME "$XDG_CONFIG_HOME/android"
set -x CARGO_HOME "$XDG_DATA_HOME/cargo"
set -x GOPATH "$XDG_DATA_HOME/go"
set -x ANSIBLE_CONFIG "$XDG_CONFIG_HOME/ansible/ansible.cfg"
set -x UNISON "$XDG_DATA_HOME/unison"
set -x HISTFILE "$XDG_DATA_HOME/history"
## PATH
set -x PATH "$PATH:$HOME/.gem/ruby/2.7.0/bin"
set -x PATH "$PATH:$HOME/.local/bin"
set -x PATH "$PATH:$HOME/bin"
set -x PATH "$PATH:$GOPATH/bin"
## Packages
set -x XBPS_DISTDIR "$HOME/.void-packages"
alias v='xbpsui'
abbr v "xbpsui"
## Games
set -x SDL_AUDIODRIVER alsa
## Utilities
alias icat='kitty +kitten icat'
alias d="kitty +kitten diff"
alias mpv='mpv --no-input-default-bindings'
alias music='mpc -q play; ~/.config/ncmpcpp/art.sh; sleep 1; ~/.config/ncmpcpp/kitty.sh &; ncmpcpp'
alias bars='~/.config/ncmpcpp/kitty.sh &; cava'
alias weather='curl wttr.in'
abbr icat 'kitty +kitten icat'
abbr d "kitty +kitten diff"
abbr mpv 'mpv --no-input-default-bindings'
abbr music 'mpc -q play; ~/.config/ncmpcpp/art.sh; sleep 1; ~/.config/ncmpcpp/kitty.sh &; ncmpcpp'
abbr bars '~/.config/ncmpcpp/kitty.sh &; cava'
abbr weather 'curl wttr.in'
abbr manga 'find -type f | sort | sw imv -s none -b 1F1F21'
## Web
alias manga='gallery-dl' # Weeb anime bullshit
alias nico='youtube-dl'
alias yt='youtube-dl -f bestvideo+bestaudio' # Youtube videos
abbr nico 'youtube-dl'
abbr yt 'youtube-dl -f bestvideo+bestaudio' # Youtube videos
## Torrent
alias seed='aria2c --check-integrity=true --seed-ratio=0.0'
alias seed_today="seed (find . -maxdepth 1 -name '*.torrent' -mtime -1)"
alias torrent='aria2c --bt-metadata-only=true --bt-save-metadata=true'
abbr seed 'aria2c --check-integrity=true --seed-ratio=0.0'
abbr seed_today "seed (find . -maxdepth 1 -name '*.torrent' -mtime -1)"
abbr torrent 'aria2c --bt-metadata-only=true --bt-save-metadata=true'
## Navigation
alias ls='exa' # ls with colors
alias r='vifm'
abbr ls 'exa' # ls with colors
abbr r 'vifm'
## Git
alias g:a='git add -A'
alias g:c='git commit -a'
alias g:d='git difftool --no-symlinks --dir-diff'
alias g:i='git init'
alias g:l='git pull'
alias g:p='git push'
alias g:s='git status'
abbr g:a 'git add -A'
abbr g:c 'git commit -a'
abbr g:d 'git difftool --no-symlinks --dir-diff'
abbr g:i 'git init'
abbr g:l 'git pull'
abbr g:p 'git push'
abbr g:s 'git status'
## Functions
function git-replicate --description 'Copy git repository to new origin'

View file

@ -0,0 +1,36 @@
# Rename this file to match the name of the function
# e.g. ~/.config/fish/functions/n.fish
# or, add the lines to the 'config.fish' file.
function n --wraps nnn --description 'support nnn quit and change directory'
# Block nesting of nnn in subshells
if test -n "$NNNLVL"
if [ (expr $NNNLVL + 0) -ge 1 ]
echo "nnn is already running"
return
end
end
# The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set)
# To cd on quit only on ^G, remove the "-x" as in:
# set NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
# NOTE: NNN_TMPFILE is fixed, should not be modified
if test -n "$XDG_CONFIG_HOME"
set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
else
set -x NNN_TMPFILE "$HOME/.config/nnn/.lastd"
end
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
# stty start undef
# stty stop undef
# stty lwrap undef
# stty lnext undef
nnn $argv
if test -e $NNN_TMPFILE
source $NNN_TMPFILE
rm $NNN_TMPFILE
end
end

View file

@ -0,0 +1,9 @@
# Defined in /tmp/fish.1xT3XM/sakura.fish @ line 1
function sakura
$argv &
set _pid (jobs -l | awk '{print $2}')
sleep 1
set _wid (xdo id)
xprop -f WM_CLIENT_MACHINE 8s -set WM_CLIENT_MACHINE (hostname) -id $_wid
xprop -f _NET_WM_PID 32c -set _NET_WM_PID $_pid -id $_wid
end

View file

@ -8,7 +8,7 @@
# config file.
suppress_default_binds = true
scaling_mode = full
scaling_mode = none
background = checks

View file

@ -0,0 +1 @@
/home/jojo/.cache/wal/diff.conf

View file

@ -952,7 +952,7 @@ map kitty_mod+h show_scrollback
#: example, the following opens the scrollback buffer in less in an
#: overlay window::
#: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R
map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay nvim -
#: For more details on piping screen and buffer contents to external
#: programs, see launch.

View file

@ -159,19 +159,19 @@ filetype <text/*> nvim
filextype *.txt,*.json nvim
" Books
filextype *.pdf,*.epub,*.cbz,*.cbr sw llpp %c %i &
filextype *.pdf,*.epub,*.cbz,*.cbr llpp %c %i &
" Krita
filextype *.kra sw krita %c %i &
filextype *.kra krita %c %i &
" Audios
filetype <audio/*> sw mpv %c %i &
filetype <audio/*> mpv %c %i &
" Videos
filetype <video/*> sw mpv %c %i &
filetype <video/*> mpv %c %i &
" Images
filextype <image/*> sw imv -r %d -n %c &
filextype <image/*> imv -r %d -n %c &
" Archives
" fileviewer *.zip,*.jar,*.war,*.ear,*.oxt zip -sf %c
@ -349,5 +349,5 @@ set statusline="%1* %-26t %2* %= %1* %-5s"
set title
set iec
autocmd DirEnter ~/Videos/* setlocal sort=+name,+mtime,-dir
autocmd DirEnter ~/Videos/*,~/Pictures/manga/** setlocal sort=+name,+mtime,-dir
autocmd DirEnter ~/Videos/* filter .ass|.srt

View file

@ -67,4 +67,11 @@ mangasee123.com ajax.googleapis.com script allow
www.glassdoor.fr www.glassdoor.com script allow
www.glassdoor.fr cdnjs.cloudflare.com script allow
hexcolorcodes.org cdnjs.cloudflare.com other allow
hexcolorcodes.org ajax.cloudflare.com script allow
hexcolorcodes.org ajax.cloudflare.com script allow
www.amazon.fr fls-eu.amazon.com other allow
www.amazon.fr m.media-amazon.com other allow
www.amazon.fr m.media-amazon.com xhr allow
www.amazon.fr m.media-amazon.com script allow
www.amazon.fr unagi-eu.amazon.com other allow
www.amazon.fr images-na.ssl-images-amazon.com script allow
www.amazon.fr images-eu.ssl-images-amazon.com script allow