Compare commits

...

12 Commits

Author SHA1 Message Date
9a3775bf5d Add alternative windows renamer 2024-01-09 19:29:33 -06:00
ffc8664553 Add alternative windows renamer 2024-01-09 19:29:25 -06:00
31d60955a7 Add alternative when multiple files are present 2024-01-09 16:07:08 -06:00
a39db6f4f7 Update WindowsRenameFix.sh 2024-01-09 15:13:32 -06:00
6a95b05553 Delete ros-launcher.sh 2023-09-18 01:35:18 -05:00
53a7f78f6e Added ros-launcher 2023-09-18 01:33:28 -05:00
fb1f205e86 Removed need to recompile xmonad as it is done automatically 2023-08-05 00:20:31 -05:00
253837a1cb Added functional 'paru-update-all' 2023-08-04 18:24:11 -05:00
a244c779f5 Added random-gen 2023-08-04 03:57:19 -05:00
2c556ef774 Updated autostart for polybar 2023-08-02 01:27:15 -05:00
85be0f5b38 Now added the things 2023-08-02 01:24:03 -05:00
76ed372587 Added lots of things 2023-08-02 01:20:08 -05:00
10 changed files with 128 additions and 16 deletions

20
.gitignore vendored Normal file
View File

@ -0,0 +1,20 @@
bootloadHID
compileTimer
dmenu
dmenu_path
dmenu_run
dwm
ec
ethminer
gsearch
mpcInsert
rofi-network-manager.sh
slock
slock-suspend
snake
st
start_dwm
steam-fix.sh
stest
switchcontrol
vis

View File

@ -1,8 +0,0 @@
#!/bin/bash
echo read the comments in this file see a fix
# for f in ./*'('*')'*; do mv -i "$f" "${f/ (*)/}"; done
# for f in ./*/*'('*')'*; do mv -i "$f" "${f/ (*)/}"; done
# for f in ./*/*'('*')'*; do mv -i "$f" "${f/ (*)/}"; done
# etc, for the directory you're in that you want to fix.
# I know this is a garbage implementation, but not the best at bash scripting, so don't know how to recurse through each individual directory

View File

@ -3,7 +3,7 @@
export DISPLAY=:0
#Added some programs here since emptty had issues
polybar &
polybar-restart &
# --- Music Workspace Start ---
#Note: So alacritty specifically (I believe kitty fixed this) has a scaling issue because L/R monitor diff resolutions
@ -29,7 +29,7 @@ xset dpms 300 &
xautolock -locker "slock" -nowlocker "slock -f" -time 5 &
picom --experimental-backends -b &
feh --bg-fill $(/public/wallpapers/mon1.cfg) --bg-fill $(/public/wallpapers/mon2.cfg) &
trayer --edge bottom --align right --widthtype request --padding 6 --SetDockType true --SetPartialStrut true --expand true --monitor 1 --transparent true --alpha 0 --tint 0x555E70 --height 22 &
# /usr/local/bin/trayer-restart # Launch from polybar-restart launcher now
conky -q -c /home/allen/.config/conky-0.conf &
conky -q -c /home/allen/.config/conky-1.conf &
mpDris2 &

View File

@ -14,18 +14,19 @@ echo ''
echo -e $GREEN"================================================================="
echo -e "UPDATE COMPLETED!\n"$NC
read -p "Do you want to recompile xmonad? (y/N): " -i "y" XMONAD_UPDATE
# Not necessary, see https://wiki.archlinux.org/title/xmonad for pacman hook
#read -p "Do you want to recompile xmonad? (y/N): " -i "y" XMONAD_UPDATE
if [ "$XMONAD_UPDATE" == "y" ]; then
xmonad --recompile
fi
#if [ "$XMONAD_UPDATE" == "y" ]; then
# xmonad --recompile
#fi
echo $(cat /etc/pacman.conf | grep "IgnorePkg =")
read -p "DO YOU WANT TO UPDATE DANGEROUS PACKAGES TOO?
RECOMMENDED EVERY 3 MONTHS (y/N): " -i "y" USER_AGREEMENT
if [ "$USER_AGREEMENT" == "y" ]; then
# Install packages bypassing IgnorePgk
sed '/^IgnorePkg/d' /etc/pacman.conf > /tmp/432143214 | paru -Syu --config /tmp/432143214; rm /tmp/432143214
sed '/^IgnorePkg/d' /etc/pacman.conf > /tmp/432143214; paru -Syu --config /tmp/432143214; rm /tmp/432143214
fi
echo -e "\nUPDATE COMPLETED!"$NC

