diff --git a/.bashrc b/.bashrc index f3770cb..c1222b9 100644 --- a/.bashrc +++ b/.bashrc @@ -1,10 +1,8 @@ eval "$(starship init bash)" source /usr/share/autojump/autojump.bash +source /usr/share/defaults/etc/profile -# Sensible Bash - An attempt at saner Bash defaults -# Maintainer: mrzool -# Repository: https://github.com/mrzool/bash-sensible -# Version: 0.2.2 +# Sensible Bash: https://github.com/mrzool/bash-sensible ## GENERAL OPTIONS ## @@ -64,6 +62,7 @@ export HISTIGNORE="&:[ ]*:exit:ls:bg:fg:history:clear" # %F equivalent to %Y-%m-%d # %T equivalent to %H:%M:%S (24-hours format) HISTTIMEFORMAT='%F %T ' +# Version: 0.2.2 # Enable incremental history search with up/down arrows (also Readline goodness) # Learn more about this here: http://codeinthehole.com/writing/the-most-important-command-line-tip-incremental-history-searching-with-inputrc/ @@ -87,23 +86,17 @@ shopt -s cdable_vars #aliases alias cd='cd -P' -alias caddy='python3 -m http.server' -alias cpugov='sudo cpupower frequency-set -g performance > /dev/null && echo Now in performance mode' +alias cpugov='sudo cpupower frequency-set -g performance' alias dirdl='wget -r -k -p --no-parent --no-clobber -e robots=off' alias dot='cd ~/.dotfiles' alias D='cd $D' -alias ff='fd -E sys -E caches -E cache -E .cache -E graphicPacks -E proc -E dosdevices -E .git -H -d 5 -L -i' -alias ffd='ff -t d' -alias flacc='flac -f -8 -V' +alias ff='fd -HILi -Edosdevices -E.git' alias g=git alias giveme='s chown $USER' alias hardinfo='inxi -SPARM -GCDN -v1 -xGCRS -Fxz' -alias kj='kill -9 $(jobs -p | grep -v Process)' alias l=ls -alias launcher='rofi -combi-modi "drun,run" -show combi -modi "combi,window" -drun-icon-theme Papirus' +alias launcher='rofi -combi-modi "drun,run" -show combi -modi "combi,window"' alias la='l -a' -alias mpva='mpv --no-video' -alias murder='killall -s SIGKILL' alias off=shutdown alias open=xdg-open alias pagedl='wget -H -k -p --no-clobber -e robots=off' @@ -117,12 +110,11 @@ alias ta='tmux attach -t' alias up='se up --y' alias vi=nvim alias v=vi -alias ydl="youtube-dlc --continue --ignore-errors --no-overwrites --write-sub --embed-subs -o '%(title)s.%(ext)s'" -alias ydl4='ydl --format mp4' +alias ydl="youtube-dlc -ciw --write-sub --write-auto-sub --embed-subs --sub-lang=en -o '%(title)s.%(ext)s'" #functions dl(){ - [[ "$#" -ge 1 ]] && aria2c --file-allocation=none -c -x 16 -s 16 $argv || cd ~/Downloads/ + [[ "$#" -ge 1 ]] && aria2c -c -x16 -s16 $argv || cd ~/Downloads/ } qb(){ qutebrowser $@ --target auto & disown diff --git a/.config/autostart/Devilspie.desktop b/.config/autostart/devilspie.desktop similarity index 100% rename from .config/autostart/Devilspie.desktop rename to .config/autostart/devilspie.desktop diff --git a/.config/autostart/Invidious.desktop b/.config/autostart/invidious.desktop similarity index 72% rename from .config/autostart/Invidious.desktop rename to .config/autostart/invidious.desktop index 8809db0..1b520ab 100644 --- a/.config/autostart/Invidious.desktop +++ b/.config/autostart/invidious.desktop @@ -2,4 +2,4 @@ Type=Application Name=Invidious Description= -Exec=fish -c invidious +Exec=fish -c invid diff --git a/.config/devilspie2/start.lua b/.config/devilspie2/start.lua index 8ecaf51..67869e1 100755 --- a/.config/devilspie2/start.lua +++ b/.config/devilspie2/start.lua @@ -7,17 +7,3 @@ if (get_application_name()=="Steam") then set_window_workspace(2) minimize() end - -if (get_window_name()=="Information") then - make_always_on_top() -end - -if (get_window_name()=="mpv-wallpaper") then - pin_window() - set_window_below() - set_skip_pager(true) - set_skip_tasklist(true) - stick_window() - undecorate_window() - set_window_type("WINDOW_TYPE_DESKTOP") -end diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 11aa9e8..7253981 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -1,6 +1,2 @@ -test (hostname) = aperture && set -gx D /mnt/LocalDiskD || set -gx D ~ - -set fish_user_paths ~/.local/bin /usr/lib/ccache/bin export EDITOR=nvim PAGER=most - tty -s && starship init fish | source && source /usr/share/autojump/autojump.fish diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables index 069742a..4fe40a2 100644 --- a/.config/fish/fish_variables +++ b/.config/fish/fish_variables @@ -1,5 +1,6 @@ # This file contains fish universal variable definitions. # VERSION: 3.0 +SETUVAR D:/mnt/LocalDiskD SETUVAR __fish_init_2_39_8:\x1d SETUVAR __fish_init_2_3_0:\x1d SETUVAR __fish_init_3_x:\x1d @@ -34,3 +35,4 @@ SETUVAR fish_pager_color_completion:\x1d SETUVAR fish_pager_color_description:B3A06D\x1eyellow SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan +SETUVAR fish_user_paths:/home/glados/\x2elocal/bin\x1e/usr/lib/ccache/bin diff --git a/.config/fish/functions/dl.fish b/.config/fish/functions/dl.fish index 770c2d1..4a09f59 100644 --- a/.config/fish/functions/dl.fish +++ b/.config/fish/functions/dl.fish @@ -1,3 +1,3 @@ function dl -w aria2c - test $argv && aria2c --file-allocation=none -c -x 16 -s 16 $argv || cd ~/Downloads/ + test "$argv" && aria2c -c -x16 -s16 $argv || cd ~/Downloads end diff --git a/.config/fish/functions/ta.fish b/.config/fish/functions/ta.fish index 9a13970..d8622d2 100644 --- a/.config/fish/functions/ta.fish +++ b/.config/fish/functions/ta.fish @@ -1,3 +1,3 @@ function ta -w math - tmux attach -t (math 0 + "0$argv") + tmux a -t (math 0 + "0$argv") end diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf index 9584bb1..fc70543 100644 --- a/.config/mpv/mpv.conf +++ b/.config/mpv/mpv.conf @@ -1,49 +1,30 @@ -input-ipc-server=/tmp/mpvsocket -cache=yes -gapless-audio=yes -save-position-on-quit=yes -screenshot-format=png -screenshot-png-compression=8 -volume-max=1000 -demuxer-max-bytes=2147483647 -demuxer-max-back-bytes=2147483647 -hwdec=yes +hwdec = yes +save-position-on-quit = yes +screenshot-format = png +gapless-audio = yes +volume-max = 1000 -audio-file-auto=exact -audio-file-paths=../Custom Tracks:./Custom Tracks:../Audio:./Audio -sub-file-paths=../Subtitles:./Subtitles:../Subs:./Subs +cache = yes +demuxer-max-bytes = 2147483647 +demuxer-max-back-bytes = 2147483647 + +audio-file-auto = exact +audio-file-paths = ../Custom Tracks:./Custom Tracks:../Audio:./Audio +sub-file-paths = ../Subtitles:./Subtitles:../Subs:./Subs use-filedir-conf -sub-font=Funimitation -sub-font-size=36 +sub-font = Funimitation +sub-font-size = 36 -hls-bitrate=max -profile-desc=cond:dedicated_gpu() - -scale=spline36 -cscale=spline36 -dscale=mitchell -scale-antiring=0 -cscale-antiring=0 -dither-depth=auto -correct-downscaling=yes -sigmoid-upscaling=yes -deband=yes +scale = spline36 +cscale = spline36 +dscale = spline36 [wallpaper] -title=mpv-wallpaper -geometry=100%x100% -border=no -no-window-dragging -x11-name=mpv-wallpaper -loop-file=yes -idle=no -aid=no -sid=no -load-scripts=no -no-input-default-bindings +loop +aid = no +sid = no +start = 0 +panscan = 1 +load-scripts = no no-stop-screensaver -on-all-workspaces -start=0:00 -panscan=1 -osc=no diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 21afe05..580a2b4 100755 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -47,7 +47,7 @@ map r "_d se background=dark colorscheme dracula -se termguicolors " Enable GUI colors for the terminal to get truecolor +se termguicolors autocmd FileType * se tw=0 diff --git a/.config/qutebrowser/quickmarks b/.config/qutebrowser/quickmarks index 4cd8d33..b0b8e6d 100644 --- a/.config/qutebrowser/quickmarks +++ b/.config/qutebrowser/quickmarks @@ -1,6 +1,7 @@ -docs https://docs.google.com/document/u/0/ -class https://classroom.google.com/u/0/ -drive https://drive.google.com/drive/u/0/ -tuta https://mail.tutanota.com/ -discord https://discord.com/channels/@me -hn https://news.ycombinator.com/ +docs https://docs.google.com +class https://classroom.google.com +drive https://drive.google.com +tuta https://mail.tutanota.com +discord https://discord.com/app +hn https://news.ycombinator.com +drop https://drop.lol diff --git a/.config/starship.toml b/.config/starship.toml index 1178586..42b43cc 100644 --- a/.config/starship.toml +++ b/.config/starship.toml @@ -1,4 +1,3 @@ -# Don't print a new line at the start of the prompt add_newline = false [git_branch] @@ -9,7 +8,7 @@ success_symbol = "[❯](bright-purple)" [directory] style = "bold blue" -truncation_length = 0 +fish_style_pwd_dir_length = 3 truncate_to_repo = false [cmd_duration] diff --git a/.local/bin/aliases b/.local/bin/aliases index 9ea6357..3aea3cb 100755 --- a/.local/bin/aliases +++ b/.local/bin/aliases @@ -2,19 +2,20 @@ alias a 'alias -s' a D 'cd $D' -a aliases 'v (which aliases)' +a aliases 'v (which aliases); command aliases' a bax 'source (which bax) && bax' a compress '7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on (realpath $argv).7z' -a cpugov 's cpupower frequency-set -g performance > /dev/null && echo Now in performance mode' +a cpugov 's cpupower frequency-set -g performance' a dirdl 'wget -r -k -p --no-parent --no-clobber -e robots=off' a dot 'cd ~/.dotfiles' -a ff 'fd -E sys -E caches -E cache -E .cache -E graphicPacks -E proc -E dosdevices -E .git -H -d 5 -L -i' +a dwarf 'mkdwarfs -i . -o $PWD.dwarfs' +a ff 'fd -HILi -Edosdevices -E.git' a g git a giveme 's chown $USER' a hardinfo 'inxi -SPARM -GCDN -v1 -xGCRS -Fxz' a l ls a la 'l -a' -a launcher 'rofi -combi-modi "drun,run" -show combi -modi "combi,window" -drun-icon-theme Papirus' +a launcher 'rofi -combi-modi "drun,run" -show combi -modi "combi,window"' a less 'eval $PAGER' a off shutdown a open xdg-open @@ -23,17 +24,17 @@ a qb 'qutebrowser --target auto' a re 'systemctl reboot -i' a s sudo a se 's eopkg' -a squash 'mksquashfs . (realpath .).squashfs -comp zstd -b 1M -Xcompression-level 22' +a squash 'mksquashfs . $PWD.squashfs -comp zstd -b 1M -Xcompression-level 22' a supath 's env "PATH=$PATH"' a up 'se up --y' a v vi a vi nvim -a ydl "youtube-dlc --continue --ignore-errors --no-overwrites --write-auto-sub --write-sub --embed-subs --sub-lang=en -o '%(title)s.%(ext)s'" +a ydl "youtube-dlc -ciw --write-sub --write-auto-sub --embed-subs --sub-lang=en -o '%(title)s.%(ext)s'" for i in (cat ~/.config/qutebrowser/quickmarks | cut -d ' ' -f1) a $i "qb / \":quickmark-load $i\"" end -for i in mcross soundscrape speedtest-cli thonny +for i in mcross thonny a $i "pipx run $i" end diff --git a/.local/bin/ao3 b/.local/bin/ao3 index 97a4b22..9d902ee 100755 --- a/.local/bin/ao3 +++ b/.local/bin/ao3 @@ -1,5 +1,3 @@ -#!/bin/sh -for i in $(grep works/[0-9]\* $@ -o | uniq | sed 's/works\///g' | sed '/^$/d') -do - aria2c https://download.archiveofourown.org/downloads/$i/\*.epub -d ao3 -done +#!/bin/bash +list=$(grep works/[0-9]\* $@ -o | uniq | grep -o [0-9]\* | tr '\n' , | sed s/.$//) +eval aria2c -Z https://download.archiveofourown.org/downloads/{$list}/\*.epub -d ao3 diff --git a/.local/bin/ao3dl b/.local/bin/ao3dl deleted file mode 120000 index c90ae37..0000000 --- a/.local/bin/ao3dl +++ /dev/null @@ -1 +0,0 @@ -ao3 \ No newline at end of file diff --git a/.local/bin/awall b/.local/bin/awall index bf7810f..2431aef 100755 --- a/.local/bin/awall +++ b/.local/bin/awall @@ -3,12 +3,9 @@ if [[ "$#" -ge 1 ]]; then rm ~/Pictures/.wallp ln -s ~/Pictures/Awall/$@* ~/Pictures/.wallp fi -kill $(pgrep -f "mpv.*wallpaper") -mpv --profile=wallpaper ~/Pictures/.wallp & disown +pkill -f "mpv.*wallpaper" +xwinwrap -ni -fdt -fs -- mpv -wid WID ~/Pictures/.wallp --profile=wallpaper & disown if [[ "$#" -ge 1 ]]; then - ffmpeg -i ~/Pictures/Awall/$@* -vframes 1 -y ~/Pictures/Awall/wall.png + ffmpeg -i ~/Pictures/.wallp -vframes 1 -y ~/Pictures/Awall/wall.png gsettings set org.gnome.desktop.background picture-uri "file://$HOME/Pictures/Awall/wall.png" -else - sleep 5 fi -budgie-panel --replace & disown diff --git a/.local/bin/build b/.local/bin/build deleted file mode 100755 index 4a8834a..0000000 --- a/.local/bin/build +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -sudo printf '' -git pull -./autogen.sh --prefix=/usr -./configure --prefix=/usr -cmake -DCMAKE_INSTALL_PREFIX=/usr . -sudo printf '' -make -j8 -sudo make install -meson --prefix=/usr build -sudo printf '' -ninja -C build -sudo ninja -C build install -sudo solbuild build package.yml -d diff --git a/.local/bin/clean b/.local/bin/clean index a6bd018..370925b 100755 --- a/.local/bin/clean +++ b/.local/bin/clean @@ -1,16 +1,14 @@ #!/bin/sh -sudo eopkg up --y -fc-cache -f -v -sudo sync -fish -c "j --purge" -sudo eopkg clean -y +sudo eopkg up -y sudo eopkg dc -y sudo eopkg rmo -y sudo eopkg rdb -y -sudo journalctl --vacuum-size=1K -bleachbit -c `bleachbit -l|grep -Ev 'system.free_disk_space|transmission|system.memory|firefox'` -sudo bleachbit -c `bleachbit -l|grep -Ev 'system.free_disk_space|transmission|system.memory|firefox'` -rm -r ~/.cache/* -sudo solbuild delete-cache +sudo eopkg clean -y +fc-cache -f +rm -r ~/.cache +fish -c "j --purge" docker system prune -f -sudo sync +sudo solbuild delete-cache +sudo journalctl --vacuum-size=1K +bleachbit -c `bleachbit -l|rg -v 'system.free_disk_space|transmission|system.memory|cookies'` +sudo bleachbit -c `bleachbit -l|rg -v 'system.free_disk_space|system.memory'` diff --git a/.local/bin/flacr b/.local/bin/flacr deleted file mode 100755 index daff34e..0000000 --- a/.local/bin/flacr +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -optiflac -af aresample=resampler=soxr:precision=32:dither_method=triangular -sample_fmt s16 $@ diff --git a/.local/bin/invid b/.local/bin/invid deleted file mode 120000 index bd617e1..0000000 --- a/.local/bin/invid +++ /dev/null @@ -1 +0,0 @@ -invidious \ No newline at end of file diff --git a/.local/bin/invid b/.local/bin/invid new file mode 100755 index 0000000..df2b1aa --- /dev/null +++ b/.local/bin/invid @@ -0,0 +1,2 @@ +#!/bin/sh +tmux new -s 0 -d 'cd ~/.invid; git pull; docker-compose up --build' diff --git a/.local/bin/invidious b/.local/bin/invidious deleted file mode 100755 index df2b1aa..0000000 --- a/.local/bin/invidious +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -tmux new -s 0 -d 'cd ~/.invid; git pull; docker-compose up --build' diff --git a/.local/bin/optiall b/.local/bin/optiall index dee782c..d94580c 100755 --- a/.local/bin/optiall +++ b/.local/bin/optiall @@ -1,5 +1,5 @@ #!/bin/sh fd -e pdf -x cpdfsqueeze {} {} -fd -e png -x oxipng {} -fd -e epub -e zip -x advzip -z4 {} -fd -e jpg -e jpeg -x jpegoptim {} +fd -e png -x oxipng +fd -e epub -e zip -x advzip -z4 +fd -e jpg -e jpeg -x jpegoptim diff --git a/.local/bin/optiflac b/.local/bin/optiflac index 7946b39..3c2295e 100755 --- a/.local/bin/optiflac +++ b/.local/bin/optiflac @@ -1,23 +1,22 @@ #!/bin/sh compare() { - for i in * - do - if [ `du "$i" | cut -f1` -lt `du ../"$i" | cut -f1` ] - then + cd out + for i in *; do + if [ `du "$i" | cut -f1` -lt `du ../"$i" | cut -f1` ]; then echo $i mv "$i" ../"$i" fi done + cd .. } mkdir out -ls *.flac | parallel ffmpeg -hide_banner -i {} -c:v copy -c:a flac -compression_level 12 $@ out/{} -cd out + +args="-af aresample=resampler=soxr:precision=32:dither_method=triangular -sample_fmt s16" +fd -e flac -d1 -x ffmpeg -hide_banner -i {} -c:v copy -c:a flac -compression_level 12 $args $@ out/{} compare -cd .. -cp *.flac out -cd out -ls | parallel flac -f -8 -V {} + +fd -e flac -d1 -x flac -f8 {} -o out/{} compare -cd .. + rm -r out diff --git a/.local/bin/symlinks b/.local/bin/symlinks index c0640d4..dc39c51 100755 --- a/.local/bin/symlinks +++ b/.local/bin/symlinks @@ -1,24 +1,6 @@ #!/usr/bin/fish for i in Documents Music Pictures Videos + rm ~/$i rmdir ~/$i ln -s $D/$i ~/$i end - -for i in '# This file is written by xdg-user-dirs-update -# If you want to change or add directories, just edit the line youre -# interested in. All local changes will be retained on the next run. -# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped -# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an -# absolute path. No other format is supported. -# -XDG_DESKTOP_DIR="$HOME/" -XDG_DOWNLOAD_DIR="$HOME/Downloads" -XDG_DOCUMENTS_DIR="/mnt/LocalDiskD/Documents" -XDG_MUSIC_DIR="/mnt/LocalDiskD/Music" -XDG_PICTURES_DIR="/mnt/LocalDiskD/Pictures" -XDG_VIDEOS_DIR="/mnt/LocalDiskD/Videos" -XDG_TEMPLATES_DIR="$HOME/" -XDG_PUBLICSHARE_DIR="$HOME/"' -echo $i > ~/.config/user-dirs.dir -end - diff --git a/.setup b/.setup index e12c23e..3796838 100755 --- a/.setup +++ b/.setup @@ -1,25 +1,26 @@ #!/bin/bash -sudo eopkg up -sudo eopkg it -c system.devel gnome=$(eval echo eog evolution-data-server file-roller gnome-{calendar,photos,mpv,terminal} nautilus onboard rhythmbox) sudo eopkg rm celluloid firefox $gnome hexchat libreoffice-common thunderbird transmission -audio="audacious audacious-plugins audacity opus-tools quodlibet spek" -dev="ccache docker-compose git-extras neovim openssh-server parallel solbuild tig tor upx" -gui="bleachbit caja engrampa goverlay keepassx kitty qutebrowser vorta" -media="feh gmic-gimp jpegoptim mpv playerctl usbmuxd rsync viewnior zathura-poppler" -rice="adapta-gtk-theme ant-dracula-gtk-theme devilspie2 font-ubuntu-ttf rofi starship stow" -term="advancecomp aria2 autojump fd fish fzf innoextract most ncdu p7zip ranger ripgrep rsync tmux" +sudo eopkg up +sudo eopkg it -c system.devel -sudo eopkg it $audio $dev $gui $media $rice $term +audio="audacious audacious-plugins audacity opus-tools quodlibet spek" +dev="ccache docker-compose git-extras neovim parallel solbuild tig tor upx" +gui="bleachbit caja engrampa goverlay keepassx kitty vorta" +media="feh gaupol gmic-gimp jpegoptim mpv playerctl usbmuxd rsync viewnior zathura-poppler" +rice="adapta-gtk-theme ant-dracula-gtk-theme devilspie2 font-ubuntu-ttf rofi starship stow" +term="advancecomp autojump fd fish fzf innoextract most ncdu p7zip ranger ripgrep rsync tmux" +web="arcanist aria2 deluge qutebrowser openssh-server speedtest-cli subliminal" + +sudo eopkg it $audio $dev $gui $media $rice $term $web sudo eopkg rm --ignore-dependency tracker pip3 install --user adblock pipipxx readability-lxml sh +parallel pipx install ::: deemix soundscrape tldr rm ~/.bashrc cd ~/.dotfiles -for i in `fd -E .git -t d -H`; do - mkdir -p ~/$i -done +fd -E .git -t d -H -x mkdir -p ~/{} stow . mkdir -p ~/.config/mpv/shaders && cd ~/.config/mpv/shaders && rm *