#!/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/*/
#!/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
#!/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
#!/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
#!/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
#!/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"
#!/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