This file contains 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
math.randomseed(os.time()) | |
math.random() | |
math.random() | |
math.random() | |
function math.randomchoice(t) --Selects a random item from a table | |
local keys = {} | |
for key, value in pairs(t) do | |
keys[#keys + 1] = key --Store keys in another table | |
end | |
index = keys[math.random(1, #keys)] |
This file contains 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
$theme = Get-ChildItem $env:UserProfile\AppData\Local\Programs\oh-my-posh\themes\ | Get-Random | |
echo $theme.name | |
oh-my-posh --init --shell pwsh --config $theme.FullName | Invoke-Expression |
This file contains 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 | |
# Made by https://github.com/MRDGH2821 | |
# Migrates the /DATA sub folders to specified external storage. | |
# Run as sudo if there are problems in stoping or symlinking. | |
# Stops casa os & docker services to symlink folders without problems. | |
systemctl stop casaos* | |
systemctl stop docker* |
This file contains 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 | |
mkdir -p ~/bin | |
# Random theme loader | |
curl -s https://gist.githubusercontent.com/MRDGH2821/47294f0c61f3c9f061e8ffd28e1a538b/raw/6ba2e9436e5ef3b341485bbd3ac12678d650444a/oh-my-posh-random.sh >> ~/.bashrc | |
# Add ~/bin to path | |
export PATH=~/bin:$PATH |
This file contains 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
# Oh my posh random theme initializer | |
export PATH=~/bin:$PATH #provide path to oh-my-posh install folder | |
omp_themes_dir="$HOME/.cache/oh-my-posh/themes" #provide path to oh-my-posh installed themes | |
# Get a list of all JSON theme files in the directory | |
omp_themes=($(ls $omp_themes_dir/*.json)) | |
# Get the number of JSON theme files | |
num_files=${#omp_themes[@]} |