scripts

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

commit e26f40815779888a86366cfa52a4261f6b51e1a9
parent f2db78c707cb9e9e8b058e805080925defdf8bff
Author: AndrewLockVI <andrew@laack.co>
Date:   Sun, 16 Feb 2025 21:26:29 -0600

Updated all of my dmenu scripts to accept input colors so I can change them in my dwm conf file

Diffstat:
MbackupHelper.sh | 2++
Mdmenu.sh | 7++++---
Mfind-music.sh | 10++++++----
Mpass.sh | 8++++----
Msearch.sh | 7+++----
Mstatusbar.sh | 2+-
Mtmux.sh | 7+++----
Mzathura.sh | 7+++----
8 files changed, 26 insertions(+), 24 deletions(-)

diff --git a/backupHelper.sh b/backupHelper.sh @@ -19,6 +19,8 @@ if [ $? -eq 0 ]; then du -sh /home/serverBackup du -s /home/serverBackup echo "=== COMPLETED SUCCESSFULLY ===" + echo "Backup Success ($(date '+%Y-%m-%d %H:%M'))" > "/home/andrew/logs/backup-status.log" else echo "=== RSYNC FAILED ===" + echo "Backup Failed - ($(date '+%Y-%m-%d %H:%M'))" > "/home/andrew/logs/backup-status.log" fi diff --git a/dmenu.sh b/dmenu.sh @@ -1,8 +1,9 @@ #!/bin/bash -background="#000000" -foreground="#ffffff" -highlight="#aaaaaa" +background=$1 +foreground=$2 +highlight=$3 + prompt="Run Program:" dmenu_run -nb "$background" -nf "$foreground" -sb "$highlight" -sf "$foreground" -p "$prompt" diff --git a/find-music.sh b/find-music.sh @@ -3,11 +3,13 @@ # I have my music broken down by artist, but there is no reason # why if you have it by album that this wouldn't work. +background=$2 +foreground=$3 +highlight=$4 + + + -background="#000000" -foreground="#ffffff" -#highlight="#44475a" -highlight="#aaaaaa" prompt="Select an artist:" dmenu_cmd="dmenu -nb \"$background\" -nf \"$foreground\" -sb \"$highlight\" -sf \"$foreground\" -p \"$prompt\"" diff --git a/pass.sh b/pass.sh @@ -18,10 +18,10 @@ password_files=( "${password_files[@]#"$prefix"/}" ) password_files=( "${password_files[@]%.gpg}" ) -background="#000000" -foreground="#ffffff" -#highlight="#44475a" -highlight="#aaaaaa" +background=$1 +foreground=$2 +highlight=$3 + prompt="Select a password:" diff --git a/search.sh b/search.sh @@ -1,10 +1,9 @@ #!/bin/bash -background="#000000" -foreground="#ffffff" -highlight="#aaaaaa" -#highlight="#44475a" +background=$1 +foreground=$2 +highlight=$3 prompt="Search URL: " dmenu_cmd="dmenu -nb $background -nf $foreground -sb $highlight -sf $foreground -p URL:" diff --git a/statusbar.sh b/statusbar.sh @@ -2,4 +2,4 @@ # this is called in a loop that runs in the background from xinitrc. -xsetroot -name "$(date)" +xsetroot -name "$(cat ~/logs/backup-status.log) | $(date)" diff --git a/tmux.sh b/tmux.sh @@ -1,9 +1,8 @@ #!/bin/bash -background="#000000" -foreground="#ffffff" -#highlight="#44475a" -highlight="#aaaaaa" +background=$1 +foreground=$2 +highlight=$3 prompt="Select Tmux Project Directory:" # exclude git repos which have lots of sub-dirs, diff --git a/zathura.sh b/zathura.sh @@ -3,10 +3,9 @@ pdfs=$(find ~ -type f -iname '*.pdf') -background="#000000" -foreground="#ffffff" -#highlight="#44475a" -highlight="#aaaaaa" +background=$1 +foreground=$2 +highlight=$3 prompt="Select a pdf:" dmenu_cmd="dmenu -nb \"$background\" -nf \"$foreground\" -sb \"$highlight\" -sf \"$foreground\" -p \"$prompt\""