mirror of
https://github.com/adi1090x/rofi.git
synced 2024-11-23 22:58:21 -05:00
Enable theme specification via cli
This commit is contained in:
parent
9060e5c6e1
commit
323f94069c
@ -6,8 +6,21 @@
|
|||||||
## Applets : Run Applications as Root
|
## Applets : Run Applications as Root
|
||||||
|
|
||||||
# Import Current Theme
|
# Import Current Theme
|
||||||
|
INPUT_THEME=$1
|
||||||
|
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
||||||
theme="$type/$style"
|
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'
|
||||||
|
@ -6,8 +6,22 @@
|
|||||||
## Applets : Favorite Applications
|
## Applets : Favorite Applications
|
||||||
|
|
||||||
# Import Current Theme
|
# Import Current Theme
|
||||||
|
INPUT_THEME=$1
|
||||||
|
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
||||||
theme="$type/$style"
|
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'
|
||||||
|
@ -6,8 +6,22 @@
|
|||||||
## Applets : Battery
|
## Applets : Battery
|
||||||
|
|
||||||
# Import Current Theme
|
# Import Current Theme
|
||||||
|
INPUT_THEME=$1
|
||||||
|
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
||||||
theme="$type/$style"
|
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`"
|
||||||
|
@ -6,8 +6,21 @@
|
|||||||
## Applets : Brightness
|
## Applets : Brightness
|
||||||
|
|
||||||
# Import Current Theme
|
# Import Current Theme
|
||||||
|
INPUT_THEME=$1
|
||||||
|
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
||||||
theme="$type/$style"
|
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`)"
|
||||||
|
@ -6,8 +6,22 @@
|
|||||||
## Applets : MPD (music)
|
## Applets : MPD (music)
|
||||||
|
|
||||||
# Import Current Theme
|
# Import Current Theme
|
||||||
|
INPUT_THEME=$1
|
||||||
|
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
||||||
theme="$type/$style"
|
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`"
|
||||||
|
@ -6,8 +6,22 @@
|
|||||||
## Applets : Power Menu
|
## Applets : Power Menu
|
||||||
|
|
||||||
# Import Current Theme
|
# Import Current Theme
|
||||||
|
INPUT_THEME=$1
|
||||||
|
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
||||||
theme="$type/$style"
|
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`"
|
||||||
|
@ -6,8 +6,21 @@
|
|||||||
## Applets : Quick Links
|
## Applets : Quick Links
|
||||||
|
|
||||||
# Import Current Theme
|
# Import Current Theme
|
||||||
|
INPUT_THEME=$1
|
||||||
|
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
||||||
theme="$type/$style"
|
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'
|
||||||
|
@ -6,8 +6,22 @@
|
|||||||
## Applets : Screenshot
|
## Applets : Screenshot
|
||||||
|
|
||||||
# Import Current Theme
|
# Import Current Theme
|
||||||
|
INPUT_THEME=$1
|
||||||
|
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
||||||
theme="$type/$style"
|
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'
|
||||||
|
@ -6,8 +6,22 @@
|
|||||||
## Applets : Volume
|
## Applets : Volume
|
||||||
|
|
||||||
# Import Current Theme
|
# Import Current Theme
|
||||||
|
INPUT_THEME=$1
|
||||||
|
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
||||||
theme="$type/$style"
|
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 \',' '`"
|
||||||
|
@ -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]}")")"
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
theme='style-1'
|
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 \
|
||||||
|
@ -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]}")")"
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
theme='style-1'
|
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 \
|
||||||
|
@ -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]}")")"
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
theme='style-10'
|
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 \
|
||||||
|
@ -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]}")")"
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
theme='style-1'
|
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 \
|
||||||
|
@ -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]}")")"
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
theme='style-1'
|
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 \
|
||||||
|
@ -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]}")")"
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
theme='style-1'
|
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 \
|
||||||
|
@ -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]}")")"
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
theme='style-1'
|
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 \
|
||||||
|
@ -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]}")")"
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
theme='style-1'
|
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'`"
|
||||||
|
@ -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]}")")"
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
theme='style-1'
|
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'`"
|
||||||
|
@ -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]}")")"
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
theme='style-1'
|
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'`"
|
||||||
|
@ -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]}")")"
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
theme='style-5'
|
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'`"
|
||||||
|
@ -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]}")")"
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
theme='style-1'
|
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`"
|
||||||
|
@ -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]}")")"
|
||||||
|
if [ -z $INPUT_THEME ]; then
|
||||||
theme='style-1'
|
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`"
|
||||||
|
Loading…
Reference in New Issue
Block a user