Enable theme specification via cli

This commit is contained in:
Jacoby6000 2024-07-16 19:36:40 -05:00
parent 9060e5c6e1
commit 323f94069c
22 changed files with 324 additions and 35 deletions

View File

@ -6,8 +6,21 @@
## Applets : Run Applications as Root ## Applets : Run Applications as Root
# Import Current Theme # Import Current Theme
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash INPUT_THEME=$1
theme="$type/$style"
if [ -z $INPUT_THEME ]; then
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
theme="$type/$style"
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [theme]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d $theme ]; then
echo "Theme not found!"
exit 1
fi
fi
# Theme Elements # Theme Elements
prompt='Applications' prompt='Applications'

View File

@ -6,8 +6,22 @@
## Applets : Favorite Applications ## Applets : Favorite Applications
# Import Current Theme # Import Current Theme
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash INPUT_THEME=$1
theme="$type/$style"
if [ -z $INPUT_THEME ]; then
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
theme="$type/$style"
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [theme]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d $theme ]; then
echo "Theme not found!"
exit 1
fi
fi
# Theme Elements # Theme Elements
prompt='Applications' prompt='Applications'

View File

@ -6,8 +6,22 @@
## Applets : Battery ## Applets : Battery
# Import Current Theme # Import Current Theme
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash INPUT_THEME=$1
theme="$type/$style"
if [ -z $INPUT_THEME ]; then
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
theme="$type/$style"
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [theme]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d $theme ]; then
echo "Theme not found!"
exit 1
fi
fi
# Battery Info # Battery Info
battery="`acpi -b | cut -d',' -f1 | cut -d':' -f1`" battery="`acpi -b | cut -d',' -f1 | cut -d':' -f1`"

View File

@ -6,8 +6,21 @@
## Applets : Brightness ## Applets : Brightness
# Import Current Theme # Import Current Theme
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash INPUT_THEME=$1
theme="$type/$style"
if [ -z $INPUT_THEME ]; then
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
theme="$type/$style"
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [theme]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d $theme ]; then
echo "Theme not found!"
exit 1
fi
fi
# Brightness Info # Brightness Info
backlight="$(printf "%.0f\n" `light -G`)" backlight="$(printf "%.0f\n" `light -G`)"

View File

@ -6,8 +6,22 @@
## Applets : MPD (music) ## Applets : MPD (music)
# Import Current Theme # Import Current Theme
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash INPUT_THEME=$1
theme="$type/$style"
if [ -z $INPUT_THEME ]; then
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
theme="$type/$style"
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [theme]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d $theme ]; then
echo "Theme not found!"
exit 1
fi
fi
# Theme Elements # Theme Elements
status="`mpc status`" status="`mpc status`"

View File

@ -6,8 +6,22 @@
## Applets : Power Menu ## Applets : Power Menu
# Import Current Theme # Import Current Theme
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash INPUT_THEME=$1
theme="$type/$style"
if [ -z $INPUT_THEME ]; then
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
theme="$type/$style"
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [theme]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d $theme ]; then
echo "Theme not found!"
exit 1
fi
fi
# Theme Elements # Theme Elements
prompt="`hostname`" prompt="`hostname`"

View File

@ -6,8 +6,21 @@
## Applets : Quick Links ## Applets : Quick Links
# Import Current Theme # Import Current Theme
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash INPUT_THEME=$1
theme="$type/$style"
if [ -z $INPUT_THEME ]; then
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
theme="$type/$style"
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [theme]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d $theme ]; then
echo "Theme not found!"
exit 1
fi
fi
# Theme Elements # Theme Elements
prompt='Quick Links' prompt='Quick Links'

View File

@ -6,8 +6,22 @@
## Applets : Screenshot ## Applets : Screenshot
# Import Current Theme # Import Current Theme
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash INPUT_THEME=$1
theme="$type/$style"
if [ -z $INPUT_THEME ]; then
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
theme="$type/$style"
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [theme]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d $theme ]; then
echo "Theme not found!"
exit 1
fi
fi
# Theme Elements # Theme Elements
prompt='Screenshot' prompt='Screenshot'

