scripts

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 1c3dd131c86f5187675bafb0841ea1c3259d30ac
parent abdec5f5135f7bb0319167e53e2ae520343d9f57
Author: AndrewLockVI <andrew@laack.co>
Date:   Wed, 19 Feb 2025 20:28:18 -0600

Updated scripts, added notifications, updated bookmarking

Diffstat:
Madd-bookmark.sh | 20+++++++++++++++++++-
MbackupHelper.sh | 3+++
Mbookmarks.sh | 1+
MdisableScreenOff.sh | 3++-
Minit-screen.sh | 4++--
Minstall.sh | 7+++++++
Aopen-bookmark.sh | 20++++++++++++++++++++
MsetScreenX.sh | 1+
8 files changed, 55 insertions(+), 4 deletions(-)

diff --git a/add-bookmark.sh b/add-bookmark.sh @@ -1,5 +1,23 @@ #!/bin/bash +out=$(xclip -o -sel clip) + +selection=$(echo -e "Yes\nNo" | dmenu -p "Are you sure you would like to save $out as a bookmark:") + +if [ $selection != "Yes" ]; then + exit 0 +fi + +if [ -z $selection ]; then + exit 0 +fi + file=$HOME/bookmarks/marks.txt -xclip -o -sel clip >> $file + +if [ -n "$out" ]; then + echo $out >> $file + notify-send -t 3000 "Bookmark $out saved $selection" +else + notify-send -u critical -t 3000 "ERROR - Clipboard Empty" +fi diff --git a/backupHelper.sh b/backupHelper.sh @@ -20,7 +20,10 @@ if [ $? -eq 0 ]; then du -s /home/serverBackup echo "=== COMPLETED SUCCESSFULLY ===" echo "Backup Success ($(date '+%Y-%m-%d %H:%M'))" > "/home/andrew/logs/backup-status.log" + notify-send -t 5000 "SYNC SUCCEEDED" else echo "=== RSYNC FAILED ===" echo "Backup Failed - ($(date '+%Y-%m-%d %H:%M'))" > "/home/andrew/logs/backup-status.log" + notify-send -u critical -t 5000 "ERROR - SYNC FAILED" + fi diff --git a/bookmarks.sh b/bookmarks.sh @@ -11,5 +11,6 @@ if [ -z $selection ]; then exit 0 fi +notify-send -t 3000 "$selection copied to clipboard." echo $selection | xclip -selection clipboard diff --git a/disableScreenOff.sh b/disableScreenOff.sh @@ -1,2 +1,3 @@ #!/bin/bash -alias disableOff="xset s off && xset -dpms && xset s noblank" +xset -dpms +xset s off diff --git a/init-screen.sh b/init-screen.sh @@ -39,5 +39,5 @@ qutebrowser --target window "uws.instructure.com" # wait long enough for browser to load in sleep .5s - -st -e tmux new-session -A -s $directory & +st -e dvtm & +#st -e tmux new-session -A -s $directory & diff --git a/install.sh b/install.sh @@ -184,3 +184,10 @@ doas apk add ncurses doas apk add tmux doas apk add htop + +# dvtm +# doas apk add ncurses-dev + +doas apk add libnotify +doas apk add dbus-x11 +doas apk add dunst diff --git a/open-bookmark.sh b/open-bookmark.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# load bookmarks using dmenu + +file="$HOME/bookmarks/marks.txt" + +selection=$(cat $file| dmenu) + + +if [ -z $selection ]; then + exit 0 +fi + + +url=$selection + +if [ -n "$url" ]; then + qutebrowser --target window "$url" +fi + diff --git a/setScreenX.sh b/setScreenX.sh @@ -1,2 +1,3 @@ #!/bin/sh xrandr --output eDP-1 --mode 1920x1200 --pos 0x1440 --rotate normal --output DP-1 --off --output HDMI-1 --off --output DP-2 --off --output DP-3 --off --output DP-4 --off --output DP-3-1 --off --output DP-3-2 --off --output DP-3-3 --primary --mode 5120x1440 --pos 0x0 --rotate normal +$HOME/.fehbg