diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-06-07 17:48:09 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-06-07 17:48:09 +0800 |
| commit | 470a9106d391424c43a5640a646f37b1e5d28fcd (patch) | |
| tree | 0e8ff63cff46f95224812755058496ae1bec12ac | |
| parent | f798244d6c3a3f0a686622435f1c1ce9353bcf93 (diff) | |
bump
| -rw-r--r-- | escapeEnv.py | 23 | ||||
| -rwxr-xr-x | hyprbri | 5 | ||||
| -rwxr-xr-x | hyprshot | 2 | ||||
| -rwxr-xr-x | idle.sh | 16 | ||||
| -rw-r--r-- | logs/chat.log | 26 | ||||
| -rwxr-xr-x | rec.sh | 2 | ||||
| -rwxr-xr-x | update.sh | 4 | ||||
| -rwxr-xr-x | vim | 2 | ||||
| -rwxr-xr-x | walls/swww.sh | 7 | ||||
| -rwxr-xr-x | walls/update.sh | 3 |
10 files changed, 57 insertions, 33 deletions
diff --git a/escapeEnv.py b/escapeEnv.py new file mode 100644 index 0000000..9ff4f84 --- /dev/null +++ b/escapeEnv.py @@ -0,0 +1,23 @@ +from sys import argv + +def main(): + if len(argv) < 2: + print("Usage: python escapeEnv.py <string>") + return + + input = argv[1].split() + for i in range(len(input)): + first = True + pos = -1 + for j in range(len(input[i])): + if input[i][j] == "=" and pos == -1: + pos = j + input[i] = input[i][:j+1] + '"' + input[i][j+1:] + '"' + + pos = -1 + + print(' '.join(input)) + + +if __name__ == "__main__": + main() @@ -1,9 +1,7 @@ #!/usr/bin/env bash -# Icons iDIR='/usr/share/archcraft/icons/dunst' -# Notify notify_bl() { backlight="$(brillo -G)" current="${backlight%%%}" @@ -21,17 +19,14 @@ notify_bl() { get_icon && dunstify -u low -h string:x-dunst-stack-tag:obbacklight -i "$icon" "Brightness : $(brillo -G)" } -# Increase brightness inc_backlight() { brillo -A 10 # && notify_bl } -# Decrease brightness dec_backlight() { brillo -U 10 # && notify_bl } -# Execute accordingly if [[ "$1" == "--get" ]]; then brillo -G elif [[ "$1" == "--inc" ]]; then @@ -32,7 +32,7 @@ notify_view () { if $($HOME/scripts/sysutil.sh getSound screenshot); then $HOME/scripts/sysutil.sh playSound screen-capture.oga & fi # viewnior ${dir}/"$file" # blobdrop -f gui ${dir}/"$file" -b -t & - dragon --icon-only --thumb-size 512 --and-exit ${dir}/"$file" & + dragon-drop --icon-only --thumb-size 512 --and-exit ${dir}/"$file" & ( sleep 10 && kill $! ) & else # the notifcation too annoying @@ -23,12 +23,12 @@ IDLEBACKTIME=100 if [ ! -d $lockpath ]; then /sbin/echo "Lock path does not exist, creating it" - sudo /sbin/mkdir -vp $lockpath || /sbin/echo "Failed to create lock path at $lockpath" + sudo -n /sbin/mkdir -vp $lockpath || /sbin/echo "Failed to create lock path at $lockpath" fi function cleanup() { /sbin/echo "Cleaning up..." - sudo /sbin/rm -rf $lockpath || /sbin/echo "Failed removing locks at $lockpath" + sudo -n /sbin/rm -rf $lockpath || /sbin/echo "Failed removing locks at $lockpath" /sbin/echo "Exiting..." exit 0 } @@ -41,7 +41,7 @@ function idle() { fi /sbin/echo "User is idle(afk) in $(date)" /sbin/echo "Creating lock file" - sudo /sbin/touch $lockpath/$lockfile || /sbin/echo "Failed to create lock file at $lockpath/$lockfile" + sudo -n /sbin/touch $lockpath/$lockfile || /sbin/echo "Failed to create lock file at $lockpath/$lockfile" #if [ $mutev ]; then # soundlevel=$(awk -F"[][]" '/Left:/ { print $2 }' <(amixer sget Master)) # amixer set Master 0% @@ -101,14 +101,14 @@ function stopidle() { unset m fi /sbin/echo "Removing lock file" - sudo /sbin/rm -f $lockpath/$lockfile || /sbin/echo "Failed removing lock file at $lockpath/$lockfile" + sudo -n /sbin/rm -f $lockpath/$lockfile || /sbin/echo "Failed removing lock file at $lockpath/$lockfile" } if [ "$1" ]; then if [[ "$1" == '-d' || "$1" == '--daemon' ]]; then if ! pgrep "$0"; then /sbin/echo -n "PID: " - /sbin/echo $$ | sudo /sbin/tee $lockpath/$pidfile || echo "PID Grab failed" + /sbin/echo $$ | sudo -n /sbin/tee $lockpath/$pidfile || echo "PID Grab failed" else /sbin/echo "An instance of this program is dectected, please close that instance in order to launch another" fi @@ -135,13 +135,13 @@ if [ "$1" ]; then exit 0 elif [[ "$1" == '--continue' || "$1" == '--stopidle' ]]; then #/sbin/kill -s 4 $(/sbin/cat $lockpath/$pidfile) - sudo /sbin/touch $lockpath/$lockfile + sudo -n /sbin/touch $lockpath/$lockfile exit 0 elif [[ "$1" == '--disable' || "$1" == '-dis' ]]; then - sudo /sbin/touch $lockpath/$disablelockfile + sudo -n /sbin/touch $lockpath/$disablelockfile exit 0 elif [[ "$1" == '--enable' || "$1" == '-en' ]]; then - sudo /sbin/rm -f $lockpath/$disablelockfile + sudo -n /sbin/rm -f $lockpath/$disablelockfile exit 0 fi fi diff --git a/logs/chat.log b/logs/chat.log index 8abebd9..8ca55f8 100644 --- a/logs/chat.log +++ b/logs/chat.log @@ -1,11 +1,15 @@ -test has joined the chat -test2 has joined the chat -test2: hi -test2: im test2 -test2: ur faher -test: no im ur grandfather -test has left the chat -test1 has joined the chat -test1: $mute test2 -test2 has left the chat -test1 has left the chat +[A[A[A[A[A[A[A[A[A has joined the chat +[A[A[A[A[A[A[A[A[A: yo +[A[A[A[A[A[A[A[A[A: yo +[A[A[A[A[A[A[A[A[A: yo +[A[A[A[A[A[A[A[A[A: yo +[A[A[A[A[A[A[A[A[A: yo +[A[A[A[A[A[A[A[A[A: yo +[A[A[A[A[A[A[A[A[A: yo +[A[A[A[A[A[A[A[A[A: yoyo +[A[A[A[A[A[A[A[A[A: oy +[A[A[A[A[A[A[A[A[A: oy +[A[A[A[A[A[A[A[A[A: oy +[A[A[A[A[A[A[A[A[A: o +[A[A[A[A[A[A[A[A[A: yo +[A[A[A[A[A[A[A[A[A has left the chat @@ -24,7 +24,7 @@ function recorder() { killall -SIGINT gpu-screen-recorder if [ $? -eq 0 ]; then filename=$(cat $XDG_CACHE_HOME/rec_filename) - (dragon --icon-only --thumb-size 512 --and-exit "$XDG_VIDEOS_DIR/$filename" & sleep 10 && kill $!) + (dragon-drop --thumb-size 512 --and-exit "$XDG_VIDEOS_DIR/$filename" & sleep 10 && kill $!) if [ "$(cat $XDG_CACHE_HOME/rec_prev_dnd)" == "false" ]; then swaync-client --dnd-off fi @@ -6,9 +6,9 @@ if [ -f /var/lib/pacman/db.lck ]; then sleep 60 if [ -f /var/lib/pacman/db.lck ]; then notify-send "db.lck still exist, forcfully removing..." - sudo rm -f /var/lib/pacman/db.lck + sudo -n rm -f /var/lib/pacman/db.lck fi fi -tldr --update & sudo npm update -g & nix-env -u & /usr/local/linuxbrew/bin/brew update & blck=$! & yay -Sl > /tmp/yaySl & yay -Ss > /tmp/yaySs & yay --noconfirm --disable-download-timeout & wait $blck && /opt/homebrew/bin/brew upgrade & flatpak update -y & tldr -u|| sudo /sbin/touch /tmp/lock/updatefail.lock # notify-send -u critical "Auto-Updater" "Update Faild!" # pipx upgrade-all +tldr --update & sudo -n npm update -g & nix-env -u & /usr/local/linuxbrew/bin/brew update & blck=$! & yay -Sl > /tmp/yaySl & yay -Ss > /tmp/yaySs & yay --noconfirm --disable-download-timeout & wait $blck && /opt/homebrew/bin/brew upgrade & flatpak update -y & tldr -u|| sudo -n /sbin/touch /tmp/lock/updatefail.lock # notify-send -u critical "Auto-Updater" "Update Faild!" # pipx upgrade-all #notify-send "Auto-Updater" "Update in progress, please don't poweroff the computer" && sudo npm update -g & nix-env -u & /usr/local/linuxbrew/bin/brew update & /usr/local/linuxbrew/bin/brew upgrade & yay -Sl > /tmp/yaySl & yay -Ss > /tmp/yaySs & yay -Syu --noconfirm --disable-download-timeout && notify-send -u low "Auto-Updater" "Update Successfully!" || notify-send -u critical "Auto-Updater" "Update Faild!" # pipx upgrade-all @@ -19,7 +19,7 @@ #set default editor if [ -z $VIM_PATH ]; then - VIM_PATH=/usr/bin/lvim + VIM_PATH=/usr/bin/nvim fi #check if an argument is provided diff --git a/walls/swww.sh b/walls/swww.sh index 54c56b0..c5022a4 100755 --- a/walls/swww.sh +++ b/walls/swww.sh @@ -4,7 +4,7 @@ XDG_PICTURES_DIR="${XDG_PICTURES_DIR:-$HOME/Pictures}" XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" WALLPAPERS="$XDG_PICTURES_DIR/wallpapers/" -swwwarg="--transition-type random --transition-duration 0.85 --transition-fps 160 --transition-bezier 1,0.33,0.3,1" +swwwarg="--transition-type any --transition-duration 0.85 --transition-fps 160 --transition-bezier 1,0.33,0.3,1" # colors RED='\033[0;31m' @@ -39,8 +39,9 @@ while true; do swaync-client --reload-css # gdbus call --session --dest com.mitchellh.ghostty --object-path /com/mitchellh/ghostty --method org.gtk.Actions.Activate reload-config [] [] & - kitten @ action load_config_file - kitty @ set-colors --all --configured ~/.config/kitty/colors.conf + # kitten @ action load_config_file + # kitty @ set-colors --all --configured ~/.config/kitty/colors.conf + killall -SIGUSR1 kitty echo $wallpappath > $XDG_CACHE_HOME/current.bg # update hyprlock diff --git a/walls/update.sh b/walls/update.sh index 390f3f2..6604141 100755 --- a/walls/update.sh +++ b/walls/update.sh @@ -33,7 +33,8 @@ ffmpeg -hwaccel cuda -i "$WALLPAPER" -y "$XDG_CACHE_HOME/bg.png" swaync-client --reload-css & # gdbus call --session --dest com.mitchellh.ghostty --object-path /com/mitchellh/ghostty --method org.gtk.Actions.Activate reload-config [] [] & - kitten @ action load_config_file + # kitten @ action load_config_file + killall -SIGUSR1 kitty killall -USR2 hyprlock & ) & |
