From d561366659c5aea1846f49d5186dd178058f7268 Mon Sep 17 00:00:00 2001 From: Phantop Date: Fri, 22 Jul 2022 14:35:17 -0400 Subject: [PATCH] General cleanup 9001 --- bashrc | 89 ---------------------------------------------------- bin/aliases | 2 +- bin/appdwarf | 1 - bin/clean | 2 +- bin/setup | 5 +-- bin/zippy | 6 ---- bin/zzexe | 1 - fish/bashrc | 10 ++++++ setup | 1 - 9 files changed, 15 insertions(+), 102 deletions(-) delete mode 100644 bashrc delete mode 120000 bin/appdwarf delete mode 100755 bin/zippy delete mode 120000 bin/zzexe create mode 100644 fish/bashrc delete mode 120000 setup diff --git a/bashrc b/bashrc deleted file mode 100644 index 3d79752..0000000 --- a/bashrc +++ /dev/null @@ -1,89 +0,0 @@ -eval "$(starship init bash)" -source /usr/share/autojump/autojump.bash -source /usr/share/defaults/etc/profile - -# Sensible Bash: https://github.com/mrzool/bash-sensible - -## GENERAL OPTIONS ## - -# Prevent file overwrite on stdout redirection -# Use `>|` to force redirection to an existing file -set -o noclobber - -# Update window size after every command -shopt -s checkwinsize - -# Automatically trim long paths in the prompt (requires Bash 4.x) -PROMPT_DIRTRIM=2 - -# Enable history expansion with space -# E.g. typing !! will replace the !! with your last command -bind Space:magic-space - -# Turn on recursive globbing (enables ** to recurse all directories) -shopt -s globstar 2> /dev/null - -# Case-insensitive globbing (used in pathname expansion) -shopt -s nocaseglob; - -## SMARTER TAB-COMPLETION (Readline bindings) ## - -# Perform file completion in a case insensitive fashion -bind "set completion-ignore-case on" - -# Treat hyphens and underscores as equivalent -bind "set completion-map-case on" - -# Display matches for ambiguous patterns at first tab press -bind "set show-all-if-ambiguous on" - -# Immediately add a trailing slash when autocompleting symlinks to directories -bind "set mark-symlinked-directories on" - -## SANE HISTORY DEFAULTS ## - -# Append to the history file, don't overwrite it -shopt -s histappend - -# Save multi-line commands as one command -shopt -s cmdhist - -# Huge history. Doesn't appear to slow things down, so why not? -HISTSIZE=500000 -HISTFILESIZE=100000 - -# Avoid duplicate entries -HISTCONTROL="erasedups:ignoreboth" - -# Don't record some commands -export HISTIGNORE="&:[ ]*:exit:ls:bg:fg:history:clear" - -# Use standard ISO 8601 timestamp -# %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/ -bind '"\e[A": history-search-backward' -bind '"\e[B": history-search-forward' -bind '"\e[C": forward-char' -bind '"\e[D": backward-char' - -## BETTER DIRECTORY NAVIGATION ## - -# Prepend cd to directory names automatically -shopt -s autocd 2> /dev/null -# Correct spelling errors during tab-completion -shopt -s dirspell 2> /dev/null -# Correct spelling errors in arguments supplied to cd -shopt -s cdspell 2> /dev/null - -# This allows you to bookmark your favorite places across the file system -# Define a variable containing a path and you will be able to cd into it regardless of the directory you're in -shopt -s cdable_vars - -#aliases -eval alias $(fish -c alias | cut -d' ' -f2- | sed 's/ /=/' | sed 's/(/$(/g' | sed 's/argv/@/g') -alias cd=cd diff --git a/bin/aliases b/bin/aliases index 8b05583..87602a8 100755 --- a/bin/aliases +++ b/bin/aliases @@ -16,7 +16,7 @@ a base64d 'echo (echo $argv | base64 -d 2>/dev/null) | tee /dev/stderr 2>| clip; a catbox 'curl https://catbox.moe/user/api.php -F reqtype=fileupload -F fileToUpload=@$argv;:' a clip 'xclip -sel clip' a cpugov 's cpupower frequency-set -g performance' -a dirdl 'wget -r -k -p --no-parent --no-clobber -e robots=off -R "index.html*"' +a dirdl 'wget -r -k -p -np -nc e robots=off' a dl 'not test "$argv" && cd ~/Downloads || aria2c -c -{j,s,x}16' a drivedl 'dl https://docs.google.com/uc?export=download&id=(echo $argv | cut -d/ -f6)&confirm=t' a dot 'cd ~/.dotfiles' diff --git a/bin/appdwarf b/bin/appdwarf deleted file mode 120000 index 17c31cb..0000000 --- a/bin/appdwarf +++ /dev/null @@ -1 +0,0 @@ -../../.appdwarf/appdwarf \ No newline at end of file diff --git a/bin/clean b/bin/clean index 90313d8..aa330c0 100755 --- a/bin/clean +++ b/bin/clean @@ -13,5 +13,5 @@ sudo solbuild delete-cache sudo rm -rf /var/lib/solbuild sudo solbuild init -p unstable-x86_64 sudo journalctl --vacuum-size=1K -bleachbit -c $(bleachbit -l|rg -v 'system.free_disk_space|transmission|system.memory|cookies') +bleachbit -c $(bleachbit -l|rg -v 'system.free_disk_space|system.memory') sudo bleachbit -c $(bleachbit -l|rg -v 'system.free_disk_space|system.memory') diff --git a/bin/setup b/bin/setup index c52d87a..a87ef0c 100755 --- a/bin/setup +++ b/bin/setup @@ -7,7 +7,7 @@ se rm $gnome firefox libreoffice-common onboard thunderbird dev="arcanist ccache git-extras llvm-clang neovim parallel qt-creator solbuild" gui="caja gimp keepassxc kitty nicotine-plus qutebrowser syncthing zathura-mupdf" -med="audaci{ty,ous{,-plugins}} avidemux mkvtoolnix mpv opus-tools spek yt-dlp" +med="audacity audacious avidemux mkvtoolnix mpv opus-tools spek yt-dlp" ric="ant-dracula-gtk-theme autojump font-ubuntu-ttf rofi starship sassc stow" tui="advancecomp aria2 fd fish fzf innoextract jpegoptim moreutils ncdu ripgrep tig" sys="bleachbit corectrl ifuse linux-tools-cpupower p7zip tlp usbmuxd upx tor" @@ -16,12 +16,13 @@ se up; se it -c system.devel $dev $gui $med $ric $sys $tui stow --no-folding -d ~/.dotfiles -t ~/.config . stow --no-folding -d ~/.dotfiles -t ~/.local/bin bin mkdir -p ~/.parallel/will-cite -echo source ~/.config/bashrc > ~/.bashrc +echo source ~/.config/fish/bashrc > ~/.bashrc ln -s ~/.config/gtk-3.0/gtkrc ~/.gtkrc-2.0 wget https://github.com/dracula/kitty/raw/master/dracula.conf -P ~/.config/kitty wget https://github.com/dracula/rofi/raw/master/theme/config2.rasi -P ~/.config/rofi wget https://github.com/savq/paq-nvim/raw/master/lua/paq.lua -P ~/.config/nvim/lua +wget https://github.com/mrzool/bash-sensible/raw/master/sensible.bash -P ~/.local/bin wget https://source.netsurf-browser.org/netsurf.git/plain/resources/adblock.css\ https://nitter.it/css/themes/dracula.css -P ~/.config/qutebrowser un(){ F=$(mktemp); mkdir -p "$2"; curl https://api.github.com/repos/"$1"/releases |\ diff --git a/bin/zippy b/bin/zippy deleted file mode 100755 index e064910..0000000 --- a/bin/zippy +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -data=$(curl -l "$1" | grep /d/) -base=$(echo "$1" | sed s/v/d/ | cut -d/ -f1-5) -num=$(echo "$data" | awk -F'[()]' '{print $4}'| bc) -name=$(echo "$data" | cut -d/ -f5) -aria2c "$base/$num/$name" diff --git a/bin/zzexe b/bin/zzexe deleted file mode 120000 index f4ee8ab..0000000 --- a/bin/zzexe +++ /dev/null @@ -1 +0,0 @@ -../../.appdwarf/zzexe \ No newline at end of file diff --git a/fish/bashrc b/fish/bashrc new file mode 100644 index 0000000..1474ef6 --- /dev/null +++ b/fish/bashrc @@ -0,0 +1,10 @@ +source /usr/share/autojump/autojump.bash +source /usr/share/defaults/etc/profile + +# Sensible Bash: https://github.com/mrzool/bash-sensible +source $(which sensible.bash) + +#aliases +eval alias $(fish -c alias | cut -d' ' -f2- | sed 's/ /=/' | sed 's/(/$(/g' | sed 's/argv/@/g') + +eval "$(starship init bash)" diff --git a/setup b/setup deleted file mode 120000 index d72aea2..0000000 --- a/setup +++ /dev/null @@ -1 +0,0 @@ -bin/setup \ No newline at end of file