17
polybar-launcher.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
declare -A screen_map
screen_map[DP-2]=0
screen_map[DP-0]=1
if type "xrandr"; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
id=${screen_map[$m]}
MONITOR=$m MONITOR_ID="${screen_map[$m]}" polybar --config=~/.config/polybar/config-$id-top.ini & #TOP
MONITOR=$m MONITOR_ID="${screen_map[$m]}" polybar --config=~/.config/polybar/config-$id-bottom.ini & #BOTTOM
done
fi
# Spawn trayer from here as Z clipping issue can be fixed from restarting trayer after polybar
/usr/local/bin/trayer-restart

View File

@ -1,3 +1,3 @@
#!/bin/bash
killall polybar > /dev/null 2>&1
nohup polybar > /dev/null 2>&1 &
nohup /usr/local/bin/polybar-launcher.sh > /dev/null 2>&1 &

7
random-gen Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
# Would produce x2 the length provided
# openssl rand -hex $1
LENGTH=$1
tr -cd '[:alnum:]' < /dev/urandom | fold -w "${LENGTH}" | head -n 1 | tr -d '\n' ; echo

4
ros-launcher Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
docker run --net=host --device /dev/dri/ -e DISPLAY=$DISPLAY -v $HOME/.Xauthority:/root/.Xauthority:ro -it osrf/ros:humble-desktop
# -v /tmp/.X11-unix:/tmp/.X11-unix

4
trayer-restart Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
killall trayer
nohup trayer --edge bottom --align right --widthtype request --padding 6 --SetDockType true --SetPartialStrut true --expand true --monitor 1 --transparent true --alpha 0 --tint 0x282a2e --height 32 --distancefrom top --distance 5 &> /dev/null 2>&1 &

67
win_fh_rename.py Executable file
View File

@ -0,0 +1,67 @@
#!/usr/bin/python3
# Solution inspired by: https://gist.github.com/kmorcinek/2710267
# This script will convert the date between the parentehsis and get the oldest date
# It will delete the older files and search all sub directories
# This definitely isn't the most efficient, but can process tens of thousands of files in less than a second
import re
from os.path import join
import os.path
from os import walk, rename, remove
import os
import sys
from datetime import datetime
FOLDER_PATH = os.getcwd()
processed = []
for path, subdirs, files in walk(FOLDER_PATH):
for i, name in enumerate(files): # Iterate over the original list
if name in processed:
continue
print('{} / {}'.format(i + 1, len(files)))
# Extract the date from the parentheses using regex
match = re.search(r'\((\d{4}_\d{2}_\d{2} \d{2}_\d{2}_\d{2} UTC)\)', name)
if match:
date_in_parentheses = match.group(1)
# Convert the date to a datetime object for comparison
formatted_date = datetime.strptime(date_in_parentheses, "%Y_%m_%d %H_%M_%S %Z")
# Find all files that match regex
duplicates = [f for f in files if re.sub(r' \(.+\)', '', f) == re.sub(r' \(.+\)', '', name)]
# Find the newest file among duplicates
newest_file = max(duplicates, key=lambda f: datetime.strptime(re.search(r'\((\d{4}_\d{2}_\d{2} \d{2}_\d{2}_\d{2} UTC)\)', f).group(1), "%Y_%m_%d %H_%M_%S %Z"))
print("Newest file found:", newest_file)
# Rename the current file if needed
new_name = re.sub(r' \(.+\)', '', newest_file)
# Move older duplicates to the fixed directory
for duplicate in duplicates:
duplicate_path = join(path, duplicate)
if duplicate != newest_file:
# Check if file exists because it can be deleted already
if os.path.isfile(duplicate_path):
remove(duplicate_path)
print(f"Removed older duplicate: {duplicate_path}")
else:
if os.path.isfile(duplicate_path):
rename(join(path, newest_file), join(path, new_name))
print(f"Renamed: {duplicate_path} to {join(path, new_name)}")
processed.append(duplicate_path)
else:
print(f"Skipping {join(path, name)}")
print(f"Processed {len(processed)} files.")