View File

@ -6,8 +6,22 @@
## Applets : Volume ## Applets : Volume
# Import Current Theme # Import Current Theme
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash INPUT_THEME=$1
theme="$type/$style"
if [ -z $INPUT_THEME ]; then
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
theme="$type/$style"
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [theme]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d $theme ]; then
echo "Theme not found!"
exit 1
fi
fi
# Volume Info # Volume Info
mixer="`amixer info Master | grep 'Mixer name' | cut -d':' -f2 | tr -d \',' '`" mixer="`amixer info Master | grep 'Mixer name' | cut -d':' -f2 | tr -d \',' '`"

View File

@ -11,8 +11,22 @@
## style-6 style-7 style-8 style-9 style-10 ## style-6 style-7 style-8 style-9 style-10
## style-11 style-12 style-13 style-14 style-15 ## style-11 style-12 style-13 style-14 style-15
INPUT_THEME=$1
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
theme='style-1' if [ -z $INPUT_THEME ]; then
theme='style-1'
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [style-1..15]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d ${dir}/$theme.rasi ]; then
echo "Theme not found!"
exit 1
fi
fi
## Run ## Run
rofi \ rofi \

View File

@ -11,8 +11,21 @@
## style-6 style-7 style-8 style-9 style-10 ## style-6 style-7 style-8 style-9 style-10
## style-11 style-12 style-13 style-14 style-15 ## style-11 style-12 style-13 style-14 style-15
INPUT_THEME=$1
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
theme='style-1' if [ -z $INPUT_THEME ]; then
theme='style-1'
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [style-1..15]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d ${dir}/$theme.rasi ]; then
echo "Theme not found!"
exit 1
fi
fi
## Run ## Run
rofi \ rofi \

View File

@ -10,8 +10,21 @@
## style-1 style-2 style-3 style-4 style-5 ## style-1 style-2 style-3 style-4 style-5
## style-6 style-7 style-8 style-9 style-10 ## style-6 style-7 style-8 style-9 style-10
INPUT_THEME=$1
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
theme='style-10' if [ -z $INPUT_THEME ]; then
theme='style-10'
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [style-1..10]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d ${dir}/$theme.rasi ]; then
echo "Theme not found!"
exit 1
fi
fi
## Run ## Run
rofi \ rofi \

View File

@ -9,9 +9,21 @@
# #
## style-1 style-2 style-3 style-4 style-5 ## style-1 style-2 style-3 style-4 style-5
## style-6 style-7 style-8 style-9 style-10 ## style-6 style-7 style-8 style-9 style-10
INPUT_THEME=$1
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
theme='style-1' if [ -z $INPUT_THEME ]; then
theme='style-1'
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [style-1..10]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d ${dir}/$theme.rasi ]; then
echo "Theme not found!"
exit 1
fi
fi
## Run ## Run
rofi \ rofi \

View File

@ -8,9 +8,21 @@
## Available Styles ## Available Styles
# #
## style-1 style-2 style-3 style-4 style-5 ## style-1 style-2 style-3 style-4 style-5
INPUT_THEME=$1
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
theme='style-1' if [ -z $INPUT_THEME ]; then
theme='style-1'
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [style-1..5]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d ${dir}/$theme.rasi ]; then
echo "Theme not found!"
exit 1
fi
fi
## Run ## Run
rofi \ rofi \

View File

@ -9,9 +9,21 @@
# #
## style-1 style-2 style-3 style-4 style-5 ## style-1 style-2 style-3 style-4 style-5
## style-6 style-7 style-8 style-9 style-10 ## style-6 style-7 style-8 style-9 style-10
INPUT_THEME=$1
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
theme='style-1' if [ -z $INPUT_THEME ]; then
theme='style-1'
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [style-1..10]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d ${dir}/$theme.rasi ]; then
echo "Theme not found!"
exit 1
fi
fi
## Run ## Run
rofi \ rofi \

View File

