summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2020-11-01 20:39:02 -0500
committerLuke Smith <luke@lukesmith.xyz>2020-11-01 20:39:02 -0500
commita801ddcbfcf1c0fd01a0c06975571e56c51b077b (patch)
tree4a848169c5841045066914a7f5fde60e43d57fbc
parentf770ac9df144ff24f7790aa23087abf000d656ff (diff)
parentf08e37bdad7aa7c69c7529fe9e48939a4b21d9cc (diff)
downloadeibhear-a801ddcbfcf1c0fd01a0c06975571e56c51b077b.tar.gz
eibhear-a801ddcbfcf1c0fd01a0c06975571e56c51b077b.tar.zst
eibhear-a801ddcbfcf1c0fd01a0c06975571e56c51b077b.zip
Merge branch 'master' of github.com:LukeSmithxyz/voidrice
-rwxr-xr-x.local/bin/compiler1
-rwxr-xr-x.local/bin/cron/checkup2
-rwxr-xr-x.local/bin/shortcuts6
-rwxr-xr-x.local/bin/sysact4
-rwxr-xr-x.local/bin/tag8
-rw-r--r--.zprofile4
6 files changed, 18 insertions, 7 deletions
diff --git a/.local/bin/compiler b/.local/bin/compiler
index 1892d5f..c56a25a 100755
--- a/.local/bin/compiler
+++ b/.local/bin/compiler
@@ -30,6 +30,7 @@ case "$ext" in
[0-9]) preconv "$file" | refer -PS -e | groff -mandoc -T pdf > "$base".pdf ;;
c) cc "$file" -o "$base" && "$base" ;;
go) go run "$file" ;;
+ cpp) g++ "$file" -o "$base" && "$base" ;;
h) sudo make install ;;
m) octave "$file" ;;
md) if [ -x "$(command -v lowdown)" ]; then
diff --git a/.local/bin/cron/checkup b/.local/bin/cron/checkup
index bf7f85d..4cfb856 100755
--- a/.local/bin/cron/checkup
+++ b/.local/bin/cron/checkup
@@ -2,7 +2,7 @@
# Syncs repositories and downloads updates, meant to be run as a cronjob.
-ping -q -c example.org > /dev/null || exit
+ping -q -c 1 example.org > /dev/null || exit
notify-send "📦 Repository Sync" "Checking for package updates..."
diff --git a/.local/bin/shortcuts b/.local/bin/shortcuts
index ed4f89f..ea463d7 100755
--- a/.local/bin/shortcuts
+++ b/.local/bin/shortcuts
@@ -15,17 +15,19 @@ printf "# vim: filetype=sh\\nalias " > "$shell_shortcuts"
printf "\" vim: filetype=vim\\n" > "$vifm_shortcuts"
# Format the `directories` file in the correct syntax and sent it to all three configs.
+eval "echo \"$(cat "${XDG_CONFIG_HOME:-$HOME/.config}/directories")\"" | \
awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
printf(\"%s=\42cd %s && ls -a\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ;
printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ;
printf(\"abbr %s \42cd %s; and ls -a\42\n\",\$1,\$2) >> \"$fish_shortcuts\" ;
printf(\"map g%s :cd %s<CR>\nmap t%s <tab>:cd %s<CR><tab>\nmap M%s <tab>:cd %s<CR><tab>:mo<CR>\nmap Y%s <tab>:cd %s<CR><tab>:co<CR> \n\",\$1,\$2, \$1, \$2, \$1, \$2, \$1, \$2) >> \"$vifm_shortcuts\" ;
printf(\"config.bind(';%s', \42set downloads.location.directory %s ;; hint links download\42) \n\",\$1,\$2) >> \"$qute_shortcuts\" ;
- printf(\"map g%s cd %s\nmap t%s tab_new %s\nmap m%s shell mv -v %%s %s\nmap Y%s shell cp -rv %%s %s \n\",\$1,\$2,\$1,\$2, \$1, \$2, \$1, \$2) >> \"$ranger_shortcuts\" }" "${XDG_CONFIG_HOME:-$HOME/.config}/directories"
+ printf(\"map g%s cd %s\nmap t%s tab_new %s\nmap m%s shell mv -v %%s %s\nmap Y%s shell cp -rv %%s %s \n\",\$1,\$2,\$1,\$2, \$1, \$2, \$1, \$2) >> \"$ranger_shortcuts\" }"
# Format the `files` file in the correct syntax and sent it to both configs.
+eval "echo \"$(cat "${XDG_CONFIG_HOME:-$HOME/.config}/files")\"" | \
awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
printf(\"%s=\42\$EDITOR %s\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ;
printf(\"abbr %s \42\$EDITOR %s\42 \n\",\$1,\$2) >> \"$fish_shortcuts\" ;
printf(\"map %s :e %s<CR> \n\",\$1,\$2) >> \"$vifm_shortcuts\" ;
- printf(\"map %s shell \$EDITOR %s \n\",\$1,\$2) >> \"$ranger_shortcuts\" }" "${XDG_CONFIG_HOME:-$HOME/.config}/files"
+ printf(\"map %s shell \$EDITOR %s \n\",\$1,\$2) >> \"$ranger_shortcuts\" }"
diff --git a/.local/bin/sysact b/.local/bin/sysact
index 0a7cdd0..e73981f 100755
--- a/.local/bin/sysact
+++ b/.local/bin/sysact
@@ -10,8 +10,8 @@ esac
cmds="\
🔒 lock slock
-🚪 leave dwm kill -TERM $(pidof -s dwm)
-♻ renew dwm kill -HUP $(pidof -s dwm)
+🚪 leave dwm kill -TERM $(pgrep -u $USER "\bdwm$")
+♻ renew dwm kill -HUP $(pgrep -u $USER "\bdwm$")
🐻 hibernate ${hib:-sudo -A systemctl suspend-then-hibernate}
🔃 reboot ${reb:-sudo -A reboot}
🖥 shutdown ${shut:-sudo -A shutdown -h now}"
diff --git a/.local/bin/tag b/.local/bin/tag
index c23be4e..8462b99 100755
--- a/.local/bin/tag
+++ b/.local/bin/tag
@@ -55,5 +55,13 @@ Date=$date
Genre=$genre
Comment=$comment" | opustags -i -S "$file" ;;
*.mp3) eyeD3 -Q --remove-all -a "$artist" -A "$album" -t "$title" -n "$track" -N "$total" -Y "$date" "$file" ;;
+ *.flac) echo "TITLE=$title
+ARTIST=$artist
+ALBUM=$album
+TRACKNUMBER=$track
+TOTALTRACKS=$total
+DATE=$date
+GENRE=$genre
+DESCRIPTION=$comment" | metaflac --remove-all-tags --import-tags-from=- "$file" ;;
*) echo "File type not implemented yet." ;;
esac
diff --git a/.zprofile b/.zprofile
index b2425ee..92e7701 100644
--- a/.zprofile
+++ b/.zprofile
@@ -132,8 +132,8 @@ ex=🎯:\
[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc ] && shortcuts >/dev/null 2>&1 &
if pacman -Qs libxft-bgra >/dev/null 2>&1; then
- # Start graphical server on tty1 if not already running.
- [ "$(tty)" = "/dev/tty1" ] && ! pidof Xorg >/dev/null 2>&1 && exec startx
+ # Start graphical server on user's current tty if not already running.
+ [[ -n "$(tty)" && -z $(pgrep -u $USER "\bXorg$") ]] && exec startx
else
echo "\033[31mIMPORTANT\033[0m: Note that \033[32m\`libxft-bgra\`\033[0m must be installed for this build of dwm.
Please run: