diff options
Diffstat (limited to '.shenanigans.sh')
| -rwxr-xr-x | .shenanigans.sh | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/.shenanigans.sh b/.shenanigans.sh index 9dc5732..86e57d5 100755 --- a/.shenanigans.sh +++ b/.shenanigans.sh | |||
| @@ -1,14 +1,9 @@ | |||
| 1 | # Software list (Void Linux): | 1 | # Software list: |
| 2 | # void-repo-nonfree void-repo-multilib void-repo-multilib-nonfree | ||
| 3 | # file-roller xfce4-plugins thunar-archive-plugin | 2 | # file-roller xfce4-plugins thunar-archive-plugin |
| 4 | # lm_sensors conky maim xlockmore picom cwm xclip xsel xsetroot xdotool | 3 | # vim git tmux maim xclip xsel mc htop entr cifs-utils rsync jq rofi fd |
| 5 | # xss-lock wmctrl zip mc htop entr cifs-utils rsync jq rofi st fd | 4 | # rsync curl hstr tree make gdb nvtop ctags stow newsboat mpv lazygit |
| 6 | # clang clang-tools-extra vim git curl tmux hstr tree make cmake gdb | ||
| 7 | # nvtop ctags stow newsboat mpv rsync python3-pipx lazygit | ||
| 8 | # Additonal stuff: | 5 | # Additonal stuff: |
| 9 | # go install golang.org/x/tools/gopls@latest | 6 | # go install golang.org/x/tools/gopls@latest |
| 10 | # pipx install pyright mdformat | ||
| 11 | # pipx inject mdformat mdformat-gfm | ||
| 12 | 7 | ||
| 13 | # Only run if the script is being sourced (bashrc). | 8 | # Only run if the script is being sourced (bashrc). |
| 14 | if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then | 9 | if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then |
| @@ -35,7 +30,7 @@ if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then | |||
| 35 | alias tmux='tmux -T 256 -u' | 30 | alias tmux='tmux -T 256 -u' |
| 36 | alias server='python3 -m http.server 6969' | 31 | alias server='python3 -m http.server 6969' |
| 37 | alias newsboat='newsboat -r -u ~/.feeds.txt' | 32 | alias newsboat='newsboat -r -u ~/.feeds.txt' |
| 38 | alias n='cd ~/Notes && vim toc.txt' | 33 | alias emptytrash='gio trash --empty' |
| 39 | 34 | ||
| 40 | # Custom folder jump commands. | 35 | # Custom folder jump commands. |
| 41 | alias j='cd ~/Junk' | 36 | alias j='cd ~/Junk' |
| @@ -49,7 +44,6 @@ if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then | |||
| 49 | export HISTFILESIZE= | 44 | export HISTFILESIZE= |
| 50 | export HISTFILE=~/.bash_history_infinite | 45 | export HISTFILE=~/.bash_history_infinite |
| 51 | PROMPT_COMMAND="history -a; ${PROMPT_COMMAND}" | 46 | PROMPT_COMMAND="history -a; ${PROMPT_COMMAND}" |
| 52 | # PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}" | ||
| 53 | bind '"\e[A": history-search-backward' | 47 | bind '"\e[A": history-search-backward' |
| 54 | bind '"\e[B": history-search-forward' | 48 | bind '"\e[B": history-search-forward' |
| 55 | export HSTR_CONFIG=hicolor | 49 | export HSTR_CONFIG=hicolor |
| @@ -70,9 +64,6 @@ backup() { | |||
| 70 | "ssh.zip $HOME/.ssh" | 64 | "ssh.zip $HOME/.ssh" |
| 71 | "bash_history_infinite.zip $HOME/.bash_history_infinite" | 65 | "bash_history_infinite.zip $HOME/.bash_history_infinite" |
| 72 | "projects.zip $HOME/Projects" | 66 | "projects.zip $HOME/Projects" |
| 73 | "notes.zip $HOME/Notes" | ||
| 74 | "twow.zip $HOME/Games/turtlewow/WTF $HOME/Games/turtlewow/wow.sh" | ||
| 75 | "vanilla+.zip $HOME/Games/vanilla+/WTF $HOME/Games/vanilla+/wow.sh" | ||
| 76 | ) | 67 | ) |
| 77 | 68 | ||
| 78 | for entry in "${archive_sets[@]}"; do | 69 | for entry in "${archive_sets[@]}"; do |
| @@ -83,18 +74,14 @@ backup() { | |||
| 83 | rm -Rf /tmp/$SNAPSHOT | 74 | rm -Rf /tmp/$SNAPSHOT |
| 84 | } | 75 | } |
| 85 | 76 | ||
| 86 | micstatus() { | ||
| 87 | pactl get-source-mute @DEFAULT_SOURCE@ | grep -q "no" && echo 1 || echo 0; | ||
| 88 | } | ||
| 89 | |||
| 90 | slugify() { | 77 | slugify() { |
| 91 | local text="$1" | 78 | local text="$1" |
| 92 | echo "$text" | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9]+/-/g; s/^-+|-+$//g' | 79 | echo "$text" | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9]+/-/g; s/^-+|-+$//g' |
| 93 | } | 80 | } |
| 94 | 81 | ||
| 95 | worldclocks() { | 82 | worldclocks() { |
| 96 | printf "%-18s %s\n" "Local:" "$(TZ='Europe/Ljubljana' date +'%a %H:%M')" | 83 | printf "%-18s %s\n" "Local:" "$(TZ='Europe/Ljubljana' date +'%a %H:%M')" |
| 97 | printf "%-18s %s\n" "Brisbane:" "$(TZ='Australia/Brisbane' date +'%a %H:%M')" | 84 | printf "%-18s %s\n" "Brisbane:" "$(TZ='Australia/Brisbane' date +'%a %H:%M')" |
| 98 | printf "%-18s %s\n" "San Francisco:" "$(TZ='America/Los_Angeles' date +'%a %H:%M')" | 85 | printf "%-18s %s\n" "San Francisco:" "$(TZ='America/Los_Angeles' date +'%a %H:%M')" |
| 99 | printf "%-18s %s\n" "New York:" "$(TZ='America/New_York' date +'%a %H:%M')" | 86 | printf "%-18s %s\n" "New York:" "$(TZ='America/New_York' date +'%a %H:%M')" |
| 100 | } | 87 | } |
