Add more comments

This commit is contained in:
Stephan Raabe 2023-10-18 16:15:52 +02:00
parent b87cfe609c
commit 75a2170015
3 changed files with 24 additions and 9 deletions

View File

@ -9,14 +9,18 @@ Waybar Wiki: https://github.com/Alexays/Waybar/wiki
## Create your own theme ## Create your own theme
Please check the configurations of the folders in ~/dotfiles/waybar/themes/ Please check the configurations of the folders in ~/dotfiles/waybar/themes/
Create a folder for your theme and add your configuration. A good starting point is to copy the default folder with the default waybar theme. Create a folder for your theme and add your configuration.
The main theme folder holds the core config file and stylesheet. A good starting point is to copy the default folder with the default waybar theme.
Create subfolders to save variations like in the folder ml4w.
You can include stylesheets from other themes to standardize your themes like in the theme ml4w-bottom. The main theme folder includes the core config file and stylesheet.
Waybar configuration: https://github.com/Alexays/Waybar/wiki/Configuration
Create subfolders to save variations like in the folder ml4w. You can include stylesheets from other themes to standardize your themes like in the theme ml4w-bottom.
## Stylesheet ## Stylesheet
The style.css saves the Stylesheet of the theme. The style.css includes the style file of the theme.
Waybar Styling: https://github.com/Alexays/Waybar/wiki/Styling
## Define theme name ## Define theme name

View File

@ -9,14 +9,18 @@
# ----------------------------------------------------- # -----------------------------------------------------
# ----------------------------------------------------- # -----------------------------------------------------
# Quit running waybar instances # Quit all running waybar instances
# ----------------------------------------------------- # -----------------------------------------------------
killall waybar killall waybar
# ----------------------------------------------------- # -----------------------------------------------------
# Get current theme information # Default theme: /THEMEFOLDER;/VARIATION
# ----------------------------------------------------- # -----------------------------------------------------
themestyle="/ml4w;/ml4w/light" themestyle="/ml4w;/ml4w/light"
# -----------------------------------------------------
# Get current theme information from .cache/.themestyle.sh
# -----------------------------------------------------
if [ -f ~/.cache/.themestyle.sh ]; then if [ -f ~/.cache/.themestyle.sh ]; then
themestyle=$(cat ~/.cache/.themestyle.sh) themestyle=$(cat ~/.cache/.themestyle.sh)
else else
@ -32,7 +36,7 @@ if [ ! -f ~/dotfiles/waybar/themes${arrThemes[1]}/style.css ]; then
fi fi
# ----------------------------------------------------- # -----------------------------------------------------
# Loading the configuration based on the username # Loading the configuration and style file based on the username
# ----------------------------------------------------- # -----------------------------------------------------
if [[ $USER = "raabe" ]] if [[ $USER = "raabe" ]]
then then

View File

@ -8,7 +8,14 @@
# by Stephan Raabe (2023) # by Stephan Raabe (2023)
# ----------------------------------------------------- # -----------------------------------------------------
# -----------------------------------------------------
# Default theme folder
# -----------------------------------------------------
themes_path="$HOME/dotfiles/waybar/themes" themes_path="$HOME/dotfiles/waybar/themes"
# -----------------------------------------------------
# Initialize arrays
# -----------------------------------------------------
listThemes="" listThemes=""
listNames="" listNames=""
@ -40,7 +47,7 @@ listNames=${listNames::-2}
choice=$(echo -e "$listNames" | rofi -dmenu -config ~/dotfiles/rofi/config-wallpaper.rasi -no-show-icons -width 30 -p "Themes" -format i) choice=$(echo -e "$listNames" | rofi -dmenu -config ~/dotfiles/rofi/config-wallpaper.rasi -no-show-icons -width 30 -p "Themes" -format i)
# ----------------------------------------------------- # -----------------------------------------------------
# Set new theme by writing the theme information to ~/.cache # Set new theme by writing the theme information to ~/.cache/.themestyle.sh
# ----------------------------------------------------- # -----------------------------------------------------
if [ "$choice" ]; then if [ "$choice" ]; then
echo "${listThemes[$choice+1]}" > ~/.cache/.themestyle.sh echo "${listThemes[$choice+1]}" > ~/.cache/.themestyle.sh