reinit 3. git reset --hard was not right. thanks ai

This commit is contained in:
iceyrazor
2024-11-24 04:50:59 -06:00
commit 0b274c969e
211 changed files with 26301 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
cd ~/
fsynca () {
# t?
rsync -RUurvn --size-only --delete-after $exclude $syncfile "$target"
}
fsyncb () {
printf "===confirm changes?\n"
read -p "y/n: " uinput
if [ "$uinput" != "n" ] && [ "$uinput" != "N" ]; then
printf "\n\n\n"
rsync -PRUurv --size-only --delete-after $exclude $syncfile "$target"
printf "\n===end sync\n---------\n\n"
fi
}
syncfile="stuff .bash_profile .bashrc .surf .wezterm.lua .tmux.conf .gtkrc-2.0 .profile .urlview .vimrc .xinitrc .Xresources .zshrc .newsboat .gnupg .ssh .local/bin/lf-gadgets .config/dwm .config/awesome .config/gtk-3.0 .config/rofi .config/lf .config/picom.conf .config/nvim .config/screenkey.json .config/vesktop/themes .keepass .config/Pinta"
#sync game stuff
target="/home/iceyrazor/mnt-backups/LINUX FILES/home/iceyrazor"
exclude="--exclude **/cc-survival --exclude node_modules --exclude dontsync --exclude **/iceys-linux-stuffs"
fsynca
printf "==CC-survival unsynced\n\n"
fsyncb

View File

@@ -0,0 +1,21 @@
cd ~/
fsync () {
rsync -RUurvn --size-only --delete-after $exclude $syncfile "$target"
printf "===commit these changes?\n"
read -p "y/n: " uinput
if [ "$uinput" != "n" ] && [ "$uinput" != "N" ]; then
printf "\n\n\n"
rsync -PRUurv --size-only --delete-after $exclude $syncfile "$target"
printf "\n===end sync\n---------\n\n"
fi
}
syncfile=".bash_profile .bashrc .gtkrc-2.0 .wezterm.lua .profile .urlview .vimrc .Xresources .zshrc .config/dwm .config/awesome .config/rofi .config/lf .config/picom.conf .config/nvim .config/screenkey.json stuff/manual-programs/suckless"
syncfile="$syncfile stuff/scripts/system/stbar stuff/scripts/system/url-handler.sh stuff/scripts/system/backup/copy-to-git.sh stuff/scripts/system/backup/backup.sh"
syncfile="$syncfile stuff/scripts/system/neoboot.sh stuff/scripts/system/math.sh stuff/scripts/system/bri.sh stuff/scripts/system/restart-pipe.sh stuff/scripts/system/set-pri-java.sh"
target=~/stuff/iceys-linux-stuffs
exclude="--exclude check_weth.sh --exclude lua-ls-cc-tweaked --exclude .config/nvim/plugin"
fsync

1
stuff/scripts/system/bri.sh Executable file
View File

@@ -0,0 +1 @@
echo "$1" > /sys/class/backlight/intel_backlight/brightness

13
stuff/scripts/system/math.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
expression=$1
precision=$2
if [ "$precision" == "" ]; then
precision=1;
fi;
# Perform arithmetic operation using awk
result=$(awk "BEGIN {printf \"%.${precision}f\n\", $expression}" | sed 's/\.0$//')
# Print the result
echo "$result"

28
stuff/scripts/system/neoboot.sh Executable file
View File

@@ -0,0 +1,28 @@
normal() {
randnum=$(($RANDOM % 2))
if [ "$randnum" == "1" ]; then
# fastfetch --localip-show-ipv4 0 # | lolcat -as 10000 -S 100
fortune | cowsay -f fox | lolcat
else
fortune | cowsay -f dragon | lolcat
fi
printf "\n--------------------------------------------------------\n" | lolcat
lsblk --filter 'NAME=~"sd[abcde]"' -o NAME,MOUNTPOINTS | lolcat
}
laptop() {
if [ "$(($RANDOM % 2))" == "1" ]; then
fastfetch --localip-show-ipv4 0 | lolcat -as 10000 -S 100
else
uwufetch | lolcat -as 10000 -S 100
fi
printf "\n--------------------------------------------------------\n" | lolcat -S 100
lsblk --filter 'NAME=~"sd[abcde]"' -o NAME,MOUNTPOINTS | lolcat -as 10000 -S 100
}
if [[ "$(cat /etc/hostname)" == "iceynethp1" ]]; then
laptop
else
normal
fi

View File

@@ -0,0 +1 @@
systemctl --user restart wireplumber pipewire pipewire-pulse

View File

@@ -0,0 +1 @@
sudo renice -20 -p $(sudo pidof java)

View File

@@ -0,0 +1,2 @@
full_stat:false
wifi_device:wlo1

View File

@@ -0,0 +1,10 @@
pids=$(ps -AO pid | awk '/stbar.sh|newsboat-fetch.sh/ {print $1}')
# pids=$(pstree -pla | grep stbar | sed 's,|,,g' | sed 's/ //g' | sed 's/^ //g' | sed 's/ .*//' | sed 's/[^0-9]*//g')
# pids2=$(ps -AO pid | grep "sh ./newsboat-fetch.sh" | sed 's/S.*//g' | sed 's/^ *//g')
echo $pids
$(sleep 3 && xsetroot -name "") & disown
sudo kill -KILL $pids
doas kill -KILL $pids

View File

