mirror of
https://github.com/adi1090x/rofi.git
synced 2024-12-26 14:28:22 -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
|
||||
|
||||
# Import Current Theme
|
||||
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
||||
theme="$type/$style"
|
||||
INPUT_THEME=$1
|
||||
|
||||
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
|
||||
prompt='Applications'
|
||||
|
@ -6,8 +6,22 @@
|
||||
## Applets : Favorite Applications
|
||||
|
||||
# Import Current Theme
|
||||
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
||||
theme="$type/$style"
|
||||
INPUT_THEME=$1
|
||||
|
||||
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
|
||||
prompt='Applications'
|
||||
|
@ -6,8 +6,22 @@
|
||||
## Applets : Battery
|
||||
|
||||
# Import Current Theme
|
||||
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
||||
theme="$type/$style"
|
||||
INPUT_THEME=$1
|
||||
|
||||
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="`acpi -b | cut -d',' -f1 | cut -d':' -f1`"
|
||||
|
@ -6,8 +6,21 @@
|
||||
## Applets : Brightness
|
||||
|
||||
# Import Current Theme
|
||||
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
||||
theme="$type/$style"
|
||||
INPUT_THEME=$1
|
||||
|
||||
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
|
||||
backlight="$(printf "%.0f\n" `light -G`)"
|
||||
|
@ -6,8 +6,22 @@
|
||||
## Applets : MPD (music)
|
||||
|
||||
# Import Current Theme
|
||||
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
||||
theme="$type/$style"
|
||||
INPUT_THEME=$1
|
||||
|
||||
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
|
||||
status="`mpc status`"
|
||||
|
@ -6,8 +6,22 @@
|
||||
## Applets : Power Menu
|
||||
|
||||
# Import Current Theme
|
||||
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
||||
theme="$type/$style"
|
||||
INPUT_THEME=$1
|
||||
|
||||
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
|
||||
prompt="`hostname`"
|
||||
|
@ -6,8 +6,21 @@
|
||||
## Applets : Quick Links
|
||||
|
||||
# Import Current Theme
|
||||
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
||||
theme="$type/$style"
|
||||
INPUT_THEME=$1
|
||||
|
||||
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
|
||||
prompt='Quick Links'
|
||||
|
@ -6,8 +6,22 @@
|
||||
## Applets : Screenshot
|
||||
|
||||
# Import Current Theme
|
||||
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
||||
theme="$type/$style"
|
||||
INPUT_THEME=$1
|
||||
|
||||
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
|
||||
prompt='Screenshot'
|
||||
|
@ -6,8 +6,22 @@
|
||||
## Applets : Volume
|
||||
|
||||
# Import Current Theme
|
||||
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/../shared/theme.bash
|
||||
theme="$type/$style"
|
||||
INPUT_THEME=$1
|
||||
|
||||
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
|
||||
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-11 style-12 style-13 style-14 style-15
|
||||
|
||||
INPUT_THEME=$1
|
||||
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
|
||||
rofi \
|
||||
|
@ -11,8 +11,21 @@
|
||||
## style-6 style-7 style-8 style-9 style-10
|
||||
## style-11 style-12 style-13 style-14 style-15
|
||||
|
||||
INPUT_THEME=$1
|
||||
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
|
||||
rofi \
|
||||
|
@ -10,8 +10,21 @@
|
||||
## style-1 style-2 style-3 style-4 style-5
|
||||
## style-6 style-7 style-8 style-9 style-10
|
||||
|
||||
INPUT_THEME=$1
|
||||
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
|
||||
rofi \
|
||||
|
@ -9,9 +9,21 @@
|
||||
#
|
||||
## style-1 style-2 style-3 style-4 style-5
|
||||
## style-6 style-7 style-8 style-9 style-10
|
||||
|
||||
INPUT_THEME=$1
|
||||
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
|
||||
rofi \
|
||||
|
@ -8,9 +8,21 @@
|
||||
## Available Styles
|
||||
#
|
||||
## style-1 style-2 style-3 style-4 style-5
|
||||
|
||||
INPUT_THEME=$1
|
||||
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
|
||||
rofi \
|
||||
|
@ -9,9 +9,21 @@
|
||||
#
|
||||
## style-1 style-2 style-3 style-4 style-5
|
||||
## style-6 style-7 style-8 style-9 style-10
|
||||
|
||||
INPUT_THEME=$1
|
||||
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
|
||||
rofi \
|
||||
|
@ -9,9 +9,21 @@
|
||||
#
|
||||
## style-1 style-2 style-3 style-4 style-5
|
||||
## style-6 style-7 style-8 style-9 style-10
|
||||
|
||||
INPUT_THEME=$1
|
||||
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
|
||||
rofi \
|
||||
|
@ -10,8 +10,21 @@
|
||||
## style-1 style-2 style-3 style-4 style-5
|
||||
|
||||
# Current Theme
|
||||
INPUT_THEME=$1
|
||||
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
|
||||
uptime="`uptime -p | sed -e 's/up //g'`"
|
||||
|
@ -11,8 +11,21 @@
|
||||
## style-6 style-7 style-8 style-9 style-10
|
||||
|
||||
# Current Theme
|
||||
INPUT_THEME=$1
|
||||
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
|
||||
uptime="`uptime -p | sed -e 's/up //g'`"
|
||||
|
@ -10,8 +10,21 @@
|
||||
## style-1 style-2 style-3 style-4 style-5
|
||||
|
||||
# Current Theme
|
||||
INPUT_THEME=$1
|
||||
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
|
||||
uptime="`uptime -p | sed -e 's/up //g'`"
|
||||
|
@ -10,8 +10,21 @@
|
||||
## style-1 style-2 style-3 style-4 style-5
|
||||
|
||||
# Current Theme
|
||||
INPUT_THEME=$1
|
||||
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
|
||||
uptime="`uptime -p | sed -e 's/up //g'`"
|
||||
|
@ -10,8 +10,21 @@
|
||||
## style-1 style-2 style-3 style-4 style-5
|
||||
|
||||
# Current Theme
|
||||
INPUT_THEME=$1
|
||||
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
|
||||
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
|
||||
|
||||
# Current Theme
|
||||
INPUT_THEME=$1
|
||||
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
|
||||
lastlogin="`last $USER | head -n1 | tr -s ' ' | cut -d' ' -f5,6,7`"
|
||||
|
Loading…
Reference in New Issue
Block a user