diff --git a/autostart.sh b/autostart.sh new file mode 100755 index 0000000..5b09123 --- /dev/null +++ b/autostart.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +nwg-panel & disown nwg-panel +thunar --daemon & disown thunar +xrandr --output DP-2 --primary +#LIBVIRT_DEFAULT_URI=qemu:///system virsh net-start default +sleep 15 +nextcloud & disown nextcloud +#telegram-desktop -startintray & disown telegram-desktop +#signal-desktop --start-in-tray & disown signal-desktop +#LIBVIRT_DEFAULT_URI=qemu:///system virsh start WindowsVM diff --git a/brb.sh b/brb.sh new file mode 100755 index 0000000..612c3d1 --- /dev/null +++ b/brb.sh @@ -0,0 +1,10 @@ +#!/run/current-system/sw/bin/bash + +play -q /etc/nixos/sounds/brb.mp3& +figlet "WE'LL" | lolcat +sleep .75s +figlet " BE" | lolcat +sleep .75s +figlet " RIGHT" | lolcat +sleep .5s +figlet " BACK" | lolcat diff --git a/dance.sh b/dance.sh new file mode 100755 index 0000000..c5ba759 --- /dev/null +++ b/dance.sh @@ -0,0 +1,5 @@ +#!/run/current-system/sw/bin/bash + +play -q --replay-gain track /etc/nixos/sounds/driftveil.mp3& +clear +chafa --bg 181818 -C on --scale 2 /etc/nixos/assets/toothless.gif diff --git a/hydro.sh b/hydro.sh new file mode 100755 index 0000000..bdd1ee1 --- /dev/null +++ b/hydro.sh @@ -0,0 +1,8 @@ +#!/run/current-system/sw/bin/bash + +while true; do + A=$((900 + RANDOM % 900)) + play /etc/nixos/sounds/alert.mp3 & + dunstify -u critical -t 5000 "Hey, Hydrate you retard!" + sleep $A +done diff --git a/nixhandle.sh b/nixhandle.sh new file mode 100755 index 0000000..ac38847 --- /dev/null +++ b/nixhandle.sh @@ -0,0 +1,149 @@ +#!/usr/bin/env bash + +platform="$(uname)" + +switch() { + git add . + case $os in + m) + darwin-rebuild switch --flake . + figlet "Switched" + nixgit + ;; + n) + nixos-rebuild --use-remote-sudo switch + figlet "Switched" + nixgit + ;; + l) + echo "Work in Progress" + exit 1 + ;; + *) + echo "uhhh...." + exit 1 + ;; + esac +} + +update() { + git add . + case $os in + m) + nix flake udpate . + figlet "Updooted" + nixgit + ;; + n) + sudo nix flake update + nixos-rebuild --use-remote-sudo boot + figlet "Updooted" + nixgit + + ;; + l) + echo "Work in Progress" + exit 1 + ;; + *) + echo "uhhhh....." + exit 1 + ;; + esac +} + +nixgit() { + echo "Do you want to make a commit? [y/N]: " + read git + + if [[ $git = y ]] || [[ $git = Y ]];then + echo "What to label for commit?: " + read commit + git commit -m "$commit" + else + case $1 in + g | git) + figlet "This was an exercise in futility" | lolcat + exit 1 + ;; + u | update) + figlet "Updoot Complete" | lolcat + exit 1 + ;; + s | switch) + figlet "Switch Complete" | lolcat + exit 1 + ;; + *) + echo "uhhhhhh" + exit 1 + ;; + esac + fi + + echo "Do you want to push the commit? [y/N]: " + read push + + if [[ $push == y ]] || [[ $push == Y ]];then + git push + figlet "Commit Pushed" + exit 1 + else + case $1 in + g | git) + figlet "Commit Made" + exit 1 + ;; + u | update) + figlet "Updated" + exit 1 + ;; + s | switch) + figlet "Switched" + exit 1 + ;; + *) + echo "uhhhh" + exit 1 + ;; + esac + fi + exit 1 +} + +case $platform in + Darwin) + cd $HOME/.config/nixos + os="m" + ;; + Linux) + source /etc/os-release + if [[ $ID == nixos ]]; then + cd /etc/nixos + os="n" + else + cd $HOME/.config/nixos + os="l" + fi + ;; + *) + echo "Wtf are you doing?" + exit 1 + ;; +esac + +case $1 in + g | git) + nixgit + ;; + u | update) + update + ;; + s | switch) + switch + ;; + *) + echo "No arguments, provided! g for Git, u for Update, s for Switch" + exit 1 +esac + diff --git a/swwwchange.sh b/swwwchange.sh new file mode 100755 index 0000000..890e02d --- /dev/null +++ b/swwwchange.sh @@ -0,0 +1,45 @@ +#!/run/current-system/sw/bin/bash + +if [[ $# -lt 1 ]] || [[ ! -d $1 ]]; then + echo "Usage: + $0 /etc/nixos/wallpapers" + exit 1 +fi + +sleep 3 + +if [[ $(pidof swww-daemon) ]];then + echo "swww-daemon found, restarting process" + pkill swww-daemon + sleep 3 + swww-daemon & +else + echo "swww-daemon not found, launching swww-daemon" + swww-daemon & +fi + +# Edit below to control the images transition +export SWWW_TRANSITION_FPS=120 +export SWWW_TRANSITION_STEP=150 +export SWWW_TRANSITION_DURATION=10 + +# This controls (in seconds) when to switch to the next image +INTERVAL=300 + +while true; do + find "$1" -type f \ + | while read -r img; do + echo "$((RANDOM % 1000)):$img" + done \ + | sort -n | cut -d':' -f2- \ + | while read -r img; do + if [[ $(pidof swww-daemon) ]];then + swww img "$img" --transition-type any + sleep $INTERVAL + else + swww-daemon & + swww img "$img" --transition-type any + sleep $INTERVAL + fi + done +done diff --git a/tbc.sh b/tbc.sh new file mode 100755 index 0000000..16b9f78 --- /dev/null +++ b/tbc.sh @@ -0,0 +1,5 @@ +#!/run/current-system/sw/bin/bash + +play -q /etc/nixos/sounds/tbc.mp3& +sleep 9.5 +chafa --bg 181818 -d 5 --scale max /etc/nixos/assets/tbc.gif diff --git a/toggle.sh b/toggle.sh new file mode 100755 index 0000000..cf6d2c8 --- /dev/null +++ b/toggle.sh @@ -0,0 +1,12 @@ +#!/run/current-system/sw/bin/bash + +if [[ $(pgrep hydro.sh) ]];then + echo "hydro.sh found, closing" + pkill hydro.sh + dunstify -t 2000 "Hydro is off" +else + echo "Starting hydro.sh" + dunstify -t 2000 "Hydro is on" + /etc/nixos/scripts/hydro.sh & + exit +fi