]> git.armaanb.net Git - bin.git/commitdiff
add comments to the start of each file
authorArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Fri, 27 Nov 2020 22:23:12 +0000 (17:23 -0500)
committerArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Fri, 27 Nov 2020 22:23:12 +0000 (17:23 -0500)
fix-flatpak-theme
git-check
keyboard-swap
lolcat-gen
patch-zoom
system-setup
tweet-grab

index f42623a5dcacdc982ff3f66e3b93a2f5c7b6817c..0eea83952e2344697ac84f89cd9b8c524178b644 100755 (executable)
@@ -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/*/
index 0efbe2efdb031228065ec412faa926e900c6bf99..1175bdf4b041eed1891886cae9335b0a73a6ee9c 100755 (executable)
--- 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
index e1ec23b77da3c425d1d21af5ddac22e203628dee..ef4a75f96a846879eb61ea39721752a14536b7e8 100755 (executable)
@@ -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
index 03d70aa9c6f218d97e9fd02340c1e4c6a08ff764..00b60adfc8fa026ef5057f8d0b8072b669ff482a 100755 (executable)
@@ -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
index 7a7058a538145d598523651fd75b1e390a221c48..b619f6a6aaa381873f39770688ecccbe2ff1663a 100755 (executable)
@@ -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
index a835b2707c773ee05745e7677cef975d4f7bd6c4..2ab858e749fa5d0c930b7ed2e1f752f20016539d 100755 (executable)
@@ -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"
index 1d4fd9f7df7c28978019f822c6a61dc7e3244867..e6770a4fe11142b27c3c80b1daa9bfc5627cd76a 100755 (executable)
@@ -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