mirror of
https://github.com/adi1090x/rofi.git
synced 2024-11-21 13:48:22 -05:00
reuse theme setup in powermenu and launcher scripts
This commit is contained in:
parent
1d0689cb33
commit
4e5eb9aae5
@ -2,8 +2,6 @@
|
||||
DEFAULT_TYPE='type-1'
|
||||
DEFAULT_STYLE='style-1'
|
||||
|
||||
echo $SCRIPT_DIR
|
||||
|
||||
# INPUT_THEME should be set by the script that sources this file,
|
||||
# if the user wants to override the default theme.
|
||||
if [ -z "$INPUT_THEME" ]; then
|
||||
@ -12,15 +10,10 @@ elif [[ $1 == "-h" || $1 == "--help" ]]; then
|
||||
echo "Usage: $SCRIPT_INVOCATION [theme]"
|
||||
exit 0
|
||||
else
|
||||
theme="$INPUT_THEME"
|
||||
if [ ! -d $theme ]; then
|
||||
# prepend current script path if theme is not found
|
||||
theme="$SCRIPT_DIR/../$theme"
|
||||
|
||||
if [ ! -d "$theme" ]; then
|
||||
# fail if we still can't find it.
|
||||
echo "Theme not found!"
|
||||
exit 1
|
||||
fi
|
||||
theme="$SCRIPT_DIR/../$theme.rasi"
|
||||
if [ ! -f "$theme" ]; then
|
||||
# fail if we still can't find it.
|
||||
echo "Theme not found!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
@ -64,7 +64,7 @@ inputbar {
|
||||
border-radius: 0px;
|
||||
border-color: @selected;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/a.png", width);
|
||||
background-image: url("./images/a.png", width);
|
||||
text-color: @foreground;
|
||||
children: [ "textbox-prompt-colon", "prompt"];
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ inputbar {
|
||||
border-radius: 20px;
|
||||
border-color: @selected;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/d.png", width);
|
||||
background-image: url("./images/d.png", width);
|
||||
text-color: @foreground;
|
||||
children: [ "dummy", "textbox-prompt-colon", "prompt", "dummy"];
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ inputbar {
|
||||
border-radius: 40px;
|
||||
border-color: @selected;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/i.jpg", width);
|
||||
background-image: url("./images/i.jpg", width);
|
||||
text-color: @foreground;
|
||||
children: [ "textbox-prompt-colon", "dummy", "prompt"];
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ mainbox {
|
||||
/*****----- Imagebox -----*****/
|
||||
imagebox {
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/e.jpg", height);
|
||||
background-image: url("./images/e.jpg", height);
|
||||
children: [ "dummy", "inputbar", "dummy" ];
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ mainbox {
|
||||
imagebox {
|
||||
border-radius: 20px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/j.jpg", height);
|
||||
background-image: url("./images/j.jpg", height);
|
||||
children: [ "dummy", "inputbar", "dummy" ];
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ imagebox {
|
||||
border-radius: 100%;
|
||||
border-color: @selected;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/g.png", height);
|
||||
background-image: url("./images/g.png", height);
|
||||
children: [ "dummy", "inputbar", "dummy" ];
|
||||
}
|
||||
|
||||
|
@ -12,23 +12,15 @@
|
||||
## style-11 style-12 style-13 style-14 style-15
|
||||
|
||||
INPUT_THEME=$1
|
||||
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
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
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
theme=$($SCRIPT_DIR/../../shared/theme.sh "$SCRIPT_DIR" '1' '15' "$INPUT_THEME")
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $theme
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
## Run
|
||||
rofi \
|
||||
-show drun \
|
||||
-theme ${dir}/${theme}.rasi
|
||||
-theme $theme
|
||||
|
@ -12,22 +12,15 @@
|
||||
## style-11 style-12 style-13 style-14 style-15
|
||||
|
||||
INPUT_THEME=$1
|
||||
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
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
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
theme=$($SCRIPT_DIR/../../shared/theme.sh "$SCRIPT_DIR" '1' '15' "$INPUT_THEME")
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $theme
|
||||
exit 1
|
||||
fi
|
||||
|
||||
## Run
|
||||
rofi \
|
||||
-show drun \
|
||||
-theme ${dir}/${theme}.rasi
|
||||
-theme $theme
|
||||
|
@ -11,22 +11,17 @@
|
||||
## style-6 style-7 style-8 style-9 style-10
|
||||
|
||||
INPUT_THEME=$1
|
||||
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
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
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
theme=$($SCRIPT_DIR/../../shared/theme.sh "$SCRIPT_DIR" '10' '10' "$INPUT_THEME")
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $theme
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
## Run
|
||||
rofi \
|
||||
-show drun \
|
||||
-theme ${dir}/${theme}.rasi
|
||||
-theme $theme
|
||||
|
@ -9,23 +9,17 @@
|
||||
#
|
||||
## 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]}")")"
|
||||
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
|
||||
|
||||
INPUT_THEME=$1
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
theme=$($SCRIPT_DIR/../../shared/theme.sh "$SCRIPT_DIR" '1' '10' "$INPUT_THEME")
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $theme
|
||||
exit 1
|
||||
fi
|
||||
|
||||
## Run
|
||||
rofi \
|
||||
-show drun \
|
||||
-theme ${dir}/${theme}.rasi
|
||||
-theme $theme
|
||||
|
@ -8,23 +8,17 @@
|
||||
## Available Styles
|
||||
#
|
||||
## style-1 style-2 style-3 style-4 style-5
|
||||
INPUT_THEME=$1
|
||||
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
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
|
||||
|
||||
INPUT_THEME=$1
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
theme=$($SCRIPT_DIR/../../shared/theme.sh "$SCRIPT_DIR" '1' '5' "$INPUT_THEME")
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $theme
|
||||
exit 1
|
||||
fi
|
||||
|
||||
## Run
|
||||
rofi \
|
||||
-show drun \
|
||||
-theme ${dir}/${theme}.rasi
|
||||
-theme $theme
|
||||
|
@ -39,7 +39,7 @@ window {
|
||||
border-radius: 0px;
|
||||
border-color: black;
|
||||
cursor: "default";
|
||||
background-image: url("~/.config/rofi/images/paper.png", none);
|
||||
background-image: url("./images/paper.png", none);
|
||||
}
|
||||
|
||||
/*****----- Main Box -----*****/
|
||||
|
@ -41,7 +41,7 @@ window {
|
||||
padding: 0px;
|
||||
border-radius: 12px;
|
||||
cursor: "default";
|
||||
background-image: url("~/.config/rofi/images/gradient.png", width);
|
||||
background-image: url("./images/gradient.png", width);
|
||||
}
|
||||
|
||||
/*****----- Main Box -----*****/
|
||||
|
@ -42,7 +42,7 @@ window {
|
||||
border-radius: 20px;
|
||||
cursor: "default";
|
||||
background-color: #162022;
|
||||
background-image: url("~/.config/rofi/images/flowers-1.png", width);
|
||||
background-image: url("./images/flowers-1.png", width);
|
||||
}
|
||||
|
||||
/*****----- Main Box -----*****/
|
||||
@ -63,7 +63,7 @@ inputbar {
|
||||
border: 2px;
|
||||
border-radius: 20px;
|
||||
border-color: white;
|
||||
background-image: url("~/.config/rofi/images/flowers-3.png", none);
|
||||
background-image: url("./images/flowers-3.png", none);
|
||||
children: [ "textbox-prompt-colon", "entry" ];
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ listview {
|
||||
border: 2px;
|
||||
border-radius: 20px;
|
||||
border-color: white;
|
||||
background-image: url("~/.config/rofi/images/flowers-2.png", width);
|
||||
background-image: url("./images/flowers-2.png", width);
|
||||
cursor: "default";
|
||||
}
|
||||
|
||||
|
@ -10,22 +10,15 @@
|
||||
## 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]}")")"
|
||||
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
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
theme=$($SCRIPT_DIR/../../shared/theme.sh "$SCRIPT_DIR" '1' '10' "$INPUT_THEME")
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $theme
|
||||
exit 1
|
||||
fi
|
||||
|
||||
## Run
|
||||
rofi \
|
||||
-show drun \
|
||||
-theme ${dir}/${theme}.rasi
|
||||
-theme $theme
|
||||
|
@ -60,7 +60,7 @@ mainbox {
|
||||
imagebox {
|
||||
padding: 20px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/a.png", height);
|
||||
background-image: url("./images/a.png", height);
|
||||
orientation: vertical;
|
||||
children: [ "inputbar", "dummy", "mode-switcher" ];
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ mainbox {
|
||||
imagebox {
|
||||
padding: 20px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/j.jpg", height);
|
||||
background-image: url("./images/j.jpg", height);
|
||||
orientation: vertical;
|
||||
children: [ "inputbar", "dummy", "mode-switcher" ];
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ mainbox {
|
||||
imagebox {
|
||||
padding: 20px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/b.png", height);
|
||||
background-image: url("./images/b.png", height);
|
||||
orientation: vertical;
|
||||
children: [ "inputbar", "dummy", "mode-switcher" ];
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ mainbox {
|
||||
imagebox {
|
||||
padding: 20px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/c.png", height);
|
||||
background-image: url("./images/c.png", height);
|
||||
orientation: vertical;
|
||||
children: [ "inputbar", "dummy", "mode-switcher" ];
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ mainbox {
|
||||
imagebox {
|
||||
padding: 20px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/d.png", height);
|
||||
background-image: url("./images/d.png", height);
|
||||
orientation: vertical;
|
||||
children: [ "inputbar", "dummy", "mode-switcher" ];
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ mainbox {
|
||||
imagebox {
|
||||
padding: 20px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/e.jpg", height);
|
||||
background-image: url("./images/e.jpg", height);
|
||||
orientation: vertical;
|
||||
children: [ "inputbar", "dummy", "mode-switcher" ];
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ mainbox {
|
||||
imagebox {
|
||||
padding: 20px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/f.png", height);
|
||||
background-image: url("./images/f.png", height);
|
||||
orientation: vertical;
|
||||
children: [ "inputbar", "dummy", "mode-switcher" ];
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ mainbox {
|
||||
imagebox {
|
||||
padding: 20px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/g.png", height);
|
||||
background-image: url("./images/g.png", height);
|
||||
orientation: vertical;
|
||||
children: [ "inputbar", "dummy", "mode-switcher" ];
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ mainbox {
|
||||
imagebox {
|
||||
padding: 20px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/h.jpg", height);
|
||||
background-image: url("./images/h.jpg", height);
|
||||
orientation: vertical;
|
||||
children: [ "inputbar", "dummy", "mode-switcher" ];
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ mainbox {
|
||||
imagebox {
|
||||
padding: 20px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/i.jpg", height);
|
||||
background-image: url("./images/i.jpg", height);
|
||||
orientation: vertical;
|
||||
children: [ "inputbar", "dummy", "mode-switcher" ];
|
||||
}
|
||||
|
@ -10,22 +10,15 @@
|
||||
## 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]}")")"
|
||||
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
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
theme=$($SCRIPT_DIR/../../shared/theme.sh "$SCRIPT_DIR" '1' '10' "$INPUT_THEME")
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $theme
|
||||
exit 1
|
||||
fi
|
||||
|
||||
## Run
|
||||
rofi \
|
||||
-show drun \
|
||||
-theme ${dir}/${theme}.rasi
|
||||
-theme $theme
|
||||
|
@ -71,7 +71,7 @@ inputbar {
|
||||
spacing: 10px;
|
||||
padding: 80px 60px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/a.png", width);
|
||||
background-image: url("./images/a.png", width);
|
||||
text-color: @foreground;
|
||||
orientation: horizontal;
|
||||
children: [ "textbox-prompt-colon", "entry", "dummy", "mode-switcher" ];
|
||||
|
@ -71,7 +71,7 @@ inputbar {
|
||||
spacing: 0px;
|
||||
padding: 100px 40px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/j.jpg", width);
|
||||
background-image: url("./images/j.jpg", width);
|
||||
text-color: @foreground;
|
||||
orientation: horizontal;
|
||||
children: [ "textbox-prompt-colon", "entry" ];
|
||||
|
@ -71,7 +71,7 @@ inputbar {
|
||||
spacing: 10px;
|
||||
padding: 80px 60px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/b.png", width);
|
||||
background-image: url("./images/b.png", width);
|
||||
text-color: @foreground;
|
||||
orientation: horizontal;
|
||||
children: [ "textbox-prompt-colon", "entry", "dummy", "mode-switcher" ];
|
||||
|
@ -71,7 +71,7 @@ inputbar {
|
||||
spacing: 10px;
|
||||
padding: 100px 60px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/c.png", width);
|
||||
background-image: url("./images/c.png", width);
|
||||
text-color: @foreground;
|
||||
orientation: horizontal;
|
||||
children: [ "textbox-prompt-colon", "entry", "dummy", "mode-switcher" ];
|
||||
|
@ -72,7 +72,7 @@ inputbar {
|
||||
spacing: 10px;
|
||||
padding: 40px 40px 155px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/d.png", width);
|
||||
background-image: url("./images/d.png", width);
|
||||
text-color: @foreground;
|
||||
orientation: horizontal;
|
||||
children: [ "textbox-prompt-colon", "entry" ];
|
||||
|
@ -71,7 +71,7 @@ inputbar {
|
||||
spacing: 10px;
|
||||
padding: 80px 60px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/e.jpg", width);
|
||||
background-image: url("./images/e.jpg", width);
|
||||
text-color: @foreground;
|
||||
orientation: horizontal;
|
||||
children: [ "textbox-prompt-colon", "entry", "dummy", "mode-switcher" ];
|
||||
|
@ -71,7 +71,7 @@ inputbar {
|
||||
spacing: 10px;
|
||||
padding: 100px 60px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/f.png", width);
|
||||
background-image: url("./images/f.png", width);
|
||||
text-color: @foreground;
|
||||
orientation: horizontal;
|
||||
children: [ "textbox-prompt-colon", "entry", "dummy", "mode-switcher" ];
|
||||
|
@ -71,7 +71,7 @@ inputbar {
|
||||
spacing: 10px;
|
||||
padding: 100px 40px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/g.png", width);
|
||||
background-image: url("./images/g.png", width);
|
||||
text-color: @foreground;
|
||||
orientation: horizontal;
|
||||
children: [ "textbox-prompt-colon", "entry" ];
|
||||
|
@ -71,7 +71,7 @@ inputbar {
|
||||
spacing: 10px;
|
||||
padding: 100px 60px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/h.jpg", width);
|
||||
background-image: url("./images/h.jpg", width);
|
||||
text-color: @foreground;
|
||||
orientation: horizontal;
|
||||
children: [ "textbox-prompt-colon", "entry", "dummy", "mode-switcher" ];
|
||||
|
@ -71,7 +71,7 @@ inputbar {
|
||||
spacing: 10px;
|
||||
padding: 80px 60px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/i.jpg", width);
|
||||
background-image: url("./images/i.jpg", width);
|
||||
text-color: @foreground;
|
||||
orientation: horizontal;
|
||||
children: [ "textbox-prompt-colon", "entry", "dummy", "mode-switcher" ];
|
||||
|
@ -9,25 +9,17 @@
|
||||
#
|
||||
## style-1 style-2 style-3 style-4 style-5
|
||||
|
||||
# Current Theme
|
||||
INPUT_THEME=$1
|
||||
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
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
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
theme=$($SCRIPT_DIR/../../shared/theme.sh "$SCRIPT_DIR" '1' '5' "$INPUT_THEME")
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $theme
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# CMDs
|
||||
uptime=$($dir/../../shared/uptime.sh)
|
||||
uptime=$($SCRIPT_DIR/../../shared/uptime.sh)
|
||||
host=`hostname`
|
||||
|
||||
# Options
|
||||
@ -44,7 +36,7 @@ rofi_cmd() {
|
||||
rofi -dmenu \
|
||||
-p "$host" \
|
||||
-mesg "Uptime: $uptime" \
|
||||
-theme ${dir}/${theme}.rasi
|
||||
-theme $theme
|
||||
}
|
||||
|
||||
# Confirmation CMD
|
||||
@ -57,7 +49,7 @@ confirm_cmd() {
|
||||
-dmenu \
|
||||
-p 'Confirmation' \
|
||||
-mesg 'Are you Sure?' \
|
||||
-theme ${dir}/${theme}.rasi
|
||||
-theme $theme
|
||||
}
|
||||
|
||||
# Ask for confirmation
|
||||
|
@ -10,25 +10,17 @@
|
||||
## style-1 style-2 style-3 style-4 style-5
|
||||
## style-6 style-7 style-8 style-9 style-10
|
||||
|
||||
# Current Theme
|
||||
INPUT_THEME=$1
|
||||
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
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
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
theme=$($SCRIPT_DIR/../../shared/theme.sh "$SCRIPT_DIR" '1' '10' "$INPUT_THEME")
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $theme
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# CMDs
|
||||
uptime=$($dir/../../shared/uptime.sh)
|
||||
uptime=$($SCRIPT_DIR/../../shared/uptime.sh)
|
||||
host=`hostname`
|
||||
|
||||
# Options
|
||||
@ -45,7 +37,7 @@ rofi_cmd() {
|
||||
rofi -dmenu \
|
||||
-p "Uptime: $uptime" \
|
||||
-mesg "Uptime: $uptime" \
|
||||
-theme ${dir}/${theme}.rasi
|
||||
-theme $theme
|
||||
}
|
||||
|
||||
# Confirmation CMD
|
||||
@ -58,7 +50,7 @@ confirm_cmd() {
|
||||
-dmenu \
|
||||
-p 'Confirmation' \
|
||||
-mesg 'Are you Sure?' \
|
||||
-theme ${dir}/${theme}.rasi
|
||||
-theme $theme
|
||||
}
|
||||
|
||||
# Ask for confirmation
|
||||
|
@ -9,25 +9,18 @@
|
||||
#
|
||||
## style-1 style-2 style-3 style-4 style-5
|
||||
|
||||
# Current Theme
|
||||
INPUT_THEME=$1
|
||||
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
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
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
theme=$($SCRIPT_DIR/../../shared/theme.sh "$SCRIPT_DIR" '1' '5' "$INPUT_THEME")
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $theme
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# CMDs
|
||||
uptime=$($dir/../../shared/uptime.sh)
|
||||
uptime=$($SCRIPT_DIR/../../shared/uptime.sh)
|
||||
host=`hostname`
|
||||
|
||||
# Options
|
||||
@ -44,7 +37,7 @@ rofi_cmd() {
|
||||
rofi -dmenu \
|
||||
-p "Uptime: $uptime" \
|
||||
-mesg "Uptime: $uptime" \
|
||||
-theme ${dir}/${theme}.rasi
|
||||
-theme $theme
|
||||
}
|
||||
|
||||
# Confirmation CMD
|
||||
@ -52,7 +45,7 @@ confirm_cmd() {
|
||||
rofi -dmenu \
|
||||
-p 'Confirmation' \
|
||||
-mesg 'Are you Sure?' \
|
||||
-theme ${dir}/shared/confirm.rasi
|
||||
-theme ${SCRIPT_DIR}/shared/confirm.rasi
|
||||
}
|
||||
|
||||
# Ask for confirmation
|
||||
|
@ -9,25 +9,19 @@
|
||||
#
|
||||
## style-1 style-2 style-3 style-4 style-5
|
||||
|
||||
# Current Theme
|
||||
|
||||
INPUT_THEME=$1
|
||||
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
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
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
theme=$($SCRIPT_DIR/../../shared/theme.sh "$SCRIPT_DIR" '5' '5' "$INPUT_THEME")
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $theme
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# CMDs
|
||||
uptime=$($dir/../../shared/uptime.sh)
|
||||
uptime=$($SCRIPT_DIR/../../shared/uptime.sh)
|
||||
host=`hostname`
|
||||
|
||||
# Options
|
||||
@ -44,7 +38,7 @@ rofi_cmd() {
|
||||
rofi -dmenu \
|
||||
-p "Goodbye ${USER}" \
|
||||
-mesg "Uptime: $uptime" \
|
||||
-theme ${dir}/${theme}.rasi
|
||||
-theme $theme
|
||||
}
|
||||
|
||||
# Confirmation CMD
|
||||
@ -52,7 +46,7 @@ confirm_cmd() {
|
||||
rofi -dmenu \
|
||||
-p 'Confirmation' \
|
||||
-mesg 'Are you Sure?' \
|
||||
-theme ${dir}/shared/confirm.rasi
|
||||
-theme ${SCRIPT_DIR}/shared/confirm.rasi
|
||||
}
|
||||
|
||||
# Ask for confirmation
|
||||
|
@ -83,7 +83,7 @@ userimage {
|
||||
border-radius: 100%;
|
||||
border-color: white;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/user.jpeg", both);
|
||||
background-image: url("./images/user.jpeg", both);
|
||||
}
|
||||
|
||||
/*****----- Inputbar -----*****/
|
||||
|
@ -9,26 +9,19 @@
|
||||
#
|
||||
## style-1 style-2 style-3 style-4 style-5
|
||||
|
||||
# Current Theme
|
||||
INPUT_THEME=$1
|
||||
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
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
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
theme=$($SCRIPT_DIR/../../shared/theme.sh "$SCRIPT_DIR" '1' '5' "$INPUT_THEME")
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $theme
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# CMDs
|
||||
lastlogin="`last $USER | head -n1 | tr -s ' ' | cut -d' ' -f5,6,7`"
|
||||
uptime=$($dir/../../shared/uptime.sh)
|
||||
uptime=$($SCRIPT_DIR/../../shared/uptime.sh)
|
||||
host=`hostname`
|
||||
|
||||
# Options
|
||||
@ -46,7 +39,7 @@ rofi_cmd() {
|
||||
rofi -dmenu \
|
||||
-p " $USER@$host" \
|
||||
-mesg " Last Login: $lastlogin | Uptime: $uptime" \
|
||||
-theme ${dir}/${theme}.rasi
|
||||
-theme $theme
|
||||
}
|
||||
|
||||
# Confirmation CMD
|
||||
@ -59,7 +52,7 @@ confirm_cmd() {
|
||||
-dmenu \
|
||||
-p 'Confirmation' \
|
||||
-mesg 'Are you Sure?' \
|
||||
-theme ${dir}/${theme}.rasi
|
||||
-theme $theme
|
||||
}
|
||||
|
||||
# Ask for confirmation
|
||||
|
@ -64,7 +64,7 @@ inputbar {
|
||||
spacing: 0px;
|
||||
padding: 100px 80px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/a.png", width);
|
||||
background-image: url("./images/a.png", width);
|
||||
children: [ "textbox-prompt-colon", "dummy","prompt"];
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ inputbar {
|
||||
spacing: 0px;
|
||||
padding: 100px 80px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/d.png", width);
|
||||
background-image: url("./images/d.png", width);
|
||||
children: [ "textbox-prompt-colon", "dummy","prompt"];
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ inputbar {
|
||||
spacing: 0px;
|
||||
padding: 100px 40px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/e.jpg", width);
|
||||
background-image: url("./images/e.jpg", width);
|
||||
children: [ "textbox-prompt-colon", "dummy","prompt"];
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ inputbar {
|
||||
spacing: 0px;
|
||||
padding: 150px 40px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/i.jpg", width);
|
||||
background-image: url("./images/i.jpg", width);
|
||||
children: [ "textbox-prompt-colon", "dummy","prompt"];
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ inputbar {
|
||||
spacing: 20px;
|
||||
padding: 100px 40px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/j.jpg", width);
|
||||
background-image: url("./images/j.jpg", width);
|
||||
children: [ "textbox-prompt-colon", "prompt"];
|
||||
}
|
||||
|
||||
|
@ -9,26 +9,18 @@
|
||||
#
|
||||
## style-1 style-2 style-3 style-4 style-5
|
||||
|
||||
# Current Theme
|
||||
INPUT_THEME=$1
|
||||
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
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
|
||||
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
theme=$($SCRIPT_DIR/../../shared/theme.sh "$SCRIPT_DIR" '1' '5' "$INPUT_THEME")
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $theme
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# CMDs
|
||||
lastlogin="`last $USER | head -n1 | tr -s ' ' | cut -d' ' -f5,6,7`"
|
||||
uptime=$($dir/../../shared/uptime.sh)
|
||||
uptime=$($SCRIPT_DIR/../../shared/uptime.sh)
|
||||
host=`hostname`
|
||||
|
||||
# Options
|
||||
@ -46,7 +38,7 @@ rofi_cmd() {
|
||||
rofi -dmenu \
|
||||
-p " $USER@$host" \
|
||||
-mesg " Uptime: $uptime" \
|
||||
-theme ${dir}/${theme}.rasi
|
||||
-theme $theme
|
||||
}
|
||||
|
||||
# Confirmation CMD
|
||||
@ -59,7 +51,7 @@ confirm_cmd() {
|
||||
-dmenu \
|
||||
-p 'Confirmation' \
|
||||
-mesg 'Are you Sure?' \
|
||||
-theme ${dir}/${theme}.rasi
|
||||
-theme $theme
|
||||
}
|
||||
|
||||
# Ask for confirmation
|
||||
|
@ -57,7 +57,7 @@ imagebox {
|
||||
spacing: 30px;
|
||||
padding: 30px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/a.png", height);
|
||||
background-image: url("./images/a.png", height);
|
||||
children: [ "inputbar", "dummy", "message" ];
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ userimage {
|
||||
border-radius: 10px;
|
||||
border-color: @background-alt;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/a.png", height);
|
||||
background-image: url("./images/a.png", height);
|
||||
}
|
||||
|
||||
/*****----- Inputbar -----*****/
|
||||
|
@ -57,7 +57,7 @@ imagebox {
|
||||
spacing: 20px;
|
||||
padding: 20px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/d.png", height);
|
||||
background-image: url("./images/d.png", height);
|
||||
children: [ "inputbar", "dummy", "message" ];
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ userimage {
|
||||
border-radius: 10px;
|
||||
border-color: @background-alt;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/d.png", height);
|
||||
background-image: url("./images/d.png", height);
|
||||
}
|
||||
|
||||
/*****----- Inputbar -----*****/
|
||||
|
@ -57,7 +57,7 @@ imagebox {
|
||||
spacing: 0px;
|
||||
padding: 30px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/e.jpg", width);
|
||||
background-image: url("./images/e.jpg", width);
|
||||
children: [ "inputbar", "dummy", "message" ];
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ userimage {
|
||||
border-radius: 10px;
|
||||
border-color: @background-alt;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/e.jpg", height);
|
||||
background-image: url("./images/e.jpg", height);
|
||||
}
|
||||
|
||||
/*****----- Inputbar -----*****/
|
||||
|
@ -59,7 +59,7 @@ imagebox {
|
||||
spacing: 0px;
|
||||
padding: 100px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/i.jpg", height);
|
||||
background-image: url("./images/i.jpg", height);
|
||||
children: [ "inputbar", "dummy", "message" ];
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ userimage {
|
||||
border-radius: 0px;
|
||||
border-color: @background-alt;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/i.jpg", height);
|
||||
background-image: url("./images/i.jpg", height);
|
||||
}
|
||||
|
||||
/*****----- Inputbar -----*****/
|
||||
|
@ -59,7 +59,7 @@ imagebox {
|
||||
spacing: 0px;
|
||||
padding: 100px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/j.jpg", height);
|
||||
background-image: url("./images/j.jpg", height);
|
||||
children: [ "inputbar", "dummy", "message" ];
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ userimage {
|
||||
border-radius: 0px;
|
||||
border-color: @background-alt;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/images/j.jpg", height);
|
||||
background-image: url("./images/j.jpg", height);
|
||||
}
|
||||
|
||||
/*****----- Inputbar -----*****/
|
||||
|
24
files/shared/theme.sh
Executable file
24
files/shared/theme.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SOURCE_DIR=$1
|
||||
DEFAULT_THEME=$2
|
||||
MAX_THEME=$3
|
||||
INPUT_THEME=$4
|
||||
|
||||
if [ -z "$INPUT_THEME" ]; then
|
||||
theme="$DEFAULT_THEME"
|
||||
elif [[ "$INPUT_THEME" == "-h" || "$INPUT_THEME" == "--help" ]]; then
|
||||
echo "Usage: $SOURCE_DIR [1..$MAX_THEME]"
|
||||
exit 1
|
||||
elif [[ "$INPUT_THEME" -gt "$MAX_THEME" || "$INPUT_THEME" -lt 1 ]]; then
|
||||
echo "Invalid theme number! Theme must be between 1 and $MAX_THEME"
|
||||
exit 1
|
||||
else
|
||||
theme="$SOURCE_DIR/style-$INPUT_THEME.rasi"
|
||||
if [ ! -f "$theme" ]; then
|
||||
echo "Theme not found at $theme"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -n "$theme"
|
Loading…
Reference in New Issue
Block a user