add laptop configs

This commit is contained in:
Simon Belmont 2025-03-24 13:00:20 -04:00
parent 9b8dd017d8
commit 47fac581ee
46 changed files with 3332 additions and 0 deletions

View file

@ -0,0 +1,2 @@
#!/bin/sh
auracle search --quiet --searchby=name $1 | fzf --color="border:magenta,info:green,header:green,info:yellow,hl:blue,label:magenta" --multi --preview "auracle info {1}" --preview-window=up | xargs -ro auracle clone -C ~/Downloads/AUR

View file

@ -0,0 +1,9 @@
#!/usr/bin/env sh
HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==2{print $2}')
if [ "$HYPRGAMEMODE" = 1 ] ; then
hyprctl --batch "\
keyword decoration:drop_shadow 0;\
keyword decoration:blur:enabled 0"
exit
fi
hyprctl reload

2
dot-files-laptop/.bin/sh/bd.sh Executable file
View file

@ -0,0 +1,2 @@
#!/bin/sh
stat / | grep "Birth" | sed 's/Birth: //g' | cut -b 2-11

View file

@ -0,0 +1,13 @@
#!/bin/sh
# Build package and prompt for cleaning
{
makepkg -si;
read -p "Clean leftover files? [y/n]:" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
git clean -dxfi
fi
}

View file

@ -0,0 +1,68 @@
#!/bin/sh
# Ask for confirmation to build nblood
{
read -p "Build nblood? [y/n]:" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
~/.bin/sh/nblood-compile.sh
fi
}
# Ask for confirmation to build rednukem
{
read -p "Build rednukem? [y/n]:" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
~/.bin/sh/rednukem-compile.sh
fi
}
# Ask for confirmation to build voidsw
{
read -p "Build voidsw? [y/n]:" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
~/.bin/sh/voidsw-compile.sh
fi
}
# Ask for confirmation to build eduke32
{
read -p "Build eduke32? [y/n]:" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
~/.bin/sh/ionfury-compile.sh
fi
}
# Ask for confirmation to build vkquake
{
read -p "Build Quakespasm-spiked? [y/n]:" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
~/.bin/sh/quakespasm-compile.sh
fi
}
# Ask for confirmation to build crispy-doom
{
read -p "Build crispy-doom? [y/n]:" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
~/.bin/sh/crispy-doom-compile.sh
fi
}

View file

