From: Armaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me> Date: Fri, 27 Nov 2020 22:23:12 +0000 (-0500) Subject: add comments to the start of each file X-Git-Tag: v0.0.1~81 X-Git-Url: https://git.armaanb.net/?p=bin.git;a=commitdiff_plain;h=64ee05791a30734150cb2d2e1a80edb4dbb1a216 add comments to the start of each file --- diff --git a/fix-flatpak-theme b/fix-flatpak-theme index f42623a..0eea839 100755 --- a/fix-flatpak-theme +++ b/fix-flatpak-theme @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Copies your theme settings into the installed flatpaks # From https://github.com/abiosoft/dotfiles/blob/master/flatpak/fixflatpaktheme.sh for dir in "$HOME"/.var/app/*/ diff --git a/git-check b/git-check index 0efbe2e..1175bdf 100755 --- a/git-check +++ b/git-check @@ -1,15 +1,18 @@ #!/usr/bin/env bash +# Go into each subdirectory and run a git stat + for i in $(ls); do - cd $i || exit - if [[ -d .git ]]; then - echo $i - chars=${#i} - for (( i = 1; i < $chars; i++ )); do - echo -n "=" - done - echo "=" - git diff --stat - echo + if [[ -d $i/.git ]]; then + stat=$(git -C $i diff --stat) + if [[ -n $stat ]]; then + echo $i + chars=${#i} + for (( j = 0; j < $chars; j++ )); do + echo -n "=" + done + echo + git -C $i diff --stat + echo + fi fi - cd .. done diff --git a/keyboard-swap b/keyboard-swap index e1ec23b..ef4a75f 100755 --- a/keyboard-swap +++ b/keyboard-swap @@ -1,3 +1,6 @@ #!/usr/bin/env sh +# Swaps caps and control, then makes it so holding the old caps key acts as +# control and tapping it as escape + setxkbmap -option "ctrl:swapcaps" xcape diff --git a/lolcat-gen b/lolcat-gen index 03d70aa..00b60ad 100755 --- a/lolcat-gen +++ b/lolcat-gen @@ -1,9 +1,10 @@ #!/usr/bin/env bash -# Generates lolcated logo and fortune for my shell rc +# Generates lolcated logo for my shell rc [[ -d ~/.local/share/zsh/lolcat/ ]] || mkdir -p ~/.local/share/zsh/lolcat rm -rf ~/.local/share/zsh/lolcat/* for (( i = 0; i < $1 ; i++ )); do cat ~/Code/personal-logo/ascii/ascii-small-white | lolcat --force > ~/.local/share/zsh/lolcat/$i + echo -ne "$i/$1 done" \\r done diff --git a/patch-zoom b/patch-zoom index 7a7058a..b619f6a 100755 --- a/patch-zoom +++ b/patch-zoom @@ -1,5 +1,6 @@ #!/usr/bin/env bash # From https://hashman.ca/zoom/. Patches a zoom .deb to remove the ibus dependency + scratch=/tmp/patch-zoom rm -rf $scratch mkdir $scratch diff --git a/system-setup b/system-setup index a835b27..2ab858e 100755 --- a/system-setup +++ b/system-setup @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# Installs some of my favorite programs on a debian unstable system +# Arch makes this MUCH easier with the AUR cmd_update="sudo apt update && sudo apt upgrade -y" cmd_install="sudo apt install -y" diff --git a/tweet-grab b/tweet-grab index 1d4fd9f..e6770a4 100755 --- a/tweet-grab +++ b/tweet-grab @@ -1,8 +1,12 @@ #!/usr/bin/env sh -# Grabs tweets and writes them to a file +# Grabs tweets and writes them to a file. Avoids using the twitter API by +# scrapping nitter.net (or any other nitter instance) which can easily be +# scraped, unlike the intentionally crippled twitter.com. See the output of +# this script at https://ishaan.bhojwani.org FILE=/root/tweets/index.html LOGFILE=/root/tweets/cron.log + > $FILE curl https://nitter.net/keshinko | grep tweet-content | head -n 1 | sed -e 's/<[^>]*>//g' -e 's/^[ \t]*\(.*$\)/\1/' >> $FILE tail -n 1000 $LOGFILE > $LOGFILE