From 06bbae9998ad0dc8bd146ca04d82b6e9a04f23e8 Mon Sep 17 00:00:00 2001
From: LORDBABUINO
Date: Tue, 18 Dec 2018 21:09:48 +0000
Subject: [PATCH 01/39] Fix style when showing full weather report
---
.scripts/statusbar/weather | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.scripts/statusbar/weather b/.scripts/statusbar/weather
index a6c8d751..4b7bbb6e 100755
--- a/.scripts/statusbar/weather
+++ b/.scripts/statusbar/weather
@@ -3,7 +3,7 @@
location=""
case $BLOCK_BUTTON in
- 1) $TERMINAL -e less -S ~/.weatherreport ;;
+ 1) $TERMINAL -e less -Srf ~/.weatherreport ;;
3) pgrep -x dunst >/dev/null && notify-send "🌈 Weather module:
- Click for wttr.in forecast.
☔: Chance of rain/snow
From 441cef8ada8841500983210fafd43ab69de09914 Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Sat, 22 Dec 2018 19:26:02 -0500
Subject: [PATCH 02/39] shortcut sourcing now non-automatic
---
.bashrc | 8 +++-----
.config/ranger/rc.conf | 3 +++
.config/ranger/shortcuts.conf | 0
.scripts/tools/shortcuts | 22 +++-------------------
4 files changed, 9 insertions(+), 24 deletions(-)
create mode 100644 .config/ranger/shortcuts.conf
diff --git a/.bashrc b/.bashrc
index 2040b2ee..1bf2cb97 100644
--- a/.bashrc
+++ b/.bashrc
@@ -9,11 +9,9 @@ stty -ixon # Disable ctrl-s and ctrl-q.
shopt -s autocd #Allows you to cd into directory merely by typing the directory name.
HISTSIZE= HISTFILESIZE= # Infinite history.
-# Setting Bash prompt. Capitalizes username and host if root user (my root user uses this same config file).
-if [ "$EUID" -ne 0 ]
- then export PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \[$(tput setaf 5)\]\W\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]"
- else export PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\[$(tput setaf 3)\]ROOT\[$(tput setaf 2)\]@\[$(tput setaf 4)\]$(hostname | awk '{print toupper($0)}') \[$(tput setaf 5)\]\W\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]"
-fi
+export PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \[$(tput setaf 5)\]\W\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]"
+
+[ -f "$HOME/.shortcuts" ] && source "$HOME/.shortcuts" # Load shortcut aliases
export GPG_TTY=$(tty)
diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf
index 9e67b37b..ecd73731 100644
--- a/.config/ranger/rc.conf
+++ b/.config/ranger/rc.conf
@@ -515,3 +515,6 @@ map Tn eval fm.open_console('shell eyeD3 -n "" ' + fm.thisfile.relative_path, po
#Downloading
map ytv console shell youtube-dl -ic%space
map yta console shell youtube-dl -xic%space
+
+# Source shortcuts
+source ~/.config/ranger/shortcuts.conf
diff --git a/.config/ranger/shortcuts.conf b/.config/ranger/shortcuts.conf
new file mode 100644
index 00000000..e69de29b
diff --git a/.scripts/tools/shortcuts b/.scripts/tools/shortcuts
index 5ccb114b..9a4ded2c 100755
--- a/.scripts/tools/shortcuts
+++ b/.scripts/tools/shortcuts
@@ -1,12 +1,4 @@
#!/bin/bash
-
-# Shell rc file (i.e. bash vs. zsh, etc.)
-shellrc="$HOME/.bashrc"
-
-# Bookmark file locations
-bmdirs="$HOME/.bmdirs"
-bmfiles="$HOME/.bmfiles"
-
# Output locations. Unactivated progs should go to /dev/null.
shell_shortcuts="$HOME/.shortcuts"
ranger_shortcuts="$HOME/.config/ranger/shortcuts.conf"
@@ -15,24 +7,16 @@ fish_shortcuts="/dev/null"
# Remove, prepare files
rm -f "$ranger_shortcuts" "$qute_shortcuts" 2>/dev/null
-#echo "abbr \\" > "$fish_shortcuts"
+echo "abbr \\" > "$fish_shortcuts"
echo "alias \\" > "$shell_shortcuts"
-# Ensure text of argument 1 exists in the file argument 2
-ensure() { (grep "$1" "$2")>/dev/null 2>&1 || echo "$1" >> "$2" ;}
-
-ensure "source $shell_shortcuts" "$shellrc"
-ensure "source $HOME/.config/ranger/shortcuts.conf" "$HOME/.config/ranger/rc.conf"
-#ensure "config.source('shortcuts.py')" "$HOME/.config/qutebrowser/config.py"
-#ensure "source $HOME/.config/fish/shortcuts.fish" "$HOME/.config/fish/config.fish"
-
# Format the `bmdirs` file in the correct syntax and sent it to all three configs.
-sed "s/#.*$//;/^$/d" "$bmdirs" | tee >(awk '{print $1"=\"cd "$2" && ls -a\" \\"}' >> "$shell_shortcuts") \
+sed "s/\s*#.*$//;/^\s*$/d" "$HOME/.bmdirs" | tee >(awk '{print $1"=\"cd "$2" && ls -a\" \\"}' >> "$shell_shortcuts") \
>(awk '{print $1, "\"cd " $2 "; and ls -a\" \\"}' >> "$fish_shortcuts") \
>(awk '{print "config.bind(\";"$1"\", \"set downloads.location.directory "$2" ;; hint links download\")"}' >> "$qute_shortcuts") \
| awk '{print "map g"$1" cd "$2"\nmap t"$1" tab_new "$2"\nmap m"$1" shell mv -v %s "$2"\nmap Y"$1" shell cp -rv %s "$2}' >> "$ranger_shortcuts"
# Format the `configs` file in the correct syntax and sent it to both configs.
-sed "s/#.*$//;/^$/d" "$bmfiles" | tee >(awk '{print $1"=\"$EDITOR "$2"\" \\"}' >> "$shell_shortcuts") \
+sed "s/\s*#.*$//;/^$\s*/d" "$HOME/.bmfiles" | tee >(awk '{print $1"=\"$EDITOR "$2"\" \\"}' >> "$shell_shortcuts") \
>(awk '{print $1, "\"$EDITOR "$2"\" \\"}' >> "$fish_shortcuts") \
| awk '{print "map "$1" shell $EDITOR "$2}' >> "$ranger_shortcuts"
From 9b353a51481a87b53376b78d47a0110bcb7facc7 Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Sat, 22 Dec 2018 19:39:14 -0500
Subject: [PATCH 03/39] brainlethood fixed
---
.scripts/tools/shortcuts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.scripts/tools/shortcuts b/.scripts/tools/shortcuts
index 9a4ded2c..0ec0463e 100755
--- a/.scripts/tools/shortcuts
+++ b/.scripts/tools/shortcuts
@@ -17,6 +17,6 @@ sed "s/\s*#.*$//;/^\s*$/d" "$HOME/.bmdirs" | tee >(awk '{print $1"=\"cd "$2" &&
| awk '{print "map g"$1" cd "$2"\nmap t"$1" tab_new "$2"\nmap m"$1" shell mv -v %s "$2"\nmap Y"$1" shell cp -rv %s "$2}' >> "$ranger_shortcuts"
# Format the `configs` file in the correct syntax and sent it to both configs.
-sed "s/\s*#.*$//;/^$\s*/d" "$HOME/.bmfiles" | tee >(awk '{print $1"=\"$EDITOR "$2"\" \\"}' >> "$shell_shortcuts") \
+sed "s/\s*#.*$//;/^\s*$/d" "$HOME/.bmfiles" | tee >(awk '{print $1"=\"$EDITOR "$2"\" \\"}' >> "$shell_shortcuts") \
>(awk '{print $1, "\"$EDITOR "$2"\" \\"}' >> "$fish_shortcuts") \
| awk '{print "map "$1" shell $EDITOR "$2}' >> "$ranger_shortcuts"
From 6dc4bec778148cf4a53939dfdf4fea91c476febd Mon Sep 17 00:00:00 2001
From: Anders Damsgaard
Date: Sun, 23 Dec 2018 17:30:42 +0100
Subject: [PATCH 04/39] Add option to mirror displays with external resolution
priority
---
.scripts/i3cmds/displayselect | 37 ++++++++++++++++++++++++++++++-----
1 file changed, 32 insertions(+), 5 deletions(-)
diff --git a/.scripts/i3cmds/displayselect b/.scripts/i3cmds/displayselect
index c5f751a2..3ffc4f38 100755
--- a/.scripts/i3cmds/displayselect
+++ b/.scripts/i3cmds/displayselect
@@ -6,11 +6,38 @@
# I plan on adding a routine from multi-monitor setups later.
twoscreen() { # If multi-monitor is selected and there are two screens.
- primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
- secondary=$(echo "$screens" | grep -v "$primary")
- direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
- xrandr --output "$primary" --auto --output "$secondary" --"$direction"-of "$primary" --auto
- }
+
+ mirror=$(printf "no\\nyes" | dmenu -i -p "Mirror displays?")
+ # Mirror displays using native resolution of external display and a scaled
+ # version for the internal display
+ if [ "$mirror" = "yes" ]; then
+ external=$(echo "$screens" | dmenu -i -p "Select external display:")
+ internal=$(echo "$screens" | grep -v "$external")
+
+ res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \
+ tail -n 1 | awk '{print $1}')
+ res_internal=$(xrandr --query | sed -n "/^$internal/,/\+/p" | \
+ tail -n 1 | awk '{print $1}')
+
+ res_ext_x=$(echo $res_external | sed 's/x.*//')
+ res_ext_y=$(echo $res_external | sed 's/.*x//')
+ res_int_x=$(echo $res_internal | sed 's/x.*//')
+ res_int_y=$(echo $res_internal | sed 's/.*x//')
+
+ scale_x=$(echo "$res_ext_x / $res_int_x" | bc -l)
+ scale_y=$(echo "$res_ext_y / $res_int_y" | bc -l)
+
+ xrandr --output "$external" --auto \
+ --output "$internal" --auto --same-as "$external" \
+ --scale "$scale_x"x"$scale_y"
+ else
+
+ primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
+ secondary=$(echo "$screens" | grep -v "$primary")
+ direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
+ xrandr --output "$primary" --auto --output "$secondary" --"$direction"-of "$primary" --auto
+ fi
+ }
morescreen() { # If multi-monitor is selected and there are more than two screens.
primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
From d1aea08dd62b46786f132f98e1398a40e0d1b6b5 Mon Sep 17 00:00:00 2001
From: Anders Damsgaard
Date: Sun, 23 Dec 2018 17:51:28 +0100
Subject: [PATCH 05/39] Make sure native scaling is restored when selecting
single display
---
.scripts/i3cmds/displayselect | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.scripts/i3cmds/displayselect b/.scripts/i3cmds/displayselect
index 3ffc4f38..9822b12e 100755
--- a/.scripts/i3cmds/displayselect
+++ b/.scripts/i3cmds/displayselect
@@ -65,7 +65,7 @@ chosen=$(printf "%s\\nmulti-monitor\\nmanual selection" "$screens" | dmenu -i -p
case "$chosen" in
"manual selection") arandr ; exit ;;
"multi-monitor") multimon ;;
- *) xrandr --output "$chosen" --auto $(echo "$screens" | grep -v "$chosen" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
+ *) xrandr --output "$chosen" --auto --scale 1.0x1.0 $(echo "$screens" | grep -v "$chosen" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
esac
# Fix feh background if screen size/arangement has changed.
From 8891e7d099f299fe47f4c19d340a9e0751d57077 Mon Sep 17 00:00:00 2001
From: Tom Jansen
Date: Sun, 23 Dec 2018 18:07:16 +0100
Subject: [PATCH 06/39] add vfat support to dmenumount
---
.scripts/i3cmds/dmenumount | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/.scripts/i3cmds/dmenumount b/.scripts/i3cmds/dmenumount
index 431141ff..661a5245 100755
--- a/.scripts/i3cmds/dmenumount
+++ b/.scripts/i3cmds/dmenumount
@@ -19,7 +19,12 @@ mountusb() { \
chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')"
sudo -A mount "$chosen" && notify-send "$chosen mounted." && exit 0
getmount "/mnt /media /mount /home -maxdepth 5 -type d"
- sudo -A mount "$chosen" "$mp" && notify-send "$chosen mounted to $mp."
+ partitiontype="$(lsblk -no "fstype" "$chosen")"
+ case "$partitiontype" in
+ "vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;;
+ *) sudo -A mount "$chosen" "$mp";;
+ esac
+ notify-send "$chosen mounted to $mp."
}
mountandroid() { \
From 4dcd3d8de61c99d6db8ff6c73d1297fd1a0d894a Mon Sep 17 00:00:00 2001
From: Anders Damsgaard
Date: Sun, 23 Dec 2018 19:11:22 +0100
Subject: [PATCH 07/39] Enforce native scale for xrandr commands
---
.scripts/i3cmds/displayselect | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.scripts/i3cmds/displayselect b/.scripts/i3cmds/displayselect
index 9822b12e..0bd612ec 100755
--- a/.scripts/i3cmds/displayselect
+++ b/.scripts/i3cmds/displayselect
@@ -11,7 +11,7 @@ twoscreen() { # If multi-monitor is selected and there are two screens.
# Mirror displays using native resolution of external display and a scaled
# version for the internal display
if [ "$mirror" = "yes" ]; then
- external=$(echo "$screens" | dmenu -i -p "Select external display:")
+ external=$(echo "$screens" | dmenu -i -p "Optimize resolution for:")
internal=$(echo "$screens" | grep -v "$external")
res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \
@@ -27,7 +27,7 @@ twoscreen() { # If multi-monitor is selected and there are two screens.
scale_x=$(echo "$res_ext_x / $res_int_x" | bc -l)
scale_y=$(echo "$res_ext_y / $res_int_y" | bc -l)
- xrandr --output "$external" --auto \
+ xrandr --output "$external" --auto --scale 1.0x1.0 \
--output "$internal" --auto --same-as "$external" \
--scale "$scale_x"x"$scale_y"
else
@@ -35,7 +35,7 @@ twoscreen() { # If multi-monitor is selected and there are two screens.
primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
secondary=$(echo "$screens" | grep -v "$primary")
direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
- xrandr --output "$primary" --auto --output "$secondary" --"$direction"-of "$primary" --auto
+ xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction"-of "$primary" --auto --scale 1.0x1.0
fi
}
From 7bcac0476ab50d719c0b2e2469871a85760ab08f Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Thu, 27 Dec 2018 18:29:48 -0500
Subject: [PATCH 08/39] browser fix
---
.scripts/tools/dmenuhandler | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.scripts/tools/dmenuhandler b/.scripts/tools/dmenuhandler
index f00178b7..9da9d57e 100755
--- a/.scripts/tools/dmenuhandler
+++ b/.scripts/tools/dmenuhandler
@@ -8,7 +8,7 @@ case "$(printf "copy url\\nmpv\\nmpv (loop)\\nqueue download\\n\\nqueue youtube-
"mpv (loop)") setsid mpv -quiet --loop "$1" >/dev/null 2>&1 & ;;
"queue download") tsp curl -LO "$1" >/dev/null 2>&1 ;;
"queue youtube-dl") tsp youtube-dl --write-metadata -ic "$1" >/dev/null 2>&1 ;;
- browser) setsid "$TRUEBROWSER" "$1" >/dev/null 2>&1 & ;;
+ browser) setsid "$BROWSER" "$1" >/dev/null 2>&1 & ;;
feh) setsid feh "$1" >/dev/null 2>&1 & ;;
w3m) w3m "$1" >/dev/null 2>&1 ;;
"mpv (float)") setsid mpv --geometry=+0-0 --autofit=30% --title="mpvfloat" "$1" >/dev/null 2>&1 & ;;
From a9b704812763fdc536de9a3fcc624c6fa893d9a5 Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Thu, 27 Dec 2018 18:30:45 -0500
Subject: [PATCH 09/39] tutorials if null
---
.scripts/i3cmds/tutorialvids | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.scripts/i3cmds/tutorialvids b/.scripts/i3cmds/tutorialvids
index 2743bfc4..1449cbe7 100755
--- a/.scripts/i3cmds/tutorialvids
+++ b/.scripts/i3cmds/tutorialvids
@@ -15,4 +15,4 @@ urlview https://www.youtube.com/watch?v=IgzpAjFgbCw
colorschemes with pywal https://www.youtube.com/watch?v=Es79N_9BblE
vi mode in shell https://www.youtube.com/watch?v=GqoJQft5R2E
"
-mpv "$(echo "$vidlist" | grep -P "^$(echo "$vidlist" | grep "https:" | sed 's/\t.*//g' | dmenu -i -p "Learn about what? (ESC to cancel)" -l 5 | awk '{print $1}')\s" | sed 's/.*\t//')"
+echo "$vidlist" | grep -P "^$(echo "$vidlist" | grep "https:" | sed 's/\t.*//g' | dmenu -i -p "Learn about what? (ESC to cancel)" -l 20 | awk '{print $1}')\s" | sed 's/.*\t//' | xargs -r mpv
From 9386a5bf600e4a1b193facd619302615d80a97d5 Mon Sep 17 00:00:00 2001
From: MateuszOkulus
Date: Fri, 28 Dec 2018 18:05:28 +0100
Subject: [PATCH 10/39] fix showclip
---
.scripts/i3cmds/showclip | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.scripts/i3cmds/showclip b/.scripts/i3cmds/showclip
index 57644870..9f8a6b9c 100755
--- a/.scripts/i3cmds/showclip
+++ b/.scripts/i3cmds/showclip
@@ -9,7 +9,7 @@ clip=$(xclip -o -selection clipboard)
prim=$(xclip -o -selection primary)
-[ "$prim" != "" ] && notify-send "Clipboard:
+[ "$clip" != "" ] && notify-send "Clipboard:
$clip"
-[ "$clip" != "" ] && notify-send "Primary:
+[ "$prim" != "" ] && notify-send "Primary:
$prim"
From e6f6a83082551692770f6c83c2112fb2a2f961ea Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Sun, 30 Dec 2018 18:40:57 -0500
Subject: [PATCH 11/39] own mounted drives
---
.scripts/i3cmds/dmenumount | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.scripts/i3cmds/dmenumount b/.scripts/i3cmds/dmenumount
index 661a5245..4de7438f 100755
--- a/.scripts/i3cmds/dmenumount
+++ b/.scripts/i3cmds/dmenumount
@@ -22,7 +22,7 @@ mountusb() { \
partitiontype="$(lsblk -no "fstype" "$chosen")"
case "$partitiontype" in
"vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;;
- *) sudo -A mount "$chosen" "$mp";;
+ *) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" 741 "$mp";;
esac
notify-send "$chosen mounted to $mp."
}
From 2e8fa83f194855e000acac051fdaba9fa5cbd857 Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Sun, 30 Dec 2018 18:41:34 -0500
Subject: [PATCH 12/39] bash only run bashrc
---
.profile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.profile b/.profile
index a26b4cea..0fbcc8e5 100644
--- a/.profile
+++ b/.profile
@@ -25,10 +25,10 @@ export LESS_TERMCAP_ue=$'\E[0m' # reset underline
[ ! -f ~/.shortcuts ] && shortcuts >/dev/null 2>&1
-[ -f ~/.bashrc ] && source "$HOME/.bashrc"
+echo "$0" | grep "bash$" >/dev/null && [ -f ~/.bashrc ] && source "$HOME/.bashrc"
# Start graphical server if i3 not already running.
[ "$(tty)" = "/dev/tty1" ] && ! pgrep -x i3 >/dev/null && exec startx
-# Switch escape and caps and use wal colors if tty:
+# Switch escape and caps if tty:
sudo -n loadkeys ~/.scripts/ttymaps.kmap 2>/dev/null
From 690cad2bfaa36e2eaa213be1ede89c25ef9daa44 Mon Sep 17 00:00:00 2001
From: Laith
Date: Tue, 1 Jan 2019 23:07:33 +0100
Subject: [PATCH 13/39] fixing typos
---
.scripts/i3cmds/dmenurecord | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/.scripts/i3cmds/dmenurecord b/.scripts/i3cmds/dmenurecord
index d5ed889f..7f0ea72a 100755
--- a/.scripts/i3cmds/dmenurecord
+++ b/.scripts/i3cmds/dmenurecord
@@ -52,7 +52,7 @@ video() { ffmpeg \
}
webcamhidef() { ffmpeg \
- -f v412 \
+ -f v4l2 \
-i /dev/video0 \
-video_size 1920x1080 \
"$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" &
@@ -61,7 +61,7 @@ webcamhidef() { ffmpeg \
}
webcam() { ffmpeg \
- -f v412 \
+ -f v4l2 \
-i /dev/video0 \
-video_size 640x480 \
"$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" &
@@ -85,8 +85,8 @@ askrecording() { \
screencast) screencast;;
audio) audio;;
video) video;;
- webcam) webcamrecord;;
- "webcam (hi-def)") webcamrecord;;
+ webcam) webcam;;
+ "webcam (hi-def)") webcamhidef;;
esac
}
From c347e748c98d6a7161d176aa11297f9280d86de3 Mon Sep 17 00:00:00 2001
From: Laith
Date: Wed, 2 Jan 2019 02:54:34 +0100
Subject: [PATCH 14/39] Change TRUEBROWSER to BROWSER
---
.scripts/tools/linkhandler | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.scripts/tools/linkhandler b/.scripts/tools/linkhandler
index 4f364fcb..abd6f0a8 100755
--- a/.scripts/tools/linkhandler
+++ b/.scripts/tools/linkhandler
@@ -10,7 +10,7 @@
scihub="http://sci-hub.tw/"
# If no url given. Opens browser. For using script as $BROWSER.
-[ -z "$1" ] && { "$TRUEBROWSER"; exit; }
+[ -z "$1" ] && { "$BROWSER"; exit; }
case "$1" in
*mkv|*webm|*mp4|*gif|*youtube.com*|*youtu.be*|*hooktube.com*|*bitchute.com*)
@@ -23,5 +23,5 @@ case "$1" in
setsid curl -sO "$(curl -s "$scihub$*" | grep -Po "(?<=location.href=').+.pdf")" >/dev/null 2>&1 & ;;
*)
if [ -f "$1" ]; then "$TERMINAL" -e "$EDITOR $1"
- else setsid "$TRUEBROWSER" "$1" >/dev/null 2>&1 & fi ;;
+ else setsid "$BROWSER" "$1" >/dev/null 2>&1 & fi ;;
esac
From 6f87d56cd8079d08aa2ab9496084e5c30978f955 Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Wed, 2 Jan 2019 10:47:27 -0500
Subject: [PATCH 15/39] profile changes
---
.profile | 5 ++--
.vim/autoload/plug.vim | 61 ------------------------------------------
2 files changed, 2 insertions(+), 64 deletions(-)
diff --git a/.profile b/.profile
index 0fbcc8e5..0a2c6fd1 100644
--- a/.profile
+++ b/.profile
@@ -2,16 +2,15 @@
# Profile file. Runs on login.
# Adds `~/.scripts` and all subdirectories to $PATH
-export PATH="$(du "$HOME/.scripts/" | cut -f2 | tr '\n' ':')$PATH"
+export PATH="$PATH:$(du "$HOME/.scripts/" | cut -f2 | tr '\n' ':')"
export EDITOR="vim"
export TERMINAL="st"
export BROWSER="firefox"
export READER="zathura"
export BIB="$HOME/Documents/LaTeX/uni.bib"
export REFER="$HOME/.referbib"
-# PIX is here I have LARBS keep icons. Subject to change, hence a variable.
-export PIX="$HOME/.scripts/pix"
export SUDO_ASKPASS="$HOME/.scripts/tools/dmenupass"
+export PIX="$HOME/.pix/"
# less/man colors
export LESS=-R
diff --git a/.vim/autoload/plug.vim b/.vim/autoload/plug.vim
index 4e056308..ace33a88 100644
--- a/.vim/autoload/plug.vim
+++ b/.vim/autoload/plug.vim
@@ -1,66 +1,5 @@
-" vim-plug: Vim plugin manager
-" ============================
-"
-" Download plug.vim and put it in ~/.vim/autoload
-"
-" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
-" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
-"
-" Edit your .vimrc
-"
-" call plug#begin('~/.vim/plugged')
-"
-" " Make sure you use single quotes
-"
-" " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
-" Plug 'junegunn/vim-easy-align'
-"
-" " Any valid git URL is allowed
-" Plug 'https://github.com/junegunn/vim-github-dashboard.git'
-"
-" " Multiple Plug commands can be written in a single line using | separators
-" Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
-"
-" " On-demand loading
-" Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
-" Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
-"
-" " Using a non-master branch
-" Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
-"
-" " Using a tagged release; wildcard allowed (requires git 1.9.2 or above)
-" Plug 'fatih/vim-go', { 'tag': '*' }
-"
-" " Plugin options
-" Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
-"
-" " Plugin outside ~/.vim/plugged with post-update hook
-" Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
-"
-" " Unmanaged plugin (manually installed and updated)
-" Plug '~/my-prototype-plugin'
-"
-" " Initialize plugin system
-" call plug#end()
-"
-" Then reload .vimrc and :PlugInstall to install plugins.
-"
-" Plug options:
-"
-"| Option | Description |
-"| ----------------------- | ------------------------------------------------ |
-"| `branch`/`tag`/`commit` | Branch/tag/commit of the repository to use |
-"| `rtp` | Subdirectory that contains Vim plugin |
-"| `dir` | Custom directory for the plugin |
-"| `as` | Use different name for the plugin |
-"| `do` | Post-update hook (string or funcref) |
-"| `on` | On-demand loading: Commands or ``-mappings |
-"| `for` | On-demand loading: File types |
-"| `frozen` | Do not update unless explicitly specified |
-"
" More information: https://github.com/junegunn/vim-plug
"
-"
" Copyright (c) 2017 Junegunn Choi
"
" MIT License
From a35d089ec6c92dc4d5d0563f3fc0e144380045dc Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Wed, 2 Jan 2019 11:04:07 -0500
Subject: [PATCH 16/39] weather signal fix
---
.config/i3blocks/config | 1 +
1 file changed, 1 insertion(+)
diff --git a/.config/i3blocks/config b/.config/i3blocks/config
index fbfb938f..89e3c1b7 100644
--- a/.config/i3blocks/config
+++ b/.config/i3blocks/config
@@ -28,6 +28,7 @@ signal=7
[weather]
interval=3600
+signal=5
[mailbox]
label=📬
From 07364aeaca6fae238d0569932829247388d5102b Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Wed, 2 Jan 2019 11:06:15 -0500
Subject: [PATCH 17/39] recording files moved to /tmp/ for cleanliness
---
.config/i3blocks/config | 2 +-
.scripts/i3cmds/dmenurecord | 18 +++++++++---------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/.config/i3blocks/config b/.config/i3blocks/config
index 89e3c1b7..980d7910 100644
--- a/.config/i3blocks/config
+++ b/.config/i3blocks/config
@@ -3,7 +3,7 @@ separator_block_width=15
markup=pango
[record]
-command=cat ~/.recordingicon
+command=cat /tmp/recordingicon
interval=once
signal=9
diff --git a/.scripts/i3cmds/dmenurecord b/.scripts/i3cmds/dmenurecord
index 7f0ea72a..0047e7a0 100755
--- a/.scripts/i3cmds/dmenurecord
+++ b/.scripts/i3cmds/dmenurecord
@@ -10,15 +10,15 @@
# If there is already a running instance, user will be prompted to end it.
updateicon() { \
- echo "$1" > ~/.recordingicon
+ echo "$1" > /tmp/recordingicon
pkill -RTMIN+9 i3blocks
}
killrecording() {
- recpid="$(cat ~/.recordingpid)"
+ recpid="$(cat /tmp/recordingpid)"
# kill with SIGTERM, allowing finishing touches.
kill -15 "$recpid"
- rm -f ~/.recordingpid
+ rm -f /tmp/recordingpid
updateicon ""
pkill -RTMIN+9 i3blocks
# even after SIGTERM, ffmpeg may still run, so SIGKILL it.
@@ -37,7 +37,7 @@ screencast() { \
-r 30 \
-c:v libx264rgb -crf 0 -preset ultrafast -c:a flac \
"$HOME/screencast-$(date '+%y%m%d-%H%M-%S').mkv" &
- echo $! > ~/.recordingpid
+ echo $! > /tmp/recordingpid
updateicon "⏺️🎙️"
}
@@ -47,7 +47,7 @@ video() { ffmpeg \
-i :0.0 \
-c:v libx264 -qp 0 -r 30 \
"$HOME/video-$(date '+%y%m%d-%H%M-%S').mkv" &
- echo $! > ~/.recordingpid
+ echo $! > /tmp/recordingpid
updateicon "⏺️"
}
@@ -56,7 +56,7 @@ webcamhidef() { ffmpeg \
-i /dev/video0 \
-video_size 1920x1080 \
"$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" &
- echo $! > ~/.recordingpid
+ echo $! > /tmp/recordingpid
updateicon "🎥"
}
@@ -65,7 +65,7 @@ webcam() { ffmpeg \
-i /dev/video0 \
-video_size 640x480 \
"$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" &
- echo $! > ~/.recordingpid
+ echo $! > /tmp/recordingpid
updateicon "🎥"
}
@@ -75,7 +75,7 @@ audio() { \
-f alsa -i default \
-c:a flac \
"$HOME/audio-$(date '+%y%m%d-%H%M-%S').flac" &
- echo $! > ~/.recordingpid
+ echo $! > /tmp/recordingpid
updateicon "🎙️"
}
@@ -101,5 +101,5 @@ case "$1" in
audio) audio;;
video) video;;
kill) killrecording;;
- *) ([ -f ~/.recordingpid ] && asktoend && exit) || askrecording;;
+ *) ([ -f /tmp/recordingpid ] && asktoend && exit) || askrecording;;
esac
From 4bab39ad70cb5f5cabad3ee647c4072d0129b7a7 Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Wed, 2 Jan 2019 11:09:31 -0500
Subject: [PATCH 18/39] weather report also moved to /tmp/
---
.scripts/cron/getforecast | 2 +-
.scripts/statusbar/weather | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.scripts/cron/getforecast b/.scripts/cron/getforecast
index 2760c893..25386d45 100755
--- a/.scripts/cron/getforecast
+++ b/.scripts/cron/getforecast
@@ -2,5 +2,5 @@
# Updates weather forecast
ping -q -w 1 -c 1 "$(ip r | grep default | tail -1 | cut -d ' ' -f 3)" >/dev/null || exit
location="$1"; [ -z "$location" ] || location="$location+"
-curl -s "wttr.in/$location" > ~/.weatherreport
+curl -s "wttr.in/$location" > /tmp/weatherreport
pkill -RTMIN+5 i3blocks && notify-send "🌞 Weather forecast updated."
diff --git a/.scripts/statusbar/weather b/.scripts/statusbar/weather
index 00abda23..5024681b 100755
--- a/.scripts/statusbar/weather
+++ b/.scripts/statusbar/weather
@@ -2,7 +2,7 @@
[ "$(stat -c %y .weatherreport | awk '{print $1}')" != "$(date '+%Y-%m-%d')" ] && getforecast
case $BLOCK_BUTTON in
- 1) $TERMINAL -e less -Srf ~/.weatherreport ;;
+ 1) $TERMINAL -e less -S /tmp/weatherreport ;;
3) pgrep -x dunst >/dev/null && notify-send "🌈 Weather module:
- Click for wttr.in forecast.
☔: Chance of rain/snow
@@ -10,6 +10,6 @@ case $BLOCK_BUTTON in
🌞: Daily high" ;;
esac
-printf "%s" "$(sed '16q;d' ~/.weatherreport | grep -wo "[0-9]*%" | sort -n | sed -e '$!d' | sed -e "s/^/☔ /g" | tr -d '\n')"
+printf "%s" "$(sed '16q;d' /tmp/weatherreport | grep -wo "[0-9]*%" | sort -n | sed -e '$!d' | sed -e "s/^/☔ /g" | tr -d '\n')"
-sed '13q;d' ~/.weatherreport | grep -o "m\\(-\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ❄️",$1 "°","🌞",$2 "°"}'
+sed '13q;d' /tmp/weatherreport | grep -o "m\\(-\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ❄️",$1 "°","🌞",$2 "°"}'
From bf3c631cec86921ee0d9d7049d5f1c7daf3d0ab2 Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Wed, 2 Jan 2019 11:11:38 -0500
Subject: [PATCH 19/39] weather report update fix
---
.scripts/statusbar/weather | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.scripts/statusbar/weather b/.scripts/statusbar/weather
index 5024681b..f3699ee0 100755
--- a/.scripts/statusbar/weather
+++ b/.scripts/statusbar/weather
@@ -1,5 +1,5 @@
#!/bin/sh
-[ "$(stat -c %y .weatherreport | awk '{print $1}')" != "$(date '+%Y-%m-%d')" ] && getforecast
+[ "$(stat -c %y /tmp/weatherreport | awk '{print $1}')" != "$(date '+%Y-%m-%d')" ] && getforecast
case $BLOCK_BUTTON in
1) $TERMINAL -e less -S /tmp/weatherreport ;;
From f031a2d502964b9171f87a79afbecea712e1b362 Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Wed, 2 Jan 2019 11:26:53 -0500
Subject: [PATCH 20/39] SCRIPTS readme updates for renames etc.
---
.scripts/SCRIPTS.md | 75 +++++++++++++++++++++++++++------------------
1 file changed, 46 insertions(+), 29 deletions(-)
diff --git a/.scripts/SCRIPTS.md b/.scripts/SCRIPTS.md
index 6756039d..b6eef4ff 100644
--- a/.scripts/SCRIPTS.md
+++ b/.scripts/SCRIPTS.md
@@ -12,59 +12,72 @@ export PATH="$(du $HOME/.scripts/ | cut -f2 | tr '\n' ':')$PATH"
For modules used in i3blocks.
-### `i3battery`
+### `battery`
i3blocks module. Shows available power remaining with icon indicating battery
status. Colors indicate different levels of charge.
-### `i3mail`
+### `clock`
+
+Shows time and date. If clicked, brings up calender or coming calcuse events.
+
+### `cpu`
+
+Shows CPU temperature. If clicked, shows most processor-intensive processes.
+
+### `help`
+
+Module which appears as a question mark. Brings up readme if clicked.
+
+### `internet`
+
+Shows whether machine is connected to wifi and ethernet. If clicked, brings up `nmtui`.
+
+### `mailbox`
i3blocks module for use with mutt-wizard. Shows unread mail and if
`mailsync.sh` is running.
-### `i3mpd`
+### `mem`
+
+Shows memory usage. If clicked, shows most memory-intensive processes.
+
+### `music`
i3blocks module. Shows current song; if paused, name will be grayed and italic.
-### `i3mpdupdate`
+### `mpdupdate`
A daemon running by default that will update the i3mpd block on mpd change.
-### `i3pacman`
+### `news`
+
+Shows unread newsboat articles. Brings up newsboat or refreshes RSS feeds.
+
+### `pacpackages`
i3blocks module. Detects new installable upgrades. Only works if you use
cronjobs to automatically sync repositories.
-### `i3torrent`
-
-i3blocks module. Shows torrents idle (⌛️), downloading (⬇️) or
-finished (🌱).
-
-### `i3volume`
-
-i3blocks module. Shows volume percentage or mute notification.
-
-### `i3weather`
-
-i3blocks module. Gets weather forcast from wttr.in and returns today's
-precipitation chance (☔), daily low (❄️) and daily high (☀️).
-
-### `i3wifi`
-
-A modified version of the i3blocks wifi module. Clicked, it brings up wifi-menu
-and also appears when there is no wifi connection.
-
-### `popupdate`
+### `popupgrade`
Called by clicking on the update icon if there are new packages. Spawns a `yay`
upgrade of the main Arch repos and AUR packages, updates the i3blocks module
once complete.
-### `popweather`
+### `torrent`
-The script called by clicking on the i3 weather module. Brings up the forecast
-from `http://wttr.in` and will close on .
+i3blocks module. Shows torrents idle (⌛️), downloading (⬇️) or
+finished (🌱).
+### `volume`
+
+i3blocks module. Shows volume percentage or mute notification.
+
+### `weather`
+
+i3blocks module. Gets weather forcast from wttr.in and returns today's
+precipitation chance (☔), daily low (❄️) and daily high (☀️).
## `cron/`
@@ -88,6 +101,10 @@ Gives a dunst notification if the battery is less than 25%.
Not actually a cronjob, but just turns off/on all user cronjobs.
+### `getforecast`
+
+Updates the weather forecast. This is automatically run by `weather` if there hasn't been a new forecast today.
+
### `newsup`
Updates newsboat RSS feeds if connected to internet. Will also display a
@@ -224,7 +241,7 @@ Gives a dmenu prompt for mounting USB drives or Android devices. Bound to
### `dmenurecord`
Gives a list of recording commands: `audio`, `video` and `screencast` (both) in
-dmenu for selection. Bound to `mod+Print Screen` by default. Should be kill by
+dmenu for selection. Bound to `mod+PrintScreen` by default. Should be killed by
`killrecording`.
### `dmenuumount`
From f79911f67c5151c05c480dd05707ea9856f7ac08 Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Wed, 2 Jan 2019 11:33:45 -0500
Subject: [PATCH 21/39] SCRIPTs file now with lists, not subheadings
---
.scripts/SCRIPTS.md | 345 +++++++-------------------------------------
1 file changed, 56 insertions(+), 289 deletions(-)
diff --git a/.scripts/SCRIPTS.md b/.scripts/SCRIPTS.md
index b6eef4ff..34bb01bb 100644
--- a/.scripts/SCRIPTS.md
+++ b/.scripts/SCRIPTS.md
@@ -12,309 +12,76 @@ export PATH="$(du $HOME/.scripts/ | cut -f2 | tr '\n' ':')$PATH"
For modules used in i3blocks.
-### `battery`
-
-i3blocks module. Shows available power remaining with icon indicating battery
-status. Colors indicate different levels of charge.
-
-### `clock`
-
-Shows time and date. If clicked, brings up calender or coming calcuse events.
-
-### `cpu`
-
-Shows CPU temperature. If clicked, shows most processor-intensive processes.
-
-### `help`
-
-Module which appears as a question mark. Brings up readme if clicked.
-
-### `internet`
-
-Shows whether machine is connected to wifi and ethernet. If clicked, brings up `nmtui`.
-
-### `mailbox`
-
-i3blocks module for use with mutt-wizard. Shows unread mail and if
-`mailsync.sh` is running.
-
-### `mem`
-
-Shows memory usage. If clicked, shows most memory-intensive processes.
-
-### `music`
-
-i3blocks module. Shows current song; if paused, name will be grayed and italic.
-
-### `mpdupdate`
-
-A daemon running by default that will update the i3mpd block on mpd change.
-
-### `news`
-
-Shows unread newsboat articles. Brings up newsboat or refreshes RSS feeds.
-
-### `pacpackages`
-
-i3blocks module. Detects new installable upgrades. Only works if you use
-cronjobs to automatically sync repositories.
-
-### `popupgrade`
-
-Called by clicking on the update icon if there are new packages. Spawns a `yay`
-upgrade of the main Arch repos and AUR packages, updates the i3blocks module
-once complete.
-
-### `torrent`
-
-i3blocks module. Shows torrents idle (⌛️), downloading (⬇️) or
-finished (🌱).
-
-### `volume`
-
-i3blocks module. Shows volume percentage or mute notification.
-
-### `weather`
-
-i3blocks module. Gets weather forcast from wttr.in and returns today's
-precipitation chance (☔), daily low (❄️) and daily high (☀️).
+- `battery` -- i3blocks module. Shows available power remaining with icon indicating battery status. Colors indicate different levels of charge.
+- `clock` -- Shows time and date. If clicked, brings up calender or coming calcuse events.
+- `cpu` -- Shows CPU temperature. If clicked, shows most processor-intensive processes.
+- `help` -- Module which appears as a question mark. Brings up readme if clicked.
+- `internet` -- Shows whether machine is connected to wifi and ethernet. If clicked, brings up `nmtui`.
+- `mailbox` -- i3blocks module for use with mutt-wizard. Shows unread mail and if `mailsync.sh` is running.
+- `mem` -- Shows memory usage. If clicked, shows most memory-intensive processes.
+- `music` -- i3blocks module. Shows current song; if paused, name will be grayed and italic.
+- `mpdupdate` -- A daemon running by default that will update the i3mpd block on mpd change.
+- `news` -- Shows unread newsboat articles. Brings up newsboat or refreshes RSS feeds.
+- `pacpackages` -- i3blocks module. Detects new installable upgrades. Only works if you use cronjobs to automatically sync repositories.
+- `popupgrade` -- Called by clicking on the update icon if there are new packages. Spawns a `yay` upgrade of the main Arch repos and AUR packages, updates the i3blocks module once complete.
+- `torrent` -- i3blocks module. Shows torrents idle (⌛️), downloading (⬇️) or finished (🌱).
+- `volume` -- i3blocks module. Shows volume percentage or mute notification.
+- `weather` -- i3blocks module. Gets weather forcast from wttr.in and returns today's precipitation chance (☔), daily low (❄️) and daily high (☀️).
## `cron/`
For scripts meant to be cronjobs. None are active by default on LARBS.
-### `checkup`
-
-If connected to internet, syncs package repositories and downloads (but does
-not install) any potential updates. Gives `notify-send` notifications of when
-it is active since other `pacman` install commands cannot be run
-simultaneously.
-
-You may need to grant your user the ability to run `pacman -Syyuw --noconfirm`
-without a password (done in `/etc/sudoers`).
-
-### `cronbat`
-
-Gives a dunst notification if the battery is less than 25%.
-
-### `crontog`
-
-Not actually a cronjob, but just turns off/on all user cronjobs.
-
-### `getforecast`
-
-Updates the weather forecast. This is automatically run by `weather` if there hasn't been a new forecast today.
-
-### `newsup`
-
-Updates newsboat RSS feeds if connected to internet. Will also display a
-newspaper update icon on i3blocks if it has not be user disabled.
+- `checkup` -- If connected to internet, syncs package repositories and downloads (but does not install) any potential updates. Gives `notify-send` notifications of when it is active since other `pacman` install commands cannot be run simultaneously. You may need to grant your user the ability to run `pacman -Syyuw --noconfirm` without a password (done in `/etc/sudoers`).
+- `cronbat` -- Gives a dunst notification if the battery is less than 25%.
+- `crontog` -- Not actually a cronjob, but just turns off/on all user cronjobs.
+- `getforecast` -- Updates the weather forecast. This is automatically run by `weather` if there hasn't been a new forecast today.
+- `newsup` -- Updates newsboat RSS feeds if connected to internet. Will also display a newspaper update icon on i3blocks if it has not be user disabled.
## `tools/`
Scripts intended to be run either manually by the user or linked to a shortcut
in vim or another program.
-### `compiler`
-
-Compiles a markdown, R markdown or LaTeX document with the approriate command.
-Will also run `make && sudo make install` if in a `config.h` file. Otherwise
-it will create a sent presentation. This can be thought of a general output
-handler. I have it bound to `c` in vim.
-
-### `dmenuhandler`
-
-Give this script a url and it will offer dmenu options for opening it. Used by
-`newsboat` and some other programs as a link handler.
-
-### `extract`
-
-Will detect file type of archive and run appropriate extraction command.
-
-### `getbib`
-
-Use crossref.org to automatically detect bibtex entry of a .pdf. Attempts to
-search for the .pdf's DOI. Returns nothing if none detected.
-
-### `getkeys`
-
-Get the LARBS documentation on what bindings exist for main programs.
-
-### `linkhandler`
-
-The automatic link handler used by `newsboat` and other programs. Urls of video
-sites or of video files are opened in `mpv`, images are downloaded/opened in
-`feh`, music files are downloaded with `wget` and all other urls are opened in
-the default browser.
-
-### `lmc`
-
-A music controller that simplifies music/audio management and improves the
-interface with i3blocks. Check inside to see what it does. This is what i3
-audio/music commands run by default. If you use a difference music system or
-ALSA, you can change this script rather than changing all the shortcuts in
-different places.
-
-### `note`
-
-Give this script some text/a message as an argument. It will print it to the
-terminal, and if `dunst` is running, display a notification.
-
-### `opout`
-
-"Open output", opens the corresponding `.pdf` file if run on a `.md`, `.tex` or
-`.rmd` file, or if given an `.html` file, will open it in the browser. Bound
-to `p` in my vim config to reveal typical output.
-
-### `pauseallmpv`
-
-Pauses all mpv instances by sending the `,` key to each. Used by several
-scripts, but can be used alone as well. It will not pause an audio only mpv
-instance. If you know how to add a hack to do this, feel free to PR it or email
-me an addition.
-
-### `remaps`
-
-Remaps capslock to escape when pressed and super/mod when held. Maps the menu
-key to super as well. Runs the US international keyboard setup. If you want
-another keyboard setup, edit this fine.
-
-### `shortcuts`
-
-For updating bash and ranger shortcuts. Reads `~/.key_directories` and
-`~/.key_files` for pairs of keypresses and directories and files, then
-autoproduces bash aliases and ranger shortcuts for them which output to
-`~/.shortcuts` and `~/.config/ranger/shortcuts.conf` respectively. These are
-read automatically by my bash and ranger configs. You don't have to run this
-script manually though, as it's run by vim whenever you edit one of the
-`~/.key_*` files.
-
-### `speedvid`
-
-Speed up a given video file (`$1`) by a given ammount (`$2`).
-
-### `tpb`
-
-Search Pirate Bay for the certain search terms given as arguments.
-
-### `texclear`
-
-Remove all `.tex` related build files. This is run by my vim when I stop
-editing any `.tex` file.
-
-### `transadd`
-
-The mimeapp default script for handling torrent magnet links. Starts
-`transmission-daemon` if not running and adds the link.
+- `compiler` -- Compiles a markdown, R markdown or LaTeX document with the approriate command. Will also run `make && sudo make install` if in a `config.h` file. Otherwise it will create a sent presentation. This can be thought of a general output handler. I have it bound to `c` in vim.
+- `dmenuhandler` -- Give this script a url and it will offer dmenu options for opening it. Used by `newsboat` and some other programs as a link handler.
+- `extract` -- Will detect file type of archive and run appropriate extraction command.
+- `getbib` -- Use crossref.org to automatically detect bibtex entry of a .pdf. Attempts to search for the .pdf's DOI. Returns nothing if none detected.
+- `getkeys` -- Get the LARBS documentation on what bindings exist for main programs.
+- `linkhandler` -- The automatic link handler used by `newsboat` and other programs. Urls of video sites or of video files are opened in `mpv`, images are downloaded/opened in `feh`, music files are downloaded with `wget` and all other urls are opened in the default browser.
+- `lmc` -- A music controller that simplifies music/audio management and improves the interface with i3blocks. Check inside to see what it does. This is what i3 audio/music commands run by default. If you use a difference music system or ALSA, you can change this script rather than changing all the shortcuts in different places.
+- `note` -- Give this script some text/a message as an argument. It will print it to the terminal, and if `dunst` is running, display a notification.
+- `opout` -- "Open output", opens the corresponding `.pdf` file if run on a `.md`, `.tex` or `.rmd` file, or if given an `.html` file, will open it in the browser. Bound to `p` in my vim config to reveal typical output.
+- `pauseallmpv` -- Pauses all mpv instances by sending the `,` key to each. Used by several scripts, but can be used alone as well. It will not pause an audio only mpv instance. If you know how to add a hack to do this, feel free to PR it or email me an addition.
+- `remaps` -- Remaps capslock to escape when pressed and super/mod when held. Maps the menu key to super as well. Runs the US international keyboard setup. If you want another keyboard setup, edit this fine.
+- `shortcuts` -- For updating bash and ranger shortcuts. Reads `~/.key_directories` and `~/.key_files` for pairs of keypresses and directories and files, then autoproduces bash aliases and ranger shortcuts for them which output to `~/.shortcuts` and `~/.config/ranger/shortcuts.conf` respectively. These are read automatically by my bash and ranger configs. You don't have to run this script manually though, as it's run by vim whenever you edit one of the `~/.key_*` files.
+- `speedvid` -- Speed up a given video file (`$1`) by a given ammount (`$2`).
+- `tpb` -- Search Pirate Bay for the certain search terms given as arguments.
+- `texclear` -- Remove all `.tex` related build files. This is run by my vim when I stop editing any `.tex` file.
+- `transadd` -- The mimeapp default script for handling torrent magnet links. Starts `transmission-daemon` if not running and adds the link.
## `i3cmds`
These are scripts linked to bindings in i3. They typically perform
user-interface actions or involve dmenu.
-### `bottomleft` and `bottomright`
-
-Makes the currently selected window float in one of the bottom corners of the
-screen. `bottomleft` is bound to `mod+B` by default.
-
-### `camtoggle`
-
-Starts/kills /dev/video0 webcam. Placed in bottom right by default.
-
-### `ddspawn`
-
-This is the script called to create, show and hide the dropdown tmux terminal
-mapped to `mod+u`, but also the dropdown calculator mapped to `mod+a`. Give the
-script an argument that is a script the window will run. If a window does not
-already exist, `ddspawn` creates it, if it does, `ddspawn` will toggle its
-visibility. The the script itself for usage.
-
-### `displayselect`
-
-Select which displays to use. Bound to `mod+F3`.
-
-### `dmenumount`
-
-Gives a dmenu prompt for mounting USB drives or Android devices. Bound to
-`mod+F9`. Will do nothing if none are available.
-
-### `dmenurecord`
-
-Gives a list of recording commands: `audio`, `video` and `screencast` (both) in
-dmenu for selection. Bound to `mod+PrintScreen` by default. Should be killed by
-`killrecording`.
-
-### `dmenuumount`
-
-Unmount a mounted non-essential partition. Bound to `mod+F10`. Will do nothing
-if none are mounted. It will not try to unmount essential system partitions.
-
-### `dmenuunicode`
-
-Shows a searchable dmenu prompt of emoji characters. The selected emoji is
-copied to the system clipboard, while its character code is copied to primary
-selection (middle mouse button).
-
-### `dropdowncalc`
-
-The dropdown calculator script called by `ddspawn` and bound to `mod+a` by
-default. Will run an R calculator if installed, otherwise python.
-
-### `ducksearch`
-
-Show a dmenu prompt and search for the inputed text in DuckDuckGo. Can take
-bangtags as expected, i.e. typing in `!aw Arch Linux` will search the Arch Wiki
-for "Arch Linux" or `!yt Luke Smith` will search YouTube for "Luke Smith", etc.
-
-### `i3resize`
-
-A script that allows intuitive resizing of windows. Mapped to `mod+Y/U/I/O`.
-
-### `killrecording`
-
-End a recording started by `dmenurecord` the proper way without file trucation
-or lingering background processes, mapped to `mod+Delete` by default.
-
-### `lockscreen`
-
-The screen locker. Gives a confirm prompt and if user says yes, all audio will
-be paused and the screen will be distorted and locked and screen will soon time
-out. User must insert password to unlock. Mapped to `mod+x` by default.
-
-### `newspod`
-
-A silly line that has a script all to itself due to i3's idiosyncracies. Starts
-`newsboat`, if `newsboat` cannot open because of another instance being open,
-opens `podboat`.
-
-### `prompt`
-
-Gives a Yes/No prompt to a question given as an argument. Used by numerous
-bindings like `mod+shift+x`, `mod+shift+backspace` and `mod+shift+escape`.
-
-### `samedir`
-
-Opens a terminal window in the same directory as the window currently
-selection. Bound to `mod+shift+enter`.
-
-### `td-toggle`
-
-Gives a dmenu prompt to start `transmission-daemon` if not running, or the kill
-it if it is. Obviously you need `transmission-cli` installed for this to work.
-Mapped to `mod+F7` by default.
-
-### `tmuxdd`
-
-The startup script for the dropdown terminal (toggleable with `mod+u`). Either
-attaches to an existing tmux session or begins a new one.
-
-### `toggletouchpad`
-
-As the name suggests, turns off TouchPad if on, and turns it on if off.
-Requires `xf86-input-synaptics`. If your laptop has a special button for this,
-it will be mapped by default.
-
-### `tutorialvids`
-
-A dmenu prompt that gives some options of tutorial videos to watch. Bound to
-`mod+shift+e`.
+- `bottomleft` and `bottomright` -- Makes the currently selected window float in one of the bottom corners of the screen. `bottomleft` is bound to `mod+B` by default.
+- `camtoggle` -- Starts/kills /dev/video0 webcam. Placed in bottom right by default.
+- `ddspawn` -- This is the script called to create, show and hide the dropdown tmux terminal mapped to `mod+u`, but also the dropdown calculator mapped to `mod+a`. Give the script an argument that is a script the window will run. If a window does not already exist, `ddspawn` creates it, if it does, `ddspawn` will toggle its visibility. The the script itself for usage.
+- `displayselect` -- Select which displays to use. Bound to `mod+F3`.
+- `dmenumount` -- Gives a dmenu prompt for mounting USB drives or Android devices. Bound to `mod+F9`. Will do nothing if none are available.
+- `dmenurecord` -- Gives a list of recording commands: `audio`, `video` and `screencast` (both) in dmenu for selection. Bound to `mod+PrintScreen` by default. Should be killed by `killrecording`.
+- `dmenuumount` -- Unmount a mounted non-essential partition. Bound to `mod+F10`. Will do nothing if none are mounted. It will not try to unmount essential system partitions.
+- `dmenuunicode` -- Shows a searchable dmenu prompt of emoji characters. The selected emoji is copied to the system clipboard, while its character code is copied to primary selection (middle mouse button).
+- `dropdowncalc` -- The dropdown calculator script called by `ddspawn` and bound to `mod+a` by default. Will run an R calculator if installed, otherwise python.
+- `ducksearch` -- Show a dmenu prompt and search for the inputed text in DuckDuckGo. Can take bangtags as expected, i.e. typing in `!aw Arch Linux` will search the Arch Wiki for "Arch Linux" or `!yt Luke Smith` will search YouTube for "Luke Smith", etc.
+- `i3resize` -- A script that allows intuitive resizing of windows. Mapped to `mod+Y/U/I/O`.
+- `killrecording` -- End a recording started by `dmenurecord` the proper way without file trucation or lingering background processes, mapped to `mod+Delete` by default.
+- `lockscreen` -- The screen locker. Gives a confirm prompt and if user says yes, all audio will be paused and the screen will be distorted and locked and screen will soon time out. User must insert password to unlock. Mapped to `mod+x` by default.
+- `newspod` -- A silly line that has a script all to itself due to i3's idiosyncracies. Starts `newsboat`, if `newsboat` cannot open because of another instance being open, opens `podboat`.
+- `prompt` -- Gives a Yes/No prompt to a question given as an argument. Used by numerous bindings like `mod+shift+x`, `mod+shift+backspace` and `mod+shift+escape`.
+- `samedir` -- Opens a terminal window in the same directory as the window currently selection. Bound to `mod+shift+enter`.
+- `td-toggle` -- Gives a dmenu prompt to start `transmission-daemon` if not running, or the kill it if it is. Obviously you need `transmission-cli` installed for this to work. Mapped to `mod+F7` by default.
+- `tmuxdd` -- The startup script for the dropdown terminal (toggleable with `mod+u`). Either attaches to an existing tmux session or begins a new one.
+- `toggletouchpad` -- As the name suggests, turns off TouchPad if on, and turns it on if off. Requires `xf86-input-synaptics`. If your laptop has a special button for this, it will be mapped by default.
+- `tutorialvids` -- A dmenu prompt that gives some options of tutorial videos to watch. Bound to `mod+shift+e`.
From 4dded8fa4642166b9a1caf2af15f1e41dccbb6a6 Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Thu, 3 Jan 2019 11:49:14 -0500
Subject: [PATCH 22/39] ignore ignored packages for update icon
---
.scripts/statusbar/pacpackages | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.scripts/statusbar/pacpackages b/.scripts/statusbar/pacpackages
index 9e1ef22c..91648309 100755
--- a/.scripts/statusbar/pacpackages
+++ b/.scripts/statusbar/pacpackages
@@ -16,4 +16,4 @@ case $BLOCK_BUTTON in
esac
-pacman -Qu | wc -l | sed -e "s/^0$//g"
+pacman -Qu | grep -v "[ignored]" | wc -l | sed -e "s/^0$//g"
From 60dc1da4fd1f5c5ff2c7657244d7f39cec572361 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gergely=20Horv=C3=A1th?=
Date: Thu, 3 Jan 2019 19:51:38 +0100
Subject: [PATCH 23/39] Simplified ddspawn, no need for pause
---
.config/i3/config | 4 ++++
.scripts/i3cmds/ddspawn | 7 +++----
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/.config/i3/config b/.config/i3/config
index e63e4c62..b7c5d7d7 100644
--- a/.config/i3/config
+++ b/.config/i3/config
@@ -39,6 +39,8 @@ for_window [instance="tmuxdd"] resize set 625 450
for_window [instance="tmuxdd"] move scratchpad
for_window [instance="tmuxdd"] border pixel 3
for_window [instance="tmuxdd"] sticky enable
+for_window [instance="tmuxdd"] scratchpad show
+for_window [instance="tmuxdd"] move position center
# Then I have a window running R I use for basic arithmetic
# I'll later bind this to mod+a.
@@ -47,6 +49,8 @@ for_window [instance="dropdowncalc"] resize set 800 300
for_window [instance="dropdowncalc"] move scratchpad
for_window [instance="dropdowncalc"] border pixel 2
for_window [instance="dropdowncalc"] sticky enable
+for_window [instance="dropdowncalc"] scratchpad show
+for_window [instance="dropdowncalc"] move position center
# #---Starting External Scripts---# #
# Setting the background:
diff --git a/.scripts/i3cmds/ddspawn b/.scripts/i3cmds/ddspawn
index 0871a59f..123cecbe 100755
--- a/.scripts/i3cmds/ddspawn
+++ b/.scripts/i3cmds/ddspawn
@@ -6,7 +6,7 @@
# argument 1: script to run in dropdown window
# all other args are interpreted as options for your terminal
# My usage:
-# ddpawn
+# ddspawn
# bindsym $mod+u exec --no-startup-id ddspawn tmuxdd
# Will hide/show window running the `tmuxdd` script when I press mod+u in i3
# bindsym $mod+a exec --no-startup-id ddspawn dropdowncalc -f mono:pixelsize=24
@@ -17,9 +17,8 @@
if xwininfo -tree -root | grep "(\"$1\" ";
then
echo "Window detected."
+ i3 "[instance=\"$1\"] scratchpad show; [instance=\"$1\"] move position center"
else
echo "Window not detected... spawning."
- i3 "exec --no-startup-id $TERMINAL -n $1 $(echo "$@" | cut -d ' ' -f2-) -e $1" && i3 "[instance=\"$1\"] scratchpad show; [instance=\"$1\"] move position center"
- sleep .25 # This sleep is my laziness, will fix later (needed for immediate appearance after spawn).
+ i3 "exec --no-startup-id $1"
fi
-i3 "[instance=\"$1\"] scratchpad show; [instance=\"$1\"] move position center"
From 56b81e956a0c9b8f52297438cea9372b43b9f830 Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Thu, 3 Jan 2019 14:03:09 -0500
Subject: [PATCH 24/39] sxiv key handler added
---
.config/sxiv/exec/key-handler | 37 +++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
create mode 100755 .config/sxiv/exec/key-handler
diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler
new file mode 100755
index 00000000..e0303f94
--- /dev/null
+++ b/.config/sxiv/exec/key-handler
@@ -0,0 +1,37 @@
+#!/bin/sh
+while read file
+do
+ fullpath="$(pwd)/$file"
+ case "$1" in
+ "w")
+ cp "$file" ~/.config/wall.png &&
+ feh --bg-scale "$HOME/.config/wall.png"
+ notify-send -i "$HOME/.config/wall.png" "Wallpaper changed." ;;
+ "c")
+ [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.bmdirs | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")"
+ [ -z "$destdir" ] && exit
+ cp "$file" "$destdir" && notify-send -i "$fullpath" "$file copied to $destdir." &
+ ;;
+ "m")
+ [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.bmdirs | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")"
+ [ -z "$destdir" ] && exit
+ cp "$file" "$destdir" && notify-send -i "$fullpath" "$file moved to $destdir." &
+ ;;
+ "r")
+ convert -rotate 90 "$file" "$file" ;;
+ "R")
+ convert -rotate -90 "$file" "$file" ;;
+ "f")
+ convert -flop "$file" "$file" ;;
+ "y")
+ echo -n "$file" | xclip -selection clipboard &&
+ notify-send "$file copied to clipboard" & ;;
+ "Y")
+ echo -n "$fullpath" | xclip -selection clipboard &&
+ notify-send "$fullpath copied to clipboard" & ;;
+ "d")
+ [ "$(printf "No\\nYes" | dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
+ "G")
+ gimp "$file" & ;;
+ esac
+done
From 9a13230d95af8d99e18ad7e9c19e6219f004ed2c Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Thu, 3 Jan 2019 14:13:46 -0500
Subject: [PATCH 25/39] sxiv now default image viewer
---
.config/mimeapps.list | 6 +++---
.config/ranger/rifle.conf | 3 +--
.local/share/applications/sxiv.desktop | 4 ++++
.scripts/i3cmds/tutorialvids | 2 +-
4 files changed, 9 insertions(+), 6 deletions(-)
create mode 100644 .local/share/applications/sxiv.desktop
diff --git a/.config/mimeapps.list b/.config/mimeapps.list
index fa9bdb1b..85224313 100644
--- a/.config/mimeapps.list
+++ b/.config/mimeapps.list
@@ -3,6 +3,6 @@ x-scheme-handler/magnet=transmission-remote.desktop;
x-scheme-handler/mailto=mutt.desktop;
text/plain=vim.desktop;
application/pdf=zathura.desktop;
-image/png=feh.desktop;
-image/jpeg=feh.desktop;
-image/gif=gif.desktop;
+image/png=sxiv.desktop;
+image/jpeg=sxiv.desktop;
+image/gif=sxiv.desktop;
diff --git a/.config/ranger/rifle.conf b/.config/ranger/rifle.conf
index c7836788..c6b85d0d 100644
--- a/.config/ranger/rifle.conf
+++ b/.config/ranger/rifle.conf
@@ -184,14 +184,13 @@ ext djvu, has atril, X, flag f = atril -- "$@"
#-------------------------------------------
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
mime ^image/svg, has display, X, flag f = display -- "$@"
-mime ^image/gif, has mpv, X, flag f = mpv --loop -- "$@"
mime ^image/gif, has viewnior, X, flag f = viewnior -- "$@"
mime ^image/gif, has qutebrowser, X, flag f = qutebrowser -- "$@"
ext xcf, X, flag f = gimp -- "$@"
+mime ^image, has sxiv, X, flag f = sxiv -a -- "$@"
mime ^image, has feh, X, flag f = feh --scale-down --auto-zoom --image-bg black -- "$@"
mime ^image, has feh, X, flag f = feh --scale-down --auto-zoom -- "$@"
-mime ^image, has sxiv, X, flag f = sxiv -- "$@"
mime ^image, has mirage, X, flag f = mirage -- "$@"
mime ^image, has ristretto, X, flag f = ristretto "$@"
mime ^image, has eog, X, flag f = eog -- "$@"
diff --git a/.local/share/applications/sxiv.desktop b/.local/share/applications/sxiv.desktop
new file mode 100644
index 00000000..fa810f22
--- /dev/null
+++ b/.local/share/applications/sxiv.desktop
@@ -0,0 +1,4 @@
+[Desktop Entry]
+Type=Application
+Name=feh image viewer
+Exec=/usr/bin/sxiv -a %u
diff --git a/.scripts/i3cmds/tutorialvids b/.scripts/i3cmds/tutorialvids
index 1449cbe7..5a3aa2bf 100755
--- a/.scripts/i3cmds/tutorialvids
+++ b/.scripts/i3cmds/tutorialvids
@@ -1,7 +1,7 @@
#!/bin/sh
vidlist="
status bar https://www.youtube.com/watch?v=gKumet6b-WY
-feh
+sxiv (image viewer) https://www.youtube.com/watch?v=GYW9i_u5PYs
st (terminal) https://www.youtube.com/watch?v=9H75enWM22k
i3 (window manager) https://www.youtube.com/watch?v=GKviflL9XeI
mutt (email) https://www.youtube.com/watch?v=2U3vRbF7v5A
From 13e2d589d1a593a500bbcd0eb77b3359d479c410 Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Thu, 3 Jan 2019 14:52:36 -0500
Subject: [PATCH 26/39] ddspawn fix
---
.scripts/i3cmds/ddspawn | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.scripts/i3cmds/ddspawn b/.scripts/i3cmds/ddspawn
index 123cecbe..2c23fd6a 100755
--- a/.scripts/i3cmds/ddspawn
+++ b/.scripts/i3cmds/ddspawn
@@ -20,5 +20,5 @@ then
i3 "[instance=\"$1\"] scratchpad show; [instance=\"$1\"] move position center"
else
echo "Window not detected... spawning."
- i3 "exec --no-startup-id $1"
+ i3 "exec --no-startup-id $TERMINAL -n $1 $(echo "$@" | cut -d ' ' -f2-) -e $1"
fi
From b958aa01c58bb5a448bcb8afc24c68844a8b9a06 Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Thu, 3 Jan 2019 19:06:34 -0500
Subject: [PATCH 27/39] oh god luke, wh what r u doing
---
.config/nvim/init.vim | 216 +++++++++++++++++++++++++++++++++++++++++
.vimrc | 217 +-----------------------------------------
2 files changed, 217 insertions(+), 216 deletions(-)
create mode 100644 .config/nvim/init.vim
mode change 100644 => 120000 .vimrc
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
new file mode 100644
index 00000000..b462bbd3
--- /dev/null
+++ b/.config/nvim/init.vim
@@ -0,0 +1,216 @@
+" _
+" __ _(_)_ __ ___ _ __ ___
+" \ \ / / | '_ ` _ \| '__/ __|
+" \ V /| | | | | | | | | (__
+" \_/ |_|_| |_| |_|_| \___|
+
+let mapleader =" "
+
+call plug#begin('~/.vim/plugged')
+Plug 'junegunn/goyo.vim'
+Plug 'PotatoesMaster/i3-vim-syntax'
+Plug 'jreybert/vimagit'
+Plug 'LukeSmithxyz/vimling'
+Plug 'vimwiki/vimwiki'
+call plug#end()
+
+" Some basics:
+ set nocompatible
+ filetype plugin on
+ syntax on
+ set encoding=utf-8
+ set number relativenumber
+" Enable autocompletion:
+ set wildmode=longest,list,full
+" Disables automatic commenting on newline:
+ autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
+
+" Goyo plugin makes text more readable when writing prose:
+ map f :Goyo \| set linebreak
+
+" Spell-check set to o, 'o' for 'orthography':
+ map o :setlocal spell! spelllang=en_us
+
+" Splits open at the bottom and right, which is non-retarded, unlike vim defaults.
+ set splitbelow splitright
+
+" Shortcutting split navigation, saving a keypress:
+ map h
+ map j
+ map k
+ map l
+
+" Check file in shellcheck:
+ map s :!clear && shellcheck %
+
+" Open my bibliography file in split
+ map b :vsp$BIB
+ map r :vsp$REFER
+
+" Replace all is aliased to S.
+ nnoremap S :%s//g
+
+" Compile document, be it groff/LaTeX/markdown/etc.
+ map c :w! \| !compiler %
+
+" Open corresponding .pdf/.html or preview
+ map p :!opout %
+
+" Runs a script that cleans out tex build files whenever I close out of a .tex file.
+ autocmd VimLeave *.tex !texclear %
+
+" Ensure files are read as what I want:
+ let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'}
+ autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown
+ autocmd BufRead,BufNewFile *.ms,*.me,*.mom,*.man set filetype=groff
+ autocmd BufRead,BufNewFile *.tex set filetype=tex
+
+" Readmes autowrap text:
+ autocmd BufRead,BufNewFile *.md set tw=79
+
+" Use urlscan to choose and open a url:
+ :noremap u :w !urlscan -r 'linkhandler {}'
+ :noremap ,, !urlscan -r 'linkhandler {}'
+
+" Copy selected text to system clipboard (requires gvim/nvim/vim-x11 installed):
+ vnoremap "+y
+ map "+P
+
+" Enable Goyo by default for mutt writting
+ " Goyo's width will be the line limit in mutt.
+ autocmd BufRead,BufNewFile /tmp/neomutt* let g:goyo_width=80
+ autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo
+
+" Automatically deletes all trailing whitespace on save.
+ autocmd BufWritePre * %s/\s\+$//e
+
+" When shortcut files are updated, renew bash and ranger configs with new material:
+ autocmd BufWritePost ~/.bm* !shortcuts
+
+" Run xrdb whenever Xdefaults or Xresources are updated.
+ autocmd BufWritePost ~/.Xresources,~/.Xdefaults !xrdb %
+
+" Navigating with guides
+ inoremap /<++>"_c4l
+ vnoremap /<++>"_c4l
+ map /<++>"_c4l
+
+ "____ _ _
+"/ ___| _ __ (_)_ __ _ __ ___| |_ ___
+"\___ \| '_ \| | '_ \| '_ \ / _ \ __/ __|
+ "___) | | | | | |_) | |_) | __/ |_\__ \
+"|____/|_| |_|_| .__/| .__/ \___|\__|___/
+ "|_| |_|
+
+"""LATEX
+ " Word count:
+ autocmd FileType tex map o :w !detex \| wc -w
+ " Code snippets
+ autocmd FileType tex inoremap ,fr \begin{frame}\frametitle{}<++>\end{frame}<++>6kf}i
+ autocmd FileType tex inoremap ,fi \begin{fitch}\end{fitch}<++>3kA
+ autocmd FileType tex inoremap ,exe \begin{exe}\ex\end{exe}<++>3kA
+ autocmd FileType tex inoremap ,em \emph{}<++>T{i
+ autocmd FileType tex inoremap ,bf \textbf{}<++>T{i
+ autocmd FileType tex vnoremap , ``>2la}?\\{a
+ autocmd FileType tex inoremap ,it \textit{}<++>T{i
+ autocmd FileType tex inoremap ,ct \textcite{}<++>T{i
+ autocmd FileType tex inoremap ,cp \parencite{}<++>T{i
+ autocmd FileType tex inoremap ,glos {\gll<++>\\<++>\\\trans{``<++>''}}2k2bcw
+ autocmd FileType tex inoremap ,x \begin{xlist}\ex\end{xlist}kA
+ autocmd FileType tex inoremap ,ol \begin{enumerate}\end{enumerate}<++>3kA\item
+ autocmd FileType tex inoremap ,ul \begin{itemize}\end{itemize}<++>3kA\item
+ autocmd FileType tex inoremap ,li \item
+ autocmd FileType tex inoremap ,ref \ref{}<++>T{i
+ autocmd FileType tex inoremap ,tab \begin{tabular}<++>\end{tabular}<++>4kA{}i
+ autocmd FileType tex inoremap ,ot \begin{tableau}\inp{<++>}\const{<++>}<++><++>\end{tableau}<++>5kA{}i
+ autocmd FileType tex inoremap ,can \cand{}<++>T{i
+ autocmd FileType tex inoremap ,con \const{}<++>T{i
+ autocmd FileType tex inoremap ,v \vio{}<++>T{i
+ autocmd FileType tex inoremap ,a \href{}{<++>}<++>2T{i
+ autocmd FileType tex inoremap ,sc \textsc{}<++>T{i
+ autocmd FileType tex inoremap ,chap \chapter{}<++>2kf}i
+ autocmd FileType tex inoremap ,sec \section{}<++>2kf}i
+ autocmd FileType tex inoremap ,ssec \subsection{}<++>2kf}i
+ autocmd FileType tex inoremap ,sssec \subsubsection{}<++>2kf}i
+ autocmd FileType tex inoremap ,st F{i*f}i
+ autocmd FileType tex inoremap ,beg \begin{DELRN}<++>\end{DELRN}<++>4k0fR:MultipleCursorsFindDELRNc
+ autocmd FileType tex inoremap ,up /usepackageo\usepackage{}i
+ autocmd FileType tex nnoremap ,up /usepackageo\usepackage{}i
+ autocmd FileType tex inoremap ,tt \texttt{}<++>T{i
+ autocmd FileType tex inoremap ,bt {\blindtext}
+ autocmd FileType tex inoremap ,nu $\varnothing$
+ autocmd FileType tex inoremap ,col \begin{columns}[T]\begin{column}{.5\textwidth}\end{column}\begin{column}{.5\textwidth}<++>\end{column}\end{columns}5kA
+ autocmd FileType tex inoremap ,rn (\ref{})<++>F}i
+
+"""HTML
+ autocmd FileType html inoremap ,b <++>FbT>i
+ autocmd FileType html inoremap ,it <++>FeT>i
+ autocmd FileType html inoremap ,1 <++>2kf<++>2kf<++>2kf
<++>02kf>a
+ autocmd FileType html inoremap ,a href=""><++><++>14hi
+ autocmd FileType html inoremap ,e target="_blank"href=""><++><++>14hi
+ autocmd FileType html inoremap ,ul
<++>03kfoF>a
+ autocmd FileType html inoremap ,ol <++>03kf<++>Fcf"a
+ autocmd FileType html inoremap ,td
<++>Fdcit
+ autocmd FileType html inoremap ,tr
<++>kf<++>Fhcit
+ autocmd FileType html inoremap ,tab
O
+ autocmd FileType html inoremap ,gr F>a
+ autocmd FileType html inoremap ,rd F>a
+ autocmd FileType html inoremap ,yl F>a
+ autocmd FileType html inoremap ,dt
<++>
<++>2kcit
+ autocmd FileType html inoremap ,dl
<++>3kcc
+ autocmd FileType html inoremap & &
+ autocmd FileType html inoremap á á
+ autocmd FileType html inoremap é é
+ autocmd FileType html inoremap í í
+ autocmd FileType html inoremap ó ó
+ autocmd FileType html inoremap ú ú
+ autocmd FileType html inoremap ä ä
+ autocmd FileType html inoremap ë ë
+ autocmd FileType html inoremap ï ï
+ autocmd FileType html inoremap ö ö
+ autocmd FileType html inoremap ü ü
+ autocmd FileType html inoremap ã ã
+ autocmd FileType html inoremap ẽ &etilde;
+ autocmd FileType html inoremap ĩ ĩ
+ autocmd FileType html inoremap õ õ
+ autocmd FileType html inoremap ũ ũ
+ autocmd FileType html inoremap ñ ñ
+ autocmd FileType html inoremap à à
+ autocmd FileType html inoremap è è
+ autocmd FileType html inoremap ì ì
+ autocmd FileType html inoremap ò ò
+ autocmd FileType html inoremap ù ù
+
+
+""".bib
+ autocmd FileType bib inoremap ,a @article{author={<++>},year={<++>},title={<++>},journal={<++>},volume={<++>},pages={<++>},}<++>8kA,i
+ autocmd FileType bib inoremap ,b @book{author={<++>},year={<++>},title={<++>},publisher={<++>},}<++>6kA,i
+ autocmd FileType bib inoremap ,c @incollection{author={<++>},title={<++>},booktitle={<++>},editor={<++>},year={<++>},publisher={<++>},}<++>8kA,i
+
+"MARKDOWN
+ autocmd Filetype markdown,rmd map w yiWi[Ea](pa)
+ autocmd Filetype markdown,rmd inoremap ,n ---
+ autocmd Filetype markdown,rmd inoremap ,b ****<++>F*hi
+ autocmd Filetype markdown,rmd inoremap ,s ~~~~<++>F~hi
+ autocmd Filetype markdown,rmd inoremap ,e **<++>F*i
+ autocmd Filetype markdown,rmd inoremap ,h ====<++>F=hi
+ autocmd Filetype markdown,rmd inoremap ,i <++>F[a
+ autocmd Filetype markdown,rmd inoremap ,a [](<++>)<++>F[a
+ autocmd Filetype markdown,rmd inoremap ,1 #<++>kA
+ autocmd Filetype markdown,rmd inoremap ,2 ##<++>kA
+ autocmd Filetype markdown,rmd inoremap ,3 ###<++>kA
+ autocmd Filetype markdown,rmd inoremap ,l --------
+ autocmd Filetype rmd inoremap ,r ```{r}```2kO
+ autocmd Filetype rmd inoremap ,p ```{python}```2kO
+ autocmd Filetype rmd inoremap ,c ``````2kO
+
+""".xml
+ autocmd FileType xml inoremap ,e <++>isPermaLink="false"><++>:put=strftime('%a, %d %b %Y %H:%M:%S %z')kJA<++>]]>?cit
+ autocmd FileType xml inoremap ,a <++><++>F"ci"
+
diff --git a/.vimrc b/.vimrc
deleted file mode 100644
index b462bbd3..00000000
--- a/.vimrc
+++ /dev/null
@@ -1,216 +0,0 @@
-" _
-" __ _(_)_ __ ___ _ __ ___
-" \ \ / / | '_ ` _ \| '__/ __|
-" \ V /| | | | | | | | | (__
-" \_/ |_|_| |_| |_|_| \___|
-
-let mapleader =" "
-
-call plug#begin('~/.vim/plugged')
-Plug 'junegunn/goyo.vim'
-Plug 'PotatoesMaster/i3-vim-syntax'
-Plug 'jreybert/vimagit'
-Plug 'LukeSmithxyz/vimling'
-Plug 'vimwiki/vimwiki'
-call plug#end()
-
-" Some basics:
- set nocompatible
- filetype plugin on
- syntax on
- set encoding=utf-8
- set number relativenumber
-" Enable autocompletion:
- set wildmode=longest,list,full
-" Disables automatic commenting on newline:
- autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
-
-" Goyo plugin makes text more readable when writing prose:
- map f :Goyo \| set linebreak
-
-" Spell-check set to o, 'o' for 'orthography':
- map o :setlocal spell! spelllang=en_us
-
-" Splits open at the bottom and right, which is non-retarded, unlike vim defaults.
- set splitbelow splitright
-
-" Shortcutting split navigation, saving a keypress:
- map h
- map j
- map k
- map l
-
-" Check file in shellcheck:
- map s :!clear && shellcheck %
-
-" Open my bibliography file in split
- map b :vsp$BIB
- map r :vsp$REFER
-
-" Replace all is aliased to S.
- nnoremap S :%s//g
-
-" Compile document, be it groff/LaTeX/markdown/etc.
- map c :w! \| !compiler %
-
-" Open corresponding .pdf/.html or preview
- map p :!opout %
-
-" Runs a script that cleans out tex build files whenever I close out of a .tex file.
- autocmd VimLeave *.tex !texclear %
-
-" Ensure files are read as what I want:
- let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'}
- autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown
- autocmd BufRead,BufNewFile *.ms,*.me,*.mom,*.man set filetype=groff
- autocmd BufRead,BufNewFile *.tex set filetype=tex
-
-" Readmes autowrap text:
- autocmd BufRead,BufNewFile *.md set tw=79
-
-" Use urlscan to choose and open a url:
- :noremap u :w !urlscan -r 'linkhandler {}'
- :noremap ,, !urlscan -r 'linkhandler {}'
-
-" Copy selected text to system clipboard (requires gvim/nvim/vim-x11 installed):
- vnoremap "+y
- map "+P
-
-" Enable Goyo by default for mutt writting
- " Goyo's width will be the line limit in mutt.
- autocmd BufRead,BufNewFile /tmp/neomutt* let g:goyo_width=80
- autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo
-
-" Automatically deletes all trailing whitespace on save.
- autocmd BufWritePre * %s/\s\+$//e
-
-" When shortcut files are updated, renew bash and ranger configs with new material:
- autocmd BufWritePost ~/.bm* !shortcuts
-
-" Run xrdb whenever Xdefaults or Xresources are updated.
- autocmd BufWritePost ~/.Xresources,~/.Xdefaults !xrdb %
-
-" Navigating with guides
- inoremap /<++>"_c4l
- vnoremap /<++>"_c4l
- map /<++>"_c4l
-
- "____ _ _
-"/ ___| _ __ (_)_ __ _ __ ___| |_ ___
-"\___ \| '_ \| | '_ \| '_ \ / _ \ __/ __|
- "___) | | | | | |_) | |_) | __/ |_\__ \
-"|____/|_| |_|_| .__/| .__/ \___|\__|___/
- "|_| |_|
-
-"""LATEX
- " Word count:
- autocmd FileType tex map o :w !detex \| wc -w
- " Code snippets
- autocmd FileType tex inoremap ,fr \begin{frame}\frametitle{}<++>\end{frame}<++>6kf}i
- autocmd FileType tex inoremap ,fi \begin{fitch}\end{fitch}<++>3kA
- autocmd FileType tex inoremap ,exe \begin{exe}\ex\end{exe}<++>3kA
- autocmd FileType tex inoremap ,em \emph{}<++>T{i
- autocmd FileType tex inoremap ,bf \textbf{}<++>T{i
- autocmd FileType tex vnoremap , ``>2la}?\\{a
- autocmd FileType tex inoremap ,it \textit{}<++>T{i
- autocmd FileType tex inoremap ,ct \textcite{}<++>T{i
- autocmd FileType tex inoremap ,cp \parencite{}<++>T{i
- autocmd FileType tex inoremap ,glos {\gll<++>\\<++>\\\trans{``<++>''}}2k2bcw
- autocmd FileType tex inoremap ,x \begin{xlist}\ex\end{xlist}kA
- autocmd FileType tex inoremap ,ol \begin{enumerate}\end{enumerate}<++>3kA\item
- autocmd FileType tex inoremap ,ul \begin{itemize}\end{itemize}<++>3kA\item
- autocmd FileType tex inoremap ,li \item
- autocmd FileType tex inoremap ,ref \ref{}<++>T{i
- autocmd FileType tex inoremap ,tab \begin{tabular}<++>\end{tabular}<++>4kA{}i
- autocmd FileType tex inoremap ,ot \begin{tableau}\inp{<++>}\const{<++>}<++><++>\end{tableau}<++>5kA{}i
- autocmd FileType tex inoremap ,can \cand{}<++>