mirror of https://github.com/Phantop/dotfiles
Large general cleanup of bin, functions, configs
This commit is contained in:
parent
3c857c5d5d
commit
7da33d7301
24
.bashrc
24
.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 <http://mrzool.cc>
|
||||
# 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
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
Type=Application
|
||||
Name=Invidious
|
||||
Description=
|
||||
Exec=fish -c invidious
|
||||
Exec=fish -c invid
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
function ta -w math
|
||||
tmux attach -t (math 0 + "0$argv")
|
||||
tmux a -t (math 0 + "0$argv")
|
||||
end
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
ao3
|
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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'`
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
optiflac -af aresample=resampler=soxr:precision=32:dither_method=triangular -sample_fmt s16 $@
|
|
@ -1 +0,0 @@
|
|||
invidious
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
tmux new -s 0 -d 'cd ~/.invid; git pull; docker-compose up --build'
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
tmux new -s 0 -d 'cd ~/.invid; git pull; docker-compose up --build'
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
25
.setup
25
.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 *
|
||||
|
|
Loading…
Reference in New Issue