summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--escapeEnv.py23
-rwxr-xr-xhyprbri5
-rwxr-xr-xhyprshot2
-rwxr-xr-xidle.sh16
-rw-r--r--logs/chat.log26
-rwxr-xr-xrec.sh2
-rwxr-xr-xupdate.sh4
-rwxr-xr-xvim2
-rwxr-xr-xwalls/swww.sh7
-rwxr-xr-xwalls/update.sh3
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()
diff --git a/hyprbri b/hyprbri
index 6fe9508..a0fc263 100755
--- a/hyprbri
+++ b/hyprbri
@@ -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
diff --git a/hyprshot b/hyprshot
index 48be638..36f07c9 100755
--- a/hyprshot
+++ b/hyprshot
@@ -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
diff --git a/idle.sh b/idle.sh
index 915b0a0..3b825c2 100755
--- a/idle.sh
+++ b/idle.sh
@@ -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
+ has joined the chat
+: yo
+: yo
+: yo
+: yo
+: yo
+: yo
+: yo
+: yoyo
+: oy
+: oy
+: oy
+: o
+: yo
+ has left the chat
diff --git a/rec.sh b/rec.sh
index bbc9cbb..dc72e1e 100755
--- a/rec.sh
+++ b/rec.sh
@@ -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
diff --git a/update.sh b/update.sh
index 7a8705a..4520a07 100755
--- a/update.sh
+++ b/update.sh
@@ -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
diff --git a/vim b/vim
index b6e8392..8f4453d 100755
--- a/vim
+++ b/vim
@@ -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 &
) &