Compare commits
12 Commits
87ac7b2062
...
main
Author | SHA1 | Date | |
---|---|---|---|
9a3775bf5d | |||
ffc8664553 | |||
31d60955a7 | |||
a39db6f4f7 | |||
6a95b05553 | |||
53a7f78f6e | |||
fb1f205e86 | |||
253837a1cb | |||
a244c779f5 | |||
2c556ef774 | |||
85be0f5b38 | |||
76ed372587 |
20
.gitignore
vendored
Normal file
20
.gitignore
vendored
Normal 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
|
@ -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
|
@ -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 &
|
||||
|
@ -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
17
polybar-launcher.sh
Executable 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
|
@ -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
7
random-gen
Executable 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
4
ros-launcher
Executable 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
4
trayer-restart
Executable 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
67
win_fh_rename.py
Executable 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.")
|
Reference in New Issue
Block a user