@ -0,0 +1,37 @@
#!/bin/sh
# Check for system updates
{
echo -e "\e[94mChecking Official packages updates...
\e[39m-------------------------------------
"
checkupdates
echo -e "\e[91m
Checking AUR packages updates...
\e[39m--------------------------------
"
auracle outdated
}
# Perform system check
{
read -p "Check for errors and failed services? [y/n]:" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
systemctl --failed && journalctl -p 3 -b
fi
}
# Perform update
{
read -p "Perform system update? [y/n]:" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
~/.bin/sh/update.sh
fi
}

View file

@ -0,0 +1,34 @@
#!/bin/sh
# Switch to git directory and clone source
{
cd /home/peter/Downloads/git;
git clone https://github.com/fabiangreffrath/crispy-doom.git;
}
# Build binary
{
cd crispy-doom;
autoreconf -fiv;
./configure;
make;
}
# Install executable @ ~/.bin
{
cd /home/peter/.bin/crispy-doom;
mv /home/peter/.bin/crispy-doom/crispy-doom /home/peter/.bin/crispy-doom/old;
mv /home/peter/.bin/crispy-doom/crispy-doom-setup /home/peter/.bin/crispy-doom/old;
cd /home/peter/Downloads/git/crispy-doom;
cp /home/peter/Downloads/git/crispy-doom/src/crispy-doom /home/peter/.bin/crispy-doom;
cp /home/peter/Downloads/git/crispy-doom/src/crispy-doom-setup /home/peter/.bin/crispy-doom;
chmod 755 /home/peter/.bin/crispy-doom/crispy-doom;
}
# Cleanup
{
rm -rf /home/peter/Downloads/git/crispy-doom;
}

View file

@ -0,0 +1,13 @@
#!/bin/sh
# Ask to connect to server via SSH
{
read -p "Connect to server via SSH? [y/n]:" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
ssh kitty +kitten ssh debianbox
fi
}

View file

@ -0,0 +1,2 @@
#!/bin/sh
kitty --session ~/.config/kitty/session --listen-on=unix:@mykitty

View file

@ -0,0 +1,32 @@
#!/bin/sh
# Switch to git directory and clone source
{
cd /home/peter/Downloads/git;
git clone https://voidpoint.io/terminx/eduke32.git;
}
# Build binary
{
cd eduke32;
make;
}
# Install executable @ ~/.bin
{
cd /home/peter/.bin/eduke32;
mv /home/peter/.bin/eduke32/eduke32 /home/peter/.bin/eduke32/old;
mv /home/peter/.bin/eduke32/mapster32 /home/peter/.bin/eduke32/old;
cd /home/peter/Downloads/git/eduke32;
cp /home/peter/Downloads/git/eduke32/eduke32 /home/peter/.bin/eduke32;
cp /home/peter/Downloads/git/eduke32/mapster32 /home/peter/.bin/eduke32;
chmod 755 /home/peter/.bin/eduke32/eduke32;
}
# Cleanup
{
rm -rf /home/peter/Downloads/git/eduke32;
}

View file

@ -0,0 +1,2 @@
#!/bin/sh
pacman -Qq | fzf --color="border:magenta,info:green,header:green,info:yellow,hl:blue,label:magenta" --multi --preview "pacman -Qi {1}" --preview-window=up | xargs -ro sudo pacman -R

View file

@ -0,0 +1,2 @@
#!/bin/sh
pacman -Slq | fzf --color="border:magenta,info:green,header:green,info:yellow,hl:blue,label:magenta" --multi --preview "pacman -Si {1}" --preview-window=up | xargs -ro sudo pacman -S

View file

@ -0,0 +1,32 @@
#!/bin/sh
# Switch to git directory and clone source
{
cd /home/peter/Downloads/git;
git clone https://github.com/nukeykt/NBlood.git;
}
# Build binary
{
cd NBlood;
make blood;
}
# Install executable @ ~/.bin
{
cd /home/peter/.bin/NBlood;
mv /home/peter/.bin/NBlood/nblood /home/peter/.bin/NBlood/old;
mv /home/peter/.bin/NBlood/nblood.pk3 /home/peter/.bin/NBlood/old;
cd /home/peter/Downloads/git/NBlood;
cp /home/peter/Downloads/git/NBlood/nblood /home/peter/.bin/NBlood;
cp /home/peter/Downloads/git/NBlood/nblood.pk3 /home/peter/.bin/NBlood;
chmod 755 /home/peter/.bin/NBlood/nblood;
}
# Cleanup
{
rm -rf /home/peter/Downloads/git/NBlood;
}

View file

@ -0,0 +1,20 @@
#!/bin/sh
# Check for orphans then asks for removal
{
while [[ $(pacman -Qtdq) ]];
do
pacman -Qtdq;
read -p "Remove orphaned packages? [y/n]:" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
sudo pacman -R $(pacman -Qtdq)
elif [[ -n $(pacman -Qtdq) ]];
then
exit
fi
done
}

View file

@ -0,0 +1,13 @@
#!/bin/sh
#Check PKGBUILD file
{
less PKGBUILD;
read -p "Build package? [y/n]:" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
~/.bin/sh/build.sh
fi
}

View file

@ -0,0 +1,32 @@
#!/bin/sh
# Switch to git directory and clone source
{
cd /home/peter/Downloads/git;
git clone https://github.com/Shpoike/Quakespasm.git;
}
# Build binary
{
cd /home/peter/Downloads/git/Quakespasm/Quake;
make;
}
# Install executable @ ~/.bin
{
cd /home/peter/.bin/Quakespasm;
mv /home/peter/.bin/Quakespasm/quakespasm /home/peter/.bin/Quakespasm/old;
mv /home/peter/.bin/Quakespasm/quakespasm.pak /home/peter/.bin/Quakespasm/old;
cd /home/peter/Downloads/git/Quakespasm/Quake;
cp /home/peter/Downloads/git/Quakespasm/Quake/quakespasm /home/peter/.bin/Quakespasm;
cp /home/peter/Downloads/git/Quakespasm/Quake/quakespasm.pak /home/peter/.bin/Quakespasm;
chmod 755 /home/peter/.bin/Quakespasm;
}
# Cleanup
{
rm -rf /home/peter/Downloads/git/Quakespasm;
}

View file

@ -0,0 +1,12 @@
#!/bin/sh
# Prompt Reboot
{
read -p "Reboot now? [y/n]:" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
command shutdown -r now
fi
}

View file

@ -0,0 +1,32 @@
#!/bin/sh
# Switch to git directory and clone source
{
cd /home/peter/Downloads/git;
git clone https://github.com/nukeykt/NBlood.git;
}
# Build binary
{
cd NBlood;
make rednukem;
}
# Install executable @ ~/.bin
{
cd /home/peter/.bin/Rednukem;
mv /home/peter/.bin/Rednukem/rednukem /home/peter/.bin/Rednukem/old;
mv /home/peter/.bin/Rednukem/dn64widescreen.pk3 /home/peter/.bin/Rednukem/old;
cd /home/peter/Downloads/git/NBlood;
cp /home/peter/Downloads/git/NBlood/rednukem /home/peter/.bin/Rednukem;
cp /home/peter/Downloads/git/NBlood/dn64widescreen.pk3 /home/peter/.bin/Rednukem;
chmod 755 /home/peter/.bin/Rednukem/rednukem;
}
# Cleanup
{
rm -rf /home/peter/Downloads/git/NBlood;
}

View file

@ -0,0 +1,12 @@
#!/bin/sh
# Prompt Reboot
{
read -p "Shutdown now? [y/n]:" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
command shutdown -h now
fi
}

View file

@ -0,0 +1,10 @@
#!/bin/sh
#https://wiki.archlinux.org/title/steam#Changing_the_Steam_notification_position
mkdir -p ~/.steam/root/skins
cd ~/.steam/root/skins
mkdir -p StopAnimations/resource
cp -r ~/.steam/root/resource/styles StopAnimations/resource
sed -i '/Notifications.SlideDirection/ s/"[A-Za-z]*"/"None"/' StopAnimations/resource/styles/* #no animation sliding
sed -i '/Notifications.FadeInTime/ s/"0.[0-9+]*"/"0.0"/' StopAnimations/resource/styles/* #no fade in time for notifications
sed -i '/Notifications.FadeOutTime/ s/"0.[0-9+]*"/"0.0"/' StopAnimations/resource/styles/* #no fade out time for notifications
sed -i '/Notifications.StackSize/ s/"[0-9]*"/"5"/' StopAnimations/resource/styles/* #show max 5 notifications instead of max 3 at the same time

View file

@ -0,0 +1,2 @@
#!/bin/sh
swaylock -f -i eDP-1:~/.wallpapers/castlevania.png --inside-color "#44475a" --inside-clear-color "#50fa7b" --ring-color "#ff79c6" --text-caps-lock-color "#f8f8f2" --ring-caps-lock-color "#f8f8f2" --key-hl-color "#50fa7b"

View file

@ -0,0 +1,166 @@
#!/bin/env bash
#
# Written by Anthony Lobianco, 01/23/2014
#
# A simple script to batch rename television files
#
# USAGE
# -----
# chmod a+x tv_rename.sh
# ./tv_rename.sh -d /path/to/show/S01
#
# CHANGELOG
# ---------
#
# 1.0.0
# -----
# initial commit
#
# 1.0.1
# -----
# check to make sure input directory exists
#
# 1.0.2
# -----
# handle file types other than .mkv
# make sure new format has same extension as old file
# make sure new format includes the SXXEYY placeholder
#
# 1.0.3
# -----
# if SXXEYY pattern is not present, automatically determine it from filename
#
VRS=1.0.3
bold=`tput bold` # bold characters in echo
normal=`tput sgr0` # normal characters in echo
echo " "
echo "BATCH RENAME SCRIPT v$VRS"
echo -n "server: "
echo $SSH_CONNECTION | awk '{print $3}'
echo " "
DIR=""
while getopts ":d:" OPTION
do
case $OPTION in
d)
if [ "$OPTARG" = "." ]; then
DIR=`pwd`
else
DIR="$OPTARG"
fi
;;
esac
done
if [ "$DIR" = "" ]; then
echo "no directory specified (use -d /path/to/directory/)"
echo "EXIT"
exit 1
elif [ ! -d "$DIR" ]; then
echo "$DIR does not exist"
echo "EXIT"
exit 1
fi
echo -e "renaming files in:\t ${bold}${DIR}${normal}"
LAST_FILE=`ls -l "$DIR" | tail -1 | awk '{print $NF}'`
FILE_TYPE=`basename $LAST_FILE | awk -F . '{print $NF}'`
echo -e "last file looks like:\t ${bold}${LAST_FILE}${normal}\n"
rename_files() {
local format=$1
local dry_run=$2
# find SXXEYY pattern
REGEX="([sS]([0-9]{2,}|[X]{2,})[eE]([0-9]{2,}|[Y]{2,}))"
if [[ ! $format =~ $REGEX ]]; then
echo "could not find SXXEYY pattern in new format"
echo " "
continue
else
MATCH="${BASH_REMATCH[1]}"
fi
# needed if directory name has whitespace (e.g. /media/Family Guy/)
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
SEASON=`basename "$DIR"`
EPISODE=1
for ITEM in $(find "$DIR" -type f -name "*.${FILE_TYPE}" | sort); do
if (( $EPISODE < 10 )); then
SE="${SEASON}E0${EPISODE}"
else
SE="${SEASON}E${EPISODE}"
fi
if [[ $MATCH != $SE ]]; then
FILE="${format/$MATCH/$SE}"
else
FILE=$format
fi
# list the files during dry run, rename them otherwise
if $dry_run; then
echo -e " mv `basename $ITEM` \n -> $FILE"
else
if [[ `basename $ITEM` == $FILE ]]; then
echo "rename not needed for `basename $ITEM`"
else
echo -e "renaming $ITEM \n to -> \t $DIR/$FILE"
mv $ITEM "$DIR/$FILE"
fi
fi
echo " "
EPISODE=$((EPISODE + 1))
done
IFS=$SAVEIFS
}
echo "what format do you want to use to rename files?"
echo -e "(ex: Breaking.Bad.SXXEYY.1080p.BluRay.DTS.x264-rovers.mkv)\n"
while read -ep "[format]: " FORMAT
do
echo " "
# do some error checks
if [[ $FORMAT != *.${FILE_TYPE} ]]; then
echo "make sure new format has same file type extension (.${FILE_TYPE})"
echo " "
continue
fi
rename_files $FORMAT true
echo " "
while read -ep "[continue? y/n]: " CONTINUE
do
if [[ $CONTINUE = y ]]; then
break
else
continue 2
fi
done
echo " "
rename_files $FORMAT false
break
done
echo " "
echo "DONE"
exit 0

View file

@ -0,0 +1,29 @@
#!/bin/sh
# Perform update
sudo pacman -Syu
# Check pacdiff
{
read -p "Execute pacdiff? [y/n]:" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
pacdiff -s
fi
}
# Check for orphans
{
read -p "Check for orphan packages? [y/n]:" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
sudo bash /home/peter/.bin/sh/orphans.sh
fi
}
# Prompt reboot
~/.bin/sh/reboot.sh

View file

@ -0,0 +1,49 @@
#!/bin/sh
# Check for updates
{
read -p "Check for updates? [y/n]:" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
~/.bin/sh/checkupdates.sh
fi
}
# Perform system check
{
read -p "Check for errors and failed services? [y/n]:" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
systemctl --failed && journalctl -p 3 -b
fi
}
# Perform update
{
read -p "Perform system update? [y/n]:" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
sudo pacman -Syu;
fi
}
# Check pacdiff
{
read -p "Execute pacdiff? [y/n]:" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
sudo pacdiff
fi
}
# Prompt reboot
~/.bin/sh/reboot.sh

View file

@ -0,0 +1,30 @@
#!/bin/sh
# Switch to git directory and clone source
{
cd /home/peter/Downloads/git;
git clone https://voidpoint.io/terminx/eduke32.git;
}
# Build binary
{
cd eduke32;
make voidsw;
}
# Install executable @ ~/.bin
{
cd /home/peter/.bin/voidsw;
mv /home/peter/.bin/voidsw/voidsw /home/peter/.bin/voidsw/old;
cd /home/peter/Downloads/git/eduke32;
cp /home/peter/Downloads/git/eduke32/voidsw /home/peter/.bin/voidsw;
chmod 755 /home/peter/.bin/voidsw/voidsw;
}
# Cleanup
{
rm -rf /home/peter/Downloads/git/eduke32;
}

View file

@ -0,0 +1,19 @@
#!/usr/bin/env bash
# weather.sh
for i in {1..5}
do
text=$(curl -s "https://v2.wttr.in/$1?format=1&m")
if [[ $? == 0 ]]
then
text=$(echo "$text" | sed -E "s/\s+/ /g")
tooltip=$(echo -ne "Santo Domingo, Dominican Republic:";curl -s "https://wttr.in/$1?format=2&m")
if [[ $? == 0 ]]
then
tooltip=$(echo "$tooltip" | sed -E "s/\s+/ /g")
echo "{\"text\":\"$text\", \"tooltip\":\"$tooltip\"}"
exit
fi
fi
sleep 2
done
echo "{\"text\":\"error\", \"tooltip\":\"error\"}"