@ -9,9 +9,21 @@
# #
## style-1 style-2 style-3 style-4 style-5 ## style-1 style-2 style-3 style-4 style-5
## style-6 style-7 style-8 style-9 style-10 ## style-6 style-7 style-8 style-9 style-10
INPUT_THEME=$1
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
theme='style-1' if [ -z $INPUT_THEME ]; then
theme='style-1'
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [style-1..10]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d ${dir}/$theme.rasi ]; then
echo "Theme not found!"
exit 1
fi
fi
## Run ## Run
rofi \ rofi \

View File

@ -10,8 +10,21 @@
## style-1 style-2 style-3 style-4 style-5 ## style-1 style-2 style-3 style-4 style-5
# Current Theme # Current Theme
INPUT_THEME=$1
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
theme='style-1' if [ -z $INPUT_THEME ]; then
theme='style-1'
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [style-1..5]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d ${dir}/$theme.rasi ]; then
echo "Theme not found!"
exit 1
fi
fi
# CMDs # CMDs
uptime="`uptime -p | sed -e 's/up //g'`" uptime="`uptime -p | sed -e 's/up //g'`"

View File

@ -11,8 +11,21 @@
## style-6 style-7 style-8 style-9 style-10 ## style-6 style-7 style-8 style-9 style-10
# Current Theme # Current Theme
INPUT_THEME=$1
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
theme='style-1' if [ -z $INPUT_THEME ]; then
theme='style-1'
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [style-1..10]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d ${dir}/$theme.rasi ]; then
echo "Theme not found!"
exit 1
fi
fi
# CMDs # CMDs
uptime="`uptime -p | sed -e 's/up //g'`" uptime="`uptime -p | sed -e 's/up //g'`"

View File

@ -10,8 +10,21 @@
## style-1 style-2 style-3 style-4 style-5 ## style-1 style-2 style-3 style-4 style-5
# Current Theme # Current Theme
INPUT_THEME=$1
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
theme='style-1' if [ -z $INPUT_THEME ]; then
theme='style-1'
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [style-1..10]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d ${dir}/$theme.rasi ]; then
echo "Theme not found!"
exit 1
fi
fi
# CMDs # CMDs
uptime="`uptime -p | sed -e 's/up //g'`" uptime="`uptime -p | sed -e 's/up //g'`"

View File

@ -10,8 +10,21 @@
## style-1 style-2 style-3 style-4 style-5 ## style-1 style-2 style-3 style-4 style-5
# Current Theme # Current Theme
INPUT_THEME=$1
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
theme='style-5' if [ -z $INPUT_THEME ]; then
theme='style-5'
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [style-1..5]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d ${dir}/$theme.rasi ]; then
echo "Theme not found!"
exit 1
fi
fi
# CMDs # CMDs
uptime="`uptime -p | sed -e 's/up //g'`" uptime="`uptime -p | sed -e 's/up //g'`"

View File

@ -10,8 +10,21 @@
## style-1 style-2 style-3 style-4 style-5 ## style-1 style-2 style-3 style-4 style-5
# Current Theme # Current Theme
INPUT_THEME=$1
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
theme='style-1' if [ -z $INPUT_THEME ]; then
theme='style-1'
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [style-1..5]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d ${dir}/$theme.rasi ]; then
echo "Theme not found!"
exit 1
fi
fi
# CMDs # CMDs
lastlogin="`last $USER | head -n1 | tr -s ' ' | cut -d' ' -f5,6,7`" lastlogin="`last $USER | head -n1 | tr -s ' ' | cut -d' ' -f5,6,7`"

View File

@ -10,8 +10,21 @@
## style-1 style-2 style-3 style-4 style-5 ## style-1 style-2 style-3 style-4 style-5
# Current Theme # Current Theme
INPUT_THEME=$1
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
theme='style-1' if [ -z $INPUT_THEME ]; then
theme='style-1'
elif [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $0 [style-1..5]"
exit 0
else
theme=$INPUT_THEME
if [ ! -d ${dir}/$theme.rasi ]; then
echo "Theme not found!"
exit 1
fi
fi
# CMDs # CMDs
lastlogin="`last $USER | head -n1 | tr -s ' ' | cut -d' ' -f5,6,7`" lastlogin="`last $USER | head -n1 | tr -s ' ' | cut -d' ' -f5,6,7`"