@@ -0,0 +1,81 @@
#!/bin/bash
delim='|'
curr_dir="$(cd "$(dirname "$0")" && pwd)"
#wifi_device=$(cat $curr_dir/config.txt | grep wifi_device | sed 's/wifi_device://')
wifi_device="wlp4s0"
# curr_dir/check_weth.sh "$cur_dir" &
status(){
echo " "
#wifi up or no
sed "s/down/\:\(/;s/up/\:\)/" /sys/class/net/$wifi_device/operstate
echo "$delim"
if [ "$(ls /sys/class/power_supply/BAT0/)" ]; then
bat_power=$(cat /sys/class/power_supply/BAT0/capacity)
echo $bat_is_flash
if (( $bat_power < 15 )); then
bat_power=$bat_power%!!!!!!!!!!!
else
bat_power=$bat_power%
fi
echo $bat_power
echo "$delim"
fi
#rss
echo RSS:$(newsboat -x print-unread|sed "s/\s.*//; s/Error:/IA/")
echo "$delim"
if [ "$(cat $curr_dir/config.txt | grep full_stat)" == "full_stat:true" ]; then
#cpu
echo CPU:$(ps axch -o cmd:15,%cpu --sort=-%cpu | sed "1q")%
echo "$delim"
#mem
echo Mem:$(free -mlw | grep Mem: | sed "s/Mem\:\W*[0-9]*\W*//; s/ .*//")
echo $(ps axch -o cmd:15,%mem --sort=-%mem | sed "1q")%
else
#cpu
echo CPU:$(ps axch -o cmd:15,%cpu --sort=-%cpu | sed "1q" | sed 's/.* //')%
#mem
echo Mem:$(free -mlw | grep Mem: | sed "s/Mem\:\W*[0-9]*\W*//; s/ .*//")
fi
echo "$delim"
#space
#echo \/$(df -h | grep /dev/nvme0n1p3 | sed "s/\/dev\/nvme0n1p3 *[0-9]*.[0-9]*. *[0-9]*.[0-9]*. *//" | sed "s/ .*//")
#echo \~$(df -h | grep /dev/nvme0n1p4 | sed "s/\/dev\/nvme0n1p4 *[0-9]*.[0-9]*. *[0-9]*.[0-9]*. *//" | sed "s/ .*//")
echo $(df -h -x=used /dev/mapper/system-root | sed '1d' | awk '{print $4}')
echo "$delim"
#weather
if [ "$(cat $curr_dir/weth_str.txt)" != "" ]; then
printf "$(cat $curr_dir/weth_str.txt)"
echo "$delim"
fi
}
#while :; do
echo "$(status | tr '\n' ' '0)"
# sleep 1s
#end

View File

@@ -0,0 +1,84 @@
#!/bin/bash
delim='|'
curr_dir="$(cd "$(dirname "$0")" && pwd)"
wifi_device=$(cat $curr_dir/config.txt | grep wifi_device | sed 's/wifi_device://')
# curr_dir/check_weth.sh "$cur_dir" &
status(){
echo " "
#wifi up or no
sed "s/down/\:\(/;s/up/\:\)/" /sys/class/net/$wifi_device/operstate
echo "$delim"
#bat
bat_power=$(cat /sys/class/power_supply/BAT0/capacity)
echo $bat_is_flash
if (( $bat_power < 15 )); then
bat_power=$bat_power%!!!!!!!!!!!
else
bat_power=$bat_power%
fi
echo $bat_power
echo "$delim"
#rss
echo RSS:$(newsboat -x print-unread|sed "s/\s.*//; s/Error:/IA/")
echo "$delim"
if [ "$(cat $curr_dir/config.txt | grep full_stat)" == "full_stat:true" ]; then
#cpu
echo CPU:$(ps axch -o cmd:15,%cpu --sort=-%cpu | sed "1q")%
echo "$delim"
#mem
echo Mem:$(free -mlw | grep Mem: | sed "s/Mem\:\W*[0-9]*\W*//; s/ .*//")
echo $(ps axch -o cmd:15,%mem --sort=-%mem | sed "1q")%
else
#cpu
echo CPU:$(ps axch -o cmd:15,%cpu --sort=-%cpu | sed "1q" | sed 's/.* //')%
#mem
echo Mem:$(free -mlw | grep Mem: | sed "s/Mem\:\W*[0-9]*\W*//; s/ .*//")
fi
echo "$delim"
#space
echo \/$(df -h | grep /dev/nvme0n1p3 | sed "s/\/dev\/nvme0n1p3 *[0-9]*.[0-9]*. *[0-9]*.[0-9]*. *//" | sed "s/ .*//")
echo \~$(df -h | grep /dev/nvme0n1p4 | sed "s/\/dev\/nvme0n1p4 *[0-9]*.[0-9]*. *[0-9]*.[0-9]*. *//" | sed "s/ .*//")
echo "$delim"
#weather
if [ "$(cat $curr_dir/weth_str.txt)" != "" ]; then
printf "$(cat $curr_dir/weth_str.txt)"
echo "$delim"
fi
#date
date '+%a %m/%d/%Y %I:%M%p'
}
while :; do
xsetroot -name "$(status | tr '\n' ' '0)"
sleep 1s
done

View File

View File

@@ -0,0 +1,18 @@
url=$@
prompt_message="Open with:"
echo $url
choices="
clipboard
firefox
"
choice=$(echo "$choices" | sed /^$/d | dmenu -i -p "$prompt_message")
if [ "$choice" == "clipboard" ]; then
printf "$url" | xclip -selection clipboard
else
$choice "$url"
fi