📝 Many updates
This commit is contained in:
parent
2809ea08cf
commit
c10b15767a
7 changed files with 76 additions and 18 deletions
8
aliases
8
aliases
|
|
@ -145,7 +145,6 @@ alias wifi-down="doas ifconfig wlan0 down"
|
|||
alias letitsnow="doas docker start snowflake-proxy"
|
||||
alias snowfall="doas docker stop snowflake-proxy"
|
||||
alias snowlogs="doas docker logs -f snowflake-proxy"
|
||||
alias {lsc,lscommits}="tig"
|
||||
alias lxapp="lxappearance"
|
||||
alias hd="ncdu"
|
||||
# one of our most usful aliases (useful in conjunction with yank, awk, etc.):
|
||||
|
|
@ -207,7 +206,7 @@ alias hwclock="doas hwclock"
|
|||
alias kill9="killall -9" # kills process by name, e.g. kill9 cmus
|
||||
alias npm_upgrade="doas npm install --location=global npm@latest"
|
||||
alias {pacquery,pacgrep,pacq}="pacman -Q | grep $1"
|
||||
alias npm_list="find /usr/lib/node_modules -maxdepth 1 | sed -r 's/^\/usr\/lib\/node_modules\///g"
|
||||
alias npm_list="find /usr/lib/node_modules -maxdepth 1 | sed -r 's/^\/usr\/lib\/node_modules\///g'"
|
||||
# useful alias for recursively testing .test.js files on save
|
||||
alias jester="jest --watchAll"
|
||||
alias pip_upgrade="python -m pip install --upgrade pip"
|
||||
|
|
@ -272,7 +271,6 @@ alias cc="cc -Wall -Werror -Wextra"
|
|||
alias cprogrammingtags="ctags"
|
||||
alias vgrind="valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes -s"
|
||||
#create programming licences
|
||||
alias license="legit"
|
||||
|
||||
# game shortcuts
|
||||
# alias {cbpunk,cyberpunk}="steam steam://rungameid/1091500 &"
|
||||
|
|
@ -315,6 +313,10 @@ alias morningmark="librewolf https://twitter.com/MoringmarkMark &"
|
|||
alias nothingnew="librewolf https://nothingnew.com &"
|
||||
alias wamaundies="librewolf https://wamaunderwear.com &"
|
||||
|
||||
# Linux related
|
||||
alias elixir="librewolf https://exlir.bootlin.com/ &"
|
||||
alias lwn="librewolf https://lwn.net/ &"
|
||||
|
||||
# Podcasts (downloadable using yt-dlp or wget, and playable using mpv)
|
||||
alias {1up,1upsmanship}="librewolf https://www.iheart.com/podcast/1119-1upsmanship-97574019/ &"
|
||||
alias smallbeans="librewolf https://soundcloud.com/user-682532119 &"
|
||||
|
|
|
|||
|
|
@ -35,10 +35,13 @@ gg - go to top of the page
|
|||
shift + g - go to the bottom of the page
|
||||
ctrl u -page up
|
||||
ctrl d - page down
|
||||
|
||||
/ - forwards slash searches for the word/term you wish to jump to, just press enter once it is highlighted
|
||||
? - question mark searches for the word/term you wish to jump to, just press enter once it is highlighted
|
||||
n - jump to the next occurence of search term entered from / or ? (/ goes forwards in document, ? goes backwards in document)
|
||||
N - jump to the previous occurence of search term entered from / or ? (/ goes backwards in document, ? goes forwards in document)
|
||||
* - search for all occurences of the word under current cursor
|
||||
|
||||
:w - writes (my nneovim setup as autosave, but it's still a good feature to have)
|
||||
:q - quits neovim (first neovim command to learn)
|
||||
u - undoes last change (can be used with prepended numbers depending on how many steps you want to undo)
|
||||
|
|
|
|||
44
scripts/listargs
Executable file
44
scripts/listargs
Executable file
|
|
@ -0,0 +1,44 @@
|
|||
#!/usr/bin/env bash
|
||||
# interesting things found on stack overflow regarding listing arguments and
|
||||
# grabbing values of other arguments
|
||||
|
||||
# while getopts h x; do
|
||||
# echo "has -h";
|
||||
# done; OPTIND=0
|
||||
|
||||
# for ((i = 0; i < $#; i++)) ; do
|
||||
# case "$*" in
|
||||
# (-u) echo "Has -u";
|
||||
# break
|
||||
# esac
|
||||
# done
|
||||
|
||||
list=( agpl-3.0 bsd-2-clause bsd-3-clause mit )
|
||||
# echo "list of arguments ${list[0]}"
|
||||
for (( i = 0; i < ${#list[@]}; i++)) ; do
|
||||
if [[ "agpl-3.0" == "${list[$i]}" ]] ; then
|
||||
echo "yep"
|
||||
exit 0
|
||||
else
|
||||
echo "nope"
|
||||
fi
|
||||
done
|
||||
#
|
||||
# args=("$@")
|
||||
# for (( i=0; i < $#; i++)) ; do
|
||||
# j=$((i+1))
|
||||
# if [[ "${args[$i]}" == '-u' ]] ; then
|
||||
# echo "$i is equal -u"
|
||||
# echo "the following argument to -u is ${args[$j]}"
|
||||
# fi
|
||||
# echo "${!i} ${!j}"
|
||||
# done
|
||||
|
||||
# case "$*" in
|
||||
# (-u) echo "Has -u";;
|
||||
# esac
|
||||
|
||||
# for arg in "$@"
|
||||
# do
|
||||
# echo "argument is: $arg"
|
||||
# done
|
||||
|
|
@ -2,7 +2,10 @@
|
|||
|
||||
# A simple bookmarking alias used in conjunction with sdir and our $HOME/.aliases file to bookmark our current directory to be returned to later using rdir.
|
||||
|
||||
# grabs the current $sdir environment variable
|
||||
source $HOME/.zshrc
|
||||
# grabs the rc file of preferred shell (only works with bash and zsh currently)
|
||||
shellrc=.$(echo "$SHELL" | awk -F '/' '{ print $NF }')rc
|
||||
|
||||
cd $sdir && ls
|
||||
# grabs the current $sdir environment variable
|
||||
source "$HOME"/"$shellrc"
|
||||
|
||||
cd "$sdir" && ls
|
||||
|
|
|
|||
23
scripts/sdir
23
scripts/sdir
|
|
@ -1,23 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
# A simple bookmarking alias used in conjunction with rdir and our $HOME/.aliases file to bookmark our current directory to be returned to later using rdir.
|
||||
# make sure we don't overwrite our .shrc
|
||||
set -o noclobber
|
||||
# save our current working directory
|
||||
sdir=$(pwd)
|
||||
|
||||
# grabs the rc file of preferred shell (only works with bash and zsh currently)
|
||||
shellrc=.$(echo "$SHELL" | awk -F '/' '{ print $NF }')rc
|
||||
# grabs the last line of our .zshrc, and grabs the first word
|
||||
last_line_first_word=$(awk '{w=$1} END{print w}' $HOME/.zshrc)
|
||||
last_line_first_word=$(awk '{w=$1} END{print w}' "$HOME"/"$shellrc")
|
||||
|
||||
# if the last line of our rc file begins with "export"...
|
||||
# remove the last line of our rc file
|
||||
if [[ $last_line_first_word == "export" ]] ; then
|
||||
sed -i '$ d' $HOME/.zshrc
|
||||
sed -i '$ d' "$HOME"/"$shellrc"
|
||||
fi
|
||||
|
||||
# save our current working directory
|
||||
sdir=$(pwd)
|
||||
|
||||
# make sure we don't overwrite our .zshrc
|
||||
set -o noclobber
|
||||
|
||||
# and write that directory temporarily, appending it onto the end of our .zshrc
|
||||
echo 'export sdir='$sdir >> $HOME/.zshrc
|
||||
# and write that directory temporarily, appending it onto the end of our rc
|
||||
echo 'export sdir='"$sdir" >> "$HOME"/"$shellrc"
|
||||
# immediately source it to use it in this shell session
|
||||
source $HOME/.zshrc
|
||||
source "$HOME"/"$shellrc"
|
||||
|
|
|
|||
3
scripts/testman
Executable file
3
scripts/testman
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
groff -Tascii -man "$1" | less
|
||||
|
|
@ -192,3 +192,7 @@ doas pacman -S slop gifsicle libimage-exiftool-perl rebuild-detector keynav dvtm
|
|||
lowdown inotify-tools lynis socat diffstat
|
||||
|
||||
paru dtach sherlock-git
|
||||
|
||||
Install moreutils package (pretty awesome)
|
||||
|
||||
doas pacman -S moreutils
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue