๐
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ## Note: This script requires curl, awk, and optionally sha256sum. | |
| ## Most distros have these installed by default, but just in case, I decided to leave this comment here. | |
| clear && echo -e "Please input the path in which you'd like to download the apk.\nInput \".\" if you want to download to your current path." | |
| read -p "> " dir | |
| cd "$dir" || echo "Could not enter the directory, are you sure it exists? Using current directory instead." | |
| clear && echo -e "What would you like to do?\n\n1. Download Wire.\n2. Download Signal.\n" | |
| read -p "> " ans | |
| case $ans in | |
| 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ### This is a script used to convert YouTube and invidio video URLs to locally proxied invidio URLs. | |
| main() { | |
| clear | |
| echo "Please input an invidio or YouTube video url." | |
| read -r base | |
| ID="$(echo "$base" | sed -n -e 's/^.*=//p')" | |
| new="https://invidio.us/watch?v=$ID&local=true" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ### Foreward | |
| ## | |
| ## This script is most likely shit, and you'd be better off making your own. | |
| ## | |
| ### Functions | |
| play() { | |
| echo -e " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ## The idea is to create a dmenu prompt with fancy names (i.e nameOfDirectory/nameOfScriptWithoutExtension) and open them in emacs. | |
| ## TODO: Open submenu if more than one of the same file is found. | |
| script_dir="$HOME/scripts" # Set to whatever dir you store your scripts in. I personally prefer $HOME/scripts. | |
| editor="$EDITOR" # Set to whatever editor you prefer, if you don't already have $EDITOR set. | |
| # Print names of scripts without extensions into rofi's dmenu mode, and save the selection to the choice variable. | |
| choice="$(ls -1 "$script_dir" | sed 's/\.[^.]*$//' | rofi -dmenu -p "Select script to edit")" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); | |
| /* Hide horizontal tabs at the top of the window */ | |
| #tabbrowser-tabs { | |
| visibility: collapse !important; | |
| } | |
| /*Collapse in default state and add transition*/ | |
| #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] { | |
| overflow: hidden; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ "$(playerctl -p spotify,mpd metadata -f "{{ playerName }}")" == "mpd" ]; then | |
| dunstify "$(echo -e "$(playerctl -p spotify,mpd metadata -f "Player: {{ playerName }}\n\nTIT: {{ title }}\nALB: {{ album }}\nART: {{ artist }}")")" -I "/tmp/cover.png" | |
| elif [ "$(playerctl -p spotify,mpd metadata -f "{{ playerName }}")" == "spotify" ]; then | |
| id="$(basename "$(dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:org.mpris.MediaPlayer2.Player string:Metadata | awk -F '"' 'BEGIN {RS=" entry"}; /"mpris:artUrl"/ {a = $4} END {print a}')")" | |
| url="https://i.scdn.co/image/$id" | |
| curl "$url" -o "/tmp/cover-spotify.jpg" | |
| dunstify "$(echo -e "$(playerctl -p spotify,mpd metadata -f "Player: {{ playerName }}\n\nTIT: {{ title }}\nALB: {{ album }}\nART: {{ artist }}")")" -I "/tmp/cover-spotify.jpg" | |
| else | |
| dunstify "$(echo -e "$(playerctl -p spotify,mpd metadata -f "Player: {{ playerName }}\n\nTIT: {{ title }}\nALB: {{ album |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| ## A dice roll script. | |
| ## Usage: dice amount | |
| ## Example: dice 5 | |
| ## Explanation: It will roll 5 6-sided dice, add their results, and output the dice roll. | |
| ## | |
| ## Dependencies: bcalc (https://github.com/Phate6660/bcalc), shuf | |
| amount="${1}" | |
| n=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #[test] | |
| fn echo_check() { | |
| use crate::{ShellState, process_input}; | |
| let mut shell_state = ShellState::init(); | |
| let success = process_input(&mut shell_state, "echo test".to_string()); | |
| assert!(success, "echo test failed!"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| body, textarea, input, button { | |
| font-size: 11px; | |
| } | |
| a { | |
| color: green; | |
| } | |
| p>a { | |
| color: green !important; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ## Simple script to list version numbers of critical development tools | |
| ## Original by LFS team / contributor(s), modified by Phate6660. | |
| ## Startup | |
| export LC_ALL=C | |
| ## Aliases | |
| bash_version="$(bash --version | head -n1 | cut -d" " -f2-4)" | |
| binutils_version="$(ld --version | head -n1 | cut -d" " -f3-)" |
OlderNewer